@vpxa/aikit 0.1.214 → 0.1.215
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/package.json +1 -1
- package/scaffold/dist/adapters/copilot.mjs +4 -4
- package/scaffold/dist/definitions/agents.mjs +2 -2
- package/scaffold/dist/definitions/bodies.mjs +409 -506
- package/scaffold/dist/definitions/flows.mjs +303 -237
- package/scaffold/dist/definitions/protocols.mjs +235 -343
- package/scaffold/dist/definitions/skills/adr-skill.mjs +470 -1044
- package/scaffold/dist/definitions/skills/multi-agents-development.mjs +102 -214
- package/scaffold/dist/definitions/skills/session-handoff.mjs +541 -1314
|
@@ -1,69 +1,65 @@
|
|
|
1
1
|
const e=`### Orchestrator Dispatch Protocol
|
|
2
2
|
|
|
3
|
-
Follow
|
|
4
|
-
|
|
5
|
-
1. **Independence Check
|
|
6
|
-
- Same files
|
|
7
|
-
- Shared
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
- **Goal**: acceptance criteria, testable
|
|
15
|
-
- **Arch Context**: actual code snippets via \`compact()\`/\`digest()\`
|
|
3
|
+
Follow \`multi-agents-development\` dispatch patterns:
|
|
4
|
+
|
|
5
|
+
1. **Independence Check**:
|
|
6
|
+
- Same files, shared mutable state, or order dependency → sequential
|
|
7
|
+
- Shared new types → define contract, then parallel
|
|
8
|
+
- Otherwise → **parallel dispatch**
|
|
9
|
+
|
|
10
|
+
2. **Subagent Context**:
|
|
11
|
+
- **Scope**: exact files + do NOT touch boundary
|
|
12
|
+
- **Goal**: testable acceptance criteria
|
|
13
|
+
- **Arch Context**: code via \`compact()\`/\`digest()\`
|
|
16
14
|
- **Constraints**: patterns, conventions, anti-patterns
|
|
17
|
-
- **Self-Review**: checklist before
|
|
15
|
+
- **Self-Review**: checklist before DONE
|
|
18
16
|
|
|
19
|
-
3. **Status
|
|
20
|
-
4. **Max 2 retries** per task
|
|
17
|
+
3. **Status**: \`DONE\` | \`DONE_WITH_CONCERNS\` | \`NEEDS_CONTEXT\` | \`BLOCKED\`
|
|
18
|
+
4. **Max 2 retries** per task → escalate`,t=`### FORGE Quality Gate
|
|
21
19
|
|
|
22
|
-
After
|
|
23
|
-
1. \`evidence_map({ action: "gate", task_id: "<slug>" })\` →
|
|
24
|
-
2. YIELD → approved, proceed
|
|
25
|
-
3. HOLD →
|
|
26
|
-
4. HARD_BLOCK →
|
|
20
|
+
After reviews complete:
|
|
21
|
+
1. \`evidence_map({ action: "gate", task_id: "<slug>" })\` → YIELD/HOLD/HARD_BLOCK
|
|
22
|
+
2. YIELD → approved, proceed
|
|
23
|
+
3. HOLD → fix, re-gate (max 3 rounds)
|
|
24
|
+
4. HARD_BLOCK → escalate`;function n(e,t=``,n=``){return`## Foundation Integration
|
|
27
25
|
|
|
28
26
|
Load these skills BEFORE executing this step:
|
|
29
27
|
|
|
30
28
|
| Skill | Purpose | When |
|
|
31
29
|
|-------|---------|------|
|
|
32
|
-
| \`aikit\` | Core MCP tools — search, analyze, ${e}, validate | Always
|
|
33
|
-
| \`present\` | Rich rendering for
|
|
34
|
-
| \`multi-agents-development\` | Dispatch templates, task decomposition, review
|
|
35
|
-
| \`brainstorming\` | Structured ideation for design
|
|
30
|
+
| \`aikit\` | Core MCP tools — search, analyze, ${e}, validate | Always |
|
|
31
|
+
| \`present\` | Rich rendering for structured output | Any output that benefits from rich rendering |
|
|
32
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review patterns | Before dispatching any subagent |
|
|
33
|
+
| \`brainstorming\` | Structured ideation for design decisions | Before design choice or feature exploration |${t?`\n${t}`:``}
|
|
36
34
|
|
|
37
35
|
### Presentation Rules
|
|
38
|
-
- Use \`present\` for
|
|
39
|
-
- Assessments, reports, comparisons, reviews, status boards → \`present({ schemaVersion: 1, title: "Assessment", blocks: [...] })\`
|
|
40
|
-
- Use \`table\`
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
- Artifact content and summaries → present with structured layout; use \`markdown\` for prose sections.
|
|
44
|
-
- Only use plain text for brief confirmations and simple questions${n?`\n\n${n}`:``}`}const r=e=>`## Knowledge Capture
|
|
36
|
+
- Use \`present\` for any output that benefits from rich rendering
|
|
37
|
+
- Assessments, reports, comparisons, reviews, status boards, tables, charts, progress, findings → \`present({ schemaVersion: 1, title: "Assessment", blocks: [...] })\`
|
|
38
|
+
- Use \`table\` for comparisons/findings, \`kv\` for status/summary, \`list\` for findings/tasks, \`metrics\` for numeric health, \`checklist\` for task status, \`markdown\` for prose
|
|
39
|
+
- NEVER use \`code\` blocks for structured data
|
|
40
|
+
- Plain text only for brief confirmations and simple questions${n?`\n\n${n}`:``}`}const r=e=>`## Knowledge Capture
|
|
45
41
|
|
|
46
|
-
Before completing this step, persist important findings
|
|
42
|
+
Before completing this step, persist important findings with \`knowledge({ action: "remember", ... })\`:
|
|
47
43
|
|
|
48
44
|
${e}
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
If this step produced reusable knowledge, store it now.`,i={_epilogue:[{file:`steps/docs-sync/README.md`,content:`# Epilogue: Documentation Sync
|
|
51
47
|
|
|
52
|
-
> **This is a mandatory epilogue step.**
|
|
48
|
+
> **This is a mandatory epilogue step.** Runs after every flow to keep project documentation synced with code changes.
|
|
53
49
|
|
|
54
50
|
## Objective
|
|
55
51
|
|
|
56
|
-
Review
|
|
52
|
+
Review flow changes and update \`docs/\` with AI Kit analysis tools. Never write docs from scratch when a tool can generate the base.
|
|
57
53
|
|
|
58
54
|
## Prerequisites
|
|
59
55
|
|
|
60
|
-
Load the \`docs\` skill before proceeding
|
|
56
|
+
Load the \`docs\` skill before proceeding.
|
|
61
57
|
|
|
62
58
|
## Instructions
|
|
63
59
|
|
|
64
60
|
### 0. Gather Flow Artifacts
|
|
65
61
|
|
|
66
|
-
Read all
|
|
62
|
+
Read all flow artifacts.
|
|
67
63
|
|
|
68
64
|
\`\`\`
|
|
69
65
|
flow({ action: 'status' }) # Get artifactsPath
|
|
@@ -75,7 +71,7 @@ digest({ sources: [ # Compress artifacts for
|
|
|
75
71
|
]})
|
|
76
72
|
\`\`\`
|
|
77
73
|
|
|
78
|
-
Map each
|
|
74
|
+
Map each artifact to doc actions with the \`docs\` skill mapping. Focus on decisions, requirements, and verification.
|
|
79
75
|
|
|
80
76
|
If no artifacts exist, proceed to Step 1 in source-only mode.
|
|
81
77
|
|
|
@@ -86,7 +82,7 @@ git_context({}) # What changed in this f
|
|
|
86
82
|
blast_radius({ path: ".", files: ["<changed-files>"] }) # Impact analysis — which modules affected
|
|
87
83
|
\`\`\`
|
|
88
84
|
|
|
89
|
-
|
|
85
|
+
Classify changes from tool output:
|
|
90
86
|
|
|
91
87
|
| Change Signal | Documentation Action |
|
|
92
88
|
|---------------|---------------------|
|
|
@@ -98,7 +94,7 @@ Use the output to classify changes:
|
|
|
98
94
|
|
|
99
95
|
### 2. Apply the Change-to-Doc Mapping
|
|
100
96
|
|
|
101
|
-
Follow the
|
|
97
|
+
Follow the \`docs\` skill decision tree.
|
|
102
98
|
|
|
103
99
|
### 3. Bootstrap \`docs/\` If Needed (full tool-driven workflow)
|
|
104
100
|
|
|
@@ -127,7 +123,7 @@ docs/
|
|
|
127
123
|
└── api.md ← From analyze(entry_points)
|
|
128
124
|
\`\`\`
|
|
129
125
|
|
|
130
|
-
Use the Architecture Blueprint sections
|
|
126
|
+
Use the \`docs\` skill Architecture Blueprint sections as the template.
|
|
131
127
|
|
|
132
128
|
### 4. Update Existing Docs (tool-assisted)
|
|
133
129
|
|
|
@@ -138,8 +134,8 @@ compact({ path: "docs/architecture/overview.md", query: "section to update" })
|
|
|
138
134
|
blast_radius({ path: ".", files: ["<files>"] }) # What's affected
|
|
139
135
|
\`\`\`
|
|
140
136
|
|
|
141
|
-
- **Don't rewrite** — update
|
|
142
|
-
- **Don't duplicate** —
|
|
137
|
+
- **Don't rewrite** — update relevant sections only
|
|
138
|
+
- **Don't duplicate** — reference code comments or READMEs when they already contain it
|
|
143
139
|
- Use \`compact\` to read existing doc sections before editing
|
|
144
140
|
- Use \`blast_radius\` output to determine which sections need updating
|
|
145
141
|
|
|
@@ -147,27 +143,27 @@ blast_radius({ path: ".", files: ["<files>"] }) #
|
|
|
147
143
|
|
|
148
144
|
- Architecture decisions → \`adr-skill\` → \`docs/decisions/\`
|
|
149
145
|
- Architecture diagrams → \`c4-architecture\` skill → \`docs/architecture/\`
|
|
150
|
-
- Full architecture refresh →
|
|
146
|
+
- Full architecture refresh → run the \`docs\` skill Architecture Blueprint Workflow
|
|
151
147
|
|
|
152
148
|
### 6. Update Index
|
|
153
149
|
|
|
154
|
-
If
|
|
150
|
+
If docs were added, removed, or renamed, update \`docs/README.md\`.
|
|
155
151
|
|
|
156
152
|
### 6b. Update HTML Documentation Site (if exists)
|
|
157
153
|
|
|
158
154
|
If \`docs/site/\` exists with a manifest:
|
|
159
155
|
|
|
160
|
-
1. **Detect staleness** —
|
|
161
|
-
2. **Identify affected pages** —
|
|
162
|
-
3. **Regenerate affected pages only** —
|
|
156
|
+
1. **Detect staleness** — compare source changes from \`git_context\` against manifest page data
|
|
157
|
+
2. **Identify affected pages** — use \`blast_radius\` to find pages whose source data changed
|
|
158
|
+
3. **Regenerate affected pages only** — update manifest JSON with fresh data for changed pages
|
|
163
159
|
4. **Rebuild** — Run \`inject-viewer.mjs --manifest\` with the updated manifest
|
|
164
160
|
5. **Regenerate hub** — If pages were added or removed, regenerate the docs-hub page
|
|
165
161
|
|
|
166
|
-
If \`docs/site/\` doesn't exist but the flow produced architecture diagrams or process flows, suggest
|
|
162
|
+
If \`docs/site/\` doesn't exist but the flow produced architecture diagrams or process flows, suggest \`/docs-site\`.
|
|
167
163
|
|
|
168
164
|
### 7. Skip If Nothing Changed
|
|
169
165
|
|
|
170
|
-
If
|
|
166
|
+
If changes don't warrant doc updates, report:
|
|
171
167
|
- "No documentation updates needed"
|
|
172
168
|
- Reason: (brief explanation)
|
|
173
169
|
|
|
@@ -180,7 +176,7 @@ If the flow's changes don't warrant doc updates (e.g., pure bug fix with no reve
|
|
|
180
176
|
- [ ] Stale HTML pages regenerated from fresh analysis data
|
|
181
177
|
- [ ] Relevant docs created or updated (or skipped with reason)
|
|
182
178
|
- [ ] \`docs/README.md\` index is current
|
|
183
|
-
- [ ] No placeholder/empty docs created — all content tool-generated or
|
|
179
|
+
- [ ] No placeholder/empty docs created — all content tool-generated or written with purpose`},{file:`steps/lesson-learned/README.md`,content:`---
|
|
184
180
|
name: _lesson-learned
|
|
185
181
|
description: Extract engineering principles from the completed flow
|
|
186
182
|
skills: [lesson-learned]
|
|
@@ -190,30 +186,30 @@ skills: [lesson-learned]
|
|
|
190
186
|
|
|
191
187
|
## Condition Check (MUST evaluate first)
|
|
192
188
|
|
|
193
|
-
Before extracting lessons, check
|
|
189
|
+
Before extracting lessons, check whether this flow produced learnable outcomes:
|
|
194
190
|
|
|
195
|
-
**Skip this step (advance with 'skip') when ALL
|
|
191
|
+
**Skip this step (advance with 'skip') when ALL are true:**
|
|
196
192
|
- Flow was Floor-tier (trivial change)
|
|
197
193
|
- blast_radius ≤ 2 for all changes
|
|
198
194
|
- Flow completed in a single batch with no iteration
|
|
199
195
|
- No agent returned BLOCKED or DONE_WITH_CONCERNS
|
|
200
196
|
- evidence_map never reached HOLD state
|
|
201
197
|
|
|
202
|
-
**Proceed when ANY
|
|
198
|
+
**Proceed when ANY are true:**
|
|
203
199
|
- An agent returned BLOCKED or DONE_WITH_CONCERNS during the flow
|
|
204
200
|
- evidence_map had HOLD before reaching YIELD (required iteration to pass)
|
|
205
|
-
- Multi-model decision protocol was invoked
|
|
201
|
+
- Multi-model decision protocol was invoked
|
|
206
202
|
- blast_radius > 5 (complex change with systemic implications)
|
|
207
203
|
- A novel pattern or anti-pattern was discovered
|
|
208
204
|
- A debugging session revealed non-obvious root cause
|
|
209
205
|
|
|
210
|
-
If skip condition met → \`flow({ action: 'step', advance: 'skip' })\` with note: "No lesson signals detected."
|
|
206
|
+
If skip condition is met → \`flow({ action: 'step', advance: 'skip' })\` with note: "No lesson signals detected."
|
|
211
207
|
|
|
212
208
|
## Extraction Protocol
|
|
213
209
|
|
|
214
|
-
1. **Load the \`lesson-learned\` skill**
|
|
215
|
-
2. Run \`git_context({ include_diff: true, commit_count: 10 })\`
|
|
216
|
-
3. Review flow artifacts in \`{{artifacts_path}}\`
|
|
210
|
+
1. **Load the \`lesson-learned\` skill**
|
|
211
|
+
2. Run \`git_context({ include_diff: true, commit_count: 10 })\`
|
|
212
|
+
3. Review flow artifacts in \`{{artifacts_path}}\`
|
|
217
213
|
4. Extract 1-3 principles using the skill's framework:
|
|
218
214
|
- What went wrong → What we learned → What we'll do differently
|
|
219
215
|
- OR: What went right → Why it worked → How to replicate
|
|
@@ -222,21 +218,91 @@ If skip condition met → \`flow({ action: 'step', advance: 'skip' })\` with not
|
|
|
222
218
|
## Quality Bar
|
|
223
219
|
|
|
224
220
|
A good lesson:
|
|
225
|
-
- Is **generalizable** (applies beyond this
|
|
226
|
-
- Has **evidence** (references
|
|
221
|
+
- Is **generalizable** (applies beyond this task)
|
|
222
|
+
- Has **evidence** (references files, errors, or decisions)
|
|
227
223
|
- Is **actionable** (tells future agents what to do or avoid)
|
|
228
224
|
|
|
229
|
-
|
|
230
|
-
-
|
|
231
|
-
- Is too specific to
|
|
225
|
+
Skip lessons that:
|
|
226
|
+
- Restate what was done without insight
|
|
227
|
+
- Is too specific to reuse ("file X had a typo on line 42")
|
|
232
228
|
- Captures a convention already documented elsewhere
|
|
233
|
-
`}],"aikit-advanced":[{file:`README.md`,content
|
|
229
|
+
`}],"aikit-advanced":[{file:`README.md`,content:`# aikit:advanced — Full Development Flow
|
|
230
|
+
|
|
231
|
+
Full development flow for **new features, API design, and architecture changes**.
|
|
232
|
+
|
|
233
|
+
## Steps
|
|
234
|
+
|
|
235
|
+
| # | Step | Skill | Produces | Requires | Agents |
|
|
236
|
+
|---|------|-------|----------|----------|--------|
|
|
237
|
+
| 1 | **Design Gate** | \`steps/design/README.md\` | \`design-decisions.md\` | — | Researcher-Alpha/Beta/Gamma/Delta |
|
|
238
|
+
| 2 | **Specification** | \`steps/spec/README.md\` | \`spec.md\` | \`design-decisions.md\` | Researcher-Alpha |
|
|
239
|
+
| 3 | **Planning** | \`steps/plan/README.md\` | \`plan.md\` | \`spec.md\` | Planner, Explorer |
|
|
240
|
+
| 4 | **Task Breakdown** | \`steps/task/README.md\` | \`tasks.md\` | \`plan.md\` | Planner, Architect-Reviewer-Alpha |
|
|
241
|
+
| 5 | **Execution** | \`steps/execute/README.md\` | \`progress.md\` | \`tasks.md\` | Orchestrator, Implementer, Frontend, Refactor |
|
|
242
|
+
| 6 | **Verification** | \`steps/verify/README.md\` | \`verify-report.md\` | \`progress.md\` | Code-Reviewer-Alpha/Beta, Architect-Reviewer-Alpha/Beta, Security |
|
|
243
|
+
|
|
244
|
+
## How It Works
|
|
245
|
+
|
|
246
|
+
Each step has a **README.md**. Orchestrator reads it via \`flow({ action: 'read' })\` and delegates work.
|
|
247
|
+
|
|
248
|
+
### Step 1: Design Gate
|
|
249
|
+
- Brainstorming for new features and arch changes
|
|
250
|
+
- FORGE classification + grounding for complex tasks
|
|
251
|
+
- 3-phase decision protocol for non-trivial technical decisions
|
|
252
|
+
- ADRs for critical-tier tasks
|
|
253
|
+
- **Mandatory user stop** before proceeding — design decisions must be approved
|
|
254
|
+
- Read \`steps/design/README.md\` for the full protocol
|
|
255
|
+
|
|
256
|
+
### Step 2: Specification
|
|
257
|
+
- Elicit requirements, clarify scope
|
|
258
|
+
- Define acceptance criteria and constraints
|
|
259
|
+
- Build on design decisions
|
|
260
|
+
|
|
261
|
+
### Step 3: Planning
|
|
262
|
+
- Analyze codebase with \`search\`, \`scope_map\`, \`trace\`, \`analyze_*\`
|
|
263
|
+
- Design architecture from spec and design decisions
|
|
264
|
+
- Create implementation plan with file-level changes
|
|
265
|
+
|
|
266
|
+
### Step 4: Task Breakdown
|
|
267
|
+
- Break plan into ordered, atomic tasks
|
|
268
|
+
- Define task deps
|
|
269
|
+
- Identify parallel batches
|
|
270
|
+
- Review task structure
|
|
271
|
+
|
|
272
|
+
### Step 5: Execution
|
|
273
|
+
- Orchestrator dispatches agents in parallel batches per the task breakdown
|
|
274
|
+
- Each agent gets a scoped task (1-3 files) with clear acceptance criteria
|
|
275
|
+
- TDD: write tests first, then implement
|
|
276
|
+
- Per-batch review cycle: Code Review → Arch Review → Security → Evidence Gate
|
|
277
|
+
|
|
278
|
+
### Step 6: Verification
|
|
279
|
+
- Dual code review (Code-Reviewer-Alpha + Beta)
|
|
280
|
+
- Architecture review (Architect-Reviewer-Alpha + Beta)
|
|
281
|
+
- Security review
|
|
282
|
+
- Run \`check({})\` + \`test_run({})\` + \`blast_radius({})\`
|
|
283
|
+
- \`evidence_map({ action: "gate" })\` for final quality gate
|
|
284
|
+
|
|
285
|
+
## Using Skills Inside Steps
|
|
286
|
+
|
|
287
|
+
When the Orchestrator activates a step:
|
|
288
|
+
|
|
289
|
+
1. **Read the instruction first** — \`flow({ action: 'read' })\` returns the current step README.md
|
|
290
|
+
2. **Follow step instructions** — primary guide
|
|
291
|
+
3. **Delegate to listed agents** — each step lists which agents are appropriate
|
|
292
|
+
4. **Produce the required artifact** — the step's \`produces\` field specifies the artifact file
|
|
293
|
+
5. **Check dependencies** — required prior artifacts must exist
|
|
294
|
+
6. **Report status** — agents report \`DONE\` | \`DONE_WITH_CONCERNS\` | \`NEEDS_CONTEXT\` | \`BLOCKED\` to the Orchestrator
|
|
295
|
+
|
|
296
|
+
## Artifacts
|
|
297
|
+
|
|
298
|
+
Artifacts are stored under \`.flows/{topic}/\`. \`{{artifacts_path}}\` resolves at runtime.
|
|
299
|
+
`},{file:`steps/design/README.md`,content:`# Design Gate — Advanced Flow
|
|
234
300
|
|
|
235
301
|
Full design gate for new features, API design, and architecture changes. Runs brainstorming, decision protocol, and FORGE classification before specification begins.
|
|
236
302
|
|
|
237
303
|
## When This Step Runs
|
|
238
304
|
|
|
239
|
-
|
|
305
|
+
First step of \`aikit:advanced\`. Runs before specification.
|
|
240
306
|
|
|
241
307
|
## Instructions
|
|
242
308
|
|
|
@@ -252,7 +318,7 @@ Classify the task:
|
|
|
252
318
|
|
|
253
319
|
### 2. FORGE Classification
|
|
254
320
|
|
|
255
|
-
Run \`forge_classify({ task: "<task description>", files: [<relevant files>], root_path: "." })\` to determine
|
|
321
|
+
Run \`forge_classify({ task: "<task description>", files: [<relevant files>], root_path: "." })\` to determine tier.
|
|
256
322
|
|
|
257
323
|
| Tier | Meaning | Design Depth |
|
|
258
324
|
|------|---------|-------------|
|
|
@@ -262,10 +328,10 @@ Run \`forge_classify({ task: "<task description>", files: [<relevant files>], ro
|
|
|
262
328
|
|
|
263
329
|
### 3. Brainstorming Session
|
|
264
330
|
|
|
265
|
-
Load
|
|
331
|
+
Load \`brainstorming\` and run:
|
|
266
332
|
|
|
267
333
|
1. **Intent Discovery** — What is the user trying to achieve? What problem does this solve?
|
|
268
|
-
2. **Constraint Mapping** — Technical
|
|
334
|
+
2. **Constraint Mapping** — Technical, time, compatibility constraints
|
|
269
335
|
3. **Approach Exploration** — Generate 2-4 possible approaches
|
|
270
336
|
4. **Trade-off Analysis** — Compare approaches on: complexity, maintainability, performance, risk
|
|
271
337
|
|
|
@@ -279,30 +345,30 @@ For **Critical** tier tasks, also explore:
|
|
|
279
345
|
|
|
280
346
|
When technical decisions need resolution, follow the **3-phase multi-model decision protocol**:
|
|
281
347
|
|
|
282
|
-
1. **Identify decisions** —
|
|
348
|
+
1. **Identify decisions** — list each decision point with 2+ viable options
|
|
283
349
|
2. **Phase 1 — Independent Research** — Launch ALL 4 Researcher variants in parallel:
|
|
284
350
|
- Researcher-Alpha (Contrarian): Deep analysis, actively seeks fatal flaws
|
|
285
351
|
- Researcher-Beta (First Principles): Trade-offs and edge cases, strips assumptions
|
|
286
352
|
- Researcher-Gamma (Expansionist): Cross-domain patterns, undervalued opportunities
|
|
287
353
|
- Researcher-Delta (Executor): Feasibility, performance, fastest implementation path
|
|
288
|
-
3. **Phase 2 — Peer Review** —
|
|
289
|
-
4. **Phase 3 — Structured Verdict** —
|
|
290
|
-
5. **Present & Record** — Render verdict with \`present({ schemaVersion: 1, title: "Decision Verdict", blocks: [...] })\`; use \`table\` for multi-perspective comparisons, \`list\` for blind spots
|
|
354
|
+
3. **Phase 2 — Peer Review** — anonymize outputs as Perspective A/B/C/D, launch 4 reviewers in parallel asking: strongest argument, biggest blind spot, consensus gap, verdict
|
|
355
|
+
4. **Phase 3 — Structured Verdict** — synthesize into: Where Agrees / Where Clashes / Blind Spots Caught / Recommendation (with confidence) / First Step
|
|
356
|
+
5. **Present & Record** — Render verdict with \`present({ schemaVersion: 1, title: "Decision Verdict", blocks: [...] })\`; use \`table\` for multi-perspective comparisons, \`list\` for blind spots/recommendations, and \`kv\` for verdict metadata. NEVER \`code\` blocks for structured data. Produce ADR via \`adr-skill\`
|
|
291
357
|
|
|
292
358
|
**Floor tier shortcut**: Skip Phase 2 (peer review), go straight from research to verdict.
|
|
293
359
|
|
|
294
360
|
### 5. FORGE Ground (Standard & Critical tiers)
|
|
295
361
|
|
|
296
362
|
Run \`forge_ground({ task, files: [<relevant files>], root_path: "." })\` to:
|
|
297
|
-
- Scope
|
|
363
|
+
- Scope affected files and modules
|
|
298
364
|
- Identify unknowns and risks
|
|
299
365
|
- Load existing constraints and conventions
|
|
300
366
|
|
|
301
|
-
**Auto-upgrade check**: If \`forge_ground\` reveals contract-type unknowns or security concerns
|
|
367
|
+
**Auto-upgrade check**: If \`forge_ground\` reveals contract-type unknowns or security concerns missed by \`forge_classify\`, recommend a tier upgrade.
|
|
302
368
|
|
|
303
369
|
### 6. Write \`{{artifacts_path}}/design-decisions.md\` to disk
|
|
304
370
|
|
|
305
|
-
**You MUST create this file on disk** using the IDE's native file creation capability or equivalent — do not
|
|
371
|
+
**You MUST create this file on disk** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
306
372
|
|
|
307
373
|
\`\`\`markdown
|
|
308
374
|
## Design Decisions
|
|
@@ -348,7 +414,7 @@ Use \`present({ schemaVersion: 1, title: "Design Review", blocks: [...] })\` to
|
|
|
348
414
|
- Key trade-offs
|
|
349
415
|
- Open questions requiring user input
|
|
350
416
|
|
|
351
|
-
Use \`kv\` for FORGE tier
|
|
417
|
+
Use \`kv\` for FORGE tier/rationale, \`list\` for trade-offs/open questions, \`table\` for decision comparisons, \`markdown\` for narrative summary. NEVER \`code\` blocks for structured data. Add \`actions\` only for browser transport.
|
|
352
418
|
|
|
353
419
|
**🛑 MANDATORY STOP** — Wait for user approval of design decisions before proceeding.
|
|
354
420
|
|
|
@@ -363,7 +429,7 @@ After user approves:
|
|
|
363
429
|
|
|
364
430
|
## Outputs
|
|
365
431
|
|
|
366
|
-
Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
432
|
+
Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
367
433
|
|
|
368
434
|
## Produces
|
|
369
435
|
|
|
@@ -371,27 +437,27 @@ Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this
|
|
|
371
437
|
|
|
372
438
|
## Agents
|
|
373
439
|
|
|
374
|
-
- \`Researcher-Alpha\` —
|
|
375
|
-
- \`Researcher-Beta\` — Trade-offs
|
|
440
|
+
- \`Researcher-Alpha\` — Primary approach
|
|
441
|
+
- \`Researcher-Beta\` — Trade-offs
|
|
376
442
|
- \`Researcher-Gamma\` — Cross-domain patterns
|
|
377
|
-
- \`Researcher-Delta\` — Feasibility
|
|
443
|
+
- \`Researcher-Delta\` — Feasibility
|
|
378
444
|
|
|
379
|
-
${n(`knowledge`,"| `c4-architecture` | C4
|
|
445
|
+
${n(`knowledge`,"| `c4-architecture` | C4 diagrams for system structure changes | When visualizing architecture |\n| `adr-skill` | ADRs for non-trivial decisions | Critical tier — document architecture decisions |")}
|
|
380
446
|
|
|
381
447
|
## Completion Criteria
|
|
382
448
|
|
|
383
449
|
- [ ] \`{{artifacts_path}}/design-decisions.md\` written to disk (NOT just presented in chat)
|
|
384
450
|
- [ ] FORGE tier determined and documented
|
|
385
|
-
- [ ] Brainstorming
|
|
451
|
+
- [ ] Brainstorming completed (for Standard+ tier)
|
|
386
452
|
- [ ] Key design decisions documented with rationale
|
|
387
453
|
- [ ] User approval received (🛑 MANDATORY STOP)
|
|
388
454
|
|
|
389
|
-
${r(`- **Design decisions**: Chosen approach and alternatives
|
|
390
|
-
- **Architecture patterns**: New patterns
|
|
391
|
-
- **Constraints discovered**: Technical
|
|
455
|
+
${r(`- **Design decisions**: Chosen approach and rejected alternatives
|
|
456
|
+
- **Architecture patterns**: New patterns or patterns that must be followed
|
|
457
|
+
- **Constraints discovered**: Technical, compatibility, performance limits`)}
|
|
392
458
|
`},{file:`steps/execute/README.md`,content:`---
|
|
393
459
|
name: execute
|
|
394
|
-
description: Implement
|
|
460
|
+
description: Implement tasks from the task breakdown, dispatching agents in parallel where possible.
|
|
395
461
|
---
|
|
396
462
|
|
|
397
463
|
# Execution
|
|
@@ -406,26 +472,26 @@ If prerequisites are NOT met -> **backtrack to task step** (\`flow({ action: 'st
|
|
|
406
472
|
|
|
407
473
|
## Purpose
|
|
408
474
|
|
|
409
|
-
Execute
|
|
475
|
+
Execute tasks from the breakdown in batches, maximizing parallelism without losing correctness.
|
|
410
476
|
|
|
411
477
|
## Inputs
|
|
412
478
|
|
|
413
|
-
- \`{{artifacts_path}}/tasks.md\` —
|
|
479
|
+
- \`{{artifacts_path}}/tasks.md\` — task list with deps and agents
|
|
414
480
|
|
|
415
481
|
## Process
|
|
416
482
|
|
|
417
|
-
1. **Load tasks** —
|
|
483
|
+
1. **Load tasks** — read task graph, deps, parallelism map
|
|
418
484
|
2. **Execute by batch** — For each batch in the parallelism map:
|
|
419
485
|
a. Dispatch assigned agents in parallel (different files = safe parallelism)
|
|
420
|
-
b. Each agent receives: task scope, affected files, acceptance criteria,
|
|
486
|
+
b. Each agent receives: task scope, affected files, acceptance criteria, code context via \`compact()\`/\`digest()\`
|
|
421
487
|
c. Wait for all agents in batch to complete
|
|
422
488
|
d. Run \`check({})\` + \`test_run({})\` after each batch
|
|
423
489
|
e. Fix any failures before proceeding to next batch
|
|
424
|
-
3. **Track progress** —
|
|
490
|
+
3. **Track progress** — update task checkboxes
|
|
425
491
|
4. **Handle failures** — If an agent reports \`BLOCKED\` or \`NEEDS_CONTEXT\`:
|
|
426
492
|
- Max 2 retries per task with refined context
|
|
427
493
|
- If still blocked, escalate to user
|
|
428
|
-
5. **Final validation** —
|
|
494
|
+
5. **Final validation** — after all batches: \`check({})\` + \`test_run({})\` must pass
|
|
429
495
|
|
|
430
496
|
## DAG Task Decomposition
|
|
431
497
|
|
|
@@ -437,11 +503,11 @@ queue({ action: 'push', name: 'execute-tasks', title: 'Task A', id: 'a' })
|
|
|
437
503
|
queue({ action: 'push', name: 'execute-tasks', title: 'Task B', id: 'b', dependsOn: ['a'] })
|
|
438
504
|
\`\`\`
|
|
439
505
|
|
|
440
|
-
Tasks with \`dependsOn\`
|
|
506
|
+
Tasks with \`dependsOn\` stay blocked until deps complete. This preserves execution order.
|
|
441
507
|
|
|
442
508
|
## Outputs
|
|
443
509
|
|
|
444
|
-
Write \`{{artifacts_path}}/progress.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
510
|
+
Write \`{{artifacts_path}}/progress.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
445
511
|
|
|
446
512
|
Template:
|
|
447
513
|
|
|
@@ -479,17 +545,17 @@ Template:
|
|
|
479
545
|
|
|
480
546
|
| Agent | Role |
|
|
481
547
|
|-------|------|
|
|
482
|
-
| **Orchestrator** |
|
|
483
|
-
| **Implementer** |
|
|
484
|
-
| **Frontend** |
|
|
485
|
-
| **Refactor** |
|
|
548
|
+
| **Orchestrator** | Batches, failures, retries |
|
|
549
|
+
| **Implementer** | Backend, logic, infra |
|
|
550
|
+
| **Frontend** | React, styling, responsive |
|
|
551
|
+
| **Refactor** | Cleanup, restructuring |
|
|
486
552
|
|
|
487
553
|
**Parallelism rules**:
|
|
488
554
|
- Read-only agents: unlimited parallelism
|
|
489
|
-
- File-modifying agents: parallel ONLY on
|
|
555
|
+
- File-modifying agents: parallel ONLY on different files
|
|
490
556
|
- Max 4 concurrent file-modifying agents
|
|
491
557
|
|
|
492
|
-
${n(`knowledge`,"| `session-handoff` | Context preservation for long-running execution
|
|
558
|
+
${n(`knowledge`,"| `session-handoff` | Context preservation for long-running execution | When execution spans sessions or context is filling |",e)}
|
|
493
559
|
|
|
494
560
|
## Completion Criteria
|
|
495
561
|
|
|
@@ -499,12 +565,12 @@ ${n(`knowledge`,"| `session-handoff` | Context preservation for long-running exe
|
|
|
499
565
|
- [ ] No blocked items remaining
|
|
500
566
|
- [ ] \`{{artifacts_path}}/progress.md\` written
|
|
501
567
|
|
|
502
|
-
${r(`- **Implementation decisions**: Why specific approaches were chosen
|
|
503
|
-
- **Patterns established**: New conventions or patterns
|
|
504
|
-
- **Gotchas encountered**: Edge cases, workarounds,
|
|
568
|
+
${r(`- **Implementation decisions**: Why specific approaches were chosen
|
|
569
|
+
- **Patterns established**: New conventions or patterns to follow
|
|
570
|
+
- **Gotchas encountered**: Edge cases, workarounds, non-obvious behaviors`)}
|
|
505
571
|
`},{file:`steps/plan/README.md`,content:`---
|
|
506
572
|
name: plan
|
|
507
|
-
description: Analyze the codebase, design the architecture, and create
|
|
573
|
+
description: Analyze the codebase, design the architecture, and create an implementation plan.
|
|
508
574
|
---
|
|
509
575
|
|
|
510
576
|
# Planning
|
|
@@ -519,22 +585,22 @@ If prerequisites are NOT met → **backtrack to spec step** (\`flow({ action: 's
|
|
|
519
585
|
|
|
520
586
|
## Purpose
|
|
521
587
|
|
|
522
|
-
Translate the
|
|
588
|
+
Translate the spec into a phased implementation plan with architecture decisions, file scope, and dependency order.
|
|
523
589
|
|
|
524
590
|
## Inputs
|
|
525
591
|
|
|
526
|
-
- \`{{artifacts_path}}/spec.md\` —
|
|
592
|
+
- \`{{artifacts_path}}/spec.md\` — validated spec
|
|
527
593
|
|
|
528
594
|
## Requirements Alignment
|
|
529
595
|
|
|
530
596
|
Before implementation, verify alignment with requirements:
|
|
531
597
|
- Read \`{{artifacts_path}}/requirements.md\` if it exists
|
|
532
|
-
- Ensure all acceptance criteria from requirements are covered by the
|
|
598
|
+
- Ensure all acceptance criteria from requirements are covered by the plan
|
|
533
599
|
- Flag any requirement that cannot be met and explain why
|
|
534
600
|
|
|
535
601
|
## Process
|
|
536
602
|
|
|
537
|
-
1. **Load spec** —
|
|
603
|
+
1. **Load spec** — read requirements and acceptance criteria
|
|
538
604
|
2. **Codebase analysis** — \`scope_map({ task: "<feature>" })\` to identify affected subsystems
|
|
539
605
|
3. **Deep dive** — \`file_summary()\` + \`compact()\` on each affected module
|
|
540
606
|
4. **Architecture design** — Decide on:
|
|
@@ -542,14 +608,14 @@ Before implementation, verify alignment with requirements:
|
|
|
542
608
|
- API surface changes
|
|
543
609
|
- Data model changes
|
|
544
610
|
- Integration patterns
|
|
545
|
-
5. **ADR for non-trivial decisions** —
|
|
546
|
-
6. **Phase decomposition** —
|
|
547
|
-
7. **Dependency graph** —
|
|
611
|
+
5. **ADR for non-trivial decisions** — use \`adr-skill\` for decisions that affect future development
|
|
612
|
+
6. **Phase decomposition** — break work into 3–10 ordered phases, each independently testable
|
|
613
|
+
7. **Dependency graph** — map which phases depend on others and which can parallelize
|
|
548
614
|
8. **Risk assessment** — Identify implementation risks per phase
|
|
549
615
|
|
|
550
616
|
## Outputs
|
|
551
617
|
|
|
552
|
-
Write \`{{artifacts_path}}/plan.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
618
|
+
Write \`{{artifacts_path}}/plan.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
553
619
|
|
|
554
620
|
Template:
|
|
555
621
|
|
|
@@ -588,16 +654,16 @@ Template:
|
|
|
588
654
|
|
|
589
655
|
| Agent | Role |
|
|
590
656
|
|-------|------|
|
|
591
|
-
| **Planner** |
|
|
592
|
-
| **Explorer** |
|
|
657
|
+
| **Planner** | TDD implementation plans |
|
|
658
|
+
| **Explorer** | Codebase exploration for files and deps |
|
|
593
659
|
|
|
594
660
|
**Dispatch via \`runSubagent\` — never \`switchAgent\`:**
|
|
595
661
|
1. \`runSubagent({ agent: "Explorer", ... })\` — initial breadth: file discovery, dependency tracing
|
|
596
662
|
2. \`runSubagent({ agent: "Planner", ... })\` — depth: phase design, ordering, plan artifact creation
|
|
597
663
|
|
|
598
|
-
The Planner agent (\`Planner.agent.md\`) owns the \`{{artifacts_path}}/plan.md\` artifact. Pass
|
|
664
|
+
The Planner agent (\`Planner.agent.md\`) owns the \`{{artifacts_path}}/plan.md\` artifact. Pass spec content, Explorer findings, and artifacts path as context.
|
|
599
665
|
|
|
600
|
-
${n(`knowledge`,"| `adr-skill` |
|
|
666
|
+
${n(`knowledge`,"| `adr-skill` | ADRs for non-trivial technical decisions | When plan involves architecture choices that need documentation |\n| `c4-architecture` | C4 diagrams for system structure changes | When plan modifies system architecture |")}
|
|
601
667
|
|
|
602
668
|
## Completion Criteria
|
|
603
669
|
|
|
@@ -608,12 +674,12 @@ ${n(`knowledge`,"| `adr-skill` | Architecture Decision Records for non-trivial t
|
|
|
608
674
|
- [ ] Risks identified with mitigations
|
|
609
675
|
- [ ] \`{{artifacts_path}}/plan.md\` written
|
|
610
676
|
|
|
611
|
-
${r(`- **Task dependencies**:
|
|
612
|
-
- **Risk assessment**:
|
|
613
|
-
- **Resource decisions**: File ownership, module boundaries,
|
|
677
|
+
${r(`- **Task dependencies**: Ordering constraints and parallel opportunities
|
|
678
|
+
- **Risk assessment**: Risks and mitigations
|
|
679
|
+
- **Resource decisions**: File ownership, module boundaries, integration points`)}
|
|
614
680
|
`},{file:`steps/spec/README.md`,content:`---
|
|
615
681
|
name: spec
|
|
616
|
-
description: Elicit requirements, clarify scope, and define acceptance criteria through
|
|
682
|
+
description: Elicit requirements, clarify scope, and define acceptance criteria through dialogue.
|
|
617
683
|
---
|
|
618
684
|
|
|
619
685
|
# Specification
|
|
@@ -628,43 +694,43 @@ If prerequisites are NOT met -> **backtrack to design step** (\`flow({ action: '
|
|
|
628
694
|
|
|
629
695
|
## Purpose
|
|
630
696
|
|
|
631
|
-
Transform a vague or broad feature request into a precise, testable specification
|
|
697
|
+
Transform a vague or broad feature request into a precise, testable specification.
|
|
632
698
|
|
|
633
699
|
## Inputs
|
|
634
700
|
|
|
635
701
|
- User's feature request, issue, or idea
|
|
636
|
-
- Codebase context (
|
|
702
|
+
- Codebase context (via aikit MCP tools)
|
|
637
703
|
|
|
638
704
|
### Input Artifacts
|
|
639
705
|
|
|
640
706
|
Read these from \`{{artifacts_path}}/\` before writing the spec:
|
|
641
|
-
1. \`requirements.md\` — Requirements clarity output (score, criteria, constraints). **If this file exists, the spec MUST address all requirements and acceptance criteria
|
|
707
|
+
1. \`requirements.md\` — Requirements clarity output (score, criteria, constraints). **If this file exists, the spec MUST address all listed requirements and acceptance criteria.**
|
|
642
708
|
2. \`design-decisions.md\` — Design decisions from the design step
|
|
643
709
|
|
|
644
710
|
If \`requirements.md\` is not found in artifacts, check flow-scoped knowledge:
|
|
645
711
|
\`\`\`
|
|
646
712
|
knowledge({ action: "withdraw", scope: "flow", profile: "implementer", budget: 4000 })
|
|
647
713
|
\`\`\`
|
|
648
|
-
Look for a "Requirements:" entry in
|
|
714
|
+
Look for a "Requirements:" entry in withdrawn context.
|
|
649
715
|
|
|
650
716
|
## Process
|
|
651
717
|
|
|
652
|
-
1. **Understand intent** —
|
|
653
|
-
2. **Search for context** — \`search()\` for related
|
|
718
|
+
1. **Understand intent** — parse what the user wants and why
|
|
719
|
+
2. **Search for context** — \`search()\` for related decisions, patterns, similar features
|
|
654
720
|
3. **Elicit requirements** — Ask structured questions to clarify:
|
|
655
721
|
- **Functional**: What must the system do?
|
|
656
722
|
- **Non-functional**: Performance, security, accessibility constraints
|
|
657
723
|
- **Scope boundaries**: What is explicitly out of scope?
|
|
658
724
|
- **Acceptance criteria**: How do we know it's done?
|
|
659
|
-
4. **Score clarity** —
|
|
660
|
-
5. **Draft specification** —
|
|
725
|
+
4. **Score clarity** — use the \`requirements-clarity\` skill to score 0–100. Iterate until ≥ 90.
|
|
726
|
+
5. **Draft specification** — write formal spec with all requirements resolved
|
|
661
727
|
|
|
662
728
|
## Requirements Clarity Gate (MANDATORY)
|
|
663
729
|
|
|
664
730
|
Before producing any spec.md or design document:
|
|
665
731
|
|
|
666
732
|
1. **Load the \`requirements-clarity\` skill**
|
|
667
|
-
2. **Score
|
|
733
|
+
2. **Score current requirements** using the skill's 0-100 rubric
|
|
668
734
|
3. **If score < 90:** Ask clarifying questions, iterate with user until ≥ 90
|
|
669
735
|
4. **If score ≥ 90:** Proceed to spec writing
|
|
670
736
|
|
|
@@ -678,11 +744,11 @@ Key Clarifications:
|
|
|
678
744
|
- [question asked → answer received]
|
|
679
745
|
\`\`\`
|
|
680
746
|
|
|
681
|
-
This gate
|
|
747
|
+
This gate prevents designing for misunderstood problems.
|
|
682
748
|
|
|
683
749
|
## Outputs
|
|
684
750
|
|
|
685
|
-
Write \`{{artifacts_path}}/spec.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
751
|
+
Write \`{{artifacts_path}}/spec.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
686
752
|
|
|
687
753
|
Template:
|
|
688
754
|
|
|
@@ -728,11 +794,11 @@ Key Clarifications:
|
|
|
728
794
|
|
|
729
795
|
| Agent | Role |
|
|
730
796
|
|-------|------|
|
|
731
|
-
| **Researcher-Alpha** |
|
|
797
|
+
| **Researcher-Alpha** | Patterns, prior decisions, technical constraints |
|
|
732
798
|
|
|
733
|
-
Use
|
|
799
|
+
Use \`brainstorming\` for creative/design exploration before formalizing requirements. Use \`requirements-clarity\` to score and iterate until the spec is unambiguous.
|
|
734
800
|
|
|
735
|
-
${n(`remember`,"| `requirements-clarity` | Score requirements 0-100, iterate until ≥90
|
|
801
|
+
${n(`remember`,"| `requirements-clarity` | Score requirements 0-100, iterate until ≥90 | Before writing spec — ensures requirements are clear enough |")}
|
|
736
802
|
|
|
737
803
|
## Completion Criteria
|
|
738
804
|
|
|
@@ -743,11 +809,11 @@ ${n(`remember`,"| `requirements-clarity` | Score requirements 0-100, iterate unt
|
|
|
743
809
|
- [ ] \`{{artifacts_path}}/spec.md\` written
|
|
744
810
|
|
|
745
811
|
${r(`- **Requirements clarified**: Ambiguities resolved and assumptions validated
|
|
746
|
-
- **Scope boundaries**: What the spec covers and
|
|
812
|
+
- **Scope boundaries**: What the spec covers and excludes
|
|
747
813
|
- **Acceptance criteria**: Key testable conditions that define "done"`)}
|
|
748
814
|
`},{file:`steps/task/README.md`,content:`---
|
|
749
815
|
name: task
|
|
750
|
-
description: Break the implementation plan into ordered, atomic tasks with
|
|
816
|
+
description: Break the implementation plan into ordered, atomic tasks with deps and agent assignments.
|
|
751
817
|
---
|
|
752
818
|
|
|
753
819
|
# Task Breakdown
|
|
@@ -762,27 +828,27 @@ If prerequisites are NOT met → **backtrack to plan step** (\`flow({ action: 's
|
|
|
762
828
|
|
|
763
829
|
## Purpose
|
|
764
830
|
|
|
765
|
-
Decompose the implementation plan into small, atomic tasks
|
|
831
|
+
Decompose the implementation plan into small, atomic tasks with clear dependency order and acceptance criteria.
|
|
766
832
|
|
|
767
833
|
## Inputs
|
|
768
834
|
|
|
769
|
-
- \`{{artifacts_path}}/plan.md\` —
|
|
835
|
+
- \`{{artifacts_path}}/plan.md\` — phased implementation plan
|
|
770
836
|
|
|
771
837
|
## Process
|
|
772
838
|
|
|
773
|
-
1. **Load plan** —
|
|
839
|
+
1. **Load plan** — read phases, file scope, dependency graph
|
|
774
840
|
2. **Decompose phases into tasks** — Each task should:
|
|
775
841
|
- Touch 1–3 files maximum
|
|
776
842
|
- Have a single, testable outcome
|
|
777
|
-
-
|
|
843
|
+
- Fit one focused agent session
|
|
778
844
|
3. **Define dependencies** — Map task-to-task dependencies (not just phase-to-phase)
|
|
779
|
-
4. **Assign agents** —
|
|
845
|
+
4. **Assign agents** — match each task to the best-fit agent
|
|
780
846
|
5. **Identify parallelism** — Mark which tasks can run simultaneously
|
|
781
|
-
6. **Architecture review** —
|
|
847
|
+
6. **Architecture review** — have Architect-Reviewer validate task ordering won't create integration issues
|
|
782
848
|
|
|
783
849
|
## Outputs
|
|
784
850
|
|
|
785
|
-
Write \`{{artifacts_path}}/tasks.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
851
|
+
Write \`{{artifacts_path}}/tasks.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
786
852
|
|
|
787
853
|
Template:
|
|
788
854
|
|
|
@@ -821,7 +887,7 @@ Template:
|
|
|
821
887
|
|
|
822
888
|
## Visualization
|
|
823
889
|
|
|
824
|
-
After writing \`tasks.md\`, present the task plan visually
|
|
890
|
+
After writing \`tasks.md\`, present the task plan visually for approval:
|
|
825
891
|
|
|
826
892
|
\`\`\`
|
|
827
893
|
present({ schemaVersion: 1, title: "Task Plan: <feature>", template: "task-plan@1", data: {
|
|
@@ -830,18 +896,18 @@ present({ schemaVersion: 1, title: "Task Plan: <feature>", template: "task-plan@
|
|
|
830
896
|
} })
|
|
831
897
|
\`\`\`
|
|
832
898
|
|
|
833
|
-
This renders an interactive dependency graph showing phases, parallel batches, and agent assignments.
|
|
899
|
+
This renders an interactive dependency graph showing phases, parallel batches, and agent assignments.
|
|
834
900
|
|
|
835
|
-
Use the template-driven graph for the dependency view; if you add
|
|
901
|
+
Use the template-driven graph for the dependency view; if you add summary content, use \`kv\` for approval metadata, \`list\` for task notes, and NEVER \`code\` blocks for structured data.
|
|
836
902
|
|
|
837
903
|
## Agents
|
|
838
904
|
|
|
839
905
|
| Agent | Role |
|
|
840
906
|
|-------|------|
|
|
841
|
-
| **Planner** |
|
|
842
|
-
| **Architect-Reviewer-Alpha** | Validates task
|
|
907
|
+
| **Planner** | Atomic task decomposition |
|
|
908
|
+
| **Architect-Reviewer-Alpha** | Validates task graph |
|
|
843
909
|
|
|
844
|
-
Planner does the decomposition
|
|
910
|
+
Planner does the decomposition; Architect-Reviewer validates the task graph.
|
|
845
911
|
|
|
846
912
|
${n(`remember`)}
|
|
847
913
|
|
|
@@ -854,12 +920,12 @@ ${n(`remember`)}
|
|
|
854
920
|
- [ ] Architect review confirms no integration risks
|
|
855
921
|
- [ ] \`{{artifacts_path}}/tasks.md\` written
|
|
856
922
|
|
|
857
|
-
${r(`- **Task decomposition rationale**: Why tasks were split this way
|
|
858
|
-
- **Interface contracts**: APIs, types, or data shapes
|
|
923
|
+
${r(`- **Task decomposition rationale**: Why tasks were split this way
|
|
924
|
+
- **Interface contracts**: APIs, types, or data shapes tasks depend on
|
|
859
925
|
- **Coordination points**: Where tasks interact and handoff requirements`)}
|
|
860
926
|
`},{file:`steps/verify/README.md`,content:`---
|
|
861
927
|
name: verify
|
|
862
|
-
description: Dual code review, architecture review, security review, and
|
|
928
|
+
description: Dual code review, architecture review, security review, and test validation.
|
|
863
929
|
---
|
|
864
930
|
|
|
865
931
|
# Verification (Advanced)
|
|
@@ -875,7 +941,7 @@ If prerequisites are NOT met → **backtrack to execute step** (\`flow({ action:
|
|
|
875
941
|
|
|
876
942
|
## Purpose
|
|
877
943
|
|
|
878
|
-
Perform
|
|
944
|
+
Perform multi-perspective validation through dual code review, architecture review, and security analysis.
|
|
879
945
|
|
|
880
946
|
## Inputs
|
|
881
947
|
|
|
@@ -886,20 +952,20 @@ Perform thorough multi-perspective validation of all changes through parallel du
|
|
|
886
952
|
|
|
887
953
|
## Process
|
|
888
954
|
|
|
889
|
-
1. **Load all artifacts** —
|
|
955
|
+
1. **Load all artifacts** — read spec, plan, tasks, progress
|
|
890
956
|
2. **Dual code review** (parallel):
|
|
891
|
-
- Code-Reviewer-Alpha:
|
|
892
|
-
- Code-Reviewer-Beta:
|
|
957
|
+
- Code-Reviewer-Alpha: correctness, conventions, quality
|
|
958
|
+
- Code-Reviewer-Beta: edge cases, error handling, maintainability
|
|
893
959
|
3. **Architecture review** (parallel with code review):
|
|
894
|
-
- Architect-Reviewer-Alpha:
|
|
895
|
-
- Architect-Reviewer-Beta:
|
|
960
|
+
- Architect-Reviewer-Alpha: alignment with plan and ADRs
|
|
961
|
+
- Architect-Reviewer-Beta: long-term maintainability and evolution
|
|
896
962
|
4. **Security review**:
|
|
897
963
|
- Security agent: OWASP Top 10, auth/authz, input validation, secrets
|
|
898
964
|
5. **Quality gates** — \`check({})\` + \`test_run({})\` must pass
|
|
899
965
|
6. **Blast radius** — \`blast_radius({ path: ".", files: [...] })\` on all modified files
|
|
900
966
|
7. **Acceptance criteria** — Verify each spec acceptance criterion is met
|
|
901
967
|
8. **FORGE gate** — \`evidence_map({ action: "gate" })\` for final quality assessment
|
|
902
|
-
9. **Synthesize report** —
|
|
968
|
+
9. **Synthesize report** — merge reviewer findings into a unified verdict
|
|
903
969
|
|
|
904
970
|
## Evidence Map Gate Detail
|
|
905
971
|
|
|
@@ -909,11 +975,11 @@ After the process steps above, the FORGE gate must return YIELD:
|
|
|
909
975
|
- **HOLD** → Fix unresolved claims, re-gate (max 2 retries)
|
|
910
976
|
- **HARD_BLOCK** → Contract-type unknowns detected, escalate to user
|
|
911
977
|
|
|
912
|
-
Never declare verification complete without
|
|
978
|
+
Never declare verification complete without YIELD.
|
|
913
979
|
|
|
914
980
|
## Outputs
|
|
915
981
|
|
|
916
|
-
Write \`{{artifacts_path}}/verify-report.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
982
|
+
Write \`{{artifacts_path}}/verify-report.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
917
983
|
|
|
918
984
|
Template:
|
|
919
985
|
|
|
@@ -956,15 +1022,15 @@ APPROVE | REQUEST CHANGES
|
|
|
956
1022
|
|
|
957
1023
|
| Agent | Role |
|
|
958
1024
|
|-------|------|
|
|
959
|
-
| **Code-Reviewer-Alpha** |
|
|
960
|
-
| **Code-Reviewer-Beta** |
|
|
961
|
-
| **Architect-Reviewer-Alpha** |
|
|
962
|
-
| **Architect-Reviewer-Beta** |
|
|
963
|
-
| **Security** |
|
|
1025
|
+
| **Code-Reviewer-Alpha** | Correctness, quality, conventions |
|
|
1026
|
+
| **Code-Reviewer-Beta** | Edge cases, error handling, maintainability |
|
|
1027
|
+
| **Architect-Reviewer-Alpha** | Alignment with plan and ADRs |
|
|
1028
|
+
| **Architect-Reviewer-Beta** | Long-term evolution |
|
|
1029
|
+
| **Security** | OWASP, auth, input validation |
|
|
964
1030
|
|
|
965
|
-
**Parallelism**: All 5 reviewers can run in parallel —
|
|
1031
|
+
**Parallelism**: All 5 reviewers can run in parallel — read-only.
|
|
966
1032
|
|
|
967
|
-
${n(`remember`,"| `lesson-learned` | Extract engineering principles from completed work | After verification — capture lessons from the implementation |\n| `session-handoff` | Context preservation for session continuity | When verification spans sessions or for final handoff
|
|
1033
|
+
${n(`remember`,"| `lesson-learned` | Extract engineering principles from completed work | After verification — capture lessons from the implementation |\n| `session-handoff` | Context preservation for session continuity | When verification spans sessions or for final handoff |",t)}
|
|
968
1034
|
|
|
969
1035
|
## Completion Criteria
|
|
970
1036
|
|
|
@@ -979,22 +1045,22 @@ ${n(`remember`,"| `lesson-learned` | Extract engineering principles from complet
|
|
|
979
1045
|
|
|
980
1046
|
${r(`- **Test coverage gaps**: Areas that couldn't be fully tested and why
|
|
981
1047
|
- **Quality findings**: Issues found during verification and their resolutions
|
|
982
|
-
- **Session checkpoint**:
|
|
983
|
-
`}],"aikit-basic":[{file:`README.md`,content:"# aikit:basic — Quick Development Flow\n\nQuick development flow for **bug fixes, small features, and refactoring**.\n\n## Steps\n\n| # | Step | Skill | Produces | Requires | Agents |\n|---|------|-------|----------|----------|--------|\n| 1 | **Design Gate** | `steps/design/README.md` | `design-decisions.md` | — | Researcher-Alpha/Beta/Gamma/Delta |\n| 2 | **Assessment** | `steps/assess/README.md` | `assessment.md` | `design-decisions.md` | Explorer, Researcher-Alpha |\n| 3 | **Implementation** | `steps/implement/README.md` | `progress.md` | `assessment.md` | Implementer, Frontend |\n| 4 | **Verification** | `steps/verify/README.md` | `verify-report.md` | `progress.md` | Code-Reviewer-Alpha, Security |\n\n## How It Works\n\nEach step has a **README.md
|
|
1048
|
+
- **Session checkpoint**: What was accomplished, decisions made, remaining work`)}
|
|
1049
|
+
`}],"aikit-basic":[{file:`README.md`,content:"# aikit:basic — Quick Development Flow\n\nQuick development flow for **bug fixes, small features, and refactoring**.\n\n## Steps\n\n| # | Step | Skill | Produces | Requires | Agents |\n|---|------|-------|----------|----------|--------|\n| 1 | **Design Gate** | `steps/design/README.md` | `design-decisions.md` | — | Researcher-Alpha/Beta/Gamma/Delta |\n| 2 | **Assessment** | `steps/assess/README.md` | `assessment.md` | `design-decisions.md` | Explorer, Researcher-Alpha |\n| 3 | **Implementation** | `steps/implement/README.md` | `progress.md` | `assessment.md` | Implementer, Frontend |\n| 4 | **Verification** | `steps/verify/README.md` | `verify-report.md` | `progress.md` | Code-Reviewer-Alpha, Security |\n\n## How It Works\n\nEach step has a **README.md**. Orchestrator reads it via `flow({ action: 'read' })` and delegates work.\n\n### Step 1: Design Gate\n- **Auto-skips** for bug fixes and refactors (produces minimal `design-decisions.md` noting the skip)\n- For small features: runs quick brainstorming, FORGE classification, and optional decision protocol\n- Read `steps/design/README.md` for the full decision tree\n\n### Step 2: Assessment\n- Explore the codebase to understand scope and impact\n- Use `search`, `scope_map`, `file_summary`, `compact` to gather context\n- Identify the approach and produce `assessment.md`\n\n### Step 3: Implementation\n- Write code following the assessment plan\n- The Orchestrator dispatches Implementer/Frontend agents with specific file scopes\n- Follow TDD practices where applicable\n\n### Step 4: Verification\n- Code review, test execution, security check\n- Run `check({})` + `test_run({})` + `blast_radius({})`\n- Produce `verify-report.md` with findings\n\n## Using Skills Inside Steps\n\nWhen the Orchestrator activates a step:\n\n1. **Read the instruction first** — `flow({ action: 'read' })` returns the current step README.md\n2. **Follow step instructions** — primary guide\n3. **Delegate to listed agents** — each step lists which agents are appropriate\n4. **Produce the required artifact** — the step's `produces` field specifies the artifact file\n5. **Check dependencies** — required prior artifacts must exist\n6. **Report status** — agents report `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED` to the Orchestrator\n\n## Artifacts\n\nArtifacts are stored under `.flows/{topic}/`. `{{artifacts_path}}` resolves at runtime.\n"},{file:`steps/assess/README.md`,content:`---
|
|
984
1050
|
name: assess
|
|
985
|
-
description: Understand scope, analyze the codebase, and identify the
|
|
1051
|
+
description: Understand scope, analyze the codebase, and identify the approach.
|
|
986
1052
|
---
|
|
987
1053
|
|
|
988
1054
|
# Assessment
|
|
989
1055
|
|
|
990
1056
|
## Purpose
|
|
991
1057
|
|
|
992
|
-
Analyze
|
|
1058
|
+
Analyze task requirements and codebase to produce a clear, actionable assessment before code changes begin.
|
|
993
1059
|
|
|
994
1060
|
## Inputs
|
|
995
1061
|
|
|
996
1062
|
- User's task description or issue reference
|
|
997
|
-
- Codebase (
|
|
1063
|
+
- Codebase (via aikit MCP tools)
|
|
998
1064
|
|
|
999
1065
|
## Prerequisites Check
|
|
1000
1066
|
|
|
@@ -1004,10 +1070,10 @@ Before executing this step, verify:
|
|
|
1004
1070
|
- [ ] FORGE classification determined (tier assigned)
|
|
1005
1071
|
- [ ] If brainstorming was done, session outcomes are recorded
|
|
1006
1072
|
|
|
1007
|
-
If
|
|
1073
|
+
If prerequisites are missing or incomplete:
|
|
1008
1074
|
1. Inform the Orchestrator with specifics about what's missing
|
|
1009
1075
|
2. Recommend \`flow({ action: 'step', advance: 'redo' })\` on the **design** step
|
|
1010
|
-
3. Do NOT proceed with partial inputs
|
|
1076
|
+
3. Do NOT proceed with partial inputs
|
|
1011
1077
|
|
|
1012
1078
|
### Requirements Input (if available)
|
|
1013
1079
|
|
|
@@ -1020,16 +1086,16 @@ If no requirements.md exists (Design Gate was auto-skipped for bug fix/refactor)
|
|
|
1020
1086
|
|
|
1021
1087
|
## Process
|
|
1022
1088
|
|
|
1023
|
-
1. **Parse the goal** —
|
|
1024
|
-
2. **Search for prior work** — \`search({ query: "<task keywords>" })\`
|
|
1089
|
+
1. **Parse the goal** — extract what needs to change, success criteria, constraints
|
|
1090
|
+
2. **Search for prior work** — \`search({ query: "<task keywords>" })\` for existing decisions or related code
|
|
1025
1091
|
3. **Map affected scope** — \`scope_map({ task: "<description>" })\` to identify files and modules involved
|
|
1026
1092
|
4. **Analyze structure** — \`file_summary()\` on each affected file; \`compact()\` for deeper sections
|
|
1027
|
-
5. **Identify risks** —
|
|
1028
|
-
6. **Draft approach** —
|
|
1093
|
+
5. **Identify risks** — note deps, breaking-change potential, test gaps
|
|
1094
|
+
6. **Draft approach** — outline implementation strategy in 3–7 steps
|
|
1029
1095
|
|
|
1030
1096
|
## Outputs
|
|
1031
1097
|
|
|
1032
|
-
Write \`{{artifacts_path}}/assessment.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
1098
|
+
Write \`{{artifacts_path}}/assessment.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
1033
1099
|
|
|
1034
1100
|
Template:
|
|
1035
1101
|
|
|
@@ -1056,12 +1122,12 @@ Template:
|
|
|
1056
1122
|
|
|
1057
1123
|
| Agent | Role |
|
|
1058
1124
|
|-------|------|
|
|
1059
|
-
| **Explorer** |
|
|
1060
|
-
| **Researcher-Alpha** |
|
|
1125
|
+
| **Explorer** | File discovery, dependency tracing, structural context |
|
|
1126
|
+
| **Researcher-Alpha** | Complex logic, prior decisions, architecture |
|
|
1061
1127
|
|
|
1062
|
-
Use Explorer first for breadth, then Researcher-Alpha for depth
|
|
1128
|
+
Use Explorer first for breadth, then Researcher-Alpha for depth.
|
|
1063
1129
|
|
|
1064
|
-
${n(`remember`,"| `c4-architecture` | C4
|
|
1130
|
+
${n(`remember`,"| `c4-architecture` | C4 diagrams — system context, container, component, deployment | When visualizing system structure during assessment |\n| `adr-skill` | ADRs — create, review, maintain | When assessment reveals non-trivial design decisions |")}
|
|
1065
1131
|
|
|
1066
1132
|
## Completion Criteria
|
|
1067
1133
|
|
|
@@ -1071,22 +1137,22 @@ ${n(`remember`,"| `c4-architecture` | C4 model architecture diagrams — system
|
|
|
1071
1137
|
- [ ] No unresolved open questions that block implementation
|
|
1072
1138
|
- [ ] \`{{artifacts_path}}/assessment.md\` written
|
|
1073
1139
|
|
|
1074
|
-
${r(`- **Codebase discoveries**: File locations,
|
|
1075
|
-
- **Problem diagnosis**: Root cause
|
|
1076
|
-
- **Scope decisions**: What's in scope, what's
|
|
1140
|
+
${r(`- **Codebase discoveries**: File locations, patterns, or dependency relationships found during assessment
|
|
1141
|
+
- **Problem diagnosis**: Root cause, contributing factors, affected components
|
|
1142
|
+
- **Scope decisions**: What's in scope, what's excluded, and why`)}
|
|
1077
1143
|
`},{file:`steps/design/README.md`,content:`# Design Gate — Basic Flow
|
|
1078
1144
|
|
|
1079
|
-
Lightweight design gate for bug fixes, small features, and refactoring. Evaluates
|
|
1145
|
+
Lightweight design gate for bug fixes, small features, and refactoring. Evaluates task type and whether design work is needed.
|
|
1080
1146
|
|
|
1081
1147
|
## When This Step Runs
|
|
1082
1148
|
|
|
1083
|
-
|
|
1149
|
+
First step of \`aikit:basic\`. Runs before assessment.
|
|
1084
1150
|
|
|
1085
1151
|
## Instructions
|
|
1086
1152
|
|
|
1087
1153
|
### 1. Task Classification
|
|
1088
1154
|
|
|
1089
|
-
Classify the task
|
|
1155
|
+
Classify the task:
|
|
1090
1156
|
|
|
1091
1157
|
| Category | Indicators | Action |
|
|
1092
1158
|
|----------|-----------|--------|
|
|
@@ -1101,8 +1167,8 @@ Classify the task into one of these categories:
|
|
|
1101
1167
|
- **Design gate**: Auto-skipped — no design work needed
|
|
1102
1168
|
- **Proceed to**: Assessment
|
|
1103
1169
|
\`\`\`
|
|
1104
|
-
**You MUST create this file on disk** at the exact \`{{artifacts_path}}/design-decisions.md\` path — do not
|
|
1105
|
-
Then report \`DONE\` to the Orchestrator
|
|
1170
|
+
**You MUST create this file on disk** at the exact \`{{artifacts_path}}/design-decisions.md\` path — do not only present the content in chat.
|
|
1171
|
+
Then report \`DONE\` to the Orchestrator.
|
|
1106
1172
|
|
|
1107
1173
|
### 2. Quick Design (Small Features Only)
|
|
1108
1174
|
|
|
@@ -1110,15 +1176,15 @@ For small features that need minimal design:
|
|
|
1110
1176
|
|
|
1111
1177
|
#### For Small Features (requires design):
|
|
1112
1178
|
|
|
1113
|
-
1. **If requirements are unclear** (ambiguous scope, multiple
|
|
1179
|
+
1. **If requirements are unclear** (ambiguous scope, multiple interpretations, or cross-component):
|
|
1114
1180
|
- Load \`requirements-clarity\` skill
|
|
1115
1181
|
- Score requirements, iterate until ≥ 90
|
|
1116
1182
|
- Output: \`{{artifacts_path}}/requirements.md\`
|
|
1117
1183
|
2. **If requirements are clear** (single concern, obvious scope, clear acceptance):
|
|
1118
1184
|
- Skip requirements-clarity, proceed to Quick Design directly
|
|
1119
1185
|
|
|
1120
|
-
1. **FORGE Classify** — Run \`forge_classify({ task: "<task description>", files: [<relevant files>], root_path: "." })\` to determine
|
|
1121
|
-
2. **Brainstorming** (if tier ≥ Standard) — Load
|
|
1186
|
+
1. **FORGE Classify** — Run \`forge_classify({ task: "<task description>", files: [<relevant files>], root_path: "." })\` to determine tier
|
|
1187
|
+
2. **Brainstorming** (if tier ≥ Standard) — Load \`brainstorming\` and run a focused session:
|
|
1122
1188
|
- What is the user trying to achieve?
|
|
1123
1189
|
- What are the constraints?
|
|
1124
1190
|
- What is the simplest approach?
|
|
@@ -1126,7 +1192,7 @@ For small features that need minimal design:
|
|
|
1126
1192
|
- **Phase 1**: Launch ALL 4 Researcher variants in parallel (Alpha/Beta/Gamma/Delta)
|
|
1127
1193
|
- **Phase 2**: Anonymize outputs as A/B/C/D, run peer review round (4 reviewers in parallel)
|
|
1128
1194
|
- **Phase 3**: Synthesize into structured verdict (Agrees / Clashes / Blind Spots / Recommendation / First Step)
|
|
1129
|
-
- Present verdict visually using \`present({ schemaVersion: 1, title: "Decision Verdict", blocks: [...] })\`; use \`table\` for multi-approach comparisons, \`list\` for recommendations
|
|
1195
|
+
- Present verdict visually using \`present({ schemaVersion: 1, title: "Decision Verdict", blocks: [...] })\`; use \`table\` for multi-approach comparisons, \`list\` for recommendations/blind spots, and \`kv\` for verdict metadata. NEVER \`code\` blocks for structured data. Produce ADR for Standard+ tiers
|
|
1130
1196
|
4. **Write \`{{artifacts_path}}/design-decisions.md\`** to disk:
|
|
1131
1197
|
|
|
1132
1198
|
\`\`\`markdown
|
|
@@ -1150,13 +1216,13 @@ For small features that need minimal design:
|
|
|
1150
1216
|
|
|
1151
1217
|
When complete, report status:
|
|
1152
1218
|
- \`DONE\` — design decisions captured, ready for assessment
|
|
1153
|
-
- \`DONE_WITH_CONCERNS\` — design captured but open questions remain
|
|
1219
|
+
- \`DONE_WITH_CONCERNS\` — design captured but open questions remain
|
|
1154
1220
|
|
|
1155
1221
|
**Do NOT call \`flow({ action: 'step', advance: 'next' })\`** — let the Orchestrator advance the flow.
|
|
1156
1222
|
|
|
1157
1223
|
## Outputs
|
|
1158
1224
|
|
|
1159
|
-
Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
1225
|
+
Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat. This file is a prerequisite for the next step.
|
|
1160
1226
|
|
|
1161
1227
|
## Produces
|
|
1162
1228
|
|
|
@@ -1164,9 +1230,9 @@ Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this
|
|
|
1164
1230
|
|
|
1165
1231
|
## Agents
|
|
1166
1232
|
|
|
1167
|
-
- \`Researcher-Alpha\`, \`Researcher-Beta\`, \`Researcher-Gamma\`, \`Researcher-Delta\` —
|
|
1233
|
+
- \`Researcher-Alpha\`, \`Researcher-Beta\`, \`Researcher-Gamma\`, \`Researcher-Delta\` — parallel research during decision protocol
|
|
1168
1234
|
|
|
1169
|
-
${n(`remember`,"| `c4-architecture` | C4
|
|
1235
|
+
${n(`remember`,"| `c4-architecture` | C4 diagrams — system context, container, component, deployment | When visualizing system structure during design |\n| `adr-skill` | ADRs — create, review, maintain | When making non-trivial design or technology decisions |")}
|
|
1170
1236
|
|
|
1171
1237
|
## Completion Criteria
|
|
1172
1238
|
|
|
@@ -1174,23 +1240,23 @@ ${n(`remember`,"| `c4-architecture` | C4 model architecture diagrams — system
|
|
|
1174
1240
|
- [ ] FORGE tier determined (for small features)
|
|
1175
1241
|
- [ ] Key design decisions documented
|
|
1176
1242
|
|
|
1177
|
-
${r(`- **Design decisions**: Chosen approach and alternatives
|
|
1178
|
-
- **Architecture patterns**: New patterns
|
|
1179
|
-
- **Constraints discovered**: Technical
|
|
1243
|
+
${r(`- **Design decisions**: Chosen approach and rejected alternatives
|
|
1244
|
+
- **Architecture patterns**: New patterns or patterns that must be followed
|
|
1245
|
+
- **Constraints discovered**: Technical, compatibility, performance limits`)}
|
|
1180
1246
|
`},{file:`steps/implement/README.md`,content:`---
|
|
1181
1247
|
name: implement
|
|
1182
|
-
description: Write code following the assessment plan, using TDD
|
|
1248
|
+
description: Write code following the assessment plan, using TDD where applicable.
|
|
1183
1249
|
---
|
|
1184
1250
|
|
|
1185
1251
|
# Implementation
|
|
1186
1252
|
|
|
1187
1253
|
## Purpose
|
|
1188
1254
|
|
|
1189
|
-
Execute the implementation plan from
|
|
1255
|
+
Execute the implementation plan from assessment, writing production code and tests.
|
|
1190
1256
|
|
|
1191
1257
|
## Inputs
|
|
1192
1258
|
|
|
1193
|
-
- \`{{artifacts_path}}/assessment.md\` —
|
|
1259
|
+
- \`{{artifacts_path}}/assessment.md\` — approach, affected files, risks
|
|
1194
1260
|
|
|
1195
1261
|
## Prerequisites Check
|
|
1196
1262
|
|
|
@@ -1200,21 +1266,21 @@ Before executing this step, verify:
|
|
|
1200
1266
|
- [ ] Files-to-modify list is clear and bounded
|
|
1201
1267
|
- [ ] \`check({})\` baseline captured (know what currently passes)
|
|
1202
1268
|
|
|
1203
|
-
If
|
|
1269
|
+
If prerequisites are missing or incomplete:
|
|
1204
1270
|
1. Inform the Orchestrator with specifics about what's missing
|
|
1205
1271
|
2. Recommend \`flow({ action: 'step', advance: 'redo' })\` on the **assess** step
|
|
1206
|
-
3. Do NOT proceed with partial inputs
|
|
1272
|
+
3. Do NOT proceed with partial inputs
|
|
1207
1273
|
|
|
1208
1274
|
## Process
|
|
1209
1275
|
|
|
1210
|
-
1. **Read assessment** —
|
|
1211
|
-
2. **Set up tests first** —
|
|
1212
|
-
3. **Implement changes** —
|
|
1213
|
-
- One logical change per
|
|
1214
|
-
- Stay within
|
|
1276
|
+
1. **Read assessment** — load \`{{artifacts_path}}/assessment.md\` and internalize the approach
|
|
1277
|
+
2. **Set up tests first** — where applicable, write failing tests that define success
|
|
1278
|
+
3. **Implement changes** — follow approach steps sequentially
|
|
1279
|
+
- One logical change per chunk
|
|
1280
|
+
- Stay within assessed file scope — do not expand without re-assessment
|
|
1215
1281
|
4. **Run validation** — \`check({})\` for type/lint errors, \`test_run({})\` for test results
|
|
1216
1282
|
5. **Fix issues** — Iterate until \`check\` and \`test_run\` pass (max 3 rounds)
|
|
1217
|
-
6. **Document progress** —
|
|
1283
|
+
6. **Document progress** — write progress artifact with what was done and deviations
|
|
1218
1284
|
|
|
1219
1285
|
## Validation Boundary (MANDATORY)
|
|
1220
1286
|
|
|
@@ -1232,7 +1298,7 @@ If either fails:
|
|
|
1232
1298
|
|
|
1233
1299
|
## Outputs
|
|
1234
1300
|
|
|
1235
|
-
Write \`{{artifacts_path}}/progress.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
1301
|
+
Write \`{{artifacts_path}}/progress.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
1236
1302
|
|
|
1237
1303
|
Template:
|
|
1238
1304
|
|
|
@@ -1260,12 +1326,12 @@ Template:
|
|
|
1260
1326
|
|
|
1261
1327
|
| Agent | Role |
|
|
1262
1328
|
|-------|------|
|
|
1263
|
-
| **Implementer** |
|
|
1264
|
-
| **Frontend** |
|
|
1329
|
+
| **Implementer** | TDD, production code, tests |
|
|
1330
|
+
| **Frontend** | React, styling, responsive design |
|
|
1265
1331
|
|
|
1266
|
-
Dispatch Implementer for backend/logic changes, Frontend for UI changes.
|
|
1332
|
+
Dispatch Implementer for backend/logic changes, Frontend for UI changes. They can run in parallel on different files.
|
|
1267
1333
|
|
|
1268
|
-
${n(`remember`,"| `session-handoff` | Context preservation for session transfers | When implementation is long-running
|
|
1334
|
+
${n(`remember`,"| `session-handoff` | Context preservation for session transfers | When implementation is long-running or context may fill up |",e)}
|
|
1269
1335
|
|
|
1270
1336
|
## Completion Criteria
|
|
1271
1337
|
|
|
@@ -1275,9 +1341,9 @@ ${n(`remember`,"| `session-handoff` | Context preservation for session transfers
|
|
|
1275
1341
|
- [ ] No files modified outside assessed scope
|
|
1276
1342
|
- [ ] \`{{artifacts_path}}/progress.md\` written
|
|
1277
1343
|
|
|
1278
|
-
${r(`- **Implementation decisions**: Why specific approaches were chosen
|
|
1279
|
-
- **Patterns established**: New conventions or patterns
|
|
1280
|
-
- **Gotchas encountered**: Edge cases, workarounds,
|
|
1344
|
+
${r(`- **Implementation decisions**: Why specific approaches were chosen
|
|
1345
|
+
- **Patterns established**: New conventions or patterns to follow
|
|
1346
|
+
- **Gotchas encountered**: Edge cases, workarounds, non-obvious behaviors`)}
|
|
1281
1347
|
`},{file:`steps/verify/README.md`,content:`---
|
|
1282
1348
|
name: verify
|
|
1283
1349
|
description: Review code changes, run tests, validate correctness and quality.
|
|
@@ -1287,12 +1353,12 @@ description: Review code changes, run tests, validate correctness and quality.
|
|
|
1287
1353
|
|
|
1288
1354
|
## Purpose
|
|
1289
1355
|
|
|
1290
|
-
Validate that
|
|
1356
|
+
Validate that implementation meets requirements, passes quality gates, and introduces no regressions.
|
|
1291
1357
|
|
|
1292
1358
|
## Inputs
|
|
1293
1359
|
|
|
1294
1360
|
- \`{{artifacts_path}}/assessment.md\` — original requirements and approach
|
|
1295
|
-
- \`{{artifacts_path}}/progress.md\` —
|
|
1361
|
+
- \`{{artifacts_path}}/progress.md\` — implemented changes and deviations
|
|
1296
1362
|
|
|
1297
1363
|
## Prerequisites Check
|
|
1298
1364
|
|
|
@@ -1302,27 +1368,27 @@ Before executing this step, verify:
|
|
|
1302
1368
|
- [ ] \`check({})\` + \`test_run({})\` pass at baseline
|
|
1303
1369
|
- [ ] Changed files list is available for blast radius analysis
|
|
1304
1370
|
|
|
1305
|
-
If
|
|
1371
|
+
If prerequisites are missing or incomplete:
|
|
1306
1372
|
1. Inform the Orchestrator with specifics about what's missing
|
|
1307
1373
|
2. Recommend \`flow({ action: 'step', advance: 'redo' })\` on the **implement** step
|
|
1308
|
-
3. Do NOT proceed with partial inputs
|
|
1374
|
+
3. Do NOT proceed with partial inputs
|
|
1309
1375
|
|
|
1310
1376
|
## Process
|
|
1311
1377
|
|
|
1312
|
-
1. **Load context** —
|
|
1313
|
-
2. **Code review** —
|
|
1378
|
+
1. **Load context** — read assessment and progress artifacts
|
|
1379
|
+
2. **Code review** — review changed files for:
|
|
1314
1380
|
- Correctness against requirements
|
|
1315
|
-
- Code quality and
|
|
1381
|
+
- Code quality and project conventions
|
|
1316
1382
|
- Error handling and edge cases
|
|
1317
1383
|
- No unnecessary changes (scope creep)
|
|
1318
1384
|
3. **Run quality gates** — \`check({})\` + \`test_run({})\` must pass
|
|
1319
1385
|
4. **Blast radius** — \`blast_radius({ path: ".", files: [...] })\` to assess impact
|
|
1320
1386
|
5. **Security scan** — Check for OWASP Top 10 issues in changed code
|
|
1321
|
-
6. **Write report** —
|
|
1387
|
+
6. **Write report** — document findings with PASS/FAIL verdict
|
|
1322
1388
|
|
|
1323
1389
|
## Outputs
|
|
1324
1390
|
|
|
1325
|
-
Write \`{{artifacts_path}}/verify-report.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not
|
|
1391
|
+
Write \`{{artifacts_path}}/verify-report.md\` to disk. **You MUST create this file** using the IDE's native file creation capability or equivalent — do not only present content in chat.
|
|
1326
1392
|
|
|
1327
1393
|
Template:
|
|
1328
1394
|
|
|
@@ -1350,12 +1416,12 @@ Template:
|
|
|
1350
1416
|
|
|
1351
1417
|
| Agent | Role |
|
|
1352
1418
|
|-------|------|
|
|
1353
|
-
| **Code-Reviewer-Alpha** |
|
|
1354
|
-
| **Security** |
|
|
1419
|
+
| **Code-Reviewer-Alpha** | Correctness, quality, conventions |
|
|
1420
|
+
| **Security** | Vulnerability analysis, OWASP compliance |
|
|
1355
1421
|
|
|
1356
1422
|
Run both in parallel — they review different aspects of the same changes.
|
|
1357
1423
|
|
|
1358
|
-
${n(`remember`,"| `lesson-learned` | Extract engineering lessons from completed work via git history | After verification completes — capture principles from what was built |\n| `session-handoff` | Context preservation for session transfers | When verification is
|
|
1424
|
+
${n(`remember`,"| `lesson-learned` | Extract engineering lessons from completed work via git history | After verification completes — capture principles from what was built |\n| `session-handoff` | Context preservation for session transfers | When verification is final step and session context should be saved |",t)}
|
|
1359
1425
|
|
|
1360
1426
|
## Completion Criteria
|
|
1361
1427
|
|
|
@@ -1368,5 +1434,5 @@ ${n(`remember`,"| `lesson-learned` | Extract engineering lessons from completed
|
|
|
1368
1434
|
|
|
1369
1435
|
${r(`- **Test coverage gaps**: Areas that couldn't be fully tested and why
|
|
1370
1436
|
- **Quality findings**: Issues found during verification and their resolutions
|
|
1371
|
-
- **Session checkpoint**:
|
|
1437
|
+
- **Session checkpoint**: What was accomplished, decisions made, remaining work`)}
|
|
1372
1438
|
`}]};export{i as FLOWS};
|