luccas@portfolio — zsh
luccas@portfolio:~$
luccas@portfolio:~$ whoami

Senior engineer with 6 years of experience building production systems in Go and TypeScript on AWS.


I work on the engineering side of AI. Retrieval, evaluation, guardrails, cost. Calling the API is the easy part. Knowing whether the answer is grounded, and what it cost, isn't. My guardrails are code. A rule the model can ignore isn't a rule.


The rest is backend/platform ownership: API design, schema modeling, event-driven workflows, CI/CD, infrastructure as code, auth boundaries, observability, and production debugging.


Right now that's Open Finance, in fintech. Before that: multi-tenant SaaS, European research-computing platforms, aviation and travel systems, and a self-hosted personal SaaS.


// C1 English. 6 years remote with international teams. AWS Certified Cloud Practitioner. Based in Brazil.

luccas@portfolio:~$ cat ai-engineering/cortex.md

Cortex — an agent for people with ADHD (2026 – Present). ADHD is a deficit of executive function, the skills that start a task, hold a plan and switch back after an interruption, so Cortex moves that function out of the head and into a system that acts: it reaches out on its own schedule, escalates when it keeps getting refused, and never writes anything until the person taps. It came out of the harness I first built for my own ADHD, rebuilt as a product for other people. Today it organises what you are carrying, learns your profile from what you confirm, and takes the first move. Where it is going: finance, email and calendar in one place, so your whole life sits in one agent instead of five apps. Built and run by me on Cloudflare Workers, TypeScript and Postgres/pgvector, with models reached through one gateway.


How I work with agents, day to day
  • I orchestrate, the agents execute: work is dispatched to several agents in parallel, each isolated in its own git worktree so one cannot disturb another's files, with cheap models on mechanical work and strong models on judgement.
  • The rules that matter are mechanical, not written in a prompt: hooks that refuse an edit at write time. A rule the model can ignore is not a rule.
  • Every delivery is reviewed adversarially, by reading the diff and by mutation testing. An agent's own report is a summary with a bias.
  • An instruction to an executor is self-contained and ends in a done condition and the proof that fails if the change is wrong.
Application architecture
  • Structured output as a contract: strict JSON schema revalidated after parsing, a closed action vocabulary checked in two layers, schema retry that names the error. The shape is the provider's obligation, not a later inspection.
  • The model proposes, the code applies: intent separated from execution, human confirmation before any write. Only deterministic code touches the database.
  • Request deadline with propagated cancellation, so a slow model call is aborted against the platform's own timeout and the user still gets an answer, never silence.
  • Model routing per route (reasoning where nobody is waiting, none where someone is) on a provider-agnostic gateway, with model selection by measuring latency, cost and schema validity on real calls.
  • Prompt as versioned code: named sections, instruction hierarchy between system and user, few-shot pairs, information position in the context window.
  • A deterministic pipeline with the LLM only on the fuzzy step, and an orchestration framework adopted only after measuring it against the hand-written version.
Retrieval and memory
  • Hybrid retrieval pipeline: local multilingual embeddings on CPU, lexical BM25 and vector search fused by best rank, metadata reranking with a hard ceiling.
  • Retrieval evaluated before it's tuned, with a golden set scored by hit@k and MRR per leg and for the fusion, weights never adjusted after the fact.
  • Chunking and indexing by document structure, contextual retrieval with the section title inside the chunk, incremental indexing by content hash.
  • Embedding space identity travels with the vector: model, dimension and version, so a vector from another space never enters the same comparison.
  • Long-term memory with provenance and confidence: what was said, inferred and observed weigh differently, with a human gate before anything is promoted to durable fact.
  • Knowing when not to use retrieval: live structured data goes through a tool call, not a stale embedding.
Evaluation
  • Golden set of multi-turn conversations, deterministic assertions, absolute rules kept outside the average. One prompt improves a turn and breaks the conversation.
  • Prompt lock as a CI regression gate: a prompt change doesn't merge without its measurement beside it, baseline calibrated at the same sample size.
  • Variance treated as an instrument: median of N runs, a declared tolerance, a resolution below which a difference isn't a result.
  • LLM-as-judge with a strict schema, temperature 0, fail-high on truncation. A missing answer never reads as approved.
  • Eval of the eval, with planted and clean fixtures measuring the judge's own recall and precision, and mutation testing as proof a guard actually catches something.
