forgedev 1.1.0 → 1.2.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/README.md +80 -7
- package/bin/devforge.js +11 -1
- package/docs/00-README.md +310 -0
- package/docs/01-universal-prompt-library.md +1049 -0
- package/docs/02-claude-code-mastery-playbook.md +283 -0
- package/docs/03-multi-agent-verification.md +565 -0
- package/docs/04-errata-and-verification-checklist.md +284 -0
- package/docs/05-universal-scaffolder-vision.md +452 -0
- package/docs/06-confidence-assessment-and-repo-prompt.md +407 -0
- package/docs/errata.md +58 -0
- package/docs/multi-agent-verification.md +66 -0
- package/docs/plans/.gitkeep +0 -0
- package/docs/playbook.md +95 -0
- package/docs/prompt-library.md +160 -0
- package/docs/uat/UAT_CHECKLIST.csv +9 -0
- package/docs/uat/UAT_TEMPLATE.md +163 -0
- package/package.json +10 -2
- package/src/claude-configurator.js +2 -0
- package/src/cli.js +16 -5
- package/src/doctor-prompts.js +9 -2
- package/src/doctor.js +19 -0
- package/src/index.js +7 -0
- package/src/update-check.js +49 -0
- package/src/update.js +33 -0
- package/src/utils.js +1 -1
- package/templates/auth/jwt-custom/backend/app/core/security.py.template +4 -1
- package/templates/backend/fastapi/backend/app/core/config.py.template +2 -2
- package/templates/base/docs/plans/.gitkeep +0 -0
- package/templates/base/docs/uat/UAT_CHECKLIST.csv.template +2 -0
- package/templates/base/docs/uat/UAT_TEMPLATE.md.template +22 -0
- package/templates/claude-code/agents/build-error-resolver.md +4 -4
- package/templates/claude-code/agents/code-quality-reviewer.md +1 -1
- package/templates/claude-code/agents/database-reviewer.md +2 -2
- package/templates/claude-code/agents/doc-updater.md +1 -1
- package/templates/claude-code/agents/harness-optimizer.md +26 -0
- package/templates/claude-code/agents/loop-operator.md +1 -1
- package/templates/claude-code/agents/product-strategist.md +124 -0
- package/templates/claude-code/agents/security-reviewer.md +1 -0
- package/templates/claude-code/agents/spec-validator.md +31 -1
- package/templates/claude-code/agents/uat-validator.md +6 -1
- package/templates/claude-code/claude-md/base.md +3 -2
- package/templates/claude-code/claude-md/nextjs.md +1 -1
- package/templates/claude-code/commands/build-fix.md +1 -1
- package/templates/claude-code/commands/code-review.md +6 -1
- package/templates/claude-code/commands/full-audit.md +61 -0
- package/templates/claude-code/commands/workflows.md +4 -0
- package/templates/claude-code/hooks/scripts/autofix-polyglot.mjs +28 -10
- package/templates/claude-code/hooks/scripts/autofix-python.mjs +11 -4
- package/templates/claude-code/hooks/scripts/autofix-typescript.mjs +11 -3
- package/templates/claude-code/hooks/scripts/guard-protected-files.mjs +2 -2
- package/templates/claude-code/skills/ai-prompts/SKILL.md +1 -0
- package/templates/claude-code/skills/fastapi/SKILL.md +1 -1
- package/templates/claude-code/skills/git-workflow/SKILL.md +3 -3
- package/templates/claude-code/skills/nextjs/SKILL.md +1 -1
- package/templates/claude-code/skills/playwright/SKILL.md +8 -7
- package/templates/claude-code/skills/security-api/SKILL.md +2 -2
- package/templates/claude-code/skills/security-web/SKILL.md +1 -0
- package/templates/database/sqlalchemy-postgres/.env.example +1 -0
- package/templates/infra/github-actions/.github/workflows/ci.yml.template +49 -0
- package/templates/testing/pytest/backend/tests/__init__.py +0 -0
- package/templates/testing/pytest/backend/tests/conftest.py.template +11 -0
- package/templates/testing/pytest/backend/tests/test_health.py.template +10 -0
- package/templates/testing/vitest/vitest.config.ts.template +18 -0
- package/CLAUDE.md +0 -38
package/README.md
CHANGED
|
@@ -16,6 +16,9 @@ npx forgedev init
|
|
|
16
16
|
|
|
17
17
|
# Diagnose and optimize existing project
|
|
18
18
|
npx forgedev doctor
|
|
19
|
+
|
|
20
|
+
# Check for updates
|
|
21
|
+
npx forgedev update
|
|
19
22
|
```
|
|
20
23
|
|
|
21
24
|
## Four Modes, Four Audiences
|
|
@@ -174,14 +177,52 @@ Every project includes:
|
|
|
174
177
|
|
|
175
178
|
With Claude Code infrastructure enabled (default):
|
|
176
179
|
|
|
177
|
-
- **CLAUDE.md** tailored to your stack
|
|
178
|
-
- **Hooks** — auto-lint on edit, quality gate
|
|
179
|
-
- **
|
|
180
|
-
- **
|
|
181
|
-
- **
|
|
180
|
+
- **CLAUDE.md** tailored to your stack (with pitfalls and agents quick-reference)
|
|
181
|
+
- **Hooks** — cross-platform Node.js `.mjs` hooks (auto-lint on edit, quality gate, protected file guard)
|
|
182
|
+
- **17 Agents** — verification, development, review, and orchestration (see below)
|
|
183
|
+
- **20 Commands** — daily workflow, verification, release, development, session management
|
|
184
|
+
- **8 Skills** — framework-specific + universal knowledge
|
|
182
185
|
- **UAT templates** — scenario packs and CSV checklists
|
|
183
186
|
- **Prompt library** — the complete development prompt library
|
|
184
187
|
|
|
188
|
+
## Agents (18)
|
|
189
|
+
|
|
190
|
+
Every scaffolded project gets these agents in `.claude/agents/`:
|
|
191
|
+
|
|
192
|
+
| Agent | Role | Access |
|
|
193
|
+
|-------|------|--------|
|
|
194
|
+
| `architect` | System design, data models, API contracts | Read-only |
|
|
195
|
+
| `build-error-resolver` | Fix build/lint/type errors with minimal changes | Write |
|
|
196
|
+
| `chief-of-staff` | Orchestrate multiple agents for complex tasks | Write |
|
|
197
|
+
| `code-quality-reviewer` | Code quality review | Read-only |
|
|
198
|
+
| `database-reviewer` | Query optimization, schema review, N+1 detection | Read-only |
|
|
199
|
+
| `doc-updater` | Keep docs in sync with code changes | Write |
|
|
200
|
+
| `docs-lookup` | Search framework docs for answers | Read-only |
|
|
201
|
+
| `e2e-runner` | Generate and run Playwright E2E tests | Write |
|
|
202
|
+
| `harness-optimizer` | Audit Claude Code setup, suggest optimizations | Read-only |
|
|
203
|
+
| `loop-operator` | Autonomous improvement loops with stop conditions | Write |
|
|
204
|
+
| `planner` | Create implementation plans before coding | Read-only |
|
|
205
|
+
| `product-strategist` | Research competitors, evaluate maturity, recommend improvements | Read-only |
|
|
206
|
+
| `production-readiness` | Production deployment readiness review | Read-only |
|
|
207
|
+
| `refactor-cleaner` | Dead code removal, duplicate elimination | Write |
|
|
208
|
+
| `security-reviewer` | Security audit | Read-only |
|
|
209
|
+
| `spec-validator` | Validate implementation matches specification | Read-only |
|
|
210
|
+
| `tdd-guide` | Enforce RED-GREEN-REFACTOR TDD cycle | Write |
|
|
211
|
+
| `uat-validator` | QA validation of UAT scenarios | Read-only |
|
|
212
|
+
|
|
213
|
+
## Skills (8)
|
|
214
|
+
|
|
215
|
+
| Skill | Scope |
|
|
216
|
+
|-------|-------|
|
|
217
|
+
| `nextjs` | Next.js 15 App Router patterns |
|
|
218
|
+
| `fastapi` | FastAPI + SQLAlchemy 2.0 + Pydantic v2 |
|
|
219
|
+
| `playwright` | Playwright E2E testing |
|
|
220
|
+
| `security-web` | Web application security |
|
|
221
|
+
| `security-api` | API security |
|
|
222
|
+
| `ai-prompts` | AI/LLM integration patterns |
|
|
223
|
+
| `git-workflow` | Git branching, commits, PR workflow (universal) |
|
|
224
|
+
| `testing-patterns` | Test pyramid, AAA pattern, mocking (universal) |
|
|
225
|
+
|
|
185
226
|
## Development
|
|
186
227
|
|
|
187
228
|
```bash
|
|
@@ -190,6 +231,7 @@ npm test # run unit tests
|
|
|
190
231
|
node bin/devforge.js test-output # manual smoke test (guided + developer)
|
|
191
232
|
node bin/devforge.js init # test init mode (from any project dir)
|
|
192
233
|
node bin/devforge.js doctor # test doctor mode (from any project dir)
|
|
234
|
+
node bin/devforge.js update # check for updates
|
|
193
235
|
```
|
|
194
236
|
|
|
195
237
|
## Project Structure
|
|
@@ -198,7 +240,7 @@ node bin/devforge.js doctor # test doctor mode (from any project dir)
|
|
|
198
240
|
devforge/
|
|
199
241
|
├── bin/devforge.js # CLI entry point
|
|
200
242
|
├── src/
|
|
201
|
-
│ ├── cli.js # Command router (new, init, doctor)
|
|
243
|
+
│ ├── cli.js # Command router (new, init, doctor, update)
|
|
202
244
|
│ ├── index.js # New project orchestrator (guided + developer)
|
|
203
245
|
│ ├── guided.js # Guided mode (description → stack)
|
|
204
246
|
│ ├── prompts.js # Interactive prompts (Inquirer.js)
|
|
@@ -211,6 +253,8 @@ devforge/
|
|
|
211
253
|
│ ├── doctor.js # Doctor mode orchestrator
|
|
212
254
|
│ ├── doctor-checks.js # Diagnostic check functions
|
|
213
255
|
│ ├── doctor-prompts.js # Fix prompt generators
|
|
256
|
+
│ ├── update-check.js # npm registry version check
|
|
257
|
+
│ ├── update.js # Update command handler
|
|
214
258
|
│ └── utils.js # File ops, logging, colors
|
|
215
259
|
├── templates/ # Scaffold templates by category
|
|
216
260
|
│ ├── base/ # Every project gets this
|
|
@@ -225,26 +269,55 @@ devforge/
|
|
|
225
269
|
└── docs/ # Reference documentation
|
|
226
270
|
```
|
|
227
271
|
|
|
228
|
-
## Claude Code Commands
|
|
272
|
+
## Claude Code Commands (20)
|
|
229
273
|
|
|
230
274
|
After running `npx forgedev init`, these slash commands are available inside Claude Code:
|
|
231
275
|
|
|
276
|
+
**Daily Workflow:**
|
|
277
|
+
|
|
232
278
|
| Command | What It Does |
|
|
233
279
|
|---------|-------------|
|
|
234
280
|
| `/workflows` | Lists all available workflows |
|
|
235
281
|
| `/status` | Project dashboard — tests, branch, changes |
|
|
236
282
|
| `/next` | Figures out your next task |
|
|
237
283
|
| `/done` | Verifies task completion |
|
|
284
|
+
|
|
285
|
+
**Verification:**
|
|
286
|
+
|
|
287
|
+
| Command | What It Does |
|
|
288
|
+
|---------|-------------|
|
|
238
289
|
| `/verify-all` | Runs lint, type check, tests, then launches reviewers |
|
|
290
|
+
| `/full-audit` | Runs every audit and review agent in a single pass |
|
|
239
291
|
| `/audit-spec` | Validates implementation against a spec/PRD |
|
|
240
292
|
| `/audit-wiring` | Finds dead or unwired features |
|
|
241
293
|
| `/audit-security` | Runs a security audit |
|
|
294
|
+
| `/code-review` | Reviews uncommitted changes for security and quality |
|
|
295
|
+
|
|
296
|
+
**Release:**
|
|
297
|
+
|
|
298
|
+
| Command | What It Does |
|
|
299
|
+
|---------|-------------|
|
|
242
300
|
| `/pre-pr` | Runs the complete pre-PR checklist |
|
|
243
301
|
| `/run-uat` | Executes UAT scenarios |
|
|
302
|
+
|
|
303
|
+
**Development:**
|
|
304
|
+
|
|
305
|
+
| Command | What It Does |
|
|
306
|
+
|---------|-------------|
|
|
307
|
+
| `/plan` | Invoke planner agent for implementation planning |
|
|
308
|
+
| `/build-fix` | Incrementally fix build/lint/type errors |
|
|
309
|
+
| `/tdd` | Enforce test-driven development cycle |
|
|
244
310
|
| `/generate-prd` | Generates a PRD with Mermaid diagrams |
|
|
245
311
|
| `/generate-uat` | Generates UAT scenarios from codebase |
|
|
246
312
|
| `/optimize-claude-md` | Proposes splitting an oversized CLAUDE.md |
|
|
247
313
|
|
|
314
|
+
**Session:**
|
|
315
|
+
|
|
316
|
+
| Command | What It Does |
|
|
317
|
+
|---------|-------------|
|
|
318
|
+
| `/save-session` | Save work context for later resumption |
|
|
319
|
+
| `/resume-session` | Load saved session and continue where you left off |
|
|
320
|
+
|
|
248
321
|
## Install
|
|
249
322
|
|
|
250
323
|
```bash
|
package/bin/devforge.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseCommand } from '../src/cli.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
try {
|
|
5
|
+
await parseCommand(process.argv.slice(2));
|
|
6
|
+
} catch (err) {
|
|
7
|
+
// Graceful exit on Ctrl+C / prompt cancellation
|
|
8
|
+
if (err?.name === 'ExitPromptError' || err?.code === 'ERR_USE_AFTER_CLOSE') {
|
|
9
|
+
console.log('');
|
|
10
|
+
process.exit(0);
|
|
11
|
+
}
|
|
12
|
+
console.error(`\x1b[31mError: ${err.message || err}\x1b[0m`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# Claude Code Mastery Kit
|
|
2
|
+
## README — How to Use These Documents
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## What Is This?
|
|
7
|
+
|
|
8
|
+
A complete system for getting production-grade code out of Claude Code (and any
|
|
9
|
+
AI coding agent) without the back-and-forth, regressions, and "are you sure?"
|
|
10
|
+
cycles that waste time and tokens.
|
|
11
|
+
|
|
12
|
+
It works in **Claude Code CLI**, **VS Code** (official extension), **Cursor**,
|
|
13
|
+
and **Windsurf** — anywhere Claude Code runs.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Documents in This Kit
|
|
18
|
+
|
|
19
|
+
| # | Document | Universal? | Purpose |
|
|
20
|
+
|---|----------|-----------|---------|
|
|
21
|
+
| 1 | `universal-prompt-library.md` | ✅ YES | Every prompt you need from idea to production — 6 flows, utility prompts, Mermaid workflow diagram |
|
|
22
|
+
| 2 | `multi-agent-verification.md` | ⚠️ TEMPLATE | 5 specialized read-only agents that check each other's work — needs customization per project |
|
|
23
|
+
| 3 | `claude-code-mastery-playbook.md` | ⚠️ TEMPLATE | How to structure CLAUDE.md, hooks, skills, and directory scoping — needs customization per project |
|
|
24
|
+
| 4 | `errata-and-verification-checklist.md` | ✅ YES | Known issues, corrections, and step-by-step testing checklist |
|
|
25
|
+
| 5 | This file (`README.md`) | ✅ YES | How to use everything |
|
|
26
|
+
|
|
27
|
+
**✅ Universal** = use as-is on any project, any stack, any team size.
|
|
28
|
+
**⚠️ Template** = the architecture and patterns are universal, but the specific
|
|
29
|
+
checklists, hook commands, and agent rules contain example content (marked with
|
|
30
|
+
`[CUSTOMIZE]` tags) that you replace with your project's actual commands,
|
|
31
|
+
patterns, and rules.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Quick Start (5 Minutes)
|
|
36
|
+
|
|
37
|
+
### If you're starting a NEW project:
|
|
38
|
+
|
|
39
|
+
1. Open `universal-prompt-library.md`
|
|
40
|
+
2. Go to **Flow 1: NEW PROJECT**
|
|
41
|
+
3. Copy-paste Step 1.1 into Claude Code with your idea
|
|
42
|
+
4. Follow each step in sequence
|
|
43
|
+
|
|
44
|
+
### If you're adding a feature to an EXISTING project:
|
|
45
|
+
|
|
46
|
+
1. Open `universal-prompt-library.md`
|
|
47
|
+
2. Go to **Flow 2: NEW FEATURE**
|
|
48
|
+
3. Start at Step 2.1
|
|
49
|
+
|
|
50
|
+
### If you're fixing a bug:
|
|
51
|
+
|
|
52
|
+
1. **Flow 3: BUG FIX** — start at Step 3.1
|
|
53
|
+
|
|
54
|
+
### If you're joining someone else's project:
|
|
55
|
+
|
|
56
|
+
1. **Flow 5: PROJECT ONBOARDING** — start at Step 5.1
|
|
57
|
+
|
|
58
|
+
### If you want the full infrastructure (hooks, agents, skills):
|
|
59
|
+
|
|
60
|
+
1. Read `errata-and-verification-checklist.md` FIRST (known issues)
|
|
61
|
+
2. Follow the 2-week rollout plan at the bottom of that document
|
|
62
|
+
3. Use `claude-code-mastery-playbook.md` as your architecture guide
|
|
63
|
+
4. Use `multi-agent-verification.md` to set up your review agents
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## How Each Document Fits Together
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
┌─────────────────────────────────────────────────┐
|
|
71
|
+
│ universal-prompt-library.md │
|
|
72
|
+
│ Your daily driver. Open this every session. │
|
|
73
|
+
│ Contains: every prompt for every situation. │
|
|
74
|
+
│ │
|
|
75
|
+
│ Flow 1: New Project │
|
|
76
|
+
│ Flow 2: New Feature ←── most used │
|
|
77
|
+
│ Flow 3: Bug Fix │
|
|
78
|
+
│ Flow 4: Cleanup / Refactor │
|
|
79
|
+
│ Flow 5: Join Existing Project │
|
|
80
|
+
│ Flow 6: Audit / Validate │
|
|
81
|
+
│ + Utility prompts (lost? pre-PR? explain code?) │
|
|
82
|
+
└───────────────────┬─────────────────────────────┘
|
|
83
|
+
│
|
|
84
|
+
│ Step 1.4 of Flow 1 says
|
|
85
|
+
│ "set up hooks, skills, agents"
|
|
86
|
+
▼
|
|
87
|
+
┌─────────────────────────────────────────────────┐
|
|
88
|
+
│ claude-code-mastery-playbook.md │
|
|
89
|
+
│ Your architecture guide. Read once, set up, │
|
|
90
|
+
│ then reference when tweaking. │
|
|
91
|
+
│ │
|
|
92
|
+
│ - How to structure CLAUDE.md (lean, ~150 lines) │
|
|
93
|
+
│ - How to create Skills (on-demand knowledge) │
|
|
94
|
+
│ - How to create Hooks (deterministic gates) │
|
|
95
|
+
│ - How to scope CLAUDE.md per directory │
|
|
96
|
+
│ - AI prompt quality standards │
|
|
97
|
+
│ - Frontend/backend separation patterns │
|
|
98
|
+
└───────────────────┬─────────────────────────────┘
|
|
99
|
+
│
|
|
100
|
+
│ Playbook references agents
|
|
101
|
+
│ for verification
|
|
102
|
+
▼
|
|
103
|
+
┌─────────────────────────────────────────────────┐
|
|
104
|
+
│ multi-agent-verification.md │
|
|
105
|
+
│ Your review team. Set up once, use on demand. │
|
|
106
|
+
│ │
|
|
107
|
+
│ 5 read-only agents: │
|
|
108
|
+
│ 1. Code Quality Reviewer │
|
|
109
|
+
│ 2. Security Reviewer │
|
|
110
|
+
│ 3. Spec Compliance Validator │
|
|
111
|
+
│ 4. AI Output Quality Auditor │
|
|
112
|
+
│ 5. Production Readiness Checker │
|
|
113
|
+
│ │
|
|
114
|
+
│ + How to chain them (sequential or parallel) │
|
|
115
|
+
│ + Claude Code Review (managed PR reviews) │
|
|
116
|
+
└───────────────────┬─────────────────────────────┘
|
|
117
|
+
│
|
|
118
|
+
│ Before trusting ANY of this
|
|
119
|
+
▼
|
|
120
|
+
┌─────────────────────────────────────────────────┐
|
|
121
|
+
│ errata-and-verification-checklist.md │
|
|
122
|
+
│ Read this BEFORE implementing hooks or agents. │
|
|
123
|
+
│ │
|
|
124
|
+
│ - Known errors and corrections │
|
|
125
|
+
│ - Step-by-step testing for each component │
|
|
126
|
+
│ - 2-week rollout plan │
|
|
127
|
+
│ - What needs YOUR customization │
|
|
128
|
+
└─────────────────────────────────────────────────┘
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Customization Guide (Making Templates Work for Your Project)
|
|
134
|
+
|
|
135
|
+
### Step 1: Customize the Playbook
|
|
136
|
+
|
|
137
|
+
Open `claude-code-mastery-playbook.md` and replace:
|
|
138
|
+
|
|
139
|
+
| Find | Replace With |
|
|
140
|
+
|------|-------------|
|
|
141
|
+
| Example lint commands (`npx eslint`, `ruff check`, etc.) | Your project's actual lint commands |
|
|
142
|
+
| Example type check commands (`npx tsc --noEmit`, `npx pyright`) | Your project's actual type check commands |
|
|
143
|
+
| Example test commands (`npx vitest run`, `npm run e2e`) | Your project's actual test commands |
|
|
144
|
+
| Example tech stack references | Your actual tech stack |
|
|
145
|
+
| Example skill names and content | Skills relevant to your project's domain |
|
|
146
|
+
| Protected file patterns (`.env`, `migrations/`) | Your project's actual protected paths |
|
|
147
|
+
|
|
148
|
+
### Step 2: Customize the Agents
|
|
149
|
+
|
|
150
|
+
Open `multi-agent-verification.md` and for each agent:
|
|
151
|
+
|
|
152
|
+
| Agent | What to Customize |
|
|
153
|
+
|-------|-------------------|
|
|
154
|
+
| Code Quality Reviewer | Your language-specific patterns, naming conventions, architecture rules |
|
|
155
|
+
| Security Reviewer | Your auth middleware names, input sanitization helpers, security patterns |
|
|
156
|
+
| Spec Validator | Your spec file locations and format |
|
|
157
|
+
| AI Quality Auditor | Your AI service file paths, prompt patterns, and quality standards |
|
|
158
|
+
| Production Readiness | Your deployment platform, env var conventions, infrastructure patterns |
|
|
159
|
+
|
|
160
|
+
**If your project doesn't use AI features**, you can skip the AI Quality Auditor agent entirely.
|
|
161
|
+
|
|
162
|
+
**If your project is frontend-only**, simplify the Security Reviewer to focus
|
|
163
|
+
on XSS, CSRF, and client-side storage patterns instead of backend auth.
|
|
164
|
+
|
|
165
|
+
### Step 3: Create Your Hooks
|
|
166
|
+
|
|
167
|
+
The hook scripts need your project's actual commands. Use the templates in the
|
|
168
|
+
playbook as a starting point, but test each one manually before relying on it.
|
|
169
|
+
See the errata document for the step-by-step testing process.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## For Teams: How to Share This
|
|
174
|
+
|
|
175
|
+
### Option A: Drop into your repo (recommended)
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
your-project/
|
|
179
|
+
├── .claude/
|
|
180
|
+
│ ├── settings.json # Hooks config
|
|
181
|
+
│ ├── hooks/ # Hook scripts
|
|
182
|
+
│ │ ├── protect-files.sh
|
|
183
|
+
│ │ ├── post-edit.sh
|
|
184
|
+
│ │ └── stop-quality-gate.sh
|
|
185
|
+
│ ├── agents/ # Subagent definitions
|
|
186
|
+
│ │ ├── code-quality-reviewer.md
|
|
187
|
+
│ │ ├── security-reviewer.md
|
|
188
|
+
│ │ ├── spec-validator.md
|
|
189
|
+
│ │ └── production-readiness.md
|
|
190
|
+
│ ├── skills/ # On-demand knowledge
|
|
191
|
+
│ │ ├── testing/SKILL.md
|
|
192
|
+
│ │ ├── frontend/SKILL.md
|
|
193
|
+
│ │ ├── backend/SKILL.md
|
|
194
|
+
│ │ └── security/SKILL.md
|
|
195
|
+
│ └── commands/ # Slash commands
|
|
196
|
+
│ ├── verify-all.md
|
|
197
|
+
│ ├── audit-spec.md
|
|
198
|
+
│ ├── audit-wiring.md
|
|
199
|
+
│ └── pre-pr.md
|
|
200
|
+
├── CLAUDE.md # Root project rules (~150 lines)
|
|
201
|
+
├── backend/CLAUDE.md # Backend-scoped rules
|
|
202
|
+
├── src/CLAUDE.md # Frontend-scoped rules (or frontend/)
|
|
203
|
+
├── e2e/CLAUDE.md # Test-scoped rules (or tests/)
|
|
204
|
+
└── docs/
|
|
205
|
+
├── prompt-library.md # This kit's universal prompt library
|
|
206
|
+
└── plans/ # Feature plans written during Plan Mode
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Commit everything except `settings.local.json` (personal overrides, gitignored).
|
|
210
|
+
|
|
211
|
+
Every developer on the team gets the same hooks, agents, skills, and commands
|
|
212
|
+
automatically. When someone runs Claude Code in this repo, they get the full
|
|
213
|
+
infrastructure.
|
|
214
|
+
|
|
215
|
+
### Option B: Global setup (for personal use across all projects)
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
~/.claude/
|
|
219
|
+
├── CLAUDE.md # Your personal global rules
|
|
220
|
+
├── settings.json # Global hooks (protect .env everywhere)
|
|
221
|
+
├── agents/ # Agents available in all projects
|
|
222
|
+
│ └── code-quality-reviewer.md
|
|
223
|
+
└── skills/ # Skills available in all projects
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Project-level files override global files when both exist.
|
|
227
|
+
|
|
228
|
+
### Option C: Share as a template repo
|
|
229
|
+
|
|
230
|
+
Create a GitHub template repository with the full `.claude/` structure.
|
|
231
|
+
When starting a new project: "Use this template" → customize for the
|
|
232
|
+
specific project.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## FAQ
|
|
237
|
+
|
|
238
|
+
### Does this work in VS Code?
|
|
239
|
+
|
|
240
|
+
Yes. The official Claude Code VS Code extension reads the same `.claude/`
|
|
241
|
+
directory, CLAUDE.md files, hooks, skills, agents, and commands as the CLI.
|
|
242
|
+
Install from the VS Code marketplace (search "Claude Code" by Anthropic).
|
|
243
|
+
|
|
244
|
+
### Does this work in Cursor / Windsurf?
|
|
245
|
+
|
|
246
|
+
Yes for CLAUDE.md and hooks. Subagents and skills are Claude Code-specific
|
|
247
|
+
features — they work in Cursor/Windsurf only through the Claude Code extension,
|
|
248
|
+
not through those editors' native AI features.
|
|
249
|
+
|
|
250
|
+
### Do I need a Team or Enterprise plan?
|
|
251
|
+
|
|
252
|
+
No. Hooks, subagents, skills, commands, and directory-scoped CLAUDE.md all
|
|
253
|
+
work on Pro and Max plans. Claude Code Review (the managed PR reviewer) requires
|
|
254
|
+
Team or Enterprise.
|
|
255
|
+
|
|
256
|
+
### How much does the agent chain cost in tokens?
|
|
257
|
+
|
|
258
|
+
Running all 5 review agents sequentially costs roughly 50-80K tokens total.
|
|
259
|
+
On a Max plan with 5x usage, that's fine for every feature. On a Pro plan,
|
|
260
|
+
you might want to run agents only before PRs, not after every task.
|
|
261
|
+
|
|
262
|
+
### What if my project doesn't use Python/FastAPI?
|
|
263
|
+
|
|
264
|
+
The patterns are universal — the specific commands are examples. Replace:
|
|
265
|
+
- `ruff check` → your linter (e.g., `cargo clippy`, `go vet`, `rubocop`)
|
|
266
|
+
- `npx pyright` → your type checker (e.g., `mypy`, `cargo check`)
|
|
267
|
+
- `npx tsc --noEmit` → whatever applies to your frontend
|
|
268
|
+
- Security agent checklist → your framework's auth patterns
|
|
269
|
+
|
|
270
|
+
### What if I'm a solo developer?
|
|
271
|
+
|
|
272
|
+
Use the sequential agent chain (Option A in the multi-agent doc) and run it
|
|
273
|
+
before PRs. Skip agent teams — they're for when you need parallel speed on
|
|
274
|
+
larger changes.
|
|
275
|
+
|
|
276
|
+
### Can I use this with other AI coding tools (Copilot, Aider, etc.)?
|
|
277
|
+
|
|
278
|
+
The prompt library (Flow 1-6) works with any AI coding tool — they're just
|
|
279
|
+
well-structured prompts. The hooks, agents, and skills are Claude Code-specific
|
|
280
|
+
features. The CLAUDE.md concept has equivalents in other tools (AGENTS.md for
|
|
281
|
+
OpenCode/Aider, .cursorrules for Cursor).
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## What's NOT in This Kit (And Where to Find It)
|
|
286
|
+
|
|
287
|
+
| Need | Where |
|
|
288
|
+
|------|-------|
|
|
289
|
+
| CI/CD pipeline integration | Claude Code GitHub Actions: `anthropics/claude-code-action` |
|
|
290
|
+
| Managed PR reviews | Claude Code Review (Team/Enterprise): `code.claude.com/docs/en/code-review` |
|
|
291
|
+
| Security scanning | Claude Code Security (Team/Enterprise): `anthropic.com/news/claude-code-security` |
|
|
292
|
+
| MCP server setup | `code.claude.com/docs/en/mcp` |
|
|
293
|
+
| Plugin marketplace | `/plugins` command in Claude Code |
|
|
294
|
+
| Advanced multi-agent orchestration | Gas Town, Multiclaude, or Claude Code Agent Teams (experimental) |
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Contributing / Improving This Kit
|
|
299
|
+
|
|
300
|
+
These documents are living — they should evolve as Claude Code evolves and as
|
|
301
|
+
you discover what works for your projects.
|
|
302
|
+
|
|
303
|
+
**After every project:** Ask yourself:
|
|
304
|
+
- Did any prompt consistently need tweaking? → Update the prompt library.
|
|
305
|
+
- Did any hook fail or need adjustment? → Update the hook and errata.
|
|
306
|
+
- Did an agent miss something important? → Add it to the agent's checklist.
|
|
307
|
+
- Did a new pattern emerge? → Add it as a skill.
|
|
308
|
+
|
|
309
|
+
**Version your `.claude/` directory** the same way you version your code.
|
|
310
|
+
Review it in PRs. It compounds in value over time.
|