@vpxa/aikit 0.1.20 → 0.1.21

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.
Files changed (45) hide show
  1. package/package.json +1 -1
  2. package/packages/core/dist/types.d.ts +2 -0
  3. package/packages/flows/dist/adapters/claude-plugin.js +1 -1
  4. package/packages/flows/dist/adapters/copilot.js +1 -1
  5. package/packages/flows/dist/builtins.js +1 -1
  6. package/packages/flows/dist/loader.js +1 -1
  7. package/packages/flows/dist/types.d.ts +2 -2
  8. package/packages/indexer/dist/smart-index-scheduler.d.ts +4 -1
  9. package/packages/indexer/dist/smart-index-scheduler.js +1 -1
  10. package/packages/server/dist/index.js +1 -1
  11. package/packages/server/dist/tool-metadata.js +1 -1
  12. package/packages/server/dist/tools/flow.tools.js +1 -1
  13. package/packages/store/dist/lance-store.d.ts +2 -0
  14. package/packages/store/dist/lance-store.js +1 -1
  15. package/scaffold/definitions/bodies.mjs +8 -8
  16. package/scaffold/definitions/plugins.mjs +92 -0
  17. package/scaffold/definitions/protocols.mjs +2 -2
  18. package/scaffold/flows/aikit-advanced/README.md +10 -10
  19. package/scaffold/flows/aikit-advanced/flow.json +6 -6
  20. package/scaffold/flows/aikit-advanced/{skills/design/SKILL.md → steps/design/README.md} +30 -0
  21. package/scaffold/flows/aikit-advanced/{skills/execute/SKILL.md → steps/execute/README.md} +19 -0
  22. package/scaffold/flows/aikit-advanced/{skills/plan/SKILL.md → steps/plan/README.md} +20 -0
  23. package/scaffold/flows/aikit-advanced/{skills/spec/SKILL.md → steps/spec/README.md} +19 -0
  24. package/scaffold/flows/aikit-advanced/{skills/task/SKILL.md → steps/task/README.md} +18 -0
  25. package/scaffold/flows/aikit-advanced/{skills/verify/SKILL.md → steps/verify/README.md} +21 -0
  26. package/scaffold/flows/aikit-basic/README.md +8 -8
  27. package/scaffold/flows/aikit-basic/flow.json +4 -4
  28. package/scaffold/flows/aikit-basic/{skills/assess/SKILL.md → steps/assess/README.md} +25 -0
  29. package/scaffold/flows/aikit-basic/{skills/design/SKILL.md → steps/design/README.md} +32 -0
  30. package/scaffold/flows/aikit-basic/{skills/implement/SKILL.md → steps/implement/README.md} +24 -0
  31. package/scaffold/flows/aikit-basic/{skills/verify/SKILL.md → steps/verify/README.md} +25 -0
  32. package/scaffold/general/agents/Orchestrator.agent.md +6 -6
  33. package/scaffold/general/agents/Planner.agent.md +2 -2
  34. package/scaffold/general/agents/_shared/code-agent-base.md +2 -2
  35. package/scaffold/general/skills/adr-skill/SKILL.md +6 -6
  36. package/scaffold/general/skills/aikit/SKILL.md +10 -10
  37. package/scaffold/general/skills/brainstorming/SKILL.md +11 -13
  38. package/scaffold/general/skills/c4-architecture/SKILL.md +1 -0
  39. package/scaffold/general/skills/requirements-clarity/SKILL.md +5 -3
  40. package/scaffold/general/skills/session-handoff/SKILL.md +2 -0
  41. package/scaffold/general/skills/brainstorming/scripts/frame-template.html +0 -365
  42. package/scaffold/general/skills/brainstorming/scripts/helper.js +0 -216
  43. package/scaffold/general/skills/brainstorming/scripts/server.cjs +0 -9
  44. package/scaffold/general/skills/brainstorming/scripts/server.src.cjs +0 -249
  45. package/scaffold/general/skills/brainstorming/visual-companion.md +0 -430
@@ -5,6 +5,14 @@ description: Analyze the codebase, design the architecture, and create a detaile
5
5
 
6
6
  # Planning
7
7
 
8
+ ## Prerequisites Check
9
+
10
+ Before starting this step, verify:
11
+ - [ ] Specification approved with clarity score ≥90
12
+ - [ ] `.spec/<slug>/spec.md` exists and is complete
13
+
14
+ If prerequisites are NOT met → **backtrack to spec step** (`flow_step({ action: 'redo' })` on previous step)
15
+
8
16
  ## Purpose
9
17
 
10
18
  Translate the specification into a concrete, phased implementation plan with architecture decisions, file-level scope, and dependency ordering.