Safety and guardrails
  • Prompt injection defense by fencing every untrusted source: profile, history, retrieved passages and third-party text enter as data, never as instructions.
  • Red teaming against the real path with a published attack battery (garak), plus adversarial evals with a mechanical verdict.
  • False-refusal rate measured beside violation rate. A guard that only measures violations hardens until it refuses everything.
  • LLM judge as a write-path guardrail, in cascade and fail-closed: the free filter runs first, the paid call only on what survives.
  • Grounding check and reference validation: a fact that doesn't anchor in the user's own message doesn't enter.
Observability, cost and agentic engineering
  • Tracing per model call, one row per attempt, with cost attribution per trace and a per-model price table computed at call time.
  • Latency spans per phase and a latency budget against the platform deadline, prompt caching on a stable prefix, and output token ceilings.
  • Always-on infrastructure cost treated as a design input, not an afterthought.
  • Agent harness with mechanical rules across three codebases: hooks that deny at write time, so a rule that matters doesn't depend on the model remembering it.
  • Subagent roles with model routing by risk, agents isolated in git worktrees, and adversarial review of agent deliveries by diff and mutation testing, because an agent's report is a summary with a bias.

// Also studied, not yet built: agent loops and compounding per-step error, workflow vs. agent design, RAG vs. fine-tuning vs. long context, cross-encoder reranking, KV cache and prefill, semantic caching.

luccas@portfolio:~$ ls -la skills/
ai/
  • Structured output / schema-constrained generation
  • Hybrid retrieval (BM25 + vector, RRF)
  • pgvector (HNSW) / Cloudflare Vectorize / MongoDB Atlas Vector Search
  • Evals: golden sets, prompt lock, mutation testing
  • LLM-as-judge guardrails, fail-closed
  • Prompt injection defense / red teaming (garak)
  • Cost and latency tracing per model call
  • Agent harnesses / deterministic gates / MCP
backend/
  • Go
  • Node.js
  • TypeScript
  • NestJS
  • Hono / Chi / Huma
  • REST APIs
  • OpenAPI
frontend/
  • React
  • Next.js
  • Astro
  • Tailwind CSS
  • HTML / CSS
testing/
  • Playwright
  • Vitest
  • Jest
  • TDD
infrastructure/
  • AWS (Lambda, ECS, SQS, SNS, S3, EventBridge, DynamoDB)
  • Terraform / OpenTofu
  • Docker
  • GitHub Actions
  • CircleCI
  • CloudFormation
  • Atlantis
databases/
  • PostgreSQL (PostGIS)
  • SQLite
  • DynamoDB
  • MongoDB
  • MongoDB Atlas Vector Search
  • Redis / Valkey
  • MySQL
practices/
  • System Design
  • Clean Architecture
  • Event-Driven Architecture
  • SOLID Principles
  • TDD
  • Microservices
  • Serverless
  • AI-assisted engineering guardrails
auth/
  • Auth0
  • Clerk
  • Casbin (RBAC)
  • OAuth2 / OIDC
  • AWS IAM
observability/
  • Sentry
  • CloudWatch
  • Prometheus
  • Grafana
  • Structured logging
