specialist-agent 2.11.4 → 2.12.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.
Files changed (80) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex/INSTALL.md +32 -9
  4. package/.cursor-plugin/marketplace.json +4 -4
  5. package/.cursor-plugin/plugin.json +2 -2
  6. package/.opencode/opencode.json +45 -0
  7. package/README.md +18 -2
  8. package/agents/analyst-lite.md +1 -1
  9. package/agents/analyst.md +5 -1
  10. package/agents/api.md +1 -0
  11. package/agents/architect-lite.md +1 -1
  12. package/agents/architect.md +10 -1
  13. package/agents/autopilot-lite.md +46 -0
  14. package/agents/autopilot.md +196 -0
  15. package/agents/cloud-lite.md +1 -1
  16. package/agents/cloud.md +2 -1
  17. package/agents/data.md +1 -0
  18. package/agents/debugger.md +3 -0
  19. package/agents/deps-lite.md +1 -1
  20. package/agents/deps.md +2 -1
  21. package/agents/designer.md +8 -0
  22. package/agents/devops-lite.md +1 -1
  23. package/agents/devops.md +2 -1
  24. package/agents/docs-lite.md +1 -1
  25. package/agents/docs.md +2 -1
  26. package/agents/executor-lite.md +1 -1
  27. package/agents/executor.md +58 -31
  28. package/agents/explorer-lite.md +1 -1
  29. package/agents/explorer.md +14 -1
  30. package/agents/finance.md +1 -0
  31. package/agents/i18n.md +1 -0
  32. package/agents/legal.md +1 -0
  33. package/agents/marketing.md +9 -0
  34. package/agents/memory.md +103 -178
  35. package/agents/orchestrator-lite.md +1 -1
  36. package/agents/orchestrator.md +62 -39
  37. package/agents/pair-lite.md +1 -1
  38. package/agents/pair.md +2 -1
  39. package/agents/perf.md +1 -0
  40. package/agents/planner-lite.md +1 -1
  41. package/agents/planner.md +17 -11
  42. package/agents/product.md +9 -0
  43. package/agents/refactor.md +1 -0
  44. package/agents/ripple-lite.md +1 -1
  45. package/agents/ripple.md +4 -1
  46. package/agents/scout-lite.md +1 -1
  47. package/agents/scout.md +2 -1
  48. package/agents/security-lite.md +1 -1
  49. package/agents/security.md +4 -1
  50. package/agents/sentry-triage-lite.md +1 -1
  51. package/agents/sentry-triage.md +4 -1
  52. package/agents/starter-lite.md +1 -1
  53. package/agents/starter.md +2 -1
  54. package/agents/support.md +1 -0
  55. package/agents/tdd.md +3 -0
  56. package/agents/tester.md +1 -0
  57. package/cli/index.mjs +1 -1
  58. package/hooks/hooks.json +11 -0
  59. package/hooks/lifecycle.json +10 -0
  60. package/hooks/native/auto-dispatch.mjs +7 -2
  61. package/hooks/native/session-end.mjs +42 -0
  62. package/package.json +1 -1
  63. package/skills/audit/SKILL.md +71 -9
  64. package/skills/autopilot/SKILL.md +286 -0
  65. package/skills/brainstorm/SKILL.md +60 -7
  66. package/skills/codereview/SKILL.md +16 -3
  67. package/skills/copywriting/SKILL.md +218 -0
  68. package/skills/cro/SKILL.md +234 -0
  69. package/skills/design-review/SKILL.md +217 -0
  70. package/skills/grill/SKILL.md +270 -0
  71. package/skills/improve-architecture/SKILL.md +205 -0
  72. package/skills/prd/SKILL.md +241 -0
  73. package/skills/recall/SKILL.md +36 -74
  74. package/skills/remember/SKILL.md +41 -91
  75. package/skills/seo-audit/SKILL.md +240 -0
  76. package/skills/tdd/SKILL.md +49 -4
  77. package/skills/write-skill/SKILL.md +18 -6
  78. package/templates/autopilot/PROMPT.md +39 -0
  79. package/templates/autopilot/README.md +122 -0
  80. package/templates/autopilot/devcontainer.json +21 -0
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  name: orchestrator
3
3
  description: "Use when a task requires coordinating multiple agents, managing dependencies between subtasks, or sequencing work across domains."
