@vpxa/aikit 0.1.19 → 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 (46) 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/adapters/claude-code.mjs +4 -22
  16. package/scaffold/definitions/bodies.mjs +74 -62
  17. package/scaffold/definitions/plugins.mjs +92 -0
  18. package/scaffold/definitions/protocols.mjs +2 -2
  19. package/scaffold/flows/aikit-advanced/README.md +70 -0
  20. package/scaffold/flows/aikit-advanced/flow.json +15 -6
  21. package/scaffold/flows/aikit-advanced/steps/design/README.md +164 -0
  22. package/scaffold/flows/aikit-advanced/{skills/execute/SKILL.md → steps/execute/README.md} +19 -0
  23. package/scaffold/flows/aikit-advanced/{skills/plan/SKILL.md → steps/plan/README.md} +20 -0
  24. package/scaffold/flows/aikit-advanced/{skills/spec/SKILL.md → steps/spec/README.md} +19 -0
  25. package/scaffold/flows/aikit-advanced/{skills/task/SKILL.md → steps/task/README.md} +18 -0
  26. package/scaffold/flows/aikit-advanced/{skills/verify/SKILL.md → steps/verify/README.md} +21 -0
  27. package/scaffold/flows/aikit-basic/README.md +51 -0
  28. package/scaffold/flows/aikit-basic/flow.json +13 -4
  29. package/scaffold/flows/aikit-basic/{skills/assess/SKILL.md → steps/assess/README.md} +25 -0
  30. package/scaffold/flows/aikit-basic/steps/design/README.md +107 -0
  31. package/scaffold/flows/aikit-basic/{skills/implement/SKILL.md → steps/implement/README.md} +24 -0
  32. package/scaffold/flows/aikit-basic/{skills/verify/SKILL.md → steps/verify/README.md} +25 -0
  33. package/scaffold/general/agents/Orchestrator.agent.md +61 -53
  34. package/scaffold/general/agents/Planner.agent.md +12 -8
  35. package/scaffold/general/agents/_shared/code-agent-base.md +2 -2
  36. package/scaffold/general/skills/adr-skill/SKILL.md +6 -6
  37. package/scaffold/general/skills/aikit/SKILL.md +10 -10
  38. package/scaffold/general/skills/brainstorming/SKILL.md +11 -13
  39. package/scaffold/general/skills/c4-architecture/SKILL.md +1 -0
  40. package/scaffold/general/skills/requirements-clarity/SKILL.md +5 -3
  41. package/scaffold/general/skills/session-handoff/SKILL.md +2 -0
  42. package/scaffold/general/skills/brainstorming/scripts/frame-template.html +0 -365
  43. package/scaffold/general/skills/brainstorming/scripts/helper.js +0 -216
  44. package/scaffold/general/skills/brainstorming/scripts/server.cjs +0 -9
  45. package/scaffold/general/skills/brainstorming/scripts/server.src.cjs +0 -249
  46. package/scaffold/general/skills/brainstorming/visual-companion.md +0 -430
