@vpxa/aikit 0.1.73 → 0.1.75
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 +9 -1
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/dist/{init-D_OGLUN1.js → init-CuRXmyD9.js} +4 -4
- package/packages/cli/dist/scaffold-WMQ2uQ48.js +2 -0
- package/packages/cli/dist/{templates-DJ7EC5vw.js → templates-ArdAVWoY.js} +13 -3
- package/packages/cli/dist/user-vbJwa7x2.js +5 -0
- package/packages/dashboard/dist/assets/index-C6D-PCp0.js.map +1 -1
- package/packages/flows/dist/index.d.ts +29 -0
- package/packages/flows/dist/index.js +1 -1
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/{server-B9Mx1aK-.js → server-CVhVH5cT.js} +127 -127
- package/packages/tools/dist/index.d.ts +19 -1
- package/packages/tools/dist/index.js +39 -39
- package/scaffold/dist/adapters/claude-code.mjs +4 -0
- package/scaffold/dist/adapters/copilot.mjs +75 -0
- package/scaffold/dist/adapters/flows.mjs +1 -0
- package/scaffold/dist/adapters/skills.mjs +1 -0
- package/scaffold/dist/compiled/flows-data.mjs +1429 -0
- package/scaffold/dist/compiled/skills-data.mjs +9951 -0
- package/scaffold/dist/definitions/agents.mjs +9 -0
- package/scaffold/{definitions → dist/definitions}/bodies.mjs +6 -229
- package/scaffold/dist/definitions/exclusions.mjs +1 -0
- package/scaffold/dist/definitions/hooks.mjs +1 -0
- package/scaffold/dist/definitions/models.mjs +1 -0
- package/scaffold/dist/definitions/plugins.mjs +1 -0
- package/scaffold/{definitions → dist/definitions}/prompts.mjs +9 -149
- package/scaffold/{definitions → dist/definitions}/protocols.mjs +9 -37
- package/scaffold/dist/definitions/tools.mjs +1 -0
- package/packages/cli/dist/scaffold-CJwkHf-q.js +0 -2
- package/packages/cli/dist/user-BEmVW8Tp.js +0 -5
- package/scaffold/adapters/claude-code.mjs +0 -73
- package/scaffold/adapters/copilot.mjs +0 -292
- package/scaffold/definitions/agents.mjs +0 -266
- package/scaffold/definitions/hooks.mjs +0 -43
- package/scaffold/definitions/models.mjs +0 -84
- package/scaffold/definitions/plugins.mjs +0 -147
- package/scaffold/definitions/tools.mjs +0 -250
- package/scaffold/flows/_epilogue/steps/docs-sync/README.md +0 -120
- package/scaffold/flows/aikit-advanced/README.md +0 -70
- package/scaffold/flows/aikit-advanced/flow.json +0 -69
- package/scaffold/flows/aikit-advanced/steps/design/README.md +0 -178
- package/scaffold/flows/aikit-advanced/steps/execute/README.md +0 -145
- package/scaffold/flows/aikit-advanced/steps/plan/README.md +0 -122
- package/scaffold/flows/aikit-advanced/steps/spec/README.md +0 -121
- package/scaffold/flows/aikit-advanced/steps/task/README.md +0 -119
- package/scaffold/flows/aikit-advanced/steps/verify/README.md +0 -145
- package/scaffold/flows/aikit-basic/README.md +0 -51
- package/scaffold/flows/aikit-basic/flow.json +0 -45
- package/scaffold/flows/aikit-basic/steps/assess/README.md +0 -109
- package/scaffold/flows/aikit-basic/steps/design/README.md +0 -116
- package/scaffold/flows/aikit-basic/steps/implement/README.md +0 -131
- package/scaffold/flows/aikit-basic/steps/verify/README.md +0 -123
- package/scaffold/general/agents/Architect-Reviewer-Alpha.agent.md +0 -132
- package/scaffold/general/agents/Architect-Reviewer-Beta.agent.md +0 -132
- package/scaffold/general/agents/Code-Reviewer-Alpha.agent.md +0 -112
- package/scaffold/general/agents/Code-Reviewer-Beta.agent.md +0 -112
- package/scaffold/general/agents/Debugger.agent.md +0 -412
- package/scaffold/general/agents/Documenter.agent.md +0 -468
- package/scaffold/general/agents/Explorer.agent.md +0 -76
- package/scaffold/general/agents/Frontend.agent.md +0 -440
- package/scaffold/general/agents/Implementer.agent.md +0 -425
- package/scaffold/general/agents/Orchestrator.agent.md +0 -452
- package/scaffold/general/agents/Planner.agent.md +0 -481
- package/scaffold/general/agents/README.md +0 -57
- package/scaffold/general/agents/Refactor.agent.md +0 -435
- package/scaffold/general/agents/Researcher-Alpha.agent.md +0 -151
- package/scaffold/general/agents/Researcher-Beta.agent.md +0 -152
- package/scaffold/general/agents/Researcher-Delta.agent.md +0 -153
- package/scaffold/general/agents/Researcher-Gamma.agent.md +0 -152
- package/scaffold/general/agents/Security.agent.md +0 -433
- package/scaffold/general/agents/_shared/architect-reviewer-base.md +0 -104
- package/scaffold/general/agents/_shared/code-agent-base.md +0 -366
- package/scaffold/general/agents/_shared/code-reviewer-base.md +0 -87
- package/scaffold/general/agents/_shared/decision-protocol.md +0 -27
- package/scaffold/general/agents/_shared/forge-protocol.md +0 -90
- package/scaffold/general/agents/_shared/researcher-base.md +0 -114
- package/scaffold/general/agents/templates/adr-template.md +0 -28
- package/scaffold/general/agents/templates/execution-state.md +0 -26
- package/scaffold/general/prompts/aikit-ask.prompt.md +0 -13
- package/scaffold/general/prompts/aikit-debug.prompt.md +0 -15
- package/scaffold/general/prompts/aikit-design.prompt.md +0 -15
- package/scaffold/general/prompts/aikit-flow-add.prompt.md +0 -84
- package/scaffold/general/prompts/aikit-flow-create.prompt.md +0 -80
- package/scaffold/general/prompts/aikit-flow-manage.prompt.md +0 -24
- package/scaffold/general/prompts/aikit-implement.prompt.md +0 -17
- package/scaffold/general/prompts/aikit-plan.prompt.md +0 -15
- package/scaffold/general/prompts/aikit-review.prompt.md +0 -24
- package/scaffold/general/skills/adr-skill/SKILL.md +0 -335
- package/scaffold/general/skills/adr-skill/assets/templates/adr-madr.md +0 -89
- package/scaffold/general/skills/adr-skill/assets/templates/adr-readme.md +0 -20
- package/scaffold/general/skills/adr-skill/assets/templates/adr-simple.md +0 -46
- package/scaffold/general/skills/adr-skill/references/adr-conventions.md +0 -95
- package/scaffold/general/skills/adr-skill/references/examples.md +0 -193
- package/scaffold/general/skills/adr-skill/references/review-checklist.md +0 -77
- package/scaffold/general/skills/adr-skill/references/template-variants.md +0 -52
- package/scaffold/general/skills/adr-skill/scripts/bootstrap_adr.js +0 -259
- package/scaffold/general/skills/adr-skill/scripts/new_adr.js +0 -391
- package/scaffold/general/skills/adr-skill/scripts/set_adr_status.js +0 -169
- package/scaffold/general/skills/aikit/SKILL.md +0 -754
- package/scaffold/general/skills/brainstorming/SKILL.md +0 -265
- package/scaffold/general/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
- package/scaffold/general/skills/c4-architecture/SKILL.md +0 -389
- package/scaffold/general/skills/c4-architecture/references/advanced-patterns.md +0 -552
- package/scaffold/general/skills/c4-architecture/references/c4-syntax.md +0 -510
- package/scaffold/general/skills/c4-architecture/references/common-mistakes.md +0 -437
- package/scaffold/general/skills/c4-architecture/references/html-design-system.md +0 -337
- package/scaffold/general/skills/c4-architecture/references/html-template.html +0 -627
- package/scaffold/general/skills/docs/SKILL.md +0 -553
- package/scaffold/general/skills/docs/references/diataxis-anti-patterns.md +0 -147
- package/scaffold/general/skills/docs/references/diataxis-compass.md +0 -123
- package/scaffold/general/skills/docs/references/diataxis-quadrants.md +0 -192
- package/scaffold/general/skills/docs/references/diataxis-quality.md +0 -76
- package/scaffold/general/skills/docs/references/diataxis-templates.md +0 -120
- package/scaffold/general/skills/docs/references/flow-artifacts-guide.md +0 -70
- package/scaffold/general/skills/docs/references/project-knowledge-gotchas.md +0 -32
- package/scaffold/general/skills/docs/references/project-knowledge-templates.md +0 -281
- package/scaffold/general/skills/docs/references/project-knowledge-workflow.md +0 -80
- package/scaffold/general/skills/frontend-design/SKILL.md +0 -237
- package/scaffold/general/skills/lesson-learned/SKILL.md +0 -113
- package/scaffold/general/skills/lesson-learned/references/anti-patterns.md +0 -55
- package/scaffold/general/skills/lesson-learned/references/se-principles.md +0 -109
- package/scaffold/general/skills/multi-agents-development/SKILL.md +0 -448
- package/scaffold/general/skills/multi-agents-development/architecture-review-prompt.md +0 -81
- package/scaffold/general/skills/multi-agents-development/code-quality-review-prompt.md +0 -91
- package/scaffold/general/skills/multi-agents-development/implementer-prompt.md +0 -93
- package/scaffold/general/skills/multi-agents-development/parallel-dispatch-example.md +0 -167
- package/scaffold/general/skills/multi-agents-development/spec-review-prompt.md +0 -81
- package/scaffold/general/skills/present/SKILL.md +0 -616
- package/scaffold/general/skills/react/SKILL.md +0 -309
- package/scaffold/general/skills/repo-access/SKILL.md +0 -178
- package/scaffold/general/skills/repo-access/references/error-patterns.md +0 -116
- package/scaffold/general/skills/repo-access/references/platform-matrix.md +0 -142
- package/scaffold/general/skills/requirements-clarity/SKILL.md +0 -333
- package/scaffold/general/skills/session-handoff/SKILL.md +0 -199
- package/scaffold/general/skills/session-handoff/references/handoff-template.md +0 -139
- package/scaffold/general/skills/session-handoff/references/resume-checklist.md +0 -80
- package/scaffold/general/skills/session-handoff/scripts/check_staleness.js +0 -269
- package/scaffold/general/skills/session-handoff/scripts/create_handoff.js +0 -299
- package/scaffold/general/skills/session-handoff/scripts/list_handoffs.js +0 -113
- package/scaffold/general/skills/session-handoff/scripts/validate_handoff.js +0 -241
- package/scaffold/general/skills/typescript/SKILL.md +0 -405
- package/scaffold/generate.mjs +0 -82
|
@@ -0,0 +1,1429 @@
|
|
|
1
|
+
const e={_epilogue:[{file:`steps/docs-sync/README.md`,content:`# Epilogue: Documentation Sync
|
|
2
|
+
|
|
3
|
+
> **This is a mandatory epilogue step.** It runs automatically after every flow completes to keep project documentation synchronized with code changes.
|
|
4
|
+
|
|
5
|
+
## Objective
|
|
6
|
+
|
|
7
|
+
Review the changes made during this flow and update the \`docs/\` folder using AI Kit analysis tools — never write docs from scratch when a tool can generate the foundation.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
Load the \`docs\` skill before proceeding — it contains the full documentation convention, templates, architecture blueprint workflow, and change-to-doc mapping rules.
|
|
12
|
+
|
|
13
|
+
## Instructions
|
|
14
|
+
|
|
15
|
+
### 0. Gather Flow Artifacts
|
|
16
|
+
|
|
17
|
+
Read all artifacts produced during this flow — they contain design decisions, requirements, and verification results that are the most valuable documentation input.
|
|
18
|
+
|
|
19
|
+
\`\`\`
|
|
20
|
+
flow_status() # Get artifactsPath
|
|
21
|
+
find({ pattern: "*.md", path: "{{artifacts_path}}" }) # Discover all flow artifacts
|
|
22
|
+
digest({ sources: [ # Compress artifacts for context
|
|
23
|
+
{ path: "<found-artifact-1>" },
|
|
24
|
+
{ path: "<found-artifact-2>" },
|
|
25
|
+
...
|
|
26
|
+
]})
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
Map each discovered artifact to documentation actions using the artifact-to-doc mapping from the \`docs\` skill. Different flows produce different artifacts — read everything \`find()\` returns and focus on content that contains decisions, requirements, and verification results.
|
|
30
|
+
|
|
31
|
+
If no artifacts exist, proceed to Step 1 in source-only mode.
|
|
32
|
+
|
|
33
|
+
### 1. Assess Changes (tool-driven)
|
|
34
|
+
|
|
35
|
+
\`\`\`
|
|
36
|
+
git_context({}) # What changed in this flow
|
|
37
|
+
blast_radius({ changed_files: ["<changed-files>"] }) # Impact analysis — which modules affected
|
|
38
|
+
\`\`\`
|
|
39
|
+
|
|
40
|
+
Use the output to classify changes:
|
|
41
|
+
|
|
42
|
+
| Change Signal | Documentation Action |
|
|
43
|
+
|---------------|---------------------|
|
|
44
|
+
| New files in \`src/\` | Potential new component doc |
|
|
45
|
+
| Modified API surface | Update reference docs |
|
|
46
|
+
| New package or module boundary | Update architecture overview |
|
|
47
|
+
| Architecture decision made | Delegate to \`adr-skill\` |
|
|
48
|
+
| Test-only or config-only changes | Likely skip |
|
|
49
|
+
|
|
50
|
+
### 2. Apply the Change-to-Doc Mapping
|
|
51
|
+
|
|
52
|
+
Follow the decision tree from the \`docs\` skill to determine which documentation actions are needed.
|
|
53
|
+
|
|
54
|
+
### 3. Bootstrap \`docs/\` If Needed (full tool-driven workflow)
|
|
55
|
+
|
|
56
|
+
If \`docs/\` doesn't exist, run the **Architecture Blueprint Workflow** from the \`docs\` skill:
|
|
57
|
+
|
|
58
|
+
\`\`\`
|
|
59
|
+
# Step 1: Generate content with AI Kit tools
|
|
60
|
+
produce_knowledge({ path: "." }) # → Foundation for docs/README.md
|
|
61
|
+
analyze_structure({ path: "." }) # → docs/architecture/overview.md structure
|
|
62
|
+
analyze_diagram({ path: "." }) # → docs/architecture/ Mermaid diagrams
|
|
63
|
+
analyze_dependencies({ path: "." }) # → docs/architecture/overview.md deps section
|
|
64
|
+
analyze_entry_points({ path: "." }) # → docs/reference/api.md foundation
|
|
65
|
+
analyze_patterns({ path: "." }) # → docs/architecture/overview.md patterns
|
|
66
|
+
|
|
67
|
+
# Step 2: Create the docs/ tree from tool outputs
|
|
68
|
+
docs/
|
|
69
|
+
├── README.md ← From produce_knowledge + project context
|
|
70
|
+
├── architecture/
|
|
71
|
+
│ ├── overview.md ← From analyze_structure + analyze_dependencies + analyze_diagram
|
|
72
|
+
│ └── components/ ← From analyze_symbols per major component
|
|
73
|
+
├── decisions/
|
|
74
|
+
│ └── index.md ← ADR log (delegate to adr-skill)
|
|
75
|
+
├── guides/
|
|
76
|
+
│ └── testing.md ← From analyze_patterns test info
|
|
77
|
+
└── reference/
|
|
78
|
+
└── api.md ← From analyze_entry_points
|
|
79
|
+
\`\`\`
|
|
80
|
+
|
|
81
|
+
Use the Architecture Blueprint sections from the \`docs\` skill as the template for each document.
|
|
82
|
+
|
|
83
|
+
### 4. Update Existing Docs (tool-assisted)
|
|
84
|
+
|
|
85
|
+
When \`docs/\` already exists:
|
|
86
|
+
|
|
87
|
+
\`\`\`
|
|
88
|
+
compact({ path: "docs/architecture/overview.md", query: "section to update" }) # Read target section
|
|
89
|
+
blast_radius({ changed_files: ["<files>"] }) # What's affected
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
- **Don't rewrite** — update the relevant sections of existing docs
|
|
93
|
+
- **Don't duplicate** — if the information is in code comments or READMEs, reference it
|
|
94
|
+
- Use \`compact\` to read existing doc sections before editing
|
|
95
|
+
- Use \`blast_radius\` output to determine which sections need updating
|
|
96
|
+
|
|
97
|
+
### 5. Delegate When Appropriate
|
|
98
|
+
|
|
99
|
+
- Architecture decisions → \`adr-skill\` → \`docs/decisions/\`
|
|
100
|
+
- Architecture diagrams → \`c4-architecture\` skill → \`docs/architecture/\`
|
|
101
|
+
- Full architecture refresh → Run the Architecture Blueprint Workflow from \`docs\` skill
|
|
102
|
+
|
|
103
|
+
### 6. Update Index
|
|
104
|
+
|
|
105
|
+
If documents were added, removed, or renamed, update \`docs/README.md\` to reflect the current structure.
|
|
106
|
+
|
|
107
|
+
### 7. Skip If Nothing Changed
|
|
108
|
+
|
|
109
|
+
If the flow's changes don't warrant doc updates (e.g., pure bug fix with no revelations), report:
|
|
110
|
+
- "No documentation updates needed"
|
|
111
|
+
- Reason: (brief explanation)
|
|
112
|
+
|
|
113
|
+
## Completion Criteria
|
|
114
|
+
|
|
115
|
+
- [ ] \`git_context\` + \`blast_radius\` used to assess changes
|
|
116
|
+
- [ ] Change-to-doc mapping applied from \`docs\` skill
|
|
117
|
+
- [ ] \`docs/\` bootstrapped with tool outputs if it didn't exist
|
|
118
|
+
- [ ] Relevant docs created or updated (or skipped with reason)
|
|
119
|
+
- [ ] \`docs/README.md\` index is current
|
|
120
|
+
- [ ] No placeholder/empty docs created — all content tool-generated or hand-written with purpose`}],"aikit-advanced":[{file:`README.md`,content:"# aikit:advanced — Full Development Flow\n\nFull development flow for **new features, API design, and architecture changes**.\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 | **Specification** | `steps/spec/README.md` | `spec.md` | `design-decisions.md` | Researcher-Alpha |\n| 3 | **Planning** | `steps/plan/README.md` | `plan.md` | `spec.md` | Planner, Explorer |\n| 4 | **Task Breakdown** | `steps/task/README.md` | `tasks.md` | `plan.md` | Planner, Architect-Reviewer-Alpha |\n| 5 | **Execution** | `steps/execute/README.md` | `progress.md` | `tasks.md` | Orchestrator, Implementer, Frontend, Refactor |\n| 6 | **Verification** | `steps/verify/README.md` | `verify-report.md` | `progress.md` | Code-Reviewer-Alpha/Beta, Architect-Reviewer-Alpha/Beta, Security |\n\n## How It Works\n\nEach step has a **README.md** file that contains the detailed instructions for the agent(s) executing that step. The Orchestrator reads the README.md via `flow_read_instruction` and delegates work accordingly.\n\n### Step 1: Design Gate\n- Full brainstorming session for new features and architectural changes\n- FORGE classification (`forge_classify`) + grounding (`forge_ground`) for complex tasks\n- Parallel 4-researcher decision protocol for non-trivial technical decisions\n- ADR generation for critical-tier tasks\n- **Mandatory user stop** before proceeding — design decisions must be approved\n- Read `steps/design/README.md` for the full protocol\n\n### Step 2: Specification\n- Elicit requirements from the user, clarify scope\n- Define acceptance criteria and constraints\n- Build on design decisions from the previous step\n\n### Step 3: Planning\n- Deep codebase analysis using `search`, `scope_map`, `trace`, `analyze_*`\n- Design architecture based on spec and design decisions\n- Create comprehensive implementation plan with file-level changes\n\n### Step 4: Task Breakdown\n- Break the plan into ordered, atomic implementation tasks\n- Define dependencies between tasks\n- Identify parallel batches for multi-agent execution\n- Architecture review of the task structure\n\n### Step 5: Execution\n- Orchestrator dispatches agents in parallel batches per the task breakdown\n- Each agent gets a scoped task (1-3 files) with clear acceptance criteria\n- TDD: write tests first, then implement\n- Per-batch review cycle: Code Review (dual) → Arch Review → Security → Evidence Gate\n\n### Step 6: Verification\n- Dual code review (Code-Reviewer-Alpha + Beta)\n- Architecture review (Architect-Reviewer-Alpha + Beta)\n- Security review\n- Run `check({})` + `test_run({})` + `blast_radius({})`\n- `evidence_map({ action: \"gate\" })` for final quality gate\n\n## Using Skills Inside Steps\n\nWhen the Orchestrator activates a step:\n\n1. **Read the instruction first** — `flow_read_instruction` returns the README.md for the current step\n2. **Follow step instructions** — the README.md is the primary guide for what to do\n3. **Delegate to listed agents** — each step lists which agents are appropriate\n4. **Produce the required artifact** — the step's `produces` field specifies what file to create in the artifacts directory\n5. **Check dependencies** — the step's `requires` field lists artifacts from previous steps that must exist\n6. **Report status** — agents report `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED` to the Orchestrator\n\n## Artifacts\n\nAll artifacts are stored in the run directory under `.flows/{topic}/`. The template variable `{{artifacts_path}}` resolves to the actual path at runtime.\n"},{file:`steps/design/README.md`,content:`# Design Gate — Advanced Flow
|
|
121
|
+
|
|
122
|
+
Full design gate for new features, API design, and architecture changes. Runs brainstorming, decision protocol, and FORGE classification before specification begins.
|
|
123
|
+
|
|
124
|
+
## When This Step Runs
|
|
125
|
+
|
|
126
|
+
This is the **first step** of the \`aikit:advanced\` flow. It runs before specification.
|
|
127
|
+
|
|
128
|
+
## Instructions
|
|
129
|
+
|
|
130
|
+
### 1. Task Classification
|
|
131
|
+
|
|
132
|
+
Classify the task:
|
|
133
|
+
|
|
134
|
+
| Category | Indicators | Action |
|
|
135
|
+
|----------|-----------|--------|
|
|
136
|
+
| **Bug fix** | Error, regression, "fix" — wrong flow, should use \`aikit:basic\` | → Note mismatch, still run Quick Design |
|
|
137
|
+
| **New feature** | New behavior, new API, new component | → Run **Full Design** below |
|
|
138
|
+
| **Architecture change** | Restructure, migration, new pattern, cross-cutting | → Run **Full Design** with architecture focus |
|
|
139
|
+
|
|
140
|
+
### 2. FORGE Classification
|
|
141
|
+
|
|
142
|
+
Run \`forge_classify({ task: "<task description>", files: [<relevant files>] })\` to determine the complexity tier.
|
|
143
|
+
|
|
144
|
+
| Tier | Meaning | Design Depth |
|
|
145
|
+
|------|---------|-------------|
|
|
146
|
+
| **Floor** | Low risk, well-understood | Quick brainstorm, 1-2 decisions |
|
|
147
|
+
| **Standard** | Moderate complexity | Full brainstorm, parallel research, decision protocol |
|
|
148
|
+
| **Critical** | High risk, contract/security implications | Deep brainstorm, 4-researcher parallel review, ADR required |
|
|
149
|
+
|
|
150
|
+
### 3. Brainstorming Session
|
|
151
|
+
|
|
152
|
+
Load the \`brainstorming\` skill and conduct a structured brainstorming session:
|
|
153
|
+
|
|
154
|
+
1. **Intent Discovery** — What is the user trying to achieve? What problem does this solve?
|
|
155
|
+
2. **Constraint Mapping** — Technical constraints, time constraints, compatibility requirements
|
|
156
|
+
3. **Approach Exploration** — Generate 2-4 possible approaches
|
|
157
|
+
4. **Trade-off Analysis** — Compare approaches on: complexity, maintainability, performance, risk
|
|
158
|
+
|
|
159
|
+
For **Critical** tier tasks, also explore:
|
|
160
|
+
- Security implications
|
|
161
|
+
- Backward compatibility
|
|
162
|
+
- Migration path
|
|
163
|
+
- Rollback strategy
|
|
164
|
+
|
|
165
|
+
### 4. Decision Protocol (Standard & Critical tiers)
|
|
166
|
+
|
|
167
|
+
When technical decisions need resolution:
|
|
168
|
+
|
|
169
|
+
1. **Identify decisions** — List each decision point with 2+ viable options
|
|
170
|
+
2. **Parallel research** — Delegate to Researcher agents (2 for Standard, 4 for Critical):
|
|
171
|
+
- Researcher-Alpha: Deep analysis of primary approach
|
|
172
|
+
- Researcher-Beta: Trade-offs and edge cases of alternatives
|
|
173
|
+
- Researcher-Gamma: Cross-domain patterns and precedents
|
|
174
|
+
- Researcher-Delta: Feasibility and performance implications
|
|
175
|
+
3. **Synthesize** — Combine researcher findings into a recommendation per decision
|
|
176
|
+
4. **ADR** (Critical tier) — Load \`adr-skill\` and create an Architecture Decision Record
|
|
177
|
+
|
|
178
|
+
### 5. FORGE Ground (Standard & Critical tiers)
|
|
179
|
+
|
|
180
|
+
Run \`forge_ground({ task, root_path: "." })\` to:
|
|
181
|
+
- Scope the affected files and modules
|
|
182
|
+
- Identify unknowns and risks
|
|
183
|
+
- Load existing constraints and conventions
|
|
184
|
+
|
|
185
|
+
**Auto-upgrade check**: If \`forge_ground\` reveals contract-type unknowns or security concerns not caught by initial \`forge_classify\`, recommend tier upgrade.
|
|
186
|
+
|
|
187
|
+
### 6. Write \`{{artifacts_path}}/design-decisions.md\` to disk
|
|
188
|
+
|
|
189
|
+
**You MUST create this file on disk** using \`create_file\` or equivalent — do not just present content in chat.
|
|
190
|
+
|
|
191
|
+
\`\`\`markdown
|
|
192
|
+
## Design Decisions
|
|
193
|
+
|
|
194
|
+
### FORGE Assessment
|
|
195
|
+
- **Tier**: {Floor | Standard | Critical}
|
|
196
|
+
- **Rationale**: {why this tier}
|
|
197
|
+
- **Auto-upgrade**: {yes/no — if yes, explain}
|
|
198
|
+
|
|
199
|
+
### Task Summary
|
|
200
|
+
- **Goal**: {what we're building}
|
|
201
|
+
- **Problem**: {what problem this solves}
|
|
202
|
+
- **Users affected**: {who is impacted}
|
|
203
|
+
|
|
204
|
+
### Approach
|
|
205
|
+
- **Chosen approach**: {description}
|
|
206
|
+
- **Alternatives considered**: {list with reasons for rejection}
|
|
207
|
+
|
|
208
|
+
### Key Decisions
|
|
209
|
+
| # | Decision | Choice | Rationale |
|
|
210
|
+
|---|----------|--------|-----------|
|
|
211
|
+
| 1 | {decision} | {choice} | {why} |
|
|
212
|
+
|
|
213
|
+
### Constraints
|
|
214
|
+
- {constraint 1}
|
|
215
|
+
- {constraint 2}
|
|
216
|
+
|
|
217
|
+
### Risks
|
|
218
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
219
|
+
|------|-----------|--------|------------|
|
|
220
|
+
| {risk} | {L/M/H} | {L/M/H} | {mitigation} |
|
|
221
|
+
|
|
222
|
+
### Open Questions
|
|
223
|
+
- {question 1}
|
|
224
|
+
- {question 2}
|
|
225
|
+
\`\`\`
|
|
226
|
+
|
|
227
|
+
### 7. Present to User
|
|
228
|
+
|
|
229
|
+
Use \`present({ format: "html" })\` (or \`format: "browser"\` in CLI mode) to show:
|
|
230
|
+
- Design decisions summary
|
|
231
|
+
- FORGE tier and rationale
|
|
232
|
+
- Key trade-offs
|
|
233
|
+
- Open questions requiring user input
|
|
234
|
+
|
|
235
|
+
**🛑 MANDATORY STOP** — Wait for user approval of design decisions before proceeding.
|
|
236
|
+
|
|
237
|
+
### 8. Report to Orchestrator
|
|
238
|
+
|
|
239
|
+
After user approves:
|
|
240
|
+
- \`DONE\` — design decisions approved, ready for specification
|
|
241
|
+
- \`DONE_WITH_CONCERNS\` — approved with caveats (list them)
|
|
242
|
+
- \`NEEDS_CONTEXT\` — user raised questions that need more research
|
|
243
|
+
|
|
244
|
+
**Do NOT call \`flow_step\`** — let the Orchestrator advance the flow.
|
|
245
|
+
|
|
246
|
+
## Outputs
|
|
247
|
+
|
|
248
|
+
Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat. This file is a prerequisite for the next step.
|
|
249
|
+
|
|
250
|
+
## Produces
|
|
251
|
+
|
|
252
|
+
- \`{{artifacts_path}}/design-decisions.md\` — FORGE tier, approach, key decisions, constraints, risks
|
|
253
|
+
|
|
254
|
+
## Agents
|
|
255
|
+
|
|
256
|
+
- \`Researcher-Alpha\` — Deep analysis of primary approach
|
|
257
|
+
- \`Researcher-Beta\` — Trade-offs and edge cases
|
|
258
|
+
- \`Researcher-Gamma\` — Cross-domain patterns
|
|
259
|
+
- \`Researcher-Delta\` — Feasibility and performance
|
|
260
|
+
|
|
261
|
+
## Foundation Integration
|
|
262
|
+
|
|
263
|
+
Load these skills BEFORE executing this step:
|
|
264
|
+
|
|
265
|
+
| Skill | Purpose | When |
|
|
266
|
+
|-------|---------|------|
|
|
267
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
268
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
269
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
270
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
271
|
+
| \`c4-architecture\` | C4 model diagrams showing system structure changes | When visualizing proposed architecture |
|
|
272
|
+
| \`adr-skill\` | Architecture Decision Records for non-trivial decisions | Critical tier — document architecture decisions |
|
|
273
|
+
|
|
274
|
+
### Presentation Rules
|
|
275
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
276
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
277
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
278
|
+
- Artifact content and summaries → present with structured layout
|
|
279
|
+
- Only use plain text for brief confirmations and simple questions
|
|
280
|
+
|
|
281
|
+
## Completion Criteria
|
|
282
|
+
|
|
283
|
+
- [ ] \`{{artifacts_path}}/design-decisions.md\` written to disk (NOT just presented in chat)
|
|
284
|
+
- [ ] FORGE tier determined and documented
|
|
285
|
+
- [ ] Brainstorming session completed (for Standard+ tier)
|
|
286
|
+
- [ ] Key design decisions documented with rationale
|
|
287
|
+
- [ ] User approval received (🛑 MANDATORY STOP)
|
|
288
|
+
|
|
289
|
+
## Knowledge Capture
|
|
290
|
+
|
|
291
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
292
|
+
|
|
293
|
+
- **Design decisions**: Chosen approach and alternatives considered with trade-offs
|
|
294
|
+
- **Architecture patterns**: New patterns introduced or existing patterns that must be followed
|
|
295
|
+
- **Constraints discovered**: Technical limitations, compatibility requirements, or performance boundaries
|
|
296
|
+
|
|
297
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
298
|
+
`},{file:`steps/execute/README.md`,content:`---
|
|
299
|
+
name: execute
|
|
300
|
+
description: Implement all tasks from the task breakdown, dispatching agents in parallel where possible.
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
# Execution
|
|
304
|
+
|
|
305
|
+
## Prerequisites Check
|
|
306
|
+
|
|
307
|
+
Before starting this step, verify:
|
|
308
|
+
- [ ] Task breakdown approved with valid task graph
|
|
309
|
+
- [ ] \`{{artifacts_path}}/tasks.md\` exists with defined batches and dependencies
|
|
310
|
+
|
|
311
|
+
If prerequisites are NOT met -> **backtrack to task step** (\`flow_step({ action: 'redo' })\` on previous step)
|
|
312
|
+
|
|
313
|
+
## Purpose
|
|
314
|
+
|
|
315
|
+
Execute all tasks from the breakdown, dispatching implementation agents in batches for maximum parallelism while maintaining correctness.
|
|
316
|
+
|
|
317
|
+
## Inputs
|
|
318
|
+
|
|
319
|
+
- \`{{artifacts_path}}/tasks.md\` — the atomic task list with dependencies and agent assignments
|
|
320
|
+
|
|
321
|
+
## Process
|
|
322
|
+
|
|
323
|
+
1. **Load tasks** — Read task graph, dependencies, and parallelism map
|
|
324
|
+
2. **Execute by batch** — For each batch in the parallelism map:
|
|
325
|
+
a. Dispatch assigned agents in parallel (different files = safe parallelism)
|
|
326
|
+
b. Each agent receives: task scope, affected files, acceptance criteria, relevant code context via \`compact()\`/\`digest()\`
|
|
327
|
+
c. Wait for all agents in batch to complete
|
|
328
|
+
d. Run \`check({})\` + \`test_run({})\` after each batch
|
|
329
|
+
e. Fix any failures before proceeding to next batch
|
|
330
|
+
3. **Track progress** — Update task checkboxes as each completes
|
|
331
|
+
4. **Handle failures** — If an agent reports \`BLOCKED\` or \`NEEDS_CONTEXT\`:
|
|
332
|
+
- Max 2 retries per task with refined context
|
|
333
|
+
- If still blocked, escalate to user
|
|
334
|
+
5. **Final validation** — After all batches: \`check({})\` + \`test_run({})\` must pass
|
|
335
|
+
|
|
336
|
+
## Outputs
|
|
337
|
+
|
|
338
|
+
Write \`{{artifacts_path}}/progress.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat.
|
|
339
|
+
|
|
340
|
+
Template:
|
|
341
|
+
|
|
342
|
+
\`\`\`markdown
|
|
343
|
+
# Execution Progress: <feature title>
|
|
344
|
+
|
|
345
|
+
## Task Status
|
|
346
|
+
- [x] T1.1: <description> — DONE
|
|
347
|
+
- [x] T1.2: <description> — DONE
|
|
348
|
+
- [x] T2.1: <description> — DONE
|
|
349
|
+
- [ ] T2.2: <description> — IN PROGRESS
|
|
350
|
+
...
|
|
351
|
+
|
|
352
|
+
## Changes Made
|
|
353
|
+
| File | Change | Task |
|
|
354
|
+
|------|--------|------|
|
|
355
|
+
| <file> | <description> | T1.1 |
|
|
356
|
+
| ... | ... | ... |
|
|
357
|
+
|
|
358
|
+
## Tests Added/Modified
|
|
359
|
+
<list of test files and what they cover>
|
|
360
|
+
|
|
361
|
+
## Validation
|
|
362
|
+
- check: PASS/FAIL
|
|
363
|
+
- test_run: PASS/FAIL (<N> passed, <M> failed)
|
|
364
|
+
|
|
365
|
+
## Deviations
|
|
366
|
+
<any changes from the task plan and why>
|
|
367
|
+
|
|
368
|
+
## Blocked Items
|
|
369
|
+
<items that needed user intervention, if any>
|
|
370
|
+
\`\`\`
|
|
371
|
+
|
|
372
|
+
## Agents
|
|
373
|
+
|
|
374
|
+
| Agent | Role |
|
|
375
|
+
|-------|------|
|
|
376
|
+
| **Orchestrator** | Coordinates batch execution, handles failures and retries |
|
|
377
|
+
| **Implementer** | Primary code writer for backend, logic, and infrastructure tasks |
|
|
378
|
+
| **Frontend** | UI/UX implementation for React components, styling, responsive design |
|
|
379
|
+
| **Refactor** | Code cleanup, restructuring, and pattern alignment tasks |
|
|
380
|
+
|
|
381
|
+
**Parallelism rules**:
|
|
382
|
+
- Read-only agents: unlimited parallelism
|
|
383
|
+
- File-modifying agents: parallel ONLY on completely different files
|
|
384
|
+
- Max 4 concurrent file-modifying agents
|
|
385
|
+
|
|
386
|
+
## Foundation Integration
|
|
387
|
+
|
|
388
|
+
Load these skills BEFORE executing this step:
|
|
389
|
+
|
|
390
|
+
| Skill | Purpose | When |
|
|
391
|
+
|-------|---------|------|
|
|
392
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
393
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
394
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
395
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
396
|
+
| \`session-handoff\` | Context preservation for long-running execution phases | When execution spans multiple sessions or context is filling |
|
|
397
|
+
|
|
398
|
+
### Presentation Rules
|
|
399
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
400
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
401
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
402
|
+
- Artifact content and summaries → present with structured layout
|
|
403
|
+
- Only use plain text for brief confirmations and simple questions
|
|
404
|
+
|
|
405
|
+
### Orchestrator Dispatch Protocol
|
|
406
|
+
|
|
407
|
+
Follow the \`multi-agents-development\` skill patterns for dispatch:
|
|
408
|
+
|
|
409
|
+
1. **Independence Check** before parallelizing:
|
|
410
|
+
- Same files? → sequential
|
|
411
|
+
- Shared mutable state? → sequential
|
|
412
|
+
- Execution-order dependent? → sequential
|
|
413
|
+
- Need shared new types? → define contract first, then parallel
|
|
414
|
+
- All clear? → **parallel dispatch**
|
|
415
|
+
|
|
416
|
+
2. **Subagent Context Template** (each dispatch includes):
|
|
417
|
+
- **Scope**: exact files + boundary (do NOT touch)
|
|
418
|
+
- **Goal**: acceptance criteria, testable
|
|
419
|
+
- **Arch Context**: actual code snippets via \`compact()\`/\`digest()\`
|
|
420
|
+
- **Constraints**: patterns, conventions, anti-patterns
|
|
421
|
+
- **Self-Review**: checklist before declaring DONE
|
|
422
|
+
|
|
423
|
+
3. **Status Protocol**: \`DONE\` | \`DONE_WITH_CONCERNS\` | \`NEEDS_CONTEXT\` | \`BLOCKED\`
|
|
424
|
+
4. **Max 2 retries** per task — then escalate to user
|
|
425
|
+
|
|
426
|
+
## Completion Criteria
|
|
427
|
+
|
|
428
|
+
- [ ] All tasks marked completed
|
|
429
|
+
- [ ] \`check({})\` passes
|
|
430
|
+
- [ ] \`test_run({})\` passes
|
|
431
|
+
- [ ] No blocked items remaining
|
|
432
|
+
- [ ] \`{{artifacts_path}}/progress.md\` written
|
|
433
|
+
|
|
434
|
+
## Knowledge Capture
|
|
435
|
+
|
|
436
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
437
|
+
|
|
438
|
+
- **Implementation decisions**: Why specific approaches were chosen over alternatives
|
|
439
|
+
- **Patterns established**: New conventions or patterns that future code should follow
|
|
440
|
+
- **Gotchas encountered**: Edge cases, workarounds, or non-obvious behaviors discovered during execution
|
|
441
|
+
|
|
442
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
443
|
+
`},{file:`steps/plan/README.md`,content:`---
|
|
444
|
+
name: plan
|
|
445
|
+
description: Analyze the codebase, design the architecture, and create a detailed implementation plan.
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
# Planning
|
|
449
|
+
|
|
450
|
+
## Prerequisites Check
|
|
451
|
+
|
|
452
|
+
Before starting this step, verify:
|
|
453
|
+
- [ ] Specification approved with clarity score ≥90
|
|
454
|
+
- [ ] \`{{artifacts_path}}/spec.md\` exists and is complete
|
|
455
|
+
|
|
456
|
+
If prerequisites are NOT met → **backtrack to spec step** (\`flow_step({ action: 'redo' })\` on previous step)
|
|
457
|
+
|
|
458
|
+
## Purpose
|
|
459
|
+
|
|
460
|
+
Translate the specification into a concrete, phased implementation plan with architecture decisions, file-level scope, and dependency ordering.
|
|
461
|
+
|
|
462
|
+
## Inputs
|
|
463
|
+
|
|
464
|
+
- \`{{artifacts_path}}/spec.md\` — the validated specification
|
|
465
|
+
|
|
466
|
+
## Process
|
|
467
|
+
|
|
468
|
+
1. **Load spec** — Read and internalize all requirements and acceptance criteria
|
|
469
|
+
2. **Codebase analysis** — \`scope_map({ task: "<feature>" })\` to identify affected subsystems
|
|
470
|
+
3. **Deep dive** — \`file_summary()\` + \`compact()\` on each affected module
|
|
471
|
+
4. **Architecture design** — Decide on:
|
|
472
|
+
- Where new code lives (new files vs extensions)
|
|
473
|
+
- API surface changes
|
|
474
|
+
- Data model changes
|
|
475
|
+
- Integration patterns
|
|
476
|
+
5. **ADR for non-trivial decisions** — Use \`adr-skill\` for decisions that affect future development
|
|
477
|
+
6. **Phase decomposition** — Break work into 3–10 ordered phases, each independently testable
|
|
478
|
+
7. **Dependency graph** — Map which phases depend on others and which can parallelize
|
|
479
|
+
8. **Risk assessment** — Identify implementation risks per phase
|
|
480
|
+
|
|
481
|
+
## Outputs
|
|
482
|
+
|
|
483
|
+
Write \`{{artifacts_path}}/plan.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat.
|
|
484
|
+
|
|
485
|
+
Template:
|
|
486
|
+
|
|
487
|
+
\`\`\`markdown
|
|
488
|
+
# Implementation Plan: <feature title>
|
|
489
|
+
|
|
490
|
+
## Architecture Overview
|
|
491
|
+
<high-level design with rationale>
|
|
492
|
+
|
|
493
|
+
## Affected Modules
|
|
494
|
+
| Module | Changes | Risk |
|
|
495
|
+
|--------|---------|------|
|
|
496
|
+
| <module> | <what changes> | low/medium/high |
|
|
497
|
+
|
|
498
|
+
## Phases
|
|
499
|
+
### Phase 1: <name>
|
|
500
|
+
- **Files**: <list>
|
|
501
|
+
- **Changes**: <description>
|
|
502
|
+
- **Tests**: <what to test>
|
|
503
|
+
- **Depends on**: none
|
|
504
|
+
- **Parallelizable with**: Phase 2
|
|
505
|
+
|
|
506
|
+
### Phase 2: <name>
|
|
507
|
+
...
|
|
508
|
+
|
|
509
|
+
## Architecture Decisions
|
|
510
|
+
- ADR-<N>: <title> — <chosen option and rationale>
|
|
511
|
+
|
|
512
|
+
## Risks
|
|
513
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
514
|
+
|------|-----------|--------|------------|
|
|
515
|
+
| <risk> | low/medium/high | <impact> | <mitigation> |
|
|
516
|
+
\`\`\`
|
|
517
|
+
|
|
518
|
+
## Agents
|
|
519
|
+
|
|
520
|
+
| Agent | Role |
|
|
521
|
+
|-------|------|
|
|
522
|
+
| **Planner** | Creates comprehensive TDD implementation plans with phase decomposition |
|
|
523
|
+
| **Explorer** | Rapid codebase exploration for discovery of affected files and dependencies |
|
|
524
|
+
|
|
525
|
+
Use Explorer for initial breadth (file discovery, dependency tracing), then Planner for depth (phase design, ordering).
|
|
526
|
+
|
|
527
|
+
## Foundation Integration
|
|
528
|
+
|
|
529
|
+
Load these skills BEFORE executing this step:
|
|
530
|
+
|
|
531
|
+
| Skill | Purpose | When |
|
|
532
|
+
|-------|---------|------|
|
|
533
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
534
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
535
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
536
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
537
|
+
| \`adr-skill\` | Architecture Decision Records for non-trivial technical decisions | When plan involves architecture choices that need documentation |
|
|
538
|
+
| \`c4-architecture\` | C4 model diagrams showing system structure changes | When plan modifies system architecture |
|
|
539
|
+
|
|
540
|
+
### Presentation Rules
|
|
541
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
542
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
543
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
544
|
+
- Artifact content and summaries → present with structured layout
|
|
545
|
+
- Only use plain text for brief confirmations and simple questions
|
|
546
|
+
|
|
547
|
+
## Completion Criteria
|
|
548
|
+
|
|
549
|
+
- [ ] All spec requirements have corresponding plan phases
|
|
550
|
+
- [ ] Each phase has explicit file scope and test strategy
|
|
551
|
+
- [ ] Architecture decisions documented with rationale
|
|
552
|
+
- [ ] Dependency graph has no circular dependencies
|
|
553
|
+
- [ ] Risks identified with mitigations
|
|
554
|
+
- [ ] \`{{artifacts_path}}/plan.md\` written
|
|
555
|
+
|
|
556
|
+
## Knowledge Capture
|
|
557
|
+
|
|
558
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
559
|
+
|
|
560
|
+
- **Task dependencies**: Critical ordering constraints and parallel opportunities
|
|
561
|
+
- **Risk assessment**: Identified risks and mitigation strategies
|
|
562
|
+
- **Resource decisions**: File ownership, module boundaries, and integration points
|
|
563
|
+
|
|
564
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
565
|
+
`},{file:`steps/spec/README.md`,content:`---
|
|
566
|
+
name: spec
|
|
567
|
+
description: Elicit requirements, clarify scope, and define acceptance criteria through structured dialogue.
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
# Specification
|
|
571
|
+
|
|
572
|
+
## Prerequisites Check
|
|
573
|
+
|
|
574
|
+
Before starting this step, verify:
|
|
575
|
+
- [ ] Design decisions approved (design-decisions.md exists with user approval)
|
|
576
|
+
- [ ] FORGE tier assigned and documented
|
|
577
|
+
|
|
578
|
+
If prerequisites are NOT met -> **backtrack to design step** (\`flow_step({ action: 'redo' })\` on previous step)
|
|
579
|
+
|
|
580
|
+
## Purpose
|
|
581
|
+
|
|
582
|
+
Transform a vague or broad feature request into a precise, testable specification through requirements elicitation and stakeholder dialogue.
|
|
583
|
+
|
|
584
|
+
## Inputs
|
|
585
|
+
|
|
586
|
+
- User's feature request, issue, or idea
|
|
587
|
+
- Codebase context (accessed via aikit MCP tools)
|
|
588
|
+
|
|
589
|
+
## Process
|
|
590
|
+
|
|
591
|
+
1. **Understand intent** — Parse what the user wants and why
|
|
592
|
+
2. **Search for context** — \`search()\` for related prior decisions, existing patterns, and similar features
|
|
593
|
+
3. **Elicit requirements** — Ask structured questions to clarify:
|
|
594
|
+
- **Functional**: What must the system do?
|
|
595
|
+
- **Non-functional**: Performance, security, accessibility constraints
|
|
596
|
+
- **Scope boundaries**: What is explicitly out of scope?
|
|
597
|
+
- **Acceptance criteria**: How do we know it's done?
|
|
598
|
+
4. **Score clarity** — Use the \`requirements-clarity\` skill to score 0–100. Iterate questions until ≥ 90.
|
|
599
|
+
5. **Draft specification** — Write formal spec with all requirements resolved
|
|
600
|
+
|
|
601
|
+
## Outputs
|
|
602
|
+
|
|
603
|
+
Write \`{{artifacts_path}}/spec.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat.
|
|
604
|
+
|
|
605
|
+
Template:
|
|
606
|
+
|
|
607
|
+
\`\`\`markdown
|
|
608
|
+
# Specification: <feature title>
|
|
609
|
+
|
|
610
|
+
## Summary
|
|
611
|
+
<1-2 sentence description>
|
|
612
|
+
|
|
613
|
+
## Motivation
|
|
614
|
+
<why this feature is needed>
|
|
615
|
+
|
|
616
|
+
## Functional Requirements
|
|
617
|
+
1. <requirement with acceptance criterion>
|
|
618
|
+
2. ...
|
|
619
|
+
|
|
620
|
+
## Non-Functional Requirements
|
|
621
|
+
- Performance: <constraints>
|
|
622
|
+
- Security: <constraints>
|
|
623
|
+
- Accessibility: <constraints>
|
|
624
|
+
|
|
625
|
+
## Scope
|
|
626
|
+
### In Scope
|
|
627
|
+
- <item>
|
|
628
|
+
|
|
629
|
+
### Out of Scope
|
|
630
|
+
- <item>
|
|
631
|
+
|
|
632
|
+
## Acceptance Criteria
|
|
633
|
+
- [ ] <testable criterion>
|
|
634
|
+
- [ ] ...
|
|
635
|
+
|
|
636
|
+
## Open Questions
|
|
637
|
+
<none — all resolved during elicitation>
|
|
638
|
+
|
|
639
|
+
## Clarity Score: <N>/100
|
|
640
|
+
\`\`\`
|
|
641
|
+
|
|
642
|
+
## Agents
|
|
643
|
+
|
|
644
|
+
| Agent | Role |
|
|
645
|
+
|-------|------|
|
|
646
|
+
| **Researcher-Alpha** | Deep analysis of existing codebase patterns, prior decisions, and technical constraints |
|
|
647
|
+
|
|
648
|
+
Use the \`brainstorming\` skill for creative/design exploration before formalizing requirements. Use \`requirements-clarity\` skill to score and iterate until the spec is unambiguous.
|
|
649
|
+
|
|
650
|
+
## Foundation Integration
|
|
651
|
+
|
|
652
|
+
Load these skills BEFORE executing this step:
|
|
653
|
+
|
|
654
|
+
| Skill | Purpose | When |
|
|
655
|
+
|-------|---------|------|
|
|
656
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
657
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
658
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
659
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
660
|
+
| \`requirements-clarity\` | Score requirements 0-100, iterate until ≥90 before proceeding | Before writing spec — ensures requirements are clear enough |
|
|
661
|
+
|
|
662
|
+
### Presentation Rules
|
|
663
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
664
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
665
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
666
|
+
- Artifact content and summaries → present with structured layout
|
|
667
|
+
- Only use plain text for brief confirmations and simple questions
|
|
668
|
+
|
|
669
|
+
## Completion Criteria
|
|
670
|
+
|
|
671
|
+
- [ ] All functional requirements have acceptance criteria
|
|
672
|
+
- [ ] Scope boundaries are explicit
|
|
673
|
+
- [ ] Requirements clarity score ≥ 90
|
|
674
|
+
- [ ] No open questions remain
|
|
675
|
+
- [ ] \`{{artifacts_path}}/spec.md\` written
|
|
676
|
+
|
|
677
|
+
## Knowledge Capture
|
|
678
|
+
|
|
679
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
680
|
+
|
|
681
|
+
- **Requirements clarified**: Ambiguities resolved and assumptions validated
|
|
682
|
+
- **Scope boundaries**: What the spec covers and explicit exclusions
|
|
683
|
+
- **Acceptance criteria**: Key testable conditions that define "done"
|
|
684
|
+
|
|
685
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
686
|
+
`},{file:`steps/task/README.md`,content:`---
|
|
687
|
+
name: task
|
|
688
|
+
description: Break the implementation plan into ordered, atomic tasks with dependencies and agent assignments.
|
|
689
|
+
---
|
|
690
|
+
|
|
691
|
+
# Task Breakdown
|
|
692
|
+
|
|
693
|
+
## Prerequisites Check
|
|
694
|
+
|
|
695
|
+
Before starting this step, verify:
|
|
696
|
+
- [ ] Implementation plan approved
|
|
697
|
+
- [ ] \`{{artifacts_path}}/plan.md\` exists with defined phases
|
|
698
|
+
|
|
699
|
+
If prerequisites are NOT met → **backtrack to plan step** (\`flow_step({ action: 'redo' })\` on previous step)
|
|
700
|
+
|
|
701
|
+
## Purpose
|
|
702
|
+
|
|
703
|
+
Decompose the implementation plan into small, atomic tasks that agents can execute independently, with clear dependency ordering and acceptance criteria per task.
|
|
704
|
+
|
|
705
|
+
## Inputs
|
|
706
|
+
|
|
707
|
+
- \`{{artifacts_path}}/plan.md\` — the phased implementation plan
|
|
708
|
+
|
|
709
|
+
## Process
|
|
710
|
+
|
|
711
|
+
1. **Load plan** — Read phases, file scope, and dependency graph
|
|
712
|
+
2. **Decompose phases into tasks** — Each task should:
|
|
713
|
+
- Touch 1–3 files maximum
|
|
714
|
+
- Have a single, testable outcome
|
|
715
|
+
- Take one agent one focused session
|
|
716
|
+
3. **Define dependencies** — Map task-to-task dependencies (not just phase-to-phase)
|
|
717
|
+
4. **Assign agents** — Match each task to the best-fit agent based on scope
|
|
718
|
+
5. **Identify parallelism** — Mark which tasks can run simultaneously
|
|
719
|
+
6. **Architecture review** — Have Architect-Reviewer validate task ordering won't create integration issues
|
|
720
|
+
|
|
721
|
+
## Outputs
|
|
722
|
+
|
|
723
|
+
Write \`{{artifacts_path}}/tasks.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat.
|
|
724
|
+
|
|
725
|
+
Template:
|
|
726
|
+
|
|
727
|
+
\`\`\`markdown
|
|
728
|
+
# Task Breakdown: <feature title>
|
|
729
|
+
|
|
730
|
+
## Task Graph
|
|
731
|
+
|
|
732
|
+
### Phase 1: <name>
|
|
733
|
+
- [ ] **T1.1**: <description>
|
|
734
|
+
- Files: <list>
|
|
735
|
+
- Agent: <agent name>
|
|
736
|
+
- Depends on: none
|
|
737
|
+
- Acceptance: <testable criterion>
|
|
738
|
+
|
|
739
|
+
- [ ] **T1.2**: <description>
|
|
740
|
+
- Files: <list>
|
|
741
|
+
- Agent: <agent name>
|
|
742
|
+
- Depends on: T1.1
|
|
743
|
+
- Acceptance: <testable criterion>
|
|
744
|
+
|
|
745
|
+
### Phase 2: <name>
|
|
746
|
+
- [ ] **T2.1**: <description> (can parallel with T1.2)
|
|
747
|
+
...
|
|
748
|
+
|
|
749
|
+
## Parallelism Map
|
|
750
|
+
| Batch | Tasks | Agents |
|
|
751
|
+
|-------|-------|--------|
|
|
752
|
+
| 1 | T1.1 | Implementer |
|
|
753
|
+
| 2 | T1.2, T2.1 | Implementer, Frontend |
|
|
754
|
+
| 3 | T2.2 | Implementer |
|
|
755
|
+
| ... | ... | ... |
|
|
756
|
+
|
|
757
|
+
## Estimated Batches: <N>
|
|
758
|
+
\`\`\`
|
|
759
|
+
|
|
760
|
+
## Agents
|
|
761
|
+
|
|
762
|
+
| Agent | Role |
|
|
763
|
+
|-------|------|
|
|
764
|
+
| **Planner** | Decomposes plan phases into atomic tasks with dependency ordering |
|
|
765
|
+
| **Architect-Reviewer-Alpha** | Validates task decomposition won't cause integration issues |
|
|
766
|
+
|
|
767
|
+
Planner does the decomposition, then Architect-Reviewer validates the task graph.
|
|
768
|
+
|
|
769
|
+
## Foundation Integration
|
|
770
|
+
|
|
771
|
+
Load these skills BEFORE executing this step:
|
|
772
|
+
|
|
773
|
+
| Skill | Purpose | When |
|
|
774
|
+
|-------|---------|------|
|
|
775
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
776
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
777
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
778
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
779
|
+
|
|
780
|
+
### Presentation Rules
|
|
781
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
782
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
783
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
784
|
+
- Artifact content and summaries → present with structured layout
|
|
785
|
+
- Only use plain text for brief confirmations and simple questions
|
|
786
|
+
|
|
787
|
+
## Completion Criteria
|
|
788
|
+
|
|
789
|
+
- [ ] Every plan phase maps to ≥1 task
|
|
790
|
+
- [ ] Each task touches ≤3 files
|
|
791
|
+
- [ ] Dependencies form a DAG (no cycles)
|
|
792
|
+
- [ ] Parallelism opportunities identified
|
|
793
|
+
- [ ] Architect review confirms no integration risks
|
|
794
|
+
- [ ] \`{{artifacts_path}}/tasks.md\` written
|
|
795
|
+
|
|
796
|
+
## Knowledge Capture
|
|
797
|
+
|
|
798
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
799
|
+
|
|
800
|
+
- **Task decomposition rationale**: Why tasks were split this way and what each accomplishes
|
|
801
|
+
- **Interface contracts**: APIs, types, or data shapes that tasks depend on
|
|
802
|
+
- **Coordination points**: Where tasks interact and handoff requirements
|
|
803
|
+
|
|
804
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
805
|
+
`},{file:`steps/verify/README.md`,content:`---
|
|
806
|
+
name: verify
|
|
807
|
+
description: Dual code review, architecture review, security review, and comprehensive test validation.
|
|
808
|
+
---
|
|
809
|
+
|
|
810
|
+
# Verification (Advanced)
|
|
811
|
+
|
|
812
|
+
## Prerequisites Check
|
|
813
|
+
|
|
814
|
+
Before starting this step, verify:
|
|
815
|
+
- [ ] All tasks marked complete in progress tracker
|
|
816
|
+
- [ ] \`check({})\` and \`test_run({})\` pass
|
|
817
|
+
- [ ] \`{{artifacts_path}}/progress.md\` exists with execution results
|
|
818
|
+
|
|
819
|
+
If prerequisites are NOT met → **backtrack to execute step** (\`flow_step({ action: 'redo' })\` on previous step)
|
|
820
|
+
|
|
821
|
+
## Purpose
|
|
822
|
+
|
|
823
|
+
Perform thorough multi-perspective validation of all changes through parallel dual code review, architecture review, and security analysis.
|
|
824
|
+
|
|
825
|
+
## Inputs
|
|
826
|
+
|
|
827
|
+
- \`{{artifacts_path}}/spec.md\` — original requirements and acceptance criteria
|
|
828
|
+
- \`{{artifacts_path}}/plan.md\` — architecture decisions and phase design
|
|
829
|
+
- \`{{artifacts_path}}/tasks.md\` — task breakdown with per-task acceptance criteria
|
|
830
|
+
- \`{{artifacts_path}}/progress.md\` — implementation status and changes made
|
|
831
|
+
|
|
832
|
+
## Process
|
|
833
|
+
|
|
834
|
+
1. **Load all artifacts** — Read spec, plan, tasks, and progress
|
|
835
|
+
2. **Dual code review** (parallel):
|
|
836
|
+
- Code-Reviewer-Alpha: focus on correctness, conventions, quality
|
|
837
|
+
- Code-Reviewer-Beta: focus on edge cases, error handling, maintainability
|
|
838
|
+
3. **Architecture review** (parallel with code review):
|
|
839
|
+
- Architect-Reviewer-Alpha: validate changes align with plan and ADRs
|
|
840
|
+
- Architect-Reviewer-Beta: assess long-term maintainability and evolution
|
|
841
|
+
4. **Security review**:
|
|
842
|
+
- Security agent: OWASP Top 10, auth/authz, input validation, secrets
|
|
843
|
+
5. **Quality gates** — \`check({})\` + \`test_run({})\` must pass
|
|
844
|
+
6. **Blast radius** — \`blast_radius({ changed_files: [...] })\` on all modified files
|
|
845
|
+
7. **Acceptance criteria** — Verify each spec acceptance criterion is met
|
|
846
|
+
8. **FORGE gate** — \`evidence_map({ action: "gate" })\` for final quality assessment
|
|
847
|
+
9. **Synthesize report** — Merge all reviewer findings into unified verdict
|
|
848
|
+
|
|
849
|
+
## Outputs
|
|
850
|
+
|
|
851
|
+
Write \`{{artifacts_path}}/verify-report.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat.
|
|
852
|
+
|
|
853
|
+
Template:
|
|
854
|
+
|
|
855
|
+
\`\`\`markdown
|
|
856
|
+
# Verification Report: <feature title>
|
|
857
|
+
|
|
858
|
+
## Verdict: PASS | FAIL
|
|
859
|
+
|
|
860
|
+
## Acceptance Criteria
|
|
861
|
+
- [x] <criterion> — verified by <method>
|
|
862
|
+
- [ ] <criterion> — FAILED: <reason>
|
|
863
|
+
|
|
864
|
+
## Quality Gates
|
|
865
|
+
- check: PASS/FAIL
|
|
866
|
+
- test_run: PASS/FAIL (<N> passed, <M> failed)
|
|
867
|
+
- blast_radius: <impact summary>
|
|
868
|
+
- FORGE gate: YIELD/HOLD/HARD_BLOCK
|
|
869
|
+
|
|
870
|
+
## Code Review (Alpha)
|
|
871
|
+
<findings with severity: critical/major/minor/suggestion>
|
|
872
|
+
|
|
873
|
+
## Code Review (Beta)
|
|
874
|
+
<findings with severity>
|
|
875
|
+
|
|
876
|
+
## Architecture Review
|
|
877
|
+
<alignment assessment, any concerns>
|
|
878
|
+
|
|
879
|
+
## Security Review
|
|
880
|
+
<vulnerabilities found, OWASP compliance>
|
|
881
|
+
|
|
882
|
+
## Recommendation
|
|
883
|
+
APPROVE | REQUEST CHANGES
|
|
884
|
+
|
|
885
|
+
### Required Changes (if any)
|
|
886
|
+
1. <change needed>
|
|
887
|
+
2. ...
|
|
888
|
+
\`\`\`
|
|
889
|
+
|
|
890
|
+
## Agents
|
|
891
|
+
|
|
892
|
+
| Agent | Role |
|
|
893
|
+
|-------|------|
|
|
894
|
+
| **Code-Reviewer-Alpha** | Primary code review — correctness, quality, conventions |
|
|
895
|
+
| **Code-Reviewer-Beta** | Secondary code review — edge cases, error handling, maintainability |
|
|
896
|
+
| **Architect-Reviewer-Alpha** | Primary architecture review — alignment with plan and ADRs |
|
|
897
|
+
| **Architect-Reviewer-Beta** | Secondary architecture review — long-term evolution |
|
|
898
|
+
| **Security** | Security analysis — OWASP, auth, input validation |
|
|
899
|
+
|
|
900
|
+
**Parallelism**: All 5 reviewers can run in parallel — they are read-only.
|
|
901
|
+
|
|
902
|
+
## Foundation Integration
|
|
903
|
+
|
|
904
|
+
Load these skills BEFORE executing this step:
|
|
905
|
+
|
|
906
|
+
| Skill | Purpose | When |
|
|
907
|
+
|-------|---------|------|
|
|
908
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
909
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
910
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
911
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
912
|
+
| \`lesson-learned\` | Extract engineering principles from completed work | After verification — capture lessons from the implementation |
|
|
913
|
+
| \`session-handoff\` | Context preservation for session continuity | When verification spans sessions or for final handoff documentation |
|
|
914
|
+
|
|
915
|
+
### Presentation Rules
|
|
916
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
917
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
918
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
919
|
+
- Artifact content and summaries → present with structured layout
|
|
920
|
+
- Only use plain text for brief confirmations and simple questions
|
|
921
|
+
|
|
922
|
+
### FORGE Quality Gate
|
|
923
|
+
|
|
924
|
+
After all reviews complete:
|
|
925
|
+
1. \`evidence_map({ action: "gate", task_id: "<slug>" })\` → returns YIELD/HOLD/HARD_BLOCK
|
|
926
|
+
2. YIELD → approved, proceed to commit
|
|
927
|
+
3. HOLD → minor issues, fix then re-gate (max 3 rounds)
|
|
928
|
+
4. HARD_BLOCK → critical issues, escalate to user
|
|
929
|
+
|
|
930
|
+
## Completion Criteria
|
|
931
|
+
|
|
932
|
+
- [ ] Dual code review complete (2 reviewers)
|
|
933
|
+
- [ ] Architecture review complete (2 reviewers)
|
|
934
|
+
- [ ] Security review complete
|
|
935
|
+
- [ ] \`check({})\` passes
|
|
936
|
+
- [ ] \`test_run({})\` passes
|
|
937
|
+
- [ ] All spec acceptance criteria verified
|
|
938
|
+
- [ ] FORGE gate passed (YIELD)
|
|
939
|
+
- [ ] \`{{artifacts_path}}/verify-report.md\` written with clear verdict
|
|
940
|
+
|
|
941
|
+
## Knowledge Capture
|
|
942
|
+
|
|
943
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
944
|
+
|
|
945
|
+
- **Test coverage gaps**: Areas that couldn't be fully tested and why
|
|
946
|
+
- **Quality findings**: Issues found during verification and their resolutions
|
|
947
|
+
- **Session checkpoint**: Summarize what was accomplished, decisions made, and any remaining work
|
|
948
|
+
|
|
949
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
950
|
+
`}],"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** file that contains the detailed instructions for the agent(s) executing that step. The Orchestrator reads the README.md via `flow_read_instruction` and delegates work accordingly.\n\n### Step 1: Design Gate\n- **Auto-skips** for bug fixes and refactors (produces a minimal `design-decisions.md` noting it was skipped)\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_read_instruction` returns the README.md for the current step\n2. **Follow step instructions** — the README.md is the primary guide for what to do\n3. **Delegate to listed agents** — each step lists which agents are appropriate\n4. **Produce the required artifact** — the step's `produces` field specifies what file to create in the artifacts directory\n5. **Check dependencies** — the step's `requires` field lists artifacts from previous steps that must exist\n6. **Report status** — agents report `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED` to the Orchestrator\n\n## Artifacts\n\nAll artifacts are stored in the run directory under `.flows/{topic}/`. The template variable `{{artifacts_path}}` resolves to the actual path at runtime.\n"},{file:`steps/assess/README.md`,content:`---
|
|
951
|
+
name: assess
|
|
952
|
+
description: Understand scope, analyze the codebase, and identify the implementation approach.
|
|
953
|
+
---
|
|
954
|
+
|
|
955
|
+
# Assessment
|
|
956
|
+
|
|
957
|
+
## Purpose
|
|
958
|
+
|
|
959
|
+
Analyze the task requirements and codebase to produce a clear, actionable assessment before any code changes begin.
|
|
960
|
+
|
|
961
|
+
## Inputs
|
|
962
|
+
|
|
963
|
+
- User's task description or issue reference
|
|
964
|
+
- Codebase (accessed via aikit MCP tools)
|
|
965
|
+
|
|
966
|
+
## Prerequisites Check
|
|
967
|
+
|
|
968
|
+
Before executing this step, verify:
|
|
969
|
+
|
|
970
|
+
- [ ] Design decisions documented (from the design step)
|
|
971
|
+
- [ ] FORGE classification determined (tier assigned)
|
|
972
|
+
- [ ] If brainstorming was done, session outcomes are recorded
|
|
973
|
+
|
|
974
|
+
If any prerequisites are missing or incomplete:
|
|
975
|
+
1. Inform the Orchestrator with specifics about what's missing
|
|
976
|
+
2. Recommend \`flow_step({ action: 'redo' })\` on the **design** step
|
|
977
|
+
3. Do NOT proceed with partial inputs — quality degrades downstream
|
|
978
|
+
|
|
979
|
+
## Process
|
|
980
|
+
|
|
981
|
+
1. **Parse the goal** — Extract what needs to change, success criteria, and constraints
|
|
982
|
+
2. **Search for prior work** — \`search({ query: "<task keywords>" })\` to check for existing decisions or related code
|
|
983
|
+
3. **Map affected scope** — \`scope_map({ task: "<description>" })\` to identify files and modules involved
|
|
984
|
+
4. **Analyze structure** — \`file_summary()\` on each affected file; \`compact()\` for deeper sections
|
|
985
|
+
5. **Identify risks** — Note dependencies, breaking change potential, test coverage gaps
|
|
986
|
+
6. **Draft approach** — Outline the implementation strategy in 3–7 steps
|
|
987
|
+
|
|
988
|
+
## Outputs
|
|
989
|
+
|
|
990
|
+
Write \`{{artifacts_path}}/assessment.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat.
|
|
991
|
+
|
|
992
|
+
Template:
|
|
993
|
+
|
|
994
|
+
\`\`\`markdown
|
|
995
|
+
# Assessment: <task title>
|
|
996
|
+
|
|
997
|
+
## Goal
|
|
998
|
+
<what needs to happen>
|
|
999
|
+
|
|
1000
|
+
## Affected Files
|
|
1001
|
+
<list of files with brief reason>
|
|
1002
|
+
|
|
1003
|
+
## Approach
|
|
1004
|
+
<numbered implementation steps>
|
|
1005
|
+
|
|
1006
|
+
## Risks
|
|
1007
|
+
<potential issues and mitigations>
|
|
1008
|
+
|
|
1009
|
+
## Open Questions
|
|
1010
|
+
<anything that needs clarification before proceeding>
|
|
1011
|
+
\`\`\`
|
|
1012
|
+
|
|
1013
|
+
## Agents
|
|
1014
|
+
|
|
1015
|
+
| Agent | Role |
|
|
1016
|
+
|-------|------|
|
|
1017
|
+
| **Explorer** | Rapid file discovery, dependency tracing, structural context |
|
|
1018
|
+
| **Researcher-Alpha** | Deep analysis of complex logic, prior decisions, architectural implications |
|
|
1019
|
+
|
|
1020
|
+
Use Explorer first for breadth, then Researcher-Alpha for depth on complex areas.
|
|
1021
|
+
|
|
1022
|
+
## Foundation Integration
|
|
1023
|
+
|
|
1024
|
+
Load these skills BEFORE executing this step:
|
|
1025
|
+
|
|
1026
|
+
| Skill | Purpose | When |
|
|
1027
|
+
|-------|---------|------|
|
|
1028
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
1029
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
1030
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
1031
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
1032
|
+
| \`c4-architecture\` | C4 model architecture diagrams — system context, container, component, deployment views | When visualizing system structure during assessment |
|
|
1033
|
+
| \`adr-skill\` | Architecture Decision Records — create, review, maintain ADRs | When assessment reveals non-trivial design decisions |
|
|
1034
|
+
|
|
1035
|
+
### Presentation Rules
|
|
1036
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
1037
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
1038
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
1039
|
+
- Artifact content and summaries → present with structured layout
|
|
1040
|
+
- Only use plain text for brief confirmations and simple questions
|
|
1041
|
+
|
|
1042
|
+
## Completion Criteria
|
|
1043
|
+
|
|
1044
|
+
- [ ] All affected files identified
|
|
1045
|
+
- [ ] Implementation approach is concrete (not vague)
|
|
1046
|
+
- [ ] Risks documented with mitigations
|
|
1047
|
+
- [ ] No unresolved open questions that block implementation
|
|
1048
|
+
- [ ] \`{{artifacts_path}}/assessment.md\` written
|
|
1049
|
+
|
|
1050
|
+
## Knowledge Capture
|
|
1051
|
+
|
|
1052
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
1053
|
+
|
|
1054
|
+
- **Codebase discoveries**: File locations, architecture patterns, or dependency relationships found during assessment
|
|
1055
|
+
- **Problem diagnosis**: Root cause analysis, contributing factors, and affected components
|
|
1056
|
+
- **Scope decisions**: What's in scope, what's explicitly excluded, and why
|
|
1057
|
+
|
|
1058
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
1059
|
+
`},{file:`steps/design/README.md`,content:`# Design Gate — Basic Flow
|
|
1060
|
+
|
|
1061
|
+
Lightweight design gate for bug fixes, small features, and refactoring. Evaluates the task type and determines whether design work is needed before proceeding.
|
|
1062
|
+
|
|
1063
|
+
## When This Step Runs
|
|
1064
|
+
|
|
1065
|
+
This is the **first step** of the \`aikit:basic\` flow. It runs before assessment.
|
|
1066
|
+
|
|
1067
|
+
## Instructions
|
|
1068
|
+
|
|
1069
|
+
### 1. Task Classification
|
|
1070
|
+
|
|
1071
|
+
Classify the task into one of these categories:
|
|
1072
|
+
|
|
1073
|
+
| Category | Indicators | Action |
|
|
1074
|
+
|----------|-----------|--------|
|
|
1075
|
+
| **Bug fix** | Error reports, stack traces, regression, "fix", "broken" | → **Auto-skip** to next step |
|
|
1076
|
+
| **Refactor** | Code cleanup, rename, restructure, no behavior change | → **Auto-skip** to next step |
|
|
1077
|
+
| **Small feature** | New behavior, new endpoint, new component, UI change | → Run **Quick Design** below |
|
|
1078
|
+
|
|
1079
|
+
**If the task is a bug fix or refactor**, write \`{{artifacts_path}}/design-decisions.md\` to disk:
|
|
1080
|
+
\`\`\`markdown
|
|
1081
|
+
## Design Decisions
|
|
1082
|
+
- **Task type**: Bug fix / Refactor
|
|
1083
|
+
- **Design gate**: Auto-skipped — no design work needed
|
|
1084
|
+
- **Proceed to**: Assessment
|
|
1085
|
+
\`\`\`
|
|
1086
|
+
**You MUST create this file on disk** at the exact \`{{artifacts_path}}/design-decisions.md\` path — do not just present the content in chat.
|
|
1087
|
+
Then report \`DONE\` to the Orchestrator so the flow advances.
|
|
1088
|
+
|
|
1089
|
+
### 2. Quick Design (Small Features Only)
|
|
1090
|
+
|
|
1091
|
+
For small features that need minimal design:
|
|
1092
|
+
|
|
1093
|
+
1. **FORGE Classify** — Run \`forge_classify({ task: "<task description>", files: [<relevant files>] })\` to determine complexity tier
|
|
1094
|
+
2. **Brainstorming** (if tier ≥ Standard) — Load the \`brainstorming\` skill and run a focused brainstorming session:
|
|
1095
|
+
- What is the user trying to achieve?
|
|
1096
|
+
- What are the constraints?
|
|
1097
|
+
- What is the simplest approach?
|
|
1098
|
+
3. **Decision Protocol** (if technical decisions exist) — Delegate to 2-4 Researcher agents in parallel:
|
|
1099
|
+
- Each researcher evaluates a different approach
|
|
1100
|
+
- Synthesize findings into a recommendation
|
|
1101
|
+
4. **Write \`{{artifacts_path}}/design-decisions.md\`** to disk:
|
|
1102
|
+
|
|
1103
|
+
\`\`\`markdown
|
|
1104
|
+
## Design Decisions
|
|
1105
|
+
|
|
1106
|
+
### FORGE Assessment
|
|
1107
|
+
- **Tier**: {Floor | Standard | Critical}
|
|
1108
|
+
- **Rationale**: {why this tier}
|
|
1109
|
+
|
|
1110
|
+
### Task Summary
|
|
1111
|
+
- **Goal**: {what we're building}
|
|
1112
|
+
- **Approach**: {chosen approach}
|
|
1113
|
+
- **Key decisions**: {list}
|
|
1114
|
+
|
|
1115
|
+
### Constraints
|
|
1116
|
+
- {constraint 1}
|
|
1117
|
+
- {constraint 2}
|
|
1118
|
+
\`\`\`
|
|
1119
|
+
|
|
1120
|
+
### 3. Report to Orchestrator
|
|
1121
|
+
|
|
1122
|
+
When complete, report status:
|
|
1123
|
+
- \`DONE\` — design decisions captured, ready for assessment
|
|
1124
|
+
- \`DONE_WITH_CONCERNS\` — design captured but open questions remain (list them)
|
|
1125
|
+
|
|
1126
|
+
**Do NOT call \`flow_step\`** — let the Orchestrator advance the flow.
|
|
1127
|
+
|
|
1128
|
+
## Outputs
|
|
1129
|
+
|
|
1130
|
+
Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat. This file is a prerequisite for the next step.
|
|
1131
|
+
|
|
1132
|
+
## Produces
|
|
1133
|
+
|
|
1134
|
+
- \`{{artifacts_path}}/design-decisions.md\` — Task classification, FORGE tier, key design decisions
|
|
1135
|
+
|
|
1136
|
+
## Agents
|
|
1137
|
+
|
|
1138
|
+
- \`Researcher-Alpha\`, \`Researcher-Beta\`, \`Researcher-Gamma\`, \`Researcher-Delta\` — for parallel research during decision protocol
|
|
1139
|
+
|
|
1140
|
+
## Foundation Integration
|
|
1141
|
+
|
|
1142
|
+
Load these skills BEFORE executing this step:
|
|
1143
|
+
|
|
1144
|
+
| Skill | Purpose | When |
|
|
1145
|
+
|-------|---------|------|
|
|
1146
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
1147
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
1148
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
1149
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
1150
|
+
| \`c4-architecture\` | C4 model architecture diagrams — system context, container, component, deployment views | When visualizing system structure during design |
|
|
1151
|
+
| \`adr-skill\` | Architecture Decision Records — create, review, maintain ADRs | When making non-trivial design or technology decisions |
|
|
1152
|
+
|
|
1153
|
+
### Presentation Rules
|
|
1154
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
1155
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
1156
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
1157
|
+
- Artifact content and summaries → present with structured layout
|
|
1158
|
+
- Only use plain text for brief confirmations and simple questions
|
|
1159
|
+
|
|
1160
|
+
## Completion Criteria
|
|
1161
|
+
|
|
1162
|
+
- [ ] \`{{artifacts_path}}/design-decisions.md\` written to disk (NOT just presented in chat)
|
|
1163
|
+
- [ ] FORGE tier determined (for small features)
|
|
1164
|
+
- [ ] Key design decisions documented
|
|
1165
|
+
|
|
1166
|
+
## Knowledge Capture
|
|
1167
|
+
|
|
1168
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
1169
|
+
|
|
1170
|
+
- **Design decisions**: Chosen approach and alternatives considered with trade-offs
|
|
1171
|
+
- **Architecture patterns**: New patterns introduced or existing patterns that must be followed
|
|
1172
|
+
- **Constraints discovered**: Technical limitations, compatibility requirements, or performance boundaries
|
|
1173
|
+
|
|
1174
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
1175
|
+
`},{file:`steps/implement/README.md`,content:`---
|
|
1176
|
+
name: implement
|
|
1177
|
+
description: Write code following the assessment plan, using TDD practices where applicable.
|
|
1178
|
+
---
|
|
1179
|
+
|
|
1180
|
+
# Implementation
|
|
1181
|
+
|
|
1182
|
+
## Purpose
|
|
1183
|
+
|
|
1184
|
+
Execute the implementation plan from the assessment, writing production code and tests.
|
|
1185
|
+
|
|
1186
|
+
## Inputs
|
|
1187
|
+
|
|
1188
|
+
- \`{{artifacts_path}}/assessment.md\` — the approach, affected files, and risks
|
|
1189
|
+
|
|
1190
|
+
## Prerequisites Check
|
|
1191
|
+
|
|
1192
|
+
Before executing this step, verify:
|
|
1193
|
+
|
|
1194
|
+
- [ ] Assessment complete and scope approved (from the assess step)
|
|
1195
|
+
- [ ] Files-to-modify list is clear and bounded
|
|
1196
|
+
- [ ] \`check({})\` baseline captured (know what currently passes)
|
|
1197
|
+
|
|
1198
|
+
If any prerequisites are missing or incomplete:
|
|
1199
|
+
1. Inform the Orchestrator with specifics about what's missing
|
|
1200
|
+
2. Recommend \`flow_step({ action: 'redo' })\` on the **assess** step
|
|
1201
|
+
3. Do NOT proceed with partial inputs — quality degrades downstream
|
|
1202
|
+
|
|
1203
|
+
## Process
|
|
1204
|
+
|
|
1205
|
+
1. **Read assessment** — Load \`{{artifacts_path}}/assessment.md\` and internalize the approach
|
|
1206
|
+
2. **Set up tests first** — Where applicable, write failing tests that define success
|
|
1207
|
+
3. **Implement changes** — Follow the approach steps sequentially
|
|
1208
|
+
- One logical change per commit-worthy chunk
|
|
1209
|
+
- Stay within the assessed file scope — do not expand without re-assessment
|
|
1210
|
+
4. **Run validation** — \`check({})\` for type/lint errors, \`test_run({})\` for test results
|
|
1211
|
+
5. **Fix issues** — Iterate until \`check\` and \`test_run\` pass (max 3 rounds)
|
|
1212
|
+
6. **Document progress** — Write progress artifact with what was done and any deviations
|
|
1213
|
+
|
|
1214
|
+
## Outputs
|
|
1215
|
+
|
|
1216
|
+
Write \`{{artifacts_path}}/progress.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat.
|
|
1217
|
+
|
|
1218
|
+
Template:
|
|
1219
|
+
|
|
1220
|
+
\`\`\`markdown
|
|
1221
|
+
# Implementation Progress: <task title>
|
|
1222
|
+
|
|
1223
|
+
## Changes Made
|
|
1224
|
+
<list of files changed with brief description>
|
|
1225
|
+
|
|
1226
|
+
## Tests
|
|
1227
|
+
<tests added or modified>
|
|
1228
|
+
|
|
1229
|
+
## Deviations from Assessment
|
|
1230
|
+
<any changes to the original plan and why>
|
|
1231
|
+
|
|
1232
|
+
## Validation
|
|
1233
|
+
- check: PASS/FAIL
|
|
1234
|
+
- test_run: PASS/FAIL (<N> passed, <M> failed)
|
|
1235
|
+
|
|
1236
|
+
## Notes
|
|
1237
|
+
<anything the reviewer should know>
|
|
1238
|
+
\`\`\`
|
|
1239
|
+
|
|
1240
|
+
## Agents
|
|
1241
|
+
|
|
1242
|
+
| Agent | Role |
|
|
1243
|
+
|-------|------|
|
|
1244
|
+
| **Implementer** | Primary code writer — follows TDD, writes production code and tests |
|
|
1245
|
+
| **Frontend** | UI/UX specialist — use when changes involve React components, styling, or responsive design |
|
|
1246
|
+
|
|
1247
|
+
Dispatch Implementer for backend/logic changes, Frontend for UI changes. Both can run in parallel if working on different files.
|
|
1248
|
+
|
|
1249
|
+
## Foundation Integration
|
|
1250
|
+
|
|
1251
|
+
Load these skills BEFORE executing this step:
|
|
1252
|
+
|
|
1253
|
+
| Skill | Purpose | When |
|
|
1254
|
+
|-------|---------|------|
|
|
1255
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
1256
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
1257
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
1258
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
1259
|
+
| \`session-handoff\` | Context preservation for session transfers | When implementation is long-running and context may fill up |
|
|
1260
|
+
|
|
1261
|
+
### Presentation Rules
|
|
1262
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
1263
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
1264
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
1265
|
+
- Artifact content and summaries → present with structured layout
|
|
1266
|
+
- Only use plain text for brief confirmations and simple questions
|
|
1267
|
+
|
|
1268
|
+
### Orchestrator Dispatch Protocol
|
|
1269
|
+
|
|
1270
|
+
Follow the \`multi-agents-development\` skill patterns for dispatch:
|
|
1271
|
+
|
|
1272
|
+
1. **Independence Check** before parallelizing:
|
|
1273
|
+
- Same files? → sequential
|
|
1274
|
+
- Shared mutable state? → sequential
|
|
1275
|
+
- Execution-order dependent? → sequential
|
|
1276
|
+
- Need shared new types? → define contract first, then parallel
|
|
1277
|
+
- All clear? → **parallel dispatch**
|
|
1278
|
+
|
|
1279
|
+
2. **Subagent Context Template** (each dispatch includes):
|
|
1280
|
+
- **Scope**: exact files + boundary (do NOT touch)
|
|
1281
|
+
- **Goal**: acceptance criteria, testable
|
|
1282
|
+
- **Arch Context**: actual code snippets via \`compact()\`/\`digest()\`
|
|
1283
|
+
- **Constraints**: patterns, conventions, anti-patterns
|
|
1284
|
+
- **Self-Review**: checklist before declaring DONE
|
|
1285
|
+
|
|
1286
|
+
3. **Status Protocol**: \`DONE\` | \`DONE_WITH_CONCERNS\` | \`NEEDS_CONTEXT\` | \`BLOCKED\`
|
|
1287
|
+
4. **Max 2 retries** per task — then escalate to user
|
|
1288
|
+
|
|
1289
|
+
## Completion Criteria
|
|
1290
|
+
|
|
1291
|
+
- [ ] All assessment steps implemented
|
|
1292
|
+
- [ ] \`check({})\` passes (no type/lint errors)
|
|
1293
|
+
- [ ] \`test_run({})\` passes (no test failures)
|
|
1294
|
+
- [ ] No files modified outside assessed scope
|
|
1295
|
+
- [ ] \`{{artifacts_path}}/progress.md\` written
|
|
1296
|
+
|
|
1297
|
+
## Knowledge Capture
|
|
1298
|
+
|
|
1299
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
1300
|
+
|
|
1301
|
+
- **Implementation decisions**: Why specific approaches were chosen over alternatives
|
|
1302
|
+
- **Patterns established**: New conventions or patterns that future code should follow
|
|
1303
|
+
- **Gotchas encountered**: Edge cases, workarounds, or non-obvious behaviors discovered during implementation
|
|
1304
|
+
|
|
1305
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
1306
|
+
`},{file:`steps/verify/README.md`,content:`---
|
|
1307
|
+
name: verify
|
|
1308
|
+
description: Review code changes, run tests, validate correctness and quality.
|
|
1309
|
+
---
|
|
1310
|
+
|
|
1311
|
+
# Verification
|
|
1312
|
+
|
|
1313
|
+
## Purpose
|
|
1314
|
+
|
|
1315
|
+
Validate that the implementation meets the original requirements, passes all quality gates, and introduces no regressions.
|
|
1316
|
+
|
|
1317
|
+
## Inputs
|
|
1318
|
+
|
|
1319
|
+
- \`{{artifacts_path}}/assessment.md\` — original requirements and approach
|
|
1320
|
+
- \`{{artifacts_path}}/progress.md\` — what was implemented and any deviations
|
|
1321
|
+
|
|
1322
|
+
## Prerequisites Check
|
|
1323
|
+
|
|
1324
|
+
Before executing this step, verify:
|
|
1325
|
+
|
|
1326
|
+
- [ ] Implementation complete (from the implement step)
|
|
1327
|
+
- [ ] \`check({})\` + \`test_run({})\` pass at baseline
|
|
1328
|
+
- [ ] Changed files list is available for blast radius analysis
|
|
1329
|
+
|
|
1330
|
+
If any prerequisites are missing or incomplete:
|
|
1331
|
+
1. Inform the Orchestrator with specifics about what's missing
|
|
1332
|
+
2. Recommend \`flow_step({ action: 'redo' })\` on the **implement** step
|
|
1333
|
+
3. Do NOT proceed with partial inputs — quality degrades downstream
|
|
1334
|
+
|
|
1335
|
+
## Process
|
|
1336
|
+
|
|
1337
|
+
1. **Load context** — Read assessment and progress artifacts
|
|
1338
|
+
2. **Code review** — Review all changed files for:
|
|
1339
|
+
- Correctness against requirements
|
|
1340
|
+
- Code quality and adherence to project conventions
|
|
1341
|
+
- Error handling and edge cases
|
|
1342
|
+
- No unnecessary changes (scope creep)
|
|
1343
|
+
3. **Run quality gates** — \`check({})\` + \`test_run({})\` must pass
|
|
1344
|
+
4. **Blast radius** — \`blast_radius({ changed_files: [...] })\` to assess impact
|
|
1345
|
+
5. **Security scan** — Check for OWASP Top 10 issues in changed code
|
|
1346
|
+
6. **Write report** — Document findings with PASS/FAIL verdict
|
|
1347
|
+
|
|
1348
|
+
## Outputs
|
|
1349
|
+
|
|
1350
|
+
Write \`{{artifacts_path}}/verify-report.md\` to disk. **You MUST create this file** using \`create_file\` or equivalent — do not just present content in chat.
|
|
1351
|
+
|
|
1352
|
+
Template:
|
|
1353
|
+
|
|
1354
|
+
\`\`\`markdown
|
|
1355
|
+
# Verification Report: <task title>
|
|
1356
|
+
|
|
1357
|
+
## Verdict: PASS | FAIL
|
|
1358
|
+
|
|
1359
|
+
## Quality Gates
|
|
1360
|
+
- check: PASS/FAIL
|
|
1361
|
+
- test_run: PASS/FAIL (<N> passed, <M> failed)
|
|
1362
|
+
- blast_radius: <summary of impact>
|
|
1363
|
+
|
|
1364
|
+
## Code Review Findings
|
|
1365
|
+
<issues found, if any, with severity>
|
|
1366
|
+
|
|
1367
|
+
## Security
|
|
1368
|
+
<any security concerns>
|
|
1369
|
+
|
|
1370
|
+
## Recommendation
|
|
1371
|
+
<APPROVE for commit / REQUEST CHANGES with specific items>
|
|
1372
|
+
\`\`\`
|
|
1373
|
+
|
|
1374
|
+
## Agents
|
|
1375
|
+
|
|
1376
|
+
| Agent | Role |
|
|
1377
|
+
|-------|------|
|
|
1378
|
+
| **Code-Reviewer-Alpha** | Primary code reviewer — correctness, quality, conventions |
|
|
1379
|
+
| **Security** | Security specialist — vulnerability analysis, OWASP compliance |
|
|
1380
|
+
|
|
1381
|
+
Run both in parallel — they review different aspects of the same changes.
|
|
1382
|
+
|
|
1383
|
+
## Foundation Integration
|
|
1384
|
+
|
|
1385
|
+
Load these skills BEFORE executing this step:
|
|
1386
|
+
|
|
1387
|
+
| Skill | Purpose | When |
|
|
1388
|
+
|-------|---------|------|
|
|
1389
|
+
| \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
|
|
1390
|
+
| \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
|
|
1391
|
+
| \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
|
|
1392
|
+
| \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
|
|
1393
|
+
| \`lesson-learned\` | Extract engineering lessons from completed work via git history | After verification completes — capture principles from what was built |
|
|
1394
|
+
| \`session-handoff\` | Context preservation for session transfers | When verification is the final step and session context should be saved |
|
|
1395
|
+
|
|
1396
|
+
### Presentation Rules
|
|
1397
|
+
- Use \`present\` for **any output** that benefits from rich rendering — not limited to dashboards
|
|
1398
|
+
- Assessments, reports, comparisons, reviews, status boards → \`present({ format: "html" })\`
|
|
1399
|
+
- Tables, charts, progress tracking, code review findings → always present
|
|
1400
|
+
- Artifact content and summaries → present with structured layout
|
|
1401
|
+
- Only use plain text for brief confirmations and simple questions
|
|
1402
|
+
|
|
1403
|
+
### FORGE Quality Gate
|
|
1404
|
+
|
|
1405
|
+
After all reviews complete:
|
|
1406
|
+
1. \`evidence_map({ action: "gate", task_id: "<slug>" })\` → returns YIELD/HOLD/HARD_BLOCK
|
|
1407
|
+
2. YIELD → approved, proceed to commit
|
|
1408
|
+
3. HOLD → minor issues, fix then re-gate (max 3 rounds)
|
|
1409
|
+
4. HARD_BLOCK → critical issues, escalate to user
|
|
1410
|
+
|
|
1411
|
+
## Completion Criteria
|
|
1412
|
+
|
|
1413
|
+
- [ ] \`check({})\` passes
|
|
1414
|
+
- [ ] \`test_run({})\` passes
|
|
1415
|
+
- [ ] Code review complete with no blocking issues
|
|
1416
|
+
- [ ] Security review complete
|
|
1417
|
+
- [ ] Blast radius assessed
|
|
1418
|
+
- [ ] \`{{artifacts_path}}/verify-report.md\` written with clear PASS/FAIL verdict
|
|
1419
|
+
|
|
1420
|
+
## Knowledge Capture
|
|
1421
|
+
|
|
1422
|
+
Before completing this step, persist important findings using \`remember()\`:
|
|
1423
|
+
|
|
1424
|
+
- **Test coverage gaps**: Areas that couldn't be fully tested and why
|
|
1425
|
+
- **Quality findings**: Issues found during verification and their resolutions
|
|
1426
|
+
- **Session checkpoint**: Summarize what was accomplished, decisions made, and any remaining work
|
|
1427
|
+
|
|
1428
|
+
**Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
|
|
1429
|
+
`}]};export{e as FLOWS};
|