
The past few weeks have been wild. Our team recently adopted AI-assisted programming (not...
The past few weeks have been wild.
Our team recently adopted AI-assisted programming (not vibe-coding). We wanted speed, consistency, and fewer repetitive tasks.
What we got in week one was... chaos.
TL;DR We had inconsistent AI output across teammates, treated it as a systems problem, applied Agentic SDLC principles, and built a
.codexstructure that made Codex outputs far more consistent.
.codex (and why it matters)Even with detailed technical tickets, our AI agents kept producing outputs that didn’t line up:
Every merge felt like stitching code from three different universes.

Week one energy: us trying to keep standards while random AI output keeps walking by.
We tested different setups.
A strong CLAUDE.md helped a lot early. Claude Opus was excellent at reasoning and breaking work down step by step.
The issue for us was practical: limits and timeouts.
Since our company sponsors Codex, we moved to Codex as our main tool. First impression? A bit lackluster compared to Claude out of the box.
That pushed us to a better question:
Maybe this isn’t just a model problem. Maybe it’s a <u>system problem</u>.

Quick diff:
In A-SDLC, developers don’t just write code. We orchestrate:
And yes, we’re actively applying these principles in real day-to-day work, not just talking about them:
Once we treated this as a systems problem, output quality improved fast.
That’s why I built this boilerplate: to showcase the .codex setup that worked best for us.
Repo: github.com/jimzandueta/codex-nestjs
.codex (and why it matters)This isn’t just a random folder. It’s the operating system for consistent AI-assisted engineering.
.codex/
START_HERE.md
RULES.md
MANIFEST.yaml
instructions/
patterns/
anti-patterns/
checklists/
skills/
prompts/
templates/
overrides/
memory/

START_HERE.md + RULES.mdThese are your baseline guardrails.
## Output Rules
1. Reuse existing patterns before inventing new ones.
2. Keep diffs minimal.
3. Never commit secrets.
This alone prevents a lot of “same task, five coding styles” situations.
MANIFEST.yamlThis is context routing. It tells the agent what to load for each task type.
task_routes:
new-feature:
read:
- .codex/instructions/global.md
- .codex/patterns/repo-structure.md
- .codex/patterns/error-handling.md
skills:
- .codex/skills/new-feature/SKILL.md
So agents don’t start cold. They start with the right playbook.
instructions/, patterns/, anti-patterns/instructions/: how to workpatterns/: preferred way to buildanti-patterns/: what to avoidThink of this as turning tribal team knowledge into repeatable, machine-readable engineering practice.
checklists/, skills/, prompts/, templates/This is the day-to-day execution layer:
checklists/: quality gatesskills/: repeatable workflowsprompts/: reusable prompt scaffoldstemplates/: starter artifactsExample checklist snippet:
## Tests
- [ ] New logic has happy path + failure test
- [ ] Coverage stays at 100% threshold
- [ ] No flaky tests introduced
overrides/This lets you keep generic Codex assets while declaring project reality.
Example:
src/common, src/clients, src/modules, etc.”memory/ (the secret sauce)This is where consistency compounds:
memory/project-facts.md → stable project truthsmemory/decisions.md → ADR-style decisions/tradeoffsmemory/learned-patterns.md → recurring conventions discovered during workAs new decisions are made between the developer and AI agent, memory gets updated so future tasks inherit the same context and tradeoffs.
A realistic flow:
requestId in logs for traceability.”AsyncLocalStorage or explicit propagation.”Sample ADR:
### ADR-002: Standardize request correlation IDs in HTTP logs
**Date**: 2026-04-02
**Status**: Accepted
**Context**: Debugging incidents was slow because logs across layers were hard to correlate.
**Decision**: Add `requestId` at the HTTP boundary and propagate it through services/clients.
**Consequences**: Better traceability, with slight method-signature overhead.
Sample project facts update:
## Conventions
- Logging: include `requestId` in structured logs for HTTP flows.
- Request context: generate/forward `x-request-id` at ingress and propagate downstream.
Sample learned pattern:
### LP-001: Propagate requestId from boundary to integrations
**Observed**: Missing correlation fields made multi-step failures harder to debug.
**Rule**: Controllers create context; services/clients forward `requestId`; logs include it at each layer.
This memory layer is the difference between “new agent, same mistakes” and “new agent, same team brain.”

Using this .codex setup, we built a NestJS sample HTTP server with consistent architecture and quality gates:
common, clients, integrations, modules, http, errors)HOST, PORT, NODE_ENV, LOG_LEVEL)posts) using JSONPlaceholderLICENSE, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY)So this repo isn’t just “another Nest starter.”
It’s a working example of structured AI-assisted delivery.
Codex setups are usually stack-specific.
This .codex is tuned for a NestJS HTTP app. I maintain a different Codex baseline for Terraform/infrastructure because workflows, anti-patterns, and quality gates are different.
Same core idea, different playbook.
I’ll keep evolving this repo with:
If your team is in that “week one AI chaos” phase, start with structure first.
Model quality matters, but system quality matters more.


gemmaI ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...
communityHey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...
ai(yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...
aiMy laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...
githubactionsI Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...
aiI've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...
Workflows from the Neura Market marketplace related to this DeepSeek resource