# Workflow — {{system_name}} `/architect` reads this file to decide what runs next. The stage table below is parsed. Keep the column order (`stage | agent | input | output | gate`), keep the stage ids, and keep one row per stage. Add a stage by adding a row and a matching gate row; do not renumber or rename existing ids. ## Stage table | stage | agent | input | output | gate | |---|---|---|---|---| | frame | discovery-analyst | the goal argument | `00-frame.md` | `gate.frame` | | discover | discovery-analyst | `00-frame.md`, the repository | `01-discovery.md` | `gate.discovery` | | flow | experience-designer | `00-frame.md`, `01-discovery.md` | `02-user-flows.md`, `03-experience-blueprint.md` | `gate.flow` | | decide | principal-architect | `01-discovery.md`, `03-experience-blueprint.md`, the repository | `SYSTEM.md`, `adr/*`, `architecture.json` | `gate.decisions` | | cost | economics-analyst | `SYSTEM.md`, `01-discovery.md` | `04-roi.md`, `prices.json` | `gate.economics` | | secure | trust-reviewer | `SYSTEM.md`, the repository | `05-trust-boundary.md` | `gate.trust` | | prove | eval-engineer | `05-trust-boundary.md`, `02-user-flows.md` | `06-evals/cases.jsonl`, `06-evals/rubric.md` | `gate.evals` | | operate | delivery-engineer | `SYSTEM.md`, `06-evals/rubric.md` | `WORKFLOW.md`, `SOP.md`, `07-runbook.md` | `gate.operate` | | verify | independent-verifier | every artifact above | `receipts/{{today}}-verify.md`, `review.md` | `gate.verify` | ## Gate table A stage is complete when its gate is `PASS` in `architecture.json`, or `SKIPPED` with a written reason. Anything else — `FAIL`, or absent from the gates map — means the stage has not run. | gate | green when | |---|---| | `gate.frame` | a one-sentence outcome, named non-goals, and a falsifiable kill criterion | | `gate.discovery` | at least one answered question per bank section; zero `[assumed]` tags (`[unknown]` is allowed) | | `gate.flow` | every flow has a failure branch and a human step; the experience blueprint covers every stage | | `gate.decisions` | four decisions each `MADE` or `OPEN` with an evidence pointer; every `OPEN` carries a dated deferral cost; every plane has an owner | | `gate.economics` | every price row has `source_url` and `retrieved_at` within 90 days; a sensitivity band on three drivers; payback stated in months, no return-rate acronyms | | `gate.trust` | retrieved text traced to the line where it becomes labelled data; every irreversible tool gated by a human step | | `gate.evals` | at least 10 cases, at least one refusal case, at least one injection case; the harness runs; the injection case fails closed | | `gate.operate` | every runbook command exists and dry-runs exit 0; rollback and owner named | | `gate.verify` | a receipt written by the verifier in a fresh context; every evidence pointer re-derived | ## Fix-first order When more than one gate is red, work the highest reversal cost first. Within `gate.decisions`, when several decisions are `OPEN`, the order is `trust`, `run`, `loop`, `model` — trust rises in cost fastest, because it scales with the number of tools already shipped. Generated by AI Architect · https://www.frankx.ai/ai-architect