claude-all-hands 1.0.1 → 1.0.3

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 (170) hide show
  1. package/.claude/agents/code-simplifier.md +52 -0
  2. package/.claude/agents/curator.md +186 -246
  3. package/.claude/agents/documentation-taxonomist.md +255 -0
  4. package/.claude/agents/documentation-writer.md +366 -0
  5. package/.claude/agents/planner.md +123 -166
  6. package/.claude/agents/researcher.md +58 -41
  7. package/.claude/agents/surveyor.md +81 -0
  8. package/.claude/agents/worker.md +74 -0
  9. package/.claude/commands/continue.md +122 -0
  10. package/.claude/commands/create-skill.md +107 -0
  11. package/.claude/commands/create-specialist.md +111 -0
  12. package/.claude/commands/curator-audit.md +4 -0
  13. package/.claude/commands/debug.md +183 -0
  14. package/.claude/commands/docs-adjust.md +214 -0
  15. package/.claude/commands/docs-audit.md +172 -0
  16. package/.claude/commands/docs-init.md +210 -0
  17. package/.claude/commands/plan.md +199 -102
  18. package/.claude/commands/validate.md +11 -0
  19. package/.claude/commands/whats-next.md +106 -134
  20. package/.claude/envoy/README.md +5 -5
  21. package/.claude/envoy/envoy +11 -14
  22. package/.claude/envoy/package-lock.json +1594 -0
  23. package/.claude/envoy/package.json +38 -0
  24. package/.claude/envoy/src/cli.ts +126 -0
  25. package/.claude/envoy/src/commands/base.ts +216 -0
  26. package/.claude/envoy/src/commands/docs.ts +881 -0
  27. package/.claude/envoy/src/commands/gemini.ts +999 -0
  28. package/.claude/envoy/src/commands/git.ts +639 -0
  29. package/.claude/envoy/src/commands/index.ts +73 -0
  30. package/.claude/envoy/src/commands/knowledge.ts +178 -0
  31. package/.claude/envoy/src/commands/perplexity.ts +129 -0
  32. package/.claude/envoy/src/commands/plan/core.ts +134 -0
  33. package/.claude/envoy/src/commands/plan/findings.ts +446 -0
  34. package/.claude/envoy/src/commands/plan/gates.ts +672 -0
  35. package/.claude/envoy/src/commands/plan/index.ts +135 -0
  36. package/.claude/envoy/src/commands/plan/lifecycle.ts +648 -0
  37. package/.claude/envoy/src/commands/plan/plan-file.ts +138 -0
  38. package/.claude/envoy/src/commands/plan/prompts.ts +285 -0
  39. package/.claude/envoy/src/commands/plan/protocols.ts +166 -0
  40. package/.claude/envoy/src/commands/repomix.ts +99 -0
  41. package/.claude/envoy/src/commands/tavily.ts +220 -0
  42. package/.claude/envoy/src/commands/xai.ts +168 -0
  43. package/.claude/envoy/src/lib/ast-queries.ts +261 -0
  44. package/.claude/envoy/src/lib/design.ts +41 -0
  45. package/.claude/envoy/src/lib/feedback-schemas.ts +154 -0
  46. package/.claude/envoy/src/lib/findings.ts +215 -0
  47. package/.claude/envoy/src/lib/gates.ts +572 -0
  48. package/.claude/envoy/src/lib/git.ts +132 -0
  49. package/.claude/envoy/src/lib/index.ts +188 -0
  50. package/.claude/envoy/src/lib/knowledge.ts +646 -0
  51. package/.claude/envoy/src/lib/markdown.ts +75 -0
  52. package/.claude/envoy/src/lib/observability.ts +262 -0
  53. package/.claude/envoy/src/lib/paths.ts +130 -0
  54. package/.claude/envoy/src/lib/plan-io.ts +117 -0
  55. package/.claude/envoy/src/lib/prompts.ts +231 -0
  56. package/.claude/envoy/src/lib/protocols.ts +314 -0
  57. package/.claude/envoy/src/lib/repomix.ts +133 -0
  58. package/.claude/envoy/src/lib/retry.ts +138 -0
  59. package/.claude/envoy/src/lib/tree-sitter-utils.ts +301 -0
  60. package/.claude/envoy/src/lib/watcher.ts +167 -0
  61. package/.claude/envoy/src/types/tree-sitter.d.ts +76 -0
  62. package/.claude/envoy/tsconfig.json +21 -0
  63. package/.claude/hooks/scripts/enforce_research_fetch.py +1 -1
  64. package/.claude/hooks/scripts/scan_agents.py +62 -0
  65. package/.claude/hooks/scripts/scan_commands.py +50 -0
  66. package/.claude/hooks/scripts/scan_skills.py +46 -70
  67. package/.claude/hooks/scripts/validate_artifacts.py +128 -0
  68. package/.claude/hooks/startup.sh +26 -24
  69. package/.claude/protocols/bug-discovery.yaml +55 -0
  70. package/.claude/protocols/debugging.yaml +51 -0
  71. package/.claude/protocols/discovery.yaml +53 -0
  72. package/.claude/protocols/implementation.yaml +84 -0
  73. package/.claude/settings.json +38 -97
  74. package/.claude/skills/brainstorming/SKILL.md +54 -0
  75. package/.claude/skills/commands-development/SKILL.md +630 -0
  76. package/.claude/skills/commands-development/references/arguments.md +252 -0
  77. package/.claude/skills/commands-development/references/patterns.md +796 -0
  78. package/.claude/skills/commands-development/references/tool-restrictions.md +376 -0
  79. package/.claude/skills/discovery-mode/SKILL.md +108 -0
  80. package/.claude/skills/documentation-taxonomy/SKILL.md +287 -0
  81. package/.claude/skills/hooks-development/SKILL.md +332 -0
  82. package/.claude/skills/hooks-development/references/command-vs-prompt.md +269 -0
  83. package/.claude/skills/hooks-development/references/examples.md +658 -0
  84. package/.claude/skills/hooks-development/references/hook-types.md +463 -0
  85. package/.claude/skills/hooks-development/references/input-output-schemas.md +469 -0
  86. package/.claude/skills/hooks-development/references/matchers.md +470 -0
  87. package/.claude/skills/hooks-development/references/troubleshooting.md +587 -0
  88. package/.claude/skills/implementation-mode/SKILL.md +171 -0
  89. package/.claude/skills/knowledge-discovery/SKILL.md +178 -0
  90. package/.claude/skills/research-tools/SKILL.md +35 -33
  91. package/.claude/skills/skills-development/SKILL.md +192 -0
  92. package/.claude/skills/skills-development/references/api-security.md +226 -0
  93. package/.claude/skills/skills-development/references/be-clear-and-direct.md +531 -0
  94. package/.claude/skills/skills-development/references/common-patterns.md +595 -0
  95. package/.claude/skills/skills-development/references/core-principles.md +437 -0
  96. package/.claude/skills/skills-development/references/executable-code.md +175 -0
  97. package/.claude/skills/skills-development/references/iteration-and-testing.md +474 -0
  98. package/.claude/skills/skills-development/references/recommended-structure.md +168 -0
  99. package/.claude/skills/skills-development/references/skill-structure.md +372 -0
  100. package/.claude/skills/skills-development/references/use-xml-tags.md +466 -0
  101. package/.claude/skills/skills-development/references/using-scripts.md +113 -0
  102. package/.claude/skills/skills-development/references/using-templates.md +112 -0
  103. package/.claude/skills/skills-development/references/workflows-and-validation.md +510 -0
  104. package/.claude/skills/skills-development/templates/router-skill.md +73 -0
  105. package/.claude/skills/skills-development/templates/simple-skill.md +33 -0
  106. package/.claude/skills/skills-development/workflows/add-reference.md +96 -0
  107. package/.claude/skills/skills-development/workflows/add-script.md +93 -0
  108. package/.claude/skills/skills-development/workflows/add-template.md +74 -0
  109. package/.claude/skills/skills-development/workflows/add-workflow.md +120 -0
  110. package/.claude/skills/skills-development/workflows/audit-skill.md +138 -0
  111. package/.claude/skills/skills-development/workflows/create-domain-expertise-skill.md +605 -0
  112. package/.claude/skills/skills-development/workflows/create-new-skill.md +191 -0
  113. package/.claude/skills/skills-development/workflows/get-guidance.md +121 -0
  114. package/.claude/skills/skills-development/workflows/upgrade-to-router.md +161 -0
  115. package/.claude/skills/skills-development/workflows/verify-skill.md +204 -0
  116. package/.claude/skills/subagents-development/SKILL.md +325 -0
  117. package/.claude/skills/subagents-development/references/context-management.md +567 -0
  118. package/.claude/skills/subagents-development/references/debugging-agents.md +714 -0
  119. package/.claude/skills/subagents-development/references/error-handling-and-recovery.md +502 -0
  120. package/.claude/skills/subagents-development/references/evaluation-and-testing.md +374 -0
  121. package/.claude/skills/subagents-development/references/orchestration-patterns.md +591 -0
  122. package/.claude/skills/subagents-development/references/subagents.md +508 -0
  123. package/.claude/skills/subagents-development/references/writing-subagent-prompts.md +517 -0
  124. package/.claude/statusline.sh +24 -0
  125. package/bin/cli.js +150 -72
  126. package/package.json +1 -1
  127. package/.claude/agents/explorer.md +0 -62
  128. package/.claude/agents/parallel-worker.md +0 -121
  129. package/.claude/commands/curation-fix.md +0 -92
  130. package/.claude/commands/new-branch.md +0 -36
  131. package/.claude/commands/parallel-discovery.md +0 -69
  132. package/.claude/commands/parallel-orchestration.md +0 -99
  133. package/.claude/commands/plan-checkpoint.md +0 -37
  134. package/.claude/envoy/commands/__init__.py +0 -1
  135. package/.claude/envoy/commands/base.py +0 -95
  136. package/.claude/envoy/commands/parallel.py +0 -439
  137. package/.claude/envoy/commands/perplexity.py +0 -86
  138. package/.claude/envoy/commands/plans.py +0 -451
  139. package/.claude/envoy/commands/tavily.py +0 -156
  140. package/.claude/envoy/commands/vertex.py +0 -358
  141. package/.claude/envoy/commands/xai.py +0 -124
  142. package/.claude/envoy/envoy.py +0 -122
  143. package/.claude/envoy/pyrightconfig.json +0 -4
  144. package/.claude/envoy/requirements.txt +0 -2
  145. package/.claude/hooks/capture-queries.sh +0 -3
  146. package/.claude/hooks/scripts/enforce_planning.py +0 -118
  147. package/.claude/hooks/scripts/enforce_rg.py +0 -34
  148. package/.claude/hooks/scripts/validate_skill.py +0 -81
  149. package/.claude/skills/claude-envoy-curation/SKILL.md +0 -162
  150. package/.claude/skills/claude-envoy-usage/SKILL.md +0 -46
  151. package/.claude/skills/command-development/SKILL.md +0 -206
  152. package/.claude/skills/command-development/examples/simple-commands.md +0 -212
  153. package/.claude/skills/command-development/references/frontmatter-reference.md +0 -221
  154. package/.claude/skills/hook-development/SKILL.md +0 -127
  155. package/.claude/skills/hook-development/examples/command-hooks.md +0 -301
  156. package/.claude/skills/hook-development/examples/prompt-hooks.md +0 -114
  157. package/.claude/skills/hook-development/references/event-reference.md +0 -226
  158. package/.claude/skills/repomix-extraction/SKILL.md +0 -91
  159. package/.claude/skills/skill-development/SKILL.md +0 -168
  160. package/.claude/skills/skill-development/examples/complete-skill-examples.md +0 -281
  161. package/.claude/skills/skill-development/references/progressive-disclosure.md +0 -141
  162. package/.claude/skills/skill-development/references/writing-style.md +0 -180
  163. package/.claude/skills/skill-development/scripts/validate-skill.sh +0 -144
  164. package/.claude/skills/specialist-builder/SKILL.md +0 -327
  165. package/.claude/skills/specialist-builder/docs/agent-catalog.md +0 -28
  166. package/.claude/skills/specialist-builder/examples/complete-agent-examples.md +0 -206
  167. package/.claude/skills/specialist-builder/references/system-prompt-patterns.md +0 -281
  168. package/.claude/skills/specialist-builder/references/triggering-examples.md +0 -162
  169. package/.claude/skills/specialist-builder/scripts/validate-agent.sh +0 -137
  170. /package/.claude/{envoy/claude-envoy.py → skills/claude-envoy-patterns/SKILL.md} +0 -0
