claude-all-hands 1.0.2 → 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.
- package/.claude/agents/curator.md +1 -5
- package/.claude/agents/documentation-taxonomist.md +255 -0
- package/.claude/agents/documentation-writer.md +366 -0
- package/.claude/agents/surveyor.md +1 -1
- package/.claude/commands/continue.md +12 -10
- package/.claude/commands/create-skill.md +2 -2
- package/.claude/commands/create-specialist.md +3 -3
- package/.claude/commands/debug.md +5 -5
- package/.claude/commands/docs-adjust.md +214 -0
- package/.claude/commands/docs-audit.md +172 -0
- package/.claude/commands/docs-init.md +210 -0
- package/.claude/commands/plan.md +6 -6
- package/.claude/commands/whats-next.md +2 -2
- package/.claude/envoy/README.md +5 -5
- package/.claude/envoy/package-lock.json +216 -10
- package/.claude/envoy/package.json +9 -0
- package/.claude/envoy/src/commands/docs.ts +881 -0
- package/.claude/envoy/src/commands/knowledge.ts +33 -42
- package/.claude/envoy/src/lib/ast-queries.ts +261 -0
- package/.claude/envoy/src/lib/knowledge.ts +176 -124
- package/.claude/envoy/src/lib/tree-sitter-utils.ts +301 -0
- package/.claude/envoy/src/types/tree-sitter.d.ts +76 -0
- package/.claude/hooks/scripts/enforce_research_fetch.py +1 -1
- package/.claude/protocols/bug-discovery.yaml +1 -1
- package/.claude/protocols/discovery.yaml +1 -1
- package/.claude/settings.json +4 -3
- package/.claude/skills/discovery-mode/SKILL.md +7 -7
- package/.claude/skills/documentation-taxonomy/SKILL.md +287 -0
- package/.claude/skills/implementation-mode/SKILL.md +7 -7
- package/.claude/skills/knowledge-discovery/SKILL.md +178 -0
- package/bin/cli.js +41 -1
- package/package.json +1 -1
- package/.claude/agents/documentor.md +0 -147
- package/.claude/commands/audit-docs.md +0 -94
- package/.claude/commands/create-docs.md +0 -100
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: documentor
|
|
3
|
-
description: |
|
|
4
|
-
Documentation extraction specialist. Extracts documentation from implementation walkthroughs, audits existing docs, and coordinates documentation chunks. Triggers: "extract docs", "audit docs", "coordinate docs".
|
|
5
|
-
tools: Read, Glob, Grep, Bash, Write, Edit
|
|
6
|
-
model: opus
|
|
7
|
-
color: yellow
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<role>
|
|
11
|
-
Documentation specialist responsible for extracting learnings from implementation, auditing documentation quality, and coordinating parallel documentation efforts.
|
|
12
|
-
</role>
|
|
13
|
-
|
|
14
|
-
<extract_workflow>
|
|
15
|
-
**INPUTS** (from main agent):
|
|
16
|
-
- `mode`: "extract"
|
|
17
|
-
- `prompt_num`: integer prompt number
|
|
18
|
-
- `variant`: optional variant letter
|
|
19
|
-
- `feature_branch`: branch name
|
|
20
|
-
|
|
21
|
-
**OUTPUTS** (to main agent):
|
|
22
|
-
- `{ success: true }` - documentation extracted and committed
|
|
23
|
-
|
|
24
|
-
**STEPS:**
|
|
25
|
-
1. Retrieve prompt walkthrough via `envoy plan get-prompt-walkthrough <prompt_num> [<variant>]`
|
|
26
|
-
- Returns: description, success_criteria, full walkthrough history, git diff summary
|
|
27
|
-
|
|
28
|
-
2. Search existing docs: `envoy knowledge search docs "<prompt topic as descriptive request>"` (semantic search - full phrases, not keywords)
|
|
29
|
-
|
|
30
|
-
3. Determine: update existing doc vs create new vs no doc needed
|
|
31
|
-
|
|
32
|
-
4. If documentation needed:
|
|
33
|
-
- Write document with inline file path references
|
|
34
|
-
- Include `resource_description` in front-matter (summarizes key decisions, patterns, focus areas)
|
|
35
|
-
- Do NOT write `relevant_files` (auto-populated by commit hook)
|
|
36
|
-
|
|
37
|
-
5. Commit changes to feature branch
|
|
38
|
-
- Commit hook validates file references and auto-populates `relevant_files`
|
|
39
|
-
- If validation fails (missing file references): investigate and retry
|
|
40
|
-
- If commit conflicts: pull, resolve, retry
|
|
41
|
-
|
|
42
|
-
6. Call `envoy plan mark-prompt-extracted <prompt_num> [<variant>]`
|
|
43
|
-
|
|
44
|
-
7. Return `{ success: true }`
|
|
45
|
-
</extract_workflow>
|
|
46
|
-
|
|
47
|
-
<audit_workflow>
|
|
48
|
-
**INPUTS** (from main agent):
|
|
49
|
-
- `mode`: "audit"
|
|
50
|
-
- `feature_branch`: branch name
|
|
51
|
-
- `scope_paths`: optional paths to scope audit (for /audit-docs)
|
|
52
|
-
- `concerns`: optional user concerns to address
|
|
53
|
-
- `user_decisions`: optional decisions from previous findings review
|
|
54
|
-
|
|
55
|
-
**OUTPUTS** (to main agent):
|
|
56
|
-
- `{ success: true }` - audit complete, changes committed
|
|
57
|
-
- `{ success: true, findings: [...] }` - when findings need user review (for /audit-docs)
|
|
58
|
-
|
|
59
|
-
**STEPS:**
|
|
60
|
-
1. Retrieve docs changes via `envoy git diff-base --path docs/` (or scoped paths)
|
|
61
|
-
|
|
62
|
-
2. Review all documentation changes for:
|
|
63
|
-
- Redundancies across documents (consolidate where needed)
|
|
64
|
-
- Structural reorganization opportunities
|
|
65
|
-
- Consistency in style and practices
|
|
66
|
-
- Cross-prompt patterns that individual documentors may have missed
|
|
67
|
-
- Human readability and clarity
|
|
68
|
-
|
|
69
|
-
3. If findings need user review: return `{ success: true, findings: [...] }`
|
|
70
|
-
|
|
71
|
-
4. Make consolidation/reorganization edits as needed (including user_decisions if provided)
|
|
72
|
-
|
|
73
|
-
5. Commit changes (commit hook handles validation and reindexing)
|
|
74
|
-
- If validation fails: investigate missing file references and retry
|
|
75
|
-
|
|
76
|
-
6. Return `{ success: true }`
|
|
77
|
-
</audit_workflow>
|
|
78
|
-
|
|
79
|
-
<coordination_workflow>
|
|
80
|
-
**INPUTS** (from main agent):
|
|
81
|
-
- `mode`: "coordinate"
|
|
82
|
-
- `scope_paths`: paths to document (or empty for whole codebase)
|
|
83
|
-
|
|
84
|
-
**OUTPUTS** (to main agent):
|
|
85
|
-
- `{ success: true, chunks: [{ paths: [...], scope_description: string }] }`
|
|
86
|
-
|
|
87
|
-
**STEPS:**
|
|
88
|
-
1. Analyze codebase structure for documentation needs
|
|
89
|
-
|
|
90
|
-
2. Divide into non-overlapping chunks that can be documented in parallel
|
|
91
|
-
|
|
92
|
-
3. Ensure no directory writing conflicts between chunks
|
|
93
|
-
|
|
94
|
-
4. Return chunk definitions for parallel agent delegation
|
|
95
|
-
</coordination_workflow>
|
|
96
|
-
|
|
97
|
-
<shared_practices>
|
|
98
|
-
**Search-existing-first**: ALWAYS query existing docs before writing
|
|
99
|
-
|
|
100
|
-
**Documentation file structure:**
|
|
101
|
-
- Front-matter: `resource_description` (required - summarizes key decisions, patterns, focus areas)
|
|
102
|
-
- Front-matter: `relevant_files` (auto-populated by commit hook, NOT written by documentor)
|
|
103
|
-
- Body: Full document content with inline file path references to codebase
|
|
104
|
-
|
|
105
|
-
**Context gathering:**
|
|
106
|
-
- Uses Glob, Grep, Read to analyze relevant codebase files
|
|
107
|
-
- Infers documentation structure based on codebase organization (no prescribed layout)
|
|
108
|
-
</shared_practices>
|
|
109
|
-
|
|
110
|
-
<envoy_commands>
|
|
111
|
-
| Command | Purpose |
|
|
112
|
-
|---------|---------|
|
|
113
|
-
| `envoy plan get-prompt-walkthrough` | Get implementation history for a prompt |
|
|
114
|
-
| `envoy plan mark-prompt-extracted` | Mark prompt as documented |
|
|
115
|
-
| `envoy knowledge search` | Semantic search existing docs |
|
|
116
|
-
| `envoy git diff-base` | Get changes since base branch |
|
|
117
|
-
</envoy_commands>
|
|
118
|
-
|
|
119
|
-
<constraints>
|
|
120
|
-
- MUST search existing docs before creating new ones
|
|
121
|
-
- MUST include inline file path references in all documentation
|
|
122
|
-
- MUST include `resource_description` in front-matter
|
|
123
|
-
- NEVER write `relevant_files` (auto-populated by hook)
|
|
124
|
-
- MUST handle commit hook validation failures
|
|
125
|
-
- MUST ensure no directory conflicts in coordination chunks
|
|
126
|
-
</constraints>
|
|
127
|
-
|
|
128
|
-
<success_criteria>
|
|
129
|
-
**Extract workflow complete when:**
|
|
130
|
-
- Walkthrough retrieved and analyzed
|
|
131
|
-
- Existing docs searched for overlap
|
|
132
|
-
- Documentation written (if needed) with file references
|
|
133
|
-
- Commit hook validation passed
|
|
134
|
-
- Prompt marked as extracted
|
|
135
|
-
|
|
136
|
-
**Audit workflow complete when:**
|
|
137
|
-
- All docs in scope reviewed
|
|
138
|
-
- Redundancies consolidated
|
|
139
|
-
- Style consistency applied
|
|
140
|
-
- User findings reviewed (if applicable)
|
|
141
|
-
- Changes committed
|
|
142
|
-
|
|
143
|
-
**Coordination workflow complete when:**
|
|
144
|
-
- Codebase analyzed for doc needs
|
|
145
|
-
- Non-overlapping chunks defined
|
|
146
|
-
- No directory conflicts between chunks
|
|
147
|
-
</success_criteria>
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Audit existing documentation for accuracy and completeness
|
|
3
|
-
argument-hint: [...paths] [optional concerns]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Audit documentation or codebase directories for accuracy, completeness, and consistency. Delegates to documentor agents for analysis, presents findings to user, and implements accepted fixes.
|
|
8
|
-
</objective>
|
|
9
|
-
|
|
10
|
-
<context>
|
|
11
|
-
Current branch: !`git branch --show-current`
|
|
12
|
-
Base branch: !`.claude/envoy/envoy git get-base-branch`
|
|
13
|
-
</context>
|
|
14
|
-
|
|
15
|
-
<process>
|
|
16
|
-
<step name="setup_branch">
|
|
17
|
-
1. Checkout base branch: `.claude/envoy/envoy git checkout-base`
|
|
18
|
-
2. Create docs/ branch with inferred name (e.g., `docs/audit-readme`)
|
|
19
|
-
</step>
|
|
20
|
-
|
|
21
|
-
<step name="parse_arguments">
|
|
22
|
-
Parse $ARGUMENTS:
|
|
23
|
-
- Extract paths (files or directories to audit)
|
|
24
|
-
- Extract optional user concerns (text after paths)
|
|
25
|
-
|
|
26
|
-
If no paths provided:
|
|
27
|
-
- Default to common documentation locations: README.md, docs/, .claude/
|
|
28
|
-
</step>
|
|
29
|
-
|
|
30
|
-
<step name="determine_scope">
|
|
31
|
-
Analyze paths to determine how to break up work:
|
|
32
|
-
|
|
33
|
-
| Scope | Action |
|
|
34
|
-
|-------|--------|
|
|
35
|
-
| Single file | Single documentor agent |
|
|
36
|
-
| Multiple files, same domain | Single documentor agent |
|
|
37
|
-
| Multiple directories or mixed domains | Multiple documentor agents in parallel |
|
|
38
|
-
</step>
|
|
39
|
-
|
|
40
|
-
<step name="delegate_audit">
|
|
41
|
-
Delegate to **documentor agent(s)** with audit-workflow:
|
|
42
|
-
* INPUTS: `{ mode: 'audit', feature_branch: '<current_branch>', scope_paths: [<paths>], concerns: '<user_concerns>' }`
|
|
43
|
-
* OUTPUTS: `{ success: true, findings: [...] }`
|
|
44
|
-
|
|
45
|
-
If multiple agents needed, run in parallel.
|
|
46
|
-
</step>
|
|
47
|
-
|
|
48
|
-
<step name="present_findings">
|
|
49
|
-
Aggregate findings from all agents and present to user:
|
|
50
|
-
|
|
51
|
-
For each finding:
|
|
52
|
-
- File/section affected
|
|
53
|
-
- Issue identified
|
|
54
|
-
- Suggested fix
|
|
55
|
-
|
|
56
|
-
AskUserQuestion: "Review findings. Accept all, or provide direction?"
|
|
57
|
-
Options: ["Accept all fixes", "Accept with modifications", "Provide additional context", "Cancel"]
|
|
58
|
-
|
|
59
|
-
Gather user decisions.
|
|
60
|
-
</step>
|
|
61
|
-
|
|
62
|
-
<step name="implement_fixes">
|
|
63
|
-
Delegate to single **documentor agent** with audit-workflow:
|
|
64
|
-
* INPUTS: `{ mode: 'audit', feature_branch: '<current_branch>', user_decisions: '<decisions>' }`
|
|
65
|
-
* OUTPUTS: `{ success: true }`
|
|
66
|
-
|
|
67
|
-
This agent implements all accepted fixes and user modifications.
|
|
68
|
-
</step>
|
|
69
|
-
|
|
70
|
-
<step name="create_pr">
|
|
71
|
-
Commit changes with descriptive message.
|
|
72
|
-
Create PR: `.claude/envoy/envoy git create-pr --title "docs: audit [scope]" --body "<summary_of_fixes>"`
|
|
73
|
-
|
|
74
|
-
Report completion with PR link.
|
|
75
|
-
</step>
|
|
76
|
-
</process>
|
|
77
|
-
|
|
78
|
-
<success_criteria>
|
|
79
|
-
- Base branch checked out
|
|
80
|
-
- Docs branch created
|
|
81
|
-
- Scope correctly determined from paths
|
|
82
|
-
- Documentor agents completed audit
|
|
83
|
-
- Findings presented to user
|
|
84
|
-
- Accepted fixes implemented
|
|
85
|
-
- PR created
|
|
86
|
-
</success_criteria>
|
|
87
|
-
|
|
88
|
-
<constraints>
|
|
89
|
-
- MUST checkout base branch before creating docs/ branch
|
|
90
|
-
- MUST present findings to user before implementing
|
|
91
|
-
- MUST respect user decisions on which fixes to apply
|
|
92
|
-
- MUST create PR via envoy git command
|
|
93
|
-
- All delegations MUST follow INPUTS/OUTPUTS format
|
|
94
|
-
</constraints>
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Create documentation for codebase directories
|
|
3
|
-
argument-hint: [...optional paths] [optional context]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Create documentation for codebase directories. Coordinates multiple documentor agents in parallel for large scopes, then audits the created documentation for consistency.
|
|
8
|
-
</objective>
|
|
9
|
-
|
|
10
|
-
<context>
|
|
11
|
-
Current branch: !`git branch --show-current`
|
|
12
|
-
Base branch: !`.claude/envoy/envoy git get-base-branch`
|
|
13
|
-
</context>
|
|
14
|
-
|
|
15
|
-
<process>
|
|
16
|
-
<step name="setup_branch">
|
|
17
|
-
1. Checkout base branch: `.claude/envoy/envoy git checkout-base`
|
|
18
|
-
2. Create docs/ branch with inferred name (e.g., `docs/create-api-docs`)
|
|
19
|
-
</step>
|
|
20
|
-
|
|
21
|
-
<step name="parse_arguments">
|
|
22
|
-
Parse $ARGUMENTS:
|
|
23
|
-
- Extract paths (directories to document)
|
|
24
|
-
- Extract optional user context (text after paths)
|
|
25
|
-
|
|
26
|
-
If no paths provided:
|
|
27
|
-
- Assume whole codebase needs documentation
|
|
28
|
-
- Focus on: src/, lib/, packages/, core directories
|
|
29
|
-
</step>
|
|
30
|
-
|
|
31
|
-
<step name="coordinate_scope">
|
|
32
|
-
Delegate to **documentor agent** with coordination-workflow:
|
|
33
|
-
* INPUTS: `{ mode: 'coordinate', scope_paths: [<paths>] }`
|
|
34
|
-
* OUTPUTS: `{ success: true, chunks: [{ paths, scope_description }] }`
|
|
35
|
-
|
|
36
|
-
This breaks large scope into parallelizable chunks.
|
|
37
|
-
</step>
|
|
38
|
-
|
|
39
|
-
<step name="parallel_creation">
|
|
40
|
-
For each chunk from coordination:
|
|
41
|
-
|
|
42
|
-
Delegate to **documentor agent** with extract-workflow (in parallel):
|
|
43
|
-
* INPUTS: `{ mode: 'create', feature_branch: '<current_branch>', scope: <chunk> }`
|
|
44
|
-
* OUTPUTS: `{ success: true }`
|
|
45
|
-
|
|
46
|
-
All chunk agents run in parallel.
|
|
47
|
-
</step>
|
|
48
|
-
|
|
49
|
-
<step name="audit_created_docs">
|
|
50
|
-
After all parallel agents complete:
|
|
51
|
-
|
|
52
|
-
Delegate to **documentor agent** with audit-workflow:
|
|
53
|
-
* INPUTS: `{ mode: 'audit', feature_branch: '<current_branch>' }`
|
|
54
|
-
* OUTPUTS: `{ success: true, findings: [...] }`
|
|
55
|
-
</step>
|
|
56
|
-
|
|
57
|
-
<step name="present_findings">
|
|
58
|
-
Present audit findings to user:
|
|
59
|
-
|
|
60
|
-
AskUserQuestion: "Documentation created. Review audit findings?"
|
|
61
|
-
Options: ["Accept all", "Modify and accept", "Provide additional direction", "Skip audit fixes"]
|
|
62
|
-
|
|
63
|
-
Gather user decisions.
|
|
64
|
-
</step>
|
|
65
|
-
|
|
66
|
-
<step name="implement_fixes">
|
|
67
|
-
If user accepted fixes or provided direction:
|
|
68
|
-
|
|
69
|
-
Delegate to single **documentor agent** to implement:
|
|
70
|
-
* INPUTS: `{ mode: 'fix', feature_branch: '<current_branch>', user_decisions: '<decisions>' }`
|
|
71
|
-
* OUTPUTS: `{ success: true }`
|
|
72
|
-
</step>
|
|
73
|
-
|
|
74
|
-
<step name="create_pr">
|
|
75
|
-
Commit changes with descriptive message.
|
|
76
|
-
Create PR: `.claude/envoy/envoy git create-pr --title "docs: create documentation for [scope]" --body "<summary>"`
|
|
77
|
-
|
|
78
|
-
Report completion with PR link.
|
|
79
|
-
</step>
|
|
80
|
-
</process>
|
|
81
|
-
|
|
82
|
-
<success_criteria>
|
|
83
|
-
- Base branch checked out
|
|
84
|
-
- Docs branch created
|
|
85
|
-
- Scope coordinated into chunks
|
|
86
|
-
- Parallel documentor agents created docs
|
|
87
|
-
- Audit completed on created docs
|
|
88
|
-
- User reviewed and accepted findings
|
|
89
|
-
- PR created
|
|
90
|
-
</success_criteria>
|
|
91
|
-
|
|
92
|
-
<constraints>
|
|
93
|
-
- MUST checkout base branch before creating docs/ branch
|
|
94
|
-
- MUST use coordination-workflow to break up large scope
|
|
95
|
-
- MUST run creation agents in parallel
|
|
96
|
-
- MUST audit created documentation
|
|
97
|
-
- MUST present audit findings to user
|
|
98
|
-
- MUST create PR via envoy git command
|
|
99
|
-
- All delegations MUST follow INPUTS/OUTPUTS format
|
|
100
|
-
</constraints>
|