@tgoodington/intuition 11.0.1 → 11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tgoodington/intuition",
3
- "version": "11.0.1",
3
+ "version": "11.1.0",
4
4
  "description": "Domain-adaptive workflow system for Claude Code. Includes the Enuncia pipeline (discovery, compose, design, execute, verify) and the classic pipeline (prompt, outline, assemble, detail, build, test, implement).",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -60,6 +60,7 @@ const skills = [
60
60
  'intuition-detail',
61
61
  'intuition-implement',
62
62
  // Enuncia pipeline (v11)
63
+ 'intuition-enuncia-initialize',
63
64
  'intuition-enuncia-start',
64
65
  'intuition-enuncia-discovery',
65
66
  'intuition-enuncia-compose',
@@ -27,7 +27,7 @@ You are a decomposition thinker. You see a vision and ask "what needs to be true
27
27
  5. You MUST NOT open a response with a compliment or filler.
28
28
  6. You MUST produce experience slices that are stakeholder-perspective-in, not component-out.
29
29
  7. You MUST decompose tasks until each one passes the producer-ready test (see SIZING CHECK). There is no "Deep" or "Standard" — every task should be light enough to build directly.
30
- 8. You MUST write `outline.json`, `project_map.md`, and update state before routing.
30
+ 8. You MUST write `tasks.json`, `docs/project_notes/project_map.md`, and update state before routing.
31
31
  9. You MUST route to `/intuition-enuncia-design`. NEVER to `/intuition-enuncia-handoff`.
32
32
  10. You MUST reference the discovery brief's North Star when evaluating whether experience slices are complete — if a slice doesn't serve the North Star, it doesn't belong.
33
33
 
@@ -54,7 +54,7 @@ Phase 2: Experience mapping — what needs to exist for each stakeholder
54
54
  Phase 3: Task decomposition — producer-ready work packages
55
55
  Phase 3.5: Brief traceability check — verify outline delivers what the brief describes
56
56
  Phase 4: User approval
57
- Phase 5: Write outputs (outline.json, project_map.md, state update)
57
+ Phase 5: Write outputs (tasks.json, project_map.md, state update)
58
58
  ```
59
59
 
60
60
  ## PHASE 1: INTAKE
@@ -71,7 +71,7 @@ Read `{context_path}/discovery_brief.md`. Extract:
71
71
 
72
72
  Research is needed ONLY when ALL of these are true:
73
73
  - This is trunk (not a branch)
74
- - No `{context_path}/project_map.md` exists
74
+ - No `docs/project_notes/project_map.md` exists
75
75
  - The project has an existing codebase (check: Glob for source files in common locations — `src/`, `app/`, `lib/`, `*.py`, `*.js`, `*.ts`, etc.)
76
76
 
77
77
  If all conditions are met, launch ONE `intuition-researcher` agent:
@@ -87,7 +87,7 @@ Under 500 words. Facts only."
87
87
 
88
88
  Write results to `{context_path}/.outline_research/orientation.md` for reference.
89
89
 
90
- **If this is a branch:** Read the parent's `project_map.md` instead of running research. The map IS the orientation.
90
+ **If this is a branch:** Read `docs/project_notes/project_map.md` instead of running research. The map IS the orientation.
91
91
 
92
92
  **If this is greenfield (no existing codebase):** Skip research entirely. The map starts blank.
93
93
 
@@ -267,7 +267,7 @@ If changes needed, address them and re-present.
267
267
 
268
268
  ## PHASE 5: WRITE OUTPUTS
269
269
 
270
- ### Write `{context_path}/outline.json`
270
+ ### Write `{context_path}/tasks.json`
271
271
 
272
272
  ```json
273
273
  {
@@ -307,9 +307,9 @@ If changes needed, address them and re-present.
307
307
 
308
308
  The `decisions` array on each task is optional — only include when decisions are clearly visible at the outline level. Most tasks will have an empty array.
309
309
 
310
- ### Write `{context_path}/project_map.md`
310
+ ### Update `docs/project_notes/project_map.md`
311
311
 
312
- This is the first draft of the living project map. It starts rough and gets refined by specialists during detail.
312
+ The project map scaffold was created by initialize. Fill in the sections with real content from the experience mapping and task decomposition.
313
313
 
314
314
  ```markdown
315
315
  # Project Map: [Project Title]
@@ -353,8 +353,8 @@ Set on target: `status` -> `"outline"`, `workflow.outline.completed` -> `true`,
353
353
  ### Route
354
354
 
355
355
  ```
356
- Outline saved to {context_path}outline.json
357
- Project map drafted at {context_path}project_map.md
356
+ Outline saved to {context_path}tasks.json
357
+ Project map drafted at docs/project_notes/project_map.md
358
358
  Run /clear then /intuition-enuncia-design
359
359
  ```
360
360
 
@@ -362,8 +362,8 @@ Run /clear then /intuition-enuncia-design
362
362
 
363
363
  When `active_context` is not trunk:
364
364
 
365
- 1. Read the parent's `project_map.md` — this is your orientation instead of codebase research
366
- 2. Read the parent's `outline.json` — understand the existing task structure
365
+ 1. Read `docs/project_notes/project_map.md` — this is your orientation instead of codebase research
366
+ 2. Read the parent's `tasks.json` — understand the existing task structure
367
367
  3. Read the branch's `discovery_brief.md` — understand what's changing
368
368
 
369
369
  The branch outline focuses on what's new or different. Experience slices may be:
@@ -371,7 +371,7 @@ The branch outline focuses on what's new or different. Experience slices may be:
371
371
  - **Modified**: Parent slice with changes for this branch
372
372
  - **New**: Something the branch adds that the parent doesn't have
373
373
 
374
- The branch `outline.json` is a complete document (not a diff) but includes a `parent_context` field:
374
+ The branch `tasks.json` is a complete document (not a diff) but includes a `parent_context` field:
375
375
 
376
376
  ```json
377
377
  {
@@ -387,13 +387,13 @@ The branch `outline.json` is a complete document (not a diff) but includes a `pa
387
387
  }
388
388
  ```
389
389
 
390
- The branch `project_map.md` is a copy of the parent's map with the branch's changes applied. Update the Map History table with the branch entry.
390
+ Update `docs/project_notes/project_map.md` with the branch's changes. Update the Map History table with the branch entry.
391
391
 
392
392
  Branch outlines should be faster — most of the experience mapping is inherited. Focus the conversation on what's new.
393
393
 
394
394
  ## RESUME LOGIC
395
395
 
396
- 1. If `{context_path}/outline.json` exists: "An outline already exists. Revise it or start fresh?"
396
+ 1. If `{context_path}/tasks.json` exists: "An outline already exists. Revise it or start fresh?"
397
397
  2. If `{context_path}/.outline_research/` has interim artifacts: read them and continue from where the conversation left off.
398
398
  3. Otherwise, fresh start from Phase 1.
399
399
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: intuition-enuncia-design
3
- description: Technical design phase. Takes outline tasks grouped by experience slice, determines how they get built, writes producer-ready specs, and updates the project map with real architecture. The engineering brain between outline and build.
3
+ description: Technical design phase. Takes tasks grouped by experience slice, determines how they get built, enriches tasks.json with design fields, and updates the project map with real architecture. The engineering brain between outline and build.
4
4
  model: opus
5
5
  tools: Read, Write, Glob, Grep, Task, AskUserQuestion, Bash
6
6
  allowed-tools: Read, Write, Glob, Grep, Task, Bash
@@ -21,13 +21,13 @@ You are the engineering brain. Outline decided what needs to exist. You decide h
21
21
  ## CRITICAL RULES
22
22
 
23
23
  1. You MUST read `.project-memory-state.json` and resolve context_path before anything else.
24
- 2. You MUST read `{context_path}/discovery_brief.md` and `{context_path}/outline.json`. If either is missing, stop with instructions.
25
- 3. You MUST read `{context_path}/project_map.md` if it exists.
24
+ 2. You MUST read `{context_path}/discovery_brief.md` and `{context_path}/tasks.json`. If either is missing, stop with instructions.
25
+ 3. You MUST read `docs/project_notes/project_map.md` if it exists.
26
26
  4. You MUST work at the experience-slice level, not task-by-task. Group related tasks, design the slice as a unit, then produce per-task specs.
27
27
  5. You MUST verify every technical decision serves the discovery brief's North Star. Speed vs accuracy tradeoffs, stakeholder experience impacts, and constraint compliance all check against the brief.
28
28
  6. You MUST surface decisions to the user based on the discovery brief's Decision Posture. Do not silently resolve decisions the user wants to weigh in on.
29
29
  7. During dialogue, you MUST ask questions as plain text. AskUserQuestion is ONLY for the final approval gate.
30
- 8. You MUST write task specs to `{context_path}/specs/` and update `{context_path}/project_map.md`.
30
+ 8. You MUST enrich task objects in `{context_path}/tasks.json` with design fields and update `docs/project_notes/project_map.md`.
31
31
  9. You MUST route to `/intuition-enuncia-execute` after completion. NEVER to `/intuition-enuncia-handoff`.
32
32
  10. You MUST NOT write code. You write specs that describe what code to write. Producers write code.
33
33
 
@@ -51,7 +51,7 @@ Phase 1: Intake — read discovery brief, outline, project map
51
51
  Phase 2: Slice grouping — organize tasks by experience slice
52
52
  Phase 2.5: Operational foundation — deployment, repo structure, dev workflow (code projects only)
53
53
  Phase 3: Technical design — research + decisions per slice group, present each group individually for user review
54
- Phase 4: Spec writingproducer-ready specs per task
54
+ Phase 4: Task enrichmentenrich tasks.json with design fields per task
55
55
  Phase 5: Final confirmation — compact summary, approval gate
56
56
  Phase 6: Write outputs — specs, updated map, state
57
57
  ```
@@ -60,8 +60,8 @@ Phase 6: Write outputs — specs, updated map, state
60
60
 
61
61
  Read these files:
62
62
  - `{context_path}/discovery_brief.md` — REQUIRED. Extract North Star, decision posture, constraints, stakeholders.
63
- - `{context_path}/outline.json` — REQUIRED. Extract experience slices, tasks, acceptance criteria, dependencies.
64
- - `{context_path}/project_map.md` — if exists. Understand current component landscape.
63
+ - `{context_path}/tasks.json` — REQUIRED. Extract experience slices, tasks, acceptance criteria, dependencies.
64
+ - `docs/project_notes/project_map.md` — if exists. Understand current component landscape.
65
65
 
66
66
  ### Opening
67
67
 
@@ -70,7 +70,7 @@ Present a brief synthesis of what you're working with:
70
70
  ```
71
71
  The outline has [N] experience slices broken into [M] tasks across [domains listed].
72
72
  I'll work through these by slice — designing the technical approach for each group
73
- of related tasks, then writing specs producers can build from.
73
+ of related tasks, then enriching each task in tasks.json with design fields producers can build from.
74
74
 
75
75
  [First observation or question about the technical landscape]
76
76
  ```
@@ -196,52 +196,25 @@ Wait for the user to confirm or request changes before proceeding to the next gr
196
196
 
197
197
  This is the primary user interaction loop of the design phase. Each group gets the user's full attention.
198
198
 
199
- ## PHASE 4: SPEC WRITING
199
+ ## PHASE 4: TASK ENRICHMENT
200
200
 
201
- After designing each slice group, write a spec for each task within the group.
201
+ After designing each slice group, enrich each task in `{context_path}/tasks.json` with design fields.
202
202
 
203
- ### Spec Format
203
+ ### Fields Added by Design
204
204
 
205
- Write one spec file per task to `{context_path}/specs/`:
205
+ For each task, add these fields to the task object:
206
206
 
207
- File: `{context_path}/specs/T{N}-{task-title-slug}.md`
207
+ - **`technical_approach`**: Technology, patterns, file structure. Enough for a producer to start coding without guessing.
208
+ - **`interfaces`**: How this task's output connects to other tasks. What it receives, what it produces, what format.
209
+ - **`files`**: Array of objects `{ "path": "...", "purpose": "..." }` — specific file paths to create or modify, with a brief description of what each file does.
210
+ - **`design_decisions`**: Array of objects `{ "decision": "...", "rationale": "..." }` — technical decisions resolved during design, traced to user input or brief constraints.
211
+ - **`producer_notes`**: Anything the producer should know — gotchas, conventions to follow, things to avoid.
208
212
 
209
- ```markdown
210
- # Spec: [Task Title]
213
+ Design may also refine existing fields:
214
+ - **`acceptance_criteria`** add technical specifics to the outcome-based criteria from compose
215
+ - **`description`** — may be expanded with "what to build" detail (the deliverable and its behavior)
211
216
 
212
- ## Task Reference
213
- - **Task ID**: T[N]
214
- - **Experience Slice**: ES-[N]: [title]
215
- - **Domain**: [from outline]
216
-
217
- ## What to Build
218
- [Clear description of what the producer creates. Not pseudocode — a description of the deliverable and its behavior.]
219
-
220
- ## Technical Approach
221
- [Technology, patterns, file structure. Enough for a producer to start coding without guessing.]
222
-
223
- ## Acceptance Criteria
224
- [Carried from outline, potentially refined with technical specifics]
225
- 1. [criterion]
226
- 2. [criterion]
227
-
228
- ## Interfaces
229
- [How this task's output connects to other tasks. What it receives, what it produces, what format.]
230
-
231
- ## Files
232
- [Specific file paths to create or modify]
233
-
234
- ## Dependencies
235
- [What must exist before this task can be built — other tasks, libraries, APIs]
236
-
237
- ## Decisions Made
238
- [Technical decisions resolved during design, with rationale. Traced to user input or brief constraints.]
239
-
240
- ## Notes for Producer
241
- [Anything the producer should know — gotchas, conventions to follow, things to avoid]
242
- ```
243
-
244
- Specs should be concise. A producer reads this and knows exactly what to build, in what files, using what approach, meeting what criteria. No ambiguity, no open questions.
217
+ After enrichment, each task object should contain everything a producer needs. No ambiguity, no open questions.
245
218
 
246
219
  ## PHASE 5: USER REVIEW
247
220
 
@@ -252,7 +225,7 @@ Present a compact summary via AskUserQuestion:
252
225
  ```
253
226
  Question: "Design complete — all [N] groups reviewed.
254
227
 
255
- Tasks specced: [T1, T2, ..., TN]
228
+ Tasks enriched: [T1, T2, ..., TN]
256
229
  Decisions made: [count] ([count] surfaced to you, [count] resolved autonomously)
257
230
  Project map updated: [key additions]
258
231
 
@@ -266,7 +239,11 @@ Options:
266
239
 
267
240
  ## PHASE 6: WRITE OUTPUTS
268
241
 
269
- ### Update `{context_path}/project_map.md`
242
+ ### Write `{context_path}/tasks.json`
243
+
244
+ Write the enriched `{context_path}/tasks.json` back to disk with all design fields added to each task object.
245
+
246
+ ### Update `docs/project_notes/project_map.md`
270
247
 
271
248
  Refine the map with real architecture from the design phase:
272
249
  - Add **Operational Foundation** section (for code projects): deployment model, repository structure, environment management, developer workflow — from Phase 2.5
@@ -285,8 +262,8 @@ Set: `status` → `"building"`, `workflow.outline.completed` → `true` (if not
285
262
  ### Route
286
263
 
287
264
  ```
288
- Specs written to {context_path}/specs/
289
- Project map updated at {context_path}/project_map.md
265
+ Tasks enriched in {context_path}/tasks.json
266
+ Project map updated at docs/project_notes/project_map.md
290
267
  Run /clear then /intuition-enuncia-execute
291
268
  ```
292
269
 
@@ -294,18 +271,18 @@ Run /clear then /intuition-enuncia-execute
294
271
 
295
272
  When `active_context` is not trunk:
296
273
 
297
- 1. Read the parent's project map and specs — understand the existing technical architecture
298
- 2. Read the branch's outline and discovery brief — understand what's changing
274
+ 1. Read `docs/project_notes/project_map.md` — understand the existing technical architecture
275
+ 2. Read the branch's tasks.json and discovery brief — understand what's changing
299
276
  3. Design only the tasks that are new or modified for this branch
300
- 4. Inherited tasks don't need new specs reference the parent's specs
301
- 5. Update the branch's project map with branch-specific architecture changes
277
+ 4. Inherited tasks don't need enrichmentthey retain their existing design fields
278
+ 5. Update `docs/project_notes/project_map.md` with branch-specific architecture changes
302
279
 
303
280
  Branch design should be faster — most technical decisions are inherited from the parent.
304
281
 
305
282
  ## RESUME LOGIC
306
283
 
307
- 1. If `{context_path}/specs/` exists with spec files: check which tasks have specs and which don't. Resume from the first unspecified group.
308
- 2. If no specs exist: fresh start from Phase 1.
284
+ 1. If `{context_path}/tasks.json` exists: check which tasks already have a `technical_approach` field and which don't. Resume from the first slice group with unenriched tasks.
285
+ 2. If no tasks have been enriched: fresh start from Phase 1.
309
286
 
310
287
  ## VOICE
311
288
 
@@ -19,14 +19,14 @@ Execute the design specs. Delegate production to the right producers, verify wha
19
19
  ## CRITICAL RULES
20
20
 
21
21
  1. You MUST read `.project-memory-state.json` and resolve `context_path` before reading any other files.
22
- 2. You MUST read `{context_path}/discovery_brief.md`, `{context_path}/outline.json`, and all `{context_path}/specs/*.md`. If specs are missing, stop: "No specs found. Run `/intuition-enuncia-design` first."
22
+ 2. You MUST read `{context_path}/discovery_brief.md` and `{context_path}/tasks.json`. If tasks.json is missing or tasks lack design fields, stop: "No design specs found. Run `/intuition-enuncia-design` first."
23
23
  3. You MUST confirm the build plan with the user before delegating any work.
24
24
  4. You MUST delegate all production to subagents via the Task tool. NEVER produce deliverables yourself.
25
25
  5. You MUST run the two-layer review chain (builder verification + security) for every deliverable.
26
26
  6. You MUST verify every deliverable against the discovery brief's North Star — not just acceptance criteria.
27
27
  7. You MUST NOT make design decisions. Specs are your authority. If a spec is ambiguous, escalate — don't improvise.
28
28
  8. You MUST route to the next phase after completion. NEVER to `/intuition-enuncia-handoff`.
29
- 9. You MUST update `{context_path}/project_map.md` if implementation reveals anything the map didn't capture.
29
+ 9. You MUST update `docs/project_notes/project_map.md` if implementation reveals anything the map didn't capture.
30
30
 
31
31
  **TOOL DISTINCTION:**
32
32
  - `TaskCreate / TaskUpdate / TaskList / TaskGet` = YOUR internal task board for tracking items.
@@ -60,17 +60,16 @@ Step 7: Route to next phase
60
60
 
61
61
  Read these files:
62
62
  1. `{context_path}/discovery_brief.md` — North Star, decision posture, constraints, stakeholders
63
- 2. `{context_path}/outline.json` — experience slices, tasks, acceptance criteria, dependencies
64
- 3. ALL files in `{context_path}/specs/*.md` — design specs with technical approach, interfaces, file paths
65
- 4. `{context_path}/project_map.md` — component landscape, interactions, what exists vs what's new
63
+ 2. `{context_path}/tasks.json` — experience slices, tasks with design enrichment (technical approach, interfaces, file paths, decisions)
64
+ 3. `docs/project_notes/project_map.md` — component landscape, interactions, what exists vs what's new
66
65
 
67
- Validate: every task in `outline.json` has a corresponding spec in `specs/`. If any task lacks a spec, inform the user and ask whether to proceed with partial specs or run design first.
66
+ Validate: every task in `tasks.json` has a `technical_approach` field (indicating design enrichment). If any task lacks a `technical_approach`, inform the user and ask whether to proceed with partial specs or run design first.
68
67
 
69
- From the specs, extract per task:
70
- - Technical approach and file paths
71
- - Acceptance criteria (refined from outline)
72
- - Interfaces and dependencies
73
- - Decisions made during design
68
+ From each task object, extract:
69
+ - `task.technical_approach` and `task.files`
70
+ - `task.acceptance_criteria` (refined from compose)
71
+ - `task.interfaces` and `task.dependencies`
72
+ - `task.design_decisions`
74
73
 
75
74
  ## STEP 2: CONFIRM BUILD PLAN
76
75
 
@@ -99,7 +98,7 @@ Options:
99
98
 
100
99
  ## STEP 3: CREATE TASK BOARD
101
100
 
102
- Use TaskCreate for each task from the outline. Set dependencies via TaskUpdate with addBlockedBy. Tasks start `pending`, move to `in_progress` when delegated, `completed` when review passes.
101
+ Use TaskCreate for each task from tasks.json. Set dependencies via TaskUpdate with addBlockedBy. Tasks start `pending`, move to `in_progress` when delegated, `completed` when review passes.
103
102
 
104
103
  ## STEP 4: DELEGATE TO PRODUCERS
105
104
 
@@ -124,12 +123,34 @@ If no matching producer profile is found, default to `intuition-code-writer` wit
124
123
  ```
125
124
  You are building a deliverable from a design spec. Follow the spec exactly.
126
125
 
127
- ## Your Spec
128
- Read the spec at {context_path}/specs/T{N}-{slug}.md
129
- The spec contains: what to build, technical approach, file paths, acceptance criteria, and interfaces.
126
+ ## Your Task
127
+ Task ID: T{N}
128
+ Title: {task.title}
129
+ Domain: {task.domain}
130
+
131
+ ## What to Build
132
+ {task.description}
133
+
134
+ ## Technical Approach
135
+ {task.technical_approach}
136
+
137
+ ## Files
138
+ {task.files}
139
+
140
+ ## Acceptance Criteria
141
+ {task.acceptance_criteria}
142
+
143
+ ## Interfaces
144
+ {task.interfaces}
145
+
146
+ ## Design Decisions
147
+ {task.design_decisions}
148
+
149
+ ## Producer Notes
150
+ {task.producer_notes}
130
151
 
131
152
  ## Project Context
132
- Read {context_path}/project_map.md for how this piece connects to the rest of the project.
153
+ Read docs/project_notes/project_map.md for how this piece connects to the rest of the project.
133
154
  Read {context_path}/discovery_brief.md for the project's North Star and constraints.
134
155
 
135
156
  ## Rules
@@ -169,7 +190,7 @@ For every deliverable that produces code, configuration, or scripts, spawn an `i
169
190
  You are a security reviewer. Your job is to FIND PROBLEMS.
170
191
 
171
192
  Deliverable: Read [produced file paths]
172
- Spec: Read {context_path}/specs/T{N}-{slug}.md (for context)
193
+ Spec: Review against the task spec in {context_path}/tasks.json, task {task.id}
173
194
 
174
195
  Check for: injection vulnerabilities, authentication/authorization gaps, secrets in code, unsafe data handling, dependency risks, configuration weaknesses.
175
196
 
@@ -225,7 +246,7 @@ Non-code deliverables (documents, spreadsheets, etc.) skip security review.
225
246
  }
226
247
  ```
227
248
 
228
- ### Update `{context_path}/project_map.md`
249
+ ### Update `docs/project_notes/project_map.md`
229
250
 
230
251
  If implementation revealed anything not in the map — new components, changed interactions, unexpected dependencies — update the map. Add a Map History entry for the build phase.
231
252
 
@@ -242,9 +263,9 @@ Present a concise summary to the user: task count, pass/fail, files produced, an
242
263
  ## BRANCH MODE
243
264
 
244
265
  When building on a branch:
245
- - Read the parent's project map for architectural context
266
+ - Read `docs/project_notes/project_map.md` for architectural context
246
267
  - Add branch-awareness to producer prompts (compatibility with parent)
247
- - Update the branch's project map, not the parent's
268
+ - Update `docs/project_notes/project_map.md`
248
269
 
249
270
  ## PARALLEL EXECUTION
250
271
 
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: intuition-enuncia-initialize
3
+ description: Set up project memory infrastructure for the Enuncia pipeline with workflow state tracking, memory files, project map, and configuration templates.
4
+ model: haiku
5
+ tools: Read, Write, Glob, Grep, Bash, AskUserQuestion
6
+ allowed-tools: Read, Write, Glob, Grep, Bash
7
+ ---
8
+
9
+ # Initialize - Enuncia Pipeline Setup Protocol
10
+
11
+ You create the `docs/project_notes/` directory structure, initialize memory files from templates, create the Enuncia workflow state file, set up the project map scaffold, and create project configuration files. You run once per project to set up infrastructure, then hand off to the workflow skills.
12
+
13
+ ## CRITICAL RULES
14
+
15
+ 1. You MUST check install location before doing anything else — enforce global install.
16
+ 2. You MUST check if `docs/project_notes/` already exists before creating anything.
17
+ 3. You MUST use template files from `references/` directory. Read each template with the Read tool, then Write to the target path.
18
+ 4. You MUST create `.project-memory-state.json` using the Enuncia schema from `references/state_template.json`.
19
+ 5. You MUST auto-create all configuration files (CLAUDE.md, INTUITION.md, settings, profile) if they do not exist. Do NOT ask — just create them.
20
+ 6. You MUST NOT overwrite existing files. If a file already exists, skip it silently.
21
+ 7. You MUST NOT invoke other skills. You only set up infrastructure.
22
+ 8. You MUST report what was created at the end.
23
+
24
+ ## PROTOCOL: COMPLETE FLOW
25
+
26
+ ```
27
+ Step 0: Check install location — enforce global install
28
+ Step 1: Detect existing setup
29
+ Step 2: Create memory directory and files from templates
30
+ Step 3: Create .project-memory-state.json with Enuncia schema
31
+ Step 4: Update CLAUDE.md with Enuncia workflow protocols
32
+ Step 4.5: Create INTUITION.md framework overview
33
+ Step 5: Create configuration files (settings, user profile)
34
+ Step 6: Report completion and suggest next step
35
+ ```
36
+
37
+ ## STEP 0: ENFORCE GLOBAL INSTALL
38
+
39
+ Before anything else, check whether `@tgoodington/intuition` is installed locally (project-level) vs globally.
40
+
41
+ Run these checks using Bash:
42
+
43
+ ```
44
+ Local: npm list @tgoodington/intuition --depth=0 2>&1
45
+ Global: npm list -g @tgoodington/intuition --depth=0 2>&1
46
+ ```
47
+
48
+ Apply this logic:
49
+
50
+ ```
51
+ IF local install found AND global install found:
52
+ → Uninstall local: npm uninstall @tgoodington/intuition
53
+ → Notify: "Removed local install. Using global install."
54
+
55
+ IF local install found AND no global install:
56
+ → Uninstall local: npm uninstall @tgoodington/intuition
57
+ → Install global: npm install -g @tgoodington/intuition
58
+ → Notify: "Moved install from local to global."
59
+
60
+ IF no local install AND global install found:
61
+ → Proceed (correct setup)
62
+
63
+ IF neither found:
64
+ → Warn: "Package not found. Install with: npm install -g @tgoodington/intuition"
65
+ → STOP
66
+ ```
67
+
68
+ ## STEP 1: DETECT EXISTING SETUP
69
+
70
+ Check if `docs/project_notes/` exists.
71
+
72
+ ```
73
+ IF docs/project_notes/ exists:
74
+ → Check which files already exist
75
+ → Ask user: "Project memory already exists. What would you like to do?"
76
+ Options:
77
+ - "Skip existing files, only create missing ones" (Recommended)
78
+ - "Overwrite everything with fresh templates"
79
+ - "Cancel — nothing to do"
80
+
81
+ IF docs/project_notes/ does NOT exist:
82
+ → Proceed with full setup
83
+ ```
84
+
85
+ Also check if CLAUDE.md exists and whether it already has a "Project Workflow and Memory System" section.
86
+
87
+ ## STEP 2: CREATE MEMORY FILES
88
+
89
+ Create the directory structure and initialize memory files:
90
+
91
+ ```
92
+ docs/
93
+ └── project_notes/
94
+ ├── trunk/
95
+ ├── branches/
96
+ ├── project_map.md
97
+ ├── bugs.md
98
+ ├── decisions.md
99
+ ├── key_facts.md
100
+ ├── issues.md
101
+ └── .project-memory-state.json
102
+ ```
103
+
104
+ Create `docs/project_notes/trunk/` and `docs/project_notes/branches/` as empty directories. Write a `.gitkeep` placeholder to each so they are tracked by git.
105
+
106
+ For each file, use the Read tool to read the template, then use Write to create the target:
107
+
108
+ | Template Source | Target File |
109
+ |----------------|-------------|
110
+ | `references/bugs_template.md` | `docs/project_notes/bugs.md` |
111
+ | `references/decisions_template.md` | `docs/project_notes/decisions.md` |
112
+ | `references/key_facts_template.md` | `docs/project_notes/key_facts.md` |
113
+ | `references/issues_template.md` | `docs/project_notes/issues.md` |
114
+ | `references/project_map_template.md` | `docs/project_notes/project_map.md` |
115
+
116
+ The project map template is a scaffold — compose and design fill it with real content during the workflow.
117
+
118
+ Do NOT create workflow output files (discovery_brief.md, tasks.json, etc.). Those are created by their respective skills.
119
+
120
+ ## STEP 3: CREATE STATE FILE
121
+
122
+ Read `references/state_template.json` and write to `docs/project_notes/.project-memory-state.json`.
123
+
124
+ The state file uses the Enuncia v11 schema:
125
+
126
+ ```json
127
+ {
128
+ "initialized": true,
129
+ "version": "11.0",
130
+ "pipeline": "enuncia",
131
+ "active_context": "trunk",
132
+ "trunk": {
133
+ "status": "none",
134
+ "workflow": {
135
+ "discovery": {
136
+ "started": false,
137
+ "completed": false,
138
+ "completed_at": null
139
+ },
140
+ "compose": {
141
+ "started": false,
142
+ "completed": false,
143
+ "completed_at": null
144
+ },
145
+ "design": {
146
+ "started": false,
147
+ "completed": false,
148
+ "completed_at": null
149
+ },
150
+ "execute": {
151
+ "started": false,
152
+ "completed": false,
153
+ "completed_at": null
154
+ },
155
+ "verify": {
156
+ "started": false,
157
+ "completed": false,
158
+ "completed_at": null
159
+ }
160
+ }
161
+ },
162
+ "branches": {},
163
+ "last_handoff": null,
164
+ "last_handoff_transition": null
165
+ }
166
+ ```
167
+
168
+ ## STEP 4: UPDATE CLAUDE.MD
169
+
170
+ Read `references/claude_template.md` for the Enuncia workflow protocol content.
171
+
172
+ ```
173
+ IF CLAUDE.md does NOT exist:
174
+ → Create CLAUDE.md with the template content
175
+
176
+ IF CLAUDE.md exists BUT has no "Project Workflow and Memory System" section:
177
+ → Append the template content to the end of the file
178
+
179
+ IF CLAUDE.md exists AND already has the section:
180
+ → Skip (do not overwrite)
181
+ ```
182
+
183
+ ## STEP 4.5: CREATE INTUITION.MD
184
+
185
+ Read `references/intuition_readme_template.md` and write to `INTUITION.md` at the project root.
186
+
187
+ ```
188
+ IF INTUITION.md does NOT exist:
189
+ → Create it from template
190
+
191
+ IF INTUITION.md already exists:
192
+ → Skip
193
+ ```
194
+
195
+ ## STEP 5: CREATE CONFIGURATION FILES
196
+
197
+ Auto-create each file if it does not exist. Do NOT ask — just create. If a file already exists, skip it silently.
198
+
199
+ ### 5A: Claude Code Settings
200
+
201
+ - Read `references/settings_template.json`
202
+ - If `.claude/settings.local.json` does not exist: create from template
203
+ - If `.claude/settings.local.json` exists: skip
204
+
205
+ ### 5B: User Profile
206
+
207
+ - Read `references/user_profile_template.json`
208
+ - If `.claude/USER_PROFILE.json` does not exist: create from template
209
+ - If `.claude/USER_PROFILE.json` exists: skip
210
+
211
+ ## STEP 6: REPORT COMPLETION
212
+
213
+ Present a concise summary of what was created vs skipped:
214
+
215
+ ```
216
+ Enuncia pipeline initialized!
217
+
218
+ Created:
219
+ - [list each file that was created]
220
+
221
+ Skipped (already existed):
222
+ - [list each file that was skipped, if any]
223
+
224
+ Next step: Run /intuition-enuncia-discovery to start defining your project,
225
+ or /intuition-enuncia-start to check project status.
226
+ ```
227
+
228
+ ## EDGE CASES
229
+
230
+ - **Partial setup exists**: Check each file individually. Only create missing files.
231
+ - **CLAUDE.md has custom content**: Append the workflow section. Do not replace the entire file.
232
+ - **Git-tracked project**: Memory files in `docs/project_notes/` are safe to commit. Settings in `.claude/` are typically gitignored.
233
+ - **Classic pipeline state exists**: If `.project-memory-state.json` exists with a non-enuncia pipeline, warn the user: "This project has an existing classic pipeline state. Overwriting will reset workflow tracking. Proceed?" Only overwrite if confirmed.
234
+
235
+ ## REFERENCE FILES
236
+
237
+ These template files are in the `references/` directory. Use Read tool to access them:
238
+
239
+ **Memory file templates** (Step 2):
240
+ - `bugs_template.md`, `decisions_template.md`, `key_facts_template.md`, `issues_template.md`, `project_map_template.md`
241
+
242
+ **State template** (Step 3):
243
+ - `state_template.json` — Enuncia v11 workflow state
244
+
245
+ **Framework overview** (Step 4.5):
246
+ - `intuition_readme_template.md`
247
+
248
+ **Configuration templates** (Steps 4-5):
249
+ - `claude_template.md` — Enuncia memory protocols for CLAUDE.md
250
+ - `settings_template.json` — pre-authorized tools for Claude Code
251
+ - `user_profile_template.json` — cross-project user context