@tgoodington/intuition 9.4.0 → 9.5.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.
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "intuition",
3
+ "owner": {
4
+ "name": "Intuition Contributors",
5
+ "email": "tgoodington@users.noreply.github.com"
6
+ },
7
+ "metadata": {
8
+ "description": "Domain-adaptive workflow system for Claude Code with specialist teams and format producers.",
9
+ "version": "9.4.0"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "intuition",
14
+ "source": ".",
15
+ "description": "Domain-adaptive workflow system: prompt, outline, assemble, detail, build, test. 15 skills, 14 domain specialists, 6 format producers.",
16
+ "version": "9.4.0",
17
+ "author": {
18
+ "name": "Intuition Contributors"
19
+ },
20
+ "license": "MIT",
21
+ "keywords": ["workflow", "planning", "execution", "specialists", "producers", "orchestration"],
22
+ "category": "productivity"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "intuition",
3
+ "description": "Domain-adaptive workflow system for Claude Code: prompt, outline, assemble specialist teams, detail with domain experts, build with format producers, test code output. Supports v8 compat and v9 specialist workflows with 14 domain specialists and 6 format producers.",
4
+ "version": "9.4.0",
5
+ "author": {
6
+ "name": "Intuition Contributors"
7
+ },
8
+ "repository": "https://github.com/tgoodington/intuition",
9
+ "license": "MIT",
10
+ "keywords": ["workflow", "planning", "execution", "specialists", "producers", "orchestration"]
11
+ }
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: intuition-code-writer
3
+ description: >
4
+ Trusted code implementer for Intuition workflows. Use when a skill needs files
5
+ written or modified — producing deliverables from blueprints, creating test files,
6
+ implementing fixes. Follows specifications exactly without adding unrequested features.
7
+ model: sonnet
8
+ tools: Read, Write, Edit, Glob, Grep, Bash
9
+ permissionMode: acceptEdits
10
+ maxTurns: 50
11
+ ---
12
+
13
+ You are a senior developer implementing code changes. When given a task:
14
+
15
+ 1. Read the specification or blueprint you are pointed to — from disk, not from the prompt.
16
+ 2. Read existing code to understand project conventions (naming, style, patterns, imports).
17
+ 3. Implement exactly what is specified. Do not add features, refactor surrounding code, or improve things you weren't asked to touch.
18
+ 4. Follow the project's existing patterns for error handling, logging, and testing conventions.
19
+ 5. If the specification is ambiguous, pick the simplest interpretation that satisfies the requirements.
20
+ 6. Report what you created or changed — file paths, function names, key decisions.
21
+
22
+ Do not add comments explaining obvious code. Do not add type annotations the project doesn't use. Do not introduce new dependencies unless the specification requires them. Match the codebase, not your preferences.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: intuition-researcher
3
+ description: >
4
+ Fast read-only codebase explorer for Intuition workflows. Use when a skill needs
5
+ parallel research into project structure, patterns, conventions, test infrastructure,
6
+ or dependency graphs. Returns concise findings with file paths and evidence.
7
+ model: haiku
8
+ tools: Read, Glob, Grep, Bash
9
+ permissionMode: dontAsk
10
+ maxTurns: 30
11
+ ---
12
+
13
+ You are a fast, focused codebase researcher. When given a research task:
14
+
15
+ 1. Use Glob and Grep to locate relevant files efficiently — target searches, don't scan everything.
16
+ 2. Use Read to examine specific files for detail. Read only what you need.
17
+ 3. Use Bash only for commands like `wc -l`, `git log`, or tool version checks — never for file reading.
18
+ 4. Report findings with exact file paths and line numbers.
19
+ 5. Stay under 500 words unless explicitly told otherwise.
20
+
21
+ Be thorough but fast. Prioritize evidence over speculation. If you can't find something, say so — don't guess. Report what exists, not what you think should exist.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: intuition-reviewer
3
+ description: >
4
+ Deliverable reviewer for Intuition workflows. Use when a skill needs quality
5
+ verification — checking produced files against blueprints, reviewing code for
6
+ correctness and security, validating test coverage. Reports PASS or FAIL with evidence.
7
+ model: sonnet
8
+ tools: Read, Glob, Grep, Bash
9
+ permissionMode: dontAsk
10
+ maxTurns: 30
11
+ ---
12
+
13
+ You are a rigorous deliverable reviewer. When given a review task:
14
+
15
+ 1. Read the specification or blueprint you are pointed to — from disk.
16
+ 2. Read the deliverable(s) being reviewed — from disk.
17
+ 3. Check every requirement in the specification against the deliverable. Be systematic.
18
+ 4. For code deliverables, also check:
19
+ - Security: injection risks, exposed secrets, unsafe operations
20
+ - Correctness: logic errors, off-by-one, null handling, edge cases
21
+ - Conventions: does it match the project's existing patterns?
22
+ 5. Report your verdict: **PASS** (all requirements met) or **FAIL** (list specific issues).
23
+
24
+ For each issue found, provide:
25
+ - What is wrong (specific, not vague)
26
+ - Where it is (file path and line number or section)
27
+ - Why it matters (what breaks or what requirement it violates)
28
+
29
+ Do not suggest improvements beyond the specification scope. Do not fail a deliverable for style preferences. Focus on correctness, completeness, and security.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: intuition-synthesizer
3
+ description: >
4
+ Domain analysis and synthesis agent for Intuition workflows. Use when a skill needs
5
+ deep reasoning to combine research findings into structured analysis, produce blueprints
6
+ from exploration data, or synthesize cross-cutting insights from multiple sources.
7
+ model: opus
8
+ tools: Read, Write, Edit, Glob, Grep
9
+ permissionMode: default
10
+ maxTurns: 50
11
+ ---
12
+
13
+ You are a domain expert performing deep analysis and synthesis. When given a task:
14
+
15
+ 1. Read all source materials you are pointed to — research findings, prior analysis, blueprints, specifications.
16
+ 2. Identify patterns, conflicts, gaps, and insights across the sources.
17
+ 3. Produce structured output in the format requested by the calling skill.
18
+ 4. Ground every conclusion in evidence from the source materials. Cite specific files and findings.
19
+ 5. Flag uncertainties explicitly — distinguish between what you know, what you infer, and what you're unsure about.
20
+
21
+ When producing blueprints or specifications:
22
+ - Be precise about interfaces, data flows, and dependencies.
23
+ - Call out assumptions that need validation.
24
+ - Identify edge cases and failure modes.
25
+
26
+ When detecting conflicts or gaps:
27
+ - State exactly what conflicts with what, citing both sources.
28
+ - Assess severity: blocking (must resolve before proceeding) vs advisory (note and continue).
29
+ - Suggest resolution options when the evidence supports them.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tgoodington/intuition",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "description": "Domain-adaptive workflow system for Claude Code: prompt, outline, assemble specialist teams, detail with domain experts, build with format producers, test code output. Supports v8 compat (design, engineer, build) and v9 specialist workflows with 14 domain specialists and 6 format producers.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -23,6 +23,8 @@
23
23
  "test": "node bin/intuition.js help"
