@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
package/docs/v7_plan.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
# Intuition v7.0 — Execution Plan
|
|
2
|
+
|
|
3
|
+
## Plan-Execute Contract v1.0 | Standard Tier
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Objective
|
|
8
|
+
|
|
9
|
+
Intuition v7.0 introduces a branch/trunk workflow model and a new coding expert skill (`intuition-engineer`). The trunk represents the first prompt-to-execute cycle as a permanent foundation; branches enable subsequent independent cycles that build on, extend, or diverge from trunk or other completed branches. The engineer skill provides post-execution holistic troubleshooting with subagent delegation, serving as both a user-invoked diagnostic tool and a Senior Engineer subagent available to execute.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 2. Discovery Summary
|
|
14
|
+
|
|
15
|
+
- **Problem**: v6.0 treats each workflow cycle as a standalone pass. Users who complete execution and want to iterate must start from scratch with no lineage tracking, no awareness of prior plans, and no way to fix issues without re-running the full workflow.
|
|
16
|
+
- **Goals**: (1) Enable iterative development through a branch/trunk model where each cycle is context-aware of its parent. (2) Provide a dedicated troubleshooting skill that can diagnose and fix issues holistically without re-running the workflow. (3) Unify file path resolution across all skills via a `context_path` abstraction.
|
|
17
|
+
- **Constraints**: State schema must migrate from v3.0 to v4.0 with backward compatibility. SKILL.md files must stay under 500 lines. Handoff remains the sole state writer. Start remains read-only. All behavioral instructions must live in SKILL.md (reference files are not auto-loaded).
|
|
18
|
+
- **Key Findings**: Every skill that reads or writes workflow artifacts needs context-path awareness. Handoff undergoes the heaviest changes (branch creation, tree state management, migration logic). The engineer skill is fully specified in the design document. Plan gains a new Parent Context section and a third research subagent for branch intersection analysis. Execute gains a Senior Engineer (opus) subagent tier.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 3. Technology Decisions
|
|
23
|
+
|
|
24
|
+
| Decision | Choice | Rationale |
|
|
25
|
+
|----------|--------|-----------|
|
|
26
|
+
| Context path abstraction | Dynamic `{context_path}` resolved from `active_context` in state | Single formula used by all skills; trunk resolves to `docs/project_notes/trunk/`, branches to `docs/project_notes/branches/{key}/` |
|
|
27
|
+
| State schema structure | v4.0: top-level `trunk` object + `branches` map + `active_context` | Each context gets its own independent workflow pipeline; `active_context` drives all path resolution |
|
|
28
|
+
| Shared vs isolated memory | Shared files (`key_facts.md`, `decisions.md`, `issues.md`, `bugs.md`) at root; workflow artifacts isolated per context | Project-wide knowledge accumulates; workflow artifacts stay scoped to their cycle |
|
|
29
|
+
| Engineer model | opus | Holistic codebase reasoning requires the strongest model; delegates code changes to sonnet subagents |
|
|
30
|
+
| Senior Engineer subagent (execute) | opus | Complex multi-file tasks with architectural implications need holistic reasoning |
|
|
31
|
+
| Migration strategy | Auto-migration in handoff (detect v3.0, restructure to v4.0) + initialize offers upgrade | Seamless for existing projects; deliberate option also available |
|
|
32
|
+
| Branch lineage | `created_from` field in branch entry | Enables plan to read parent context for intersection analysis; supports tree structures (branch from branch) |
|
|
33
|
+
| Post-completion routing | Start presents two choices (create branch / open engineer) | Replaces the dead-end "complete" state with actionable next steps |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 6. Task Sequence
|
|
38
|
+
|
|
39
|
+
### Task 1: Update state template and initialize skill
|
|
40
|
+
|
|
41
|
+
- **Component**: `intuition-initialize`
|
|
42
|
+
- **Description**: Update the state template JSON from v3.0 to v4.0 schema. Update the initialize skill's SKILL.md to create `trunk/` and `branches/` directories during project setup. Update the CLAUDE.md template to describe the trunk-and-branch model and engineer skill. Update the INTUITION.md template to include branch workflow and engineer skill in the skill table.
|
|
43
|
+
- **Acceptance Criteria**:
|
|
44
|
+
1. `state_template.json` matches the v4.0 schema exactly as specified in design spec Section 3 (includes `active_context`, `trunk` object, `branches` map, version `"4.0"`)
|
|
45
|
+
2. Initialize SKILL.md creates `docs/project_notes/trunk/` and `docs/project_notes/branches/` directories during initialization
|
|
46
|
+
3. CLAUDE.md template includes trunk/branch model description, engineer skill mention, and updated workflow flow
|
|
47
|
+
4. INTUITION.md template includes engineer skill in the skill table and branch workflow in the quick start
|
|
48
|
+
- **Dependencies**: None
|
|
49
|
+
- **Files**:
|
|
50
|
+
- `C:\Projects\Intuition\skills\intuition-initialize\references\state_template.json`
|
|
51
|
+
- `C:\Projects\Intuition\skills\intuition-initialize\SKILL.md`
|
|
52
|
+
- `C:\Projects\Intuition\skills\intuition-initialize\references\claude_template.md`
|
|
53
|
+
- `C:\Projects\Intuition\skills\intuition-initialize\references\intuition_readme_template.md`
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### Task 2: Update handoff skill — context path resolution and state writes
|
|
58
|
+
|
|
59
|
+
- **Component**: `intuition-handoff`
|
|
60
|
+
- **Description**: Update handoff to resolve `active_context` and `context_path` before every transition. All file path references change from hardcoded `docs/project_notes/` to `{context_path}`. All state writes target the correct context object (`state.trunk` or `state.branches[active_context]`). Embed the v4.0 state schema. Update the transition detection tree to read the active context's workflow object.
|
|
61
|
+
- **Acceptance Criteria**:
|
|
62
|
+
1. Handoff resolves `context_path` from `active_context` at the start of every transition (trunk maps to `docs/project_notes/trunk/`, branches map to `docs/project_notes/branches/{key}/`)
|
|
63
|
+
2. All five existing transitions (prompt->plan, plan->design, design->design, design->execute, plan->execute, execute->complete) use `{context_path}` for all artifact file references
|
|
64
|
+
3. State writes update the correct context object based on `active_context`
|
|
65
|
+
4. Embedded state schema is v4.0
|
|
66
|
+
- **Dependencies**: Task 1
|
|
67
|
+
- **Files**:
|
|
68
|
+
- `C:\Projects\Intuition\skills\intuition-handoff\SKILL.md`
|
|
69
|
+
- `C:\Projects\Intuition\skills\intuition-handoff\references\handoff_core.md`
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### Task 3: Update handoff skill — branch creation and v3 migration
|
|
74
|
+
|
|
75
|
+
- **Component**: `intuition-handoff`
|
|
76
|
+
- **Description**: Add Transition 0 (branch creation) to handoff. When start routes to handoff with branch creation intent, handoff validates the branch name, creates the branch directory, adds the branch entry to state, sets `active_context` to the new branch, and routes user to `/intuition-prompt`. Also implement v3.0-to-v4.0 auto-migration: detect v3.0 state, create `trunk/` directory, move existing artifacts, restructure state to v4.0. Update the execute->complete transition to route to `/intuition-start` instead of `/intuition-prompt`.
|
|
77
|
+
- **Acceptance Criteria**:
|
|
78
|
+
1. Branch creation transition validates kebab-case name, rejects duplicate branch keys, creates `docs/project_notes/branches/{key}/` directory, adds branch entry with `display_name`, `created_from`, `created_at`, `purpose`, and full workflow object
|
|
79
|
+
2. After branch creation, `active_context` is set to the new branch key and user is routed to `/intuition-prompt`
|
|
80
|
+
3. When handoff detects a v3.0 state file (version "3.0" or missing `active_context`), it auto-migrates: creates trunk directory, moves artifacts, restructures state to v4.0
|
|
81
|
+
4. Execute->complete transition routes to `/intuition-start` (not `/intuition-prompt`)
|
|
82
|
+
- **Dependencies**: Task 2
|
|
83
|
+
- **Files**:
|
|
84
|
+
- `C:\Projects\Intuition\skills\intuition-handoff\SKILL.md`
|
|
85
|
+
- `C:\Projects\Intuition\skills\intuition-handoff\references\handoff_core.md`
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### Task 4: Update start skill — post-completion routing and status tree
|
|
90
|
+
|
|
91
|
+
- **Component**: `intuition-start`
|
|
92
|
+
- **Description**: Add post-completion phase detection to start. When any context is complete and no context is in-progress, display a status tree and present the two-choice flow (create branch or open engineer). Add context-path awareness for reading artifacts. Add v3.0 detection with migration warning. Start remains read-only (no Write tool).
|
|
93
|
+
- **Acceptance Criteria**:
|
|
94
|
+
1. When trunk or any branch has `status == "complete"` and no context is in-progress, start displays the status tree and presents two options via AskUserQuestion: "Create a new branch" or "Troubleshoot an issue"
|
|
95
|
+
2. Status tree shows trunk and all branches with their status, purpose, and lineage
|
|
96
|
+
3. "Create a new branch" path collects branch name, purpose, and parent context, then routes to `/intuition-handoff`
|
|
97
|
+
4. Start detects v3.0 state and warns user to run `/intuition-handoff` or `/intuition-initialize` to upgrade
|
|
98
|
+
5. Start does NOT use the Write tool anywhere in its protocol
|
|
99
|
+
- **Dependencies**: Task 2
|
|
100
|
+
- **Files**:
|
|
101
|
+
- `C:\Projects\Intuition\skills\intuition-start\SKILL.md`
|
|
102
|
+
- `C:\Projects\Intuition\skills\intuition-start\references\start_core.md`
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### Task 5: Update prompt skill — context-path awareness
|
|
107
|
+
|
|
108
|
+
- **Component**: `intuition-prompt`
|
|
109
|
+
- **Description**: Update prompt to read `active_context` from state on startup and resolve `context_path`. Change all file write paths to use `{context_path}` (discovery_brief.md, discovery_output.json). Update resume logic to check `{context_path}` for existing files. When running on a branch, include branch lineage context in the opening message.
|
|
110
|
+
- **Acceptance Criteria**:
|
|
111
|
+
1. Prompt reads `.project-memory-state.json` on startup and resolves `context_path` from `active_context`
|
|
112
|
+
2. All output files are written to `{context_path}/` (not `docs/project_notes/` directly)
|
|
113
|
+
3. When `active_context` is a branch, the opening message includes branch display_name, parent context, and branch purpose
|
|
114
|
+
4. A critical rule is added: "NEVER write to the root `docs/project_notes/` — always write to the resolved context_path"
|
|
115
|
+
- **Dependencies**: Task 2
|
|
116
|
+
- **Files**:
|
|
117
|
+
- `C:\Projects\Intuition\skills\intuition-prompt\SKILL.md`
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### Task 6: Update plan skill — branch intersection and context-path
|
|
122
|
+
|
|
123
|
+
- **Component**: `intuition-plan`
|
|
124
|
+
- **Description**: Update plan to resolve `context_path` from `active_context` on startup. Change all file read/write paths to use `{context_path}`. When planning on a branch, read the parent context's plan.md, add a third orientation research subagent for parent intersection analysis, and include a new Section 2.5 (Parent Context) in the output plan. Extend ARCH framework's Reach dimension to include parent intersection on branches.
|
|
125
|
+
- **Acceptance Criteria**:
|
|
126
|
+
1. Plan reads `.project-memory-state.json` on startup and resolves `context_path`
|
|
127
|
+
2. All artifact reads (discovery_brief, planning_brief) and writes (plan.md, .planning_research/) use `{context_path}`
|
|
128
|
+
3. When `active_context` is a branch, plan reads the parent's plan.md and launches a third research subagent for parent intersection analysis, writing results to `{context_path}/.planning_research/parent_intersection.md`
|
|
129
|
+
4. Branch plans include Section 2.5 (Parent Context) with shared components, inherited decisions, intersection points, and divergence
|
|
130
|
+
5. A critical rule is added about inherited architectural decisions being binding unless user overrides
|
|
131
|
+
- **Dependencies**: Task 2
|
|
132
|
+
- **Files**:
|
|
133
|
+
- `C:\Projects\Intuition\skills\intuition-plan\SKILL.md`
|
|
134
|
+
- `C:\Projects\Intuition\skills\intuition-plan\references\magellan_core.md`
|
|
135
|
+
- `C:\Projects\Intuition\skills\intuition-plan\references\sub_agents.md`
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### Task 7: Update design skill — context-path awareness
|
|
140
|
+
|
|
141
|
+
- **Component**: `intuition-design`
|
|
142
|
+
- **Description**: Update design to resolve `context_path` from `active_context` on startup. Change all file read/write paths to use `{context_path}`. When designing on a branch, optionally read parent design specs for related components to inform the ECD exploration.
|
|
143
|
+
- **Acceptance Criteria**:
|
|
144
|
+
1. Design reads `.project-memory-state.json` on startup and resolves `context_path`
|
|
145
|
+
2. All artifact reads (plan.md, design_brief.md) and writes (design_spec_*.md) use `{context_path}`
|
|
146
|
+
3. When designing on a branch with a parent that has design specs for related components, design reads them for context
|
|
147
|
+
- **Dependencies**: Task 2
|
|
148
|
+
- **Files**:
|
|
149
|
+
- `C:\Projects\Intuition\skills\intuition-design\SKILL.md`
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Task 8: Update execute skill — Senior Engineer subagent and context-path
|
|
154
|
+
|
|
155
|
+
- **Component**: `intuition-execute`
|
|
156
|
+
- **Description**: Update execute to resolve `context_path` from `active_context` on startup. Change all file read paths to use `{context_path}`. Add the Senior Engineer (opus) subagent to the available subagents table with usage criteria (3+ interdependent files, architectural implications, tasks with design specs). Include the holistic protocol in the Senior Engineer prompt template. Add branch-aware execution notes to subagent prompts when on a branch.
|
|
157
|
+
- **Acceptance Criteria**:
|
|
158
|
+
1. Execute reads `.project-memory-state.json` on startup and resolves `context_path`
|
|
159
|
+
2. All artifact reads (plan.md, design specs, execution_brief) use `{context_path}`
|
|
160
|
+
3. Senior Engineer (opus) subagent is defined in the subagents table with clear usage criteria and a prompt template that includes holistic protocol steps
|
|
161
|
+
4. A critical rule mandates Senior Engineer delegation for tasks with design specs or touching 3+ interdependent files
|
|
162
|
+
5. When executing on a branch, subagent prompts include parent context awareness
|
|
163
|
+
- **Dependencies**: Task 2
|
|
164
|
+
- **Files**:
|
|
165
|
+
- `C:\Projects\Intuition\skills\intuition-execute\SKILL.md`
|
|
166
|
+
- `C:\Projects\Intuition\skills\intuition-execute\references\faraday_core.md`
|
|
167
|
+
- `C:\Projects\Intuition\skills\intuition-execute\references\sub_agents.md`
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### Task 9: Create engineer skill
|
|
172
|
+
|
|
173
|
+
- **Component**: `intuition-engineer` (new)
|
|
174
|
+
- **Description**: Create the new `intuition-engineer` skill directory and SKILL.md. The engineer is an opus-level holistic troubleshooter that works on completed contexts. It follows a 9-step protocol: context selection, artifact loading, issue description, holistic investigation (trace symptom, map blast radius, check upstream/downstream, cross-reference plan, check patterns), diagnosis presentation, fix delegation to subagents, verification, and reporting. Delegates code changes to sonnet subagents with holistic context. Logs all fixes to `docs/project_notes/bugs.md`.
|
|
175
|
+
- **Acceptance Criteria**:
|
|
176
|
+
1. `C:\Projects\Intuition\skills\intuition-engineer\SKILL.md` exists with correct YAML frontmatter (name, description, model: opus, tools list, allowed-tools list)
|
|
177
|
+
2. SKILL.md implements the full 9-step protocol as specified in design spec Section 4
|
|
178
|
+
3. All 10 critical rules from the design spec are present in the SKILL.md
|
|
179
|
+
4. Subagent table defines Code Writer (sonnet), Research/Explorer (haiku), Test Runner (haiku), and Impact Analyst (haiku) with usage criteria
|
|
180
|
+
5. SKILL.md is under 500 lines
|
|
181
|
+
- **Dependencies**: None
|
|
182
|
+
- **Files**:
|
|
183
|
+
- `C:\Projects\Intuition\skills\intuition-engineer\SKILL.md` (new file)
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### Task 10: Update install and uninstall scripts
|
|
188
|
+
|
|
189
|
+
- **Component**: Install scripts
|
|
190
|
+
- **Description**: Add `intuition-engineer` to the skills array in `install-skills.js`. Add the corresponding log line for the new skill. Add `intuition-engineer` to the cleanup list in `uninstall-skills.js`.
|
|
191
|
+
- **Acceptance Criteria**:
|
|
192
|
+
1. `install-skills.js` skills array includes `'intuition-engineer'` between `'intuition-execute'` and `'intuition-initialize'`
|
|
193
|
+
2. Install success message includes a log line for `/intuition-engineer`
|
|
194
|
+
3. `uninstall-skills.js` skillsToRemove array includes `'intuition-engineer'`
|
|
195
|
+
- **Dependencies**: Task 9
|
|
196
|
+
- **Files**:
|
|
197
|
+
- `C:\Projects\Intuition\scripts\install-skills.js`
|
|
198
|
+
- `C:\Projects\Intuition\scripts\uninstall-skills.js`
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
### Task 11: Update initialize reference templates
|
|
203
|
+
|
|
204
|
+
- **Component**: Initialize reference files
|
|
205
|
+
- **Description**: Update the planning_brief_template, execution_brief_template, and design_brief_template to use `{context_path}` placeholder references where they mention file paths. These templates are used by handoff to generate briefs, so they need to reflect the new path structure.
|
|
206
|
+
- **Acceptance Criteria**:
|
|
207
|
+
1. Brief templates reference `{context_path}/` for workflow artifact paths instead of hardcoded `docs/project_notes/`
|
|
208
|
+
2. Templates remain valid as standalone reference documents
|
|
209
|
+
- **Dependencies**: None
|
|
210
|
+
- **Files**:
|
|
211
|
+
- `C:\Projects\Intuition\skills\intuition-initialize\references\planning_brief_template.md`
|
|
212
|
+
- `C:\Projects\Intuition\skills\intuition-initialize\references\execution_brief_template.md`
|
|
213
|
+
- `C:\Projects\Intuition\skills\intuition-initialize\references\design_brief_template.md`
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
### Task 12: Update MEMORY.md
|
|
218
|
+
|
|
219
|
+
- **Component**: Project memory
|
|
220
|
+
- **Description**: Update MEMORY.md with v7.0 project overview (11 skills, trunk-and-branch model), updated skill list (add engineer), updated state ownership (v4.0 schema), updated workflow architecture (branch model, Senior Engineer, context_path), updated handoff transitions (Transition 0, post-completion routing), and updated install script notes. All updates are specified verbatim in design spec Section 13.
|
|
221
|
+
- **Acceptance Criteria**:
|
|
222
|
+
1. Project Overview reflects v7.0 (11 skills, trunk-and-branch workflow, state schema v4.0)
|
|
223
|
+
2. All Skills section lists 11 skills with engineer included and updated descriptions
|
|
224
|
+
3. Handoff Transitions section includes Transition 0 (branch creation) and post-completion routing
|
|
225
|
+
4. Workflow Architecture section describes branch model, context_path resolution, Senior Engineer subagent, and shared memory
|
|
226
|
+
- **Dependencies**: All other tasks (Task 12 is the final documentation task)
|
|
227
|
+
- **Files**:
|
|
228
|
+
- `C:\Users\tgoodington\.claude\projects\C--Projects-Intuition\memory\MEMORY.md`
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## 6.5. Design Recommendations
|
|
233
|
+
|
|
234
|
+
All tasks are **ready for execution**. The design specification at `C:\Projects\Intuition\docs\v7_design_spec.md` provides the full behavioral specification for every skill change:
|
|
235
|
+
|
|
236
|
+
| Task | Design Reference |
|
|
237
|
+
|------|-----------------|
|
|
238
|
+
| Task 1 (Initialize + templates) | Spec Sections 11, 3 (state schema) |
|
|
239
|
+
| Task 2 (Handoff: context-path + state writes) | Spec Section 10 (path resolution, state writes, transition detection) |
|
|
240
|
+
| Task 3 (Handoff: branch creation + migration) | Spec Sections 10 (Transition 0), 14 (migration path) |
|
|
241
|
+
| Task 4 (Start: post-completion) | Spec Section 5 |
|
|
242
|
+
| Task 5 (Prompt: context-path) | Spec Section 6 |
|
|
243
|
+
| Task 6 (Plan: branch intersection) | Spec Section 7 |
|
|
244
|
+
| Task 7 (Design: context-path) | Spec Section 8 |
|
|
245
|
+
| Task 8 (Execute: Senior Engineer) | Spec Section 9 |
|
|
246
|
+
| Task 9 (Engineer: new skill) | Spec Section 4 (complete SKILL.md specification) |
|
|
247
|
+
| Task 10 (Install scripts) | Spec Section 12 |
|
|
248
|
+
| Task 11 (Brief templates) | Spec Section 2 (folder structure, path resolution) |
|
|
249
|
+
| Task 12 (MEMORY.md) | Spec Section 13 (verbatim update text provided) |
|
|
250
|
+
|
|
251
|
+
No additional design exploration is needed. The design spec is the design output.
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## 7. Testing Strategy
|
|
256
|
+
|
|
257
|
+
### Per-Skill Verification
|
|
258
|
+
|
|
259
|
+
1. **Initialize**: Run `/intuition-initialize` on a fresh project. Verify `trunk/` and `branches/` directories are created, state file is v4.0 schema, CLAUDE.md mentions trunk/branch model, INTUITION.md lists engineer skill.
|
|
260
|
+
|
|
261
|
+
2. **Handoff — context-path**: Run a trunk workflow through prompt->handoff->plan. Verify all artifacts land in `docs/project_notes/trunk/` (not the root). Verify state writes update `state.trunk.workflow`.
|
|
262
|
+
|
|
263
|
+
3. **Handoff — branch creation**: After trunk completes, route from start to handoff with branch info. Verify branch directory is created, state has branch entry with correct fields, `active_context` is set to new branch.
|
|
264
|
+
|
|
265
|
+
4. **Handoff — v3 migration**: Take a project with v3.0 state and existing artifacts at `docs/project_notes/`. Run `/intuition-handoff`. Verify artifacts move to `trunk/`, state restructures to v4.0, shared files stay at root.
|
|
266
|
+
|
|
267
|
+
5. **Start — post-completion**: With a completed trunk, run `/intuition-start`. Verify status tree displays, two choices are presented. Select "Create a branch" and verify name/purpose/parent collection. Select "Troubleshoot" and verify routing to `/intuition-engineer`.
|
|
268
|
+
|
|
269
|
+
6. **Prompt — branch context**: Create a branch, then run `/intuition-prompt`. Verify opening message mentions branch name, parent, and purpose. Verify output files go to `docs/project_notes/branches/{key}/`.
|
|
270
|
+
|
|
271
|
+
7. **Plan — branch intersection**: Run `/intuition-plan` on a branch. Verify it reads parent's plan.md, launches intersection analysis subagent, and outputs plan with Section 2.5 (Parent Context).
|
|
272
|
+
|
|
273
|
+
8. **Design — branch context**: Run `/intuition-design` on a branch. Verify it reads/writes from `{context_path}` and checks parent design specs if relevant.
|
|
274
|
+
|
|
275
|
+
9. **Execute — Senior Engineer**: Run `/intuition-execute` on a task flagged for design. Verify it delegates to Senior Engineer (opus) subagent instead of standard Code Writer. Verify branch-aware prompts when on a branch.
|
|
276
|
+
|
|
277
|
+
10. **Engineer**: With a completed context, run `/intuition-engineer`. Verify context selection, artifact loading, issue prompting, and that it attempts holistic investigation before proposing fixes.
|
|
278
|
+
|
|
279
|
+
11. **Install scripts**: Run `node scripts/install-skills.js`. Verify `intuition-engineer` directory appears in `~/.claude/skills/`. Run uninstall and verify cleanup.
|
|
280
|
+
|
|
281
|
+
### Integration Test
|
|
282
|
+
|
|
283
|
+
Run a full trunk workflow (prompt -> handoff -> plan -> handoff -> execute -> handoff), then create a branch, run its full workflow, then invoke the engineer on the completed trunk. Verify all paths resolve correctly and state tracks both contexts independently.
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## 8. Risks & Mitigations
|
|
288
|
+
|
|
289
|
+
| Risk | Impact | Likelihood | Mitigation |
|
|
290
|
+
|------|--------|------------|------------|
|
|
291
|
+
| Context-path bugs (wrong path resolution) | Artifacts written to wrong directory, state corruption | Medium | Every skill uses the same resolution formula; test with both trunk and branch active contexts |
|
|
292
|
+
| State migration data loss | Existing project artifacts lost during v3->v4 migration | Low | Migration moves files (not deletes); recommend users back up `docs/project_notes/` before upgrading |
|
|
293
|
+
| Handoff complexity explosion | SKILL.md exceeds 500-line limit with branch creation + migration + existing transitions | Medium | Move detailed migration logic to a migration section within the SKILL.md; keep the protocol flow concise with clear conditional branches |
|
|
294
|
+
| SKILL.md length limits (engineer) | Engineer's 9-step protocol plus critical rules may exceed 500 lines | Medium | Write concisely; the design spec is verbose for clarity but the SKILL.md should use compressed imperative directives |
|
|
295
|
+
| Branch-from-branch depth | Deep branch trees could create complex lineage | Low | v7.0 supports it structurally but documentation should recommend shallow trees; deeper support can be refined in v8.0 |
|
|
296
|
+
| Senior Engineer subagent cost | Opus subagent invocations are expensive | Low | Usage criteria gate: only for 3+ file tasks with dependencies or design specs; standard Code Writer handles everything else |
|
|
297
|
+
| v3 backward compatibility burden | Dual-schema support adds conditional logic to every skill | Medium | Only handoff and initialize handle migration; other skills warn and suggest migration rather than handling both schemas |
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## 10. Execution Notes
|
|
302
|
+
|
|
303
|
+
### Recommended Execution Order
|
|
304
|
+
|
|
305
|
+
**Wave 1 — Foundation (no dependencies)**:
|
|
306
|
+
- Task 1 (Initialize + state template)
|
|
307
|
+
- Task 9 (Engineer skill — new file, no dependencies)
|
|
308
|
+
- Task 11 (Brief templates — independent reference files)
|
|
309
|
+
|
|
310
|
+
**Wave 2 — State owner (depends on Task 1)**:
|
|
311
|
+
- Task 2 (Handoff: context-path + state writes)
|
|
312
|
+
|
|
313
|
+
**Wave 3 — Handoff completion (depends on Task 2)**:
|
|
314
|
+
- Task 3 (Handoff: branch creation + migration)
|
|
315
|
+
|
|
316
|
+
**Wave 4 — Downstream skills (depend on Task 2, can run in parallel)**:
|
|
317
|
+
- Task 4 (Start)
|
|
318
|
+
- Task 5 (Prompt)
|
|
319
|
+
- Task 6 (Plan)
|
|
320
|
+
- Task 7 (Design)
|
|
321
|
+
- Task 8 (Execute)
|
|
322
|
+
|
|
323
|
+
**Wave 5 — Finalization (depend on previous waves)**:
|
|
324
|
+
- Task 10 (Install scripts — depends on Task 9)
|
|
325
|
+
- Task 12 (MEMORY.md — last, after all changes are confirmed)
|
|
326
|
+
|
|
327
|
+
### Parallelization Opportunities
|
|
328
|
+
|
|
329
|
+
- Tasks 1, 9, and 11 are fully independent and can execute simultaneously.
|
|
330
|
+
- Tasks 4, 5, 6, 7, and 8 are independent of each other (all depend only on Task 2) and can execute simultaneously.
|
|
331
|
+
- Task 10 only needs Task 9 complete, so it can run as soon as the engineer skill is written.
|
|
332
|
+
|
|
333
|
+
### Watch Points
|
|
334
|
+
|
|
335
|
+
- **Handoff is the critical path.** Tasks 2 and 3 must be correct before any downstream skill can be verified in integration. Spend extra verification time here.
|
|
336
|
+
- **SKILL.md line counts.** Handoff and engineer are at highest risk of exceeding 500 lines. Monitor during execution and compress if needed.
|
|
337
|
+
- **Context-path consistency.** Every skill must use the identical resolution formula. A typo in one skill (e.g., `branches` vs `branch`) creates subtle path bugs. Use the exact formula from design spec Section 2.
|
|
338
|
+
- **State write isolation.** Only handoff and initialize write state. If any other skill accidentally gains Write access to `.project-memory-state.json`, it violates the core architectural constraint.
|
|
339
|
+
- **The design spec at `C:\Projects\Intuition\docs\v7_design_spec.md` contains the full behavioral specifications for every skill change.** Execution should read the relevant section of the design spec before implementing each task — the spec provides exact protocol flows, prompt templates, critical rules, and schema definitions.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tgoodington/intuition",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
|
+
"description": "Trunk-and-branch workflow system for Claude Code: prompt, plan, design, execute with iterative branching. Holistic coding expert, domain-agnostic design exploration with ECD framework, and file-based handoffs through project memory.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
7
7
|
"skills",
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Installation script for Intuition skills
|
|
5
5
|
*
|
|
6
|
-
* This script is run after `npm install -g intuition`
|
|
7
|
-
* It copies
|
|
6
|
+
* This script is run after `npm install -g @tgoodington/intuition`
|
|
7
|
+
* It copies skills to ~/.claude/skills/ for global access
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
const fs = require('fs');
|
|
@@ -39,13 +39,27 @@ function error(msg) {
|
|
|
39
39
|
console.error(`[intuition-install] ERROR: ${msg}`);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
// All skills to install
|
|
43
|
+
const skills = [
|
|
44
|
+
'intuition-start',
|
|
45
|
+
'intuition-prompt',
|
|
46
|
+
'intuition-handoff',
|
|
47
|
+
'intuition-plan',
|
|
48
|
+
'intuition-design',
|
|
49
|
+
'intuition-execute',
|
|
50
|
+
'intuition-engineer',
|
|
51
|
+
'intuition-initialize',
|
|
52
|
+
'intuition-agent-advisor',
|
|
53
|
+
'intuition-skill-guide',
|
|
54
|
+
'intuition-update'
|
|
55
|
+
];
|
|
56
|
+
|
|
42
57
|
// Main installation logic
|
|
43
58
|
try {
|
|
44
59
|
const homeDir = os.homedir();
|
|
45
60
|
const claudeSkillsDir = path.join(homeDir, '.claude', 'skills');
|
|
46
61
|
|
|
47
|
-
// Get the location of the installed package
|
|
48
|
-
// In npm global installation, this is typically in node_modules/intuition/
|
|
62
|
+
// Get the location of the installed package
|
|
49
63
|
const packageRoot = path.dirname(path.dirname(path.resolve(__filename)));
|
|
50
64
|
|
|
51
65
|
log(`Installing Intuition skills...`);
|
|
@@ -58,136 +72,42 @@ try {
|
|
|
58
72
|
log(`Created ${claudeSkillsDir}`);
|
|
59
73
|
}
|
|
60
74
|
|
|
61
|
-
//
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
copyDirRecursive(startSrc, startDest);
|
|
67
|
-
log(`✓ Installed /intuition-start skill to ${startDest}`);
|
|
68
|
-
} else {
|
|
69
|
-
error(`intuition-start skill not found at ${startSrc}`);
|
|
70
|
-
process.exit(1);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Copy /intuition-plan skill
|
|
74
|
-
const planSrc = path.join(packageRoot, 'skills', 'intuition-plan');
|
|
75
|
-
const planDest = path.join(claudeSkillsDir, 'intuition-plan');
|
|
76
|
-
|
|
77
|
-
if (fs.existsSync(planSrc)) {
|
|
78
|
-
copyDirRecursive(planSrc, planDest);
|
|
79
|
-
log(`✓ Installed /intuition-plan skill to ${planDest}`);
|
|
80
|
-
} else {
|
|
81
|
-
error(`intuition-plan skill not found at ${planSrc}`);
|
|
82
|
-
process.exit(1);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Copy /intuition-execute skill
|
|
86
|
-
const executeSrc = path.join(packageRoot, 'skills', 'intuition-execute');
|
|
87
|
-
const executeDest = path.join(claudeSkillsDir, 'intuition-execute');
|
|
88
|
-
|
|
89
|
-
if (fs.existsSync(executeSrc)) {
|
|
90
|
-
copyDirRecursive(executeSrc, executeDest);
|
|
91
|
-
log(`✓ Installed /intuition-execute skill to ${executeDest}`);
|
|
92
|
-
} else {
|
|
93
|
-
error(`intuition-execute skill not found at ${executeSrc}`);
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Copy /intuition-initialize skill
|
|
98
|
-
const initializeSrc = path.join(packageRoot, 'skills', 'intuition-initialize');
|
|
99
|
-
const initializeDest = path.join(claudeSkillsDir, 'intuition-initialize');
|
|
100
|
-
|
|
101
|
-
if (fs.existsSync(initializeSrc)) {
|
|
102
|
-
copyDirRecursive(initializeSrc, initializeDest);
|
|
103
|
-
log(`✓ Installed /intuition-initialize skill to ${initializeDest}`);
|
|
104
|
-
} else {
|
|
105
|
-
error(`intuition-initialize skill not found at ${initializeSrc}`);
|
|
106
|
-
process.exit(1);
|
|
75
|
+
// Remove old discovery skill if it exists (replaced by design in v6.0)
|
|
76
|
+
const oldDiscoveryDest = path.join(claudeSkillsDir, 'intuition-discovery');
|
|
77
|
+
if (fs.existsSync(oldDiscoveryDest)) {
|
|
78
|
+
fs.rmSync(oldDiscoveryDest, { recursive: true, force: true });
|
|
79
|
+
log(`Removed old /intuition-discovery skill (replaced by /intuition-design in v6.0)`);
|
|
107
80
|
}
|
|
108
81
|
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
|
|
82
|
+
// Install each skill
|
|
83
|
+
skills.forEach(skillName => {
|
|
84
|
+
const src = path.join(packageRoot, 'skills', skillName);
|
|
85
|
+
const dest = path.join(claudeSkillsDir, skillName);
|
|
112
86
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
// Copy /intuition-handoff skill
|
|
122
|
-
const handoffSrc = path.join(packageRoot, 'skills', 'intuition-handoff');
|
|
123
|
-
const handoffDest = path.join(claudeSkillsDir, 'intuition-handoff');
|
|
124
|
-
|
|
125
|
-
if (fs.existsSync(handoffSrc)) {
|
|
126
|
-
copyDirRecursive(handoffSrc, handoffDest);
|
|
127
|
-
log(`✓ Installed /intuition-handoff skill to ${handoffDest}`);
|
|
128
|
-
} else {
|
|
129
|
-
error(`intuition-handoff skill not found at ${handoffSrc}`);
|
|
130
|
-
process.exit(1);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Copy /intuition-agent-advisor skill
|
|
134
|
-
const agentAdvisorSrc = path.join(packageRoot, 'skills', 'intuition-agent-advisor');
|
|
135
|
-
const agentAdvisorDest = path.join(claudeSkillsDir, 'intuition-agent-advisor');
|
|
136
|
-
|
|
137
|
-
if (fs.existsSync(agentAdvisorSrc)) {
|
|
138
|
-
copyDirRecursive(agentAdvisorSrc, agentAdvisorDest);
|
|
139
|
-
log(`✓ Installed /intuition-agent-advisor skill to ${agentAdvisorDest}`);
|
|
140
|
-
} else {
|
|
141
|
-
error(`intuition-agent-advisor skill not found at ${agentAdvisorSrc}`);
|
|
142
|
-
process.exit(1);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Copy /intuition-skill-guide skill
|
|
146
|
-
const skillGuideSrc = path.join(packageRoot, 'skills', 'intuition-skill-guide');
|
|
147
|
-
const skillGuideDest = path.join(claudeSkillsDir, 'intuition-skill-guide');
|
|
148
|
-
|
|
149
|
-
if (fs.existsSync(skillGuideSrc)) {
|
|
150
|
-
copyDirRecursive(skillGuideSrc, skillGuideDest);
|
|
151
|
-
log(`✓ Installed /intuition-skill-guide skill to ${skillGuideDest}`);
|
|
152
|
-
} else {
|
|
153
|
-
error(`intuition-skill-guide skill not found at ${skillGuideSrc}`);
|
|
154
|
-
process.exit(1);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// Copy /intuition-update skill
|
|
158
|
-
const updateSrc = path.join(packageRoot, 'skills', 'intuition-update');
|
|
159
|
-
const updateDest = path.join(claudeSkillsDir, 'intuition-update');
|
|
160
|
-
|
|
161
|
-
if (fs.existsSync(updateSrc)) {
|
|
162
|
-
copyDirRecursive(updateSrc, updateDest);
|
|
163
|
-
log(`✓ Installed /intuition-update skill to ${updateDest}`);
|
|
164
|
-
} else {
|
|
165
|
-
error(`intuition-update skill not found at ${updateSrc}`);
|
|
166
|
-
process.exit(1);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Copy /intuition-prompt skill
|
|
170
|
-
const promptSrc = path.join(packageRoot, 'skills', 'intuition-prompt');
|
|
171
|
-
const promptDest = path.join(claudeSkillsDir, 'intuition-prompt');
|
|
172
|
-
|
|
173
|
-
if (fs.existsSync(promptSrc)) {
|
|
174
|
-
copyDirRecursive(promptSrc, promptDest);
|
|
175
|
-
log(`✓ Installed /intuition-prompt skill to ${promptDest}`);
|
|
176
|
-
} else {
|
|
177
|
-
error(`intuition-prompt skill not found at ${promptSrc}`);
|
|
178
|
-
process.exit(1);
|
|
179
|
-
}
|
|
87
|
+
if (fs.existsSync(src)) {
|
|
88
|
+
copyDirRecursive(src, dest);
|
|
89
|
+
log(`\u2713 Installed /${skillName} skill to ${dest}`);
|
|
90
|
+
} else {
|
|
91
|
+
error(`${skillName} skill not found at ${src}`);
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
180
95
|
|
|
181
96
|
// Verify installation
|
|
182
|
-
|
|
183
|
-
|
|
97
|
+
const allInstalled = skills.every(skillName =>
|
|
98
|
+
fs.existsSync(path.join(claudeSkillsDir, skillName))
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
if (allInstalled) {
|
|
102
|
+
log(`\u2713 Installation complete!`);
|
|
184
103
|
log(`Skills are now available globally:`);
|
|
185
104
|
log(` /intuition-start - Load project context and detect workflow phase`);
|
|
186
|
-
log(` /intuition-discovery - Exploratory discovery (research-informed dialogue)`);
|
|
187
105
|
log(` /intuition-prompt - Focused discovery (prompt-engineering refinement)`);
|
|
188
|
-
log(` /intuition-handoff - Handoff orchestrator (phase transitions)`);
|
|
189
|
-
log(` /intuition-plan - Strategic planning (ARCH protocol)`);
|
|
106
|
+
log(` /intuition-handoff - Handoff orchestrator (phase transitions + design loop)`);
|
|
107
|
+
log(` /intuition-plan - Strategic planning (ARCH protocol + design flagging)`);
|
|
108
|
+
log(` /intuition-design - Design exploration (ECD framework, domain-agnostic)`);
|
|
190
109
|
log(` /intuition-execute - Execution orchestrator (subagent delegation)`);
|
|
110
|
+
log(` /intuition-engineer - Engineer advisor on architectural decisions`);
|
|
191
111
|
log(` /intuition-initialize - Project initialization (set up project memory)`);
|
|
192
112
|
log(` /intuition-agent-advisor - Expert advisor on building custom agents`);
|
|
193
113
|
log(` /intuition-skill-guide - Expert advisor on building custom skills`);
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Uninstallation script for Intuition skills
|
|
5
5
|
*
|
|
6
|
-
* This script is run before `npm uninstall -g intuition`
|
|
7
|
-
* It removes
|
|
6
|
+
* This script is run before `npm uninstall -g @tgoodington/intuition`
|
|
7
|
+
* It removes all Intuition skills from ~/.claude/skills/
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
const fs = require('fs');
|
|
@@ -40,20 +40,27 @@ try {
|
|
|
40
40
|
process.exit(0);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
// Remove all Intuition skills
|
|
43
|
+
// Remove all Intuition skills (current + legacy)
|
|
44
44
|
const skillsToRemove = [
|
|
45
45
|
'intuition-start',
|
|
46
|
-
'intuition-
|
|
47
|
-
'intuition-discovery',
|
|
46
|
+
'intuition-prompt',
|
|
48
47
|
'intuition-handoff',
|
|
49
48
|
'intuition-plan',
|
|
50
|
-
'intuition-
|
|
49
|
+
'intuition-design',
|
|
50
|
+
'intuition-execute',
|
|
51
|
+
'intuition-engineer',
|
|
52
|
+
'intuition-initialize',
|
|
53
|
+
'intuition-agent-advisor',
|
|
54
|
+
'intuition-skill-guide',
|
|
55
|
+
'intuition-update',
|
|
56
|
+
// Legacy skills (removed in v6.0)
|
|
57
|
+
'intuition-discovery'
|
|
51
58
|
];
|
|
52
59
|
|
|
53
60
|
skillsToRemove.forEach(skillName => {
|
|
54
61
|
const skillDest = path.join(claudeSkillsDir, skillName);
|
|
55
62
|
if (removeDir(skillDest)) {
|
|
56
|
-
log(
|
|
63
|
+
log(`\u2713 Removed /${skillName} skill from ${skillDest}`);
|
|
57
64
|
}
|
|
58
65
|
});
|
|
59
66
|
|
|
@@ -62,19 +69,21 @@ try {
|
|
|
62
69
|
const remaining = fs.readdirSync(claudeSkillsDir);
|
|
63
70
|
if (remaining.length === 0) {
|
|
64
71
|
fs.rmSync(claudeSkillsDir, { force: true });
|
|
65
|
-
log(
|
|
72
|
+
log(`\u2713 Removed empty skills directory`);
|
|
66
73
|
|
|
67
74
|
// Also clean up .claude if it's empty
|
|
68
75
|
const claudeDir = path.join(homeDir, '.claude');
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
if (fs.existsSync(claudeDir)) {
|
|
77
|
+
const claudeRemaining = fs.readdirSync(claudeDir);
|
|
78
|
+
if (claudeRemaining.length === 0) {
|
|
79
|
+
fs.rmSync(claudeDir, { force: true });
|
|
80
|
+
log(`\u2713 Removed empty .claude directory`);
|
|
81
|
+
}
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
84
|
}
|
|
76
85
|
|
|
77
|
-
log(
|
|
86
|
+
log(`\u2713 Uninstallation complete!`);
|
|
78
87
|
|
|
79
88
|
} catch (err) {
|
|
80
89
|
error(`Uninstallation failed: ${err.message}`);
|