What We Learned
When a FORGE N8N workflow delivers a block implementation prompt, the first bottleneck is codebase understanding. Block 8 touched 6+ existing files across services, config, models, exceptions, migrations, and tests. Reading them sequentially would take several turns. Instead, launching 2-3 Explore agents in parallel — one for the MCP server architecture, one for the test infrastructure and database schema, and a third for the Postgres repository layer — compressed the exploration phase into a single message. The Explore agents returned comprehensive summaries that were fed directly into a Plan agent. The Plan agent produced a file-by-file implementation design with SQL, Python class signatures, and test coverage strategy. This went into a plan file that the user approved in one review cycle.Why It Matters
FORGE prompts arrive with 7+ tasks, each specifying file targets and acceptance criteria. Without a structured exploration phase, the executing agent makes assumptions about existing patterns — and those assumptions break when the codebase doesn’t match expectations. The server.py tool registration pattern, the conftest.py fixture style, the migration SQL conventions — all of these have specific local conventions that can only be learned by reading the code. Parallel exploration means the agent sees the full picture before writing a single line. The plan is grounded in actual file contents, not assumptions.The Pattern
For FORGE block execution in plan mode:- Explore Phase — Launch 2-3 agents in a single message, each with a distinct search focus. Keep prompts specific: “Read server.py, all services, config.py, pyproject.toml” vs “Read all migrations, conftest.py, check for existing AI code.”
- Plan Phase — Feed exploration results into a Plan agent. Include current architecture summary, verbatim block requirements, and unresolved design questions.
- Verify Phase — Read 3-5 critical files directly to spot-check the plan against reality.
- Write Phase — Produce a concise plan file with file paths, SQL snippets, and class interfaces. Exit plan mode.