@@ -0,0 +1,70 @@
1
+ # aikit:advanced — Full Development Flow
2
+
3
+ Full development flow for **new features, API design, and architecture changes**.
4
+
5
+ ## Steps
6
+
7
+ | # | Step | Skill | Produces | Requires | Agents |
8
+ |---|------|-------|----------|----------|--------|
9
+ | 1 | **Design Gate** | `steps/design/README.md` | `design-decisions.md` | — | Researcher-Alpha/Beta/Gamma/Delta |
10
+ | 2 | **Specification** | `steps/spec/README.md` | `spec.md` | `design-decisions.md` | Researcher-Alpha |
11
+ | 3 | **Planning** | `steps/plan/README.md` | `plan.md` | `spec.md` | Planner, Explorer |
12
+ | 4 | **Task Breakdown** | `steps/task/README.md` | `tasks.md` | `plan.md` | Planner, Architect-Reviewer-Alpha |
13
+ | 5 | **Execution** | `steps/execute/README.md` | `progress.md` | `tasks.md` | Orchestrator, Implementer, Frontend, Refactor |
14
+ | 6 | **Verification** | `steps/verify/README.md` | `verify-report.md` | `progress.md` | Code-Reviewer-Alpha/Beta, Architect-Reviewer-Alpha/Beta, Security |
15
+
16
+ ## How It Works
17
+
18
+ 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.
19
+
20
+ ### Step 1: Design Gate
21
+ - Full brainstorming session for new features and architectural changes
22
+ - FORGE classification (`forge_classify`) + grounding (`forge_ground`) for complex tasks
23
+ - Parallel 4-researcher decision protocol for non-trivial technical decisions
24
+ - ADR generation for critical-tier tasks
25
+ - **Mandatory user stop** before proceeding — design decisions must be approved
26
+ - Read `steps/design/README.md` for the full protocol
27
+
28
+ ### Step 2: Specification
29
+ - Elicit requirements from the user, clarify scope
30
+ - Define acceptance criteria and constraints
31
+ - Build on design decisions from the previous step
32
+
33
+ ### Step 3: Planning
34
+ - Deep codebase analysis using `search`, `scope_map`, `trace`, `analyze_*`
35
+ - Design architecture based on spec and design decisions
36
+ - Create comprehensive implementation plan with file-level changes
37
+
38
+ ### Step 4: Task Breakdown
39
+ - Break the plan into ordered, atomic implementation tasks
40
+ - Define dependencies between tasks
41
+ - Identify parallel batches for multi-agent execution
42
+ - Architecture review of the task structure
43
+
44
+ ### Step 5: Execution
45
+ - Orchestrator dispatches agents in parallel batches per the task breakdown
46
+ - Each agent gets a scoped task (1-3 files) with clear acceptance criteria
47
+ - TDD: write tests first, then implement
48
+ - Per-batch review cycle: Code Review (dual) → Arch Review → Security → Evidence Gate
49
+
50
+ ### Step 6: Verification
51
+ - Dual code review (Code-Reviewer-Alpha + Beta)
52
+ - Architecture review (Architect-Reviewer-Alpha + Beta)
53
+ - Security review
54
+ - Run `check({})` + `test_run({})` + `blast_radius({})`
55
+ - `evidence_map({ action: "gate" })` for final quality gate
56
+
57
+ ## Using Skills Inside Steps
58
+
59
+ When the Orchestrator activates a step:
60
+
61
+ 1. **Read the instruction first** — `flow_read_instruction` returns the README.md for the current step
62
+ 2. **Follow step instructions** — the README.md is the primary guide for what to do
63
+ 3. **Delegate to listed agents** — each step lists which agents are appropriate
64
+ 4. **Produce the required artifact** — the step's `produces` field specifies what file to create in the artifacts directory
65
+ 5. **Check dependencies** — the step's `requires` field lists artifacts from previous steps that must exist
66
+ 6. **Report status** — agents report `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED` to the Orchestrator
67
+
68
+ ## Artifacts
69
+
70
+ All artifacts are stored in the `.spec/` directory relative to the project root.
@@ -3,19 +3,28 @@
3
3
  "version": "0.1.0",
4
4
  "description": "Full development flow for new features, API design, and architecture changes",