24
24
  },
25
25
  "files": [
26
+ ".claude-plugin/",
27
+ "agents/",
26
28
  "bin/",
27
29
  "skills/",
28
30
  "specialists/",
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * Installation script for Intuition skills, specialists, and producers
4
+ * Installation script for Intuition skills, specialists, producers, and agents
5
5
  *
6
6
  * This script is run after `npm install -g @tgoodington/intuition`
7
7
  * It copies skills to ~/.claude/skills/, specialists to ~/.claude/specialists/,
8
- * and producers to ~/.claude/producers/ for global access.
8
+ * producers to ~/.claude/producers/, and agents to ~/.claude/agents/ for global access.
9
9
  */
10
10
 
11
11
  const fs = require('fs');
@@ -77,6 +77,14 @@ const producers = [
77
77
  'data-file-writer'
78
78
  ];
79
79
 
80
+ // Reusable agent definitions (v9.4) — scanned dynamically
81
+ const agentsDir = path.join(__dirname, '..', 'agents');
82
+ const agents = fs.existsSync(agentsDir)
83
+ ? fs.readdirSync(agentsDir).filter(entry =>
84
+ entry.endsWith('.md')
85
+ )
86
+ : [];
87
+
80
88
  // Main installation logic
81
89
  try {
82
90
  const homeDir = os.homedir();
@@ -130,6 +138,14 @@ try {
130
138
  log(`Created ${claudeProducersDir}`);
131
139
  }
132
140
 
141
+ // --- Agents directory (v9.4) ---
142
+ const claudeAgentsDir = path.join(homeDir, '.claude', 'agents');
143
+
144
+ if (!fs.existsSync(claudeAgentsDir)) {
145
+ fs.mkdirSync(claudeAgentsDir, { recursive: true });
146
+ log(`Created ${claudeAgentsDir}`);
147
+ }
148
+
133
149
  // Install each skill
134
150
  skills.forEach(skillName => {
135
151
  const src = path.join(packageRoot, 'skills', skillName);
@@ -175,6 +191,23 @@ try {
175
191
  }
176
192
  });
177
193
 
194
+ // Install each agent definition (flat .md files)
195
+ if (agents.length === 0) {
196
+ log(`No agent definitions found in ${agentsDir} — skipping agent install`);
197
+ }
198
+ agents.forEach(agentFile => {
199
+ const src = path.join(agentsDir, agentFile);
200
+ const dest = path.join(claudeAgentsDir, agentFile);
201
+
202
+ if (fs.existsSync(src)) {
203
+ fs.copyFileSync(src, dest);
204
+ log(`\u2713 Installed ${agentFile} agent to ${dest}`);
205
+ } else {
206
+ error(`${agentFile} agent not found at ${src}`);
207
+ process.exit(1);
208
+ }
209
+ });
210
+
178
211
  // Verify installation
179
212
  const allSkillsInstalled = skills.every(skillName =>
180
213
  fs.existsSync(path.join(claudeSkillsDir, skillName))
@@ -185,8 +218,11 @@ try {
185
218
  const allProducersInstalled = producers.every(name =>
186
219
  fs.existsSync(path.join(claudeProducersDir, name))
187
220
  );
221
+ const allAgentsInstalled = agents.every(name =>
222
+ fs.existsSync(path.join(claudeAgentsDir, name))
223
+ );
188
224
 
189
- if (allSkillsInstalled && allSpecialistsInstalled && allProducersInstalled) {
225
+ if (allSkillsInstalled && allSpecialistsInstalled && allProducersInstalled && allAgentsInstalled) {
190
226
  log(`\u2713 Installation complete!`);
191
227
  log(`Skills are now available globally:`);
192
228
  log(` /intuition-start - Load project context and detect workflow phase`);
@@ -209,6 +245,8 @@ try {
209
245
  specialists.forEach(name => log(` ${name}`));
210
246
  log(`Format producers (${producers.length}):`);
211
247
  producers.forEach(name => log(` ${name}`));
248
+ log(`Reusable agents (${agents.length}):`);
249
+ agents.forEach(name => log(` ${name.replace('.md', '')}`));
212
250
  log(`\nYou can now use these skills in any project with Claude Code.`);
213
251
  } else {
214
252
  error(`Verification failed - not all components properly installed`);
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * Uninstallation script for Intuition skills
4
+ * Uninstallation script for Intuition skills, agents, specialists, and producers
5
5
  *
6
6
  * This script is run before `npm uninstall -g @tgoodington/intuition`
7
- * It removes all Intuition skills from ~/.claude/skills/
7
+ * It removes all Intuition components from ~/.claude/
8
8
  */
9
9
 
10
10
  const fs = require('fs');
@@ -72,6 +72,23 @@ try {
72
72
  }
73
73
  });
74
74
 
75
+ // Remove Intuition agent definitions
76
+ const claudeAgentsDir = path.join(homeDir, '.claude', 'agents');
77
+ const agentsToRemove = [
78
+ 'intuition-researcher.md',
79
+ 'intuition-code-writer.md',
80
+ 'intuition-reviewer.md',
81
+ 'intuition-synthesizer.md'
82
+ ];
83
+
84
+ agentsToRemove.forEach(agentFile => {
85
+ const agentDest = path.join(claudeAgentsDir, agentFile);
86
+ if (fs.existsSync(agentDest)) {
87
+ fs.rmSync(agentDest, { force: true });
88
+ log(`\u2713 Removed ${agentFile} agent from ${agentDest}`);
89
+ }
90
+ });
91
+
75
92
  // Clean up empty .claude/skills directory if it's empty
76
93
  if (fs.existsSync(claudeSkillsDir)) {
77
94
  const remaining = fs.readdirSync(claudeSkillsDir);
@@ -46,7 +46,10 @@ Scan three tiers in priority order. Deduplicate by `name` — first found wins.
46
46
 
47
47
  1. Glob `.claude/specialists/*/*.specialist.md` (project-level)
48
48
  2. Glob `~/.claude/specialists/*/*.specialist.md` (user-level, expand `~` via Bash)
49
- 3. Determine the Intuition package root: run `node -e "console.log(require.resolve('@tgoodington/intuition/package.json'))"` via Bash, extract the directory. Glob `{package_root}/specialists/*/*.specialist.md`.
49
+ 3. Framework-bundled specialists try in order, stop at first success:
50
+ a. **Plugin path**: Glob `${CLAUDE_PLUGIN_ROOT}/specialists/*/*.specialist.md`. If `${CLAUDE_PLUGIN_ROOT}` is empty or the glob returns nothing, fall through.
51
+ b. **npm path**: Run `node -e "console.log(require.resolve('@tgoodington/intuition/package.json'))"` via Bash, extract the directory. Glob `{package_root}/specialists/*/*.specialist.md`.
52
+ c. **Fallback**: Glob `node_modules/@tgoodington/intuition/specialists/*/*.specialist.md` relative to project root.
50
53
 
51
54
  For each profile found: read ONLY the YAML frontmatter using `Read` with `limit: 30` (frontmatter is typically under 25 lines). Extract `name` and `domain_tags`. Do NOT read the full profile body — the Stage 1/2 protocols are not needed for matching. Build a specialists list.
52
55
 
@@ -54,13 +57,14 @@ If zero specialists found after all three tiers, HALT with this message:
54
57
  "No specialist profiles found. Install specialist profiles in one of these locations:
55
58
  - `.claude/specialists/` (project-level)
56
59
  - `~/.claude/specialists/` (user-level)
57
- - Or ensure `@tgoodington/intuition` is installed with its bundled specialists."
60
+ - Install the Intuition plugin: `/plugin install intuition`
61
+ - Or install via npm: `npm install -g @tgoodington/intuition`"
58
62
 
59
63
  ### Step 3: Scan Producer Registry
60
64
 
61
- Same three-tier pattern using `producers/` directories and `*.producer.md` files. Read ONLY the YAML frontmatter using `Read` with `limit: 30`. Extract `name` and `output_formats` from each. Do NOT read the full profile body. Deduplicate by name with same priority (first found wins).
65
+ Same three-tier pattern as Step 2, using `producers/` directories and `*.producer.md` files. Tier 3 uses the same resolution order (plugin path → npm path → fallback). Read ONLY the YAML frontmatter using `Read` with `limit: 30`. Extract `name` and `output_formats` from each. Do NOT read the full profile body. Deduplicate by name with same priority (first found wins).
62
66
 
63
- If zero producers found, HALT with the same pattern message referencing producer directories.
67
+ If zero producers found, HALT with the same pattern message referencing producer directories and install methods.
64
68
 
65
69
  ### Step 4: Team Assembly (Inline Matching)
66
70
 
@@ -319,7 +323,7 @@ Set on root: `last_handoff` → current ISO timestamp, `last_handoff_transition`
319
323
 
320
324
  - **Zero specialists found**: Halt at Step 2 with install instructions.
321
325
  - **Zero producers found**: Halt at Step 3 with install instructions.
322
- - **Package root resolution fails**: Fallback to scanning `node_modules/@tgoodington/intuition/` relative to project root.
326
+ - **Framework-bundled resolution fails**: Tier 3 tries plugin path, then npm resolution, then local node_modules. If all three fail, Tiers 1 and 2 may still have results.
323
327
  - **All tasks unmatched**: Present the full unmatched list at Step 6. If user chooses to create specialists, write the request file and route to agent-advisor. Do not silently skip everything.
324
328
  - **User rejects team**: Allow adjustments, re-present. Do not write anything until approved.
325
329
  - **Prerequisites missing**: Halt with exact install commands. Do not proceed to team confirmation.
@@ -150,7 +150,7 @@ For each task per `team_assignment.json` execution order (parallelize tasks with
150
150
  - User: `~/.claude/producers/{producer-name}/{producer-name}.producer.md`
151
151
  - Framework-shipped: scan the `producers/` directory at the package root
152
152
  4. Construct the delegation prompt using the producer profile as system instructions. Direct the subagent to READ the blueprint from disk (do NOT inject blueprint content into the prompt — this avoids duplicating large files in both parent and subagent contexts). Only include non-test output files in the delegation.
153
- 5. Spawn the producer as a Task subagent using the model declared in the producer profile.
153
+ 5. Spawn the producer as an `intuition-code-writer` agent (or appropriate producer-specific agent if one exists). Use the model declared in the producer profile.
154
154
 
155
155
  **Producer delegation format:**
156
156
  ```
@@ -180,7 +180,7 @@ After producers complete deliverables, execute all three review layers. **Batch
180
180
 
181
181
  1. Identify the specialist that authored the blueprint (from blueprint YAML frontmatter `specialist` field).
182
182
  2. Locate that specialist's profile path in the registry (same scan order as producers: project → user → framework).
183
- 3. Spawn a review subagent with adversarial framing. Use the `reviewer_model` declared in the specialist profile's YAML frontmatter. If this specialist produced multiple deliverables, include ALL of them (up to 3) in a single review subagent.
183
+ 3. Spawn an `intuition-reviewer` agent with adversarial framing. Use the `reviewer_model` declared in the specialist profile's YAML frontmatter. If this specialist produced multiple deliverables, include ALL of them (up to 3) in a single review agent.
184
184
 
185
185
  **Specialist review delegation format:**
186
186
  ```
@@ -224,9 +224,9 @@ Log all deviations (additions and omissions) in the build report's "Deviations f
224
224
  ### Layer 3: Mandatory Cross-Cutting Reviewers
225
225
 
226
226
  1. Check the specialist profile's `mandatory_reviewers` field in its YAML frontmatter.
227
- 2. For EACH mandatory reviewer listed: locate their specialist profile, spawn a review subagent using their `reviewer_model`.
228
- 3. **Security Expert is ALWAYS mandatory** — even if `mandatory_reviewers` is empty. Spawn a Security Expert review for every deliverable that produces code, configuration, or scripts.
229
- 4. **Batch cross-cutting reviews** the same way as Layer 1: include up to 3 deliverables per review subagent. If all code deliverables in the current execution phase share the same cross-cutting reviewer, batch them into one review call.
227
+ 2. For EACH mandatory reviewer listed: locate their specialist profile, spawn an `intuition-reviewer` agent using their `reviewer_model`.
228
+ 3. **Security Expert is ALWAYS mandatory** — even if `mandatory_reviewers` is empty. Spawn a Security Expert `intuition-reviewer` agent for every deliverable that produces code, configuration, or scripts.
229
+ 4. **Batch cross-cutting reviews** the same way as Layer 1: include up to 3 deliverables per review agent. If all code deliverables in the current execution phase share the same cross-cutting reviewer, batch them into one review call.
230
230
 
231
231
  **Cross-cutting review delegation format:**
232
232
  ```