luccas@portfolio:~$ cat experience/*.log | sort -r
Celcoin (Outsourcing)
Senior Backend Engineer — Remote, Brazil

Open Finance platform at a Brazilian fintech. I designed and reimplemented the data plane end to end, then designed the cache architecture behind it.

  • Reimplemented the data plane: two legacy JavaScript backends became one NestJS service, incrementally, without breaking a route or a contract
  • Restructured the platform into a modular monolith. Domains are libraries, not folders, and each owns its database through a named connection, which killed a model-name collision that was silently reading an empty collection
  • Designed the data cache as CQRS applied to ingestion: append-only writes on S3, and an Aurora projection serving reads, so the query side can be reshaped without collecting anything again
  • Designed around a hard monthly call ceiling per customer on the upstream API, where crossing it blocks that customer. A miss returns empty, never a synchronous call upstream
  • Built the billing path with exactly-once semantics: durable outbox, atomic claim with lease on drain, server-minted event id behind a unique index created at boot
  • Replaced a scheduler that called its own API over HTTP with a typed event on a queue, and wrote the decision records behind each of these choices
  • Brought ADRs and C4 diagrams to the team, plus a written design for each feature and for infrastructure, where nobody was documenting decisions before
  • Team code review and infrastructure specification for another team, with mutation testing and contract tests against real infrastructure as the quality bar

TypeScript · NestJS · MongoDB · PostgreSQL (Aurora) · AWS S3 · BullMQ · Redis · Keycloak · GitLab CI · Open Finance · Pix

Cyrex Enterprise
Senior Fullstack / Senior Software Engineer — Remote, Belgium

Software consultancy based in Belgium, clients in Europe, squads in the US.

Belgium-based salon-management multi-tenant SaaS — two years as the backend engineer, Go on AWS, with Next.js surfaces when the product needed them.

  • Ports and adapters with an OpenAPI contract generated from code and a CI drift gate: a contract change breaks the build
  • Event-driven workers on SQS and Go Lambdas: partial batch failure with dead-letter queue and alarms, circuit breaker with exponential backoff, delay queue with self-healing reconciliation
  • Four third-party integrations: accounting ERP over OAuth2 with compare-and-swap token rotation, e-commerce platform migration, hosted identity provider synced by webhook, reviews ingestion cached in the database
  • Production incident ownership: double booking closed with a transactional advisory lock, an integration token that vanished traced to three stacked causes, slow queries read from the planner before adding indexes
  • Provisioned the AWS platform with Terraform and OpenTofu, reviewed in pull requests, with OIDC federation and no static keys in CI
  • AI code review in CI and end-to-end test agents (planner, generator, healer) on Playwright

A licensed real-money game platform (2026) — sole engineer on the codebase: NestJS, PostgreSQL, Redis, Socket.IO, React, Phaser, on AWS.

  • Two payment rails integrated end to end, webhook treated as a trigger and never as proof, exactly-once crediting with a conditional write and a scheduled reconciliation sweep
  • Default-deny authorization by route metadata, revocation checked on every request and socket, signed identity with an anti-replay window
  • Real-time state that survives a broken connection: sequenced events replayed on reconnect, authoritative state at end of turn, idempotent per-match effects
  • Licence obligations as server-side mechanisms: deposit limits over rolling windows, irrevocable self-exclusion, a restricted-account primitive shared across self-exclusion, geo-blocking and risk tiers

Go · TypeScript · NestJS · PostgreSQL/PostGIS · Redis/Valkey · Socket.IO · React · Phaser · AWS (ECS Fargate, Lambda, SQS) · Terraform/OpenTofu · Atlantis · GitHub Actions · Huma · Chi · Casbin

Enkel TI
Senior Backend Engineer — Remote, Brazil

Allocated to Smiles Viagens (Gol), corporate travel platform.

  • Designed a fully serverless, event-driven architecture: Lambdas over SQS and EventBridge, choreography for what is independent, Step Functions where order and retries matter, and CloudFormation for infrastructure
  • Multi-tenant authentication with Auth0 and RBAC per tenant, single-table DynamoDB with hierarchical composite keys, multi-level approval workflow, GDS (Sabre) integration for reserving flights and hotels
  • Architecture review per feature, correcting serverless function granularity by domain boundary instead of one function per feature
  • Automated the consultancy's own employee onboarding with a Python Slack bot and a 1Password API integration, the only engineer to get that integration working, cutting onboarding time by 40%

TypeScript · Python · AWS (Lambda, DynamoDB, EventBridge, SNS, CloudFormation) · Auth0 · Serverless

Sambatech
Fullstack Developer — Remote, Brazil

Built custom Learning Management Systems for enterprise clients at a company recognized by Fast Company for innovation in online video.

  • Developed and maintained REST APIs with TypeScript/Node.js, focusing on SQL query optimization and efficient database management with PostgreSQL
  • Built interactive frontend interfaces with React.js, contributing to user experience improvements across multi-tenant LMS platforms
  • Applied SOLID principles and clean code practices to ensure modularity and testability with comprehensive Jest testing
  • Integrated AWS IAM for secure multi-tenant authentication and access control

TypeScript · Node.js · Express · React · PostgreSQL · Docker · AWS

Claranet Brasil
Fullstack Developer — Remote, Brazil

Early-career role in a small innovation team (2 developers) at a global technology leader, building internal products before the team scaled through acquisition.

  • Built and maintained Client Portal and Ally Portal (affiliate/reseller management) — taking ownership of features end-to-end despite limited team size
  • Developed backend systems following SOLID principles, clean architecture, and design patterns with comprehensive Jest testing
  • Built frontend features and implemented APIs to automate internal processes

TypeScript · Node.js · Express · React · PostgreSQL · MongoDB · Docker

luccas@portfolio:~$ cat selected-projects/*.md
Cortex
ADHD Agent — Proactive Beat, Retrieval, Evals

An agent for people with ADHD, on the thesis that ADHD is a deficit of executive function rather than of knowing what to do, so advice does not help much and a system that carries the function does. It takes the first move, because starting is the expensive part, and offers one named thing to carry rather than a list, because a list is another decision. Its memory of the person is auditable and confirmed by her, never silently inferred. Semantic retrieval runs on the same Postgres that holds the rest of the data, so there's no second system to keep in sync, and every stored vector carries the model that produced it, since vectors from different models aren't comparable.

This Site
Retrieval Over My Own CV

The chat below is retrieval, not a prompt with my CV pasted into it. Content is chunked, embedded and stored in a vector index, and a question retrieves the relevant pieces before the model answers. Runs entirely on Cloudflare: Pages Functions, Workers AI for embeddings and generation, Vectorize for the index.

Moonforge
Solo Production SaaS

World of Warcraft auction/crafting analysis product with Battle.net OAuth2, per-user isolation, deterministic market logic, self-hosted infrastructure, Prometheus/Grafana monitoring, Telegram alerting, and a custom exporter that reduced scrape latency from roughly 14s to roughly 3s.

PRACE / EuroHPC Platform
European Research-computing Workflows

Product/platform work around allocation, proposal, review, and administrative workflows for European research-computing systems, reusing backend and infrastructure patterns from production SaaS work.

dAIvid Slack Bot
AI Workflow / Hackathon Winner

Cyrex internal AI hackathon winner: Slack + Jira workflow assistant with human review, ticket/documentation retrieval with a similarity threshold, and LLM-assisted summaries for project flow questions. Vector store migrated from Pinecone to MongoDB Atlas Vector Search to drop a dependency.

luccas@portfolio:~$ grep -r 'achievement' ./career/
1st Place — Amazon Studios Hackathon (Turkey)

Selected and sponsored by Amazon Studios for a 4-day hackathon during New World game testing. Built an AI-powered project workflow bot (Slack + Jira + MongoDB Atlas Vector Search) that kept humans in the loop for ticket creation, answered project-flow questions from retrieved documentation, and generated summaries on demand. Won 1st place competing against internal engineering teams.

Onboarding Automation — 40% Time Reduction

Built a Python Slack bot with 1Password API integration that automated access generation for new collaborators. Was the only engineer to successfully implement the 1Password integration, cutting onboarding time by 40%.

Build Generation Tool — Avalanche Studios

Developed a build generation tool using Go and GitHub Actions that scanned NFS, created cron jobs, and scheduled releases — significantly improving build management efficiency.

luccas@portfolio:~$ cat certifications.txt

AWS Certified Cloud Practitioner

luccas@portfolio:~$ echo $CONTACT
luccas@portfolio:~$ ./chat --interactive
AI Chat — Ask me anything about Luccas online

Ask about experience, skills, work style, or even hobbies. Type clear to reset.

visitor:~$
luccas@portfolio:~$