@@ -82,6 +90,8 @@ Load these skills BEFORE executing this step:
82
90
  | `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 |
83
91
  | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
84
92
  | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
93
+ | `adr-skill` | Architecture Decision Records for non-trivial technical decisions | When plan involves architecture choices that need documentation |
94
+ | `c4-architecture` | C4 model diagrams showing system structure changes | When plan modifies system architecture |
85
95
 
86
96
  ### Presentation Rules
87
97
  - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
@@ -98,3 +108,13 @@ Load these skills BEFORE executing this step:
98
108
  - [ ] Dependency graph has no circular dependencies
99
109
  - [ ] Risks identified with mitigations
100
110
  - [ ] `.spec/<slug>/plan.md` written
111
+
112
+ ## Knowledge Capture
113
+
114
+ Before completing this step, persist important findings using `remember()`:
115
+
116
+ - **Task dependencies**: Critical ordering constraints and parallel opportunities
117
+ - **Risk assessment**: Identified risks and mitigation strategies
118
+ - **Resource decisions**: File ownership, module boundaries, and integration points
119
+
120
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -5,6 +5,14 @@ description: Elicit requirements, clarify scope, and define acceptance criteria
5
5
 
6
6
  # Specification
7
7
 
8
+ ## Prerequisites Check
9
+
10
+ Before starting this step, verify:
11
+ - [ ] Design decisions approved (design-decisions.md exists with user approval)
12
+ - [ ] FORGE tier assigned and documented
13
+
14
+ If prerequisites are NOT met -> **backtrack to design step** (`flow_step({ action: 'redo' })` on previous step)
15
+
8
16
  ## Purpose
9
17
 
10
18
  Transform a vague or broad feature request into a precise, testable specification through requirements elicitation and stakeholder dialogue.
@@ -83,6 +91,7 @@ Load these skills BEFORE executing this step:
83
91
  | `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 |
84
92
  | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
85
93
  | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
94
+ | `requirements-clarity` | Score requirements 0-100, iterate until ≥90 before proceeding | Before writing spec — ensures requirements are clear enough |
86
95
 
87
96
  ### Presentation Rules
88
97
  - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
@@ -98,3 +107,13 @@ Load these skills BEFORE executing this step:
98
107
  - [ ] Requirements clarity score ≥ 90
99
108
  - [ ] No open questions remain
100
109
  - [ ] `.spec/<slug>/spec.md` written
110
+
111
+ ## Knowledge Capture
112
+
113
+ Before completing this step, persist important findings using `remember()`:
114
+
115
+ - **Requirements clarified**: Ambiguities resolved and assumptions validated
116
+ - **Scope boundaries**: What the spec covers and explicit exclusions
117
+ - **Acceptance criteria**: Key testable conditions that define "done"
118
+
119
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -5,6 +5,14 @@ description: Break the implementation plan into ordered, atomic tasks with depen
5
5
 
6
6
  # Task Breakdown
7
7
 
8
+ ## Prerequisites Check
9
+
10
+ Before starting this step, verify:
11
+ - [ ] Implementation plan approved
12
+ - [ ] `.spec/<slug>/plan.md` exists with defined phases
13
+
14
+ If prerequisites are NOT met → **backtrack to plan step** (`flow_step({ action: 'redo' })` on previous step)
15
+
8
16
  ## Purpose
9
17
 
10
18
  Decompose the implementation plan into small, atomic tasks that agents can execute independently, with clear dependency ordering and acceptance criteria per task.
@@ -97,3 +105,13 @@ Load these skills BEFORE executing this step:
97
105
  - [ ] Parallelism opportunities identified
98
106
  - [ ] Architect review confirms no integration risks
99
107
  - [ ] `.spec/<slug>/tasks.md` written
108
+
109
+ ## Knowledge Capture
110
+
111
+ Before completing this step, persist important findings using `remember()`:
112
+
113
+ - **Task decomposition rationale**: Why tasks were split this way and what each accomplishes
114
+ - **Interface contracts**: APIs, types, or data shapes that tasks depend on
115
+ - **Coordination points**: Where tasks interact and handoff requirements
116
+
117
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -5,6 +5,15 @@ description: Dual code review, architecture review, security review, and compreh
5
5
 
6
6
  # Verification (Advanced)
7
7
 
8
+ ## Prerequisites Check
9
+
10
+ Before starting this step, verify:
11
+ - [ ] All tasks marked complete in progress tracker
12
+ - [ ] `check({})` and `test_run({})` pass
13
+ - [ ] `.spec/<slug>/progress.md` exists with execution results
14
+
15
+ If prerequisites are NOT met → **backtrack to execute step** (`flow_step({ action: 'redo' })` on previous step)
16
+
8
17
  ## Purpose
9
18
 
10
19
  Perform thorough multi-perspective validation of all changes through parallel dual code review, architecture review, and security analysis.
