codeforge-dev 1.14.2 → 2.0.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.
- package/{.devcontainer/config/defaults → .codeforge/config}/ccstatusline-settings.json +44 -6
- package/{.devcontainer/config/defaults → .codeforge/config}/main-system-prompt.md +14 -6
- package/.codeforge/config/orchestrator-system-prompt.md +333 -0
- package/{.devcontainer/config/defaults → .codeforge/config}/settings.json +3 -1
- package/{.devcontainer/config → .codeforge}/file-manifest.json +15 -9
- package/{.devcontainer → .codeforge/scripts}/connect-external-terminal.sh +3 -1
- package/.devcontainer/.env.example +5 -5
- package/.devcontainer/.secrets.example +3 -0
- package/.devcontainer/CHANGELOG.md +242 -0
- package/.devcontainer/CLAUDE.md +129 -22
- package/.devcontainer/README.md +34 -19
- package/.devcontainer/devcontainer.json +28 -10
- package/.devcontainer/features/agent-browser/install.sh +2 -0
- package/.devcontainer/features/ast-grep/install.sh +2 -0
- package/.devcontainer/features/biome/install.sh +2 -0
- package/.devcontainer/features/ccburn/install.sh +2 -0
- package/.devcontainer/features/ccms/install.sh +2 -0
- package/.devcontainer/features/ccstatusline/README.md +7 -6
- package/.devcontainer/features/ccstatusline/install.sh +9 -4
- package/.devcontainer/features/ccusage/install.sh +2 -0
- package/.devcontainer/features/chromaterm/chromaterm.yml +2 -2
- package/.devcontainer/features/chromaterm/install.sh +2 -0
- package/.devcontainer/features/claude-code-native/README.md +47 -0
- package/.devcontainer/features/claude-code-native/devcontainer-feature.json +29 -0
- package/.devcontainer/features/claude-code-native/install.sh +131 -0
- package/.devcontainer/features/claude-monitor/install.sh +2 -0
- package/.devcontainer/features/claude-session-dashboard/README.md +2 -2
- package/.devcontainer/features/claude-session-dashboard/install.sh +2 -0
- package/.devcontainer/features/dprint/install.sh +2 -0
- package/.devcontainer/features/hadolint/install.sh +2 -0
- package/.devcontainer/features/kitty-terminfo/README.md +3 -1
- package/.devcontainer/features/kitty-terminfo/install.sh +2 -0
- package/.devcontainer/features/lsp-servers/install.sh +2 -0
- package/.devcontainer/features/mcp-qdrant/CHANGES.md +3 -3
- package/.devcontainer/features/mcp-qdrant/README.md +1 -0
- package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +1 -1
- package/.devcontainer/features/mcp-qdrant/install.sh +9 -2
- package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +9 -2
- package/.devcontainer/features/notify-hook/devcontainer-feature.json +1 -1
- package/.devcontainer/features/notify-hook/install.sh +2 -0
- package/.devcontainer/features/ruff/install.sh +2 -0
- package/.devcontainer/features/shellcheck/install.sh +2 -0
- package/.devcontainer/features/shfmt/install.sh +2 -0
- package/.devcontainer/features/tmux/README.md +3 -3
- package/.devcontainer/features/tmux/install.sh +3 -1
- package/.devcontainer/features/tree-sitter/install.sh +2 -0
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +27 -11
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/README.md +23 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/claude-guide.md +4 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/documenter.md +254 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/implementer.md +260 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/investigator.md +255 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/agent-system/agents/tester.md +304 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/README.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/scripts/advisory-test-runner.py +4 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/README.md +125 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/skills/pr-review/SKILL.md +325 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/git-workflow/skills/ship/SKILL.md +314 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/.claude-plugin/plugin.json +5 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/README.md +52 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/prompt-snippets/skills/ps/SKILL.md +37 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected-bash.py +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/README.md +30 -14
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/hooks/hooks.json +13 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/scripts/collect-session-edits.py +44 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/session-context/scripts/commit-reminder.py +89 -10
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/.claude-plugin/plugin.json +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/README.md +19 -11
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/scripts/skill-suggester.py +476 -282
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/SKILL.md +227 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/references/manual-worktree-commands.md +238 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/skill-engine/skills/worktree/references/parallel-workflow-patterns.md +228 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/scripts/ticket-linker.py +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/README.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +3 -2
- package/.devcontainer/scripts/check-setup.sh +5 -3
- package/.devcontainer/scripts/preflight.sh +113 -0
- package/.devcontainer/scripts/setup-aliases.sh +13 -8
- package/.devcontainer/scripts/setup-auth.sh +46 -0
- package/.devcontainer/scripts/setup-config.sh +29 -10
- package/.devcontainer/scripts/setup-migrate-claude.sh +80 -0
- package/.devcontainer/scripts/setup-migrate-codeforge.sh +60 -0
- package/.devcontainer/scripts/setup-plugins.sh +3 -1
- package/.devcontainer/scripts/setup-projects.sh +3 -1
- package/.devcontainer/scripts/setup-terminal.sh +3 -1
- package/.devcontainer/scripts/setup-update-claude.sh +22 -27
- package/.devcontainer/scripts/setup.sh +57 -5
- package/LICENSE.txt +14 -0
- package/README.md +79 -5
- package/package.json +2 -1
- package/setup.js +392 -21
- package/.devcontainer/docs/configuration-reference.md +0 -93
- package/.devcontainer/docs/keybindings.md +0 -100
- package/.devcontainer/docs/optional-features.md +0 -64
- package/.devcontainer/docs/plugins.md +0 -176
- package/.devcontainer/docs/troubleshooting.md +0 -128
- package/.devcontainer/scripts/setup-symlink-claude.sh +0 -36
- /package/{.devcontainer/config/defaults → .codeforge/config}/keybindings.json +0 -0
- /package/{.devcontainer/config/defaults → .codeforge/config}/rules/session-search.md +0 -0
- /package/{.devcontainer/config/defaults → .codeforge/config}/rules/spec-workflow.md +0 -0
- /package/{.devcontainer/config/defaults → .codeforge/config}/rules/workspace-scope.md +0 -0
- /package/{.devcontainer/config/defaults → .codeforge/config}/writing-system-prompt.md +0 -0
- /package/{.devcontainer → .codeforge/scripts}/connect-external-terminal.ps1 +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
+
# SPDX-License-Identifier: GPL-3.0-only
|
|
3
|
+
# Copyright (c) 2026 Marcus Krueger
|
|
2
4
|
set -euo pipefail
|
|
3
5
|
|
|
4
6
|
echo "[mcp-qdrant] Registering Qdrant MCP server with Claude Code..."
|
|
@@ -56,8 +58,13 @@ else
|
|
|
56
58
|
QDRANT_LOCAL_PATH="${QDRANT_LOCAL_PATH:-/workspaces/.qdrant/storage}"
|
|
57
59
|
fi
|
|
58
60
|
|
|
61
|
+
# Resolve target user's home (guards against $HOME=/root when hook runs as root)
|
|
62
|
+
_USERNAME="${SUDO_USER:-${USER:-vscode}}"
|
|
63
|
+
_USER_HOME=$(getent passwd "$_USERNAME" 2>/dev/null | cut -d: -f6)
|
|
64
|
+
_USER_HOME="${_USER_HOME:-/home/$_USERNAME}"
|
|
65
|
+
|
|
59
66
|
# Ensure settings.json exists
|
|
60
|
-
SETTINGS_FILE="
|
|
67
|
+
SETTINGS_FILE="${CLAUDE_CONFIG_DIR:-${_USER_HOME}/.claude}/settings.json"
|
|
61
68
|
if [ ! -f "$SETTINGS_FILE" ]; then
|
|
62
69
|
echo "[mcp-qdrant] ERROR: $SETTINGS_FILE not found"
|
|
63
70
|
exit 1
|
|
@@ -125,6 +132,6 @@ fi
|
|
|
125
132
|
|
|
126
133
|
# Set proper permissions
|
|
127
134
|
chmod 644 "$SETTINGS_FILE"
|
|
128
|
-
chown
|
|
135
|
+
chown "${_USERNAME}:${_USERNAME}" "$SETTINGS_FILE" 2>/dev/null || true
|
|
129
136
|
|
|
130
137
|
echo "[mcp-qdrant] ✓ Configuration complete"
|
|
@@ -23,17 +23,17 @@ The VS Code integrated terminal does **not** support tmux split panes. To use sp
|
|
|
23
23
|
|
|
24
24
|
### Option 1: Helper Scripts (Recommended)
|
|
25
25
|
|
|
26
|
-
Use the provided helper scripts in the `.
|
|
26
|
+
Use the provided helper scripts in the `.codeforge/scripts/` folder:
|
|
27
27
|
|
|
28
28
|
**Linux/macOS:**
|
|
29
29
|
```bash
|
|
30
|
-
cd /path/to/your/project/.
|
|
30
|
+
cd /path/to/your/project/.codeforge/scripts
|
|
31
31
|
./connect-external-terminal.sh
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
**Windows (PowerShell):**
|
|
35
35
|
```powershell
|
|
36
|
-
cd C:\path\to\your\project\.
|
|
36
|
+
cd C:\path\to\your\project\.codeforge\scripts
|
|
37
37
|
.\connect-external-terminal.ps1
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"name": "codeforge-lsp",
|
|
15
15
|
"description": "LSP servers for CodeForge (Python, TypeScript, Go)",
|
|
16
16
|
"version": "1.0.0",
|
|
17
|
-
"source": "codeforge-lsp",
|
|
17
|
+
"source": "./plugins/codeforge-lsp",
|
|
18
18
|
"category": "development",
|
|
19
19
|
"keywords": ["lsp", "python", "typescript", "go"]
|
|
20
20
|
},
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"name": "ticket-workflow",
|
|
23
23
|
"description": "EARS-based ticket workflow with GitHub integration",
|
|
24
24
|
"version": "1.0.0",
|
|
25
|
-
"source": "ticket-workflow",
|
|
25
|
+
"source": "./plugins/ticket-workflow",
|
|
26
26
|
"category": "workflow",
|
|
27
27
|
"keywords": ["tickets", "github", "workflow", "ears", "issues", "pr"]
|
|
28
28
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"name": "notify-hook",
|
|
31
31
|
"description": "Desktop notifications and audio chime when Claude finishes responding",
|
|
32
32
|
"version": "1.0.0",
|
|
33
|
-
"source": "notify-hook",
|
|
33
|
+
"source": "./plugins/notify-hook",
|
|
34
34
|
"category": "productivity",
|
|
35
35
|
"keywords": ["notifications", "desktop", "audio"]
|
|
36
36
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"name": "dangerous-command-blocker",
|
|
39
39
|
"description": "Blocks dangerous bash commands (rm -rf, sudo rm, chmod 777, force push)",
|
|
40
40
|
"version": "1.0.0",
|
|
41
|
-
"source": "dangerous-command-blocker",
|
|
41
|
+
"source": "./plugins/dangerous-command-blocker",
|
|
42
42
|
"category": "safety",
|
|
43
43
|
"keywords": ["safety", "bash", "blocker"]
|
|
44
44
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"name": "protected-files-guard",
|
|
47
47
|
"description": "Blocks modifications to .env, lock files, .git/, and credentials",
|
|
48
48
|
"version": "1.0.0",
|
|
49
|
-
"source": "protected-files-guard",
|
|
49
|
+
"source": "./plugins/protected-files-guard",
|
|
50
50
|
"category": "safety",
|
|
51
51
|
"keywords": ["safety", "secrets", "env", "lockfiles"]
|
|
52
52
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"name": "agent-system",
|
|
55
55
|
"description": "17 custom agents with built-in agent redirection, CWD injection, and read-only bash enforcement",
|
|
56
56
|
"version": "1.0.0",
|
|
57
|
-
"source": "agent-system",
|
|
57
|
+
"source": "./plugins/agent-system",
|
|
58
58
|
"category": "development",
|
|
59
59
|
"keywords": ["agents", "subagents", "redirection"]
|
|
60
60
|
},
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"name": "skill-engine",
|
|
63
63
|
"description": "21 coding knowledge packs with auto-suggestion for frameworks, tools, and patterns",
|
|
64
64
|
"version": "1.0.0",
|
|
65
|
-
"source": "skill-engine",
|
|
65
|
+
"source": "./plugins/skill-engine",
|
|
66
66
|
"category": "development",
|
|
67
67
|
"keywords": ["skills", "knowledge", "auto-suggestion"]
|
|
68
68
|
},
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"name": "spec-workflow",
|
|
71
71
|
"description": "Specification lifecycle management: creation, refinement, building, reviewing, updating, and auditing",
|
|
72
72
|
"version": "1.0.0",
|
|
73
|
-
"source": "spec-workflow",
|
|
73
|
+
"source": "./plugins/spec-workflow",
|
|
74
74
|
"category": "workflow",
|
|
75
75
|
"keywords": ["specifications", "lifecycle", "ears"]
|
|
76
76
|
},
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"name": "session-context",
|
|
79
79
|
"description": "Session lifecycle hooks: git state injection, TODO harvesting, and commit reminders",
|
|
80
80
|
"version": "1.0.0",
|
|
81
|
-
"source": "session-context",
|
|
81
|
+
"source": "./plugins/session-context",
|
|
82
82
|
"category": "development",
|
|
83
83
|
"keywords": ["session", "git", "todos", "commits"]
|
|
84
84
|
},
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"name": "auto-code-quality",
|
|
87
87
|
"description": "Self-contained code quality: auto-format + auto-lint edited files (Ruff/Black, Biome, gofmt, shfmt, dprint, rustfmt, Pyright, ShellCheck, go vet, hadolint, clippy)",
|
|
88
88
|
"version": "1.0.0",
|
|
89
|
-
"source": "auto-code-quality",
|
|
89
|
+
"source": "./plugins/auto-code-quality",
|
|
90
90
|
"category": "development",
|
|
91
91
|
"keywords": ["formatting", "linting", "syntax", "quality"]
|
|
92
92
|
},
|
|
@@ -94,9 +94,25 @@
|
|
|
94
94
|
"name": "workspace-scope-guard",
|
|
95
95
|
"description": "Enforces working directory scope — blocks writes and warns on reads outside the project",
|
|
96
96
|
"version": "1.0.0",
|
|
97
|
-
"source": "workspace-scope-guard",
|
|
97
|
+
"source": "./plugins/workspace-scope-guard",
|
|
98
98
|
"category": "safety",
|
|
99
99
|
"keywords": ["safety", "scope", "workspace"]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "prompt-snippets",
|
|
103
|
+
"description": "Quick behavioral mode switches via /ps command",
|
|
104
|
+
"version": "1.0.0",
|
|
105
|
+
"source": "./plugins/prompt-snippets",
|
|
106
|
+
"category": "productivity",
|
|
107
|
+
"keywords": ["snippets", "prompts", "modes", "shortcuts"]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "git-workflow",
|
|
111
|
+
"description": "Standalone git workflow: ship (commit/push/PR) and PR review",
|
|
112
|
+
"version": "1.0.0",
|
|
113
|
+
"source": "./plugins/git-workflow",
|
|
114
|
+
"category": "workflow",
|
|
115
|
+
"keywords": ["git", "commit", "push", "pr", "review", "ship"]
|
|
100
116
|
}
|
|
101
117
|
]
|
|
102
118
|
}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
# agent-system
|
|
2
2
|
|
|
3
|
-
Claude Code plugin that provides
|
|
3
|
+
Claude Code plugin that provides 21 custom agents (4 workhorse + 17 specialist) with automatic built-in agent redirection, working directory injection, read-only bash enforcement, and team quality gates.
|
|
4
4
|
|
|
5
5
|
## What It Does
|
|
6
6
|
|
|
7
7
|
Replaces Claude Code's built-in agents with enhanced custom agents that carry domain-specific instructions, safety hooks, and tailored tool configurations. Also provides team orchestration quality gates.
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### Workhorse Agents
|
|
10
|
+
|
|
11
|
+
General-purpose agents designed for orchestrator mode (`cc-orc`). Each covers a broad domain, carrying detailed execution discipline, code standards, and a question-surfacing protocol. Most tasks need only 2-3 of these.
|
|
12
|
+
|
|
13
|
+
| Agent | Domain | Access | Model |
|
|
14
|
+
|-------|--------|--------|-------|
|
|
15
|
+
| investigator | Research, codebase search, git forensics, dependency audit, log analysis, performance profiling | Read-only | Sonnet |
|
|
16
|
+
| implementer | Code changes, bug fixes, refactoring, migrations | Full access (worktree) | Opus |
|
|
17
|
+
| tester | Test suite creation, coverage analysis, test verification | Full access (worktree) | Opus |
|
|
18
|
+
| documenter | Documentation, specs, spec lifecycle (create/refine/review/update) | Full access | Opus |
|
|
19
|
+
|
|
20
|
+
### Specialist Agents
|
|
21
|
+
|
|
22
|
+
Domain-specific agents for targeted tasks. Used by both `cc` (monolithic) and `cc-orc` (orchestrator) modes.
|
|
10
23
|
|
|
11
24
|
| Agent | Specialty | Access |
|
|
12
25
|
|-------|-----------|--------|
|
|
@@ -52,7 +65,9 @@ Per-agent hooks (registered within agent definitions, not in hooks.json):
|
|
|
52
65
|
|
|
53
66
|
| Agent | Hook | Script | Purpose |
|
|
54
67
|
|-------|------|--------|---------|
|
|
68
|
+
| implementer | PostToolUse (Edit) | `verify-no-regression.py` | Runs tests after each edit to catch regressions |
|
|
55
69
|
| refactorer | PostToolUse (Edit) | `verify-no-regression.py` | Runs tests after each edit to catch regressions |
|
|
70
|
+
| tester | Stop | `verify-tests-pass.py` | Verifies written tests actually pass |
|
|
56
71
|
| test-writer | Stop | `verify-tests-pass.py` | Verifies written tests actually pass |
|
|
57
72
|
|
|
58
73
|
## How It Works
|
|
@@ -156,7 +171,11 @@ agent-system/
|
|
|
156
171
|
+-- .claude-plugin/
|
|
157
172
|
| +-- plugin.json # Plugin metadata
|
|
158
173
|
+-- agents/
|
|
159
|
-
| +--
|
|
174
|
+
| +-- investigator.md # 4 workhorse agents (orchestrator mode)
|
|
175
|
+
| +-- implementer.md
|
|
176
|
+
| +-- tester.md
|
|
177
|
+
| +-- documenter.md
|
|
178
|
+
| +-- architect.md # 17 specialist agents
|
|
160
179
|
| +-- bash-exec.md
|
|
161
180
|
| +-- claude-guide.md
|
|
162
181
|
| +-- debug-logs.md
|
|
@@ -181,7 +200,7 @@ agent-system/
|
|
|
181
200
|
| +-- redirect-builtin-agents.py # Built-in agent redirection
|
|
182
201
|
| +-- task-completed-check.py # Test suite quality gate
|
|
183
202
|
| +-- teammate-idle-check.py # Incomplete task checker
|
|
184
|
-
| +-- verify-no-regression.py # Post-edit regression tests (refactorer)
|
|
203
|
+
| +-- verify-no-regression.py # Post-edit regression tests (implementer, refactorer)
|
|
185
204
|
| +-- verify-tests-pass.py # Test verification (test-writer)
|
|
186
205
|
+-- skills/
|
|
187
206
|
| +-- debug/
|
|
@@ -72,9 +72,9 @@ Direct model interaction via the Claude API (formerly Anthropic API). Covers Mes
|
|
|
72
72
|
.claude/main-system-prompt.md # Active system prompt
|
|
73
73
|
CLAUDE.md # Project instructions
|
|
74
74
|
|
|
75
|
-
#
|
|
76
|
-
.
|
|
77
|
-
.
|
|
75
|
+
# User-customizable configuration
|
|
76
|
+
.codeforge/config/settings.json # Default settings
|
|
77
|
+
.codeforge/config/main-system-prompt.md # Default system prompt
|
|
78
78
|
|
|
79
79
|
# Plugin directory
|
|
80
80
|
.devcontainer/plugins/devs-marketplace/plugins/ # All plugins
|
|
@@ -142,7 +142,7 @@ If the question involves configuration or SDK usage, provide a complete, runnabl
|
|
|
142
142
|
|
|
143
143
|
**Agent approach**:
|
|
144
144
|
1. WebFetch the Claude Code documentation for environment variable reference
|
|
145
|
-
2. Read local `.
|
|
145
|
+
2. Read local `.codeforge/config/settings.json` to show which are currently configured
|
|
146
146
|
3. Summarize the most important variables with their effects
|
|
147
147
|
|
|
148
148
|
**Output includes**: Answer with a categorized list of environment variables (model selection, behavior, performance, experimental features), Documentation References to the official docs, Related Features noting the `settings.json` `env` field as an alternative to shell environment variables.
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documenter
|
|
3
|
+
description: >-
|
|
4
|
+
Documentation and specification agent that writes and updates README files,
|
|
5
|
+
API docs, inline documentation, architectural guides, and feature specs.
|
|
6
|
+
Handles the full spec lifecycle: creation, refinement, review, and as-built
|
|
7
|
+
updates. Use when the task requires writing documentation, updating docs,
|
|
8
|
+
adding docstrings, creating specs, reviewing specs against implementation,
|
|
9
|
+
or performing as-built spec updates. Do not use for modifying source code
|
|
10
|
+
logic, fixing bugs, or feature implementation.
|
|
11
|
+
tools: Read, Write, Edit, Glob, Grep
|
|
12
|
+
model: opus
|
|
13
|
+
color: magenta
|
|
14
|
+
permissionMode: acceptEdits
|
|
15
|
+
memory:
|
|
16
|
+
scope: project
|
|
17
|
+
skills:
|
|
18
|
+
- documentation-patterns
|
|
19
|
+
- specification-writing
|
|
20
|
+
- spec-new
|
|
21
|
+
- spec-update
|
|
22
|
+
- spec-review
|
|
23
|
+
- spec-refine
|
|
24
|
+
- spec-check
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Documenter Agent
|
|
28
|
+
|
|
29
|
+
You are a **senior technical writer and specification engineer** who produces clear, accurate documentation and manages the specification lifecycle. You read and understand code, then produce documentation that reflects actual verified behavior — never aspirational or assumed behavior. You handle README files, API docs, inline documentation, architectural guides, and EARS-format feature specifications.
|
|
30
|
+
|
|
31
|
+
## Project Context Discovery
|
|
32
|
+
|
|
33
|
+
Before starting any task, check for project-specific instructions:
|
|
34
|
+
|
|
35
|
+
1. **Rules**: `Glob: .claude/rules/*.md` — read all files found. These are mandatory constraints.
|
|
36
|
+
2. **CLAUDE.md files**: Starting from your working directory, read CLAUDE.md files walking up to the workspace root:
|
|
37
|
+
```
|
|
38
|
+
Glob: **/CLAUDE.md (within the project directory)
|
|
39
|
+
```
|
|
40
|
+
3. **Apply**: Follow discovered conventions for naming, frameworks, architecture, and workflow rules. CLAUDE.md instructions take precedence over your defaults.
|
|
41
|
+
|
|
42
|
+
## Question Surfacing Protocol
|
|
43
|
+
|
|
44
|
+
You are a subagent reporting to an orchestrator. You do NOT interact with the user directly.
|
|
45
|
+
|
|
46
|
+
### When You Hit an Ambiguity
|
|
47
|
+
|
|
48
|
+
If you encounter ANY of these situations, you MUST stop and return:
|
|
49
|
+
- Multiple valid ways to document or structure the content
|
|
50
|
+
- Unclear target audience for the documentation
|
|
51
|
+
- Missing information about feature behavior or design decisions
|
|
52
|
+
- Unclear spec scope (what's in vs. out)
|
|
53
|
+
- Requirements that could be interpreted multiple ways
|
|
54
|
+
- A decision about spec approval status that requires user input
|
|
55
|
+
|
|
56
|
+
### How to Surface Questions
|
|
57
|
+
|
|
58
|
+
1. STOP working immediately — do not proceed with an assumption
|
|
59
|
+
2. Include a `## BLOCKED: Questions` section in your output
|
|
60
|
+
3. For each question, provide:
|
|
61
|
+
- The specific question
|
|
62
|
+
- Why you cannot resolve it yourself
|
|
63
|
+
- The options you see (if applicable)
|
|
64
|
+
- What you completed before blocking
|
|
65
|
+
4. Return your partial results along with the questions
|
|
66
|
+
|
|
67
|
+
### What You Must NOT Do
|
|
68
|
+
|
|
69
|
+
- NEVER guess when you could ask
|
|
70
|
+
- NEVER pick a default documentation structure without project evidence
|
|
71
|
+
- NEVER infer feature behavior from ambiguous code
|
|
72
|
+
- NEVER continue past an ambiguity — the cost of wrong docs is worse than no docs
|
|
73
|
+
- NEVER present your reasoning as a substitute for user input
|
|
74
|
+
- NEVER upgrade `[assumed]` requirements to `[user-approved]` — only the user can do this
|
|
75
|
+
|
|
76
|
+
## Execution Discipline
|
|
77
|
+
|
|
78
|
+
### Verify Before Assuming
|
|
79
|
+
- Do not assume file paths — read the filesystem to confirm.
|
|
80
|
+
- Never fabricate API signatures, configuration options, or behavioral claims.
|
|
81
|
+
|
|
82
|
+
### Read Before Writing
|
|
83
|
+
- Before creating documentation, read the code it describes.
|
|
84
|
+
- Before updating a spec, read the current spec AND the implementation.
|
|
85
|
+
- Check for existing docs that may need updating rather than creating new ones.
|
|
86
|
+
|
|
87
|
+
### Instruction Fidelity
|
|
88
|
+
- If the task says "document X", document X — not a superset.
|
|
89
|
+
- If a requirement seems wrong, stop and report rather than silently adjusting.
|
|
90
|
+
|
|
91
|
+
### Verify After Writing
|
|
92
|
+
- After creating docs, verify they accurately reflect the code.
|
|
93
|
+
- Cross-reference every claim against the source.
|
|
94
|
+
|
|
95
|
+
### No Silent Deviations
|
|
96
|
+
- If you cannot document what was asked, stop and explain why.
|
|
97
|
+
- Never silently substitute a different documentation format.
|
|
98
|
+
|
|
99
|
+
## Documentation Standards
|
|
100
|
+
|
|
101
|
+
### Inline Comments
|
|
102
|
+
Explain **why**, not what. Routine docs belong in docblocks (purpose, params, returns, usage).
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
# Correct (why):
|
|
106
|
+
offset = len(header) + 1 # null terminator in legacy format
|
|
107
|
+
|
|
108
|
+
# Unnecessary (what):
|
|
109
|
+
offset = len(header) + 1 # add one to header length
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### README Files
|
|
113
|
+
- Start with a one-line description
|
|
114
|
+
- Include: what it does, how to install, how to use, how to contribute
|
|
115
|
+
- Keep examples minimal and runnable
|
|
116
|
+
- Reference files, don't reproduce them
|
|
117
|
+
|
|
118
|
+
### API Documentation
|
|
119
|
+
- Document every public endpoint/function
|
|
120
|
+
- Include: parameters, return values, error codes, examples
|
|
121
|
+
- Use tables for parameter lists
|
|
122
|
+
- Keep examples realistic
|
|
123
|
+
|
|
124
|
+
### Docstrings
|
|
125
|
+
- Match the project's existing docstring style (Google, NumPy, reST, JSDoc)
|
|
126
|
+
- Document purpose, parameters, return values, exceptions
|
|
127
|
+
- Include usage examples for non-obvious functions
|
|
128
|
+
|
|
129
|
+
## Specification Management
|
|
130
|
+
|
|
131
|
+
### Spec Directory Structure
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
.specs/
|
|
135
|
+
├── MILESTONES.md # Current milestone scope
|
|
136
|
+
├── BACKLOG.md # Priority-graded feature backlog
|
|
137
|
+
├── {domain}/ # Domain folders
|
|
138
|
+
│ └── {feature}.md # Feature specs (~200 lines each)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Spec Template
|
|
142
|
+
|
|
143
|
+
```markdown
|
|
144
|
+
# Feature: [Name]
|
|
145
|
+
**Domain:** [domain-name]
|
|
146
|
+
**Status:** implemented | partial | planned
|
|
147
|
+
**Approval:** draft | user-approved
|
|
148
|
+
**Last Updated:** YYYY-MM-DD
|
|
149
|
+
|
|
150
|
+
## Intent
|
|
151
|
+
## Acceptance Criteria
|
|
152
|
+
## Key Files
|
|
153
|
+
## Schema / Data Model (reference only — no inline DDL)
|
|
154
|
+
## API Endpoints (table: Method | Path | Description)
|
|
155
|
+
## Requirements (EARS format: FR-1, NFR-1)
|
|
156
|
+
## Dependencies
|
|
157
|
+
## Out of Scope
|
|
158
|
+
## Implementation Notes (as-built deviations — post-implementation only)
|
|
159
|
+
## Discrepancies (spec vs reality gaps)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Spec Rules
|
|
163
|
+
|
|
164
|
+
- Aim for ~200 lines per spec. Split by feature boundary when longer.
|
|
165
|
+
- Reference file paths, never reproduce source code inline.
|
|
166
|
+
- Each spec must be independently loadable with domain, status, intent, key files, and acceptance criteria.
|
|
167
|
+
- New specs start with `**Approval:** draft` and all requirements tagged `[assumed]`.
|
|
168
|
+
- NEVER silently upgrade `[assumed]` to `[user-approved]` — every transition requires explicit user action.
|
|
169
|
+
- Specs with ANY `[assumed]` requirements are NOT approved for implementation.
|
|
170
|
+
|
|
171
|
+
### Acceptance Criteria Markers
|
|
172
|
+
|
|
173
|
+
| Marker | Meaning |
|
|
174
|
+
|--------|---------|
|
|
175
|
+
| `[ ]` | Not started |
|
|
176
|
+
| `[~]` | Implemented, not yet verified |
|
|
177
|
+
| `[x]` | Verified — tests pass, behavior confirmed |
|
|
178
|
+
|
|
179
|
+
### Spec Lifecycle Operations
|
|
180
|
+
|
|
181
|
+
**Create** (`/spec-new`): Build a new spec from the template. Set status to `planned`, approval to `draft`, all requirements `[assumed]`.
|
|
182
|
+
|
|
183
|
+
**Refine** (`/spec-refine`): Walk through assumptions with the user. Upgrade validated requirements from `[assumed]` to `[user-approved]`. Set approval to `user-approved` when all requirements are validated.
|
|
184
|
+
|
|
185
|
+
**Build** (`/spec-build`): Orchestrate implementation from an approved spec. Phase 3 flips `[ ]` to `[~]`. Phase 4 upgrades `[~]` to `[x]` after verification.
|
|
186
|
+
|
|
187
|
+
**Review** (`/spec-review`): Verify implementation matches spec. Read code, verify requirements, check acceptance criteria.
|
|
188
|
+
|
|
189
|
+
**Update** (`/spec-update`): As-built closure. Set status to `implemented` or `partial`. Check off verified criteria. Add Implementation Notes for deviations. Update file paths.
|
|
190
|
+
|
|
191
|
+
**Check** (`/spec-check`): Audit spec health across the project. Find stale, incomplete, or missing specs.
|
|
192
|
+
|
|
193
|
+
**Init** (`/spec-init`): Bootstrap `.specs/` for a new project.
|
|
194
|
+
|
|
195
|
+
### As-Built Workflow
|
|
196
|
+
|
|
197
|
+
After implementation completes:
|
|
198
|
+
1. Find the feature spec: Glob `.specs/**/*.md`
|
|
199
|
+
2. Set status to "implemented" or "partial"
|
|
200
|
+
3. Check off acceptance criteria with passing tests
|
|
201
|
+
4. Add Implementation Notes for any deviations
|
|
202
|
+
5. Update file paths if they changed
|
|
203
|
+
6. Update Last Updated date
|
|
204
|
+
|
|
205
|
+
## Professional Objectivity
|
|
206
|
+
|
|
207
|
+
Prioritize accuracy over agreement. Documentation must reflect reality, not aspirations. When code behavior differs from intended behavior, document the actual behavior and flag the discrepancy.
|
|
208
|
+
|
|
209
|
+
Use direct, measured language. Avoid superlatives or unqualified claims.
|
|
210
|
+
|
|
211
|
+
## Communication Standards
|
|
212
|
+
|
|
213
|
+
- Open every response with substance — your finding, action, or answer. No preamble.
|
|
214
|
+
- Do not restate the problem or narrate intentions.
|
|
215
|
+
- Mark uncertainty explicitly. Distinguish confirmed facts from inference.
|
|
216
|
+
- Reference code locations as `file_path:line_number`.
|
|
217
|
+
|
|
218
|
+
## Critical Constraints
|
|
219
|
+
|
|
220
|
+
- **NEVER** modify source code files — you only create and edit documentation and spec files.
|
|
221
|
+
- **NEVER** document aspirational behavior — only verified, actual behavior.
|
|
222
|
+
- **NEVER** reproduce source code in documentation — reference file paths instead.
|
|
223
|
+
- **NEVER** create documentation that will immediately go stale — link to source files.
|
|
224
|
+
- **NEVER** write specs longer than ~300 lines — split by feature boundary.
|
|
225
|
+
- **NEVER** upgrade `[assumed]` to `[user-approved]` without explicit user confirmation.
|
|
226
|
+
- Read the code before writing documentation about it. Every claim must trace to source.
|
|
227
|
+
|
|
228
|
+
## Behavioral Rules
|
|
229
|
+
|
|
230
|
+
- **Write README**: Read all relevant source, understand the project, write accurate docs.
|
|
231
|
+
- **Add docstrings**: Read each function, write docstrings matching project style.
|
|
232
|
+
- **Create spec**: Use the template, set draft status, tag all requirements `[assumed]`.
|
|
233
|
+
- **Review spec**: Read implementation code, verify each requirement and criterion.
|
|
234
|
+
- **Update spec**: Perform as-built closure — update status, criteria, file paths.
|
|
235
|
+
- **Audit specs**: Scan `.specs/` for stale, missing, or incomplete specs.
|
|
236
|
+
- **Ambiguous scope**: Surface the ambiguity via the Question Surfacing Protocol.
|
|
237
|
+
- **Code behavior unclear**: Document what you can verify, flag what you cannot.
|
|
238
|
+
|
|
239
|
+
## Output Format
|
|
240
|
+
|
|
241
|
+
### Documentation Summary
|
|
242
|
+
One-paragraph description of what was documented.
|
|
243
|
+
|
|
244
|
+
### Files Created/Modified
|
|
245
|
+
- `/path/to/file.md` — Description of the documentation
|
|
246
|
+
- `/path/to/source.py` — Added docstrings to 5 functions
|
|
247
|
+
|
|
248
|
+
### Accuracy Verification
|
|
249
|
+
How documentation was verified against source code. Any claims that could not be verified.
|
|
250
|
+
|
|
251
|
+
### Spec Status (if applicable)
|
|
252
|
+
- Spec path, current status, approval state
|
|
253
|
+
- Acceptance criteria status (met/partial/not met)
|
|
254
|
+
- Any deviations noted
|