@tgoodington/intuition 6.0.0 → 7.1.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/v7_design_spec.md +1111 -0
- package/docs/v7_plan.md +339 -0
- package/package.json +2 -2
- package/scripts/install-skills.js +2 -0
- package/scripts/uninstall-skills.js +3 -0
- package/skills/intuition-debugger/SKILL.md +368 -0
- package/skills/intuition-design/SKILL.md +25 -13
- package/skills/intuition-execute/SKILL.md +198 -104
- package/skills/intuition-handoff/SKILL.md +201 -373
- package/skills/intuition-initialize/SKILL.md +42 -34
- package/skills/intuition-initialize/references/claude_template.md +18 -1
- package/skills/intuition-initialize/references/design_brief_template.md +4 -2
- package/skills/intuition-initialize/references/execution_brief_template.md +5 -3
- package/skills/intuition-initialize/references/intuition_readme_template.md +23 -3
- package/skills/intuition-initialize/references/planning_brief_template.md +4 -2
- package/skills/intuition-initialize/references/state_template.json +30 -28
- package/skills/intuition-plan/SKILL.md +69 -25
- package/skills/intuition-prompt/SKILL.md +34 -3
- package/skills/intuition-start/SKILL.md +157 -72
|
@@ -35,6 +35,8 @@ These are non-negotiable. Violating any of these means the protocol has failed.
|
|
|
35
35
|
5. You MUST NOT "refresh" or "regenerate" briefs — that's handoff's job.
|
|
36
36
|
6. You MUST NOT manage .project-memory-state.json — handoff owns state transitions.
|
|
37
37
|
7. You MUST keep output concise. Curate, don't dump.
|
|
38
|
+
8. You MUST resolve context_path from active_context before reading any workflow artifacts.
|
|
39
|
+
9. If state has version "3.0" or no active_context field, you MUST warn the user to upgrade — do not attempt phase detection on v3.0 state.
|
|
38
40
|
|
|
39
41
|
## PROTOCOL: COMPLETE FLOW
|
|
40
42
|
|
|
@@ -43,10 +45,12 @@ Execute these steps in order:
|
|
|
43
45
|
```
|
|
44
46
|
Step 0: Check package version and notify if update available (non-blocking)
|
|
45
47
|
Step 1: Check for docs/project_notes/.project-memory-state.json
|
|
46
|
-
Step 2: Detect
|
|
47
|
-
Step 3:
|
|
48
|
-
Step 4:
|
|
49
|
-
Step 5:
|
|
48
|
+
Step 2: Detect schema version; warn if v3.0
|
|
49
|
+
Step 3: Resolve active_context and context_path
|
|
50
|
+
Step 4: Detect current phase using decision tree
|
|
51
|
+
Step 5: Load relevant memory files for context
|
|
52
|
+
Step 6: Curate a concise status summary
|
|
53
|
+
Step 7: Suggest the correct next skill
|
|
50
54
|
```
|
|
51
55
|
|
|
52
56
|
## VERSION CHECK (Step 0)
|
|
@@ -63,57 +67,91 @@ Review the "Package Version Info" section above. Parse the version numbers from
|
|
|
63
67
|
|
|
64
68
|
IMPORTANT: This check is NON-BLOCKING. If the version commands failed or output is unparseable, skip version notification and proceed with normal protocol. NEVER let version checking prevent you from completing the session primer.
|
|
65
69
|
|
|
66
|
-
##
|
|
70
|
+
## SCHEMA VERSION CHECK (Step 2)
|
|
67
71
|
|
|
68
|
-
|
|
72
|
+
After reading `.project-memory-state.json`, check the version field:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
IF state.version == "3.0" OR state.active_context is missing:
|
|
76
|
+
→ STOP phase detection
|
|
77
|
+
→ OUTPUT:
|
|
78
|
+
"This project uses the v3.0 state schema, which is no longer compatible
|
|
79
|
+
with Intuition v7.0+. Run /intuition-handoff or /intuition-initialize
|
|
80
|
+
to upgrade to v4.0."
|
|
81
|
+
→ END protocol here
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## CONTEXT PATH RESOLUTION (Step 3)
|
|
85
|
+
|
|
86
|
+
After confirming v4.0 schema:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
active_context = state.active_context (e.g. "trunk" or "feature-auth")
|
|
90
|
+
|
|
91
|
+
IF active_context == "trunk":
|
|
92
|
+
context_path = "docs/project_notes/trunk/"
|
|
93
|
+
context_workflow = state.trunk
|
|
94
|
+
ELSE:
|
|
95
|
+
context_path = "docs/project_notes/branches/{active_context}/"
|
|
96
|
+
context_workflow = state.branches[active_context]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Use `context_path` for ALL artifact reads in this session.
|
|
100
|
+
Use `context_workflow` for ALL phase detection.
|
|
101
|
+
|
|
102
|
+
## PHASE DETECTION (Step 4)
|
|
103
|
+
|
|
104
|
+
Use `context_workflow` resolved above. Apply this decision tree:
|
|
69
105
|
|
|
70
106
|
```
|
|
71
107
|
IF .project-memory-state.json does NOT exist:
|
|
72
108
|
→ PHASE: first_time
|
|
73
|
-
→ ACTION: Welcome, suggest /intuition-prompt
|
|
74
109
|
|
|
75
|
-
ELSE IF
|
|
76
|
-
→ PHASE:
|
|
77
|
-
→ ACTION: Note prompt is underway, suggest /intuition-prompt
|
|
110
|
+
ELSE IF any context is complete AND no context is in-progress:
|
|
111
|
+
→ PHASE: post_completion
|
|
78
112
|
|
|
79
|
-
ELSE IF
|
|
80
|
-
|
|
81
|
-
→ ACTION: Summarize discovery, suggest /intuition-plan
|
|
113
|
+
ELSE IF a context is in-progress (active_context has status not "complete"):
|
|
114
|
+
Apply the following against context_workflow:
|
|
82
115
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
116
|
+
IF context_workflow.workflow.prompt.started == false
|
|
117
|
+
OR context_workflow.workflow.prompt.completed == false:
|
|
118
|
+
→ PHASE: prompt_in_progress
|
|
86
119
|
|
|
87
|
-
ELSE IF
|
|
88
|
-
|
|
89
|
-
→ PHASE: design_in_progress
|
|
90
|
-
→ ACTION: Show design queue progress, suggest /intuition-design or /intuition-handoff
|
|
120
|
+
ELSE IF context_workflow.workflow.planning.started == false:
|
|
121
|
+
→ PHASE: ready_for_planning
|
|
91
122
|
|
|
92
|
-
ELSE IF workflow.
|
|
93
|
-
|
|
94
|
-
→ ACTION: Summarize plan, suggest /intuition-execute
|
|
123
|
+
ELSE IF context_workflow.workflow.planning.completed == false:
|
|
124
|
+
→ PHASE: planning_in_progress
|
|
95
125
|
|
|
96
|
-
ELSE IF
|
|
97
|
-
|
|
98
|
-
|
|
126
|
+
ELSE IF context_workflow.status == "design"
|
|
127
|
+
AND context_workflow.workflow.design.started == true
|
|
128
|
+
AND context_workflow.workflow.design.completed == false:
|
|
129
|
+
→ PHASE: design_in_progress
|
|
99
130
|
|
|
100
|
-
ELSE:
|
|
101
|
-
|
|
102
|
-
|
|
131
|
+
ELSE IF context_workflow.workflow.execution.started == false:
|
|
132
|
+
→ PHASE: ready_for_execution
|
|
133
|
+
|
|
134
|
+
ELSE IF context_workflow.workflow.execution.completed == false:
|
|
135
|
+
→ PHASE: execution_in_progress
|
|
136
|
+
|
|
137
|
+
ELSE:
|
|
138
|
+
→ PHASE: post_completion
|
|
103
139
|
```
|
|
104
140
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- `
|
|
108
|
-
|
|
141
|
+
**"Any context is complete"** means: `state.trunk.status == "complete"` OR any entry in `state.branches` has `status == "complete"`.
|
|
142
|
+
|
|
143
|
+
**"No context is in-progress"** means: `state.trunk.status` is not in `["prompt","planning","design","executing"]` AND no branch has status in those values.
|
|
144
|
+
|
|
145
|
+
If `.project-memory-state.json` exists but is corrupted or unreadable, infer phase from which files exist under `context_path`:
|
|
146
|
+
- `{context_path}discovery_brief.md` exists → prompt complete
|
|
147
|
+
- `{context_path}plan.md` exists → planning complete
|
|
148
|
+
- `{context_path}design_spec_*.md` exist → design in progress or complete
|
|
109
149
|
- Ask user to confirm if ambiguous.
|
|
110
150
|
|
|
111
151
|
## PHASE HANDLERS
|
|
112
152
|
|
|
113
153
|
### First Time (No Project Memory)
|
|
114
154
|
|
|
115
|
-
Output a welcome message, then suggest getting started:
|
|
116
|
-
|
|
117
155
|
```
|
|
118
156
|
Welcome to Intuition!
|
|
119
157
|
|
|
@@ -123,15 +161,80 @@ Run /intuition-prompt to describe what you want to build or change.
|
|
|
123
161
|
I'll help you sharpen it into something the planning phase can run with.
|
|
124
162
|
```
|
|
125
163
|
|
|
164
|
+
### Post-Completion
|
|
165
|
+
|
|
166
|
+
Read the state file and build the status tree. Read `{context_path}plan.md` for the trunk objective (first sentence of Section 1).
|
|
167
|
+
|
|
168
|
+
Display:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
Welcome back! Here's your project status:
|
|
172
|
+
|
|
173
|
+
Project Status:
|
|
174
|
+
├── Trunk: [status]
|
|
175
|
+
│ └── "[trunk objective — 1 sentence]"
|
|
176
|
+
[For each branch in state.branches:]
|
|
177
|
+
├── Branch: [display_name] (from [created_from]): [status]
|
|
178
|
+
│ └── "[purpose]"
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Status labels: `none` → "Not started", `prompt` → "Prompting...", `planning` → "Planning...", `design` → "Designing...", `executing` → "Executing...", `complete` → "Complete"
|
|
182
|
+
|
|
183
|
+
**If any context is in-progress:**
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
You have work in progress on [context display name] (status: [status]).
|
|
187
|
+
Run /intuition-[next skill] to continue.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Do NOT proceed to the two-choice prompt — resume the in-progress context instead.
|
|
191
|
+
|
|
192
|
+
**If all contexts are complete (or only complete + none):**
|
|
193
|
+
|
|
194
|
+
Use AskUserQuestion:
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
Question: "All current work is complete. What's next?"
|
|
198
|
+
Header: "Next Step"
|
|
199
|
+
Options:
|
|
200
|
+
- "Create a new branch (new feature or change)"
|
|
201
|
+
- "Debug an issue (/intuition-debugger)"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**If "Create a new branch":**
|
|
205
|
+
|
|
206
|
+
Collect the following via sequential AskUserQuestion prompts:
|
|
207
|
+
|
|
208
|
+
1. Branch name: "What should we call this branch? Use a short, descriptive name (e.g. feature-auth, caching-layer, ui-overhaul)." (Header: "Branch Name")
|
|
209
|
+
2. Branch purpose: "In one sentence, what will this branch accomplish?" (Header: "Branch Purpose")
|
|
210
|
+
3. Parent context (only if multiple completed contexts exist): "Which completed context should this branch build from?" with options listing each completed context. (Header: "Branch From")
|
|
211
|
+
- If only one completed context exists, auto-select it and tell the user.
|
|
212
|
+
|
|
213
|
+
Then tell the user:
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
Got it. Branch "[name]" will [purpose], building from [parent].
|
|
217
|
+
|
|
218
|
+
Run /intuition-handoff to register the branch and begin.
|
|
219
|
+
Pass along: branch name "[name]", purpose "[purpose]", parent "[parent]".
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**If "Troubleshoot":**
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
Run /intuition-debugger to investigate and debug issues in any completed context.
|
|
226
|
+
The debugger specializes in hard problems — causal chain bugs, cross-context failures,
|
|
227
|
+
performance issues, and cases where the plan or design was wrong.
|
|
228
|
+
```
|
|
229
|
+
|
|
126
230
|
### Prompt In Progress
|
|
127
231
|
|
|
128
|
-
Check if `
|
|
232
|
+
Check if `{context_path}discovery_brief.md` exists.
|
|
129
233
|
|
|
130
|
-
Output:
|
|
131
234
|
```
|
|
132
235
|
Welcome back! Prompt refinement is in progress.
|
|
133
236
|
|
|
134
|
-
[If brief exists]: Progress saved at
|
|
237
|
+
[If brief exists]: Progress saved at {context_path}discovery_brief.md
|
|
135
238
|
[If no brief yet]: No brief saved yet — still early in refinement.
|
|
136
239
|
|
|
137
240
|
Run /intuition-prompt to continue.
|
|
@@ -140,11 +243,10 @@ Run /intuition-prompt to continue.
|
|
|
140
243
|
### Ready for Planning
|
|
141
244
|
|
|
142
245
|
Read and curate from:
|
|
143
|
-
- `
|
|
144
|
-
- `
|
|
246
|
+
- `{context_path}discovery_brief.md` — extract problem, goals, constraints
|
|
247
|
+
- `{context_path}planning_brief.md` — reference location (don't read in detail)
|
|
145
248
|
- `docs/project_notes/decisions.md` — extract 2-4 recent ADRs
|
|
146
249
|
|
|
147
|
-
Output:
|
|
148
250
|
```
|
|
149
251
|
Welcome back! Discovery is complete.
|
|
150
252
|
|
|
@@ -156,21 +258,20 @@ Here's what was discovered:
|
|
|
156
258
|
Relevant Decisions:
|
|
157
259
|
- [ADR titles if any exist]
|
|
158
260
|
|
|
159
|
-
Planning brief ready at:
|
|
261
|
+
Planning brief ready at: {context_path}planning_brief.md
|
|
160
262
|
|
|
161
263
|
Run /intuition-plan to create a structured plan.
|
|
162
264
|
```
|
|
163
265
|
|
|
164
266
|
### Planning In Progress
|
|
165
267
|
|
|
166
|
-
Read `
|
|
268
|
+
Read `{context_path}plan.md` for task count and scope.
|
|
167
269
|
|
|
168
|
-
Output:
|
|
169
270
|
```
|
|
170
271
|
Welcome back! Planning is in progress.
|
|
171
272
|
|
|
172
273
|
Discovery: Complete
|
|
173
|
-
Plan: In progress (
|
|
274
|
+
Plan: In progress ({context_path}plan.md)
|
|
174
275
|
- [N] tasks identified so far
|
|
175
276
|
- Scope: [Simple/Moderate/Complex if determinable]
|
|
176
277
|
|
|
@@ -179,9 +280,8 @@ Run /intuition-plan to continue.
|
|
|
179
280
|
|
|
180
281
|
### Design In Progress
|
|
181
282
|
|
|
182
|
-
Read `.project-memory-state.json` for design queue status. Read `
|
|
283
|
+
Read `.project-memory-state.json` for design queue status. Read `{context_path}design_brief.md` for current item context.
|
|
183
284
|
|
|
184
|
-
Output:
|
|
185
285
|
```
|
|
186
286
|
Welcome back! Design exploration is in progress.
|
|
187
287
|
|
|
@@ -190,8 +290,8 @@ Plan: Approved
|
|
|
190
290
|
Design: In progress
|
|
191
291
|
|
|
192
292
|
Design Queue:
|
|
193
|
-
[For each item in design.items:]
|
|
194
|
-
- [x] [Item Name] (completed) → design_spec_[name].md
|
|
293
|
+
[For each item in context_workflow.workflow.design.items:]
|
|
294
|
+
- [x] [Item Name] (completed) → {context_path}design_spec_[name].md
|
|
195
295
|
- [>] [Item Name] (in progress)
|
|
196
296
|
- [ ] [Item Name] (pending)
|
|
197
297
|
|
|
@@ -202,12 +302,11 @@ Design Queue:
|
|
|
202
302
|
### Ready for Execution
|
|
203
303
|
|
|
204
304
|
Read and curate from:
|
|
205
|
-
- `
|
|
206
|
-
- `
|
|
305
|
+
- `{context_path}plan.md` — extract objective, task count, approach
|
|
306
|
+
- `{context_path}execution_brief.md` — reference location
|
|
207
307
|
- `docs/project_notes/decisions.md` — relevant ADRs
|
|
208
|
-
- `
|
|
308
|
+
- `{context_path}design_spec_*.md` — list any design specs
|
|
209
309
|
|
|
210
|
-
Output:
|
|
211
310
|
```
|
|
212
311
|
Welcome back! Your plan is approved and ready.
|
|
213
312
|
|
|
@@ -224,16 +323,15 @@ Key context:
|
|
|
224
323
|
- Problem: [1 sentence from discovery]
|
|
225
324
|
- Main constraint: [most limiting]
|
|
226
325
|
|
|
227
|
-
Execution brief ready at:
|
|
326
|
+
Execution brief ready at: {context_path}execution_brief.md
|
|
228
327
|
|
|
229
328
|
Run /intuition-execute to begin implementation.
|
|
230
329
|
```
|
|
231
330
|
|
|
232
331
|
### Execution In Progress
|
|
233
332
|
|
|
234
|
-
Read plan.md for total tasks and any execution state available.
|
|
333
|
+
Read `{context_path}plan.md` for total tasks and any execution state available.
|
|
235
334
|
|
|
236
|
-
Output:
|
|
237
335
|
```
|
|
238
336
|
Welcome back! Execution is in progress.
|
|
239
337
|
|
|
@@ -245,21 +343,6 @@ Execution: In progress
|
|
|
245
343
|
Run /intuition-execute to continue.
|
|
246
344
|
```
|
|
247
345
|
|
|
248
|
-
### Complete
|
|
249
|
-
|
|
250
|
-
Output a completion summary:
|
|
251
|
-
|
|
252
|
-
```
|
|
253
|
-
Welcome back! This workflow cycle is complete.
|
|
254
|
-
|
|
255
|
-
Discovery: Complete
|
|
256
|
-
Plan: Complete
|
|
257
|
-
[If design was used]: Design: Complete
|
|
258
|
-
Execution: Complete
|
|
259
|
-
|
|
260
|
-
Ready for the next cycle? Run /intuition-prompt to start a new project or feature.
|
|
261
|
-
```
|
|
262
|
-
|
|
263
346
|
## BRIEF CURATION RULES
|
|
264
347
|
|
|
265
348
|
You are curating information for the user, not dumping files. Follow these rules:
|
|
@@ -295,7 +378,9 @@ You are curating information for the user, not dumping files. Follow these rules
|
|
|
295
378
|
- **Missing files referenced by state**: Report what you found and what's missing. Don't try to fix it. Suggest `/intuition-handoff` if briefs need regeneration.
|
|
296
379
|
- **State says complete but output files missing**: "State indicates [phase] is complete but I can't find [file]. Run `/intuition-handoff` to reconcile, or check if the file was moved."
|
|
297
380
|
- **User manually edited memory files**: Trust file contents as source of truth. Report what you find.
|
|
298
|
-
- **Old v2.0 state schema detected** (has `discovery` instead of `prompt`): Treat `discovery` fields as `prompt` fields. Suggest running `/intuition-initialize` to update to
|
|
381
|
+
- **Old v2.0 state schema detected** (has `discovery` instead of `prompt`): Treat `discovery` fields as `prompt` fields. Suggest running `/intuition-initialize` to update to current schema.
|
|
382
|
+
- **State file exists but active_context is null or missing**: Treat as v3.0 — output the upgrade warning and stop.
|
|
383
|
+
- **Branch referenced in active_context but not found in branches map**: Report the inconsistency and suggest `/intuition-handoff` to reconcile state.
|
|
299
384
|
|
|
300
385
|
## VOICE
|
|
301
386
|
|