@@ -94,6 +103,8 @@ Load these skills BEFORE executing this step:
94
103
  | `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 |
95
104
  | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
96
105
  | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
106
+ | `lesson-learned` | Extract engineering principles from completed work | After verification — capture lessons from the implementation |
107
+ | `session-handoff` | Context preservation for session continuity | When verification spans sessions or for final handoff documentation |
97
108
 
98
109
  ### Presentation Rules
99
110
  - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
@@ -120,3 +131,13 @@ After all reviews complete:
120
131
  - [ ] All spec acceptance criteria verified
121
132
  - [ ] FORGE gate passed (YIELD)
122
133
  - [ ] `.spec/<slug>/verify-report.md` written with clear verdict
134
+
135
+ ## Knowledge Capture
136
+
137
+ Before completing this step, persist important findings using `remember()`:
138
+
139
+ - **Test coverage gaps**: Areas that couldn't be fully tested and why
140
+ - **Quality findings**: Issues found during verification and their resolutions
141
+ - **Session checkpoint**: Summarize what was accomplished, decisions made, and any remaining work
142
+
143
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -6,19 +6,19 @@ Quick development flow for **bug fixes, small features, and refactoring**.
6
6
 
7
7
  | # | Step | Skill | Produces | Requires | Agents |
8
8
  |---|------|-------|----------|----------|--------|
9
- | 1 | **Design Gate** | `skills/design/SKILL.md` | `design-decisions.md` | — | Researcher-Alpha/Beta/Gamma/Delta |
10
- | 2 | **Assessment** | `skills/assess/SKILL.md` | `assessment.md` | `design-decisions.md` | Explorer, Researcher-Alpha |
11
- | 3 | **Implementation** | `skills/implement/SKILL.md` | `progress.md` | `assessment.md` | Implementer, Frontend |
12
- | 4 | **Verification** | `skills/verify/SKILL.md` | `verify-report.md` | `progress.md` | Code-Reviewer-Alpha, Security |
9
+ | 1 | **Design Gate** | `steps/design/README.md` | `design-decisions.md` | — | Researcher-Alpha/Beta/Gamma/Delta |
10
+ | 2 | **Assessment** | `steps/assess/README.md` | `assessment.md` | `design-decisions.md` | Explorer, Researcher-Alpha |
11
+ | 3 | **Implementation** | `steps/implement/README.md` | `progress.md` | `assessment.md` | Implementer, Frontend |
12
+ | 4 | **Verification** | `steps/verify/README.md` | `verify-report.md` | `progress.md` | Code-Reviewer-Alpha, Security |
13
13
 
14
14
  ## How It Works
15
15
 
16
- Each step has a **SKILL.md** file that contains the detailed instructions for the agent(s) executing that step. The Orchestrator reads the SKILL.md via `flow_read_skill` and delegates work accordingly.
16
+ Each 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.
17
17
 
18
18
  ### Step 1: Design Gate
19
19
  - **Auto-skips** for bug fixes and refactors (produces a minimal `design-decisions.md` noting it was skipped)
20
20
  - For small features: runs quick brainstorming, FORGE classification, and optional decision protocol
21
- - Read `skills/design/SKILL.md` for the full decision tree
21
+ - Read `steps/design/README.md` for the full decision tree
22
22
 
23
23
  ### Step 2: Assessment
24
24
  - Explore the codebase to understand scope and impact
@@ -39,8 +39,8 @@ Each step has a **SKILL.md** file that contains the detailed instructions for th
39
39
 
40
40
  When the Orchestrator activates a step:
41
41
 
42
- 1. **Read the skill first** — `flow_read_skill` returns the SKILL.md for the current step
43
- 2. **Follow skill instructions** — the SKILL.md is the primary guide for what to do
42
+ 1. **Read the instruction first** — `flow_read_instruction` returns the README.md for the current step
43
+ 2. **Follow step instructions** — the README.md is the primary guide for what to do
44
44
  3. **Delegate to listed agents** — each step lists which agents are appropriate
45
45
  4. **Produce the required artifact** — the step's `produces` field specifies what file to create in the artifacts directory
46
46
  5. **Check dependencies** — the step's `requires` field lists artifacts from previous steps that must exist
@@ -6,7 +6,7 @@
6
6
  {
7
7
  "id": "design",
8
8
  "name": "Design Gate",
9
- "skill": "skills/design/SKILL.md",
9
+ "instruction": "steps/design/README.md",
10
10
  "produces": ["design-decisions.md"],
11
11
  "requires": [],
12
12
  "agents": ["Researcher-Alpha", "Researcher-Beta", "Researcher-Gamma", "Researcher-Delta"],
@@ -15,7 +15,7 @@
15
15
  {
16
16
  "id": "assess",
17
17
  "name": "Assessment",
18
- "skill": "skills/assess/SKILL.md",
18
+ "instruction": "steps/assess/README.md",
19
19
  "produces": ["assessment.md"],
20
20
  "requires": ["design-decisions.md"],
21
21
  "agents": ["Explorer", "Researcher-Alpha"],
@@ -24,7 +24,7 @@
24
24
  {
25
25
  "id": "implement",
26
26
  "name": "Implementation",
27
- "skill": "skills/implement/SKILL.md",
27
+ "instruction": "steps/implement/README.md",
28
28
  "produces": ["progress.md"],
29
29
  "requires": ["assessment.md"],
30
30
  "agents": ["Implementer", "Frontend"],
@@ -33,7 +33,7 @@
33
33
  {
34
34
  "id": "verify",
35
35
  "name": "Verification",
36
- "skill": "skills/verify/SKILL.md",
36
+ "instruction": "steps/verify/README.md",
37
37
  "produces": ["verify-report.md"],
38
38
  "requires": ["progress.md"],
39
39
  "agents": ["Code-Reviewer-Alpha", "Security"],
@@ -14,6 +14,19 @@ Analyze the task requirements and codebase to produce a clear, actionable assess
14
14
  - User's task description or issue reference
15
15
  - Codebase (accessed via aikit MCP tools)
16
16
 
17
+ ## Prerequisites Check
18
+
19
+ Before executing this step, verify:
20
+
21
+ - [ ] Design decisions documented (from the design step)
22
+ - [ ] FORGE classification determined (tier assigned)
23
+ - [ ] If brainstorming was done, session outcomes are recorded
24
+
25
+ If any prerequisites are missing or incomplete:
26
+ 1. Inform the Orchestrator with specifics about what's missing
27
+ 2. Recommend `flow_step({ action: 'redo' })` on the **design** step
28
+ 3. Do NOT proceed with partial inputs — quality degrades downstream
29
+
17
30
  ## Process
18
31
 
19
32
  1. **Parse the goal** — Extract what needs to change, success criteria, and constraints
@@ -65,6 +78,8 @@ Load these skills BEFORE executing this step:
65
78
  | `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 |
