@tgoodington/intuition 8.1.3 → 9.2.1
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/README.md +9 -9
- package/docs/project_notes/.project-memory-state.json +100 -0
- package/docs/project_notes/branches/.gitkeep +0 -0
- package/docs/project_notes/bugs.md +41 -0
- package/docs/project_notes/decisions.md +147 -0
- package/docs/project_notes/issues.md +101 -0
- package/docs/project_notes/key_facts.md +88 -0
- package/docs/project_notes/trunk/.gitkeep +0 -0
- package/docs/project_notes/trunk/.planning_research/decision_file_naming.md +15 -0
- package/docs/project_notes/trunk/.planning_research/decisions_log.md +32 -0
- package/docs/project_notes/trunk/.planning_research/orientation.md +51 -0
- package/docs/project_notes/trunk/audit/plan-rename-hitlist.md +654 -0
- package/docs/project_notes/trunk/blueprint-conflicts.md +109 -0
- package/docs/project_notes/trunk/blueprints/database-architect.md +416 -0
- package/docs/project_notes/trunk/blueprints/devops-infrastructure.md +514 -0
- package/docs/project_notes/trunk/blueprints/technical-writer.md +788 -0
- package/docs/project_notes/trunk/build_brief.md +119 -0
- package/docs/project_notes/trunk/build_report.md +250 -0
- package/docs/project_notes/trunk/detail_brief.md +94 -0
- package/docs/project_notes/trunk/plan.md +182 -0
- package/docs/project_notes/trunk/planning_brief.md +96 -0
- package/docs/project_notes/trunk/prompt_brief.md +60 -0
- package/docs/project_notes/trunk/prompt_output.json +98 -0
- package/docs/project_notes/trunk/scratch/database-architect-decisions.json +72 -0
- package/docs/project_notes/trunk/scratch/database-architect-research-plan.md +10 -0
- package/docs/project_notes/trunk/scratch/database-architect-stage1.md +226 -0
- package/docs/project_notes/trunk/scratch/devops-infrastructure-decisions.json +71 -0
- package/docs/project_notes/trunk/scratch/devops-infrastructure-research-plan.md +7 -0
- package/docs/project_notes/trunk/scratch/devops-infrastructure-stage1.md +164 -0
- package/docs/project_notes/trunk/scratch/technical-writer-decisions.json +88 -0
- package/docs/project_notes/trunk/scratch/technical-writer-research-plan.md +7 -0
- package/docs/project_notes/trunk/scratch/technical-writer-stage1.md +266 -0
- package/docs/project_notes/trunk/team_assignment.json +108 -0
- package/docs/project_notes/trunk/test_brief.md +75 -0
- package/docs/project_notes/trunk/test_report.md +26 -0
- package/docs/project_notes/trunk/verification/devops-infrastructure-verification.md +172 -0
- package/docs/v9/decision-framework-direction.md +142 -0
- package/docs/v9/decision-framework-implementation.md +114 -0
- package/docs/v9/domain-adaptive-team-architecture.md +1016 -0
- package/docs/v9/test/SESSION_SUMMARY.md +117 -0
- package/docs/v9/test/TEST_PLAN.md +119 -0
- package/docs/v9/test/blueprints/legal-analyst.md +166 -0
- package/docs/v9/test/output/07_cover_letter.md +41 -0
- package/docs/v9/test/phase2/mock_plan.md +89 -0
- package/docs/v9/test/phase2/producers.json +32 -0
- package/docs/v9/test/phase2/specialists/database-architect.specialist.md +10 -0
- package/docs/v9/test/phase2/specialists/financial-analyst.specialist.md +10 -0
- package/docs/v9/test/phase2/specialists/legal-analyst.specialist.md +10 -0
- package/docs/v9/test/phase2/specialists/technical-writer.specialist.md +10 -0
- package/docs/v9/test/phase2/team_assignment.json +61 -0
- package/docs/v9/test/phase3/blueprints/legal-analyst.md +840 -0
- package/docs/v9/test/phase3/legal-analyst-full.specialist.md +111 -0
- package/docs/v9/test/phase3/project_context/nh_landlord_tenant_notes.md +35 -0
- package/docs/v9/test/phase3/project_context/property_facts.md +32 -0
- package/docs/v9/test/phase3b/blueprints/legal-analyst.md +1715 -0
- package/docs/v9/test/phase3b/legal-analyst.specialist.md +153 -0
- package/docs/v9/test/phase3b/scratch/legal-analyst-stage1.md +270 -0
- package/docs/v9/test/phase4/TEST_PLAN.md +32 -0
- package/docs/v9/test/phase4/blueprints/financial-analyst-T2.md +538 -0
- package/docs/v9/test/phase4/blueprints/legal-analyst-T4.md +253 -0
- package/docs/v9/test/phase4/cross-blueprint-check.md +280 -0
- package/docs/v9/test/phase4/scratch/financial-analyst-T2-stage1.md +67 -0
- package/docs/v9/test/phase4/scratch/legal-analyst-T4-stage1.md +54 -0
- package/docs/v9/test/phase4/specialists/financial-analyst.specialist.md +156 -0
- package/docs/v9/test/phase4/specialists/legal-analyst.specialist.md +153 -0
- package/docs/v9/test/phase5/TEST_PLAN.md +35 -0
- package/docs/v9/test/phase5/blueprints/code-architect-hw-vetter.md +375 -0
- package/docs/v9/test/phase5/output/04_compliance_checklist.md +149 -0
- package/docs/v9/test/phase5/output/hardware-vetter-SKILL-v2.md +561 -0
- package/docs/v9/test/phase5/output/hardware-vetter-SKILL.md +459 -0
- package/docs/v9/test/phase5/producers/code-writer.producer.md +49 -0
- package/docs/v9/test/phase5/producers/document-writer.producer.md +62 -0
- package/docs/v9/test/phase5/regression-comparison-v2.md +60 -0
- package/docs/v9/test/phase5/regression-comparison.md +197 -0
- package/docs/v9/test/phase5/review-5A-specialist.md +213 -0
- package/docs/v9/test/phase5/specialist-test/TEST_PLAN.md +60 -0
- package/docs/v9/test/phase5/specialist-test/blueprint-comparison.md +252 -0
- package/docs/v9/test/phase5/specialist-test/blueprints/code-architect-hw-vetter.md +916 -0
- package/docs/v9/test/phase5/specialist-test/scratch/code-architect-stage1.md +427 -0
- package/docs/v9/test/phase5/specialists/code-architect.specialist.md +168 -0
- package/docs/v9/test/phase5b/TEST_PLAN.md +219 -0
- package/docs/v9/test/phase5b/blueprints/5B-10-stage2-with-decisions.md +286 -0
- package/docs/v9/test/phase5b/decisions/5B-2-accept-all-decisions.json +68 -0
- package/docs/v9/test/phase5b/decisions/5B-3-promote-decisions.json +70 -0
- package/docs/v9/test/phase5b/decisions/5B-4-individual-decisions.json +68 -0
- package/docs/v9/test/phase5b/decisions/5B-5-triage-decisions.json +110 -0
- package/docs/v9/test/phase5b/decisions/5B-6-fallback-decisions.json +40 -0
- package/docs/v9/test/phase5b/decisions/5B-8-partial-decisions.json +46 -0
- package/docs/v9/test/phase5b/decisions/5B-9-complete-decisions.json +54 -0
- package/docs/v9/test/phase5b/scratch/code-architect-stage1.md +133 -0
- package/docs/v9/test/phase5b/specialists/code-architect.specialist.md +202 -0
- package/docs/v9/test/phase5b/stage1-many-decisions.md +139 -0
- package/docs/v9/test/phase5b/stage1-no-assumptions.md +70 -0
- package/docs/v9/test/phase5b/stage1-with-assumptions.md +86 -0
- package/docs/v9/test/phase5b/test-5B-1-results.md +157 -0
- package/docs/v9/test/phase5b/test-5B-10-results.md +130 -0
- package/docs/v9/test/phase5b/test-5B-2-results.md +75 -0
- package/docs/v9/test/phase5b/test-5B-3-results.md +104 -0
- package/docs/v9/test/phase5b/test-5B-4-results.md +114 -0
- package/docs/v9/test/phase5b/test-5B-5-results.md +126 -0
- package/docs/v9/test/phase5b/test-5B-6-results.md +60 -0
- package/docs/v9/test/phase5b/test-5B-7-results.md +141 -0
- package/docs/v9/test/phase5b/test-5B-8-results.md +115 -0
- package/docs/v9/test/phase5b/test-5B-9-results.md +76 -0
- package/docs/v9/test/producers/document-writer.producer.md +62 -0
- package/docs/v9/test/specialists/legal-analyst.specialist.md +58 -0
- package/package.json +4 -2
- package/producers/code-writer/code-writer.producer.md +86 -0
- package/producers/data-file-writer/data-file-writer.producer.md +116 -0
- package/producers/document-writer/document-writer.producer.md +117 -0
- package/producers/form-filler/form-filler.producer.md +99 -0
- package/producers/presentation-creator/presentation-creator.producer.md +109 -0
- package/producers/spreadsheet-builder/spreadsheet-builder.producer.md +107 -0
- package/scripts/install-skills.js +97 -9
- package/scripts/uninstall-skills.js +7 -2
- package/skills/intuition-agent-advisor/SKILL.md +327 -220
- package/skills/intuition-assemble/SKILL.md +261 -0
- package/skills/intuition-build/SKILL.md +379 -319
- package/skills/intuition-debugger/SKILL.md +390 -390
- package/skills/intuition-design/SKILL.md +385 -381
- package/skills/intuition-detail/SKILL.md +377 -0
- package/skills/intuition-engineer/SKILL.md +307 -303
- package/skills/intuition-handoff/SKILL.md +264 -222
- package/skills/intuition-handoff/references/handoff_core.md +54 -54
- package/skills/intuition-initialize/SKILL.md +21 -6
- package/skills/intuition-initialize/references/agents_template.md +118 -118
- package/skills/intuition-initialize/references/claude_template.md +134 -134
- package/skills/intuition-initialize/references/intuition_readme_template.md +4 -4
- package/skills/intuition-initialize/references/state_template.json +17 -2
- package/skills/{intuition-plan → intuition-outline}/SKILL.md +561 -481
- package/skills/{intuition-plan → intuition-outline}/references/magellan_core.md +16 -16
- package/skills/{intuition-plan → intuition-outline}/references/templates/plan_template.md +6 -6
- package/skills/intuition-prompt/SKILL.md +374 -312
- package/skills/intuition-start/SKILL.md +46 -13
- package/skills/intuition-start/references/start_core.md +60 -60
- package/skills/intuition-test/SKILL.md +345 -0
- package/specialists/api-designer/api-designer.specialist.md +291 -0
- package/specialists/business-analyst/business-analyst.specialist.md +270 -0
- package/specialists/copywriter/copywriter.specialist.md +268 -0
- package/specialists/database-architect/database-architect.specialist.md +275 -0
- package/specialists/devops-infrastructure/devops-infrastructure.specialist.md +314 -0
- package/specialists/financial-analyst/financial-analyst.specialist.md +269 -0
- package/specialists/frontend-component/frontend-component.specialist.md +293 -0
- package/specialists/instructional-designer/instructional-designer.specialist.md +285 -0
- package/specialists/legal-analyst/legal-analyst.specialist.md +260 -0
- package/specialists/marketing-strategist/marketing-strategist.specialist.md +281 -0
- package/specialists/project-manager/project-manager.specialist.md +266 -0
- package/specialists/research-analyst/research-analyst.specialist.md +273 -0
- package/specialists/security-auditor/security-auditor.specialist.md +354 -0
- package/specialists/technical-writer/technical-writer.specialist.md +275 -0
- /package/skills/{intuition-plan → intuition-outline}/references/sub_agents.md +0 -0
- /package/skills/{intuition-plan → intuition-outline}/references/templates/confidence_scoring.md +0 -0
- /package/skills/{intuition-plan → intuition-outline}/references/templates/plan_format.md +0 -0
- /package/skills/{intuition-plan → intuition-outline}/references/templates/planning_process.md +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: intuition-handoff
|
|
3
|
-
description: Universal phase transition orchestrator. Processes phase outputs, updates project memory, generates fresh briefs for next agent. Manages the design loop for multi-item design cycles.
|
|
4
|
-
model:
|
|
3
|
+
description: Universal phase transition orchestrator. Processes phase outputs, updates project memory, generates fresh briefs for next agent. Manages the design loop for multi-item design cycles and v9 team assembly for specialist workflows.
|
|
4
|
+
model: sonnet
|
|
5
5
|
tools: Read, Write, Glob, Grep, AskUserQuestion, Bash
|
|
6
6
|
allowed-tools: Read, Write, Glob, Grep, Bash
|
|
7
7
|
---
|
|
@@ -21,9 +21,9 @@ These are non-negotiable. Violating any of these means the protocol has failed.
|
|
|
21
21
|
5. You MUST generate a brief for the next agent.
|
|
22
22
|
6. You MUST update `.project-memory-state.json` — you are the ONLY skill that writes to this file.
|
|
23
23
|
7. You MUST NOT evaluate or critique phase outputs. Process and document, never judge.
|
|
24
|
-
8. You MUST NOT skip the user profile merge step during prompt→
|
|
24
|
+
8. You MUST NOT skip the user profile merge step during prompt→outline transitions.
|
|
25
25
|
9. You MUST suggest the correct next skill after completing the transition.
|
|
26
|
-
10. You MUST NOT modify
|
|
26
|
+
10. You MUST NOT modify prompt_brief.md, outline.md, design_spec_*.md, code_specs.md, or other phase output files — they are read-only inputs.
|
|
27
27
|
11. You MUST manage the design loop: track which items are designed, route to next item or to engineer when all are done.
|
|
28
28
|
|
|
29
29
|
## CONTEXT PATH RESOLUTION
|
|
@@ -41,15 +41,25 @@ Before ANY transition, resolve the active context:
|
|
|
41
41
|
6. Use `context_workflow` for all status checks and state writes
|
|
42
42
|
7. Shared files (key_facts.md, decisions.md, issues.md, bugs.md) always stay at `docs/project_notes/` — do NOT use context_path for these.
|
|
43
43
|
|
|
44
|
+
## MODE DETECTION
|
|
45
|
+
|
|
46
|
+
After resolving context_path, determine the workflow version:
|
|
47
|
+
|
|
48
|
+
1. Read `{context_path}outline.md` (if it exists)
|
|
49
|
+
2. IF outline contains a `### 6.5 Detail Assessment` section → **v9 mode**
|
|
50
|
+
3. IF outline contains a `Design Recommendations` section OR no outline exists yet → **v8 mode**
|
|
51
|
+
4. Store the detected mode for use in transition detection below.
|
|
52
|
+
|
|
44
53
|
## PROTOCOL: COMPLETE FLOW
|
|
45
54
|
|
|
46
55
|
```
|
|
47
56
|
Step 1: Resolve context_path and context_workflow (see above)
|
|
57
|
+
Step 1.5: Detect mode (v8 or v9)
|
|
48
58
|
Step 2: Detect transition type from context_workflow
|
|
49
59
|
Step 3: Read phase output files from {context_path}
|
|
50
60
|
Step 4: Extract insights and structure findings
|
|
51
61
|
Step 5: Update shared memory files (key_facts.md, decisions.md, issues.md)
|
|
52
|
-
Step 6: Merge user profile learnings (prompt→
|
|
62
|
+
Step 6: Merge user profile learnings (prompt→outline only)
|
|
53
63
|
Step 7: Generate brief for next agent at {context_path}
|
|
54
64
|
Step 8: Update .project-memory-state.json (target active context object)
|
|
55
65
|
Step 9: Report what was processed and suggest next skill
|
|
@@ -57,18 +67,30 @@ Step 9: Report what was processed and suggest next skill
|
|
|
57
67
|
|
|
58
68
|
## STEP 1: DETECT TRANSITION
|
|
59
69
|
|
|
60
|
-
After resolving context_path
|
|
70
|
+
After resolving context_path, context_workflow, and mode:
|
|
61
71
|
|
|
62
72
|
```
|
|
63
73
|
IF context_workflow.status == "prompt" AND workflow.prompt.completed == true
|
|
64
|
-
AND workflow.
|
|
65
|
-
→ TRANSITION: Prompt →
|
|
66
|
-
|
|
67
|
-
IF context_workflow.status == "
|
|
68
|
-
AND workflow.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
AND workflow.outline.started == false:
|
|
75
|
+
→ TRANSITION: Prompt → Outline (Transition 1)
|
|
76
|
+
|
|
77
|
+
IF context_workflow.status == "outline" AND workflow.outline.completed == true:
|
|
78
|
+
IF v9 mode AND NOT (workflow.detail exists AND workflow.detail.started == true):
|
|
79
|
+
IF {context_path}team_assignment.json exists:
|
|
80
|
+
→ TRANSITION: Assemble → Detail (Transition 2.5v9)
|
|
81
|
+
ELSE:
|
|
82
|
+
→ TRANSITION: Outline → Assemble (Transition 2v9)
|
|
83
|
+
ELSE IF v8 mode AND workflow.design.started == false AND workflow.engineering.started == false:
|
|
84
|
+
→ TRANSITION: Outline → Design (Transition 2) OR Outline → Engineer (Transition 2B)
|
|
85
|
+
|
|
86
|
+
IF v9 mode AND context_workflow.status == "detail":
|
|
87
|
+
→ Check workflow.detail.specialists array
|
|
88
|
+
→ IF current specialist status == "completed" AND more specialists remain in current or later execution phases:
|
|
89
|
+
→ TRANSITION: Specialist → Specialist (Transition 3v9)
|
|
90
|
+
→ IF ALL specialists completed:
|
|
91
|
+
→ TRANSITION: Detail → Build (Transition 4v9)
|
|
92
|
+
|
|
93
|
+
IF v8 mode AND context_workflow.status == "design":
|
|
72
94
|
→ Check workflow.design.items array
|
|
73
95
|
→ IF current item just completed AND more items remain:
|
|
74
96
|
→ TRANSITION: Design → Design (Transition 3)
|
|
@@ -77,32 +99,44 @@ IF context_workflow.status == "design":
|
|
|
77
99
|
|
|
78
100
|
IF context_workflow.status == "engineering" AND workflow.engineering.completed == true
|
|
79
101
|
AND workflow.build.started == false:
|
|
80
|
-
→ TRANSITION: Engineer → Build (Transition 5)
|
|
102
|
+
→ TRANSITION: Engineer → Build (Transition 5) — v8 only
|
|
81
103
|
|
|
82
104
|
IF context_workflow.status == "building" AND workflow.build.completed == true:
|
|
83
|
-
|
|
105
|
+
IF v9 mode AND workflow.test.started == false:
|
|
106
|
+
Read {context_path}/team_assignment.json
|
|
107
|
+
IF any producer_assignments entry has producer == "code-writer":
|
|
108
|
+
→ TRANSITION: Build → Test (Transition 6.5v9)
|
|
109
|
+
ELSE:
|
|
110
|
+
→ TRANSITION: Build → Complete (Transition 6)
|
|
111
|
+
ELSE IF v8 mode:
|
|
112
|
+
→ TRANSITION: Build → Complete (Transition 6)
|
|
113
|
+
|
|
114
|
+
IF context_workflow.status == "testing" AND workflow.test.completed == true:
|
|
115
|
+
→ TRANSITION: Test → Complete (Transition 7)
|
|
84
116
|
|
|
85
117
|
IF no clear transition detected:
|
|
86
118
|
→ ASK USER: "Which phase just completed?" (use AskUserQuestion)
|
|
87
119
|
```
|
|
88
120
|
|
|
89
|
-
## STATE SCHEMA (
|
|
121
|
+
## STATE SCHEMA (v8.0)
|
|
90
122
|
|
|
91
123
|
This is the authoritative schema for `.project-memory-state.json`:
|
|
92
124
|
|
|
93
125
|
```json
|
|
94
126
|
{
|
|
95
127
|
"initialized": true,
|
|
96
|
-
"version": "
|
|
128
|
+
"version": "8.0",
|
|
97
129
|
"active_context": "trunk",
|
|
98
130
|
"trunk": {
|
|
99
|
-
"status": "none | prompt |
|
|
131
|
+
"status": "none | prompt | outline | design | engineering | building | testing | detail | complete",
|
|
100
132
|
"workflow": {
|
|
101
133
|
"prompt": { "started": false, "completed": false, "started_at": null, "completed_at": null, "output_files": [] },
|
|
102
|
-
"
|
|
134
|
+
"outline": { "started": false, "completed": false, "completed_at": null, "approved": false },
|
|
103
135
|
"design": { "started": false, "completed": false, "completed_at": null, "items": [], "current_item": null },
|
|
104
136
|
"engineering": { "started": false, "completed": false, "completed_at": null },
|
|
105
|
-
"build": { "started": false, "completed": false, "completed_at": null }
|
|
137
|
+
"build": { "started": false, "completed": false, "completed_at": null },
|
|
138
|
+
"test": { "started": false, "completed": false, "completed_at": null, "skipped": false },
|
|
139
|
+
"detail": { "started": false, "completed": false, "completed_at": null, "team_assignment": null, "specialists": [], "current_specialist": null, "execution_phase": 1 }
|
|
106
140
|
}
|
|
107
141
|
},
|
|
108
142
|
"branches": {},
|
|
@@ -113,12 +147,16 @@ This is the authoritative schema for `.project-memory-state.json`:
|
|
|
113
147
|
|
|
114
148
|
### Branch Entry Schema
|
|
115
149
|
|
|
116
|
-
Each branch in `branches` has: `display_name`, `created_from`, `created_at`, `purpose`, `status`, and a `workflow` object identical to trunk's workflow structure (including `engineering` and `
|
|
150
|
+
Each branch in `branches` has: `display_name`, `created_from`, `created_at`, `purpose`, `status`, and a `workflow` object identical to trunk's workflow structure (including `engineering`, `build`, `test`, and `detail` phases).
|
|
117
151
|
|
|
118
152
|
### Design Items Schema
|
|
119
153
|
|
|
120
154
|
Each item in `design.items`: `{ "name": "snake_case", "display_name": "Human Name", "status": "pending|in_progress|completed|skipped", "plan_tasks": [N], "spec_file": null, "flagged_reason": "..." }`
|
|
121
155
|
|
|
156
|
+
### Detail Specialist Schema (v9)
|
|
157
|
+
|
|
158
|
+
Each entry in `detail.specialists`: `{ "name": "specialist-name", "tasks": [{"task_id": "T1", "depth": "Deep"}], "status": "pending|in_progress|completed", "stage": "stage1|user_gate|stage2|done", "stage1_path": null, "decisions_path": null, "blueprint_path": null }`
|
|
159
|
+
|
|
122
160
|
When updating state, preserve all existing fields and only modify the relevant ones. Always set `last_handoff` to the current ISO timestamp and `last_handoff_transition` to the transition name.
|
|
123
161
|
|
|
124
162
|
### State Write Pattern
|
|
@@ -146,309 +184,306 @@ Triggered when start routes to handoff with branch creation intent. User has pro
|
|
|
146
184
|
- `created_at`: ISO timestamp
|
|
147
185
|
- `purpose`: user-provided sentence
|
|
148
186
|
- `status`: "none"
|
|
149
|
-
- `workflow`: identical structure to trunk's workflow (all false/null/empty — including `engineering` and `
|
|
187
|
+
- `workflow`: identical structure to trunk's workflow (all false/null/empty — including `engineering`, `build`, `test`, and `detail` phases)
|
|
150
188
|
4. **Set `active_context`** to the new branch key.
|
|
151
189
|
5. **Write updated state**. Set `last_handoff_transition` to "branch_creation".
|
|
152
190
|
6. **Route user**: "Branch **[display_name]** created. Run `/clear` then `/intuition-prompt` to define what this branch will accomplish."
|
|
153
191
|
|
|
154
|
-
##
|
|
192
|
+
## V7 STATE MIGRATION
|
|
155
193
|
|
|
156
|
-
Fires
|
|
194
|
+
Fires when handoff detects `version == "7.0"`. For trunk and every branch: rename the `planning` key to `outline` in the `workflow` object (preserving all sub-fields: started, completed, completed_at, approved), and change any `status == "planning"` to `"outline"`. Set `version: "8.0"`, preserve all other fields, write state. Report: "Migrated state from v7.0 to v8.0 (renamed planning → outline)." Then continue with the original transition.
|
|
157
195
|
|
|
158
|
-
|
|
196
|
+
## V5 STATE MIGRATION
|
|
159
197
|
|
|
160
|
-
`version == "
|
|
198
|
+
Fires when handoff detects `version == "5.0"`. For trunk and every branch: if `workflow.detail` does not exist, add `"detail": { "started": false, "completed": false, "completed_at": null, "team_assignment": null, "specialists": [], "current_specialist": null, "execution_phase": 1 }` after `build` in the workflow object. Also add `"test": { "started": false, "completed": false, "completed_at": null, "skipped": false }` after `build`. Set `version: "7.0"`, preserve all other fields, write state. Report: "Migrated state from v5.0 to v7.0 (added detail phase + test phase)." Then continue with the original transition.
|
|
161
199
|
|
|
162
|
-
|
|
200
|
+
## V6 STATE MIGRATION
|
|
163
201
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
3. Preserve all other fields unchanged.
|
|
170
|
-
4. Write updated state.
|
|
171
|
-
5. Report to user: "Migrated state from v4.0 to v5.0 (added engineering phase, renamed execution → build)." Then continue with the original transition.
|
|
202
|
+
Fires when handoff detects `version == "6.0"`. For trunk and every branch: if `workflow.test` does not exist, add `"test": { "started": false, "completed": false, "completed_at": null, "skipped": false }` after `build` in the workflow object. Set `version: "7.0"`, preserve all other fields, write state. Report: "Migrated state from v6.0 to v7.0 (added test phase for post-build quality gate)." Then continue with the original transition.
|
|
203
|
+
|
|
204
|
+
## V4 STATE MIGRATION
|
|
205
|
+
|
|
206
|
+
Fires when handoff detects `version == "4.0"` OR (`execution` phase exists but no `engineering` phase). For trunk and every branch: rename `execution` → `build`, add `engineering: { "started": false, "completed": false, "completed_at": null }` before `build`, change any `status == "executing"` to `"building"`. Set `version: "5.0"`, preserve all other fields, write state. Report: "Migrated state from v4.0 to v5.0 (added engineering phase, renamed execution → build)." Then continue with the original transition.
|
|
172
207
|
|
|
173
208
|
## V3 STATE MIGRATION
|
|
174
209
|
|
|
175
|
-
Fires
|
|
210
|
+
Fires when handoff detects `version == "3.0"` OR missing `active_context`. Create `docs/project_notes/trunk/`. Move existing workflow artifacts (`prompt_brief.md`, `prompt_output.json`, `planning_brief.md`, `plan.md`, `design_brief.md`, `design_spec_*.md`, `execution_brief.md`, `.planning_research/`) from `docs/project_notes/` into `trunk/` — skip missing files. Restructure state: wrap existing `status` + `workflow` into `trunk` object, add `active_context: "trunk"`, `branches: {}`, rename `execution` → `build`, add `engineering` phase, set `version: "5.0"`. Preserve `initialized`, `last_handoff`, `last_handoff_transition`. Write state. Report what was migrated and confirm v5.0 upgrade. Leave shared files (`key_facts.md`, `decisions.md`, `issues.md`, `bugs.md`) at `docs/project_notes/`.
|
|
176
211
|
|
|
177
|
-
|
|
212
|
+
## TRANSITION 1: PROMPT → OUTLINE
|
|
178
213
|
|
|
179
|
-
`
|
|
214
|
+
Read `{context_path}prompt_brief.md` and `{context_path}prompt_output.json` (if exists — fall back to extracting from brief manually).
|
|
180
215
|
|
|
181
|
-
|
|
216
|
+
**Extract and Structure:** Key facts → `key_facts.md`, constraints → `key_facts.md` (constraints category), suggested decisions → ADRs in `decisions.md`, assumptions → reference in brief only, follow-up items → `issues.md`.
|
|
182
217
|
|
|
183
|
-
|
|
184
|
-
2. Move existing workflow artifacts from `docs/project_notes/` into `docs/project_notes/trunk/`:
|
|
185
|
-
- `discovery_brief.md`, `discovery_output.json`, `planning_brief.md`, `plan.md`
|
|
186
|
-
- `design_brief.md`, `design_spec_*.md`, `execution_brief.md`
|
|
187
|
-
- `.planning_research/` directory (entire folder)
|
|
188
|
-
- Only move files that exist. Skip missing files silently.
|
|
189
|
-
3. Restructure state:
|
|
190
|
-
- Wrap existing `status` and `workflow` into a `trunk` object
|
|
191
|
-
- Add `active_context: "trunk"`
|
|
192
|
-
- Add `branches: {}`
|
|
193
|
-
- Transform workflow: rename `execution` → `build`, add `engineering` phase
|
|
194
|
-
- Set `version: "5.0"`
|
|
195
|
-
- Preserve all other top-level fields (`initialized`, `last_handoff`, `last_handoff_transition`)
|
|
196
|
-
4. Write updated state.
|
|
197
|
-
5. Report to user: list which files were migrated and confirm v5.0 upgrade. Then continue with the original transition.
|
|
218
|
+
**User Profile Merge:** If `prompt_output.json` has `user_profile_learnings` AND `.claude/USER_PROFILE.json` exists: read profile, merge (null fields get new values, populated fields overwrite only if confidence "high"), save. Skip if no USER_PROFILE.json.
|
|
198
219
|
|
|
199
|
-
|
|
220
|
+
**Generate Outline Brief:** Write `{context_path}outline_brief.md` with: Discovery Summary (1-2 paragraphs), Problem Statement, Goals & Success Criteria, Key Constraints, Architectural Context, Assumptions & Risks (with confidence levels), References (prompt_brief path, ADR numbers).
|
|
200
221
|
|
|
201
|
-
|
|
222
|
+
Update state: set `status` to `"outline"`, mark `prompt.completed = true` with timestamp, set `outline.started = true`. Route: "Prompt output processed. Outline brief saved to `{context_path}outline_brief.md`. Run `/clear` then `/intuition-outline` to create a structured plan."
|
|
202
223
|
|
|
203
|
-
|
|
224
|
+
## TRANSITION 2: OUTLINE → DESIGN (Initial Setup)
|
|
204
225
|
|
|
205
|
-
Read
|
|
206
|
-
- `{context_path}discovery_brief.md` — human-readable discovery summary
|
|
207
|
-
- `{context_path}discovery_output.json` — structured data (if exists)
|
|
226
|
+
v8 mode only. Read `{context_path}outline.md`. Find "Design Recommendations" section — extract items flagged for design with rationale and task numbers (if no section, assess tasks yourself). Extract: decisions → `decisions.md`, risks/dependencies → include in brief, outline work → `issues.md`.
|
|
208
227
|
|
|
209
|
-
|
|
228
|
+
**Present to user** via AskUserQuestion (header: "Design Items"): list each flagged item with rationale. Options: "All recommended items need design" / "Some items — let me specify" / "None — skip design, go straight to engineering". If "Some," follow up. If "None," use Transition 2B.
|
|
210
229
|
|
|
211
|
-
|
|
230
|
+
**Generate Design Brief:** Write `{context_path}design_brief.md` for FIRST item with: Current Item, Plan Context (1-2 paragraphs), Task Details (numbers, description, acceptance criteria, dependencies), Design Rationale, Constraints, Design Queue (all items with status), References.
|
|
212
231
|
|
|
213
|
-
|
|
214
|
-
- **Key facts** → add to `docs/project_notes/key_facts.md`
|
|
215
|
-
- **Constraints** → add to `docs/project_notes/key_facts.md` under constraints category
|
|
216
|
-
- **Suggested decisions** → create ADRs in `docs/project_notes/decisions.md`
|
|
217
|
-
- **Assumptions** → reference in brief, not directly added to memory
|
|
218
|
-
- **Follow-up items** → add to `docs/project_notes/issues.md`
|
|
232
|
+
Update state: set `status` to `"design"`, mark `outline.completed = true` with timestamp and `approved = true`, set `design.started = true`, populate `design.items`, set `design.current_item` to first item (`"in_progress"`). Route: "Outline processed. Design brief prepared for **[First Item Name]**. Run `/clear` then `/intuition-design` to begin design exploration."
|
|
219
233
|
|
|
220
|
-
|
|
234
|
+
## TRANSITION 2B: OUTLINE → ENGINEER (Skip Design)
|
|
221
235
|
|
|
222
|
-
|
|
223
|
-
1. Read existing USER_PROFILE.json
|
|
224
|
-
2. Merge learnings (null fields get new values; populated fields only overwrite if confidence is "high")
|
|
225
|
-
3. Save updated profile
|
|
236
|
+
v8 mode only. Used when user confirms NO items need design. Write `{context_path}engineering_brief.md` with: Plan Summary (1-2 paragraphs), Objective, Discovery Context, Task Summary, Known Risks, References.
|
|
226
237
|
|
|
227
|
-
|
|
238
|
+
Update state: set `status` to `"engineering"`, mark `outline.completed = true` with timestamp and `approved = true`, set `design.started = false`, `design.completed = false`, `design.items = []`, set `engineering.started = true`. Route: "Outline processed. No design items flagged. Engineering brief saved to `{context_path}engineering_brief.md`. Run `/clear` then `/intuition-engineer` to create code specs."
|
|
228
239
|
|
|
229
|
-
|
|
240
|
+
## TRANSITION 2v9: OUTLINE → ASSEMBLE
|
|
230
241
|
|
|
231
|
-
|
|
232
|
-
- **Discovery Summary** (1-2 paragraphs)
|
|
233
|
-
- **Problem Statement**
|
|
234
|
-
- **Goals & Success Criteria**
|
|
235
|
-
- **Key Constraints**
|
|
236
|
-
- **Architectural Context** (existing decisions/patterns)
|
|
237
|
-
- **Assumptions & Risks** (with confidence levels)
|
|
238
|
-
- **References** (discovery_brief path, relevant ADR numbers)
|
|
242
|
+
v9 mode only. Triggers when outline completes and the plan contains a `### 6.5 Detail Assessment` section.
|
|
239
243
|
|
|
240
|
-
###
|
|
244
|
+
### Protocol
|
|
241
245
|
|
|
242
|
-
|
|
246
|
+
1. **Extract and structure** from outline.md: architectural decisions → `docs/project_notes/decisions.md`, risks/dependencies → note for brief, outline insights → `docs/project_notes/issues.md`.
|
|
247
|
+
2. **Update state**: Set `status` to `"outline"`, mark `outline.completed = true` with timestamp, `approved = true`.
|
|
248
|
+
3. **Route user**: "Outline processed. Run `/clear` then `/intuition-assemble` to build the specialist team and begin the detail phase."
|
|
243
249
|
|
|
244
|
-
|
|
250
|
+
## TRANSITION 2.5v9: ASSEMBLE → DETAIL
|
|
245
251
|
|
|
246
|
-
|
|
252
|
+
v9 mode only. Triggers when outline is complete, `{context_path}team_assignment.json` exists, and detail has not started. This means assemble has finished and the team is ready.
|
|
247
253
|
|
|
248
|
-
|
|
254
|
+
### Protocol
|
|
249
255
|
|
|
250
|
-
|
|
256
|
+
1. **Read team assignment**: Read `{context_path}team_assignment.json`. Extract specialist_assignments, execution_order, and producer_assignments.
|
|
251
257
|
|
|
252
|
-
Read
|
|
258
|
+
2. **Read specialist profiles**: For each specialist in specialist_assignments, read their profile to get `display_name` and `domain`.
|
|
253
259
|
|
|
254
|
-
|
|
260
|
+
3. **Determine first specialist**: From execution_order phase 1, pick the first specialist alphabetically (or the only one if solo).
|
|
255
261
|
|
|
256
|
-
|
|
262
|
+
4. **Generate detail brief**: Write `{context_path}detail_brief.md` with:
|
|
257
263
|
|
|
258
|
-
|
|
264
|
+
```markdown
|
|
265
|
+
# Detail Brief
|
|
259
266
|
|
|
260
|
-
|
|
267
|
+
## Current Specialist
|
|
268
|
+
- **Name**: {specialist name}
|
|
269
|
+
- **Display Name**: {display_name from profile}
|
|
270
|
+
- **Domain**: {domain from profile}
|
|
271
|
+
- **Profile Path**: {absolute path to the specialist profile file}
|
|
261
272
|
|
|
262
|
-
|
|
273
|
+
## Assigned Tasks
|
|
274
|
+
{For each task assigned to this specialist:}
|
|
275
|
+
### Task {task_id}: {title}
|
|
276
|
+
- **Depth**: {depth}
|
|
277
|
+
- **Description**: {from plan}
|
|
278
|
+
- **Acceptance Criteria**: {from plan}
|
|
279
|
+
- **Dependencies**: {from plan}
|
|
263
280
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
-
|
|
267
|
-
-
|
|
281
|
+
## Known Research
|
|
282
|
+
{Extract from outline.md the sections relevant to THIS specialist's domain and assigned tasks:}
|
|
283
|
+
{- Section 2 (Discovery Summary) — full content, always include}
|
|
284
|
+
{- Section 4 (Risk Analysis) — risks relevant to this specialist's tasks}
|
|
285
|
+
{- Section 7 (Architectural Decisions) — decisions touching this specialist's domain}
|
|
286
|
+
{- Any other outline sections that contain research findings relevant to the assigned tasks}
|
|
287
|
+
{Omit sections with no relevance to this specialist. If the outline has no research relevant to this specialist, write "No prior research overlaps with this specialist's domain."}
|
|
268
288
|
|
|
269
|
-
|
|
289
|
+
## Prior Blueprints
|
|
290
|
+
None (first specialist in execution order)
|
|
270
291
|
|
|
271
|
-
|
|
292
|
+
## Outline Context
|
|
293
|
+
{Relevant content from outline.md Section 10, if present}
|
|
272
294
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
-
|
|
276
|
-
-
|
|
277
|
-
-
|
|
278
|
-
|
|
279
|
-
- **Design Queue** (all items with status)
|
|
280
|
-
- **References** (plan path, discovery path)
|
|
295
|
+
## Detail Queue
|
|
296
|
+
{All specialists with status:}
|
|
297
|
+
- [in_progress] {first specialist display_name}
|
|
298
|
+
- [pending] {second specialist display_name}
|
|
299
|
+
- [pending] ...
|
|
300
|
+
```
|
|
281
301
|
|
|
282
|
-
|
|
302
|
+
5. **Update state**:
|
|
303
|
+
- Set `status` to `"detail"`
|
|
304
|
+
- Set `detail.started` to `true`, `detail.completed` to `false`
|
|
305
|
+
- Set `detail.team_assignment` to `"team_assignment.json"`
|
|
306
|
+
- Populate `detail.specialists` array from specialist_assignments. Each entry:
|
|
307
|
+
- `name`: specialist name
|
|
308
|
+
- `tasks`: task list from assignment
|
|
309
|
+
- `status`: `"pending"` (except first specialist: `"in_progress"`)
|
|
310
|
+
- `stage`: `"stage1"`
|
|
311
|
+
- `stage1_path`: null
|
|
312
|
+
- `decisions_path`: null
|
|
313
|
+
- `blueprint_path`: null
|
|
314
|
+
- Set `detail.current_specialist` to the first specialist name
|
|
315
|
+
- Set `detail.execution_phase` to `1`
|
|
283
316
|
|
|
284
|
-
|
|
317
|
+
6. **Route user**: "Team assignment processed. Detail brief prepared for **[First Specialist Display Name]**. Run `/clear` then `/intuition-detail` to begin specialist consultation."
|
|
285
318
|
|
|
286
|
-
|
|
319
|
+
## TRANSITION 3v9: SPECIALIST → SPECIALIST (Next Specialist)
|
|
287
320
|
|
|
288
|
-
|
|
321
|
+
v9 mode only. Triggers when the current specialist's blueprint is complete and more specialists remain.
|
|
289
322
|
|
|
290
|
-
|
|
323
|
+
### Protocol
|
|
291
324
|
|
|
292
|
-
|
|
325
|
+
1. **Read completed blueprint**: Read `{context_path}/blueprints/{completed-specialist-name}.md`. Extract: key decisions → `docs/project_notes/decisions.md`, domain facts → `docs/project_notes/key_facts.md`.
|
|
293
326
|
|
|
294
|
-
|
|
327
|
+
2. **Update specialist status**: In `detail.specialists`, mark the completed specialist as `status: "completed"`, `stage: "done"`, set `blueprint_path` to the blueprint file path.
|
|
295
328
|
|
|
296
|
-
|
|
297
|
-
- **Plan Summary** (1-2 paragraphs)
|
|
298
|
-
- **Objective**
|
|
299
|
-
- **Discovery Context** (brief reminder)
|
|
300
|
-
- **Task Summary** (task list with brief descriptions)
|
|
301
|
-
- **Known Risks** (with mitigations)
|
|
302
|
-
- **References** (plan path, discovery path)
|
|
329
|
+
3. **Determine next specialist**: Check `detail.execution_order` from `{context_path}/team_assignment.json`. Within the current `execution_phase`, find the next specialist with `status: "pending"`. If all specialists in the current phase are complete, advance `execution_phase` and pick the first pending specialist in the next phase.
|
|
303
330
|
|
|
304
|
-
|
|
331
|
+
4. **Check dependencies**: Read `team_assignment.json` dependencies array. If the next specialist has `reads_blueprint_from` entries, verify those blueprints exist. If any dependency blueprint is missing, skip to the next eligible specialist or halt if none are ready.
|
|
305
332
|
|
|
306
|
-
|
|
333
|
+
5. **Generate detail brief for next specialist**: Overwrite `{context_path}/detail_brief.md` with:
|
|
334
|
+
- **Current Specialist**: name, display_name, domain (from next specialist's profile)
|
|
335
|
+
- **Assigned Tasks**: task details from outline
|
|
336
|
+
- **Specialist Profile Path**: absolute path to the next specialist's profile
|
|
337
|
+
- **Known Research**: same extraction as Transition 2.5v9 — outline sections relevant to this specialist's domain and tasks (Section 2 always, Sections 4/7 filtered by relevance). Omit sections with no relevance.
|
|
338
|
+
- **Prior Blueprints**: paths to ALL completed blueprints in `{context_path}/blueprints/` (the next specialist may need to reference them)
|
|
339
|
+
- **Outline Context**: section 10 content
|
|
340
|
+
- **Detail Queue**: all specialists with status (completed/in_progress/pending)
|
|
307
341
|
|
|
308
|
-
|
|
342
|
+
6. **Update state**: Set `detail.current_specialist` to next specialist name, mark next specialist `status: "in_progress"`, `stage: "stage1"`. Update `detail.execution_phase` if advanced.
|
|
309
343
|
|
|
310
|
-
|
|
344
|
+
7. **Route user**: "[Completed Specialist] blueprint complete. Detail brief updated for **[Next Specialist Display Name]** ([N] of [total], [remaining] remaining). Run `/clear` then `/intuition-detail` to continue."
|
|
311
345
|
|
|
312
|
-
## TRANSITION
|
|
346
|
+
## TRANSITION 4v9: DETAIL → BUILD (Conflict Check + Completeness Gate)
|
|
313
347
|
|
|
314
|
-
|
|
348
|
+
v9 mode only. Triggers when ALL specialists in `detail.specialists` have `status: "completed"`.
|
|
315
349
|
|
|
316
|
-
|
|
317
|
-
- `{context_path}design_spec_[completed_item].md`
|
|
318
|
-
- Current `.project-memory-state.json`
|
|
350
|
+
### Protocol
|
|
319
351
|
|
|
320
|
-
|
|
352
|
+
1. **Extract from all blueprints**: For each blueprint in `{context_path}/blueprints/*.md`, extract decisions → `docs/project_notes/decisions.md`, key facts → `docs/project_notes/key_facts.md`.
|
|
321
353
|
|
|
322
|
-
|
|
354
|
+
2. **Conflict detection**: Spawn a haiku Task subagent to scan all blueprints:
|
|
355
|
+
- **Prompt**: "Read all blueprint files in `{context_path}/blueprints/`. Compare them for: contradictory decisions (same field/resource specified differently), overlapping file modifications (multiple blueprints targeting the same file with conflicting changes), inconsistent interface assumptions (one blueprint expects an API that another defines differently), and duplicated work (two blueprints specifying the same deliverable). Write findings to `{context_path}/blueprint-conflicts.md`. If no conflicts found, write 'No conflicts detected.' to the file."
|
|
356
|
+
- If conflicts found → present to user via AskUserQuestion, ask how to resolve. Do NOT proceed to build until resolved or user explicitly accepts the conflicts.
|
|
323
357
|
|
|
324
|
-
|
|
358
|
+
3. **Completeness gate**: For each blueprint, verify:
|
|
359
|
+
- Section 8 "Open Items" is empty (or contains only `[VERIFY]` / execution-time items)
|
|
360
|
+
- All 9 mandatory sections are present and non-empty
|
|
361
|
+
- Acceptance Mapping section addresses every acceptance criterion from the plan
|
|
362
|
+
- Producer Handoff section references a valid producer
|
|
363
|
+
- If any blueprint fails → report the specific failures, do NOT proceed to build.
|
|
325
364
|
|
|
326
|
-
|
|
365
|
+
4. **Generate build brief**: Write `{context_path}/build_brief.md` with:
|
|
366
|
+
- **Plan Summary** (1-2 paragraphs)
|
|
367
|
+
- **Objective**
|
|
368
|
+
- **Team Summary**: specialists involved, blueprint count, producer assignments
|
|
369
|
+
- **Blueprint Index**: each blueprint with specialist, tasks covered, producer, output format
|
|
370
|
+
- **Conflict Check**: results (clean or resolved conflicts)
|
|
371
|
+
- **Quality Gates**: security review, domain specialist reviews, cross-cutting reviews
|
|
372
|
+
- **Known Risks**: aggregated from blueprints
|
|
373
|
+
- **References**: plan path, all blueprint paths, team_assignment.json path
|
|
327
374
|
|
|
328
|
-
|
|
375
|
+
5. **Update state**: Set `status` to `"building"`, mark `detail.completed = true` with timestamp, set `build.started = true`.
|
|
329
376
|
|
|
330
|
-
|
|
331
|
-
- **Current Item** (name + description)
|
|
332
|
-
- **Plan Context**
|
|
333
|
-
- **Task Details**
|
|
334
|
-
- **Design Rationale**
|
|
335
|
-
- **Prior Design Context** (relevant prior design decisions)
|
|
336
|
-
- **Constraints** (updated with prior design decisions)
|
|
337
|
-
- **Design Queue** (show completed, current, pending items)
|
|
338
|
-
- **References** (plan path, completed spec paths)
|
|
377
|
+
6. **Route user**: "All blueprints complete. Conflict check [passed/resolved]. Build brief saved to `{context_path}/build_brief.md`. Run `/clear` then `/intuition-build` to begin production."
|
|
339
378
|
|
|
340
|
-
|
|
379
|
+
## TRANSITION 3: DESIGN → DESIGN (Next Item)
|
|
341
380
|
|
|
342
|
-
|
|
381
|
+
v8 mode only. Read `{context_path}design_spec_[completed_item].md` and current state. Extract from completed spec: decisions → `decisions.md`, key facts → `key_facts.md`, design work → `issues.md`. Find next `"pending"` item in `design.items`. If none remain, proceed to Transition 4.
|
|
343
382
|
|
|
344
|
-
|
|
383
|
+
Overwrite `{context_path}design_brief.md` for the next item with: Current Item (name + description), Outline Context, Task Details, Design Rationale, Prior Design Context, Constraints (updated with prior decisions), Design Queue (completed/current/pending), References (outline path, completed spec paths).
|
|
345
384
|
|
|
346
|
-
"[Previous Item] design complete. Design brief updated for **[Next Item Name]** ([N] of [total], [remaining] remaining). Run `/clear` then `/intuition-design` to continue."
|
|
385
|
+
Update state: mark completed item `"completed"` with `spec_file`, mark next item `"in_progress"`, set `design.current_item`. Route: "[Previous Item] design complete. Design brief updated for **[Next Item Name]** ([N] of [total], [remaining] remaining). Run `/clear` then `/intuition-design` to continue."
|
|
347
386
|
|
|
348
387
|
## TRANSITION 4: DESIGN → ENGINEER
|
|
349
388
|
|
|
350
|
-
Triggers when ALL design items
|
|
389
|
+
v8 mode only. Triggers when ALL design items are `"completed"` or `"skipped"`. Read all `{context_path}design_spec_*.md` and `outline.md`. Extract from specs: decisions → `decisions.md`, key facts → `key_facts.md`, design work → `issues.md`.
|
|
351
390
|
|
|
352
|
-
|
|
391
|
+
Write `{context_path}engineering_brief.md` with: Outline Summary (1-2 paragraphs), Objective, Discovery Context, Design Specifications (list each spec; include "Engineer MUST read these specs before creating code specs for flagged tasks"), Task Summary (mark tasks with design specs), Known Risks, References (outline, discovery, design spec paths).
|
|
353
392
|
|
|
354
|
-
|
|
355
|
-
Read: `{context_path}plan.md`
|
|
393
|
+
Update state: set `status` to `"engineering"`, mark `design.completed = true` with timestamp, set `engineering.started = true`. Route: "All design specs processed. Engineering brief saved to `{context_path}engineering_brief.md`. Run `/clear` then `/intuition-engineer` to create code specs."
|
|
356
394
|
|
|
357
|
-
|
|
395
|
+
## TRANSITION 5: ENGINEER → BUILD
|
|
358
396
|
|
|
359
|
-
|
|
397
|
+
Read `{context_path}code_specs.md` and `outline.md`. Extract: engineering decisions → `decisions.md`, implementation approach facts → `key_facts.md`.
|
|
360
398
|
|
|
361
|
-
|
|
399
|
+
Write `{context_path}build_brief.md` with: Outline Summary (1-2 paragraphs), Objective, Code Specs Summary (task count, key decisions — 1 line each), Required User Steps, Quality Gates (security review, tests, code review), Known Risks, References (outline, code_specs, design spec paths if any).
|
|
362
400
|
|
|
363
|
-
|
|
364
|
-
- **Plan Summary** (1-2 paragraphs)
|
|
365
|
-
- **Objective**
|
|
366
|
-
- **Discovery Context** (brief reminder)
|
|
367
|
-
- **Design Specifications** (list each spec with one-line summary; include: "Engineer MUST read these specs before creating code specs for flagged tasks.")
|
|
368
|
-
- **Task Summary** (list tasks, mark tasks with design specs)
|
|
369
|
-
- **Known Risks** (with mitigations)
|
|
370
|
-
- **References** (plan path, discovery path, design spec paths)
|
|
401
|
+
Update state: set `status` to `"building"`, mark `engineering.completed = true` with timestamp, set `build.started = true`. Route: "Code specs processed. Build brief saved to `{context_path}build_brief.md`. Run `/clear` then `/intuition-build` to begin implementation."
|
|
371
402
|
|
|
372
|
-
|
|
403
|
+
## TRANSITION 6.5v9: BUILD → TEST
|
|
373
404
|
|
|
374
|
-
|
|
405
|
+
v9 mode only. Triggers when build completes and `team_assignment.json` contains at least one `producer_assignments` entry with `producer == "code-writer"`.
|
|
375
406
|
|
|
376
|
-
###
|
|
407
|
+
### Protocol
|
|
377
408
|
|
|
378
|
-
|
|
409
|
+
1. **Read build_report.md**: Extract files modified, task results, deviations from blueprints.
|
|
379
410
|
|
|
380
|
-
|
|
411
|
+
2. **Extract to memory files**: Same extraction as Transition 6 — bugs → `bugs.md`, lessons/deviations → `key_facts.md`, work completed → `issues.md`. Do NOT mark build as the final step.
|
|
381
412
|
|
|
382
|
-
|
|
413
|
+
3. **Generate test brief**: Write `{context_path}/test_brief.md`:
|
|
383
414
|
|
|
384
|
-
|
|
385
|
-
|
|
415
|
+
```markdown
|
|
416
|
+
# Test Brief
|
|
386
417
|
|
|
387
|
-
|
|
418
|
+
## Build Summary
|
|
419
|
+
- **Status**: [from build_report]
|
|
420
|
+
- **Tasks completed**: [count and list]
|
|
421
|
+
- **Files modified**: [list from build_report]
|
|
388
422
|
|
|
389
|
-
|
|
423
|
+
## Code Producers Used
|
|
424
|
+
[For each producer_assignments entry where producer == "code-writer":]
|
|
425
|
+
- **Specialist**: [specialist name]
|
|
426
|
+
- **Tasks**: [task IDs]
|
|
427
|
+
- **Output files**: [from build_report]
|
|
390
428
|
|
|
391
|
-
|
|
429
|
+
## Acceptance Criteria
|
|
430
|
+
[For each code-writer task, extract acceptance criteria from outline.md]
|
|
392
431
|
|
|
393
|
-
|
|
394
|
-
-
|
|
395
|
-
-
|
|
396
|
-
- **Code Specs Summary** (task count, key engineering decisions — 1 line each)
|
|
397
|
-
- **Required User Steps** (from code_specs.md — things the user must do manually)
|
|
398
|
-
- **Quality Gates** (security review, tests, code review)
|
|
399
|
-
- **Known Risks** (from code specs risk notes)
|
|
400
|
-
- **References** (plan path, code_specs path, design spec paths if any)
|
|
432
|
+
## Decision Log References
|
|
433
|
+
- Specialist decision logs: [paths to {context_path}/scratch/*-decisions.json]
|
|
434
|
+
- Project decisions: docs/project_notes/decisions.md
|
|
401
435
|
|
|
402
|
-
|
|
436
|
+
## Blueprint References
|
|
437
|
+
[Paths to blueprints for code-writer tasks in {context_path}/blueprints/]
|
|
403
438
|
|
|
404
|
-
|
|
439
|
+
## Specialist Test Recommendations
|
|
440
|
+
[From build_report "Test Deliverables Deferred" section — any test specs/files that specialists recommended but build skipped. Include the blueprint source for each so test can read the full context.]
|
|
405
441
|
|
|
406
|
-
|
|
442
|
+
| Blueprint Source | Deferred File | Description |
|
|
443
|
+
|-----------------|---------------|-------------|
|
|
444
|
+
| [specialist-name.md] | [file path] | [what the specialist recommended] |
|
|
407
445
|
|
|
408
|
-
"
|
|
446
|
+
[If build_report has no "Test Deliverables Deferred" section or it says "No test deliverables found", write "No specialist test recommendations."]
|
|
409
447
|
|
|
410
|
-
##
|
|
448
|
+
## Known Issues
|
|
449
|
+
[From build_report — any issues, deviations, or flagged items]
|
|
450
|
+
```
|
|
411
451
|
|
|
412
|
-
|
|
452
|
+
4. **Update state**: Set `status` to `"testing"`, mark `build.completed = true` with timestamp, set `test.started = true`.
|
|
413
453
|
|
|
414
|
-
|
|
454
|
+
5. **Route**: "Build complete. Code was produced — test phase needed. Run `/clear` then `/intuition-test`."
|
|
415
455
|
|
|
416
|
-
|
|
456
|
+
## TRANSITION 7: TEST → COMPLETE
|
|
417
457
|
|
|
418
|
-
|
|
419
|
-
- Bugs found or issues encountered → `docs/project_notes/bugs.md`
|
|
420
|
-
- Lessons learned or deviations → `docs/project_notes/key_facts.md`
|
|
421
|
-
- Work completed → `docs/project_notes/issues.md`
|
|
458
|
+
Triggers when `context_workflow.status == "testing"` and `workflow.test.completed == true`.
|
|
422
459
|
|
|
423
|
-
###
|
|
460
|
+
### Protocol
|
|
424
461
|
|
|
425
|
-
|
|
462
|
+
1. **Read test_report.md**: Read `{context_path}/test_report.md`. If missing, warn user but proceed with build_report only.
|
|
426
463
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
- "Yes — commit and push"
|
|
433
|
-
- "Yes — commit only (no push)"
|
|
434
|
-
- "No — skip git"
|
|
435
|
-
```
|
|
464
|
+
2. **Extract to memory files**: Implementation fixes → `docs/project_notes/bugs.md`, test coverage insights → `docs/project_notes/key_facts.md`, escalated issues → `docs/project_notes/issues.md`.
|
|
465
|
+
|
|
466
|
+
3. **Fall through to Transition 6 completion protocol**: Proceed with the full Transition 6 protocol below (build_report reading, generated specialist saving, git commit offer, state updates). When coming from test, also read test_report.md during the completion extraction and mark `test.completed = true` with timestamp.
|
|
467
|
+
|
|
468
|
+
## TRANSITION 6: BUILD → COMPLETE
|
|
436
469
|
|
|
437
|
-
|
|
438
|
-
1. Run `git status` to see changed files
|
|
439
|
-
2. Run `git add` for files listed in the build report's "Files Modified" section. Cross-reference with `git status` to catch any files the report missed.
|
|
440
|
-
3. Run `git commit` with a descriptive message summarizing the build
|
|
441
|
-
4. If user chose push: run `git push`
|
|
470
|
+
This transition also serves as the completion protocol for Transition 7 fallthrough. When coming from test (status == "testing"), also read `{context_path}/test_report.md` and include test results in memory extraction. Mark `test.completed = true` with timestamp if applicable. When coming from build with no code-writer (v9) or any v8 build, mark `test.skipped = true`.
|
|
442
471
|
|
|
443
|
-
|
|
472
|
+
Read `{context_path}/build_report.md` — REQUIRED (warn user if missing, proceed with what's available). Extract: bugs → `bugs.md`, lessons/deviations → `key_facts.md`, work completed → `issues.md`.
|
|
444
473
|
|
|
445
|
-
|
|
474
|
+
**Save Generated Specialists to User Pool:** Check if `{context_path}/generated-specialists/` directory exists (Glob: `{context_path}generated-specialists/*/*.specialist.md`). If any `.specialist.md` files are found, for EACH file:
|
|
475
|
+
1. Read the file's YAML frontmatter to extract `display_name` and `name`.
|
|
476
|
+
2. Use AskUserQuestion with header "Save Generated Specialist":
|
|
477
|
+
- Question: "The specialist **[display_name]** was generated during this workflow. Save it to your personal library for future projects?"
|
|
478
|
+
- Options: "Yes — save to ~/.claude/specialists/" / "No — discard (session-only)"
|
|
479
|
+
3. If "Yes": Create the target directory and copy the file via Bash: `mkdir -p ~/.claude/specialists/{name} && cp "{source_path}" ~/.claude/specialists/{name}/{name}.specialist.md`. Log: "Saved **[display_name]** to `~/.claude/specialists/{name}/`."
|
|
480
|
+
4. If "No": Skip. Log: "Skipped **[display_name]** (session-only)."
|
|
446
481
|
|
|
447
|
-
|
|
482
|
+
This step runs only once per completed build, and only if generated specialists exist. If the glob returns no results, skip this step entirely.
|
|
448
483
|
|
|
449
|
-
|
|
484
|
+
**Git Commit Offer:** Check for `.git` directory (Bash: `test -d .git`). If git repo exists, use AskUserQuestion with header "Git Commit", options: "Yes — commit and push" / "Yes — commit only (no push)" / "No — skip git". If approved: `git status`, `git add` files from build report's "Files Modified" (cross-reference with status), `git commit` with descriptive message, optionally `git push`. Skip if no repo or user declines.
|
|
450
485
|
|
|
451
|
-
"Workflow cycle complete for [context display name]. Run `/clear` then `/intuition-start` to see your project status and decide what's next."
|
|
486
|
+
Update state: set `status` to `"complete"`, mark `build.completed = true` with timestamp. Route: "Workflow cycle complete for [context display name]. Run `/clear` then `/intuition-start` to see your project status and decide what's next."
|
|
452
487
|
|
|
453
488
|
## MEMORY FILE FORMATS
|
|
454
489
|
|
|
@@ -462,15 +497,22 @@ All shared memory files live at `docs/project_notes/` (never context_path).
|
|
|
462
497
|
|
|
463
498
|
## EDGE CASES
|
|
464
499
|
|
|
465
|
-
- **Missing
|
|
500
|
+
- **Missing prompt_output.json**: Extract insights from prompt_brief.md manually.
|
|
466
501
|
- **Poor output quality**: Process as-is. Note concerns in brief. Do NOT fix outputs.
|
|
467
|
-
- **New constraints from
|
|
502
|
+
- **New constraints from outline**: Update key_facts.md, create ADR if architectural.
|
|
468
503
|
- **Interrupted handoff**: Check what's updated, continue from there, don't duplicate.
|
|
469
504
|
- **Corrupted state**: Infer phase from existing files. Ask user to confirm.
|
|
470
505
|
- **Design item skipped mid-loop**: Mark as `"skipped"`, proceed to next. Note in engineering brief.
|
|
471
|
-
- **No Design Recommendations in
|
|
472
|
-
- **
|
|
506
|
+
- **No Design Recommendations in outline**: Present tasks to user, ask if any need design. If none, use 2B.
|
|
507
|
+
- **Outline revision after design started**: Alert user. Ask whether to continue or re-evaluate.
|
|
473
508
|
- **Missing code_specs.md at Transition 5**: Tell user to run `/intuition-engineer` first.
|
|
509
|
+
- **v9 outline detected but no assemble run yet**: Route to `/intuition-assemble`.
|
|
510
|
+
- **v9 specialist dependency blueprint missing**: Skip to next eligible specialist. If none are eligible, halt and ask user.
|
|
511
|
+
- **v9 conflict detection finds issues**: Present all conflicts, ask user to resolve before build. Do not auto-resolve.
|
|
512
|
+
- **v9 completeness gate fails**: Report exact failures per blueprint. User must fix blueprints (re-run detail) before build.
|
|
513
|
+
- **v9 build with no code-writer**: Skip test, mark `test.skipped = true`, direct to Transition 6 completion.
|
|
514
|
+
- **Test report missing at Transition 7**: Warn user, proceed with build report only for memory extraction.
|
|
515
|
+
- **Test skipped by user**: Set `test.skipped = true`, `test.completed = true`, proceed to completion.
|
|
474
516
|
|
|
475
517
|
## VOICE
|
|
476
518
|
|