@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
|
@@ -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)
|
|
@@ -57,99 +61,190 @@ Review the "Package Version Info" section above. Parse the version numbers from
|
|
|
57
61
|
2. Extract latest version from the npm view output (should be just the version number)
|
|
58
62
|
3. Compare the versions:
|
|
59
63
|
- If installed < latest: Add this line at the TOP of your output (before welcome message):
|
|
60
|
-
|
|
64
|
+
`Update available: v[installed] -> v[latest]. Run /intuition-update to install.`
|
|
61
65
|
- If versions match OR if version info is missing/errored: Say nothing about versions
|
|
62
66
|
- If you cannot parse versions: Say nothing (don't block startup)
|
|
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 or /intuition-discovery
|
|
74
109
|
|
|
75
|
-
ELSE IF
|
|
76
|
-
→ PHASE:
|
|
77
|
-
→ ACTION: Note discovery is underway, suggest /intuition-discovery
|
|
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 workflow.
|
|
88
|
-
|
|
89
|
-
→ ACTION: Summarize plan, suggest /intuition-execute
|
|
120
|
+
ELSE IF context_workflow.workflow.planning.started == false:
|
|
121
|
+
→ PHASE: ready_for_planning
|
|
90
122
|
|
|
91
|
-
ELSE IF workflow.
|
|
92
|
-
|
|
93
|
-
→ ACTION: Note execution progress, suggest /intuition-execute
|
|
123
|
+
ELSE IF context_workflow.workflow.planning.completed == false:
|
|
124
|
+
→ PHASE: planning_in_progress
|
|
94
125
|
|
|
95
|
-
ELSE
|
|
96
|
-
|
|
97
|
-
|
|
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
|
|
130
|
+
|
|
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
|
|
98
139
|
```
|
|
99
140
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- `
|
|
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
|
|
103
149
|
- Ask user to confirm if ambiguous.
|
|
104
150
|
|
|
105
151
|
## PHASE HANDLERS
|
|
106
152
|
|
|
107
153
|
### First Time (No Project Memory)
|
|
108
154
|
|
|
109
|
-
Output a welcome message, then use AskUserQuestion to offer the discovery choice:
|
|
110
|
-
|
|
111
155
|
```
|
|
112
156
|
Welcome to Intuition!
|
|
113
157
|
|
|
114
|
-
I don't see any project memory yet. Let's kick things off
|
|
158
|
+
I don't see any project memory yet. Let's kick things off.
|
|
159
|
+
|
|
160
|
+
Run /intuition-prompt to describe what you want to build or change.
|
|
161
|
+
I'll help you sharpen it into something the planning phase can run with.
|
|
162
|
+
```
|
|
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.
|
|
115
188
|
```
|
|
116
189
|
|
|
117
|
-
|
|
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
|
+
|
|
118
196
|
```
|
|
119
|
-
Question: "
|
|
120
|
-
Header: "
|
|
197
|
+
Question: "All current work is complete. What's next?"
|
|
198
|
+
Header: "Next Step"
|
|
121
199
|
Options:
|
|
122
|
-
- "
|
|
123
|
-
- "
|
|
124
|
-
MultiSelect: false
|
|
200
|
+
- "Create a new branch (new feature or change)"
|
|
201
|
+
- "Troubleshoot an issue (/intuition-engineer)"
|
|
125
202
|
```
|
|
126
203
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
204
|
+
**If "Create a new branch":**
|
|
205
|
+
|
|
206
|
+
Collect the following via sequential AskUserQuestion prompts:
|
|
130
207
|
|
|
131
|
-
|
|
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.
|
|
132
212
|
|
|
133
|
-
|
|
213
|
+
Then tell the user:
|
|
134
214
|
|
|
135
|
-
Output:
|
|
136
215
|
```
|
|
137
|
-
|
|
216
|
+
Got it. Branch "[name]" will [purpose], building from [parent].
|
|
138
217
|
|
|
139
|
-
|
|
140
|
-
|
|
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-engineer to diagnose and fix issues in any completed context.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Prompt In Progress
|
|
229
|
+
|
|
230
|
+
Check if `{context_path}discovery_brief.md` exists.
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
Welcome back! Prompt refinement is in progress.
|
|
141
234
|
|
|
142
|
-
|
|
235
|
+
[If brief exists]: Progress saved at {context_path}discovery_brief.md
|
|
236
|
+
[If no brief yet]: No brief saved yet — still early in refinement.
|
|
237
|
+
|
|
238
|
+
Run /intuition-prompt to continue.
|
|
143
239
|
```
|
|
144
240
|
|
|
145
241
|
### Ready for Planning
|
|
146
242
|
|
|
147
243
|
Read and curate from:
|
|
148
|
-
- `
|
|
149
|
-
- `
|
|
244
|
+
- `{context_path}discovery_brief.md` — extract problem, goals, constraints
|
|
245
|
+
- `{context_path}planning_brief.md` — reference location (don't read in detail)
|
|
150
246
|
- `docs/project_notes/decisions.md` — extract 2-4 recent ADRs
|
|
151
247
|
|
|
152
|
-
Output:
|
|
153
248
|
```
|
|
154
249
|
Welcome back! Discovery is complete.
|
|
155
250
|
|
|
@@ -161,40 +256,63 @@ Here's what was discovered:
|
|
|
161
256
|
Relevant Decisions:
|
|
162
257
|
- [ADR titles if any exist]
|
|
163
258
|
|
|
164
|
-
Planning brief ready at:
|
|
259
|
+
Planning brief ready at: {context_path}planning_brief.md
|
|
165
260
|
|
|
166
261
|
Run /intuition-plan to create a structured plan.
|
|
167
262
|
```
|
|
168
263
|
|
|
169
264
|
### Planning In Progress
|
|
170
265
|
|
|
171
|
-
Read `
|
|
266
|
+
Read `{context_path}plan.md` for task count and scope.
|
|
172
267
|
|
|
173
|
-
Output:
|
|
174
268
|
```
|
|
175
269
|
Welcome back! Planning is in progress.
|
|
176
270
|
|
|
177
271
|
Discovery: Complete
|
|
178
|
-
Plan: In progress (
|
|
272
|
+
Plan: In progress ({context_path}plan.md)
|
|
179
273
|
- [N] tasks identified so far
|
|
180
274
|
- Scope: [Simple/Moderate/Complex if determinable]
|
|
181
275
|
|
|
182
276
|
Run /intuition-plan to continue.
|
|
183
277
|
```
|
|
184
278
|
|
|
279
|
+
### Design In Progress
|
|
280
|
+
|
|
281
|
+
Read `.project-memory-state.json` for design queue status. Read `{context_path}design_brief.md` for current item context.
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
Welcome back! Design exploration is in progress.
|
|
285
|
+
|
|
286
|
+
Discovery: Complete
|
|
287
|
+
Plan: Approved
|
|
288
|
+
Design: In progress
|
|
289
|
+
|
|
290
|
+
Design Queue:
|
|
291
|
+
[For each item in context_workflow.workflow.design.items:]
|
|
292
|
+
- [x] [Item Name] (completed) → {context_path}design_spec_[name].md
|
|
293
|
+
- [>] [Item Name] (in progress)
|
|
294
|
+
- [ ] [Item Name] (pending)
|
|
295
|
+
|
|
296
|
+
[If current item is in_progress]: Run /intuition-design to continue designing [current item].
|
|
297
|
+
[If current item just completed]: Run /intuition-handoff to process the design and move to the next item.
|
|
298
|
+
```
|
|
299
|
+
|
|
185
300
|
### Ready for Execution
|
|
186
301
|
|
|
187
302
|
Read and curate from:
|
|
188
|
-
- `
|
|
189
|
-
- `
|
|
303
|
+
- `{context_path}plan.md` — extract objective, task count, approach
|
|
304
|
+
- `{context_path}execution_brief.md` — reference location
|
|
190
305
|
- `docs/project_notes/decisions.md` — relevant ADRs
|
|
306
|
+
- `{context_path}design_spec_*.md` — list any design specs
|
|
191
307
|
|
|
192
|
-
Output:
|
|
193
308
|
```
|
|
194
309
|
Welcome back! Your plan is approved and ready.
|
|
195
310
|
|
|
196
311
|
Discovery: Complete
|
|
197
312
|
Plan: Approved
|
|
313
|
+
[If design specs exist]: Design: Complete ([N] specs)
|
|
314
|
+
Execution: Ready
|
|
315
|
+
|
|
198
316
|
- [N] tasks
|
|
199
317
|
- Approach: [1 sentence]
|
|
200
318
|
- Scope: [Simple/Moderate/Complex]
|
|
@@ -203,52 +321,26 @@ Key context:
|
|
|
203
321
|
- Problem: [1 sentence from discovery]
|
|
204
322
|
- Main constraint: [most limiting]
|
|
205
323
|
|
|
206
|
-
Execution brief ready at:
|
|
324
|
+
Execution brief ready at: {context_path}execution_brief.md
|
|
207
325
|
|
|
208
326
|
Run /intuition-execute to begin implementation.
|
|
209
327
|
```
|
|
210
328
|
|
|
211
329
|
### Execution In Progress
|
|
212
330
|
|
|
213
|
-
Read plan.md for total tasks and any execution state available.
|
|
331
|
+
Read `{context_path}plan.md` for total tasks and any execution state available.
|
|
214
332
|
|
|
215
|
-
Output:
|
|
216
333
|
```
|
|
217
334
|
Welcome back! Execution is in progress.
|
|
218
335
|
|
|
219
336
|
Discovery: Complete
|
|
220
337
|
Plan: Approved
|
|
338
|
+
[If design specs exist]: Design: Complete
|
|
221
339
|
Execution: In progress
|
|
222
340
|
|
|
223
341
|
Run /intuition-execute to continue.
|
|
224
342
|
```
|
|
225
343
|
|
|
226
|
-
### Complete
|
|
227
|
-
|
|
228
|
-
Output a completion summary, then use AskUserQuestion to offer the next cycle choice:
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
Welcome back! This workflow cycle is complete.
|
|
232
|
-
|
|
233
|
-
Discovery: Complete
|
|
234
|
-
Plan: Complete
|
|
235
|
-
Execution: Complete
|
|
236
|
-
|
|
237
|
-
Ready for the next cycle?
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
Then use AskUserQuestion:
|
|
241
|
-
```
|
|
242
|
-
Question: "How would you like to start your next cycle?"
|
|
243
|
-
Header: "Next cycle"
|
|
244
|
-
Options:
|
|
245
|
-
- "Prompt — I have a vision, help me sharpen it" / "Focused and fast. Refine a clear idea into a planning-ready brief. Runs /intuition-prompt"
|
|
246
|
-
- "Discovery — I want to think this through" / "Exploratory and collaborative. Dig into a new problem with research-informed dialogue. Runs /intuition-discovery"
|
|
247
|
-
MultiSelect: false
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
After the user selects, tell them to run the corresponding skill.
|
|
251
|
-
|
|
252
344
|
## BRIEF CURATION RULES
|
|
253
345
|
|
|
254
346
|
You are curating information for the user, not dumping files. Follow these rules:
|
|
@@ -267,6 +359,11 @@ You are curating information for the user, not dumping files. Follow these rules
|
|
|
267
359
|
- Scope: Simple/Moderate/Complex
|
|
268
360
|
- One key constraint
|
|
269
361
|
|
|
362
|
+
**For design summaries:**
|
|
363
|
+
- Design queue status (completed/in-progress/pending)
|
|
364
|
+
- Current item name
|
|
365
|
+
- Number of specs produced
|
|
366
|
+
|
|
270
367
|
**NEVER include:**
|
|
271
368
|
- Every assumption from discovery
|
|
272
369
|
- All context details
|
|
@@ -279,6 +376,9 @@ You are curating information for the user, not dumping files. Follow these rules
|
|
|
279
376
|
- **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.
|
|
280
377
|
- **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."
|
|
281
378
|
- **User manually edited memory files**: Trust file contents as source of truth. Report what you find.
|
|
379
|
+
- **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.
|
|
380
|
+
- **State file exists but active_context is null or missing**: Treat as v3.0 — output the upgrade warning and stop.
|
|
381
|
+
- **Branch referenced in active_context but not found in branches map**: Report the inconsistency and suggest `/intuition-handoff` to reconcile state.
|
|
282
382
|
|
|
283
383
|
## VOICE
|
|
284
384
|
|