claudeforge-cli 1.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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +431 -0
  3. package/bin/cli.js +155 -0
  4. package/package.json +43 -0
  5. package/src/commands/add.js +205 -0
  6. package/src/commands/create.js +218 -0
  7. package/src/commands/github.js +479 -0
  8. package/src/commands/init.js +107 -0
  9. package/src/commands/project.js +123 -0
  10. package/src/commands/status.js +183 -0
  11. package/src/commands/upgrade.js +114 -0
  12. package/src/index.js +6 -0
  13. package/src/logger.js +90 -0
  14. package/src/scaffolder.js +45 -0
  15. package/src/stack-detector.js +62 -0
  16. package/templates/.env.example.tpl +21 -0
  17. package/templates/.gitignore.tpl +40 -0
  18. package/templates/CLAUDE.local.md.tpl +32 -0
  19. package/templates/CLAUDE.md.tpl +112 -0
  20. package/templates/claude/README.md.tpl +94 -0
  21. package/templates/claude/agents/code-reviewer.md.tpl +142 -0
  22. package/templates/claude/commands/commit.md.tpl +34 -0
  23. package/templates/claude/commands/explain-codebase.md.tpl +37 -0
  24. package/templates/claude/commands/fix-issue.md.tpl +43 -0
  25. package/templates/claude/commands/memory-sync.md.tpl +49 -0
  26. package/templates/claude/commands/project-health.md.tpl +70 -0
  27. package/templates/claude/commands/review-pr.md.tpl +43 -0
  28. package/templates/claude/commands/scaffold-structure.md.tpl +308 -0
  29. package/templates/claude/commands/setup-project.md.tpl +253 -0
  30. package/templates/claude/commands/standup.md.tpl +34 -0
  31. package/templates/claude/hooks/post-tool-use.sh.tpl +44 -0
  32. package/templates/claude/hooks/pre-tool-use.sh.tpl +64 -0
  33. package/templates/claude/rules/no-sensitive-files.md.tpl +29 -0
  34. package/templates/claude/settings.json.tpl +50 -0
  35. package/templates/claude/settings.local.json.tpl +4 -0
  36. package/templates/claude/skills/project-conventions/SKILL.md.tpl +39 -0
  37. package/templates/mcp.json.tpl +9 -0
  38. package/templates/memory/MEMORY.md.tpl +37 -0
  39. package/templates/memory/feedback_communication.md.tpl +29 -0
  40. package/templates/memory/project_ai_workflow.md.tpl +43 -0
  41. package/templates/memory/user_profile.md.tpl +30 -0
