claude-dev-kit 2.1.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/.claude/agents/angelic-workshop-energy-clearing.md +113 -0
- package/.claude/agents/angelic-workshop-intake.md +84 -0
- package/.claude/agents/angelic-workshop-integration.md +140 -0
- package/.claude/agents/angelic-workshop-invocation.md +92 -0
- package/.claude/agents/angelic-workshop-lead.md +225 -0
- package/.claude/agents/angelic-workshop-transmission.md +108 -0
- package/.claude/agents/deep-think-partner.md +41 -0
- package/.claude/agents/dev-backend.md +74 -0
- package/.claude/agents/dev-e2e.md +101 -0
- package/.claude/agents/dev-frontend.md +82 -0
- package/.claude/agents/dev-lead.md +144 -0
- package/.claude/agents/dev-reviewer.md +122 -0
- package/.claude/agents/dev-test.md +88 -0
- package/.claude/agents/documentation-manager.md +73 -0
- package/.claude/agents/haiku-executor.md +8 -0
- package/.claude/agents/pm-groomer.md +98 -0
- package/.claude/agents/pm-prp-writer.md +144 -0
- package/.claude/agents/pm-sizer.md +84 -0
- package/.claude/agents/project-manager.md +91 -0
- package/.claude/agents/system-architect.md +98 -0
- package/.claude/agents/validation-gates.md +121 -0
- package/.claude/agents/workflow-builder.md +416 -0
- package/.claude/commands/ai/detect.md +117 -0
- package/.claude/commands/ai/route.md +128 -0
- package/.claude/commands/ai/switch.md +121 -0
- package/.claude/commands/bs/brainstorm_full.md +149 -0
- package/.claude/commands/bs/claude.md +37 -0
- package/.claude/commands/bs/codex.md +37 -0
- package/.claude/commands/bs/gemini.md +37 -0
- package/.claude/commands/bs/glm.md +37 -0
- package/.claude/commands/bs/grok.md +37 -0
- package/.claude/commands/bs/kimi.md +37 -0
- package/.claude/commands/bs/minimax.md +37 -0
- package/.claude/commands/bs/ollama.md +71 -0
- package/.claude/commands/code/build-and-fix.md +80 -0
- package/.claude/commands/code/simplify.md +77 -0
- package/.claude/commands/dev/backend.md +47 -0
- package/.claude/commands/dev/e2e.md +49 -0
- package/.claude/commands/dev/frontend.md +45 -0
- package/.claude/commands/dev/review.md +48 -0
- package/.claude/commands/dev/test.md +54 -0
- package/.claude/commands/dev-epic.md +121 -0
- package/.claude/commands/dev-issue.md +79 -0
- package/.claude/commands/dev.md +134 -0
- package/.claude/commands/execute-prp.md +113 -0
- package/.claude/commands/fix-github-issue.md +14 -0
- package/.claude/commands/generate-prp.md +73 -0
- package/.claude/commands/git/status.md +14 -0
- package/.claude/commands/haiku.md +13 -0
- package/.claude/commands/improve.md +178 -0
- package/.claude/commands/init.md +311 -0
- package/.claude/commands/pm/groom.md +58 -0
- package/.claude/commands/pm/plan-epic.md +74 -0
- package/.claude/commands/pm/size.md +46 -0
- package/.claude/commands/pm.md +47 -0
- package/.claude/commands/primer.md +16 -0
- package/.claude/commands/self-improve.md +243 -0
- package/.claude/commands/think.md +68 -0
- package/.claude/commands/workflow/angelic-workshop.md +89 -0
- package/.claude/commands/workflow/build.md +91 -0
- package/.claude/hooks/pre-tool-use/block-dangerous-commands.js +196 -0
- package/.claude/hooks/skill-activation-prompt/package-lock.json +560 -0
- package/.claude/hooks/skill-activation-prompt/package.json +16 -0
- package/.claude/hooks/skill-activation-prompt/skill-activation-prompt.ts +135 -0
- package/.claude/hooks/skill-activation-prompt/skill-rules.json +50 -0
- package/.claude/hooks/stop/context_monitor.py +155 -0
- package/.claude/hooks/stop/learning_logger.py +218 -0
- package/.claude/skills/ai-router/SKILL.md +119 -0
- package/.claude/skills/build-and-fix/SKILL.md +271 -0
- package/.claude/skills/build-and-fix/examples/javascript-lint-fix.md +37 -0
- package/.claude/skills/build-and-fix/language-configs/javascript.yaml +139 -0
- package/.claude/skills/build-and-fix/references/config-schema.md +120 -0
- package/.claude/skills/build-and-fix/references/error-patterns.md +273 -0
- package/.claude/skills/code-investigator/SKILL.md +299 -0
- package/.claude/skills/code-investigator/references/investigation-workflows.md +542 -0
- package/.claude/skills/code-investigator/references/language-specific.md +761 -0
- package/.claude/skills/code-investigator/references/search-patterns.md +258 -0
- package/.claude/skills/code-investigator/references/serena-patterns.md +328 -0
- package/.claude/skills/stack-detector/SKILL.md +153 -0
- package/.claude/skills/verification-before-completion/SKILL.md +143 -0
- package/.claude/templates/claude-md-template.md +56 -0
- package/.claude/templates/stacks/express-node.md +134 -0
- package/.claude/templates/stacks/fastapi.md +152 -0
- package/.claude/templates/stacks/generic.md +101 -0
- package/.claude/templates/stacks/nextjs-prisma.md +235 -0
- package/README.md +499 -0
- package/bin/claude-dev-kit.js +11 -0
- package/package.json +31 -0
- package/scripts/install.sh +448 -0
package/README.md
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
# Claude Dev Kit
|
|
2
|
+
|
|
3
|
+
> A portable `.claude/` plugin that turns Claude Code into a fully autonomous development team — from epic grooming through validated, reviewed PRs — on **any project, any stack**. Now with multi-AI CLI support and a self-improvement feedback loop.
|
|
4
|
+
|
|
5
|
+
Run `bunx claude-dev-kit@latest` in any project. Claude gains two orchestrator agents, a full specialist sub-agent hierarchy, an MCP integration wizard, smart stack detection, a complete delivery pipeline, **multi-AI task routing** (Gemini, Codex, Grok, Kimi, OpenCode), and a **self-improvement system** that gets better with every session.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
YOU
|
|
13
|
+
│
|
|
14
|
+
├── /pm:groom / /pm:size / /pm:plan-epic
|
|
15
|
+
│ └── project-manager [opus] ─────── orchestrates planning
|
|
16
|
+
│ ├── pm-groomer [sonnet] ← writes acceptance criteria, DoD, sub-tasks
|
|
17
|
+
│ ├── pm-sizer [sonnet] ← t-shirt sizes, confidence scores, sprint plans
|
|
18
|
+
│ └── pm-prp-writer[sonnet] ← deep-research → PRP documents
|
|
19
|
+
│
|
|
20
|
+
└── /dev <issue> / /dev-issue / /dev-epic
|
|
21
|
+
└── dev-lead [opus] ──────────── orchestrates implementation
|
|
22
|
+
├── dev-backend [sonnet] ← API routes, services, DB, auth
|
|
23
|
+
├── dev-frontend [sonnet] ← components, pages, state, styling
|
|
24
|
+
├── dev-test [sonnet] ← unit tests, mocks, coverage
|
|
25
|
+
├── dev-e2e [sonnet] ← Playwright/Cypress user journeys
|
|
26
|
+
└── dev-reviewer [sonnet] ← security, correctness, pattern review
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Key principle**: Each sub-agent runs in a **clean context window** with only the specific files and facts it needs. Orchestrators trim context before every spawn — no sub-agent ever sees the full conversation history. This keeps context usage low and output quality high.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## The Full Dev Flow
|
|
34
|
+
|
|
35
|
+
### Phase 1 — Epic Grooming & Sizing
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
/pm:plan-epic "User Authentication"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Claude acts as your tech lead:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
project-manager
|
|
45
|
+
├── Fetch all open issues in the milestone
|
|
46
|
+
├── pm-groomer: Rewrites each issue with Given/When/Then criteria + DoD
|
|
47
|
+
├── pm-sizer: Scores each story (scope, novelty, risk, test burden, deps)
|
|
48
|
+
│ └── Returns sprint plan + confidence scores
|
|
49
|
+
└── pm-prp-writer: Writes detailed PRP for each L/XL story
|
|
50
|
+
└── Deep codebase scan (Gemini for large repos) + web research
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
You confirm each step before GitHub is updated.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### Phase 2 — Feature Implementation
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
/dev 142
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Claude acts as your senior engineer + code reviewer:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
dev-lead
|
|
67
|
+
├── Reads issue + PRP
|
|
68
|
+
├── Classifies work: backend-only / frontend-only / fullstack
|
|
69
|
+
├── [fullstack path]
|
|
70
|
+
│ ├── dev-backend: implements API routes + service layer
|
|
71
|
+
│ ├── dev-frontend: implements UI (receives API contracts from backend)
|
|
72
|
+
│ ├── dev-test: writes unit tests (90%+ branch coverage)
|
|
73
|
+
│ ├── dev-e2e: writes Playwright tests for user journeys
|
|
74
|
+
│ └── dev-reviewer: structured PASS/FAIL review (security, correctness, types)
|
|
75
|
+
├── Runs all 5 validation gates
|
|
76
|
+
└── Commits + creates PR with "Closes #142"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### Phase 3 — Validation Gates
|
|
82
|
+
|
|
83
|
+
Every implementation runs all 5 gates in sequence. **Claude will not commit if any gate fails** — it re-spawns the responsible sub-agent with the error output and iterates.
|
|
84
|
+
|
|
85
|
+
| Gate | What runs | Requirement |
|
|
86
|
+
|------|-----------|------------|
|
|
87
|
+
| 1 | Lint | Zero errors — fix the code, not the rule |
|
|
88
|
+
| 2 | Unit tests + coverage | All pass, threshold met (90% branch by default) |
|
|
89
|
+
| 3 | E2E tests | All pass (when user flows changed) |
|
|
90
|
+
| 4 | Static analysis | Quality gate pass (SonarQube/CodeClimate if configured) |
|
|
91
|
+
| 5 | Build / type check | Exit 0, zero type errors |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### Phase 4 — Code Review
|
|
96
|
+
|
|
97
|
+
Every implementation ends with `dev-reviewer` checking:
|
|
98
|
+
|
|
99
|
+
- **Security**: injection, auth gaps, hardcoded secrets, CSRF
|
|
100
|
+
- **Correctness**: each acceptance criterion satisfied
|
|
101
|
+
- **Pattern adherence**: mirrors existing codebase conventions
|
|
102
|
+
- **Type safety**: no `any`, nullability handled
|
|
103
|
+
- **Test quality**: error paths covered, behavior tested
|
|
104
|
+
- **File hygiene**: no `.env`, no debug logs, files under 500 lines
|
|
105
|
+
|
|
106
|
+
`FAIL` with BLOCKERs → responsible sub-agent re-spawns to fix → re-review.
|
|
107
|
+
`PASS` (or warnings only) → commits and creates PR.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Install
|
|
112
|
+
|
|
113
|
+
### Quick start
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# No clone needed — run directly with bunx or npx:
|
|
117
|
+
cd /path/to/your/project
|
|
118
|
+
bunx claude-dev-kit@latest
|
|
119
|
+
# or
|
|
120
|
+
npx claude-dev-kit@latest
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Or if you prefer to clone first:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git clone https://github.com/evandempsey/claude-dev-kit /tmp/cdk
|
|
127
|
+
bash /tmp/cdk/scripts/install.sh /path/to/your/project
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### What the installer does
|
|
131
|
+
|
|
132
|
+
**Phase 1 — File install:**
|
|
133
|
+
- Copies `.claude/` into your project
|
|
134
|
+
- Installs hook dependencies (skill-activation-prompt)
|
|
135
|
+
- Backs up any existing `.claude/` first
|
|
136
|
+
|
|
137
|
+
**Phase 2 — MCP wizard (interactive prompts):**
|
|
138
|
+
|
|
139
|
+
The installer asks about your toolchain and automatically configures the right Claude MCP integrations:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Git Platform
|
|
143
|
+
❯ GitHub → installs @modelcontextprotocol/server-github
|
|
144
|
+
GitLab → installs @modelcontextprotocol/server-gitlab
|
|
145
|
+
Bitbucket → (manual — no official MCP yet)
|
|
146
|
+
Azure DevOps → (manual)
|
|
147
|
+
None
|
|
148
|
+
|
|
149
|
+
Ticket System
|
|
150
|
+
❯ GitHub Issues → uses GitHub MCP (already installed)
|
|
151
|
+
Linear → installs @linear/mcp-server
|
|
152
|
+
Jira → installs @modelcontextprotocol/server-jira
|
|
153
|
+
Notion → installs @modelcontextprotocol/server-notion
|
|
154
|
+
Trello → (manual)
|
|
155
|
+
None
|
|
156
|
+
|
|
157
|
+
Design Tools
|
|
158
|
+
Figma → installs figma-developer-mcp
|
|
159
|
+
Storybook → (Claude uses browser tools to access)
|
|
160
|
+
None
|
|
161
|
+
|
|
162
|
+
Core MCPs (prompted individually)
|
|
163
|
+
Context7 → up-to-date library documentation
|
|
164
|
+
Sequential Thinking → improved multi-step reasoning
|
|
165
|
+
Filesystem → direct file access
|
|
166
|
+
Serena → semantic code navigation (requires Python/uv)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
All MCPs are installed with `--scope project` — they activate only in this project, not globally.
|
|
170
|
+
|
|
171
|
+
### MCP-only install (add integrations to existing project)
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
bunx claude-dev-kit@latest --mcp-only
|
|
175
|
+
# or
|
|
176
|
+
bash /path/to/install.sh --mcp-only
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Requirements
|
|
180
|
+
|
|
181
|
+
| Dependency | Purpose | Required? |
|
|
182
|
+
|-----------|---------|-----------|
|
|
183
|
+
| **Claude Code CLI** | `claude mcp add` for MCP setup | For MCP wizard |
|
|
184
|
+
| **Node.js or Bun** | Skill-activation hook | Yes |
|
|
185
|
+
| **Python 3** | Context monitor + learning logger hooks | Yes |
|
|
186
|
+
| **GitHub CLI** (`gh`) | Issue/PR operations in pipeline | For `/dev` commands |
|
|
187
|
+
| **Gemini CLI** | Large codebase analysis, 1M context tasks | Recommended |
|
|
188
|
+
| **OpenCode CLI** | Codex, Grok, Kimi, and other model access | Optional |
|
|
189
|
+
| **Ollama** | Local LLMs (privacy, offline, no-cost) | Optional |
|
|
190
|
+
| **uv / uvx** | Serena MCP | For Serena only |
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Setup (3 steps after install)
|
|
195
|
+
|
|
196
|
+
### Step 1: Run `/init` in Claude Code
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
/init
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
This command auto-detects your stack and configures all engineering agents to match. It handles:
|
|
203
|
+
|
|
204
|
+
- **Existing projects**: scans `package.json`, `pyproject.toml`, `go.mod`, etc. → detects framework, ORM, test runner, E2E tool → generates stack-specific agents
|
|
205
|
+
- **New projects**: asks 10 questions about your idea (platform, scale, stack) → generates everything from scratch
|
|
206
|
+
|
|
207
|
+
Supported stacks: Next.js + Prisma, Next.js + Drizzle, Remix, SvelteKit, Nuxt, Express, Fastify, NestJS, FastAPI, Django, Flask, Go, Rust, and more.
|
|
208
|
+
|
|
209
|
+
### Step 2: Review CLAUDE.md
|
|
210
|
+
|
|
211
|
+
`/init` generates `CLAUDE.md` with your stack, commands, and conventions. Review it and add anything project-specific in the `## Project Notes` section at the bottom. `/init` will never touch that section.
|
|
212
|
+
|
|
213
|
+
### Step 3: Prime Claude's context
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
/primer
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Reads the project structure and CLAUDE.md, so Claude understands the project before you ask it to do anything.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## All Commands
|
|
224
|
+
|
|
225
|
+
### Planning
|
|
226
|
+
| Command | What it does |
|
|
227
|
+
|---------|-------------|
|
|
228
|
+
| `/pm` | Project manager: assess and act on the backlog |
|
|
229
|
+
| `/pm:groom [issue \| milestone]` | Rewrite issues with AC, DoD, sub-tasks |
|
|
230
|
+
| `/pm:size [milestone \| issues]` | T-shirt size + sprint plan |
|
|
231
|
+
| `/pm:plan-epic <milestone>` | Full pipeline: groom → size → PRPs |
|
|
232
|
+
| `/generate-prp <file>` | Research + write a PRP manually |
|
|
233
|
+
| `/execute-prp <file>` | Execute a PRP with full validation |
|
|
234
|
+
| `/think <question>` | Meta-cognitive reasoning with confidence scores |
|
|
235
|
+
| `/bs:brainstorm_full <question>` | 7 AI models in parallel → synthesized recommendation |
|
|
236
|
+
|
|
237
|
+
### Implementation
|
|
238
|
+
| Command | What it does |
|
|
239
|
+
|---------|-------------|
|
|
240
|
+
| `/init [existing \| new]` | Smart setup — detect stack or interview for new project |
|
|
241
|
+
| `/dev <issue>` | Full autonomous pipeline: classify → sub-agents → validate → PR |
|
|
242
|
+
| `/dev-issue <issue>` | Equivalent to `/dev` |
|
|
243
|
+
| `/dev-epic` | All stories in highest-priority epic → one PR |
|
|
244
|
+
| `/dev:backend <task>` | Backend work only |
|
|
245
|
+
| `/dev:frontend <task>` | Frontend work only |
|
|
246
|
+
| `/dev:test <files>` | Write tests for specific files |
|
|
247
|
+
| `/dev:e2e <flow>` | Write E2E tests for a flow |
|
|
248
|
+
| `/dev:review` | Code review of current branch |
|
|
249
|
+
| `/fix-github-issue <N>` | Quick fix: read → implement → PR |
|
|
250
|
+
|
|
251
|
+
### Multi-AI Management
|
|
252
|
+
| Command | What it does |
|
|
253
|
+
|---------|-------------|
|
|
254
|
+
| `/ai:detect` | Scan system for installed AI CLIs (Gemini, OpenCode, Ollama, etc.) and update `providers.json` |
|
|
255
|
+
| `/ai:switch <provider>` | Change the default AI provider — use `ollama:<model>` to switch Ollama models |
|
|
256
|
+
| `/ai:route <task>` | Intelligently route a task to the best available AI based on task type |
|
|
257
|
+
| `/bs:brainstorm_full <question>` | 7 AI models brainstorm in parallel → synthesized recommendation |
|
|
258
|
+
| `/bs:gemini <task>` | Run a task directly with Gemini CLI |
|
|
259
|
+
| `/bs:codex <task>` | Run a task with OpenAI Codex (via opencode) |
|
|
260
|
+
| `/bs:grok <task>` | Run a task with Grok (via opencode) |
|
|
261
|
+
| `/bs:kimi <task>` | Run a task with Kimi K2 (via opencode) |
|
|
262
|
+
| `/bs:ollama <task>` | Run a task with a local Ollama model — no cloud, data stays on machine. Prefix with `model:name` to override |
|
|
263
|
+
|
|
264
|
+
### Self-Improvement
|
|
265
|
+
| Command | What it does |
|
|
266
|
+
|---------|-------------|
|
|
267
|
+
| `/improve [days=14]` | Analyze session learning data → propose skill rule and agent improvements |
|
|
268
|
+
| `/self-improve [agents\|commands\|skills\|all]` | Multi-AI critique of the kit's own prompts → synthesize and optionally apply improvements |
|
|
269
|
+
|
|
270
|
+
### Utilities
|
|
271
|
+
| Command | What it does |
|
|
272
|
+
|---------|-------------|
|
|
273
|
+
| `/primer` | Prime context: read project structure + CLAUDE.md |
|
|
274
|
+
| `/code:build-and-fix` | Build and auto-fix lint/format errors |
|
|
275
|
+
| `/code:simplify [files]` | Refactor for clarity |
|
|
276
|
+
| `/git:status` | Current branch, diff, status |
|
|
277
|
+
| `/haiku <task>` | Fast one-shot task in clean Haiku sub-context |
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## All Agents
|
|
282
|
+
|
|
283
|
+
| Agent | Model | Role |
|
|
284
|
+
|-------|-------|------|
|
|
285
|
+
| `project-manager` | opus | Planning orchestrator — grooms, sizes, PRPs |
|
|
286
|
+
| `dev-lead` | opus | Dev orchestrator — implements, validates, ships |
|
|
287
|
+
| `pm-groomer` | sonnet | Writes AC, DoD, sub-tasks for issues |
|
|
288
|
+
| `pm-sizer` | sonnet | T-shirt sizes, confidence scores, sprint plans |
|
|
289
|
+
| `pm-prp-writer` | sonnet | Deep research + PRP authoring |
|
|
290
|
+
| `dev-backend` | sonnet | API routes, services, DB, auth *(stack-specific after /init)* |
|
|
291
|
+
| `dev-frontend` | sonnet | Components, pages, state *(stack-specific after /init)* |
|
|
292
|
+
| `dev-test` | sonnet | Unit tests, mocks, coverage *(stack-specific after /init)* |
|
|
293
|
+
| `dev-e2e` | sonnet | E2E tests *(stack-specific after /init)* |
|
|
294
|
+
| `dev-reviewer` | sonnet | Security, correctness, pattern, type safety review |
|
|
295
|
+
| `system-architect` | opus | Architecture design, ADRs, C4 diagrams |
|
|
296
|
+
| `deep-think-partner` | opus | Complex reasoning, trade-off analysis |
|
|
297
|
+
| `documentation-manager` | sonnet | Docs sync after code changes |
|
|
298
|
+
| `validation-gates` | sonnet | Quality gate runner (standalone use) |
|
|
299
|
+
| `haiku-executor` | haiku | Fast one-shot tasks |
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Skills (Auto-Suggested)
|
|
304
|
+
|
|
305
|
+
The `UserPromptSubmit` hook suggests relevant skills based on keywords:
|
|
306
|
+
|
|
307
|
+
| Skill | Triggered by | Purpose |
|
|
308
|
+
|-------|-------------|---------|
|
|
309
|
+
| `verification-before-completion` | done, complete, fixed | Run verification before claiming done |
|
|
310
|
+
| `code-investigator` | debug, trace, how does, investigate, refactor | Serena-first targeted search |
|
|
311
|
+
| `build-and-fix` | build, lint, compile, fix errors | Auto-fix simple build errors |
|
|
312
|
+
| `ai-router` | use gemini, use codex, use ollama, ask grok, route to, which ai, entire codebase, private, local only | Route task to best available AI CLI |
|
|
313
|
+
| `improve` | improve the kit, skill not triggering, agent failing | Analyze session data, propose kit improvements |
|
|
314
|
+
| `self-improve` | critique the kit, self-improve, have AIs review | Multi-AI critique of kit prompts |
|
|
315
|
+
| `stack-detector` | Used internally by /init | Detect project stack |
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Multi-AI Support
|
|
320
|
+
|
|
321
|
+
Claude Code is always the **orchestrator** — it never becomes a different AI. Other AI CLIs are called as subprocesses and their output is returned to you via Claude.
|
|
322
|
+
|
|
323
|
+
### Supported AI Providers
|
|
324
|
+
|
|
325
|
+
| Provider | CLI | Best for | Context | Local? |
|
|
326
|
+
|----------|-----|---------|---------|--------|
|
|
327
|
+
| **Claude** | `claude` | Reasoning, agents, architecture | 200k | No |
|
|
328
|
+
| **Gemini** | `gemini` | Entire codebase scans, web search | **1M** | No |
|
|
329
|
+
| **Codex** | `opencode` | Code generation, completion | 128k | No |
|
|
330
|
+
| **Grok** | `opencode` | Speed, quick analysis | 131k | No |
|
|
331
|
+
| **Kimi K2** | `opencode` | Coding, math | 128k | No |
|
|
332
|
+
| **Ollama** | `ollama` | Privacy, offline, no-cost — any local model | 128k | **Yes** |
|
|
333
|
+
| **GLM** | `cczy` | Multilingual tasks | 128k | No |
|
|
334
|
+
| **MiniMax** | `ccmy` | Multimodal tasks | 40k | No |
|
|
335
|
+
|
|
336
|
+
### Quick start with multi-AI
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
# 1. Detect what's installed
|
|
340
|
+
/ai:detect
|
|
341
|
+
|
|
342
|
+
# 2. Route a task automatically
|
|
343
|
+
/ai:route scan the entire codebase and identify architectural issues
|
|
344
|
+
|
|
345
|
+
# 3. Run with a specific AI
|
|
346
|
+
/bs:gemini explain the authentication flow in this repo
|
|
347
|
+
/bs:ollama explain this function # stays local, no cloud
|
|
348
|
+
|
|
349
|
+
# 4. Brainstorm with all 7 AIs at once
|
|
350
|
+
/bs:brainstorm_full what's the best way to add real-time updates to this app?
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Routing logic
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
Task: "scan entire codebase" → Gemini (1M context)
|
|
357
|
+
Task: "quick summary of X" → Grok (fastest)
|
|
358
|
+
Task: "implement function Y" → Claude (default)
|
|
359
|
+
Task: "private / confidential" → Ollama (local — no cloud)
|
|
360
|
+
Task: "brainstorm approaches" → multi (all AIs)
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Ollama — Local LLMs
|
|
364
|
+
|
|
365
|
+
Run any model on your own hardware — zero cost, fully private, works offline.
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
# Install Ollama
|
|
369
|
+
curl -fsSL https://ollama.ai/install.sh | sh
|
|
370
|
+
|
|
371
|
+
# Pull a model (choose based on your needs)
|
|
372
|
+
ollama pull llama3.2 # general purpose
|
|
373
|
+
ollama pull codellama # code generation
|
|
374
|
+
ollama pull qwen2.5-coder # strong coding model
|
|
375
|
+
ollama pull deepseek-coder-v2 # coding + reasoning
|
|
376
|
+
ollama pull mistral # fast, good quality
|
|
377
|
+
|
|
378
|
+
# Start the service
|
|
379
|
+
ollama serve
|
|
380
|
+
|
|
381
|
+
# Use it in the kit
|
|
382
|
+
/ai:detect # auto-detects Ollama + lists models
|
|
383
|
+
/bs:ollama explain this function # one-off query
|
|
384
|
+
/ai:switch ollama # make Ollama the default
|
|
385
|
+
/ai:switch ollama:codellama # switch to a specific model
|
|
386
|
+
/ai:route <sensitive task> # auto-routes private tasks to Ollama
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
Good models for coding tasks: `qwen2.5-coder`, `codellama`, `deepseek-coder-v2`
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## Self-Improvement System
|
|
394
|
+
|
|
395
|
+
The kit tracks its own usage and improves over time through two mechanisms:
|
|
396
|
+
|
|
397
|
+
### 1. Learning Logger (automatic)
|
|
398
|
+
|
|
399
|
+
After every session, a `Stop` hook captures to `.claude/learning/sessions/YYYY-MM-DD.jsonl`:
|
|
400
|
+
- Which commands and skills were used
|
|
401
|
+
- Which agents were spawned
|
|
402
|
+
- Token consumption
|
|
403
|
+
- Error patterns
|
|
404
|
+
- User prompt fragments (for skill trigger analysis)
|
|
405
|
+
|
|
406
|
+
Logs are pruned after 90 days.
|
|
407
|
+
|
|
408
|
+
### 2. `/improve` — Pattern Analysis
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
/improve # Analyze last 14 days
|
|
412
|
+
/improve 30 # Analyze last 30 days
|
|
413
|
+
/improve all # Analyze all available data
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Reads your session logs and:
|
|
417
|
+
- Identifies skill activation gaps (phrases that should have triggered a skill but didn't)
|
|
418
|
+
- Flags underused commands (candidates for removal or better docs)
|
|
419
|
+
- Spots common error patterns with suggested fixes
|
|
420
|
+
- Reports token hotspots (tasks that could use cheaper models)
|
|
421
|
+
- Proposes concrete updates to `skill-rules.json`
|
|
422
|
+
|
|
423
|
+
### 3. `/self-improve` — Multi-AI Kit Critique
|
|
424
|
+
|
|
425
|
+
```
|
|
426
|
+
/self-improve # Critique everything
|
|
427
|
+
/self-improve agents # Focus on agent prompts
|
|
428
|
+
/self-improve skills # Focus on skill definitions
|
|
429
|
+
/self-improve commands # Focus on slash commands
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Reads the kit's own agent/skill/command files, sends them to all available AIs for critique, synthesizes consensus improvements, and optionally applies them + creates a PR.
|
|
433
|
+
|
|
434
|
+
Run monthly or after major feature additions.
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
## Safety Hooks
|
|
439
|
+
|
|
440
|
+
| Hook | What it does |
|
|
441
|
+
|------|-------------|
|
|
442
|
+
| **Block Dangerous Commands** | Intercepts Bash calls — blocks rm ~, force push main, git reset --hard, .env reads, etc. (configurable: critical/high/strict) |
|
|
443
|
+
| **Context Monitor** | Warns at 65% context, stops at 85% — instructs to `/clear` |
|
|
444
|
+
| **Learning Logger** | Captures session data after each session for self-improvement analysis |
|
|
445
|
+
| **Skill Suggester** | Watches your prompts — surfaces the right skill at the right time |
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## Model Strategy
|
|
450
|
+
|
|
451
|
+
| Task type | Model | Why |
|
|
452
|
+
|-----------|-------|-----|
|
|
453
|
+
| Orchestration, architecture, deep reasoning | **Opus** | Trade-off analysis, coordination |
|
|
454
|
+
| Code generation, testing, reviews | **Sonnet** | Excellent at code; domain knowledge in system prompt matters more than raw reasoning |
|
|
455
|
+
| Fast one-shot tasks | **Haiku** | Speed + cost for simple work |
|
|
456
|
+
|
|
457
|
+
The 5 code-specialist sub-agents run on Sonnet. Orchestrators run on Opus. This keeps costs low while maintaining quality where it matters.
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## Adding a Stack Agent
|
|
462
|
+
|
|
463
|
+
Copy from `examples/agents/` and customize:
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
cp examples/agents/nextjs-engineer.md .claude/agents/my-stack-engineer.md
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
Or add a new stack template to `.claude/templates/stacks/my-stack.md` and re-run `/init`.
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Re-initializing
|
|
474
|
+
|
|
475
|
+
Run `/init` again after:
|
|
476
|
+
- Changing your framework or ORM
|
|
477
|
+
- Adding a new test runner or E2E tool
|
|
478
|
+
- Switching package managers
|
|
479
|
+
|
|
480
|
+
It safely preserves manual edits in `CLAUDE.md` (outside the CDK fences) and never overwrites your hooks in `settings.json`.
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## Contributing
|
|
485
|
+
|
|
486
|
+
PRs welcome. To add support for a new stack:
|
|
487
|
+
1. Add `.claude/templates/stacks/<framework>-<orm>.md` with `BACKEND_AGENT_BODY`, `FRONTEND_AGENT_BODY`, `TEST_AGENT_BODY`, `E2E_AGENT_BODY` sections
|
|
488
|
+
2. Add detection logic to `.claude/skills/stack-detector/SKILL.md`
|
|
489
|
+
3. Add an example to `examples/agents/`
|
|
490
|
+
|
|
491
|
+
To add a new AI provider:
|
|
492
|
+
1. Add an entry to `.claude/providers.json` with `cli`, `run_cmd`, `strengths`, and `context_window`
|
|
493
|
+
2. Update `/ai:detect` detection logic in `.claude/commands/ai/detect.md`
|
|
494
|
+
3. Add a brainstorm command to `.claude/commands/bs/<provider>.md` (optional)
|
|
495
|
+
4. Update the routing table in `.claude/skills/ai-router/SKILL.md` if the provider has a unique strength
|
|
496
|
+
|
|
497
|
+
To improve the kit automatically:
|
|
498
|
+
- Run `/improve` after a few sessions to get data-driven suggestions
|
|
499
|
+
- Run `/self-improve` monthly for multi-AI critique of the kit's own prompts
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require('child_process');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const scriptPath = path.join(__dirname, '..', 'scripts', 'install.sh');
|
|
8
|
+
const args = process.argv.slice(2); // forward flags like --mcp-only
|
|
9
|
+
|
|
10
|
+
const result = spawnSync('bash', [scriptPath, ...args], { stdio: 'inherit' });
|
|
11
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-dev-kit",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Transform Claude Code into a fully autonomous development team — orchestrated sub-agents for planning, implementation, testing, and review.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"claude-dev-kit": "./bin/claude-dev-kit.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
".claude/agents/",
|
|
11
|
+
".claude/commands/",
|
|
12
|
+
".claude/hooks/",
|
|
13
|
+
".claude/skills/",
|
|
14
|
+
".claude/templates/",
|
|
15
|
+
"scripts/install.sh"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"claude",
|
|
19
|
+
"claude-code",
|
|
20
|
+
"anthropic",
|
|
21
|
+
"ai-agents",
|
|
22
|
+
"developer-tools",
|
|
23
|
+
"autonomous-development"
|
|
24
|
+
],
|
|
25
|
+
"engines": { "node": ">=18" },
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/evandempsey/claude-dev-kit"
|
|
30
|
+
}
|
|
31
|
+
}
|