.engineering-docs/ set — never overwriting anything.
How Mode B is detected
The orchestrator triggers Brownfield Mode automatically when any of these conditions are true:Existing index.md
A
.engineering-docs/index.md already exists in the project root — the orchestrator reads it before doing anything else.Feature language in the prompt
The user’s request uses words like “add a feature,” “extend,” “modify,” or “integrate” — strong signals that a base system exists.
Existing codebase, no docs
A codebase exists in the project root (e.g.,
package.json, go.mod, pyproject.toml) but there’s no .engineering-docs/ history yet.Explicit brownfield prompt
The prompt directly states the project is existing: “We have an existing app built with…”
What the orchestrator reads first
Before asking a single question, the orchestrator loads context:- Reads
index.md— gets the full list of existing documents, their status, and the reading order. - Reads the most recent 2–3 documents from the existing set — system architecture, technical spec, database design — to understand the current stack, conventions, and entity model.
- If no docs exist yet (codebase present but no
.engineering-docs/) — scans the project root forREADME.md, framework config files, and existing database schemas. It then presents its inference of the current system and asks you to confirm or correct it, rather than starting from zero.
Orchestrator inference example (no docs yet)
Which skills typically run in Mode B
The orchestrator runs only the subset of skills relevant to the change. For most feature additions, this means:
Not invoked in Mode B:
business-concept— already establisheduser-personas-behavior— already establishedsystem-architecture-document— already documented (an ADR is used if architecture changes)ux-flow-specification— only if the new UI is complex enough to warrant its own flow docdesign-system-specification— the existing design system covers itdisaster-recovery-plan— no change to recovery postureslo-error-budget-document— no change to reliability targets (unless the feature is a new high-stakes surface)
End-to-end example: adding a loyalty rewards system
Here’s a complete walkthrough using the scenario of adding a loyalty program to an existing e-commerce app.1
Give the orchestrator your feature request
Example prompt (brownfield-feature.txt)
2
Context loading and confirmation
The orchestrator reads existing docs (or infers from the codebase) and presents what it understands before asking anything:
Orchestrator context summary
3
Feature-scoped interviews
For each skill, the orchestrator asks only what it doesn’t already know — maximum 2–3 questions, one at a time.For the loyalty system, the security threat model interview might ask:
- “Points are effectively a monetary equivalent. Should point balances be treated as financial records for audit purposes, or is a soft log sufficient?”
- “What’s the maximum redemption value per order, and should there be velocity limits on point accrual to prevent abuse?”
4
Documents append to the existing set
New documents are written with the next available sequence numbers, continuing the existing set:
Existing documents are never overwritten. If a new document truly replaces an old one — for example, if the loyalty system completely changes the database schema document — the old file moves to
.engineering-docs/archive/ with a timestamp suffix, and the new version takes the next available number.5
Updated master index
After all new documents are generated,
index.md is updated to reflect the complete picture — original documents plus the new feature additions:Updated index.md
Versioning: what happens to old documents
When a new feature partially replaces an earlier document (e.g., the database design for the loyalty system adds tables that change the original schema document), two paths are available:- Append a scoped document (preferred)
- Archive and replace
Write a new document scoped to the feature (e.g.,
21-database-design-loyalty.md) that documents only the new or changed tables. The original database design document remains intact as the canonical record of the original schema.This is preferred for additive changes where the original document is still accurate for what it describes.Consistency after a brownfield run
After all feature documents are generated, the orchestrator runs the same cross-document consistency checks as Mode A — but scoped to the interaction between new and existing documents:- Do the new API endpoints reference entities that actually exist in the database design (both old and new tables)?
- Does the security threat model cover the new API surface introduced by the loyalty system?
- Do entity names in the new documents match the naming conventions established in the original technical specification?
- Does the new implementation plan account for the existing deployment pipeline?