@@ -0,0 +1,43 @@
1
+ ---
2
+ description: Review the current branch as a pull request — summarize changes, identify risks, and flag issues
3
+ allowed-tools: Bash(git diff:*), Bash(git log:*), Bash(git branch:*), Bash(gh pr:*), Read, Grep
4
+ ---
5
+
6
+ ## Context
7
+
8
+ - Branch diff against main: !`git diff main...HEAD`
9
+ - Commits on this branch: !`git log main..HEAD --oneline`
10
+ - Files changed: !`git diff main...HEAD --name-only`
11
+ - Current branch: !`git branch --show-current`
12
+
13
+ ## Task
14
+
15
+ Review this pull request as if you were a senior engineer on the team:
16
+
17
+ ### 1. Summary (2-3 sentences)
18
+ What does this PR do? What problem does it solve?
19
+
20
+ ### 2. Changed Files
21
+ Group the changed files by concern (e.g., "API layer", "tests", "config").
22
+
23
+ ### 3. Risk Areas
24
+ Which files or logic changes require the most careful review? Why?
25
+
26
+ ### 4. Issues Found
27
+ For each issue:
28
+ ```
29
+ **[SEVERITY]** `file.ts:line`
30
+ Issue: <what is wrong>
31
+ Fix: <recommendation>
32
+ ```
33
+ Severity: `CRITICAL` | `WARNING` | `SUGGESTION`
34
+
35
+ ### 5. Verdict
36
+ One of:
37
+ - `✓ LGTM` — ready to merge
38
+ - `~ LGTM with suggestions` — merge after addressing suggestions
39
+ - `✗ Request changes` — must address CRITICAL/WARNING items before merging
40
+
41
+ ## Notes
42
+ - Check `CLAUDE.md` for project-specific conventions to enforce
43
+ - If no issues are found, say so explicitly — don't invent nitpicks
@@ -0,0 +1,308 @@
1
+ ---
2
+ description: Create the actual project directory structure with real starter files based on your tech stack. Run this once after setup-project — it creates src/, tests/, and all the folders and boilerplate files your project needs to start coding immediately.
3
+ allowed-tools: Read, Write, Bash(mkdir:*), Bash(ls:*), Bash(cat:*), Bash(find:*), Bash(npm install:*), Bash(pip install:*), Bash(go mod tidy:*), Bash(git status:*)
4
+ ---
5
+
6
+ ## Step 1 — Understand the Project
7
+
8
+ Read the project context:
9
+
10
+ - CLAUDE.md: !`cat CLAUDE.md 2>/dev/null || echo "(no CLAUDE.md — run /setup-project first)"`
11
+ - Current structure: !`find . -not -path "*/.git/*" -not -path "*/node_modules/*" -not -path "*/__pycache__/*" -not -path "*/.claude/*" -not -path "*/memory/*" -type f | sort | head -40`
12
+ - Tech stack: !`ls package.json requirements.txt pyproject.toml go.mod Cargo.toml pom.xml 2>/dev/null || echo "(none)"`
13
+ - package.json: !`test -f package.json && cat package.json || echo "(none)"`
14
+
15
+ **Focus area** (optional): $ARGUMENTS
16
+
17
+ ---
18
+
19
+ ## Step 2 — Create the Directory Structure
20
+
21
+ Based on the tech stack detected above, create the appropriate project structure. Use the rules below.
22
+
23
+ ---
24
+
25
+ ### If Node.js / TypeScript (Next.js)
26
+
27
+ ```
28
+ src/
29
+ app/ # Next.js App Router
30
+ layout.tsx # Root layout with metadata
31
+ page.tsx # Home page
32
+ globals.css
33
+ (auth)/ # Auth route group
34
+ login/page.tsx
35
+ register/page.tsx
36
+ components/
37
+ ui/ # Shadcn/Radix primitives
38
+ layout/ # Header, Footer, Sidebar
39
+ [feature]/ # Feature-specific components
40
+ hooks/ # Custom React hooks (use*.ts)
41
+ lib/
42
+ utils.ts # cn(), formatters, helpers
43
+ constants.ts # App-wide constants
44
+ types.ts # Shared TypeScript types
45
+ services/ # External API calls, SDKs
46
+ store/ # State management (Zustand/Redux)
47
+ tests/
48
+ unit/
49
+ integration/
50
+ e2e/
51
+ public/
52
+ ```
53
+
54
+ Starter files to create:
55
+ - `src/lib/utils.ts` — cn() helper, common formatters
56
+ - `src/lib/types.ts` — base types (ApiResponse<T>, PaginatedResponse<T>)
57
+ - `src/lib/constants.ts` — APP_NAME, API_BASE_URL from env
58
+ - `src/hooks/useAsync.ts` — generic async hook with loading/error state
59
+ - `tests/unit/example.test.ts` — example test with vitest/jest setup
60
+
61
+ ---
62
+
63
+ ### If Node.js / Express or Fastify (API)
64
+
65
+ ```
66
+ src/
67
+ index.ts # Entry point — creates app, starts server
68
+ app.ts # App factory — registers routes, middleware
69
+ config/
70
+ index.ts # Typed config from process.env
71
+ database.ts # DB connection setup
72
+ routes/
73
+ index.ts # Route registry
74
+ health.ts # GET /health
75
+ [resource]/
76
+ index.ts # Route definitions
77
+ controller.ts # Request handlers
78
+ service.ts # Business logic
79
+ schema.ts # Zod/Joi validation schemas
80
+ middleware/
81
+ auth.ts # JWT/session auth middleware
82
+ error.ts # Global error handler
83
+ logger.ts # Request logging
84
+ models/ # DB models (Prisma/Mongoose/etc.)
85
+ types/
86
+ express.d.ts # Augment Express Request type
87
+ index.ts # Shared types
88
+ tests/
89
+ unit/
90
+ integration/
91
+ fixtures/ # Test data factories
92
+ ```
93
+
94
+ Starter files:
95
+ - `src/config/index.ts` — typed config with validation
96
+ - `src/middleware/error.ts` — global error handler
97
+ - `src/routes/health.ts` — GET /health → { status: "ok", timestamp }
98
+ - `src/types/index.ts` — ApiError, PaginationParams, ApiResponse<T>
99
+ - `tests/fixtures/index.ts` — factory functions for test data
100
+
101
+ ---
102
+
103
+ ### If Python / FastAPI
104
+
105
+ ```
106
+ src/
107
+ main.py # FastAPI app factory, lifespan handler
108
+ config.py # Settings via pydantic-settings
109
+ database.py # SQLAlchemy async engine + session
110
+ api/
111
+ __init__.py
112
+ router.py # Aggregates all routers
113
+ deps.py # Shared FastAPI dependencies (get_db, get_current_user)
114
+ v1/
115
+ __init__.py
116
+ health.py # GET /health
117
+ [resource]/
118
+ __init__.py
119
+ router.py
120
+ schemas.py # Pydantic request/response models
121
+ service.py # Business logic
122
+ models/
123
+ __init__.py
124
+ base.py # SQLAlchemy Base, TimestampMixin
125
+ [resource].py # ORM models
126
+ core/
127
+ security.py # Password hashing, JWT
128
+ exceptions.py # Custom HTTP exceptions
129
+ tests/
130
+ conftest.py # pytest fixtures: test client, test db
131
+ unit/
132
+ integration/
133
+ factories/ # Test data factories (factory_boy)
134
+ alembic/
135
+ versions/
136
+ env.py
137
+ alembic.ini
138
+ ```
139
+
140
+ Starter files with real content:
141
+ - `src/main.py` — FastAPI app with lifespan, CORS, exception handlers, router include
142
+ - `src/config.py` — Pydantic Settings class with all env vars from .env.example
143
+ - `src/database.py` — Async SQLAlchemy engine, AsyncSession, get_db dependency
144
+ - `src/api/deps.py` — get_db, get_current_user dependencies
145
+ - `src/api/v1/health.py` — GET /health endpoint
146
+ - `src/models/base.py` — Base, TimestampMixin with created_at/updated_at
147
+ - `src/core/exceptions.py` — AppError, NotFoundError, UnauthorizedError
148
+ - `tests/conftest.py` — async test client, test database setup/teardown
149
+
150
+ ---
151
+
152
+ ### If Python / Django
153
+
154
+ ```
155
+ [project_name]/
156
+ settings/
157
+ base.py # Shared settings
158
+ development.py # Dev overrides
159
+ production.py # Prod overrides
160
+ urls.py
161
+ wsgi.py
162
+ asgi.py
163
+ apps/
164
+ core/ # Shared models, mixins, utilities
165
+ models.py # TimestampModel abstract base
166
+ views.py
167
+ serializers.py
168
+ [app_name]/
169
+ models.py
170
+ views.py
171
+ serializers.py
172
+ urls.py
173
+ admin.py
174
+ tests/
175
+ test_models.py
176
+ test_views.py
177
+ test_serializers.py
178
+ templates/
179
+ static/
180
+ tests/
181
+ conftest.py
182
+ factories/
183
+ ```
184
+
185
+ ---
186
+
187
+ ### If Go
188
+
189
+ ```
190
+ cmd/
191
+ [appname]/
192
+ main.go # Entry point — wires everything, starts server
193
+ internal/
194
+ config/
195
+ config.go # Viper/env config struct
196
+ server/
197
+ server.go # HTTP server setup, middleware, route registration
198
+ routes.go # All route definitions
199
+ handlers/
200
+ health.go # GET /health handler
201
+ [resource].go
202
+ services/
203
+ [resource].go # Business logic interfaces + implementations
204
+ repository/
205
+ [resource].go # Database queries
206
+ models/
207
+ [resource].go # Domain models
208
+ middleware/
209
+ auth.go
210
+ logger.go
211
+ recovery.go
212
+ pkg/
213
+ errors/
214
+ errors.go # Custom error types
215
+ logger/
216
+ logger.go # Structured logger setup
217
+ database/
218
+ database.go # DB connection, migration runner
219
+ migrations/
220
+ 000001_init.sql
221
+ tests/
222
+ integration/
223
+ testutil/
224
+ testutil.go # Test helpers, in-memory DB setup
225
+ ```
226
+
227
+ Starter files:
228
+ - `cmd/[appname]/main.go` — wires config → db → server → ListenAndServe
229
+ - `internal/config/config.go` — typed config struct with env tags
230
+ - `internal/server/server.go` — chi/gin/echo router setup
231
+ - `internal/handlers/health.go` — GET /health → JSON response
232
+ - `pkg/errors/errors.go` — AppError type with code + message
233
+ - `tests/testutil/testutil.go` — SetupTestDB, LoadFixtures helpers
234
+
235
+ ---
236
+
237
+ ### If Rust
238
+
239
+ ```
240
+ src/
241
+ main.rs # Entry point
242
+ lib.rs # Library root (re-exports)
243
+ config.rs # Config from env vars
244
+ error.rs # Error enum with thiserror
245
+ routes/
246
+ mod.rs
247
+ health.rs
248
+ [resource].rs
249
+ handlers/
250
+ mod.rs
251
+ [resource].rs
252
+ models/
253
+ mod.rs
254
+ [resource].rs
255
+ db/
256
+ mod.rs
257
+ connection.rs
258
+ tests/
259
+ integration_test.rs
260
+ common/
261
+ mod.rs # Test helpers
262
+ ```
263
+
264
+ ---
265
+
266
+ ## Step 3 — Write Starter Files with Real Content
267
+
268
+ For whichever structure applies, create every file listed above with **meaningful starter code**:
269
+
270
+ - Imports that will actually be used
271
+ - Types/structs that match the project's domain
272
+ - At least one working function (even if it's just a health check)
273
+ - TODO comments where user-specific logic goes (not just empty files)
274
+ - `pass` / empty bodies only when the pattern is clear from context
275
+
276
+ **Critical**: Read `CLAUDE.md` before writing — use the exact naming conventions, import styles, and patterns described there.
277
+
278
+ ---
279
+
280
+ ## Step 4 — Install Dependencies
281
+
282
+ After creating files, run the install command for the stack:
283
+
284
+ - Node.js: `npm install` (if package.json was updated)
285
+ - Python: `pip install -r requirements.txt` or `pip install -e ".[dev]"`
286
+ - Go: `go mod tidy`
287
+ - Rust: `cargo build` (just to validate, don't run full compile)
288
+
289
+ ---
290
+
291
+ ## Step 5 — Summary
292
+
293
+ List every file and directory created. Group by layer:
294
+
295
+ ```
296
+ Created:
297
+ Config & Entry Points src/main.py, src/config.py, ...
298
+ API Layer src/api/v1/health.py, ...
299
+ Data Layer src/models/base.py, ...
300
+ Tests tests/conftest.py, ...
301
+ Infrastructure alembic/, .env (from .env.example), ...
302
+
303
+ Next steps:
304
+ 1. Fill in the domain model in src/models/[resource].py
305
+ 2. Create your first real endpoint in src/api/v1/[resource]/
306
+ 3. Run the project: [command from CLAUDE.md]
307
+ 4. Run the tests: [test command from CLAUDE.md]
308
+ ```
@@ -0,0 +1,253 @@
1
+ ---
2
+ description: AI-fill the complete Claude Code project configuration. Run after `claudeforge project "description"` — or run it directly with your project description as the argument. Generates CLAUDE.md, settings, agents, commands, memory, and more.
3
+ allowed-tools: Read, Write, Edit, MultiEdit, Bash(git status:*), Bash(git log:*), Bash(ls:*), Bash(find:*), Bash(cat:*), Bash(rm:*)
4
+ ---
5
+
6
+ ## Step 1 — Gather All Context
7
+
8
+ Read the project setup context if it was prepared by the CLI:
9
+
10
+ !`test -f SETUP_CONTEXT.md && cat SETUP_CONTEXT.md || echo "(no SETUP_CONTEXT.md — using argument and detected files)"`
11
+
12
+ Detect the project's current state:
13
+
14
+ - Root directory: !`ls -la`
15
+ - Tech stack files: !`ls package.json requirements.txt pyproject.toml go.mod Cargo.toml pom.xml Gemfile composer.json tsconfig.json next.config.js vite.config.ts docker-compose.yml Dockerfile 2>/dev/null || echo "(none detected)"`
16
+ - package.json: !`test -f package.json && cat package.json || echo "(none)"`
17
+ - Python deps: !`test -f requirements.txt && cat requirements.txt || test -f pyproject.toml && cat pyproject.toml || echo "(none)"`
18
+ - Go module: !`test -f go.mod && cat go.mod || echo "(none)"`
19
+ - Existing CLAUDE.md: !`cat CLAUDE.md 2>/dev/null || echo "(not yet written)"`
20
+ - Git history: !`git log --oneline -5 2>/dev/null || echo "(no commits yet)"`
21
+
22
+ **My project**: $ARGUMENTS
23
+
24
+ ---
25
+
26
+ ## Step 2 — Fill Every Configuration File
27
+
28
+ Using all context above, generate tailored content for each file. Be specific and opinionated — no placeholders, no generic examples. Every value should reflect the actual tech stack.
29
+
30
+ ### 2a. Rewrite `CLAUDE.md`
31
+
32
+ Write a complete `CLAUDE.md` that includes:
33
+
34
+ **Header**: Project name (infer from package.json/go.mod/directory name) and one-line description.
35
+
36
+ **Commands table**: Real commands for this exact stack — not placeholders. Examples:
37
+ - Python/FastAPI: `uvicorn src.main:app --reload`, `pytest`, `ruff check .`, `alembic upgrade head`
38
+ - Node.js/Next.js: `npm run dev`, `npm test`, `npm run build`, `npx prisma migrate dev`
39
+ - Go: `go run ./cmd/server`, `go test ./...`, `golangci-lint run`, `go build -o bin/app ./cmd/server`
40
+
41
+ **Architecture**: Directory tree of what the project structure should look like once scaffolded.
42
+
43
+ **Code Style**: Specific conventions — naming, imports, error handling, test patterns — for this stack.
44
+
45
+ **Environment Variables**: Table with Name, Description, Required columns — matching `.env.example`.
46
+
47
+ **Gotchas**: 3–5 non-obvious things about this stack (e.g., "FastAPI route order matters — more specific routes must be declared before generic ones").
48
+
49
+ **Workflow**: How to use `/commit`, `/review-pr`, and project-specific agents.
50
+
51
+ ### 2b. Update `.claude/settings.json`
52
+
53
+ Read the current file first, then merge in stack-appropriate additions:
54
+
55
+ ```
56
+ Read: .claude/settings.json
57
+ ```
58
+
59
+ Add to `permissions.allow` for the detected stack:
60
+ - Python: `Bash(pytest:*)`, `Bash(ruff:*)`, `Bash(mypy:*)`, `Bash(alembic:*)`, `Bash(pip:*)`
61
+ - Node.js: `Bash(npm run:*)`, `Bash(npx:*)`, `Bash(node:*)`
62
+ - Go: `Bash(go test:*)`, `Bash(go build:*)`, `Bash(go run:*)`, `Bash(golangci-lint:*)`
63
+ - Docker: `Bash(docker-compose:*)`, `Bash(docker build:*)`, `Bash(docker run:*)`
64
+
65
+ Keep all existing keys (model, hooks, deny list).
66
+
67
+ ### 2c. Write `.env.example`
68
+
69
+ Generate a real `.env.example` grouped by category. Each variable needs:
70
+ - A comment explaining what it's for and where to get it
71
+ - A realistic example value
72
+ - A `(required)` or `(optional)` marker
73
+
74
+ Include variables for: the app itself, any databases mentioned, any external APIs implied by the description, and any auth/session configuration.
75
+
76
+ ### 2d. Update `.mcp.json`
77
+
78
+ Always keep `context7`. Add servers based on the stack:
79
+ - PostgreSQL mentioned → `@modelcontextprotocol/server-postgres`
80
+ - Web app with browser testing → `@playwright/mcp` or `@modelcontextprotocol/server-puppeteer`
81
+ - GitHub integration → `@modelcontextprotocol/server-github`
82
+ - File-heavy operations → `@modelcontextprotocol/server-filesystem`
83
+
84
+ ### 2e. Rewrite `memory/project_ai_workflow.md`
85
+
86
+ Write a complete, project-specific workflow document:
87
+ - Which agents to use and when (be explicit: "use `api-reviewer` whenever adding a new endpoint")
88
+ - Which slash commands map to which tasks
89
+ - MCP servers available and how to invoke them
90
+ - Project-specific AI conventions (e.g., "always read `src/db/schema.py` before writing queries")
91
+ - Any architectural decisions that Claude should know and respect
92
+
93
+ ### 2f. Create 2–4 Specialized Agents
94
+
95
+ Create agent files in `.claude/agents/`. Choose agents appropriate to the project type:
96
+
97
+ **For API/Backend projects:**
98
+ - `api-reviewer.md` — Reviews new endpoints: checks REST conventions, input validation, auth, error responses, OpenAPI compliance
99
+ - `db-reviewer.md` — Reviews database changes: checks query performance, migration safety, index coverage, N+1 risks
100
+
101
+ **For Frontend projects:**
102
+ - `component-reviewer.md` — Reviews UI components: checks accessibility, responsive design, prop types, performance (memo, useMemo)
103
+ - `ux-checker.md` — Reviews user-facing copy, loading states, error states, empty states
104
+
105
+ **For Data/ML projects:**
106
+ - `data-validator.md` — Validates data pipelines: schema consistency, null handling, statistical reasonableness
107
+ - `ml-reviewer.md` — Reviews model code: data leakage, correct train/val/test splits, metric definitions
108
+
109
+ **For all projects:**
110
+ - `security-auditor.md` — Deep security review: focuses on auth flows, input sanitization, secrets management, dependency CVEs
111
+
112
+ Each agent must have:
113
+ - Accurate `description` frontmatter (this determines when Claude invokes it automatically)
114
+ - A detailed system prompt with a numbered checklist specific to the project
115
+ - A clear output format
116
+
117
+ ### 2g. Create 2–4 Slash Commands
118
+
119
+ Create command files in `.claude/commands/` specific to this workflow:
120
+
121
+ **Common by stack:**
122
+ - Python: `test.md` (runs pytest with coverage, explains failures), `migrate.md` (runs Alembic, validates schema)
123
+ - Node.js: `test.md` (runs the test suite, explains failures), `typecheck.md` (runs tsc, explains type errors)
124
+ - Any DB project: `seed.md` (seeds the database with realistic test data)
125
+ - Any deployed project: `deploy.md` (pre-deploy checklist + deploy command + smoke test)
126
+
127
+ Each command must use `!` dynamic context (e.g., `!git diff`, `!npm test 2>&1`) and have a clear `## Task` section.
128
+
129
+ ### 2h. Append `.gitignore` Tech-Stack Patterns
130
+
131
+ Append a labeled section with patterns for this stack. Examples:
132
+ - Python: `__pycache__/`, `*.pyc`, `.pytest_cache/`, `.mypy_cache/`, `.ruff_cache/`, `dist/`, `*.egg-info/`
133
+ - Node.js: already covered by base template
134
+ - Go: `bin/`, `*.exe`, `*.test`, `coverage.out`
135
+ - Rust: `target/`
136
+
137
+ ---
138
+
139
+ ## Step 3 — Clean Up
140
+
141
+ Delete the context file if it exists:
142
+
143
+ ```bash
144
+ rm -f SETUP_CONTEXT.md
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Step 4 — Document Every File Generated
150
+
151
+ After all files are written, go back and add a documentation header to each one so users know what they're looking at and what to customize.
152
+
153
+ For each file written, prepend (or add at an appropriate location):
154
+
155
+ **CLAUDE.md** — add at the top after the title:
156
+ ```
157
+ > **Setup status**: Generated by claudeforge. Update the Commands table with your actual
158
+ > project commands after verifying them. Fill in the Gotchas section as you discover them.
159
+ ```
160
+
161
+ **`.claude/settings.json`** — add a `_readme` key (JSON doesn't support comments, use this):
162
+ ```json
163
+ "_readme": "Team-shared Claude Code settings. Personal overrides go in settings.local.json (gitignored). See .claude/README.md for the full reference."
164
+ ```
165
+
166
+ **Each agent file** — after the frontmatter, add:
167
+ ```
168
+ <!-- WHAT THIS IS: A Claude sub-agent that specializes in [specific task].
169
+ HOW TO INVOKE: Claude uses this automatically when the task matches the description.
170
+ HOW TO CUSTOMIZE: Edit the checklist items below to match your project's specific patterns.
171
+ THINGS TO ADD: Project-specific anti-patterns, naming conventions, architectural rules. -->
172
+ ```
173
+
174
+ **Each command file** — after the frontmatter, add:
175
+ ```
176
+ <!-- WHAT THIS IS: A slash command. Run it with /[name] in the Claude Code chat.
177
+ HOW IT WORKS: Claude reads the ## Context section (! lines run as shell commands)
178
+ then follows the ## Task instructions.
179
+ HOW TO CUSTOMIZE: Edit the ## Task section. Add more ! context lines if needed. -->
180
+ ```
181
+
182
+ **memory/project_ai_workflow.md** — add at the top:
183
+ ```
184
+ <!-- Update this file as your AI workflow evolves. Claude reads it every session.
185
+ The more specific you are, the less you'll need to re-explain things to Claude. -->
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Step 5 — Write `SETUP_SUMMARY.md`
191
+
192
+ Create a `SETUP_SUMMARY.md` in the project root:
193
+
194
+ ```markdown
195
+ # Claude Code Setup Summary
196
+
197
+ Generated by `/setup-project` on [today's date].
198
+
199
+ ## What Was Generated
200
+
201
+ | File | What It Does | Key Things to Customize |
202
+ |------|-------------|------------------------|
203
+ | `CLAUDE.md` | Project context loaded every session | Update Commands table with real commands; add Gotchas as you discover them |
204
+ | `.claude/settings.json` | Permissions + hooks for Claude Code | Add more allowed commands as you expand your workflow |
205
+ | `.env.example` | Documents required env vars | Update with any new vars; never commit real values |
206
+ | `.mcp.json` | MCP servers your team shares | Add connection strings to .env for any DB servers |
207
+ | `memory/project_ai_workflow.md` | AI conventions for this project | Update as your workflow evolves; Claude reads this every session |
208
+ | [agent files] | Specialized review agents | Customize checklists to add project-specific patterns |
209
+ | [command files] | Slash commands for your workflow | Edit the ## Task section to match your exact needs |
210
+
211
+ ## Slash Commands Available
212
+
213
+ Run these in the Claude Code chat window:
214
+
215
+ | Command | When to Use |
216
+ |---------|------------|
217
+ | `/setup-project` | Re-run project setup with a new description |
218
+ | `/commit` | After completing a task — creates a conventional commit |
219
+ | `/review-pr` | Before opening a PR — structured diff review |
220
+ | `/project-health` | Weekly — audits your setup and suggests improvements |
221
+ | `/memory-sync` | End of session — persists what Claude learned today |
222
+ | `/standup` | Morning — generates standup from yesterday's commits |
223
+ | `/scaffold-structure` | Once — creates the src/, tests/, etc. directory structure |
224
+ | [project commands] | See .claude/commands/ for project-specific commands |
225
+
226
+ ## Agents Available
227
+
228
+ Claude uses these automatically based on what you're doing:
229
+
230
+ | Agent | Invoked When |
231
+ |-------|-------------|
232
+ | `code-reviewer` | After writing code, before PR |
233
+ | [project agents] | See .claude/agents/ for project-specific agents |
234
+
235
+ ## Next Steps
236
+
237
+ 1. **Verify commands** in `CLAUDE.md` — run each one and confirm they work
238
+ 2. **Create `.env`** from `.env.example` — fill in real values
239
+ 3. **Run `/scaffold-structure`** in Claude Code chat to create the project directory layout
240
+ 4. **Open Claude Code** in this directory and start building
241
+ 5. Delete this file once you've read it
242
+ ```
243
+
244
+ ---
245
+
246
+ ## Step 6 — Final Summary
247
+
248
+ Print a clear summary of everything that was done:
249
+
250
+ 1. List every file written
251
+ 2. List every agent created with its trigger description
252
+ 3. List every slash command created with its use case
253
+ 4. State the exact next step: "Run `/scaffold-structure` in Claude Code to create your project's directory structure"
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Generate a standup update from recent git commits, open issues, and current working state. Optionally pass a date range: /standup "last 3 days"
3
+ allowed-tools: Bash(git log:*), Bash(git diff:*), Bash(git status:*), Bash(git branch:*), Bash(gh issue:*), Bash(gh pr:*)
4
+ ---
5
+
6
+ ## Context
7
+
8
+ - Recent commits: !`git log --oneline --since="yesterday" --author="$(git config user.name)" 2>/dev/null || git log --oneline -10`
9
+ - Current branch: !`git branch --show-current 2>/dev/null`
10
+ - Working state: !`git status --short 2>/dev/null`
11
+ - Open PRs (if gh available): !`gh pr list --author "@me" --state open 2>/dev/null || echo "(gh not available)"`
12
+
13
+ **Date range**: $ARGUMENTS
14
+
15
+ ## Task
16
+
17
+ Write a concise standup update with these three sections:
18
+
19
+ ### Yesterday / Since last standup
20
+ Summarize what was actually done based on the git log. Group related commits into themes rather than listing every commit individually. Be specific about what changed.
21
+
22
+ ### Today / Next
23
+ Based on the in-progress work (current branch, uncommitted changes, open PRs), describe what's planned next.
24
+
25
+ ### Blockers
26
+ Only include this section if there are actual blockers visible (failing tests, unresolved merge conflicts, unclear requirements, etc.). Otherwise omit it.
27
+
28
+ ---
29
+
30
+ **Format rules:**
31
+ - Each section: 1–4 bullet points max
32
+ - Plain language — no jargon, readable by anyone on the team
33
+ - Skip the section headers if a section is empty
34
+ - Total length: under 150 words
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env bash
2
+ # ─────────────────────────────────────────────────────────────────────────────
3
+ # PostToolUse Hook
4
+ # Runs after a tool has completed. Use this to inject reminders or context.
5
+ #
6
+ # Input: JSON on stdin — tool_name, tool_input, tool_response
7
+ # Output: {"systemMessage": "..."} to inject a message into Claude's context,
8
+ # or empty output for no effect.
9
+ #
10
+ # Docs: https://docs.anthropic.com/en/docs/claude-code/hooks
11
+ # ─────────────────────────────────────────────────────────────────────────────
12
+
13
+ set -euo pipefail
14
+
15
+ INPUT=$(cat)
16
+
17
+ json_get() {
18
+ python3 -c "
19
+ import sys, json
20
+ try:
21
+ d = json.loads(sys.stdin.read())
22
+ keys = '$1'.split('.')
23
+ v = d
24
+ for k in keys:
25
+ v = v[k] if isinstance(v, dict) else ''
26
+ print(v if v is not None else '')
27
+ except:
28
+ print('')
29
+ " <<< "$INPUT"
30
+ }
31
+
32
+ TOOL_NAME=$(json_get "tool_name")
33
+ FILE_PATH=$(json_get "tool_input.path")
34
+
35
+ # ── Reminder: run tests after editing test files ──────────────────────────────
36
+ if [[ "$TOOL_NAME" == "Edit" || "$TOOL_NAME" == "Write" || "$TOOL_NAME" == "MultiEdit" ]]; then
37
+ if echo "$FILE_PATH" | grep -qiE '\.(test|spec)\.[jt]sx?$|_test\.go$|test_.*\.py$|.*_spec\.rb$'; then
38
+ echo '{"systemMessage":"Test file edited. Consider running the test suite to verify the changes work as expected."}'
39
+ exit 0
40
+ fi
41
+ fi
42
+
43
+ # ── Default: no effect ────────────────────────────────────────────────────────
44
+ exit 0