codeforge-dev 1.10.0 → 1.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.
- package/.devcontainer/.env +7 -1
- package/.devcontainer/.gitignore +1 -0
- package/.devcontainer/CHANGELOG.md +138 -0
- package/.devcontainer/CLAUDE.md +87 -8
- package/.devcontainer/README.md +55 -18
- package/.devcontainer/config/defaults/main-system-prompt.md +132 -152
- package/.devcontainer/config/defaults/rules/session-search.md +66 -0
- package/.devcontainer/config/defaults/rules/spec-workflow.md +39 -12
- package/.devcontainer/config/defaults/settings.json +2 -1
- package/.devcontainer/config/defaults/writing-system-prompt.md +185 -0
- package/.devcontainer/config/file-manifest.json +12 -0
- package/.devcontainer/connect-external-terminal.ps1 +1 -1
- package/.devcontainer/devcontainer.json +40 -10
- package/.devcontainer/docs/configuration-reference.md +3 -0
- package/.devcontainer/docs/plugins.md +9 -2
- package/.devcontainer/docs/troubleshooting.md +2 -2
- package/.devcontainer/features/README.md +8 -9
- package/.devcontainer/features/agent-browser/devcontainer-feature.json +21 -21
- package/.devcontainer/features/agent-browser/install.sh +0 -7
- package/.devcontainer/features/ast-grep/devcontainer-feature.json +22 -22
- package/.devcontainer/features/biome/devcontainer-feature.json +12 -14
- package/.devcontainer/features/ccms/README.md +50 -0
- package/.devcontainer/features/ccms/devcontainer-feature.json +21 -0
- package/.devcontainer/features/ccms/install.sh +122 -0
- package/.devcontainer/features/ccstatusline/install.sh +24 -2
- package/.devcontainer/features/lsp-servers/devcontainer-feature.json +43 -43
- package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +2 -1
- package/.devcontainer/features/ruff/devcontainer-feature.json +17 -19
- package/.devcontainer/features/tmux/install.sh +2 -2
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +8 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/README.md +81 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/README.md +92 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/README.md +250 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/architect.md +1 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/debug-logs.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/dependency-analyst.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/doc-writer.md +4 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/explorer.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/generalist.md +2 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/git-archaeologist.md +2 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/researcher.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/security-auditor.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/spec-writer.md +8 -8
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +10 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py +15 -4
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/inject-cwd.py +37 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +24 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/spec-reminder.py +3 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/SKILL.md +353 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/references/review-checklist.md +175 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-check/SKILL.md +15 -14
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/SKILL.md +12 -11
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/backlog-template.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/milestones-template.md +32 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/SKILL.md +17 -18
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/references/template.md +12 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-review/SKILL.md +229 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-update/SKILL.md +6 -2
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/SKILL.md +1 -1
- package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/.claude-plugin/plugin.json +38 -5
- package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/README.md +41 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/README.md +72 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +73 -47
- package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/README.md +42 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/README.md +86 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/hooks/hooks.json +25 -15
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected-bash.py +122 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +3 -3
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/README.md +96 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/README.md +94 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/__pycache__/guard-workspace-scope.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +132 -0
- package/.devcontainer/scripts/check-setup.sh +1 -1
- package/.devcontainer/scripts/setup-aliases.sh +68 -75
- package/.devcontainer/scripts/setup-projects.sh +23 -16
- package/.devcontainer/scripts/setup.sh +48 -5
- package/README.md +17 -8
- package/package.json +1 -2
- package/.devcontainer/features/mcp-reasoner/README.md +0 -177
- package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +0 -25
- package/.devcontainer/features/mcp-reasoner/install.sh +0 -184
- package/.devcontainer/features/mcp-reasoner/poststart-hook.sh +0 -67
- package/.devcontainer/features/splitrail/README.md +0 -140
- package/.devcontainer/features/splitrail/devcontainer-feature.json +0 -39
- package/.devcontainer/features/splitrail/install.sh +0 -136
- package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/roadmap-template.md +0 -33
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# code-directive
|
|
2
|
+
|
|
3
|
+
The core Claude Code plugin for CodeForge. Provides 17 custom agent definitions, 28 coding reference skills, and 12 hook scripts spanning 6 lifecycle events. Handles agent redirection, skill suggestion, syntax validation, edited file collection, advisory testing, and session-start context injection.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
### Agents (17)
|
|
8
|
+
|
|
9
|
+
Custom agent definitions that replace Claude Code's built-in subagents with enhanced, purpose-built alternatives. Each agent is a markdown prompt file in `agents/` that defines the agent's role, constraints, tools, and workflow.
|
|
10
|
+
|
|
11
|
+
| Agent | Role |
|
|
12
|
+
|-------|------|
|
|
13
|
+
| `architect` | System design, planning, architecture decisions |
|
|
14
|
+
| `bash-exec` | Shell command execution with safety guardrails |
|
|
15
|
+
| `claude-guide` | Claude Code usage guidance and troubleshooting |
|
|
16
|
+
| `debug-logs` | Log analysis and debugging |
|
|
17
|
+
| `dependency-analyst` | Dependency auditing, upgrades, and vulnerability analysis |
|
|
18
|
+
| `doc-writer` | Documentation authoring |
|
|
19
|
+
| `explorer` | Codebase exploration and context gathering |
|
|
20
|
+
| `generalist` | General-purpose tasks |
|
|
21
|
+
| `git-archaeologist` | Git history investigation and forensics |
|
|
22
|
+
| `migrator` | Code migration and framework upgrades |
|
|
23
|
+
| `perf-profiler` | Performance profiling and optimization |
|
|
24
|
+
| `refactorer` | Code refactoring and restructuring |
|
|
25
|
+
| `researcher` | Research and information gathering |
|
|
26
|
+
| `security-auditor` | Security review and vulnerability assessment |
|
|
27
|
+
| `spec-writer` | Specification authoring |
|
|
28
|
+
| `statusline-config` | Status line configuration |
|
|
29
|
+
| `test-writer` | Test authoring |
|
|
30
|
+
|
|
31
|
+
### Agent Redirection
|
|
32
|
+
|
|
33
|
+
The `redirect-builtin-agents.py` PreToolUse hook transparently swaps built-in agent types to custom agents whenever Claude spawns a subagent via the Task tool:
|
|
34
|
+
|
|
35
|
+
| Built-in Agent | Redirects To |
|
|
36
|
+
|----------------|--------------|
|
|
37
|
+
| `Explore` | `explorer` |
|
|
38
|
+
| `Plan` | `architect` |
|
|
39
|
+
| `general-purpose` | `generalist` |
|
|
40
|
+
| `Bash` | `bash-exec` |
|
|
41
|
+
| `claude-code-guide` | `claude-guide` |
|
|
42
|
+
| `statusline-setup` | `statusline-config` |
|
|
43
|
+
|
|
44
|
+
See `AGENT-REDIRECTION.md` for the full technical guide on how the PreToolUse hook contract works.
|
|
45
|
+
|
|
46
|
+
### Skills (28)
|
|
47
|
+
|
|
48
|
+
Reference skill packages that provide domain-specific knowledge. Each skill lives in its own directory under `skills/` with a `SKILL.md` entry point and optional `references/` subdirectory. Skills are loaded on demand via slash commands.
|
|
49
|
+
|
|
50
|
+
| Skill | Domain |
|
|
51
|
+
|-------|--------|
|
|
52
|
+
| `api-design` | REST conventions, error handling |
|
|
53
|
+
| `ast-grep-patterns` | Structural code search patterns |
|
|
54
|
+
| `claude-agent-sdk` | Claude Agent SDK (TypeScript) |
|
|
55
|
+
| `claude-code-headless` | Claude Code CLI, SDK, and MCP |
|
|
56
|
+
| `debugging` | Error patterns, log analysis |
|
|
57
|
+
| `dependency-management` | Package ecosystems, license compliance |
|
|
58
|
+
| `docker` | Dockerfile patterns, Compose services |
|
|
59
|
+
| `docker-py` | Docker SDK for Python |
|
|
60
|
+
| `documentation-patterns` | API docs, docstring formats |
|
|
61
|
+
| `fastapi` | FastAPI routing, Pydantic, SSE, middleware |
|
|
62
|
+
| `git-forensics` | Git investigation commands, playbooks |
|
|
63
|
+
| `migration-patterns` | Python and JavaScript migration guides |
|
|
64
|
+
| `performance-profiling` | Profiling tools, result interpretation |
|
|
65
|
+
| `pydantic-ai` | PydanticAI agents, tools, models |
|
|
66
|
+
| `refactoring-patterns` | Safe transformations, code smell catalog |
|
|
67
|
+
| `security-checklist` | OWASP patterns, secrets management |
|
|
68
|
+
| `skill-building` | Skill authoring patterns and principles |
|
|
69
|
+
| `spec-build` | Specification-driven implementation lifecycle |
|
|
70
|
+
| `spec-check` | Specification health audit |
|
|
71
|
+
| `spec-init` | Initialize `.specs/` directory |
|
|
72
|
+
| `spec-new` | Create new specification from template |
|
|
73
|
+
| `spec-refine` | Validate spec assumptions with user |
|
|
74
|
+
| `spec-review` | Verify implementation against spec |
|
|
75
|
+
| `spec-update` | As-built spec update |
|
|
76
|
+
| `specification-writing` | EARS templates, criteria patterns |
|
|
77
|
+
| `sqlite` | SQLite patterns (Python, JavaScript, advanced) |
|
|
78
|
+
| `svelte5` | Svelte 5 runes, components, routing |
|
|
79
|
+
| `testing` | FastAPI testing, Svelte testing |
|
|
80
|
+
|
|
81
|
+
### Hook Scripts (12)
|
|
82
|
+
|
|
83
|
+
| Script | Hook Event | Matcher | Purpose |
|
|
84
|
+
|--------|-----------|---------|---------|
|
|
85
|
+
| `redirect-builtin-agents.py` | PreToolUse | Task | Redirects built-in agents to custom agents |
|
|
86
|
+
| `skill-suggester.py` | UserPromptSubmit | * | Suggests relevant skills based on prompt keywords |
|
|
87
|
+
| `ticket-linker.py` | UserPromptSubmit | * | Auto-fetches GitHub issues/PRs referenced by #123 or URL |
|
|
88
|
+
| `skill-suggester.py` | SubagentStart | Plan | Suggests skills for planning agents |
|
|
89
|
+
| `inject-cwd.py` | SubagentStart | * | Injects working directory into subagent context |
|
|
90
|
+
| `advisory-test-runner.py` | Stop | * | Runs affected tests and injects results as context |
|
|
91
|
+
| `commit-reminder.py` | Stop | * | Advises about uncommitted changes |
|
|
92
|
+
| `spec-reminder.py` | Stop | * | Advises about spec updates after code changes |
|
|
93
|
+
| `git-state-injector.py` | SessionStart | * | Injects branch, status, and recent commits at session start |
|
|
94
|
+
| `todo-harvester.py` | SessionStart | * | Surfaces TODO/FIXME/HACK/XXX comments from the codebase |
|
|
95
|
+
| `syntax-validator.py` | PostToolUse | Edit\|Write | Validates JSON, JSONC, YAML, TOML syntax after edits |
|
|
96
|
+
| `collect-edited-files.py` | PostToolUse | Edit\|Write | Records edited file paths for batch formatting/linting |
|
|
97
|
+
|
|
98
|
+
## How It Works
|
|
99
|
+
|
|
100
|
+
### Hook Lifecycle
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
Session starts
|
|
104
|
+
│
|
|
105
|
+
├─→ git-state-injector.py Injects branch, status, recent commits
|
|
106
|
+
└─→ todo-harvester.py Surfaces TODO/FIXME markers
|
|
107
|
+
|
|
108
|
+
User submits a prompt
|
|
109
|
+
│
|
|
110
|
+
├─→ skill-suggester.py Suggests skills matching prompt keywords
|
|
111
|
+
└─→ ticket-linker.py Fetches GitHub issues referenced by #123 or URL
|
|
112
|
+
|
|
113
|
+
Claude spawns a subagent
|
|
114
|
+
│
|
|
115
|
+
├─→ redirect-builtin-agents.py Swaps built-in agents for custom ones (Task matcher)
|
|
116
|
+
├─→ skill-suggester.py Suggests skills for Plan agents
|
|
117
|
+
└─→ inject-cwd.py Tells subagent the working directory
|
|
118
|
+
|
|
119
|
+
Claude edits a file (Edit/Write)
|
|
120
|
+
│
|
|
121
|
+
├─→ syntax-validator.py Validates JSON/YAML/TOML syntax immediately
|
|
122
|
+
└─→ collect-edited-files.py Appends path to session temp files
|
|
123
|
+
|
|
124
|
+
Claude stops responding
|
|
125
|
+
│
|
|
126
|
+
├─→ advisory-test-runner.py Runs affected tests, injects results
|
|
127
|
+
├─→ commit-reminder.py Advises about uncommitted changes
|
|
128
|
+
└─→ spec-reminder.py Advises about spec updates
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Temp File Convention
|
|
132
|
+
|
|
133
|
+
Edited file paths are stored in session-scoped temp files for downstream consumption:
|
|
134
|
+
- `/tmp/claude-edited-files-{session_id}` — consumed by the `auto-formatter` plugin
|
|
135
|
+
- `/tmp/claude-lint-files-{session_id}` — consumed by the `auto-linter` plugin
|
|
136
|
+
|
|
137
|
+
### Advisory Test Runner
|
|
138
|
+
|
|
139
|
+
The test runner maps edited source files to their corresponding test files, runs only affected tests, and injects pass/fail results as `additionalContext`. It never blocks Claude — results are purely informational.
|
|
140
|
+
|
|
141
|
+
### Skill Suggester
|
|
142
|
+
|
|
143
|
+
Matches user prompts against keyword maps (phrases + individual terms) for each skill. When a skill matches, it injects a suggestion as `systemMessage` (UserPromptSubmit) or `additionalContext` (SubagentStart) so Claude knows which skill to load.
|
|
144
|
+
|
|
145
|
+
### Ticket Linker
|
|
146
|
+
|
|
147
|
+
Detects `#123` references and full GitHub issue/PR URLs in user prompts, fetches the ticket body via `gh`, and injects it as `additionalContext`. Handles up to 3 references per prompt with a 1500-character cap per ticket body.
|
|
148
|
+
|
|
149
|
+
### Timeouts
|
|
150
|
+
|
|
151
|
+
| Script | Timeout |
|
|
152
|
+
|--------|---------|
|
|
153
|
+
| redirect-builtin-agents.py | 5s |
|
|
154
|
+
| skill-suggester.py | 3s |
|
|
155
|
+
| ticket-linker.py | 12s |
|
|
156
|
+
| inject-cwd.py | 3s |
|
|
157
|
+
| advisory-test-runner.py | 20s |
|
|
158
|
+
| commit-reminder.py | 8s |
|
|
159
|
+
| spec-reminder.py | 8s |
|
|
160
|
+
| git-state-injector.py | 10s |
|
|
161
|
+
| todo-harvester.py | 8s |
|
|
162
|
+
| syntax-validator.py | 5s |
|
|
163
|
+
| collect-edited-files.py | 3s |
|
|
164
|
+
|
|
165
|
+
## Documentation
|
|
166
|
+
|
|
167
|
+
- `AGENT-REDIRECTION.md` — Technical guide to the PreToolUse hook contract for agent redirection
|
|
168
|
+
- `REVIEW-RUBRIC.md` — Quality rubric for agent and skill design, based on Anthropic's prompt engineering documentation
|
|
169
|
+
|
|
170
|
+
## Plugin Structure
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
code-directive/
|
|
174
|
+
├── .claude-plugin/
|
|
175
|
+
│ ├── plugin.json # Plugin metadata
|
|
176
|
+
│ └── commands/
|
|
177
|
+
│ └── debug.md # /debug slash command
|
|
178
|
+
├── agents/ # 17 custom agent definitions
|
|
179
|
+
│ ├── architect.md
|
|
180
|
+
│ ├── bash-exec.md
|
|
181
|
+
│ ├── claude-guide.md
|
|
182
|
+
│ ├── debug-logs.md
|
|
183
|
+
│ ├── dependency-analyst.md
|
|
184
|
+
│ ├── doc-writer.md
|
|
185
|
+
│ ├── explorer.md
|
|
186
|
+
│ ├── generalist.md
|
|
187
|
+
│ ├── git-archaeologist.md
|
|
188
|
+
│ ├── migrator.md
|
|
189
|
+
│ ├── perf-profiler.md
|
|
190
|
+
│ ├── refactorer.md
|
|
191
|
+
│ ├── researcher.md
|
|
192
|
+
│ ├── security-auditor.md
|
|
193
|
+
│ ├── spec-writer.md
|
|
194
|
+
│ ├── statusline-config.md
|
|
195
|
+
│ └── test-writer.md
|
|
196
|
+
├── skills/ # 28 coding reference skills
|
|
197
|
+
│ ├── api-design/
|
|
198
|
+
│ ├── ast-grep-patterns/
|
|
199
|
+
│ ├── claude-agent-sdk/
|
|
200
|
+
│ ├── claude-code-headless/
|
|
201
|
+
│ ├── debugging/
|
|
202
|
+
│ ├── dependency-management/
|
|
203
|
+
│ ├── docker/
|
|
204
|
+
│ ├── docker-py/
|
|
205
|
+
│ ├── documentation-patterns/
|
|
206
|
+
│ ├── fastapi/
|
|
207
|
+
│ ├── git-forensics/
|
|
208
|
+
│ ├── migration-patterns/
|
|
209
|
+
│ ├── performance-profiling/
|
|
210
|
+
│ ├── pydantic-ai/
|
|
211
|
+
│ ├── refactoring-patterns/
|
|
212
|
+
│ ├── security-checklist/
|
|
213
|
+
│ ├── skill-building/
|
|
214
|
+
│ ├── spec-build/
|
|
215
|
+
│ ├── spec-check/
|
|
216
|
+
│ ├── spec-init/
|
|
217
|
+
│ ├── spec-new/
|
|
218
|
+
│ ├── spec-refine/
|
|
219
|
+
│ ├── spec-review/
|
|
220
|
+
│ ├── spec-update/
|
|
221
|
+
│ ├── specification-writing/
|
|
222
|
+
│ ├── sqlite/
|
|
223
|
+
│ ├── svelte5/
|
|
224
|
+
│ └── testing/
|
|
225
|
+
├── hooks/
|
|
226
|
+
│ └── hooks.json # All hook registrations (6 events, 12 scripts)
|
|
227
|
+
├── scripts/
|
|
228
|
+
│ ├── advisory-test-runner.py # Stop: runs affected tests
|
|
229
|
+
│ ├── collect-edited-files.py # PostToolUse: records edited file paths
|
|
230
|
+
│ ├── commit-reminder.py # Stop: uncommitted changes advisory
|
|
231
|
+
│ ├── git-state-injector.py # SessionStart: injects git state
|
|
232
|
+
│ ├── guard-readonly-bash.py # Read-only bash guard (used by agents)
|
|
233
|
+
│ ├── inject-cwd.py # SubagentStart: injects working directory
|
|
234
|
+
│ ├── redirect-builtin-agents.py # PreToolUse: agent redirection
|
|
235
|
+
│ ├── skill-suggester.py # UserPromptSubmit/SubagentStart: skill suggestions
|
|
236
|
+
│ ├── spec-reminder.py # Stop: spec update advisory
|
|
237
|
+
│ ├── syntax-validator.py # PostToolUse: JSON/YAML/TOML validation
|
|
238
|
+
│ ├── ticket-linker.py # UserPromptSubmit: auto-fetch GitHub issues
|
|
239
|
+
│ ├── todo-harvester.py # SessionStart: TODO/FIXME surfacing
|
|
240
|
+
│ ├── verify-no-regression.py # Test verification utility
|
|
241
|
+
│ └── verify-tests-pass.py # Test verification utility
|
|
242
|
+
├── AGENT-REDIRECTION.md # Agent redirection technical guide
|
|
243
|
+
└── REVIEW-RUBRIC.md # Agent & skill quality rubric
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Requirements
|
|
247
|
+
|
|
248
|
+
- Python 3.11+
|
|
249
|
+
- Claude Code with plugin hook support
|
|
250
|
+
- [GitHub CLI](https://cli.github.com/) (`gh`) for ticket-linker functionality
|
package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md
CHANGED
|
@@ -11,7 +11,7 @@ description: >-
|
|
|
11
11
|
spawning a new instance, check if there is already a running or recently
|
|
12
12
|
completed claude-guide agent that you can resume using the "resume" parameter.
|
|
13
13
|
tools: Glob, Grep, Read, WebFetch, WebSearch
|
|
14
|
-
model:
|
|
14
|
+
model: sonnet
|
|
15
15
|
color: cyan
|
|
16
16
|
memory:
|
|
17
17
|
scope: user
|
|
@@ -66,7 +66,7 @@ Direct model interaction via the Claude API (formerly Anthropic API). Covers Mes
|
|
|
66
66
|
# Project-level configuration (relative to workspace root)
|
|
67
67
|
.claude/settings.json # Active settings
|
|
68
68
|
.claude/keybindings.json # Active keybindings
|
|
69
|
-
.claude/system-prompt.md
|
|
69
|
+
.claude/main-system-prompt.md # Active system prompt
|
|
70
70
|
CLAUDE.md # Project instructions
|
|
71
71
|
|
|
72
72
|
# DevContainer configuration
|
|
@@ -5,7 +5,7 @@ description: >-
|
|
|
5
5
|
application frameworks, and system services to identify errors, crashes,
|
|
6
6
|
and performance issues. Reports structured findings with root cause assessment.
|
|
7
7
|
tools: Bash, Read, Glob, Grep
|
|
8
|
-
model:
|
|
8
|
+
model: opus
|
|
9
9
|
color: red
|
|
10
10
|
skills:
|
|
11
11
|
- debugging
|
|
@@ -267,10 +267,10 @@ Follow these principles in all documentation:
|
|
|
267
267
|
- **Architecture docs requested**: Trace the system's component boundaries, data flows, and key decisions. Produce a document that would onboard a new developer effectively.
|
|
268
268
|
- **No specific request**: Ask the user what documentation they need. If they point to a file or module, offer to add inline documentation to its public API.
|
|
269
269
|
- **Behavior unclear**: If you read a function and cannot determine its exact behavior, document what you can verify and add a `TODO: verify — [specific question]` annotation so a human can fill in the gap.
|
|
270
|
-
- **
|
|
271
|
-
for the
|
|
272
|
-
into
|
|
273
|
-
don't accumulate snapshot documents. Update the relevant
|
|
270
|
+
- **Milestone ships** (e.g., "consolidate milestone docs"): Read all build-time artifacts
|
|
271
|
+
for the milestone (architecture docs, decision records, phase plans). Consolidate
|
|
272
|
+
into as-built specs. Delete or merge superseded planning artifacts —
|
|
273
|
+
don't accumulate snapshot documents. Update the relevant specs in place.
|
|
274
274
|
- **Always report** what was documented, what was verified versus assumed, and what needs human review.
|
|
275
275
|
|
|
276
276
|
## Output Format
|
|
@@ -8,7 +8,7 @@ description: >-
|
|
|
8
8
|
any complex task that doesn't fit a specialist agent's domain. Has access
|
|
9
9
|
to all tools and can both read and write files.
|
|
10
10
|
tools: "*"
|
|
11
|
-
model:
|
|
11
|
+
model: opus
|
|
12
12
|
color: green
|
|
13
13
|
memory:
|
|
14
14
|
scope: project
|
|
@@ -17,6 +17,7 @@ skills:
|
|
|
17
17
|
- spec-update
|
|
18
18
|
- spec-check
|
|
19
19
|
- spec-init
|
|
20
|
+
- spec-review
|
|
20
21
|
---
|
|
21
22
|
|
|
22
23
|
# Generalist Agent
|
package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/git-archaeologist.md
CHANGED
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
of this file", "who contributed to this module", "recover lost commit",
|
|
10
10
|
"trace this function's evolution", or needs any git history forensics.
|
|
11
11
|
tools: Read, Grep, Bash
|
|
12
|
-
model:
|
|
12
|
+
model: sonnet
|
|
13
13
|
color: blue
|
|
14
14
|
memory:
|
|
15
15
|
scope: project
|
|
@@ -52,7 +52,7 @@ Before starting work, read project-specific instructions:
|
|
|
52
52
|
- **NEVER** change the working tree — no `git checkout`, `git reset`, `git restore`, `git clean`, or `git switch`. Changing the working tree could discard the user's uncommitted work.
|
|
53
53
|
- **NEVER** modify refs — no `git tag`, `git branch -d`, `git branch -m`, or `git update-ref`.
|
|
54
54
|
- **NEVER** modify configuration — no `git config` writes.
|
|
55
|
-
- Your Bash usage is **git-read-only guarded**. Only these git subcommands are permitted: `log`, `blame`, `show`, `diff`, `bisect` (view mode only), `reflog`, `shortlog`, `rev-list`, `rev-parse`, `ls-files`, `ls-tree`, `cat-file`, `name-rev`, `describe`, `merge-base`, `branch -a` / `branch --list`, `remote -v`, `stash list`.
|
|
55
|
+
- Your Bash usage is **git-read-only guarded**. Only these git subcommands are permitted: `log`, `blame`, `show`, `diff`, `bisect` (view mode only), `reflog`, `shortlog`, `rev-list`, `rev-parse`, `ls-files`, `ls-tree`, `cat-file`, `name-rev`, `describe`, `merge-base`, `branch -a` / `branch --list`, `remote -v`, `stash list`, `worktree list`.
|
|
56
56
|
- You may also use `Read`, `Grep`, and non-git Bash commands that are read-only (`wc`, `sort`, `head`, `uniq`).
|
|
57
57
|
|
|
58
58
|
## Investigation Workflow
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
technology comparison, or technical deep-dives. Reports structured findings
|
|
10
10
|
with citations without modifying any files.
|
|
11
11
|
tools: Read, Glob, Grep, WebSearch, WebFetch, Bash
|
|
12
|
-
model:
|
|
12
|
+
model: opus
|
|
13
13
|
color: cyan
|
|
14
14
|
memory:
|
|
15
15
|
scope: user
|
|
@@ -21,6 +21,7 @@ skills:
|
|
|
21
21
|
- spec-check
|
|
22
22
|
- spec-init
|
|
23
23
|
- spec-refine
|
|
24
|
+
- spec-review
|
|
24
25
|
---
|
|
25
26
|
|
|
26
27
|
# Spec Writer Agent
|
|
@@ -62,10 +63,9 @@ When uncertain, investigate first — read the code, check the docs — rather t
|
|
|
62
63
|
- **ALL** requirements you generate MUST be tagged `[assumed]`. You never produce `[user-approved]` requirements — only `/spec-refine` does that after explicit user validation.
|
|
63
64
|
- **ALL** specs you produce MUST carry `**Approval:** draft`. After presenting a draft, state: "This spec requires `/spec-refine` before implementation can begin. All requirements are marked [assumed] until user-approved."
|
|
64
65
|
- **Aim for ~200 lines per spec.** When a spec grows beyond that, recommend
|
|
65
|
-
splitting into
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
for an arbitrary cap.
|
|
66
|
+
splitting into separate specs in the domain folder. Shorter specs are
|
|
67
|
+
easier to consume and maintain, but complex features sometimes need more
|
|
68
|
+
space — don't sacrifice completeness for an arbitrary cap.
|
|
69
69
|
- **NEVER** reproduce source code, SQL schemas, or type definitions inline.
|
|
70
70
|
Reference file paths instead (e.g., "see `src/engine/db/migrations/002.sql`
|
|
71
71
|
lines 48-70"). The code is the source of truth; duplicated snippets go stale.
|
|
@@ -122,9 +122,9 @@ Write the specification using the formats below.
|
|
|
122
122
|
4. **Define non-functional requirements** — Performance, security, accessibility where relevant.
|
|
123
123
|
5. **List open questions** — Any unresolved decisions or unknowns that need stakeholder input.
|
|
124
124
|
6. **Check length** — If the draft exceeds ~200 lines, consider whether it
|
|
125
|
-
would be clearer as
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
would be clearer as separate specs in the domain folder. Each spec
|
|
126
|
+
should be independently loadable. If the length is justified by
|
|
127
|
+
complexity, note it and proceed.
|
|
128
128
|
7. **Reference, don't reproduce** — Scan your draft for inline code blocks
|
|
129
129
|
containing schemas, SQL, type definitions, or configuration. Replace with
|
|
130
130
|
file path references and brief descriptions of what's there.
|
|
@@ -238,7 +238,7 @@ Present specifications in this structure:
|
|
|
238
238
|
|
|
239
239
|
```markdown
|
|
240
240
|
# Feature: [Name]
|
|
241
|
-
**
|
|
241
|
+
**Domain:** [domain-name]
|
|
242
242
|
**Status:** planned
|
|
243
243
|
**Last Updated:** YYYY-MM-DD
|
|
244
244
|
**Approval:** draft
|
|
Binary file
|
package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py
CHANGED
|
@@ -47,20 +47,31 @@ def _cap_lines(text: str, limit: int) -> str:
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
def main():
|
|
50
|
+
# Parse hook input to get cwd from Claude Code (falls back to os.getcwd())
|
|
51
|
+
cwd = os.getcwd()
|
|
50
52
|
try:
|
|
51
|
-
json.load(sys.stdin)
|
|
53
|
+
input_data = json.load(sys.stdin)
|
|
54
|
+
cwd = input_data.get("cwd", cwd)
|
|
52
55
|
except (json.JSONDecodeError, ValueError):
|
|
53
56
|
pass
|
|
54
57
|
|
|
55
|
-
cwd = os.getcwd()
|
|
56
|
-
|
|
57
58
|
# Check if we're in a git repo at all
|
|
58
59
|
branch = _run_git(["branch", "--show-current"], cwd)
|
|
59
60
|
if branch is None:
|
|
60
|
-
# Not a git repo or git not available
|
|
61
|
+
# Not a git repo or git not available — still inject working directory
|
|
62
|
+
output = (
|
|
63
|
+
f"[Git State]\n"
|
|
64
|
+
f"Working Directory: {cwd} — restrict all file operations to this "
|
|
65
|
+
f"directory unless explicitly instructed otherwise."
|
|
66
|
+
)
|
|
67
|
+
json.dump({"additionalContext": output}, sys.stdout)
|
|
61
68
|
sys.exit(0)
|
|
62
69
|
|
|
63
70
|
sections = []
|
|
71
|
+
sections.append(
|
|
72
|
+
f"Working Directory: {cwd} — restrict all file operations to this "
|
|
73
|
+
f"directory unless explicitly instructed otherwise."
|
|
74
|
+
)
|
|
64
75
|
sections.append(f"Branch: {branch or '(detached HEAD)'}")
|
|
65
76
|
|
|
66
77
|
# Git status
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
CWD injector — SubagentStart hook that tells subagents the working directory.
|
|
4
|
+
|
|
5
|
+
Reads hook input from stdin (JSON), extracts cwd, and returns it as
|
|
6
|
+
additionalContext so every subagent knows where to scope its work.
|
|
7
|
+
|
|
8
|
+
Always exits 0 (advisory, never blocking).
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def main():
|
|
17
|
+
cwd = os.getcwd()
|
|
18
|
+
try:
|
|
19
|
+
input_data = json.load(sys.stdin)
|
|
20
|
+
cwd = input_data.get("cwd", cwd)
|
|
21
|
+
except (json.JSONDecodeError, ValueError):
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
json.dump(
|
|
25
|
+
{
|
|
26
|
+
"additionalContext": (
|
|
27
|
+
f"Working Directory: {cwd} — restrict all file operations to "
|
|
28
|
+
f"this directory unless explicitly instructed otherwise."
|
|
29
|
+
)
|
|
30
|
+
},
|
|
31
|
+
sys.stdout,
|
|
32
|
+
)
|
|
33
|
+
sys.exit(0)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
if __name__ == "__main__":
|
|
37
|
+
main()
|
package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py
CHANGED
|
@@ -296,6 +296,30 @@ SKILLS = {
|
|
|
296
296
|
],
|
|
297
297
|
"terms": ["migrate", "migration", "upgrade"],
|
|
298
298
|
},
|
|
299
|
+
"spec-build": {
|
|
300
|
+
"phrases": [
|
|
301
|
+
"implement the spec",
|
|
302
|
+
"build from spec",
|
|
303
|
+
"start building",
|
|
304
|
+
"spec-build",
|
|
305
|
+
"implement this feature from the spec",
|
|
306
|
+
"build what the spec describes",
|
|
307
|
+
"implement from the spec",
|
|
308
|
+
"build the feature",
|
|
309
|
+
],
|
|
310
|
+
"terms": ["spec-build"],
|
|
311
|
+
},
|
|
312
|
+
"spec-review": {
|
|
313
|
+
"phrases": [
|
|
314
|
+
"review the spec",
|
|
315
|
+
"check spec adherence",
|
|
316
|
+
"verify implementation",
|
|
317
|
+
"spec-review",
|
|
318
|
+
"does code match spec",
|
|
319
|
+
"audit implementation",
|
|
320
|
+
],
|
|
321
|
+
"terms": ["spec-review"],
|
|
322
|
+
},
|
|
299
323
|
}
|
|
300
324
|
|
|
301
325
|
# Pre-compile term patterns for whole-word matching
|
package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/spec-reminder.py
CHANGED
|
@@ -109,8 +109,9 @@ def main():
|
|
|
109
109
|
message = (
|
|
110
110
|
f"[Spec Reminder] Code was modified in {dirs_str} "
|
|
111
111
|
"but no specs were updated. "
|
|
112
|
-
"Use /spec-
|
|
113
|
-
"/spec-
|
|
112
|
+
"Use /spec-review to verify implementation against the spec, "
|
|
113
|
+
"then /spec-update to close the loop. "
|
|
114
|
+
"Use /spec-new if no spec exists for this feature, "
|
|
114
115
|
"or /spec-refine if the spec is still in draft status."
|
|
115
116
|
)
|
|
116
117
|
|