fullstack-agentic-flow 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +348 -0
- package/dist/src/cli/args.js +74 -0
- package/dist/src/cli/commands/doctor.js +133 -0
- package/dist/src/cli/commands/init.js +103 -0
- package/dist/src/cli/commands/shared.js +20 -0
- package/dist/src/cli/commands/tools.js +21 -0
- package/dist/src/cli/commands/update.js +21 -0
- package/dist/src/cli/main.js +6 -0
- package/dist/src/cli/output.js +11 -0
- package/dist/src/cli/prompter.js +13 -0
- package/dist/src/cli/report.js +13 -0
- package/dist/src/cli/run.js +48 -0
- package/dist/src/domain/canon-mapping.js +26 -0
- package/dist/src/domain/claude-md-mode.js +17 -0
- package/dist/src/domain/enum-parse.js +9 -0
- package/dist/src/domain/errors.js +13 -0
- package/dist/src/domain/pipeline-config.js +58 -0
- package/dist/src/domain/runtime.js +19 -0
- package/dist/src/domain/tool.js +129 -0
- package/dist/src/domain/topology.js +39 -0
- package/dist/src/install/adapters.js +39 -0
- package/dist/src/install/applier.js +150 -0
- package/dist/src/install/detect.js +70 -0
- package/dist/src/install/managed-section.js +35 -0
- package/dist/src/install/manifest.js +63 -0
- package/dist/src/install/planned-file.js +77 -0
- package/dist/src/install/planner.js +139 -0
- package/dist/src/install/rules-preset.js +37 -0
- package/dist/src/install/setup-guide.js +60 -0
- package/dist/src/io/fs.js +39 -0
- package/dist/src/io/paths.js +6 -0
- package/dist/src/io/shell.js +25 -0
- package/dist/src/registry/commands.js +52 -0
- package/dist/src/registry/subagents.js +52 -0
- package/dist/src/registry/tools.js +99 -0
- package/package.json +53 -0
- package/payload/ai-agents/agents/00-bootstrap.md +473 -0
- package/payload/ai-agents/agents/00a-scaffold.md +295 -0
- package/payload/ai-agents/agents/00b-module-scaffold.md +108 -0
- package/payload/ai-agents/agents/01-intake.md +308 -0
- package/payload/ai-agents/agents/01b-impact-analysis.md +274 -0
- package/payload/ai-agents/agents/02a-dependency-map.md +247 -0
- package/payload/ai-agents/agents/02b-backend-contract.md +434 -0
- package/payload/ai-agents/agents/02c-ui-contract.md +367 -0
- package/payload/ai-agents/agents/02d-interface-seam.md +373 -0
- package/payload/ai-agents/agents/03a-backend-sequence.md +233 -0
- package/payload/ai-agents/agents/03b-ui-sequence.md +230 -0
- package/payload/ai-agents/agents/04a-backend-implementer.md +290 -0
- package/payload/ai-agents/agents/04b-ui-implementer.md +302 -0
- package/payload/ai-agents/agents/05-ci-validator.md +125 -0
- package/payload/ai-agents/agents/06-qa-spec.md +249 -0
- package/payload/ai-agents/agents/07-security.md +228 -0
- package/payload/ai-agents/agents/08-performance.md +208 -0
- package/payload/ai-agents/agents/09a-feature-notes.md +156 -0
- package/payload/ai-agents/agents/09b-release.md +111 -0
- package/payload/ai-agents/architecture-context.template.md +554 -0
- package/payload/ai-agents/archive/README.md +22 -0
- package/payload/ai-agents/canon/backend-canon.md +295 -0
- package/payload/ai-agents/canon/frontend-canon.md +47 -0
- package/payload/ai-agents/canon/typed-data.md +158 -0
- package/payload/ai-agents/observations/README.md +11 -0
- package/payload/ai-agents/scripts/check-test-with-change.mjs +103 -0
- package/payload/ai-agents/scripts/check-typed-boundaries.mjs +329 -0
- package/payload/ai-agents/scripts/lib/config.mjs +63 -0
- package/payload/ai-agents/scripts/lib/glob.mjs +40 -0
- package/payload/ai-agents/state/README.md +108 -0
- package/payload/ai-agents/state/current-stage.md +10 -0
- package/payload/ai-agents/templates/README.md +22 -0
- package/payload/ai-agents/templates/ci/github-actions.rules.yml +35 -0
- package/payload/ai-agents/templates/ci/gitlab-ci.rules.yml +30 -0
- package/payload/ai-agents/toolchain.md +214 -0
- package/payload/commands/bootstrap.md +17 -0
- package/payload/commands/contract.md +64 -0
- package/payload/commands/finalize.md +26 -0
- package/payload/commands/impact.md +25 -0
- package/payload/commands/implement.md +58 -0
- package/payload/commands/intake.md +16 -0
- package/payload/commands/perf.md +20 -0
- package/payload/commands/qa.md +15 -0
- package/payload/commands/release.md +22 -0
- package/payload/commands/resume.md +52 -0
- package/payload/commands/scaffold-module.md +20 -0
- package/payload/commands/scaffold.md +35 -0
- package/payload/commands/seam.md +28 -0
- package/payload/commands/security.md +16 -0
- package/payload/commands/sequence.md +22 -0
- package/payload/commands/status.md +37 -0
- package/payload/legacy/v1-checksums.json +197 -0
- package/payload/root/contracts-README.md +19 -0
- package/payload/root/pipeline-section.md +33 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Toolchain — skills, plugins, and tools the agents use
|
|
2
|
+
|
|
3
|
+
The pipeline works without any of these. Each one makes a specific agent faster
|
|
4
|
+
or sharper, and each one has a stated fallback. Installed and checked by
|
|
5
|
+
`npx fullstack-agentic-flow init` and `… doctor`; the installed set is recorded in
|
|
6
|
+
`.ai-agents/pipeline.config.json`.
|
|
7
|
+
|
|
8
|
+
**Read the precedence section before anything else.** Several of these tools
|
|
9
|
+
ship their own workflow, and two workflows running at once is how an agent ends
|
|
10
|
+
up brainstorming a feature that already has a frozen contract.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Precedence
|
|
15
|
+
|
|
16
|
+
When instructions conflict, the higher line wins:
|
|
17
|
+
|
|
18
|
+
1. **The human at a gate.**
|
|
19
|
+
2. **Pipeline state files** — `contract-seam.md`, the contracts, `current-plan.md`.
|
|
20
|
+
3. **`architecture-context.md`** and the canon (`canon/*.md`), including typed-data T1–T6.
|
|
21
|
+
4. **The agent file** in `.ai-agents/agents/` for the current step.
|
|
22
|
+
5. **Discipline skills** — superpowers TDD / debugging / verification, ponytail's decision ladder, impeccable's design rules.
|
|
23
|
+
6. **Memory and recall** — claude-mem observations, graph query results.
|
|
24
|
+
|
|
25
|
+
Two consequences worth stating plainly:
|
|
26
|
+
|
|
27
|
+
- **Memory is recall, never truth.** If claude-mem remembers a decision that the
|
|
28
|
+
state files do not record, the state files win and the discrepancy is
|
|
29
|
+
reported.
|
|
30
|
+
- **Graphs are an index, never truth.** A graph result tells an agent where to
|
|
31
|
+
look. Every claim written into a contract is verified by opening the file.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## The pipeline owns the workflow; skills own the discipline
|
|
36
|
+
|
|
37
|
+
`superpowers` ships a full brainstorm → plan → execute workflow. This pipeline
|
|
38
|
+
already has one (intake → contract → sequence → implement), with human gates the
|
|
39
|
+
superpowers flow does not have. So:
|
|
40
|
+
|
|
41
|
+
| superpowers skill | Use in this pipeline? | Where |
|
|
42
|
+
|-------------------|------------------------|-------|
|
|
43
|
+
| `test-driven-development` | **Yes — mandatory** | 04a, 04b, 00a, 00b: every task |
|
|
44
|
+
| `systematic-debugging` | Yes | Any implementer when a test fails for an unexpected reason; CI failure triage |
|
|
45
|
+
| `verification-before-completion` | Yes | 04a, 04b self-check before commit |
|
|
46
|
+
| `requesting-code-review` / `receiving-code-review` | Yes | Gate 2 preparation and response |
|
|
47
|
+
| `using-git-worktrees` | Yes, optional | Running the backend and UI tracks side by side |
|
|
48
|
+
| `brainstorming` | **No** during a feature | Replaced by 01 intake. Allowed only before `/intake`, to explore whether a feature is worth doing |
|
|
49
|
+
| `writing-plans` / `executing-plans` | **No** | Replaced by 02–03 contracts and sequences |
|
|
50
|
+
| `subagent-driven-development` | **No** | Replaced by `/implement`, one task per invocation |
|
|
51
|
+
|
|
52
|
+
If a superpowers skill auto-triggers into a replaced step, the agent says so in
|
|
53
|
+
one line and continues with the pipeline's step instead.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Tool reference
|
|
58
|
+
|
|
59
|
+
### find-skills — `vercel-labs/skills`
|
|
60
|
+
|
|
61
|
+
- **What**: discovers installable agent skills via the `npx skills` CLI.
|
|
62
|
+
- **Used by**: 00a scaffold and 00 bootstrap, when the stack includes a framework
|
|
63
|
+
or library the pipeline has no mapping for; any agent, on explicit request.
|
|
64
|
+
- **Rule**: discovering is free, installing is a human decision. Proposed skills
|
|
65
|
+
are listed with install count and source; nothing is installed without a yes.
|
|
66
|
+
Adopted skills are recorded in §Project additions below.
|
|
67
|
+
- **Fallback**: none needed.
|
|
68
|
+
|
|
69
|
+
### superpowers — `obra/superpowers`
|
|
70
|
+
|
|
71
|
+
- **What**: discipline skills (TDD, debugging, verification, review).
|
|
72
|
+
- **Used by**: see the table above.
|
|
73
|
+
- **Fallback**: the TDD loop is written out in full in `04a`/`04b` §TDD loop, so
|
|
74
|
+
the pipeline still enforces red-green-refactor without the plugin.
|
|
75
|
+
|
|
76
|
+
### claude-mem — `thedotmack/claude-mem`
|
|
77
|
+
|
|
78
|
+
- **What**: captures session activity, compresses it, and injects relevant
|
|
79
|
+
context into later sessions. Works with Claude Code and Codex CLI.
|
|
80
|
+
- **Used by**: every agent, passively. Particularly valuable for `/resume` and
|
|
81
|
+
for implementers picking up a track after a break.
|
|
82
|
+
- **Rule**: see Precedence — recall only. Never cite a memory as the reason for a
|
|
83
|
+
design decision; cite the state file or the code.
|
|
84
|
+
- **Privacy**: its data lives in `~/.claude-mem/`, outside the repo. Nothing it
|
|
85
|
+
stores is committed.
|
|
86
|
+
- **Fallback**: the state files. The pipeline was designed to survive losing its
|
|
87
|
+
conversation; claude-mem makes that faster, not possible.
|
|
88
|
+
|
|
89
|
+
### impeccable — `pbakaus/impeccable`
|
|
90
|
+
|
|
91
|
+
- **What**: design language and commands for UI quality, plus a deterministic
|
|
92
|
+
anti-pattern detector (`npx impeccable detect`) that needs no model.
|
|
93
|
+
- **Context files it owns**: `PRODUCT.md`, `DESIGN.md`, `.impeccable/`.
|
|
94
|
+
- **Used by**:
|
|
95
|
+
- 00a scaffold — `/impeccable init` (writes `PRODUCT.md`) before tokens; `/impeccable document` after the UI slice (writes `DESIGN.md`)
|
|
96
|
+
- 00 bootstrap — reads `DESIGN.md` into §8.4; if the two disagree, raises it instead of choosing
|
|
97
|
+
- 02c UI contract — `shape` for new screens; `DESIGN.md` constrains token use
|
|
98
|
+
- 04b UI implementer — `npx impeccable detect <changed files>` in the self-check; `polish`/`harden` only on the files in the task
|
|
99
|
+
- 05 CI — `impeccable detect` on the diff as a non-blocking job until the team promotes it
|
|
100
|
+
- 06 QA — `/impeccable audit` on each new screen, findings folded into §7 Accessibility
|
|
101
|
+
- **Rule**: impeccable's suggestions never add a component to `shared/ui` or a
|
|
102
|
+
token to the token set. Those remain Gate 1 decisions. `bolder`, `overdrive`,
|
|
103
|
+
`delight` and similar taste-changing commands run only when a UI contract asks
|
|
104
|
+
for them.
|
|
105
|
+
- **Fallback**: §8 of the architecture context.
|
|
106
|
+
|
|
107
|
+
### task-observer — `rebelytics/one-skill-to-rule-them-all`
|
|
108
|
+
|
|
109
|
+
- **What**: watches sessions for repeated corrections and patterns, and writes
|
|
110
|
+
observation logs proposing new skills or improvements to existing ones.
|
|
111
|
+
- **Log location for this pipeline**: `.ai-agents/observations/` (the installer
|
|
112
|
+
writes the activation instruction pointing there).
|
|
113
|
+
- **Used by**: runs alongside every agent. 09b (`/release`) reads the logs at
|
|
114
|
+
release time and turns recurring ones into proposed edits to agent files, the
|
|
115
|
+
canon, or §10 — for a human to accept.
|
|
116
|
+
- **Rule**: observations never edit agent files or the architecture context
|
|
117
|
+
directly.
|
|
118
|
+
- **Codex**: use the community port `AllstarGER/one-skill-to-rule-them-all`
|
|
119
|
+
(older version) or skip.
|
|
120
|
+
- **Fallback**: `decisions-log.md`.
|
|
121
|
+
|
|
122
|
+
### ponytail — `DietrichGebert/ponytail`
|
|
123
|
+
|
|
124
|
+
- **What**: a decision ladder that pushes agents toward the least code — reuse,
|
|
125
|
+
stdlib, platform, existing dependency, one line, then the minimum.
|
|
126
|
+
- **Used by**: 04a/04b while implementing; `/ponytail-review` on the task diff
|
|
127
|
+
before Gate 2; 02b/02c when choosing between designs.
|
|
128
|
+
- **Rule**: ponytail governs **logic, abstractions, and dependencies**. It does
|
|
129
|
+
not govern **types** (typed-data wins), **tests** (TDD wins), **states** (UI
|
|
130
|
+
required states win), or anything a contract explicitly specified. Its
|
|
131
|
+
"never cut validation, security, or accessibility" line aligns with the
|
|
132
|
+
pipeline; its brevity does not extend to Data classes.
|
|
133
|
+
- **Suggested level**: `lite` during implementation, `full` for `/ponytail-review`.
|
|
134
|
+
- **Fallback**: the "do not optimise beyond stated scale" rules already in the
|
|
135
|
+
contracts.
|
|
136
|
+
|
|
137
|
+
### headroom — `headroomlabs-ai/headroom`
|
|
138
|
+
|
|
139
|
+
- **What**: a local proxy that compresses tool output, logs, and files before
|
|
140
|
+
they reach the model. Not a skill — it wraps the session.
|
|
141
|
+
- **Used by**: the developer, around the whole session: `headroom wrap claude`
|
|
142
|
+
or `headroom wrap codex`. Most useful for 00 bootstrap, 02a, 06, and 07, which
|
|
143
|
+
read a lot.
|
|
144
|
+
- **Caveat**: wrapping routes the agent through a local base URL. Check the
|
|
145
|
+
current headroom release notes for context-window caveats before relying on
|
|
146
|
+
a long-context model through it.
|
|
147
|
+
- **Fallback**: none needed.
|
|
148
|
+
|
|
149
|
+
### code-review-graph — `tirth8205/code-review-graph`
|
|
150
|
+
|
|
151
|
+
- **Role in this pipeline: the impact engine.** Incremental, SQLite-backed
|
|
152
|
+
(`.code-review-graph/`), exposed over MCP.
|
|
153
|
+
- **Tools the agents call**: `get_impact_radius_tool` (blast radius),
|
|
154
|
+
`detect_changes_tool` (risk-scored diff impact), `query_graph_tool`
|
|
155
|
+
(callers / callees / tests), `semantic_search_nodes_tool`,
|
|
156
|
+
`get_architecture_overview_tool`.
|
|
157
|
+
- **Used by**:
|
|
158
|
+
- 01b impact analysis — predicted blast radius from intake, actual from the diff
|
|
159
|
+
- 02a dependency map — callers of every symbol the feature touches; tests that cover them
|
|
160
|
+
- 04a/04b — `detect-changes --brief` output attached to every Gate 2 report
|
|
161
|
+
- 06 QA — regression scope; 07 security — new reachable paths into sensitive
|
|
162
|
+
code, on the branch before it merges
|
|
163
|
+
- **Keeping it current**: `code-review-graph install` sets up hooks/watch; agents
|
|
164
|
+
run `code-review-graph update` before querying if the last update is older than
|
|
165
|
+
the last commit.
|
|
166
|
+
- **Without MCP** (a runtime where the server is not connected), the CLI answers
|
|
167
|
+
the same questions: `code-review-graph impact --base {base}` (blast radius),
|
|
168
|
+
`code-review-graph detect-changes` (risk-scored diff), `code-review-graph query`.
|
|
169
|
+
- **Fallback**: grep for symbol references plus the test runner's coverage report,
|
|
170
|
+
with the impact report marked `confidence: reduced`.
|
|
171
|
+
|
|
172
|
+
### graphify — `safishamsi/graphify`
|
|
173
|
+
|
|
174
|
+
- **Role in this pipeline: the architecture map.** Whole-repo knowledge graph
|
|
175
|
+
across code, SQL schemas, docs, and configs, with a human-readable report.
|
|
176
|
+
- **Outputs**: `graphify-out/GRAPH_REPORT.md`, `graph.json`, `graph.html`.
|
|
177
|
+
- **Used by**:
|
|
178
|
+
- 00 bootstrap — reads `GRAPH_REPORT.md` first to pick which files to sample
|
|
179
|
+
(communities, god nodes, surprising couplings) and to spot canon violations
|
|
180
|
+
- 00a scaffold — after the slice, to confirm the dependency direction is clean
|
|
181
|
+
- 01b impact — cross-cutting links code-review-graph cannot see (SQL views,
|
|
182
|
+
config, docs that describe behaviour)
|
|
183
|
+
- 08 performance — schema-to-query paths
|
|
184
|
+
- **Keeping it current**: `graphify hook install` rebuilds on commit/checkout.
|
|
185
|
+
- **Fallback**: bootstrap's recent-and-frequent sampling rule.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Runtime matrix
|
|
190
|
+
|
|
191
|
+
| Tool | Claude Code | Codex |
|
|
192
|
+
|------|-------------|-------|
|
|
193
|
+
| find-skills | skill (`.claude/skills`) | skill (`.agents/skills`) |
|
|
194
|
+
| superpowers | plugin | plugin (via `/plugins`) |
|
|
195
|
+
| claude-mem | plugin / `npx claude-mem install` | `npx claude-mem install` |
|
|
196
|
+
| impeccable | plugin / `npx impeccable install` | `npx impeccable install --providers=codex` |
|
|
197
|
+
| task-observer | skill | community port |
|
|
198
|
+
| ponytail | plugin | plugin |
|
|
199
|
+
| headroom | `headroom wrap claude` | `headroom wrap codex` |
|
|
200
|
+
| code-review-graph | MCP (`code-review-graph install`) | MCP (`code-review-graph install`) |
|
|
201
|
+
| graphify | skill (`graphify install`) | skill (`graphify install --platform codex`) |
|
|
202
|
+
|
|
203
|
+
Exact install commands live in the installer's registry and in
|
|
204
|
+
`.ai-agents/SETUP.md`, generated per repo by `init`.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Project additions
|
|
209
|
+
|
|
210
|
+
Skills adopted for this repository beyond the default set. Written by 00a/00
|
|
211
|
+
after a human approves a find-skills proposal.
|
|
212
|
+
|
|
213
|
+
| Skill | Source | Why | Used by | Approved |
|
|
214
|
+
|-------|--------|-----|---------|----------|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Read `.ai-agents/agents/00-bootstrap.md` and follow it exactly.
|
|
2
|
+
|
|
3
|
+
This produces `.ai-agents/architecture-context.md`, the file every other agent
|
|
4
|
+
depends on. Nothing else in the pipeline runs until it exists and is filled in.
|
|
5
|
+
|
|
6
|
+
Use the reasoning-tier model with extended thinking. Inferring an architecture
|
|
7
|
+
from source is genuinely hard, and the failure mode — confidently documenting a
|
|
8
|
+
pattern that appears twice and nowhere else — quietly corrupts every downstream
|
|
9
|
+
agent.
|
|
10
|
+
|
|
11
|
+
If `architecture-context.md` already exists, this is a refresh: read it first,
|
|
12
|
+
diff your findings against it, and present the differences for approval before
|
|
13
|
+
writing. Never silently overwrite a section a human hand-corrected.
|
|
14
|
+
|
|
15
|
+
Afterwards, tell the user to read §5.8 and §8.10 — the backend and UI exemplars —
|
|
16
|
+
before anything else. Those two sections shape generated code more than the rest
|
|
17
|
+
of the document combined.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
This is the orchestration point of the pipeline. Three agents run concurrently,
|
|
2
|
+
then a fourth reconciles two of their outputs.
|
|
3
|
+
|
|
4
|
+
## Preconditions
|
|
5
|
+
|
|
6
|
+
1. `.ai-agents/architecture-context.md` exists with no `{PLACEHOLDER}` text.
|
|
7
|
+
If not: stop, tell the user to run `/bootstrap`.
|
|
8
|
+
2. `.ai-agents/state/current-stage.md` shows `impact-assessed`.
|
|
9
|
+
If it shows `gate-0-approved`: stop, tell the user to run `/impact` first.
|
|
10
|
+
If earlier: stop, tell the user to run `/intake` and approve Gate 0.
|
|
11
|
+
3. Read the **Risk class** from the stage file. Tell each contract agent; L2 and
|
|
12
|
+
L3 add obligations to their output (characterisation tests, rollout plan).
|
|
13
|
+
4. `split-frontend` only: the contract this feature consumes has been imported
|
|
14
|
+
with `/seam import`. If `contracts/` has nothing for it, stop and say so.
|
|
15
|
+
|
|
16
|
+
Read `.ai-agents/state/current-feature.md` and note its **Tracks** value. It
|
|
17
|
+
decides which agents run.
|
|
18
|
+
|
|
19
|
+
## Launch
|
|
20
|
+
|
|
21
|
+
Run these **in parallel** — as concurrent sub-tasks in one conversation, or as
|
|
22
|
+
separate sessions, whichever this environment supports:
|
|
23
|
+
|
|
24
|
+
| Agent | Instructions | Runs when |
|
|
25
|
+
|-------|-------------|-----------|
|
|
26
|
+
| 02a dependency-map | `.ai-agents/agents/02a-dependency-map.md` | always |
|
|
27
|
+
| 02b backend-contract | `.ai-agents/agents/02b-backend-contract.md` | tracks is `backend` or `both` |
|
|
28
|
+
| 02c ui-contract | `.ai-agents/agents/02c-ui-contract.md` | tracks is `ui` or `both` |
|
|
29
|
+
|
|
30
|
+
They all read the same intake. Do not serialise them and do not let one wait on
|
|
31
|
+
another — designing both halves at once is the point, and the seam agent exists
|
|
32
|
+
to make it safe.
|
|
33
|
+
|
|
34
|
+
## Then freeze the seam
|
|
35
|
+
|
|
36
|
+
When 02b and 02c have both finished (or the single one that applies has), run
|
|
37
|
+
**02d** from `.ai-agents/agents/02d-interface-seam.md`. It picks its mode from the
|
|
38
|
+
topology (page contracts, HTTP API, GraphQL, export, import), reconciles the two
|
|
39
|
+
contracts, and writes `state/contract-seam.md` — plus `contracts/{slug}/` in
|
|
40
|
+
`split-backend`.
|
|
41
|
+
|
|
42
|
+
02d runs on every feature, including single-track ones — for a UI-only feature it
|
|
43
|
+
verifies the endpoints already exist as claimed, which is a check worth having.
|
|
44
|
+
|
|
45
|
+
## Gate 1
|
|
46
|
+
|
|
47
|
+
02d announces Gate 1 and lists any escalated decisions. Present the review order
|
|
48
|
+
it specifies: seam first, then the two contracts, then the dependency map.
|
|
49
|
+
|
|
50
|
+
Surface prominently, if present:
|
|
51
|
+
|
|
52
|
+
- **Blockers** from the dependency map
|
|
53
|
+
- **Escalated decisions** from the seam — these need a human answer before
|
|
54
|
+
sequencing
|
|
55
|
+
- **New components or design tokens** proposed in the UI contract §9 — these are
|
|
56
|
+
permanent additions to the design system and should not slip through as an
|
|
57
|
+
implementation detail
|
|
58
|
+
|
|
59
|
+
On `approve`: write any verbally-resolved decisions into the seam document before
|
|
60
|
+
setting stage to `gate-1-approved`. The implementers read files, not
|
|
61
|
+
conversations.
|
|
62
|
+
|
|
63
|
+
On `edit`: re-run only the affected contract agent, then **re-run 02d**. A
|
|
64
|
+
contract that changed with a stale seam is worse than no seam.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Read `.ai-agents/agents/09a-feature-notes.md` and follow it exactly.
|
|
2
|
+
|
|
3
|
+
## Preconditions
|
|
4
|
+
|
|
5
|
+
Gate 3 approved (`.ai-agents/state/current-stage.md` shows `review-complete`
|
|
6
|
+
and the human answered `approve-merge`).
|
|
7
|
+
|
|
8
|
+
The agent refuses, naming which, if: Critical security findings are unresolved;
|
|
9
|
+
the risk class is L2+ with no performance review; the risk class is L3 with
|
|
10
|
+
unresolved High findings; any task is still `pending`; or `impact.md` has no
|
|
11
|
+
verify section or lists escapes that were neither covered nor accepted.
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
On the feature branch, in one commit:
|
|
16
|
+
|
|
17
|
+
1. Writes the feature's release note to `.ai-agents/changes/{slug}.md`
|
|
18
|
+
2. Archives the contracts, plan, impact, decisions and TDD log to
|
|
19
|
+
`.ai-agents/archive/{slug}/`
|
|
20
|
+
3. Resets `.ai-agents/state/` to idle
|
|
21
|
+
|
|
22
|
+
## Afterwards
|
|
23
|
+
|
|
24
|
+
The branch is finished. Push, merge the review unit, and run `/intake` for the
|
|
25
|
+
next feature. Nothing in this pipeline runs against the merged code: the release
|
|
26
|
+
note is already written, and `/release` only assembles notes at release time.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Read `.ai-agents/agents/01b-impact-analysis.md` and follow it exactly.
|
|
2
|
+
|
|
3
|
+
## Arguments
|
|
4
|
+
|
|
5
|
+
- `/impact` — mode `predict`. Stage must be `gate-0-approved`.
|
|
6
|
+
- `/impact --verify` — mode `verify`. Every task in `state/current-plan.md` must be
|
|
7
|
+
`committed` or `merged`.
|
|
8
|
+
|
|
9
|
+
Use the reasoning-tier model with extended thinking.
|
|
10
|
+
|
|
11
|
+
## Before running
|
|
12
|
+
|
|
13
|
+
Check which graph tools `.ai-agents/pipeline.config.json` records as installed.
|
|
14
|
+
If code-review-graph is installed, run `code-review-graph update` when its last
|
|
15
|
+
update is older than `HEAD`. If neither graph tool is available, say so up front:
|
|
16
|
+
the report will carry `Confidence: reduced`.
|
|
17
|
+
|
|
18
|
+
## Afterwards
|
|
19
|
+
|
|
20
|
+
Lead with the risk class and the single dimension that set it, then what it
|
|
21
|
+
changes downstream. For L3, offer the split before pointing at `/contract`.
|
|
22
|
+
|
|
23
|
+
In verify mode, lead with any class change and with **escapes** — affected nodes
|
|
24
|
+
no test on the branch exercised. Merge waits until each is covered or explicitly
|
|
25
|
+
accepted by the human at Gate 2.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
## Arguments
|
|
2
|
+
|
|
3
|
+
- `/implement` — pick the next available task across both tracks
|
|
4
|
+
- `/implement backend` — next available backend task
|
|
5
|
+
- `/implement ui` — next available UI task
|
|
6
|
+
- `/implement --retry-task backend 3` — reset that task to `pending` and re-run it
|
|
7
|
+
|
|
8
|
+
## Preconditions
|
|
9
|
+
|
|
10
|
+
`.ai-agents/state/current-stage.md` shows `sequence-complete`, or a previous
|
|
11
|
+
task committed or merged. If sequencing has not run, stop and say to run
|
|
12
|
+
`/sequence`.
|
|
13
|
+
|
|
14
|
+
## Choosing the task
|
|
15
|
+
|
|
16
|
+
Read the task tables in `.ai-agents/state/current-plan.md`.
|
|
17
|
+
|
|
18
|
+
A task is **available** when its status is `pending` and every entry in its
|
|
19
|
+
`depends_on`, `depends_on_backend`, and `depends_on_ui` fields is `committed` or
|
|
20
|
+
`merged`.
|
|
21
|
+
|
|
22
|
+
With no track argument, prefer the backend track when both have work available.
|
|
23
|
+
The UI track builds against mocks and can run behind without blocking; the
|
|
24
|
+
backend track is what the UI integration task eventually waits on.
|
|
25
|
+
|
|
26
|
+
Then dispatch by the task's **Agent** field:
|
|
27
|
+
|
|
28
|
+
- **`module-scaffold` backend task** → `.ai-agents/agents/00b-module-scaffold.md`
|
|
29
|
+
- **Backend task** → `.ai-agents/agents/04a-backend-implementer.md`
|
|
30
|
+
- **UI task** → `.ai-agents/agents/04b-ui-implementer.md`
|
|
31
|
+
|
|
32
|
+
Every task is executed test-first — the implementer's §TDD loop. Remind the
|
|
33
|
+
reviewer that Gate 2 includes checking `state/tdd-log.md` for this task's
|
|
34
|
+
red → green lines.
|
|
35
|
+
|
|
36
|
+
## Exactly one task
|
|
37
|
+
|
|
38
|
+
One task per invocation, always. Not two, however small the next one looks. The
|
|
39
|
+
review gate between commits is the mechanism, not an obstacle to it.
|
|
40
|
+
|
|
41
|
+
## When nothing is available
|
|
42
|
+
|
|
43
|
+
Say why, specifically, rather than reporting "no tasks":
|
|
44
|
+
|
|
45
|
+
- **All committed** → the branch still has work before it merges, in this order:
|
|
46
|
+
`/impact --verify`, then `/qa` and `/security` in parallel (and `/perf`, which
|
|
47
|
+
is mandatory for risk class L2+), then Gate 3, then `/finalize`. Only then push
|
|
48
|
+
and merge — nothing is scheduled after the merge
|
|
49
|
+
- **Remaining UI tasks blocked on backend** → name the blocking backend task and
|
|
50
|
+
say to run `/implement backend`
|
|
51
|
+
- **Only the UI integration task remains and its backend dependency is unmerged**
|
|
52
|
+
→ say so; it needs the real endpoints, not mocks
|
|
53
|
+
|
|
54
|
+
## After the agent finishes
|
|
55
|
+
|
|
56
|
+
It commits but does not push. Confirm which track and task completed, what the
|
|
57
|
+
reviewer should check, and what the next available task is — including whether it
|
|
58
|
+
switches track.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Check `.ai-agents/architecture-context.md` exists with no `{PLACEHOLDER}` text.
|
|
2
|
+
If not, stop and tell the user to run `/bootstrap` first.
|
|
3
|
+
|
|
4
|
+
Check `.ai-agents/state/current-stage.md`. If a feature is already in progress
|
|
5
|
+
(stage is anything other than empty, `bootstrapped`, `idle`, or `released`), stop
|
|
6
|
+
and ask whether to abandon it or `/resume`.
|
|
7
|
+
|
|
8
|
+
Read `.ai-agents/agents/01-intake.md` and follow it exactly.
|
|
9
|
+
|
|
10
|
+
The agent must not discuss implementation — no frameworks, tables, components, or
|
|
11
|
+
endpoints. It covers interface requirements as a business concern (who uses this,
|
|
12
|
+
where, how often, with how much data), because those answers drive the UI
|
|
13
|
+
contract later.
|
|
14
|
+
|
|
15
|
+
It sets the feature's **Tracks** value, which decides which contract agents
|
|
16
|
+
`/contract` launches.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Verify `.ai-agents/state/current-stage.md` shows `impact-verified`.
|
|
2
|
+
|
|
3
|
+
**Mandatory** when the stage file records risk class L2 or L3; `/finalize`
|
|
4
|
+
refuses such a feature until this has run.
|
|
5
|
+
|
|
6
|
+
Read `.ai-agents/agents/08-performance.md` and follow it exactly.
|
|
7
|
+
|
|
8
|
+
Use the reasoning-tier model with extended thinking — reasoning about behaviour
|
|
9
|
+
at ten times the current volume is where this agent earns its cost.
|
|
10
|
+
|
|
11
|
+
Worth running when QA or security flagged something, when the feature added
|
|
12
|
+
aggregation, queries over growing data, bulk operations, or a screen that renders
|
|
13
|
+
a lot at once — or as due diligence before a merge that matters.
|
|
14
|
+
|
|
15
|
+
Output goes to `{docs_root}/performance/{feature-slug}.md`.
|
|
16
|
+
|
|
17
|
+
Findings are judged against the scale posture recorded in the architecture
|
|
18
|
+
context, and each one names the volume at which it becomes a real problem.
|
|
19
|
+
Without that anchor the review is a list of theoretical improvements nobody acts
|
|
20
|
+
on.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Verify `.ai-agents/state/current-stage.md` shows `impact-verified`. If not, stop
|
|
2
|
+
and name the missing step: every task committed, then `/impact --verify`. The QA
|
|
3
|
+
spec is written against the branch diff, not the contract.
|
|
4
|
+
|
|
5
|
+
Read `.ai-agents/agents/06-qa-spec.md` and follow it exactly.
|
|
6
|
+
|
|
7
|
+
Runs in parallel with `/security`, before the merge, so the spec is committed to
|
|
8
|
+
the branch with the code it describes.
|
|
9
|
+
|
|
10
|
+
Output goes to `{docs_root}/qa/{feature-slug}.md`, using the docs path from the
|
|
11
|
+
architecture context.
|
|
12
|
+
|
|
13
|
+
The agent reads the branch diff as well as the contracts. Where they disagree, it
|
|
14
|
+
tests what was built and reports the divergence — surface that prominently, since
|
|
15
|
+
an undocumented deviation usually matters more than any single test scenario.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Read `.ai-agents/agents/09b-release.md` and follow it exactly.
|
|
2
|
+
|
|
3
|
+
Release administration, run by the release coordinator against the branch being
|
|
4
|
+
released — not per feature. Every feature in it was already finished on its own
|
|
5
|
+
branch by `/finalize`.
|
|
6
|
+
|
|
7
|
+
## Arguments
|
|
8
|
+
|
|
9
|
+
`--since {date}`, `--from {tag} --to {ref}`, or `--features {slug,slug}`. With
|
|
10
|
+
no range, every changeset in `.ai-agents/changes/` counts as unreleased.
|
|
11
|
+
|
|
12
|
+
## What it does
|
|
13
|
+
|
|
14
|
+
1. Assembles `.ai-agents/changes/*.md` into a changelog entry, ordering upgrade
|
|
15
|
+
steps across features where they interact
|
|
16
|
+
2. Moves the included changesets to `.ai-agents/changes/released/{version}/`
|
|
17
|
+
3. Runs the retrospective over `.ai-agents/observations/` and writes
|
|
18
|
+
**proposed** pipeline improvements to
|
|
19
|
+
`.ai-agents/observations/proposals-{version}.md` — applying none of them
|
|
20
|
+
|
|
21
|
+
If a merged feature has no changeset, it merged without `/finalize`. Say which,
|
|
22
|
+
and have the note written before the release goes out.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Read `.ai-agents/state/current-stage.md` and tell the user exactly what to do
|
|
2
|
+
next. Resuming should cost one command and no reading of state files.
|
|
3
|
+
|
|
4
|
+
Also read `.ai-agents/state/current-plan.md` when a plan exists, so you can name
|
|
5
|
+
the specific next task rather than pointing at a command.
|
|
6
|
+
|
|
7
|
+
## Dispatch table
|
|
8
|
+
|
|
9
|
+
| Stage | Next action |
|
|
10
|
+
|-------|-------------|
|
|
11
|
+
| *(empty repo, no code)* | Run `/scaffold` — there is nothing for `/bootstrap` to read yet |
|
|
12
|
+
| `scaffolded` | Gate A — review the slice as you would a colleague's pull request, then `/bootstrap`. Say plainly that these files become the exemplars every future feature imitates |
|
|
13
|
+
| *(no architecture context, but code exists)* | Run `/bootstrap` — nothing else can run without it |
|
|
14
|
+
| `bootstrapped` | Review `architecture-context.md`, especially the two exemplar sections, then `/intake` |
|
|
15
|
+
| `idle` | `/intake` |
|
|
16
|
+
| `intake-complete` | Gate 0 — review `state/current-feature.md`, then `approve` / `edit` / `split` |
|
|
17
|
+
| `gate-0-approved` | `/impact` — measures blast radius and sets the risk class |
|
|
18
|
+
| `impact-assessed` | `/contract` — name which agents will launch given the feature's tracks, and what the risk class adds |
|
|
19
|
+
| *(some of 02a/02b/02c done)* | Say which are finished and which are still running |
|
|
20
|
+
| `contracts-complete` | Gate 1 — review the seam first, then the contracts. Report escalated decisions, blockers, and any proposed new components |
|
|
21
|
+
| `gate-1-approved` | `/sequence` |
|
|
22
|
+
| *(one sequence agent done)* | Say which track is sequenced and which is pending |
|
|
23
|
+
| `sequence-complete` | `/implement` — name the first available task and its track |
|
|
24
|
+
| `{track}-task-{n}-committed` | Gate 2 — review the diff, then push. Then `/implement` for the next available task |
|
|
25
|
+
| `{track}-task-{n}-ci-failed` | Show which CI job failed. Fix directly, or `/implement --retry-task {track} {n}` |
|
|
26
|
+
| `{track}-task-{n}-merged` | Name the next available task and its track, or say all tasks are done |
|
|
27
|
+
| *(every task committed, no verify line)* | `/impact --verify` — the last measurement before review |
|
|
28
|
+
| `impact-verified` | `/qa` and `/security` — they run in parallel; `/perf` too, mandatory at L2+ |
|
|
29
|
+
| *(one review agent done)* | Say which is finished and which is pending |
|
|
30
|
+
| `review-complete` | Gate 3 — review QA, security, and performance if run. Report contract divergences and any critical findings. Then `approve-merge` or `block` |
|
|
31
|
+
| `gate-3-approved` | `/finalize` — release note, archive, state reset, all on the branch |
|
|
32
|
+
| `finalized` | Push and merge. Nothing runs against the merged code; `/intake` starts the next feature |
|
|
33
|
+
|
|
34
|
+
## Always surface
|
|
35
|
+
|
|
36
|
+
If any of these flags are present in the stage file, lead with them rather than
|
|
37
|
+
with the next action:
|
|
38
|
+
|
|
39
|
+
- `Critical security findings` — release is blocked
|
|
40
|
+
- `Critical performance findings` — degrades at a named volume
|
|
41
|
+
- Blockers recorded in the dependency map
|
|
42
|
+
- Unresolved escalated decisions in the interface seam
|
|
43
|
+
- Risk class L2/L3 and what it requires
|
|
44
|
+
- Impact escapes not yet covered or accepted
|
|
45
|
+
- `split-*`: a newer version of an imported contract than the one this feature froze
|
|
46
|
+
|
|
47
|
+
## When state is inconsistent
|
|
48
|
+
|
|
49
|
+
If the stage file disagrees with what the plan or the working tree shows — a task
|
|
50
|
+
marked pending that is clearly committed, a stage naming an agent whose output is
|
|
51
|
+
missing — say so plainly and propose the correction. Do not guess and carry on;
|
|
52
|
+
a wrong resume sends the pipeline down a path nobody intended.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Read `.ai-agents/agents/00b-module-scaffold.md` and follow it exactly.
|
|
2
|
+
|
|
3
|
+
## Arguments
|
|
4
|
+
|
|
5
|
+
- `/scaffold-module {ModuleName}` — create the canon skeleton for a new backend
|
|
6
|
+
module, outside a feature.
|
|
7
|
+
|
|
8
|
+
When the module is part of a feature, you do not need this command: 03a sequences
|
|
9
|
+
a `module-scaffold` task and `/implement` dispatches it.
|
|
10
|
+
|
|
11
|
+
## Preconditions
|
|
12
|
+
|
|
13
|
+
`.ai-agents/architecture-context.md` exists and §5.0 (canon mapping) is filled.
|
|
14
|
+
If §5.0 is missing, stop and tell the user to re-run `/bootstrap` so the canon
|
|
15
|
+
mapping gets recorded first.
|
|
16
|
+
|
|
17
|
+
## Afterwards
|
|
18
|
+
|
|
19
|
+
One commit, not pushed. Show the tree that was created next to §5.0 so the
|
|
20
|
+
reviewer can compare them line by line.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Read `.ai-agents/agents/00a-scaffold.md` and follow it exactly.
|
|
2
|
+
|
|
3
|
+
Use the reasoning-tier model with extended thinking. The slice built here becomes
|
|
4
|
+
the exemplars every future feature imitates structurally, so a wrong shape here
|
|
5
|
+
does not cost one slice — it costs the shape of everything built after it.
|
|
6
|
+
|
|
7
|
+
## When this is the right command
|
|
8
|
+
|
|
9
|
+
- The repository is empty, or holds only a framework's default output
|
|
10
|
+
- There is code, but no conventions worth documenting yet
|
|
11
|
+
- A new service in an existing organisation whose conventions are not settled
|
|
12
|
+
|
|
13
|
+
**Check the repository before asking.** If there is real, working application
|
|
14
|
+
code, stop and redirect to `/bootstrap` — that documents what exists rather than
|
|
15
|
+
inventing conventions alongside it.
|
|
16
|
+
|
|
17
|
+
## What it produces
|
|
18
|
+
|
|
19
|
+
An ordered sequence of small, reviewable commits — foundation, CI, design tokens,
|
|
20
|
+
seed components, backend slice, UI slice, tests — not one large one. Review each
|
|
21
|
+
before the next, the same cadence as `/implement`.
|
|
22
|
+
|
|
23
|
+
The slice uses a **real entity from the actual domain**, with real validation and
|
|
24
|
+
real authorization. Never a placeholder. A scaffold built around a demo entity
|
|
25
|
+
produces exemplars for a system that does not exist.
|
|
26
|
+
|
|
27
|
+
## Afterwards
|
|
28
|
+
|
|
29
|
+
The developer reviews the slice as they would a colleague's pull request and
|
|
30
|
+
changes anything they would ask a colleague to change — because `/bootstrap` is
|
|
31
|
+
about to paste those files into the architecture context as the exemplars.
|
|
32
|
+
|
|
33
|
+
Then `/bootstrap` runs and reads the slice like any other codebase. From that
|
|
34
|
+
point the repository is in the state this system handles well, and nothing about
|
|
35
|
+
the greenfield path applies again.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Manage cross-repository contracts for split topologies. Read
|
|
2
|
+
`.ai-agents/agents/02d-interface-seam.md`, sections `export` and `import`.
|
|
3
|
+
|
|
4
|
+
## Arguments
|
|
5
|
+
|
|
6
|
+
- `/seam export` — **split-backend**. Writes (or refreshes) `contracts/{slug}/`
|
|
7
|
+
from the frozen `state/contract-seam.md`: `seam.md`, the schema fragment, and
|
|
8
|
+
`VERSION` with semver, timestamp, and sha256. Bumps the version per the rules
|
|
9
|
+
in 02d. Normally 02d does this at Gate 1; run it by hand after a seam change.
|
|
10
|
+
- `/seam import {path-or-url}` — **split-frontend**. Copies a `contracts/{slug}/`
|
|
11
|
+
directory into this repository, verifies the sha256 in `VERSION`, and records
|
|
12
|
+
the version. Imported files are read-only here.
|
|
13
|
+
- `/seam diff {slug}` — compares the imported version with a newer one at the
|
|
14
|
+
same source and classifies every difference (added, removed, type change,
|
|
15
|
+
nullability change). A major bump during an open feature is an escalated
|
|
16
|
+
decision.
|
|
17
|
+
|
|
18
|
+
## Preconditions
|
|
19
|
+
|
|
20
|
+
`architecture-context.md` §1.1 topology is `split-backend` (export) or
|
|
21
|
+
`split-frontend` (import, diff). In any other topology, say the seam lives in
|
|
22
|
+
`state/contract-seam.md` and nothing travels between repos.
|
|
23
|
+
|
|
24
|
+
## Never
|
|
25
|
+
|
|
26
|
+
- Never edit an imported contract. A missing field is a counterpart request to
|
|
27
|
+
the backend repo, raised at Gate 1.
|
|
28
|
+
- Never export a seam with unresolved escalated decisions.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Verify `.ai-agents/state/current-stage.md` shows `impact-verified`.
|
|
2
|
+
|
|
3
|
+
Read `.ai-agents/agents/07-security.md` and follow it exactly. It audits the
|
|
4
|
+
branch before it merges.
|
|
5
|
+
|
|
6
|
+
Runs in parallel with `/qa`.
|
|
7
|
+
|
|
8
|
+
Output goes to `{docs_root}/security/{feature-slug}.md`.
|
|
9
|
+
|
|
10
|
+
The intake's role matrix is the specification the agent audits against — not
|
|
11
|
+
"is the user logged in", but whether each role can do exactly what it was meant
|
|
12
|
+
to and nothing more, enforced server-side.
|
|
13
|
+
|
|
14
|
+
**Critical findings block the merge.** The agent sets a flag in the stage file
|
|
15
|
+
and `/finalize` refuses a feature carrying it. Fixes are ordinary tasks on the
|
|
16
|
+
same branch, reviewed at Gate 2, after which this review re-runs.
|