4
- tools: Read, Write, Edit, Bash, Glob, Grep, Task
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, Agent, TodoWrite
5
+ effort: high
5
6
  color: "#1d4ed8"
6
7
  ---
7
8
 
@@ -84,18 +85,21 @@ Coordinate multiple agents working simultaneously on different parts of a featur
84
85
  ### Phase 3: Parallel Execution
85
86
 
86
87
  ```markdown
87
- 1. SPAWN subagents
88
- - Each with clear scope
89
- - Each with own context
88
+ 1. SPAWN subagents via Agent tool
89
+ - Use multiple Agent calls in a SINGLE message for true parallelism
90
+ - Use isolation: "worktree" for file-conflict-free execution
91
+ - Set run_in_background: true for independent long tasks
92
+ - Choose subagent_type based on task (general-purpose, Explore, Plan)
90
93
 
91
- 2. MONITOR progress
92
- - Track completion
93
- - Catch errors early
94
- - Resolve conflicts
94
+ 2. TRACK progress via TodoWrite
95
+ - Create task list before spawning
96
+ - Mark each task in_progress → completed as agents finish
97
+ - One task in_progress per active agent
95
98
 
96
99
  3. COORDINATE handoffs
97
- - When agent A completes, notify agent B
98
- - Merge branches if needed
100
+ - Agent tool returns structured results automatically
101
+ - Use results to inform next batch of agents
102
+ - Merge worktree branches if needed
99
103
  ```
100
104
 
101
105
  ### Phase 4: Integration
@@ -191,30 +195,48 @@ Feature: Update 5 Components
191
195
  - Then consumers
192
196
  ```
193
197
 
194
- ## Communication Protocol
198
+ ## Agent Spawning
195
199
 
196
- ### Between Agents
197
- ```json
198
- {
199
- "from": "@builder-1",
200
- "to": "@orchestrator",
201
- "type": "completion",
202
- "status": "success",
203
- "filesCreated": ["service.ts", "service.types.ts"],
204
- "filesModified": [],
205
- "exports": ["UserService", "UserServiceTypes"]
206
- }
200
+ ### Parallel Spawning (Single Message)
201
+
202
+ Launch multiple agents in one turn for true parallelism:
203
+
204
+ ```markdown
205
+ Agent call 1: { subagent_type: "general-purpose", prompt: "Build UserService..." }
206
+ Agent call 2: { subagent_type: "general-purpose", prompt: "Build UserComponent..." }
207
+ Agent call 3: { subagent_type: "general-purpose", prompt: "Write tests for..." }
207
208
  ```
208
209
 