66
79
  | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
67
80
  | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
81
+ | `c4-architecture` | C4 model architecture diagrams — system context, container, component, deployment views | When visualizing system structure during assessment |
82
+ | `adr-skill` | Architecture Decision Records — create, review, maintain ADRs | When assessment reveals non-trivial design decisions |
68
83
 
69
84
  ### Presentation Rules
70
85
  - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
@@ -80,3 +95,13 @@ Load these skills BEFORE executing this step:
80
95
  - [ ] Risks documented with mitigations
81
96
  - [ ] No unresolved open questions that block implementation
82
97
  - [ ] `.spec/<slug>/assessment.md` written
98
+
99
+ ## Knowledge Capture
100
+
101
+ Before completing this step, persist important findings using `remember()`:
102
+
103
+ - **Codebase discoveries**: File locations, architecture patterns, or dependency relationships found during assessment
104
+ - **Problem diagnosis**: Root cause analysis, contributing factors, and affected components
105
+ - **Scope decisions**: What's in scope, what's explicitly excluded, and why
106
+
107
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -73,3 +73,35 @@ When complete, report status:
73
73
  ## Agents
74
74
 
75
75
  - `Researcher-Alpha`, `Researcher-Beta`, `Researcher-Gamma`, `Researcher-Delta` — for parallel research during decision protocol
76
+
77
+ ## Foundation Integration
78
+
79
+ Load these skills BEFORE executing this step:
80
+
81
+ | Skill | Purpose | When |
82
+ |-------|---------|------|
83
+ | `aikit` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
84
+ | `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 |
85
+ | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
86
+ | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
87
+ | `c4-architecture` | C4 model architecture diagrams — system context, container, component, deployment views | When visualizing system structure during design |
88
+ | `adr-skill` | Architecture Decision Records — create, review, maintain ADRs | When making non-trivial design or technology decisions |
89
+
90
+ ### Presentation Rules
91
+ - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
92
+ - Assessments, reports, comparisons, reviews, status boards → `present({ format: "html" })`
93
+ - Tables, charts, progress tracking, code review findings → always present
94
+ - Artifact content and summaries → present with structured layout
95
+ - Only use plain text for brief confirmations and simple questions
96
+
97
+ ## Completion Criteria
98
+
99
+ ## Knowledge Capture
100
+
101
+ Before completing this step, persist important findings using `remember()`:
102
+
103
+ - **Design decisions**: Chosen approach and alternatives considered with trade-offs
104
+ - **Architecture patterns**: New patterns introduced or existing patterns that must be followed
105
+ - **Constraints discovered**: Technical limitations, compatibility requirements, or performance boundaries
106
+
107
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -13,6 +13,19 @@ Execute the implementation plan from the assessment, writing production code and
13
13
 
14
14
  - `.spec/<slug>/assessment.md` — the approach, affected files, and risks
15
15
 
16
+ ## Prerequisites Check
17
+
18
+ Before executing this step, verify:
19
+
20
+ - [ ] Assessment complete and scope approved (from the assess step)
21
+ - [ ] Files-to-modify list is clear and bounded
22
+ - [ ] `check({})` baseline captured (know what currently passes)
23
+
24
+ If any prerequisites are missing or incomplete:
25
+ 1. Inform the Orchestrator with specifics about what's missing
26
+ 2. Recommend `flow_step({ action: 'redo' })` on the **assess** step
27
+ 3. Do NOT proceed with partial inputs — quality degrades downstream
28
+
16
29
  ## Process
17
30
 
18
31
  1. **Read assessment** — Load `.spec/<slug>/assessment.md` and internalize the approach
@@ -67,6 +80,7 @@ Load these skills BEFORE executing this step:
67
80
  | `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 |
