Back to the academy

Which AI agents you need to build and scale a real project

From improvised prompts to structured agentic engineering: a team of specialised agents, a living project memory and external tools connected through MCP.

Intermediate · Claude Code · Codex · Cursor · MCP

From improvised chat to structured agentic engineering

A generic prompt works on a hundred-line project. On a hundred-thousand-line one, the agent does not know which conventions to follow, which files it must not touch or how a change is verified, and every session starts from scratch. Structured agentic engineering turns that tacit knowledge into versioned files: a router (`CLAUDE.md` or `AGENTS.md`) loaded in every session, rules per role, indexed documentation and a command that defines when something is done.

❌ Antipattern

"Add a price alert feature. Make it nice and add tests."

✅ Stoic pattern

CLAUDE.md / AGENTS.md            → router, loaded every session
├─ .agent/rules/00-core.md      → TDD, ≤ 300 lines, i18n
├─ .agent/rules/02-backend.md   → Router → Controller → Service
├─ .agent/KNOWLEDGE_MANIFEST.md → where each doc lives
└─ ./pipeline_tests.sh frontend → the definition of "done"

Key takeaways

  • Context that is not in a file is lost when the session closes.
  • Versioned rules make any agent —or person— work the same way.
  • Define "done" with a verifiable command, not with an impression.

The team of specialised agents (.agent/rules/)

Instead of one agent that knows everything, each role has its own rules file: Core (zero tolerance, TDD and a 300-line maximum per file), Architect (contracts and interfaces before writing code), Backend (Router → Controller → Service → ORM, security and safe migrations), Frontend (modular components, `data-testid`, per-feature state and i18n), Design (colour tokens and accessible contrast) and the domain specialist (the rules of the quant engine). The agent identifies its role and loads only what it needs.

Example

$ ls .agent/rules
00-core.md        01-arquitecto.md   02-backend.md
03-frontend.md    04-designer.md     05-chivato.md

Key takeaways

  • One rules file per role keeps every context small and precise.
  • The architect fixes the contracts before anyone implements: less rework.
  • Design and accessibility rules are reviewable text too, not opinions.

The project's living memory (KNOWLEDGE_MANIFEST.md)

Agents hallucinate when they search blindly. An auto-generated manifest —one line per document, with its path and description— tells them which file answers each question before they grep through the repository. Because it is regenerated from the documents themselves at the start of every session, it never goes stale: you edit the documentation, never the index.

Example

$ python scripts/generate_docs_manifest.py
Wrote .agent/KNOWLEDGE_MANIFEST.md

- .agent/docs/platform/web/landing-home.md: Public Web: Landing Page & Views Routing
- .agent/docs/platform/web/seo.md: Public Web: SEO & Prerendered Pages

Key takeaways

  • A one-line-per-document index saves searches and prevents invented answers.
  • Generate the index from the documents: editing it by hand guarantees it goes stale.
  • Document the why in the docs; the code and the tests already tell the what.

External tools with MCP (Model Context Protocol)

MCP is an open protocol that connects the agent to external tools through servers exposing typed functions. With GitHub MCP, the agent reads the backlog (`list_issues`, `get_issue`), implements the task and documents progress (`add_issue_comment`) without leaving the workflow. With Chrome DevTools MCP it can open the page, inspect the DOM and audit contrast or performance with real data instead of guesses.

Example

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<token>" }
    }
  }
}

Key takeaways

  • MCP turns external services into typed tools the agent can call.
  • A GitHub Issues backlog + MCP closes the loop: read the task, implement it and document it.
  • Treat MCP tokens like any other secret: out of the repository and with minimal permissions.