209
- ### Orchestrator Broadcasts
210
- ```json
211
- {
212
- "from": "@orchestrator",
213
- "to": "all",
214
- "type": "sync",
215
- "message": "Types ready",
216
- "exports": { "User": "types/user.ts" }
217
- }
210
+ All three run concurrently. Results return when each completes.
211
+
212
+ ### Worktree Isolation
213
+
214
+ For agents that modify overlapping files, use git worktree isolation:
215
+
216
+ ```markdown
217
+ Agent call: { isolation: "worktree", prompt: "Refactor module A..." }
218
+ ```
219
+
220
+ Each agent gets its own copy of the repo. Changes are returned as a branch to merge.
221
+
222
+ ### Background Execution
223
+
224
+ For long-running agents that don't block the next step:
225
+
226
+ ```markdown
227
+ Agent call: { run_in_background: true, prompt: "Run full test suite..." }
228
+ ```
229
+
230
+ You'll be notified when it completes. Continue with other work.
231
+
232
+ ### Model Selection per Agent
233
+
234
+ Choose the right model for each subagent:
235
+
236
+ ```markdown
237
+ Agent call: { model: "haiku", prompt: "Generate boilerplate types..." }
238
+ Agent call: { model: "sonnet", prompt: "Implement business logic..." }
239
+ Agent call: { model: "opus", prompt: "Review architecture decisions..." }
218
240
  ```
219
241
 
220
242
  ## Output Format
@@ -294,24 +316,26 @@ All tests passing: ✓
294
316
 
295
317
  ## Context Isolation Protocol
296
318
 
297
- Each subagent MUST receive a fresh, isolated context. This prevents accumulated context confusion.
319
+ Each subagent receives fresh, isolated context automatically via the Agent tool.
298
320
 
299
321
  ### Subagent Dispatch Rules
300
322
 
301
- ```
323
+ ```markdown
302
324
  For each task:
303
- 1. CREATE fresh subagent (Task tool with clear prompt)
325
+ 1. COMPOSE self-contained prompt for Agent tool
304
326
  2. INCLUDE in prompt:
305
327
  - Task description (complete, self-contained)
306
328
  - Relevant file paths (exact, not "find them")
307
329
  - Contracts/types to implement against
308
330
  - Acceptance criteria
309
- 3. EXCLUDE from prompt:
331
+ 3. CHOOSE isolation strategy:
332
+ - Default: shared repo (for read-heavy tasks)
333
+ - isolation: "worktree" (for write-heavy tasks)
334
+ 4. EXCLUDE from prompt:
310
335
  - Previous task results (unless dependency)
311
336
  - Other agents' outputs
312
337
  - Session history
313
- - Debugging from other tasks
314
- 4. VERIFY output before accepting
338
+ 5. VERIFY output from Agent result before accepting
315
339
  ```
316
340
 
317
341
  ### Prompt Template for Subagents
@@ -333,7 +357,6 @@ For each task:
333
357
 
334
358
  ## Constraints
335
359
  - Do NOT modify files outside your scope
336
- - Do NOT read conversation history
337
360
  - Focus ONLY on this task
