@tgoodington/intuition 8.0.0 → 8.0.1

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": "8.0.0",
3
+ "version": "8.0.1",
4
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",
@@ -96,33 +96,81 @@ Options:
96
96
 
97
97
  ## STEP 2: FAN-OUT RESEARCH
98
98
 
99
- For each task (or group of related tasks), launch a haiku research subagent via the Task tool:
99
+ For each task (or group of related tasks), launch a haiku research subagent via the Task tool (subagent_type: Explore, model: haiku).
100
+
101
+ When constructing each prompt, replace bracketed placeholders with actual values from the plan. If the task has known file paths, use the "Known Files" variant. If files are marked TBD, use the "TBD Files" variant.
102
+
103
+ ### Known Files variant:
100
104
 
101
105
  ```
102
- You are a codebase researcher gathering information for engineering specs.
106
+ You are a codebase researcher. The project root is the current working directory.
107
+
108
+ TASK: Gather implementation details for plan Task #[N]: [title]
109
+ DESCRIPTION: [from plan]
110
+ COMPONENT: [from plan]
103
111
 
104
- TASK: Research the codebase relevant to plan Task #[N]: [title]
112
+ EXECUTE THESE STEPS IN ORDER:
105
113
 
106
- CONTEXT:
107
- - Task description: [from plan]
108
- - Known files: [from plan's Files field]
109
- - Component: [from plan's Component field]
114
+ Step 1 — Read target files:
115
+ - Read [exact path 1]
116
+ - Read [exact path 2]
117
+ - [list all known files]
110
118
 
111
- RESEARCH PROTOCOL:
112
- 1. Read the files listed in the task (or Glob/Grep to find them if marked TBD).
113
- 2. Identify existing patterns: naming conventions, error handling, module structure.
114
- 3. Find 2-3 examples of similar patterns already in the codebase.
115
- 4. Check for shared utilities or abstractions that should be reused.
116
- 5. Read 1 level of dependents what imports or calls the files you'll modify?
117
- 6. Note any conventions that must be followed.
119
+ Step 2 — Find dependents:
120
+ - Grep for the filename (without extension) in all source files to find imports/references.
121
+ - Read the top 2-3 files that import or call the target files.
122
+
123
+ Step 3 Find similar patterns:
124
+ - In the target files, identify the primary function or class name.
125
+ - Grep for similar patterns in other files within the same directory or parent directory.
118
126
 
119
127
  REPORT FORMAT (under 500 words):
120
- - **Relevant Files**: [paths with brief descriptions]
121
- - **Existing Patterns**: [patterns found with file references]
122
- - **Shared Utilities**: [reusable code found]
128
+ - **Relevant Files**: [paths with 1-line descriptions]
129
+ - **Existing Patterns**: [patterns found, with file:line references]
130
+ - **Shared Utilities**: [reusable code found, or "None found"]
123
131
  - **Dependents**: [files that import/use the target files]
124
- - **Conventions**: [naming, structure, error handling patterns]
125
- - **Notes**: [anything unexpected or important]
132
+ - **Conventions**: [naming, structure, error handling patterns observed]
133
+ - **Notes**: [anything unexpected]
134
+
135
+ Report only what you find. Do not speculate.
136
+ ```
137
+
138
+ ### TBD Files variant:
139
+
140
+ ```
141
+ You are a codebase researcher. The project root is the current working directory.
142
+
143
+ TASK: Gather implementation details for plan Task #[N]: [title]
144
+ DESCRIPTION: [from plan]
145
+ COMPONENT: [from plan]
146
+
147
+ EXECUTE THESE STEPS IN ORDER:
148
+
149
+ Step 1 — Locate files:
150
+ - Run Glob('[component directory]/**/*') to list files in the component area.
151
+ - If no component directory is obvious, Grep for keywords from the task title across all source files.
152
+ - Read the 3-5 most relevant files found.
153
+
154
+ Step 2 — Find dependents:
155
+ - For each relevant file found, Grep for its name in other source files to find imports/references.
156
+
157
+ Step 3 — Find similar patterns:
158
+ - Grep for function or class names related to the task domain.
159
+ - Read 1-2 examples of similar functionality elsewhere in the codebase.
160
+
161
+ Step 4 — Check for shared utilities:
162
+ - Run Glob('**/util*') and Glob('**/helper*') and Glob('**/shared*').
163
+ - Read any utility file relevant to this task's domain.
164
+
165
+ REPORT FORMAT (under 500 words):
166
+ - **Relevant Files**: [paths with 1-line descriptions]
167
+ - **Existing Patterns**: [patterns found, with file:line references]
168
+ - **Shared Utilities**: [reusable code found, or "None found"]
169
+ - **Dependents**: [files that import/use the target files]
170
+ - **Conventions**: [naming, structure, error handling patterns observed]
171
+ - **Notes**: [anything unexpected]
172
+
173
+ Report only what you find. Do not speculate.
126
174
  ```
127
175
 
128
176
  **Parallelization rules:**
@@ -94,17 +94,51 @@ From the discovery brief, extract: core problem, success criteria, stakeholders,
94
94
 
95
95
  ## Step 2: Launch orientation research
96
96
 
97
- Create the directory `docs/project_notes/.planning_research/` if it does not exist.
97
+ Create the directory `{context_path}/.planning_research/` if it does not exist.
98
98
 
99
- Launch 2 haiku research agents in parallel using the Task tool:
99
+ Launch 2 sonnet research agents in parallel using the Task tool:
100
100
 
