@tgoodington/intuition 5.0.0 → 7.0.0
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/docs/intuition_design_skill_spec.md +219 -0
- package/docs/v7_design_spec.md +1111 -0
- package/docs/v7_plan.md +339 -0
- package/package.json +2 -2
- package/scripts/install-skills.js +45 -125
- package/scripts/uninstall-skills.js +22 -13
- package/skills/intuition-design/SKILL.md +378 -0
- package/skills/intuition-engineer/SKILL.md +278 -0
- package/skills/intuition-execute/SKILL.md +100 -48
- package/skills/intuition-handoff/SKILL.md +264 -184
- package/skills/intuition-initialize/SKILL.md +70 -30
- package/skills/intuition-initialize/references/claude_template.md +48 -16
- package/skills/intuition-initialize/references/design_brief_template.md +64 -0
- package/skills/intuition-initialize/references/execution_brief_template.md +22 -15
- package/skills/intuition-initialize/references/intuition_readme_template.md +60 -0
- package/skills/intuition-initialize/references/planning_brief_template.md +9 -7
- package/skills/intuition-initialize/references/state_template.json +30 -21
- package/skills/intuition-plan/SKILL.md +100 -18
- package/skills/intuition-prompt/SKILL.md +35 -4
- package/skills/intuition-start/SKILL.md +187 -87
- package/skills/intuition-discovery/SKILL.md +0 -366
- package/skills/intuition-discovery/references/templates/discovery_brief_template.md +0 -110
- package/skills/intuition-discovery/references/waldo_core.md +0 -1013
|
@@ -1,6 +1,6 @@
|
|
|
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.
|
|
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
4
|
model: haiku
|
|
5
5
|
tools: Read, Write, Glob, Grep, AskUserQuestion
|
|
6
6
|
allowed-tools: Read, Write, Glob, Grep
|
|
@@ -14,302 +14,382 @@ You are the handoff orchestrator. You process phase outputs, update project memo
|
|
|
14
14
|
|
|
15
15
|
These are non-negotiable. Violating any of these means the protocol has failed.
|
|
16
16
|
|
|
17
|
-
1. You MUST
|
|
18
|
-
2. You MUST
|
|
19
|
-
3. You MUST
|
|
20
|
-
4. You MUST
|
|
21
|
-
5. You MUST
|
|
22
|
-
6. You MUST
|
|
23
|
-
7. You MUST NOT
|
|
24
|
-
8. You MUST
|
|
25
|
-
9. You MUST
|
|
17
|
+
1. You MUST resolve the active context and context_path before every transition. NEVER hardcode `docs/project_notes/` for workflow artifacts.
|
|
18
|
+
2. You MUST detect which transition is happening before doing anything else.
|
|
19
|
+
3. You MUST read all phase output files before processing.
|
|
20
|
+
4. You MUST update memory files with proper formatting (see formats below).
|
|
21
|
+
5. You MUST generate a brief for the next agent.
|
|
22
|
+
6. You MUST update `.project-memory-state.json` — you are the ONLY skill that writes to this file.
|
|
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→planning transitions.
|
|
25
|
+
9. You MUST suggest the correct next skill after completing the transition.
|
|
26
|
+
10. You MUST NOT modify discovery_brief.md, plan.md, design_spec_*.md, or other phase output files — they are read-only inputs.
|
|
27
|
+
11. You MUST manage the design loop: track which items are designed, route to next item or to execute when all are done.
|
|
28
|
+
|
|
29
|
+
## CONTEXT PATH RESOLUTION
|
|
30
|
+
|
|
31
|
+
Before ANY transition, resolve the active context:
|
|
32
|
+
|
|
33
|
+
1. Read `docs/project_notes/.project-memory-state.json`
|
|
34
|
+
2. Get `active_context` value
|
|
35
|
+
3. IF active_context == "trunk": `context_path = "docs/project_notes/trunk/"`
|
|
36
|
+
ELSE: `context_path = "docs/project_notes/branches/{active_context}/"`
|
|
37
|
+
4. Get context_workflow:
|
|
38
|
+
IF active_context == "trunk": `context_workflow = state.trunk`
|
|
39
|
+
ELSE: `context_workflow = state.branches[active_context]`
|
|
40
|
+
5. Use `context_path` for all workflow artifact file operations
|
|
41
|
+
6. Use `context_workflow` for all status checks and state writes
|
|
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.
|
|
26
43
|
|
|
27
44
|
## PROTOCOL: COMPLETE FLOW
|
|
28
45
|
|
|
29
|
-
Execute these steps in order:
|
|
30
|
-
|
|
31
46
|
```
|
|
32
|
-
Step 1:
|
|
33
|
-
Step 2:
|
|
34
|
-
Step 3:
|
|
35
|
-
Step 4:
|
|
36
|
-
Step 5:
|
|
37
|
-
Step 6:
|
|
38
|
-
Step 7:
|
|
39
|
-
Step 8:
|
|
47
|
+
Step 1: Resolve context_path and context_workflow (see above)
|
|
48
|
+
Step 2: Detect transition type from context_workflow
|
|
49
|
+
Step 3: Read phase output files from {context_path}
|
|
50
|
+
Step 4: Extract insights and structure findings
|
|
51
|
+
Step 5: Update shared memory files (key_facts.md, decisions.md, issues.md)
|
|
52
|
+
Step 6: Merge user profile learnings (prompt→planning only)
|
|
53
|
+
Step 7: Generate brief for next agent at {context_path}
|
|
54
|
+
Step 8: Update .project-memory-state.json (target active context object)
|
|
55
|
+
Step 9: Report what was processed and suggest next skill
|
|
40
56
|
```
|
|
41
57
|
|
|
42
58
|
## STEP 1: DETECT TRANSITION
|
|
43
59
|
|
|
44
|
-
|
|
60
|
+
After resolving context_path and context_workflow, determine:
|
|
45
61
|
|
|
46
62
|
```
|
|
47
|
-
IF
|
|
48
|
-
AND planning.started == false:
|
|
49
|
-
→ TRANSITION:
|
|
50
|
-
|
|
51
|
-
IF
|
|
52
|
-
AND
|
|
53
|
-
→ TRANSITION: Planning →
|
|
54
|
-
|
|
55
|
-
IF
|
|
63
|
+
IF context_workflow.status == "prompt" AND workflow.prompt.completed == true
|
|
64
|
+
AND workflow.planning.started == false:
|
|
65
|
+
→ TRANSITION: Prompt → Planning
|
|
66
|
+
|
|
67
|
+
IF context_workflow.status == "planning" AND workflow.planning.completed == true
|
|
68
|
+
AND workflow.design.started == false:
|
|
69
|
+
→ TRANSITION: Planning → Design (initial setup)
|
|
70
|
+
|
|
71
|
+
IF context_workflow.status == "design":
|
|
72
|
+
→ Check workflow.design.items array
|
|
73
|
+
→ IF current item just completed AND more items remain:
|
|
74
|
+
→ TRANSITION: Design → Design (next item)
|
|
75
|
+
→ IF all items completed:
|
|
76
|
+
→ TRANSITION: Design → Execution
|
|
77
|
+
|
|
78
|
+
IF context_workflow.status == "executing" AND workflow.execution.completed == true:
|
|
56
79
|
→ TRANSITION: Execution → Complete
|
|
57
80
|
|
|
58
81
|
IF no clear transition detected:
|
|
59
82
|
→ ASK USER: "Which phase just completed?" (use AskUserQuestion)
|
|
60
83
|
```
|
|
61
84
|
|
|
62
|
-
## STATE SCHEMA
|
|
85
|
+
## STATE SCHEMA (v4.0)
|
|
63
86
|
|
|
64
87
|
This is the authoritative schema for `.project-memory-state.json`:
|
|
65
88
|
|
|
66
89
|
```json
|
|
67
90
|
{
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"output_files": []
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"started": false,
|
|
78
|
-
"completed": false,
|
|
79
|
-
"completed_at": null,
|
|
80
|
-
"approved": false
|
|
81
|
-
},
|
|
82
|
-
"execution": {
|
|
83
|
-
"started": false,
|
|
84
|
-
"completed": false,
|
|
85
|
-
"completed_at": null
|
|
91
|
+
"initialized": true,
|
|
92
|
+
"version": "4.0",
|
|
93
|
+
"active_context": "trunk",
|
|
94
|
+
"trunk": {
|
|
95
|
+
"status": "none | prompt | planning | design | executing | complete",
|
|
96
|
+
"workflow": {
|
|
97
|
+
"prompt": { "started": false, "completed": false, "started_at": null, "completed_at": null, "output_files": [] },
|
|
98
|
+
"planning": { "started": false, "completed": false, "completed_at": null, "approved": false },
|
|
99
|
+
"design": { "started": false, "completed": false, "completed_at": null, "items": [], "current_item": null },
|
|
100
|
+
"execution": { "started": false, "completed": false, "completed_at": null }
|
|
86
101
|
}
|
|
87
102
|
},
|
|
103
|
+
"branches": {},
|
|
88
104
|
"last_handoff": null,
|
|
89
105
|
"last_handoff_transition": null
|
|
90
106
|
}
|
|
91
107
|
```
|
|
92
108
|
|
|
93
|
-
|
|
109
|
+
### Branch Entry Schema
|
|
110
|
+
|
|
111
|
+
Each branch in `branches` has: `display_name`, `created_from`, `created_at`, `purpose`, `status`, and a `workflow` object identical to trunk's workflow structure.
|
|
112
|
+
|
|
113
|
+
### Design Items Schema
|
|
114
|
+
|
|
115
|
+
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": "..." }`
|
|
116
|
+
|
|
117
|
+
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.
|
|
118
|
+
|
|
119
|
+
### State Write Pattern
|
|
120
|
+
|
|
121
|
+
All state writes MUST target the active context object:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
IF active_context == "trunk":
|
|
125
|
+
Update state.trunk.status and state.trunk.workflow.*
|
|
126
|
+
ELSE:
|
|
127
|
+
Update state.branches[active_context].status and state.branches[active_context].workflow.*
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## TRANSITION 0: BRANCH CREATION
|
|
131
|
+
|
|
132
|
+
Triggered when start routes to handoff with branch creation intent. User has provided: branch name, purpose, parent context.
|
|
133
|
+
|
|
134
|
+
### Protocol
|
|
135
|
+
|
|
136
|
+
1. **Validate branch name**: Convert to kebab-case for the state key. Reject names containing `/`, `\`, `.`, or `..` — only alphanumeric characters and hyphens allowed. Reject if `state.branches[branch_key]` already exists — tell user to pick a different name.
|
|
137
|
+
2. **Create branch directory**: `docs/project_notes/branches/{branch_key}/`
|
|
138
|
+
3. **Add branch to state**:
|
|
139
|
+
- `display_name`: user-provided name
|
|
140
|
+
- `created_from`: parent context key ("trunk" or another branch key)
|
|
141
|
+
- `created_at`: ISO timestamp
|
|
142
|
+
- `purpose`: user-provided sentence
|
|
143
|
+
- `status`: "none"
|
|
144
|
+
- `workflow`: identical structure to trunk's workflow (all false/null/empty)
|
|
145
|
+
4. **Set `active_context`** to the new branch key.
|
|
146
|
+
5. **Write updated state**. Set `last_handoff_transition` to "branch_creation".
|
|
147
|
+
6. **Route user**: "Branch **[display_name]** created. Run `/intuition-prompt` to define what this branch will accomplish."
|
|
148
|
+
|
|
149
|
+
## V3 STATE MIGRATION
|
|
150
|
+
|
|
151
|
+
Fires automatically when handoff detects a v3.0 state before processing any transition.
|
|
152
|
+
|
|
153
|
+
### Detection
|
|
154
|
+
|
|
155
|
+
`version == "3.0"` OR missing `active_context` field in state.
|
|
94
156
|
|
|
95
|
-
|
|
157
|
+
### Migration Steps
|
|
158
|
+
|
|
159
|
+
1. Create `docs/project_notes/trunk/` directory.
|
|
160
|
+
2. Move existing workflow artifacts from `docs/project_notes/` into `docs/project_notes/trunk/`:
|
|
161
|
+
- `discovery_brief.md`, `discovery_output.json`, `planning_brief.md`, `plan.md`
|
|
162
|
+
- `design_brief.md`, `design_spec_*.md`, `execution_brief.md`
|
|
163
|
+
- `.planning_research/` directory (entire folder)
|
|
164
|
+
- Only move files that exist. Skip missing files silently.
|
|
165
|
+
3. Restructure state:
|
|
166
|
+
- Wrap existing `status` and `workflow` into a `trunk` object
|
|
167
|
+
- Add `active_context: "trunk"`
|
|
168
|
+
- Add `branches: {}`
|
|
169
|
+
- Set `version: "4.0"`
|
|
170
|
+
- Preserve all other top-level fields (`initialized`, `last_handoff`, `last_handoff_transition`)
|
|
171
|
+
4. Write updated state.
|
|
172
|
+
5. Report to user: list which files were migrated and confirm v4.0 upgrade. Then continue with the original transition.
|
|
173
|
+
|
|
174
|
+
Leave shared files (`key_facts.md`, `decisions.md`, `issues.md`, `bugs.md`) at `docs/project_notes/` — do NOT move them.
|
|
175
|
+
|
|
176
|
+
## TRANSITION 1: PROMPT → PLANNING
|
|
96
177
|
|
|
97
178
|
### Read Outputs
|
|
98
179
|
|
|
99
|
-
Read
|
|
100
|
-
- `
|
|
101
|
-
- `
|
|
180
|
+
Read from `{context_path}`:
|
|
181
|
+
- `{context_path}discovery_brief.md` — human-readable discovery summary
|
|
182
|
+
- `{context_path}discovery_output.json` — structured data (if exists)
|
|
102
183
|
|
|
103
184
|
If `discovery_output.json` doesn't exist, extract insights manually from `discovery_brief.md`.
|
|
104
185
|
|
|
105
186
|
### Extract and Structure
|
|
106
187
|
|
|
107
188
|
From the outputs, identify:
|
|
108
|
-
- **Key facts** → add to `key_facts.md`
|
|
109
|
-
- **Constraints** → add to `key_facts.md` under constraints category
|
|
110
|
-
- **Suggested decisions** → create ADRs in `decisions.md`
|
|
189
|
+
- **Key facts** → add to `docs/project_notes/key_facts.md`
|
|
190
|
+
- **Constraints** → add to `docs/project_notes/key_facts.md` under constraints category
|
|
191
|
+
- **Suggested decisions** → create ADRs in `docs/project_notes/decisions.md`
|
|
111
192
|
- **Assumptions** → reference in brief, not directly added to memory
|
|
112
|
-
- **Follow-up items** → add to `issues.md`
|
|
193
|
+
- **Follow-up items** → add to `docs/project_notes/issues.md`
|
|
113
194
|
|
|
114
195
|
### User Profile Merge
|
|
115
196
|
|
|
116
|
-
If `
|
|
117
|
-
|
|
197
|
+
If `{context_path}discovery_output.json` contains `user_profile_learnings` AND `.claude/USER_PROFILE.json` exists:
|
|
118
198
|
1. Read existing USER_PROFILE.json
|
|
119
|
-
2. Merge learnings
|
|
120
|
-
- If a profile field is `null` and learnings have a value → add it
|
|
121
|
-
- If a profile field is populated → only overwrite if discovery_confidence is "high"
|
|
122
|
-
- Always update `metadata.last_updated`
|
|
199
|
+
2. Merge learnings (null fields get new values; populated fields only overwrite if confidence is "high")
|
|
123
200
|
3. Save updated profile
|
|
124
201
|
|
|
125
|
-
If USER_PROFILE.json does NOT exist, skip this step.
|
|
202
|
+
If USER_PROFILE.json does NOT exist, skip this step.
|
|
126
203
|
|
|
127
204
|
### Generate Planning Brief
|
|
128
205
|
|
|
129
|
-
Write `
|
|
206
|
+
Write `{context_path}planning_brief.md` with these sections:
|
|
207
|
+
- **Discovery Summary** (1-2 paragraphs)
|
|
208
|
+
- **Problem Statement**
|
|
209
|
+
- **Goals & Success Criteria**
|
|
210
|
+
- **Key Constraints**
|
|
211
|
+
- **Architectural Context** (existing decisions/patterns)
|
|
212
|
+
- **Assumptions & Risks** (with confidence levels)
|
|
213
|
+
- **References** (discovery_brief path, relevant ADR numbers)
|
|
214
|
+
|
|
215
|
+
### Update State
|
|
130
216
|
|
|
131
|
-
|
|
132
|
-
# Planning Brief: [Problem Title]
|
|
217
|
+
Update the active context: set `status` to `"planning"`, mark `prompt.completed = true` with timestamp, set `planning.started = true`.
|
|
133
218
|
|
|
134
|
-
|
|
135
|
-
[1-2 paragraph summary]
|
|
219
|
+
### Route User
|
|
136
220
|
|
|
137
|
-
|
|
138
|
-
[Clear statement of what needs to be solved]
|
|
221
|
+
"Discovery processed. Planning brief saved to `{context_path}planning_brief.md`. Run `/intuition-plan` to create a structured plan."
|
|
139
222
|
|
|
140
|
-
##
|
|
141
|
-
[What success looks like]
|
|
223
|
+
## TRANSITION 2: PLANNING → DESIGN (Initial Setup)
|
|
142
224
|
|
|
143
|
-
|
|
144
|
-
- [Constraint 1]
|
|
145
|
-
- [Constraint 2]
|
|
225
|
+
### Read Outputs
|
|
146
226
|
|
|
147
|
-
|
|
148
|
-
[Existing decisions and patterns relevant to planning]
|
|
227
|
+
Read: `{context_path}plan.md`
|
|
149
228
|
|
|
150
|
-
|
|
151
|
-
- [Assumption]: Confidence High/Medium/Low
|
|
152
|
-
- [Risk]: Should be explored during planning
|
|
229
|
+
### Extract Design Items
|
|
153
230
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
231
|
+
From the plan, find "Design Recommendations" section. Extract all items flagged for design with rationale and task numbers. If no section exists, assess tasks yourself and present to user.
|
|
232
|
+
|
|
233
|
+
### Extract and Structure
|
|
234
|
+
|
|
235
|
+
From the plan: new architectural decisions → `docs/project_notes/decisions.md`, risks/dependencies → include in brief, planning work → `docs/project_notes/issues.md`.
|
|
236
|
+
|
|
237
|
+
### Present Design Items to User
|
|
238
|
+
|
|
239
|
+
Use AskUserQuestion:
|
|
240
|
+
- Header: "Design Items"
|
|
241
|
+
- Question: List each flagged item with rationale
|
|
242
|
+
- Options: "All recommended items need design" / "Some items — let me specify" / "None — skip design, go straight to execution"
|
|
243
|
+
|
|
244
|
+
If "Some items," follow up. If "None," use Transition 4B.
|
|
245
|
+
|
|
246
|
+
### Generate Design Brief
|
|
247
|
+
|
|
248
|
+
Write `{context_path}design_brief.md` for the FIRST item with these sections:
|
|
249
|
+
- **Current Item** (name + description)
|
|
250
|
+
- **Plan Context** (1-2 paragraphs)
|
|
251
|
+
- **Task Details** (task numbers, description, acceptance criteria, dependencies)
|
|
252
|
+
- **Design Rationale** (why flagged)
|
|
253
|
+
- **Constraints**
|
|
254
|
+
- **Design Queue** (all items with status)
|
|
255
|
+
- **References** (plan path, discovery path)
|
|
158
256
|
|
|
159
257
|
### Update State
|
|
160
258
|
|
|
161
|
-
|
|
162
|
-
{
|
|
163
|
-
"workflow": {
|
|
164
|
-
"status": "planning",
|
|
165
|
-
"discovery": { "completed": true, "completed_at": "[ISO timestamp]" },
|
|
166
|
-
"planning": { "started": true }
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
```
|
|
259
|
+
Update active context: set `status` to `"design"`, mark `planning.completed = true` with timestamp and `approved = true`, set `design.started = true`, populate `design.items` array with all confirmed items, set `design.current_item` to first item, mark first item status `"in_progress"`.
|
|
170
260
|
|
|
171
261
|
### Route User
|
|
172
262
|
|
|
173
|
-
|
|
263
|
+
"Plan processed. Design brief prepared for **[First Item Name]**. Run `/intuition-design` to begin design exploration."
|
|
174
264
|
|
|
175
|
-
## TRANSITION
|
|
265
|
+
## TRANSITION 3: DESIGN → DESIGN (Next Item)
|
|
176
266
|
|
|
177
267
|
### Read Outputs
|
|
178
268
|
|
|
179
|
-
Read:
|
|
269
|
+
Read:
|
|
270
|
+
- `{context_path}design_spec_[completed_item].md`
|
|
271
|
+
- Current `.project-memory-state.json`
|
|
180
272
|
|
|
181
273
|
### Extract and Structure
|
|
182
274
|
|
|
183
|
-
From
|
|
184
|
-
- **Task structure** → reference in execution brief
|
|
185
|
-
- **New architectural decisions** → create ADRs in `decisions.md`
|
|
186
|
-
- **Risks and dependencies** → include in execution brief
|
|
187
|
-
- **Planning work completed** → log in `issues.md`
|
|
275
|
+
From completed spec: decisions → `docs/project_notes/decisions.md`, key facts → `docs/project_notes/key_facts.md`, design work → `docs/project_notes/issues.md`.
|
|
188
276
|
|
|
189
|
-
|
|
190
|
-
Do NOT update `bugs.md` — execution finds bugs, not planning.
|
|
277
|
+
### Determine Next Item
|
|
191
278
|
|
|
192
|
-
|
|
279
|
+
Find next item with status `"pending"` in `design.items`. If none remain, proceed to Transition 4.
|
|
280
|
+
|
|
281
|
+
### Update Design Brief
|
|
282
|
+
|
|
283
|
+
Overwrite `{context_path}design_brief.md` for the next item with these sections:
|
|
284
|
+
- **Current Item** (name + description)
|
|
285
|
+
- **Plan Context**
|
|
286
|
+
- **Task Details**
|
|
287
|
+
- **Design Rationale**
|
|
288
|
+
- **Prior Design Context** (relevant prior design decisions)
|
|
289
|
+
- **Constraints** (updated with prior design decisions)
|
|
290
|
+
- **Design Queue** (show completed, current, pending items)
|
|
291
|
+
- **References** (plan path, completed spec paths)
|
|
193
292
|
|
|
194
|
-
|
|
293
|
+
### Update State
|
|
195
294
|
|
|
196
|
-
|
|
197
|
-
# Execution Brief: [Plan Title]
|
|
295
|
+
Update active context's `design.items`: mark completed item as `"completed"` with `spec_file`, mark next item as `"in_progress"`, set `design.current_item` to next item.
|
|
198
296
|
|
|
199
|
-
|
|
200
|
-
[1-2 paragraph overview]
|
|
297
|
+
### Route User
|
|
201
298
|
|
|
202
|
-
|
|
203
|
-
[What will be accomplished]
|
|
299
|
+
"[Previous Item] design complete. Design brief updated for **[Next Item Name]** ([N] of [total], [remaining] remaining). Run `/intuition-design` to continue."
|
|
204
300
|
|
|
205
|
-
##
|
|
206
|
-
[Brief reminder of why this matters]
|
|
301
|
+
## TRANSITION 4: DESIGN → EXECUTION
|
|
207
302
|
|
|
208
|
-
|
|
209
|
-
[List tasks in execution order with brief descriptions]
|
|
303
|
+
Triggers when ALL design items have status `"completed"` or `"skipped"`.
|
|
210
304
|
|
|
211
|
-
|
|
212
|
-
- Security review: MANDATORY
|
|
213
|
-
- Tests must pass
|
|
214
|
-
- Code review required
|
|
305
|
+
### Read Outputs
|
|
215
306
|
|
|
216
|
-
|
|
217
|
-
|
|
307
|
+
Read all design specs: `{context_path}design_spec_*.md`
|
|
308
|
+
Read: `{context_path}plan.md`
|
|
218
309
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
310
|
+
### Extract and Structure
|
|
311
|
+
|
|
312
|
+
From design specs: decisions → `docs/project_notes/decisions.md`, key facts → `docs/project_notes/key_facts.md`, design work → `docs/project_notes/issues.md`.
|
|
313
|
+
|
|
314
|
+
### Generate Execution Brief
|
|
315
|
+
|
|
316
|
+
Write `{context_path}execution_brief.md` with these sections:
|
|
317
|
+
- **Plan Summary** (1-2 paragraphs)
|
|
318
|
+
- **Objective**
|
|
319
|
+
- **Discovery Context** (brief reminder)
|
|
320
|
+
- **Design Specifications** (list each spec with one-line summary; include: "Execute agents MUST read these specs before implementing flagged tasks.")
|
|
321
|
+
- **Task Summary** (execution order, mark tasks with design specs)
|
|
322
|
+
- **Quality Gates** (security review, tests, code review)
|
|
323
|
+
- **Known Risks** (with mitigations)
|
|
324
|
+
- **References** (plan path, discovery path, design spec paths)
|
|
223
325
|
|
|
224
326
|
### Update State
|
|
225
327
|
|
|
226
|
-
|
|
227
|
-
{
|
|
228
|
-
"workflow": {
|
|
229
|
-
"status": "executing",
|
|
230
|
-
"planning": { "completed": true, "completed_at": "[ISO timestamp]", "approved": true },
|
|
231
|
-
"execution": { "started": true }
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
```
|
|
328
|
+
Update active context: set `status` to `"executing"`, mark `design.completed = true` with timestamp, set `execution.started = true`.
|
|
235
329
|
|
|
236
330
|
### Route User
|
|
237
331
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
## TRANSITION 3: EXECUTION → COMPLETE
|
|
332
|
+
"All design specs processed. Execution brief saved to `{context_path}execution_brief.md`. Run `/intuition-execute` to begin implementation."
|
|
241
333
|
|
|
242
|
-
|
|
334
|
+
## TRANSITION 4B: PLANNING → EXECUTION (Skip Design)
|
|
243
335
|
|
|
244
|
-
|
|
336
|
+
Used when user confirms NO items need design.
|
|
245
337
|
|
|
246
|
-
###
|
|
338
|
+
### Generate Execution Brief
|
|
247
339
|
|
|
248
|
-
|
|
249
|
-
- **Lessons learned** → add to `key_facts.md`
|
|
250
|
-
- **Work completed** → update `issues.md`
|
|
340
|
+
Same format as Transition 4 but without the "Design Specifications" section. Write to `{context_path}execution_brief.md`.
|
|
251
341
|
|
|
252
342
|
### Update State
|
|
253
343
|
|
|
254
|
-
|
|
255
|
-
{
|
|
256
|
-
"workflow": {
|
|
257
|
-
"status": "complete",
|
|
258
|
-
"execution": { "completed": true, "completed_at": "[ISO timestamp]" }
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
```
|
|
344
|
+
Update active context: set `status` to `"executing"`, mark `planning.completed = true` with timestamp and `approved = true`, set `design.started = false`, `design.completed = false`, `design.items = []`, set `execution.started = true`.
|
|
262
345
|
|
|
263
346
|
### Route User
|
|
264
347
|
|
|
265
|
-
|
|
348
|
+
"Plan processed. No design items flagged. Execution brief saved to `{context_path}execution_brief.md`. Run `/intuition-execute` to begin implementation."
|
|
266
349
|
|
|
267
|
-
##
|
|
350
|
+
## TRANSITION 5: EXECUTION → COMPLETE
|
|
268
351
|
|
|
269
|
-
###
|
|
352
|
+
### Read Outputs
|
|
270
353
|
|
|
271
|
-
|
|
272
|
-
## [Category]
|
|
354
|
+
Read execution results from `{context_path}` for any reports the execution phase produced.
|
|
273
355
|
|
|
274
|
-
|
|
275
|
-
- **[Fact]**: [value] (discovered [date])
|
|
276
|
-
```
|
|
356
|
+
### Extract and Structure
|
|
277
357
|
|
|
278
|
-
|
|
358
|
+
Bugs found → `docs/project_notes/bugs.md`, lessons learned → `docs/project_notes/key_facts.md`, work completed → `docs/project_notes/issues.md`.
|
|
279
359
|
|
|
280
|
-
###
|
|
360
|
+
### Update State
|
|
281
361
|
|
|
282
|
-
|
|
283
|
-
### ADR-NNN: [Title] ([date])
|
|
362
|
+
Update active context: set `status` to `"complete"`, mark `execution.completed = true` with timestamp.
|
|
284
363
|
|
|
285
|
-
|
|
286
|
-
**Context:** [Why this decision was needed]
|
|
287
|
-
**Decision:** [What was chosen]
|
|
288
|
-
**Consequences:** [Benefits and trade-offs]
|
|
289
|
-
**Discovered During**: [Phase name]
|
|
290
|
-
```
|
|
364
|
+
### Route User
|
|
291
365
|
|
|
292
|
-
|
|
366
|
+
"Workflow cycle complete for [context display name]. Run `/intuition-start` to see your project status and decide what's next."
|
|
293
367
|
|
|
294
|
-
|
|
295
|
-
### [Date] - [ID]: [Title]
|
|
368
|
+
## MEMORY FILE FORMATS
|
|
296
369
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
370
|
+
All shared memory files live at `docs/project_notes/` (never context_path).
|
|
371
|
+
|
|
372
|
+
**key_facts.md**: Categories with bulleted facts: `- **[Fact]**: [value] (discovered [date])`. Add categories as needed; never remove existing facts unless outdated.
|
|
373
|
+
|
|
374
|
+
**decisions.md**: ADR format: `### ADR-NNN: [Title] ([date])` with Status, Context, Decision, Consequences, Discovered During fields.
|
|
375
|
+
|
|
376
|
+
**issues.md**: `### [Date] - [ID]: [Title]` with Status, Description, Source fields.
|
|
301
377
|
|
|
302
378
|
## EDGE CASES
|
|
303
379
|
|
|
304
|
-
- **Missing discovery_output.json**: Extract insights
|
|
305
|
-
- **Poor output quality**: Process as-is. Note concerns in
|
|
306
|
-
- **
|
|
307
|
-
- **Interrupted handoff**: Check what's
|
|
308
|
-
- **Corrupted state**:
|
|
380
|
+
- **Missing discovery_output.json**: Extract insights from discovery_brief.md manually.
|
|
381
|
+
- **Poor output quality**: Process as-is. Note concerns in brief. Do NOT fix outputs.
|
|
382
|
+
- **New constraints from planning**: Update key_facts.md, create ADR if architectural.
|
|
383
|
+
- **Interrupted handoff**: Check what's updated, continue from there, don't duplicate.
|
|
384
|
+
- **Corrupted state**: Infer phase from existing files. Ask user to confirm.
|
|
385
|
+
- **Design item skipped mid-loop**: Mark as `"skipped"`, proceed to next. Note in execution brief.
|
|
386
|
+
- **No Design Recommendations in plan**: Present tasks to user, ask if any need design. If none, use 4B.
|
|
387
|
+
- **Plan revision after design started**: Alert user. Ask whether to continue or re-evaluate.
|
|
309
388
|
|
|
310
389
|
## VOICE
|
|
311
390
|
|
|
312
|
-
- Administrative and transparent — "I've processed the
|
|
391
|
+
- Administrative and transparent — "I've processed the design output"
|
|
313
392
|
- Structured — specific about what was updated and where
|
|
314
393
|
- Never evaluative — process and document, don't judge quality
|
|
315
394
|
- Forward-looking — always suggest the next step
|
|
395
|
+
- Loop-aware — always show design queue progress when in design loop
|