5
5
  "steps": [
6
+ {
7
+ "id": "design",
8
+ "name": "Design Gate",
9
+ "instruction": "steps/design/README.md",
10
+ "produces": ["design-decisions.md"],
11
+ "requires": [],
12
+ "agents": ["Researcher-Alpha", "Researcher-Beta", "Researcher-Gamma", "Researcher-Delta"],
13
+ "description": "Full brainstorming, FORGE classification, decision protocol with parallel research. ADR for critical-tier tasks."
14
+ },
6
15
  {
7
16
  "id": "spec",
8
17
  "name": "Specification",
9
- "skill": "skills/spec/SKILL.md",
18
+ "instruction": "steps/spec/README.md",
10
19
  "produces": ["spec.md"],
11
- "requires": [],
20
+ "requires": ["design-decisions.md"],
12
21
  "agents": ["Researcher-Alpha"],
13
22
  "description": "Elicit requirements, clarify scope, define acceptance criteria"
14
23
  },
15
24
  {
16
25
  "id": "plan",
17
26
  "name": "Planning",
18
- "skill": "skills/plan/SKILL.md",
27
+ "instruction": "steps/plan/README.md",
19
28
  "produces": ["plan.md"],
20
29
  "requires": ["spec.md"],
21
30
  "agents": ["Planner", "Explorer"],
@@ -24,7 +33,7 @@
24
33
  {
25
34
  "id": "task",
26
35
  "name": "Task Breakdown",
27
- "skill": "skills/task/SKILL.md",
36
+ "instruction": "steps/task/README.md",
28
37
  "produces": ["tasks.md"],
29
38
  "requires": ["plan.md"],
30
39
  "agents": ["Planner", "Architect-Reviewer-Alpha"],
@@ -33,7 +42,7 @@
33
42
  {
34
43
  "id": "execute",
35
44
  "name": "Execution",
36
- "skill": "skills/execute/SKILL.md",
45
+ "instruction": "steps/execute/README.md",
37
46
  "produces": ["progress.md"],
38
47
  "requires": ["tasks.md"],
39
48
  "agents": ["Orchestrator", "Implementer", "Frontend", "Refactor"],
@@ -42,7 +51,7 @@
42
51
  {
43
52
  "id": "verify",
44
53
  "name": "Verification",
45
- "skill": "skills/verify/SKILL.md",
54
+ "instruction": "steps/verify/README.md",
46
55
  "produces": ["verify-report.md"],
47
56
  "requires": ["progress.md"],
48
57
  "agents": [
@@ -0,0 +1,164 @@
1
+ # Design Gate — Advanced Flow
2
+
3
+ Full design gate for new features, API design, and architecture changes. Runs brainstorming, decision protocol, and FORGE classification before specification begins.
4
+
5
+ ## When This Step Runs
6
+
7
+ This is the **first step** of the `aikit:advanced` flow. It runs before specification.
8
+
9
+ ## Instructions
10
+
11
+ ### 1. Task Classification
12
+
13
+ Classify the task:
14
+
15
+ | Category | Indicators | Action |
16
+ |----------|-----------|--------|
17
+ | **Bug fix** | Error, regression, "fix" — wrong flow, should use `aikit:basic` | → Note mismatch, still run Quick Design |
18
+ | **New feature** | New behavior, new API, new component | → Run **Full Design** below |
19
+ | **Architecture change** | Restructure, migration, new pattern, cross-cutting | → Run **Full Design** with architecture focus |
20
+
21
+ ### 2. FORGE Classification
22
+
23
+ Run `forge_classify({ task: "<task description>", files: [<relevant files>] })` to determine the complexity tier.
24
+
25
+ | Tier | Meaning | Design Depth |
26
+ |------|---------|-------------|
27
+ | **Floor** | Low risk, well-understood | Quick brainstorm, 1-2 decisions |
28
+ | **Standard** | Moderate complexity | Full brainstorm, parallel research, decision protocol |
29
+ | **Critical** | High risk, contract/security implications | Deep brainstorm, 4-researcher parallel review, ADR required |
30
+
31
+ ### 3. Brainstorming Session
32
+
33
+ Load the `brainstorming` skill and conduct a structured brainstorming session:
34
+
35
+ 1. **Intent Discovery** — What is the user trying to achieve? What problem does this solve?
36
+ 2. **Constraint Mapping** — Technical constraints, time constraints, compatibility requirements
37
+ 3. **Approach Exploration** — Generate 2-4 possible approaches
38
+ 4. **Trade-off Analysis** — Compare approaches on: complexity, maintainability, performance, risk
39
+
40
+ For **Critical** tier tasks, also explore:
41
+ - Security implications
42
+ - Backward compatibility
43
+ - Migration path
44
+ - Rollback strategy
45
+
46
+ ### 4. Decision Protocol (Standard & Critical tiers)
47
+
48
+ When technical decisions need resolution:
49
+
50
+ 1. **Identify decisions** — List each decision point with 2+ viable options
51
+ 2. **Parallel research** — Delegate to Researcher agents (2 for Standard, 4 for Critical):
52
+ - Researcher-Alpha: Deep analysis of primary approach
53
+ - Researcher-Beta: Trade-offs and edge cases of alternatives
54
+ - Researcher-Gamma: Cross-domain patterns and precedents
55
+ - Researcher-Delta: Feasibility and performance implications
56
+ 3. **Synthesize** — Combine researcher findings into a recommendation per decision
57
+ 4. **ADR** (Critical tier) — Load `adr-skill` and create an Architecture Decision Record
58
+
59
+ ### 5. FORGE Ground (Standard & Critical tiers)
60
+
61
+ Run `forge_ground({ task, root_path: "." })` to:
62
+ - Scope the affected files and modules
63
+ - Identify unknowns and risks
64
+ - Load existing constraints and conventions
65
+
66
+ **Auto-upgrade check**: If `forge_ground` reveals contract-type unknowns or security concerns not caught by initial `forge_classify`, recommend tier upgrade.
67
+
68
+ ### 6. Produce `design-decisions.md`
69
+
70
+ ```markdown
71
+ ## Design Decisions
72
+
73
+ ### FORGE Assessment
74
+ - **Tier**: {Floor | Standard | Critical}
75
+ - **Rationale**: {why this tier}
76
+ - **Auto-upgrade**: {yes/no — if yes, explain}
77
+
78
+ ### Task Summary
79
+ - **Goal**: {what we're building}
80
+ - **Problem**: {what problem this solves}
81
+ - **Users affected**: {who is impacted}
82
+
83
+ ### Approach
84
+ - **Chosen approach**: {description}
85
+ - **Alternatives considered**: {list with reasons for rejection}
86
+
87
+ ### Key Decisions
88
+ | # | Decision | Choice | Rationale |
89
+ |---|----------|--------|-----------|
90
+ | 1 | {decision} | {choice} | {why} |
91
+
92
+ ### Constraints
93
+ - {constraint 1}
94
+ - {constraint 2}
95
+
96
+ ### Risks
97
+ | Risk | Likelihood | Impact | Mitigation |
98
+ |------|-----------|--------|------------|
99
+ | {risk} | {L/M/H} | {L/M/H} | {mitigation} |
100
+
101
+ ### Open Questions
102
+ - {question 1}
103
+ - {question 2}
104
+ ```
105
+
106
+ ### 7. Present to User
107
+
108
+ Use `present({ format: "html" })` (or `format: "browser"` in CLI mode) to show:
109
+ - Design decisions summary
110
+ - FORGE tier and rationale
111
+ - Key trade-offs
112
+ - Open questions requiring user input
113
+
114
+ **🛑 MANDATORY STOP** — Wait for user approval of design decisions before proceeding.
115
+
116
+ ### 8. Report to Orchestrator
117
+
118
+ After user approves:
119
+ - `DONE` — design decisions approved, ready for specification
120
+ - `DONE_WITH_CONCERNS` — approved with caveats (list them)
121
+ - `NEEDS_CONTEXT` — user raised questions that need more research
122
+
123
+ **Do NOT call `flow_step`** — let the Orchestrator advance the flow.
124
+
125
+ ## Produces
126
+
127
+ - `design-decisions.md` — FORGE tier, approach, key decisions, constraints, risks
128
+
129
+ ## Agents
130
+
131
+ - `Researcher-Alpha` — Deep analysis of primary approach
132
+ - `Researcher-Beta` — Trade-offs and edge cases
133
+ - `Researcher-Gamma` — Cross-domain patterns
134
+ - `Researcher-Delta` — Feasibility and performance
135
+
136
+ ## Foundation Integration
137
+
138
+ Load these skills BEFORE executing this step:
139
+
140
+ | Skill | Purpose | When |
141
+ |-------|---------|------|
142
+ | `aikit` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
143
+ | `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 |
144
+ | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
145
+ | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
146
+ | `c4-architecture` | C4 model diagrams showing system structure changes | When visualizing proposed architecture |
147
+ | `adr-skill` | Architecture Decision Records for non-trivial decisions | Critical tier — document architecture decisions |
148
+
149
+ ### Presentation Rules
150
+ - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
151
+ - Assessments, reports, comparisons, reviews, status boards → `present({ format: "html" })`
152
+ - Tables, charts, progress tracking, code review findings → always present
153
+ - Artifact content and summaries → present with structured layout
154
+ - Only use plain text for brief confirmations and simple questions
155
+
156
+ ## Knowledge Capture
157
+
158
+ Before completing this step, persist important findings using `remember()`:
159
+
160
+ - **Design decisions**: Chosen approach and alternatives considered with trade-offs
161
+ - **Architecture patterns**: New patterns introduced or existing patterns that must be followed
162
+ - **Constraints discovered**: Technical limitations, compatibility requirements, or performance boundaries
163
+
164
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -5,6 +5,14 @@ description: Implement all tasks from the task breakdown, dispatching agents in
5
5
 
6
6
  # Execution
7
7
 
8
+ ## Prerequisites Check
9
+
10
+ Before starting this step, verify:
11
+ - [ ] Task breakdown approved with valid task graph
12
+ - [ ] `.spec/<slug>/tasks.md` exists with defined batches and dependencies
13
+
14
+ If prerequisites are NOT met -> **backtrack to task step** (`flow_step({ action: 'redo' })` on previous step)
15
+
8
16
  ## Purpose
9
17
 
10
18
  Execute all tasks from the breakdown, dispatching implementation agents in batches for maximum parallelism while maintaining correctness.
@@ -86,6 +94,7 @@ Load these skills BEFORE executing this step:
86
94
  | `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 |
87
95
  | `multi-agents-development` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
88
96
  | `brainstorming` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
97
+ | `session-handoff` | Context preservation for long-running execution phases | When execution spans multiple sessions or context is filling |
89
98
 
90
99
  ### Presentation Rules
91
100
  - Use `present` for **any output** that benefits from rich rendering — not limited to dashboards
@@ -122,3 +131,13 @@ Follow the `multi-agents-development` skill patterns for dispatch:
122
131
  - [ ] `test_run({})` passes
123
132
  - [ ] No blocked items remaining
124
133
  - [ ] `.spec/<slug>/progress.md` written
134
+
135
+ ## Knowledge Capture
136
+
137
+ Before completing this step, persist important findings using `remember()`:
138
+
139
+ - **Implementation decisions**: Why specific approaches were chosen over alternatives
140
+ - **Patterns established**: New conventions or patterns that future code should follow
141
+ - **Gotchas encountered**: Edge cases, workarounds, or non-obvious behaviors discovered during execution
142
+
143
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call `remember()` now.
@@ -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.
@@ -0,0 +1,51 @@
1
+ # aikit:basic — Quick Development Flow
2
+
3
+ Quick development flow for **bug fixes, small features, and refactoring**.
4
+
5
+ ## Steps
6
+
7
+ | # | Step | Skill | Produces | Requires | Agents |
8
+ |---|------|-------|----------|----------|--------|
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
+
14
+ ## How It Works
15
+
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
+
18
+ ### Step 1: Design Gate
19
+ - **Auto-skips** for bug fixes and refactors (produces a minimal `design-decisions.md` noting it was skipped)
20
+ - For small features: runs quick brainstorming, FORGE classification, and optional decision protocol
21
+ - Read `steps/design/README.md` for the full decision tree
22
+
23
+ ### Step 2: Assessment
24
+ - Explore the codebase to understand scope and impact
25
+ - Use `search`, `scope_map`, `file_summary`, `compact` to gather context
26
+ - Identify the approach and produce `assessment.md`
27
+
28
+ ### Step 3: Implementation
29
+ - Write code following the assessment plan
30
+ - The Orchestrator dispatches Implementer/Frontend agents with specific file scopes
31
+ - Follow TDD practices where applicable
32
+
33
+ ### Step 4: Verification
34
+ - Code review, test execution, security check
35
+ - Run `check({})` + `test_run({})` + `blast_radius({})`
36
+ - Produce `verify-report.md` with findings
37
+
38
+ ## Using Skills Inside Steps
39
+
40
+ When the Orchestrator activates a step:
41
+
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
+ 3. **Delegate to listed agents** — each step lists which agents are appropriate
45
+ 4. **Produce the required artifact** — the step's `produces` field specifies what file to create in the artifacts directory
46
+ 5. **Check dependencies** — the step's `requires` field lists artifacts from previous steps that must exist
47
+ 6. **Report status** — agents report `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED` to the Orchestrator
48
+
49
+ ## Artifacts
50
+
51
+ All artifacts are stored in the `.spec/` directory relative to the project root.
@@ -3,19 +3,28 @@
3
3
  "version": "0.1.0",
4
4
  "description": "Quick development flow for bug fixes, small features, and refactoring",
5
5
  "steps": [
6
+ {
7
+ "id": "design",
8
+ "name": "Design Gate",
9
+ "instruction": "steps/design/README.md",
10
+ "produces": ["design-decisions.md"],
11
+ "requires": [],
12
+ "agents": ["Researcher-Alpha", "Researcher-Beta", "Researcher-Gamma", "Researcher-Delta"],
13
+ "description": "Evaluate task type, run brainstorming for features, FORGE classification. Auto-skips for bug fixes and refactors."
14
+ },
6
15
  {
7
16
  "id": "assess",
8
17
  "name": "Assessment",
9
- "skill": "skills/assess/SKILL.md",
18
+ "instruction": "steps/assess/README.md",
10
19
  "produces": ["assessment.md"],
11
- "requires": [],
20
+ "requires": ["design-decisions.md"],
12
21
  "agents": ["Explorer", "Researcher-Alpha"],
13
22
  "description": "Understand scope, analyze codebase, identify approach"
14
23
  },
15
24
  {
16
25
  "id": "implement",
17
26
  "name": "Implementation",
18
- "skill": "skills/implement/SKILL.md",
27
+ "instruction": "steps/implement/README.md",
19
28
  "produces": ["progress.md"],
20
29
  "requires": ["assessment.md"],
21
30
  "agents": ["Implementer", "Frontend"],
@@ -24,7 +33,7 @@
24
33
  {
25
34
  "id": "verify",
26
35
  "name": "Verification",
27
- "skill": "skills/verify/SKILL.md",
36
+ "instruction": "steps/verify/README.md",
28
37
  "produces": ["verify-report.md"],
29
38
  "requires": ["progress.md"],
30
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.