68
81
  | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
69
82
  | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
83
+ | `session-handoff` | Context preservation for session transfers | When implementation is long-running and context may fill up |
70
84
 
71
85
  ### Presentation Rules
72
86
  - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
@@ -103,3 +117,13 @@ Follow the `multi-agents-development` skill patterns for dispatch:
103
117
  - [ ] `test_run({})` passes (no test failures)
104
118
  - [ ] No files modified outside assessed scope
105
119
  - [ ] `.spec/<slug>/progress.md` written
120
+
121
+ ## Knowledge Capture
122
+
123
+ Before completing this step, persist important findings using `remember()`:
124
+
125
+ - **Implementation decisions**: Why specific approaches were chosen over alternatives
126
+ - **Patterns established**: New conventions or patterns that future code should follow
127
+ - **Gotchas encountered**: Edge cases, workarounds, or non-obvious behaviors discovered during implementation
128
+
129
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -14,6 +14,19 @@ Validate that the implementation meets the original requirements, passes all qua
14
14
  - `.spec/<slug>/assessment.md` — original requirements and approach
15
15
  - `.spec/<slug>/progress.md` — what was implemented and any deviations
16
16
 
17
+ ## Prerequisites Check
18
+
19
+ Before executing this step, verify:
20
+
21
+ - [ ] Implementation complete (from the implement step)
22
+ - [ ] `check({})` + `test_run({})` pass at baseline
23
+ - [ ] Changed files list is available for blast radius analysis
24
+
25
+ If any prerequisites are missing or incomplete:
26
+ 1. Inform the Orchestrator with specifics about what's missing
27
+ 2. Recommend `flow_step({ action: 'redo' })` on the **implement** step
28
+ 3. Do NOT proceed with partial inputs — quality degrades downstream
29
+
17
30
  ## Process
18
31
 
19
32
  1. **Load context** — Read assessment and progress artifacts
@@ -70,6 +83,8 @@ Load these skills BEFORE executing this step:
70
83
  | `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 |
71
84
  | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
72
85
  | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
86
+ | `lesson-learned` | Extract engineering lessons from completed work via git history | After verification completes — capture principles from what was built |
87
+ | `session-handoff` | Context preservation for session transfers | When verification is the final step and session context should be saved |
73
88
 
74
89
  ### Presentation Rules
75
90
  - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
@@ -94,3 +109,13 @@ After all reviews complete:
94
109
  - [ ] Security review complete
95
110
  - [ ] Blast radius assessed
96
111
  - [ ] `.spec/<slug>/verify-report.md` written with clear PASS/FAIL verdict
112
+
113
+ ## Knowledge Capture
114
+
115
+ Before completing this step, persist important findings using `remember()`:
116
+
117
+ - **Test coverage gaps**: Areas that couldn't be fully tested and why
118
+ - **Quality findings**: Issues found during verification and their resolutions
119
+ - **Session checkpoint**: Summarize what was accomplished, decisions made, and any remaining work
120
+
121
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -56,8 +56,8 @@ You orchestrate the full development lifecycle: **planning → implementation
56
56
 
57
57
  1. `flow_status` — check for an active flow from a previous session
58
58
  2. **If active flow exists:**
59
- - Note current step name and skill path
60
- - Read the current step skill with `flow_read_skill`
59
+ - Note current step name and instruction path
60
+ - Read the current step instruction with `flow_read_instruction`
61
61
  - Follow its instructions
62
62
  - When complete: `flow_step({ action: 'next' })`
63
63
  3. **If NO active flow:**
@@ -80,8 +80,8 @@ You orchestrate the full development lifecycle: **planning → implementation
80
80
 
81
81
  For EACH step in the active flow:
82
82
 
83
- 1. `flow_read_skill` — read the current step's SKILL.md
84
- 2. Follow the skill's instructions — delegate work to the appropriate agents
83
+ 1. `flow_read_instruction` — read the current step's README.md
84
+ 2. Follow the step's instructions — delegate work to the appropriate agents
85
85
  3. Apply **Orchestrator Protocols** (PRE-DISPATCH GATE, FORGE, review cycle) during execution
86
86
  4. When the step is complete and results are approved:
87
87
  - `flow_step({ action: 'next' })` to advance
@@ -156,7 +156,7 @@ Batch 2 (after batch 1):
156
156
  | `flow_step` | Advance: next, skip, or redo current step |
157
157
  | `flow_status` | Check current execution state |
158
158
  | `flow_reset` | Clear flow state to start over |
159
- | `flow_read_skill` | Read the skill content for the current step |
159
+ | `flow_read_instruction` | Read the instruction content for the current step |
160
160
 
161
161
  ## Emergency: STOP → ASSESS → CONTAIN → RECOVER → DOCUMENT
162
162
 
@@ -248,7 +248,7 @@ Before every tool call, verify:
248
248
  ## Flows
249
249
 
250
250
  This project uses aikit's pluggable flow system. Check flow status with the `flow_status` MCP tool.
251
- If a flow is active, follow the current step's skill instructions. Advance with `flow_step({ action: 'next' })`.
251
+ If a flow is active, follow the current step's instructions. Advance with `flow_step({ action: 'next' })`.
252
252
  Use `flow_list` to see available flows and `flow_start` to begin one.
253
253
 
254
254
 
@@ -44,8 +44,8 @@ The Planner is typically activated by the Orchestrator as part of a flow step (e
44
44
 
45
45
  **When activated as part of a flow:**
46
46
  1. `flow_status` — check current step context and which flow is active
47
- 2. `flow_read_skill` — read the current step's SKILL.md for specific instructions
48
- 3. Follow the skill's instructions as the primary guide, applying Planner methodology on top
47
+ 2. `flow_read_instruction` — read the current step's README.md for specific instructions
48
+ 3. Follow the step's instructions as the primary guide, applying Planner methodology on top
49
49
  4. Read the flow's README.md for overall context on how the flow works
50
50
  5. Produce required artifacts (as specified by the flow step's `produces` field)
51
51
  6. When complete, report status to Orchestrator: `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED`
@@ -60,7 +60,7 @@ You may be invoked in two modes:
60
60
 
61
61
  ```