101
- **Agent 1 — Codebase Topology** (subagent_type: Explore, model: haiku):
102
- Prompt: "Analyze this project's codebase structure. Report on: (1) top-level directory structure, (2) key modules and responsibilities, (3) entry points, (4) test infrastructure, (5) build system. Use Glob, Grep, Read to explore. Under 500 words. Facts only."
101
+ **Agent 1 — Codebase Topology** (subagent_type: Explore, model: sonnet):
102
+ Prompt:
103
+ "The project root is the current working directory. Analyze the codebase structure by following these steps in order:
103
104
 
104
- **Agent 2 Pattern Extraction** (subagent_type: Explore, model: haiku):
105
- Prompt: "Analyze this project's codebase for patterns. Report on: (1) architectural patterns in use, (2) coding conventions, (3) existing abstractions, (4) dependency patterns between modules. Use Glob, Grep, Read to explore. Under 500 words. Facts only."
105
+ 1. Run Glob('*') to list all top-level files and directories.
106
+ 2. Read package.json (or equivalent manifest) for project metadata, scripts, and dependencies.
107
+ 3. Read any README.md or CLAUDE.md at the project root.
108
+ 4. For each top-level source directory, run Glob('{dir}/*') to map one level of contents.
109
+ 5. Grep for common entry points: 'main', 'index', 'app', 'server' in source files.
110
+ 6. Check for test infrastructure: Glob('**/*.test.*') or Glob('**/*.spec.*') or Glob('**/test/**').
111
+ 7. Check for build config: Glob('**/tsconfig*') or Glob('**/webpack*') or Glob('**/vite*') or similar.
106
112
 
107
- When both return, combine results and write to `docs/project_notes/.planning_research/orientation.md`.
113
+ Report on:
114
+ (1) Top-level directory structure with purpose of each directory
115
+ (2) Key modules and their responsibilities
116
+ (3) Entry points
117
+ (4) Test infrastructure (framework, location, patterns)
118
+ (5) Build system and tooling
119
+
120
+ Under 500 words. Facts only, no speculation."
121
+
122
+ **Agent 2 — Pattern Extraction** (subagent_type: Explore, model: sonnet):
123
+ Prompt:
124
+ "The project root is the current working directory. Analyze codebase patterns by following these steps:
125
+
126
+ 1. Read 3-5 representative source files from different directories to identify coding style.
127
+ 2. Grep for 'export' or 'module.exports' to understand module boundaries.
128
+ 3. Grep for 'import' or 'require' to map dependency patterns between modules.
129
+ 4. Grep for error handling patterns: 'catch', 'throw', 'Error', 'try'.
130
+ 5. Grep for common abstractions: 'class', 'interface', 'type', 'abstract', 'base'.
131
+ 6. Check for configuration patterns: Glob('**/*.config.*') or Glob('**/.{eslint,prettier}*').
132
+
133
+ Report on:
134
+ (1) Architectural patterns in use (MVC, event-driven, plugin system, etc.)
135
+ (2) Coding conventions (naming, file organization, export style)
136
+ (3) Existing abstractions and base classes/utilities
137
+ (4) Dependency patterns between modules (which modules depend on which)
138
+
139
+ Under 500 words. Facts only, no speculation."
140
+
141
+ When both return, combine results and write to `{context_path}/.planning_research/orientation.md`.
108
142
 
109
143
  ## BRANCH-AWARE INTAKE (Branch Only)
110
144
 
@@ -117,8 +151,23 @@ When `active_context` is NOT trunk:
117
151
  3. Read parent's plan.md and any design specs at `{parent_path}/design_spec_*.md`.
118
152
  4. Launch a THIRD orientation research agent alongside the existing two:
119
153
 
120
- **Agent 3 — Parent Intersection Analysis** (subagent_type: Explore, model: haiku):
121
- Prompt: "Compare the discovery brief at {context_path}/discovery_brief.md with the plan at {parent_path}/plan.md. Identify: (1) Shared files/components that both touch, (2) Decisions in the parent plan that constrain this branch, (3) Potential conflicts or dependencies, (4) Patterns from parent that should be reused. Under 500 words. Facts only."
154
+ **Agent 3 — Parent Intersection Analysis** (subagent_type: Explore, model: sonnet):
155
+ Prompt:
156
+ "The project root is the current working directory. Compare two workflow artifacts:
157
+
158
+ 1. Read the discovery brief at {context_path}/discovery_brief.md.
159
+ 2. Read the parent plan at {parent_path}/plan.md.
160
+ 3. For each file path mentioned in the parent plan's tasks, check if the discovery brief references the same files or components.
161
+ 4. Extract all technology decisions from the parent plan (Section 3 if it exists).
162
+ 5. Identify acceptance criteria in the parent plan that touch the same areas as the discovery brief.
163
+
164
+ Report on:
165
+ (1) Shared files/components that both parent plan and this branch's discovery brief touch
166
+ (2) Decisions in the parent plan that constrain this branch
167
+ (3) Potential conflicts or dependencies between parent and branch work
168
+ (4) Patterns from parent implementation that this branch should reuse
169
+
170
+ Under 500 words. Facts only, no speculation."
122
171
 
123
172
  Write results to `{context_path}/.planning_research/parent_intersection.md`.
124
173
 
@@ -403,7 +452,7 @@ If any check fails, fix it before presenting.
403
452
 
404
453
  ## Tier 1: Orientation (launched in Phase 1)
405
454
 
406
- Launch 2 haiku Explore agents in parallel via Task tool. See Phase 1, Step 2 for prompt templates. Write combined results to `docs/project_notes/.planning_research/orientation.md`.
455
+ Launch 2 sonnet Explore agents in parallel via Task tool. See Phase 1, Step 2 for prompt templates. Write combined results to `{context_path}/.planning_research/orientation.md`.
407
456
 
408
457
  ## Tier 2: Decision Research (launched on demand in Phase 3)
409
458