@@ -0,0 +1,376 @@
1
+ # Tool Restrictions Reference
2
+
3
+ Official documentation on restricting tool access in slash commands.
4
+
5
+ ## Why Restrict Tools
6
+
7
+ Tool restrictions provide:
8
+ - **Security**: Prevent accidental destructive operations
9
+ - **Focus**: Limit scope for specialized commands
10
+ - **Safety**: Ensure commands only perform intended operations
11
+
12
+ ## allowed-tools Field
13
+
14
+ **Location**: YAML frontmatter
15
+
16
+ **Format**: Array of tool names or patterns
17
+
18
+ **Default**: If omitted, all tools available
19
+
20
+ ## Basic Patterns
21
+
22
+ ### Array Format
23
+
24
+ ```yaml
25
+ ---
26
+ description: My command
27
+ allowed-tools: [Read, Edit, Write]
28
+ ---
29
+ ```
30
+
31
+ ### Single Tool
32
+
33
+ ```yaml
34
+ ---
35
+ description: Thinking command
36
+ allowed-tools: SequentialThinking
37
+ ---
38
+ ```
39
+
40
+ ## Bash Command Restrictions
41
+
42
+ **Source**: Official Claude Code documentation
43
+
44
+ Restrict bash commands to specific patterns using wildcards.
45
+
46
+ ### Git-Only Commands
47
+
48
+ ```yaml
49
+ ---
50
+ description: Create a git commit
51
+ allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
52
+ ---
53
+ ```
54
+
55
+ **Allows**:
56
+ - `git add <anything>`
57
+ - `git status <anything>`
58
+ - `git commit <anything>`
59
+
60
+ **Prevents**:
61
+ - `rm -rf`
62
+ - `curl <url>`
63
+ - Any non-git bash commands
64
+
65
+ ### NPM Script Restrictions
66
+
67
+ ```yaml
68
+ ---
69
+ description: Run tests and lint
70
+ allowed-tools: Bash(npm test:*), Bash(npm run lint:*)
71
+ ---
72
+ ```
73
+
74
+ **Allows**:
75
+ - `npm test`
76
+ - `npm test -- --watch`
77
+ - `npm run lint`
78
+ - `npm run lint:fix`
79
+
80
+ **Prevents**:
81
+ - `npm install malicious-package`
82
+ - `npm run deploy`
83
+ - Other npm commands
84
+
85
+ ### Multiple Bash Patterns
86
+
87
+ ```yaml
88
+ ---
89
+ description: Development workflow
90
+ allowed-tools: Bash(git status:*), Bash(npm test:*), Bash(npm run build:*)
91
+ ---
92
+ ```
93
+
94
+ Combines multiple bash command patterns.
95
+
96
+ ## Common Tool Restriction Patterns
97
+
98
+ ### Pattern 1: Git Workflows
99
+
100
+ **Use case**: Commands that create commits, check status, etc.
101
+
102
+ ```yaml
103
+ ---
104
+ description: Create a git commit
105
+ allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git diff:*), Bash(git commit:*)
106
+ ---
107
+
108
+ Current status: ! `git status`
109
+ Changes: ! `git diff HEAD`
110
+
111
+ Create a commit for these changes.
112
+ ```
113
+
114
+ **Security benefit**: Cannot accidentally run destructive commands like `rm -rf` or `curl malicious-site.com`
115
+
116
+ ### Pattern 2: Read-Only Analysis
117
+
118
+ **Use case**: Commands that analyze code without modifying it
119
+
120
+ ```yaml
121
+ ---
122
+ description: Analyze codebase for pattern
123
+ allowed-tools: [Read, Grep, Glob]
124
+ ---
125
+
126
+ Search codebase for: $ARGUMENTS
127
+ ```
128
+
129
+ **Security benefit**: Cannot write files or execute code
130
+
131
+ ### Pattern 3: Thinking-Only Commands
132
+
133
+ **Use case**: Deep analysis or planning without file operations
134
+
135
+ ```yaml
136
+ ---
137
+ description: Analyze problem from first principles
138
+ allowed-tools: SequentialThinking
139
+ ---
140
+
141
+ Analyze the current problem from first principles.
142
+ ```
143
+
144
+ **Focus benefit**: Claude focuses purely on reasoning, no file operations
145
+
146
+ ### Pattern 4: Controlled File Operations
147
+
148
+ **Use case**: Commands that should only read/edit specific types
149
+
150
+ ```yaml
151
+ ---
152
+ description: Update documentation
153
+ allowed-tools: [Read, Edit(*.md)]
154
+ ---
155
+
156
+ Update documentation in @ $ARGUMENTS
157
+ ```
158
+
159
+ **Note**: File pattern restrictions may not be supported in all versions.
160
+
161
+ ## Real Examples from Official Docs
162
+
163
+ ### Example 1: Git Commit Command
164
+
165
+ **Source**: Official Claude Code documentation
166
+
167
+ ```markdown
168
+ ---
169
+ allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
170
+ description: Create a git commit
171
+ ---
172
+
173
+ ## Context
174
+
175
+ - Current git status: ! `git status`
176
+ - Current git diff (staged and unstaged changes): ! `git diff HEAD`
177
+ - Current branch: ! `git branch --show-current`
178
+ - Recent commits: ! `git log --oneline -10`
179
+
180
+ ## Your task
181
+
182
+ Based on the above changes, create a single git commit.
183
+ ```
184
+
185
+ **Allowed bash commands**:
186
+ - `git add .`
187
+ - `git add file.js`
188
+ - `git status`
189
+ - `git status --short`
190
+ - `git commit -m "message"`
191
+ - `git commit --amend`
192
+
193
+ **Blocked commands**:
194
+ - `rm file.js`
195
+ - `curl https://malicious.com`
196
+ - `npm install`
197
+ - Any non-git commands
198
+
199
+ ### Example 2: Code Review (No Restrictions)
200
+
201
+ ```markdown
202
+ ---
203
+ description: Review this code for security vulnerabilities
204
+ ---
205
+
206
+ Review this code for security vulnerabilities:
207
+ ```
208
+
209
+ **No allowed-tools field** = All tools available
210
+
211
+ Claude can:
212
+ - Read files
213
+ - Write files
214
+ - Execute bash commands
215
+ - Use any tool
216
+
217
+ **Use when**: Command needs full flexibility
218
+
219
+ ## When to Restrict Tools
220
+
221
+ ### ✅ Restrict when:
222
+
223
+ 1. **Security-sensitive operations**
224
+ ```yaml
225
+ # Git operations only
226
+ allowed-tools: Bash(git add:*), Bash(git status:*)
227
+ ```
228
+
229
+ 2. **Focused tasks**
230
+ ```yaml
231
+ # Deep thinking only
232
+ allowed-tools: SequentialThinking
233
+ ```
234
+
235
+ 3. **Read-only analysis**
236
+ ```yaml
237
+ # No modifications
238
+ allowed-tools: [Read, Grep, Glob]
239
+ ```
240
+
241
+ 4. **Specific bash commands**
242
+ ```yaml
243
+ # Only npm scripts
244
+ allowed-tools: Bash(npm run test:*), Bash(npm run build:*)
245
+ ```
246
+
247
+ ### ❌ Don't restrict when:
248
+
249
+ 1. **Command needs flexibility**
250
+ - Complex workflows
251
+ - Exploratory tasks
252
+ - Multi-step operations
253
+
254
+ 2. **Tool needs are unpredictable**
255
+ - General problem-solving
256
+ - Debugging unknown issues
257
+
258
+ 3. **Already in safe environment**
259
+ - Sandboxed execution
260
+ - Non-production systems
261
+
262
+ ## Best Practices
263
+
264
+ ### 1. Use Wildcards for Command Families
265
+
266
+ ```yaml
267
+ # Good - allows all git commands
268
+ allowed-tools: Bash(git *)
269
+
270
+ # Better - specific git operations
271
+ allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
272
+
273
+ # Best - minimal necessary permissions
274
+ allowed-tools: Bash(git status:*), Bash(git diff:*)
275
+ ```
276
+
277
+ ### 2. Combine Tool Types Appropriately
278
+
279
+ ```yaml
280
+ # Analysis with optional git context
281
+ allowed-tools: [Read, Grep, Bash(git status:*)]
282
+ ```
283
+
284
+ ### 3. Test Restrictions
285
+
286
+ Create command and verify:
287
+ - Allowed operations work
288
+ - Blocked operations are prevented
289
+ - Error messages are clear
290
+
291
+ ### 4. Document Why
292
+
293
+ ```yaml
294
+ ---
295
+ description: Create git commit (restricted to git commands only for security)
296
+ allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
297
+ ---
298
+ ```
299
+
300
+ ## Tool Types
301
+
302
+ ### File Operations
303
+ - `Read` - Read files
304
+ - `Write` - Write new files
305
+ - `Edit` - Modify existing files
306
+ - `Grep` - Search file contents
307
+ - `Glob` - Find files by pattern
308
+
309
+ ### Execution
310
+ - `Bash(pattern:*)` - Execute bash commands matching pattern
311
+ - `SequentialThinking` - Reasoning tool
312
+
313
+ ### Other
314
+ - `Task` - Invoke subagents
315
+ - `WebSearch` - Search the web
316
+ - `WebFetch` - Fetch web pages
317
+
318
+ ## Security Patterns
319
+
320
+ ### Pattern: Prevent Data Exfiltration
321
+
322
+ ```yaml
323
+ ---
324
+ description: Analyze code locally
325
+ allowed-tools: [Read, Grep, Glob, SequentialThinking]
326
+ # No Bash, WebFetch - cannot send data externally
327
+ ---
328
+ ```
329
+
330
+ ### Pattern: Prevent Destructive Operations
331
+
332
+ ```yaml
333
+ ---
334
+ description: Review changes
335
+ allowed-tools: [Read, Bash(git diff:*), Bash(git log:*)]
336
+ # No Write, Edit, git reset, git push --force
337
+ ---
338
+ ```
339
+
340
+ ### Pattern: Controlled Deployment
341
+
342
+ ```yaml
343
+ ---
344
+ description: Deploy to staging
345
+ allowed-tools: Bash(npm run deploy:staging), Bash(git push origin:staging)
346
+ # Cannot deploy to production accidentally
347
+ ---
348
+ ```
349
+
350
+ ## Limitations
351
+
352
+ 1. **Wildcard patterns** may vary by version
353
+ 2. **File-specific restrictions** (like `Edit(*.md)`) may not be supported
354
+ 3. **Cannot blacklist** - only whitelist
355
+ 4. **All or nothing** for tool types - can't partially restrict
356
+
357
+ ## Testing Tool Restrictions
358
+
359
+ ### Verify Restrictions Work
360
+
361
+ 1. Create command with restrictions
362
+ 2. Try to use restricted tool
363
+ 3. Confirm operation is blocked
364
+ 4. Check error message
365
+
366
+ Example test:
367
+ ```markdown
368
+ ---
369
+ description: Test restrictions
370
+ allowed-tools: [Read]
371
+ ---
372
+
373
+ Try to write a file - this should fail.
374
+ ```
375
+
376
+ Expected: Write operations blocked with error message.
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: discovery-mode
3
+ description: Read-only codebase analysis mode. Agents write findings via envoy commands, not direct file writes. Enables parallel specialist dispatch with explicit naming.
4
+ ---
5
+
6
+ <objective>
7
+ Enable agents to perform read-only codebase analysis during planning phase. Agents gather context, analyze patterns, and write findings via envoy commands. ALL specialists can propose options when alternatives exist.
8
+ </objective>
9
+
10
+ <quick_start>
11
+ ```bash
12
+ # Write approach (required)
13
+ envoy plans write-approach \
14
+ --specialist "<your-name>" \
15
+ --summary "2-3 sentence summary" \
16
+ --files '[{"path": "src/auth/service.ts", "purpose": "Core auth logic"}]' \
17
+ --content "Full analysis..."
18
+
19
+ # Write options (when alternatives exist)
20
+ envoy plans write-option \
21
+ --specialist "<your-name>" \
22
+ --id "1A" --group "Token storage" --name "httpOnly cookies" \
23
+ --summary "Store tokens in httpOnly cookies..." \
24
+ --trade-offs '{"pros": ["XSS protection"], "cons": ["CSRF required"]}' \
25
+ --recommendation "Best for same-origin apps" \
26
+ --content "Full implementation details..."
27
+ ```
28
+ </quick_start>
29
+
30
+ <constraints>
31
+ - **Read-only mode** - NO file edits except via envoy findings commands
32
+ - **Envoy-mediated writes** - use `write-approach` and `write-option` commands
33
+ - **Use assigned specialist name** - main agent provides name for findings subdirectory
34
+ </constraints>
35
+
36
+ <workflow>
37
+ ### 1. Receive Context
38
+ Main agent provides: target directories, questions, specialist name
39
+
40
+ ### 2. Analyze Codebase
41
+ Use: Glob, Grep, Read
42
+
43
+ ### 3. Write Findings
44
+
45
+ **Approach (required)**:
46
+ ```bash
47
+ envoy plans write-approach \
48
+ --specialist "<name>" \
49
+ --summary "Brief summary for main agent" \
50
+ --files '[{"path": "...", "purpose": "..."}]' \
51
+ --related-options '["1A", "1B"]' \
52
+ --content "Full analysis"
53
+ ```
54
+
55
+ **Options (only if alternatives exist that the approach file mentions)**:
56
+ ```bash
57
+ envoy plans write-option \
58
+ --specialist "<name>" \
59
+ --id "1A" \
60
+ --group "Token storage" \
61
+ --name "httpOnly cookies" \
62
+ --summary "Brief summary" \
63
+ --trade-offs '{"pros": [...], "cons": [...]}' \
64
+ --recommendation "When to use this option" \
65
+ --content "Full details"
66
+ ```
67
+
68
+ ### 4. Return Confirmation
69
+ Return path + 1-2 line summary. Do NOT return full analysis.
70
+ </workflow>
71
+
72
+ <option_schema>
73
+ Options use simplified schema:
74
+ - `--id`: Single identifier (e.g., "1A", "1B", "2A")
75
+ - `--group`: Display grouping (options with same prefix are related)
76
+ - `--status`: Defaults to "pending" (main agent sets to selected/rejected)
77
+
78
+ Related options share group prefix: "1A" and "1B" are alternatives in group "1".
79
+ </option_schema>
80
+
81
+ <replace_mode>
82
+ When re-invoked after user feedback (re-discovery loop):
83
+
84
+ ```bash
85
+ # Check for existing findings
86
+ envoy plans has-findings --specialist "<name>"
87
+
88
+ # Read previous approach
89
+ envoy plans read-finding --specialist "<name>" --type approach
90
+
91
+ # Write new approach with --replace (clears existing options)
92
+ envoy plans write-approach \
93
+ --specialist "<name>" \
94
+ --replace \
95
+ --summary "..." \
96
+ --files '[...]' \
97
+ --content "Combined previous + new analysis"
98
+ ```
99
+
100
+ Replace mode: read previous → combine with new prompt → overwrite findings.
101
+ </replace_mode>
102
+
103
+ <success_criteria>
104
+ - Approach file written via envoy
105
+ - Options written when alternatives exist
106
+ - Brief confirmation returned (not full analysis)
107
+ - No direct file modifications
108
+ </success_criteria>