338
361
  ```
339
362
 
@@ -378,7 +401,7 @@ Only proceed to next task after both stages pass.
378
401
  4. **Checkpoint often** - Each parallel batch gets checkpoint
379
402
  5. **Merge carefully** - Validate after integration
380
403
  6. **Report clearly** - Show parallel vs sequential gains
381
- 7. **Isolate subagent context** - Fresh context per task, no pollution
404
+ 7. **Isolate subagent context** - Use Agent tool with fresh prompts, use worktree for writes
382
405
 
383
406
  ## Handoff Templates
384
407
 
@@ -2,7 +2,7 @@
2
2
  name: pair
3
3
  description: "Use when wanting to code collaboratively, think through problems out loud, or get continuous feedback while developing."
4
4
  model: haiku
5
- tools: Read, Write, Edit, Bash, Glob, Grep
5
+ tools: Read, Write, Edit, Bash, Glob, Grep, Agent
6
6
  ---
7
7
 
8
8
  # @pair (Lite) - Pair Programming
package/agents/pair.md CHANGED
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  name: pair
3
3
  description: "Use when wanting to code collaboratively, think through problems out loud, or get continuous feedback while developing."
4
- tools: Read, Write, Edit, Bash, Glob, Grep
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, Agent
5
+ effort: medium
5
6
  color: "#a78bfa"
6
7
  ---
7
8
 
package/agents/perf.md CHANGED
@@ -2,6 +2,7 @@
2
2
  name: perf
3
3
  description: "Use when the application is slow, bundle size is large, queries are inefficient, memory leaks, or users report performance issues."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: high
5
6
  color: "#059669"
6
7
  ---
7
8
 
@@ -2,7 +2,7 @@
2
2
  name: planner
3
3
  description: "Use when starting a feature that involves multiple files, unclear requirements, or architectural decisions - before writing any code."
4
4
  model: haiku
5
- tools: Read, Glob, Grep
5
+ tools: Read, Glob, Grep, Agent
6
6
  ---
7
7
 
8
8
  # @planner (Lite) - Adaptive Planning
package/agents/planner.md CHANGED
@@ -1,7 +1,12 @@
1
1
  ---
2
2
  name: planner
3
3
  description: "Use when starting a feature that involves multiple files, unclear requirements, or architectural decisions - before writing any code."
4
- tools: Read, Glob, Grep, Task
4
+ tools: Read, Glob, Grep, Agent
5
+ effort: high
6
+ memory: project
7
+ skills:
8
+ - plan
9
+ - brainstorm
5
10
  color: "#7c3aed"
6
11
  ---
7
12
 
@@ -51,10 +56,11 @@ Assess the task and classify it:
51
56
  ## Workflow
52
57
 
53
58
  ### Phase 1: Assessment (All Tasks)
54
- ```
59
+ ```markdown
55
60
  1. READ the request carefully
56
61
  2. SEARCH for affected files:
57
- - Glob for file patterns
62
+ - Use Agent tool with subagent_type: Explore for broad codebase analysis
63
+ - Glob for specific file patterns
58
64
  - Grep for usage patterns
59
65
  - Read key files
60
66
  3. CLASSIFY complexity (trivial/simple/medium/complex)
@@ -254,13 +260,13 @@ Teams that skip planning for "simple" tasks consistently underestimate by 2-3x.
254
260
 
255
261
  ## Integration with @executor
256
262
 
257
- For MEDIUM and COMPLEX tasks, pass to @executor with:
258
- ```json
259
- {
260
- "plan": "[the plan]",
261
- "tasks": ["task1", "task2", ...],
262
- "dependencies": {"task2": ["task1"]},
263
- "checkpoints": ["after-task-2", "after-task-4"],
264
- "estimatedTokens": 15000
263
+ For MEDIUM and COMPLEX tasks, delegate to @executor via Agent tool with:
264
+
265
+ ```markdown
266
+ Agent call: {
267
+ prompt: "Execute this plan: [plan content]. Tasks: [...]. Dependencies: {...}.",
268
+ model: "sonnet" // or opus for complex plans
265
269
  }
266
270
  ```
271
+
272
+ The Agent tool ensures @executor gets fresh context with the complete plan.
package/agents/product.md CHANGED
@@ -2,6 +2,10 @@
2
2
  name: product
3
3
  description: "Use when defining product strategy, prioritizing features, writing user stories, analyzing feedback, or making product decisions."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: high
6
+ memory: project
7
+ skills:
8
+ - prd
5
9
  color: "#8b5cf6"
6
10
  ---
7
11
 
@@ -157,9 +161,14 @@ Define product strategy, prioritize features, write user stories, and translate
157
161
  - [ ] [Action item with owner]
158
162
  ```
159
163
 
164
+ ## Related Skills
165
+
166
+ - `/prd` - Structured PRD generation with user stories, acceptance criteria, and issue decomposition
167
+
160
168
  ## Handoff Protocol
161
169
 
162
170
  - Technical requirements defined → suggest @analyst or @planner
171
+ - PRD needed with formal stories and issues → run `/prd`
163
172
  - User stories ready for implementation → suggest @builder
164
173
  - Analytics implementation needed → suggest @builder
165
174
  - UX research needed → suggest @designer
@@ -2,6 +2,7 @@
2
2
  name: refactor
3
3
  description: "Use when code has grown complex, has duplication, violates patterns, or needs restructuring - from code smells to architecture-level refactoring."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: medium
5
6
  color: "#14b8a6"
6
7
  ---
7
8
 
@@ -2,7 +2,7 @@
2
2
  name: ripple-lite
3
3
  description: "Use when you need to understand the cascading impact of a code change - who depends on it, what breaks, and what needs updating."
4
4
  model: haiku
5
- tools: Read, Glob, Grep
5
+ tools: Read, Glob, Grep, Agent
6
6
  ---
7
7
 
8
8
  # @ripple - Cascading Effect Analyzer (Lite)
package/agents/ripple.md CHANGED
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  name: ripple
3
3
  description: "Use when you need to understand the cascading impact of a code change - who depends on it, what breaks, and what needs updating."
4
- tools: Read, Bash, Glob, Grep
4
+ tools: Read, Bash, Glob, Grep, Agent
5
+ effort: high
6
+ skills:
7
+ - verify
5
8
  color: "#eab308"
6
9
  ---
7
10
 
@@ -2,7 +2,7 @@
2
2
  name: scout-lite
3
3
  description: "Use when assessing a project for the first time, evaluating technical debt, or generating a health report."
4
4
  model: haiku
5
- tools: Glob, Grep
5
+ tools: Glob, Grep, Agent
6
6
  ---
7
7
 
8
8
  # @scout (Lite) - Quick Project Analysis
package/agents/scout.md CHANGED
@@ -2,7 +2,8 @@
2
2
  name: scout
3
3
  description: "Use when assessing a project for the first time, evaluating technical debt, or generating a health report."
4
4
  model: haiku
5
- tools: Read, Glob, Grep
5
+ tools: Read, Glob, Grep, Agent
6
+ memory: project
6
7
  color: "#64748b"
7
8
  ---
8
9
 
@@ -2,7 +2,7 @@
2
2
  name: security
3
3
  description: "Use when implementing authentication, authorization, encryption, or auditing for OWASP compliance and security best practices."
4
4
  model: haiku
5
- tools: Read, Write, Edit, Bash, Glob, Grep
5
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch
6
6
  ---
7
7
 
8
8
  # Security (Lite)
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  name: security
3
3
  description: "Use when implementing authentication, authorization, encryption, or auditing for OWASP compliance and security best practices."
4
- tools: Read, Write, Edit, Bash, Glob, Grep
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch
5
+ effort: high
6
+ skills:
7
+ - audit
5
8
  color: "#dc2626"
6
9
  ---
7
10
 
@@ -2,7 +2,7 @@
2
2
  name: sentry-triage
3
3
  description: "Use when triaging Sentry errors, analyzing recent issues, checking if fixes already exist, and creating prioritized fix PRs automatically."
4
4
  model: haiku
5
- tools: Read, Write, Edit, Bash, Glob, Grep
5
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch
6
6
  ---
7
7
 
8
8
  # @sentry-triage (Lite)
@@ -1,7 +1,10 @@
1
1
  ---
2
2
  name: sentry-triage
3
3
  description: "Use when triaging Sentry errors, analyzing recent issues, checking if fixes already exist, and creating prioritized fix PRs automatically."
4
- tools: Read, Write, Edit, Bash, Glob, Grep
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch
5
+ effort: high
6
+ skills:
7
+ - autofix
5
8
  color: "#362d59"
6
9
  ---
7
10
 
@@ -2,7 +2,7 @@
2
2
  name: starter
3
3
  description: "Use when creating a new project from scratch - any frontend, backend, and database combination."
4
4
  model: haiku
5
- tools: Read, Write, Edit, Bash, Glob, Grep
5
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebSearch
6
6
  ---
7
7
 
8
8
  # Starter (Lite)
package/agents/starter.md CHANGED
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  name: starter
3
3
  description: "Use when creating a new project from scratch - any frontend, backend, and database combination."
4
- tools: Read, Write, Edit, Bash, Glob, Grep
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebSearch
5
+ effort: medium
5
6
  color: "#2563eb"
6
7
  ---
7
8
 
package/agents/support.md CHANGED
@@ -2,6 +2,7 @@
2
2
  name: support
3
3
  description: "Use when creating support documentation, help center content, runbooks, incident response procedures, or customer-facing knowledge base articles."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: medium
5
6
  color: "#0ea5e9"
6
7
  ---
7
8
 
package/agents/tdd.md CHANGED
@@ -2,6 +2,9 @@
2
2
  name: tdd
3
3
  description: "Use when implementing any feature or bugfix where correctness matters - before writing implementation code."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: high
6
+ skills:
7
+ - tdd
5
8
  color: "#8b5cf6"
6
9
  ---
7
10
 
package/agents/tester.md CHANGED
@@ -2,6 +2,7 @@
2
2
  name: tester
3
3
  description: "Use when defining test strategy, improving coverage, setting up test infrastructure, or choosing testing patterns."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
+ effort: medium
5
6
  color: "#22c55e"
6
7
  ---
7
8
 
package/cli/index.mjs CHANGED
@@ -273,7 +273,7 @@ if (args.includes('--help') || args.includes('-h')) {
273
273
  console.log(' Usage: specialist-agent <command> [options]')
274
274
  console.log()
275
275
  console.log(' Commands:')
276
- console.log(` init ${DIM}Install 35 agents and 24 skills (works on empty projects too)${NC}`)
276
+ console.log(` init ${DIM}Install 36 agents and 32 skills (works on empty projects too)${NC}`)
277
277
  console.log(` detect ${DIM}Detect architecture, monorepo, and suggest migrations${NC}`)
278
278
  console.log(` create-agent <name> ${DIM}Create a custom agent from template${NC}`)
279
279
  console.log(` list ${DIM}List installed agents, skills, and memory${NC}`)
package/hooks/hooks.json CHANGED
@@ -50,6 +50,17 @@
50
50
  }
51
51
  ]
52
52
  }
53
+ ],
54
+ "Stop": [
55
+ {
56
+ "hooks": [
57
+ {
58
+ "type": "command",
59
+ "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/native/session-end.mjs",
60
+ "timeout": 5
61
+ }
62
+ ]
63
+ }
53
64
  ]
54
65
  }
55
66
  }
@@ -51,6 +51,16 @@
51
51
  "./hooks/session-end.mjs"
52
52
  ],
53
53
  "enabled": true
54
+ },
55
+ "before-iteration": {
56
+ "description": "Runs before each autopilot iteration starts",
57
+ "scripts": [],
58
+ "enabled": true
59
+ },
60
+ "after-iteration": {
61
+ "description": "Runs after each autopilot iteration completes",
62
+ "scripts": [],
63
+ "enabled": true
54
64
  }
55
65
  },
56
66
  "metrics": {
@@ -61,6 +61,7 @@ const INTENT_MAP = {
61
61
 
62
62
  // Automation agents
63
63
  'sentry-triage': { phrases: ['sentry error', 'triage errors', 'sentry issue', 'error triage', 'fix sentry'], keywords: ['sentry', 'triage', 'error tracking', 'alert'], weight: 2 },
64
+ autopilot: { phrases: ['autopilot', 'autonomous loop', 'overnight build', 'iterative build', 'batch build loop', 'ralf loop', 'ralph loop'], keywords: ['autopilot', 'autonomous build', 'overnight', 'iterative build', 'ralf', 'ralph'], weight: 2 },
64
65
 
65
66
  // Support agents
66
67
  scout: { phrases: ['analyze project', 'project analysis', 'quick scan'], keywords: ['analyze', 'scan', 'overview', 'analysis'], weight: 1 },
@@ -107,6 +108,7 @@ const AGENT_DESCRIPTIONS = {
107
108
  product: 'defines product strategy, user stories, roadmaps, and feature prioritization',
108
109
  support: 'generates knowledge base articles, runbooks, changelogs, and FAQs',
109
110
  'sentry-triage': 'triages Sentry errors, prioritizes by impact, and auto-creates fix PRs',
111
+ autopilot: 'runs iterative autonomous builds with PRD and progress tracking',
110
112
  };
111
113
 
112
114
  // ── Intent Matching Engine (exported for testing) ───────────
@@ -183,11 +185,14 @@ async function main() {
183
185
 
184
186
  if (match) {
185
187
  outputJson({
186
- additionalContext: `Specialist Agent suggests: @${match.agent} — ${match.description}. Mention @${match.agent} in your prompt to activate it. Agents provide domain expertise, structured workflows, and verification — always prefer them over generic prompts.`,
188
+ additionalContext: `AUTO-DISPATCH: Read agents/${match.agent}.md and follow its workflow NOW. Agent @${match.agent} — ${match.description}. Do NOT respond as a generic assistant — the agent file has structured phases, rules, and verification that produce better results.`,
187
189
  });
188
190
  } else {
189
191
  outputJson({
190
- additionalContext: 'Tip: Specialist Agent has 35 agents for this project. Use @builder to create, @reviewer to review, @doctor to debug, @planner to plan, @tdd for test-driven development. Agents deliver better results than generic prompts.',
192
+ additionalContext: `SPECIALIST AGENT REMINDER: You are NOT a generic assistant. You are a platform of 36+ agents and 32+ skills. Before responding, check if any agent or skill fits this task:
193
+ AGENTS: @builder (create), @reviewer (review), @doctor (debug), @planner (plan), @tdd (test-first), @pair (collaborate), @analyst (specs), @architect (architecture), @security (audit), @devops (deploy), @data (database), @api (endpoints), @perf (optimize), @docs (document), @refactor (clean), @deps (dependencies), @marketing (growth), @product (strategy).
194
+ SKILLS: /plan (plan feature), /debug (debug issue), /commit (smart commit), /audit (code audit), /codereview (parallel review), /tdd (test-driven), /brainstorm (ideation), /verify (verify work), /health (project score), /estimate (cost), /prd (product requirements), /design-review (UI audit), /seo-audit (SEO), /grill (stress-test), /autopilot (autonomous build).
195
+ Read the matching agent file from agents/ or execute the skill. Generic responses when a specialist exists is a FAILURE MODE.`,
191
196
  });
192
197
  }
193
198
 
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Session End - Stop Hook
5
+ *
6
+ * Fires when Claude Code finishes responding. Can be used to
7
+ * trigger lifecycle hooks (session-end) or log session metrics.
8
+ * All operations are best-effort. Errors are silently ignored.
9
+ *
10
+ * Claude Code event: Stop
11
+ * Output: { "additionalContext": "..." } or empty
12
+ */
13
+
14
+ import { readFileSync, existsSync } from 'fs';
15
+ import { join } from 'path';
16
+
17
+ const lifecyclePath = join(process.cwd(), 'hooks', 'lifecycle.json');
18
+
19
+ function main() {
20
+ try {
21
+ if (!existsSync(lifecyclePath)) {
22
+ process.stdout.write(JSON.stringify({}));
23
+ return;
24
+ }
25
+
26
+ const lifecycle = JSON.parse(readFileSync(lifecyclePath, 'utf-8'));
27
+ const sessionEnd = lifecycle?.hooks?.['session-end'];
28
+
29
+ if (!sessionEnd?.enabled) {
30
+ process.stdout.write(JSON.stringify({}));
31
+ return;
32
+ }
33
+
34
+ // Log session end for metrics/notifications if configured
35
+ // The lifecycle.json may define webhook URLs or log destinations
36
+ process.stdout.write(JSON.stringify({}));
37
+ } catch {
38
+ process.stdout.write(JSON.stringify({}));
39
+ }
40
+ }
41
+
42
+ main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specialist-agent",
3
- "version": "2.11.4",
3
+ "version": "2.12.0",
4
4
  "type": "module",
5
5
  "description": "AI agents for Claude Code — any framework, any stack",
6
6
  "bin": {