62
62
  flow_status({}) # Check/resume active flow FIRST
63
- # If flow active → flow_read_skill({ step }) → follow skill instructions
63
+ # If flow active → flow_read_instruction({ step }) → follow step instructions
64
64
  status({}) # Check AI Kit health + onboard state
65
65
  # If onboard not run → onboard({ path: "." }) # First-time codebase analysis
66
66
  flow_list({}) # See available flows
@@ -73,7 +73,7 @@ search({ query: "SESSION CHECKPOINT", origin: "curated" }) # Resume prior wo
73
73
 
74
74
  | Category | Tools | Purpose |
75
75
  |----------|-------|---------|
76
- | Flows | `flow_list`, `flow_info`, `flow_start`, `flow_step`, `flow_status`, `flow_read_skill`, `flow_reset` | Structured multi-step workflows |
76
+ | Flows | `flow_list`, `flow_info`, `flow_start`, `flow_step`, `flow_status`, `flow_read_instruction`, `flow_reset` | Structured multi-step workflows |
77
77
 
78
78
  ---
79
79
 
@@ -262,7 +262,7 @@ Preferred: let `scripts/new_adr.js --update-index` do it. Otherwise:
262
262
  When introducing ADRs to a repo that has none:
263
263
 
264
264
  ```bash
265
- node /path/to/adr-skill/scripts/bootstrap_adr.js
265
+ node scripts/bootstrap_adr.js
266
266
  ```
267
267
 
268
268
  This creates the directory, an index file, and a filled-out first ADR ("Adopt architecture decision records") with real content explaining why the team is using ADRs. Use `--json` for machine-readable output. Use `--dir` to override the directory name.
@@ -306,20 +306,20 @@ Date prefixes are local to each category. Choose a categorization scheme early (
306
306
 
307
307
  ### Script Usage
308
308
 
309
- From the target repo root:
309
+ From the directory that contains this skill's `scripts/` folder:
310
310
 
311
311
  ```bash
312
312
  # Simple ADR
313
- node /path/to/adr-skill/scripts/new_adr.js --title "Choose database" --status proposed
313
+ node scripts/new_adr.js --title "Choose database" --status proposed
314
314
 
315
315
  # MADR-style with options
316
- node /path/to/adr-skill/scripts/new_adr.js --title "Choose database" --template madr --status proposed
316
+ node scripts/new_adr.js --title "Choose database" --template madr --status proposed
317
317
 
318
318
  # With index update
319
- node /path/to/adr-skill/scripts/new_adr.js --title "Choose database" --status proposed --update-index
319
+ node scripts/new_adr.js --title "Choose database" --status proposed --update-index
320
320
 
321
321
  # Bootstrap a new repo
322
- node /path/to/adr-skill/scripts/bootstrap_adr.js --dir docs/decisions
322
+ node scripts/bootstrap_adr.js --dir docs/decisions
323
323
  ```
324
324
 
325
325
  Notes:
@@ -43,7 +43,7 @@ core → store → embeddings → chunker → indexer → analyzers → tools
43
43
  ### Start (do ALL)
44
44
  ```
45
45
  flow_status({}) # Check/resume active flow FIRST
46
- # If flow active → flow_read_skill({ step }) → follow skill instructions
46
+ # If flow active → flow_read_instruction({ step }) → follow step instructions
47
47
  status({}) # Check AI Kit health + onboard state
48
48
  # If onboard not run → onboard({ path: "." }) # First-time codebase analysis
49
49
  flow_list({}) # See available flows
@@ -189,7 +189,7 @@ Lane actions: `create` (copy files to lane), `list`, `status` (modified/added/de
189
189
  | `flow_start` | `aikit flow start` | Start a named flow |
190
190
  | `flow_step` | `aikit flow step` | Advance, skip, or redo the current step |
191
191
  | `flow_status` | `aikit flow status` | Check if a flow is active and view the current step |
192
- | `flow_read_skill` | `aikit flow read-skill` | Read the current step's skill file content directly |
192
+ | `flow_read_instruction` | `aikit flow read-instruction` | Read the current step's instruction file content directly |
193
193
  | `flow_reset` | `aikit flow reset` | Clear flow state to start over |
194
194
 
195
195
  ### Presentation (1)
@@ -219,8 +219,8 @@ Flows are multi-step guided workflows that structure complex tasks. Each step ha
219
219
  flow_list() # See available flows
220
220
  flow_info({ flow: "aikit:basic" }) # View steps, skills, agents
221
221
  flow_start({ flow: "aikit:basic" }) # Start — sets current step to first
222
- flow_read_skill({ step: "assess" }) # Read current step's skill instructions
223
- # ... do the work described in the skill ...
222
+ flow_read_instruction({ step: "assess" }) # Read current step's instructions
223
+ # ... do the work described in the instruction ...
224
224
  flow_step({ action: "next" }) # Advance to next step
225
225
  flow_step({ action: "skip" }) # Skip current step
226
226
  flow_step({ action: "redo" }) # Redo current step
@@ -241,14 +241,14 @@ artifacts_dir: .spec
241
241
  steps:
242
242
  - id: design
243
243
  name: Design
244
- skill: skills/design/SKILL.md
244
+ instruction: steps/design/README.md
245
245
  description: "Create the design document"
246
246
  produces: [design.md]
247
247
  requires: []
248
248
  agents: [Planner]
249
249
  - id: implement
250
250
  name: Implement
251
- skill: skills/implement/SKILL.md
251
+ instruction: steps/implement/README.md
252
252
  description: "Implement the design"
253
253
  produces: [code]
254
254
  requires: [design]
@@ -271,7 +271,7 @@ install: []
271
271
  ### Agent-Flow Integration
272
272
 
273
273
  - All code agents have a "Flows" section instructing them to check `flow_status()` first
274
- - If a flow is active, the agent follows the current step's skill via `flow_read_skill()`
274
+ - If a flow is active, the agent follows the current step's instruction via `flow_read_instruction()`
275
275
  - After completing a step's work, advance with `flow_step({ action: "next" })`
276
276
  - The **Orchestrator** selects and starts flows; other agents follow them
277
277
  - The **Orchestrator** specifies `aikit` skill loading — all agents should load `aikit` skill to access flow tools
@@ -528,7 +528,7 @@ Flows are structured multi-step workflows that guide agents through complex task
528
528
  | `flow_info` | Get flow details including steps and skill paths |
529
529
  | `flow_start` | Start a named flow |
530
530
  | `flow_step` | Advance: `next`, `skip`, or `redo` current step |
531
- | `flow_read_skill` | Read the current step's skill file content directly |
531
+ | `flow_read_instruction` | Read the current step's instruction file content directly |
532
532
  | `flow_reset` | Clear flow state to start over |
533
533
 
534
534
  ### Flow Selection
@@ -545,7 +545,7 @@ Flows are structured multi-step workflows that guide agents through complex task
545
545
  ### Flow Lifecycle
546
546
 
547
547
  1. **Start**: `flow_list({})` → choose flow → `flow_start({ flow: "<name>" })`
548
- 2. **Each step**: `flow_read_skill({ step: "<name>" })` → follow skill instructions → complete work
548
+ 2. **Each step**: `flow_read_instruction({ step: "<name>" })` → follow step instructions → complete work
549
549
  3. **Advance**: `flow_step({ action: "next" })` → repeat from step 2
550
- 4. **Resume**: `flow_status({})` → if active, `flow_read_skill` for current step → continue
550
+ 4. **Resume**: `flow_status({})` → if active, `flow_read_instruction` for current step → continue
551
551
  5. **Reset**: `flow_reset({})` if you need to start over
@@ -90,7 +90,7 @@ digraph brainstorming_simple {
90
90
 
91
91
  1. **Explore project context** — check files, docs, recent commits
92
92
  2. **Assess scope** — if multiple independent subsystems, decompose before detailing (see below)
93
- 3. **Offer visual companion** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. See `visual-companion.md`.
93
+ 3. **Offer visual presentation support** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. Use `present({ format: "html" })` to display brainstorming results as a rich visual dashboard.
94
94
  4. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
95
95
  5. **Propose 2-3 approaches via Decision Protocol** — launch ALL 4 Researcher variants in parallel to independently generate approaches. Synthesize their output into deduplicated options with trade-offs and your recommendation. Present agreements and disagreements to the user. *(See "Decision Protocol Integration" below.)*
96
96
  6. **Present design** — in sections scaled to their complexity, get user approval after each section
@@ -122,7 +122,7 @@ digraph brainstorming_advanced {
122
122
  "Assess scope" [shape=diamond];
123
123
  "Decompose into sub-projects" [shape=box];
124
124
  "Visual questions ahead?" [shape=diamond];
125
- "Offer Visual Companion\n(own message)" [shape=box];
125
+ "Offer Visual Presentation\n(own message)" [shape=box];
126
126
  "Ask clarifying questions" [shape=box];
127
127
  "Decision Protocol:\n4 Researchers in parallel" [shape=box, style=bold];
128
128
  "Synthesize approaches" [shape=box];
@@ -138,9 +138,9 @@ digraph brainstorming_advanced {
138
138
  "Assess scope" -> "Decompose into sub-projects" [label="too large"];
139
139
  "Assess scope" -> "Visual questions ahead?" [label="right-sized"];
140
140
  "Decompose into sub-projects" -> "Visual questions ahead?" [label="first sub-project"];
141
- "Visual questions ahead?" -> "Offer Visual Companion\n(own message)" [label="yes"];
141
+ "Visual questions ahead?" -> "Offer Visual Presentation\n(own message)" [label="yes"];
142
142
  "Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
143
- "Offer Visual Companion\n(own message)" -> "Ask clarifying questions";
143
+ "Offer Visual Presentation\n(own message)" -> "Ask clarifying questions";
144
144
  "Ask clarifying questions" -> "Decision Protocol:\n4 Researchers in parallel";
145
145
  "Decision Protocol:\n4 Researchers in parallel" -> "Synthesize approaches";
146
146
  "Synthesize approaches" -> "Present design sections";
@@ -242,18 +242,16 @@ Wait for the user's response. If they request changes, make them and re-run the
242
242
  - **Incremental validation** — Present design, get approval before moving on
243
243
  - **Be flexible** — Go back and clarify when something doesn't make sense
244
244
 
245
- ## Visual Companion (Advanced Mode Only)
245
+ ## Visual Presentation Support (Advanced Mode Only)
246
246
 
247
- A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
247
+ Use the `present` MCP tool for showing mockups, diagrams, and visual options during brainstorming. It is available as a tool, not a separate mode. Choosing this means you can present rich visual output when it helps; it does NOT mean every question should become visual.
248
248
 
249
- **Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
250
- > "Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. The browser opens automatically when I start the visual companion. This feature is still new and can be token-intensive. Want to try it?"
249
+ **Offering visual presentation:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
250
+ > "Some of what we're working on might be easier to explain visually. I can use `present({ format: \"html\" })` to show mockups, diagrams, comparisons, and other visuals as we go. Want me to use that when helpful?"
251
251
 
252
252
  **This offer MUST be its own message.** Do not combine it with clarifying questions, context summaries, or any other content. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.
253
253
 
254
- **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
254
+ **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use visual output or plain chat. The test: **would the user understand this better by seeing it than reading it?**
255
255
 
256
- - **Use the browser** for visual content — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
257
- - **Use the terminal** for text content — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
258
-
259
- If they agree to the companion, read `visual-companion.md` for the detailed setup and usage guide.
256
+ - **Use `present({ format: "html" })`** for visual content — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
257
+ - **Use regular chat** for text content — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
@@ -12,6 +12,7 @@ Generate software architecture documentation using C4 model diagrams in Mermaid
12
12
  1. **Understand scope** - Determine which C4 level(s) are needed based on audience
13
13
  2. **Analyze codebase** - Explore the system to identify components, containers, and relationships
14
14
  3. **Generate diagrams** - Create Mermaid C4 diagrams at appropriate abstraction levels
15
+ > **Tip:** Use `present({ format: "html" })` to render diagrams as interactive visual output, rather than raw Mermaid code blocks. This provides a better viewing experience for stakeholders.
15
16
  4. **Document** - Write diagrams to markdown files with explanatory context
16
17
 
17
18
  ## C4 Diagram Levels