forgedev 1.0.0 → 1.0.2
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.md +3 -3
- package/README.md +246 -246
- package/bin/devforge.js +4 -4
- package/package.json +33 -33
- package/src/claude-configurator.js +260 -260
- package/src/cli.js +119 -119
- package/src/composer.js +214 -214
- package/src/doctor-checks.js +743 -743
- package/src/doctor-prompts.js +295 -295
- package/src/doctor.js +281 -281
- package/src/guided.js +315 -315
- package/src/index.js +148 -148
- package/src/init-mode.js +138 -134
- package/src/prompts.js +155 -155
- package/src/scanner.js +368 -368
- package/templates/claude-code/agents/code-quality-reviewer.md +41 -41
- package/templates/claude-code/agents/production-readiness.md +55 -55
- package/templates/claude-code/agents/security-reviewer.md +41 -41
- package/templates/claude-code/agents/spec-validator.md +34 -34
- package/templates/claude-code/agents/uat-validator.md +37 -37
- package/templates/claude-code/claude-md/base.md +33 -33
- package/templates/claude-code/commands/done.md +19 -19
- package/templates/claude-code/commands/generate-prd.md +45 -45
- package/templates/claude-code/commands/generate-uat.md +35 -35
- package/templates/claude-code/commands/next.md +20 -20
- package/templates/claude-code/commands/optimize-claude-md.md +31 -31
- package/templates/claude-code/commands/status.md +24 -24
- package/templates/claude-code/commands/workflows.md +26 -0
- package/templates/claude-code/hooks/polyglot.json +36 -36
- package/templates/claude-code/hooks/python.json +36 -36
- package/templates/claude-code/hooks/scripts/autofix-polyglot.sh +16 -16
- package/templates/claude-code/hooks/scripts/autofix-python.sh +14 -14
- package/templates/claude-code/hooks/scripts/autofix-typescript.sh +14 -14
- package/templates/claude-code/hooks/scripts/guard-protected-files.sh +21 -21
- package/templates/claude-code/hooks/typescript.json +36 -36
- package/templates/claude-code/commands/help.md +0 -26
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
Generate UAT (User Acceptance Test) scenarios for this project.
|
|
2
|
-
|
|
3
|
-
## Instructions
|
|
4
|
-
|
|
5
|
-
1. Read the codebase to identify all user-facing features:
|
|
6
|
-
- API endpoints and their purposes
|
|
7
|
-
- UI pages and forms
|
|
8
|
-
- Authentication flows
|
|
9
|
-
- Business logic and workflows
|
|
10
|
-
|
|
11
|
-
2. For each feature, create test scenarios covering:
|
|
12
|
-
- Happy path (expected usage)
|
|
13
|
-
- Edge cases (empty inputs, max values, special characters)
|
|
14
|
-
- Error cases (invalid data, unauthorized access, network failures)
|
|
15
|
-
- Integration points (features that depend on each other)
|
|
16
|
-
|
|
17
|
-
3. Prioritize scenarios:
|
|
18
|
-
- P0: Critical path — app is broken if these fail (login, core CRUD, data integrity)
|
|
19
|
-
- P1: Important — significant user impact (permissions, validation, error handling)
|
|
20
|
-
- P2: Nice to have — minor features, cosmetic issues
|
|
21
|
-
|
|
22
|
-
## Output
|
|
23
|
-
|
|
24
|
-
Generate two files:
|
|
25
|
-
|
|
26
|
-
### docs/uat/UAT_TEMPLATE.md
|
|
27
|
-
Markdown table with columns:
|
|
28
|
-
| ID | Feature | Scenario | Steps | Expected Result | Priority |
|
|
29
|
-
|
|
30
|
-
### docs/uat/UAT_CHECKLIST.csv
|
|
31
|
-
CSV with columns:
|
|
32
|
-
ID,Feature,Scenario,Priority,Status,Tester,Date,Notes
|
|
33
|
-
|
|
34
|
-
Include at least 5 P0 scenarios, 10 P1 scenarios, and 5 P2 scenarios.
|
|
35
|
-
Do NOT modify any code — this is a documentation-only task.
|
|
1
|
+
Generate UAT (User Acceptance Test) scenarios for this project.
|
|
2
|
+
|
|
3
|
+
## Instructions
|
|
4
|
+
|
|
5
|
+
1. Read the codebase to identify all user-facing features:
|
|
6
|
+
- API endpoints and their purposes
|
|
7
|
+
- UI pages and forms
|
|
8
|
+
- Authentication flows
|
|
9
|
+
- Business logic and workflows
|
|
10
|
+
|
|
11
|
+
2. For each feature, create test scenarios covering:
|
|
12
|
+
- Happy path (expected usage)
|
|
13
|
+
- Edge cases (empty inputs, max values, special characters)
|
|
14
|
+
- Error cases (invalid data, unauthorized access, network failures)
|
|
15
|
+
- Integration points (features that depend on each other)
|
|
16
|
+
|
|
17
|
+
3. Prioritize scenarios:
|
|
18
|
+
- P0: Critical path — app is broken if these fail (login, core CRUD, data integrity)
|
|
19
|
+
- P1: Important — significant user impact (permissions, validation, error handling)
|
|
20
|
+
- P2: Nice to have — minor features, cosmetic issues
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
Generate two files:
|
|
25
|
+
|
|
26
|
+
### docs/uat/UAT_TEMPLATE.md
|
|
27
|
+
Markdown table with columns:
|
|
28
|
+
| ID | Feature | Scenario | Steps | Expected Result | Priority |
|
|
29
|
+
|
|
30
|
+
### docs/uat/UAT_CHECKLIST.csv
|
|
31
|
+
CSV with columns:
|
|
32
|
+
ID,Feature,Scenario,Priority,Status,Tester,Date,Notes
|
|
33
|
+
|
|
34
|
+
Include at least 5 P0 scenarios, 10 P1 scenarios, and 5 P2 scenarios.
|
|
35
|
+
Do NOT modify any code — this is a documentation-only task.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
Figure out what the developer should work on next.
|
|
2
|
-
|
|
3
|
-
## Steps
|
|
4
|
-
|
|
5
|
-
1. Check git log for recent commits to understand current progress
|
|
6
|
-
2. Look for TODO/FIXME/HACK comments in the codebase
|
|
7
|
-
3. Check if there are failing tests: `{{TEST_COMMAND}}`
|
|
8
|
-
4. Check if there are lint errors: `{{LINT_COMMAND}}`
|
|
9
|
-
5. Check if docs/uat/UAT_CHECKLIST.csv exists and has unchecked items
|
|
10
|
-
6. Look for open issues or PRs if this is a GitHub repo
|
|
11
|
-
|
|
12
|
-
## Priority Order
|
|
13
|
-
1. Failing tests or build errors (fix first)
|
|
14
|
-
2. Security issues (from recent audit or TODO comments)
|
|
15
|
-
3. Unchecked UAT scenarios
|
|
16
|
-
4. TODO/FIXME items in code
|
|
17
|
-
5. New feature work
|
|
18
|
-
|
|
19
|
-
## Output
|
|
20
|
-
Recommend the single most important thing to work on next, with a clear action.
|
|
1
|
+
Figure out what the developer should work on next.
|
|
2
|
+
|
|
3
|
+
## Steps
|
|
4
|
+
|
|
5
|
+
1. Check git log for recent commits to understand current progress
|
|
6
|
+
2. Look for TODO/FIXME/HACK comments in the codebase
|
|
7
|
+
3. Check if there are failing tests: `{{TEST_COMMAND}}`
|
|
8
|
+
4. Check if there are lint errors: `{{LINT_COMMAND}}`
|
|
9
|
+
5. Check if docs/uat/UAT_CHECKLIST.csv exists and has unchecked items
|
|
10
|
+
6. Look for open issues or PRs if this is a GitHub repo
|
|
11
|
+
|
|
12
|
+
## Priority Order
|
|
13
|
+
1. Failing tests or build errors (fix first)
|
|
14
|
+
2. Security issues (from recent audit or TODO comments)
|
|
15
|
+
3. Unchecked UAT scenarios
|
|
16
|
+
4. TODO/FIXME items in code
|
|
17
|
+
5. New feature work
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
Recommend the single most important thing to work on next, with a clear action.
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
Analyze and optimize CLAUDE.md for this project.
|
|
2
|
-
|
|
3
|
-
## Instructions
|
|
4
|
-
|
|
5
|
-
1. Read the current CLAUDE.md and measure its size (line count).
|
|
6
|
-
|
|
7
|
-
2. The target is **under 150 lines**. CLAUDE.md should contain ONLY:
|
|
8
|
-
- WHAT: One-line project description
|
|
9
|
-
- HOW: Key commands (lint, test, build, dev)
|
|
10
|
-
- RULES: Universal rules that apply everywhere (max 10-15 rules)
|
|
11
|
-
- PITFALLS: Known gotchas specific to this project (max 5)
|
|
12
|
-
|
|
13
|
-
3. Identify content that should be **moved out**:
|
|
14
|
-
- Detailed schemas, specs, or data models → `.claude/skills/<topic>/SKILL.md`
|
|
15
|
-
- Backend-specific rules → `backend/CLAUDE.md`
|
|
16
|
-
- Frontend-specific rules → `src/CLAUDE.md` or `frontend/CLAUDE.md`
|
|
17
|
-
- Detailed API documentation → `docs/`
|
|
18
|
-
- Step-by-step procedures → `.claude/commands/`
|
|
19
|
-
- Lists of more than 5 items → `.claude/skills/`
|
|
20
|
-
|
|
21
|
-
4. Present a proposal as a table:
|
|
22
|
-
|
|
23
|
-
| Content | Current Location | Move To | Lines Saved |
|
|
24
|
-
|---------|-----------------|---------|-------------|
|
|
25
|
-
| ... | CLAUDE.md:45-80 | .claude/skills/schema/SKILL.md | 35 |
|
|
26
|
-
|
|
27
|
-
## Rules
|
|
28
|
-
- Do NOT modify any files until I explicitly approve the proposal
|
|
29
|
-
- Show the current line count and target line count
|
|
30
|
-
- Preserve all information — nothing gets deleted, only relocated
|
|
31
|
-
- Each skill file needs frontmatter: name, description, and relevant file patterns
|
|
1
|
+
Analyze and optimize CLAUDE.md for this project.
|
|
2
|
+
|
|
3
|
+
## Instructions
|
|
4
|
+
|
|
5
|
+
1. Read the current CLAUDE.md and measure its size (line count).
|
|
6
|
+
|
|
7
|
+
2. The target is **under 150 lines**. CLAUDE.md should contain ONLY:
|
|
8
|
+
- WHAT: One-line project description
|
|
9
|
+
- HOW: Key commands (lint, test, build, dev)
|
|
10
|
+
- RULES: Universal rules that apply everywhere (max 10-15 rules)
|
|
11
|
+
- PITFALLS: Known gotchas specific to this project (max 5)
|
|
12
|
+
|
|
13
|
+
3. Identify content that should be **moved out**:
|
|
14
|
+
- Detailed schemas, specs, or data models → `.claude/skills/<topic>/SKILL.md`
|
|
15
|
+
- Backend-specific rules → `backend/CLAUDE.md`
|
|
16
|
+
- Frontend-specific rules → `src/CLAUDE.md` or `frontend/CLAUDE.md`
|
|
17
|
+
- Detailed API documentation → `docs/`
|
|
18
|
+
- Step-by-step procedures → `.claude/commands/`
|
|
19
|
+
- Lists of more than 5 items → `.claude/skills/`
|
|
20
|
+
|
|
21
|
+
4. Present a proposal as a table:
|
|
22
|
+
|
|
23
|
+
| Content | Current Location | Move To | Lines Saved |
|
|
24
|
+
|---------|-----------------|---------|-------------|
|
|
25
|
+
| ... | CLAUDE.md:45-80 | .claude/skills/schema/SKILL.md | 35 |
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
- Do NOT modify any files until I explicitly approve the proposal
|
|
29
|
+
- Show the current line count and target line count
|
|
30
|
+
- Preserve all information — nothing gets deleted, only relocated
|
|
31
|
+
- Each skill file needs frontmatter: name, description, and relevant file patterns
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
Run all validation checks and show a project dashboard.
|
|
2
|
-
|
|
3
|
-
## Steps
|
|
4
|
-
|
|
5
|
-
1. Run lint: `{{LINT_COMMAND}}`
|
|
6
|
-
2. Run type check: `{{TYPE_CHECK_COMMAND}}`
|
|
7
|
-
3. Run tests: `{{TEST_COMMAND}}`
|
|
8
|
-
4. Check git status for uncommitted changes
|
|
9
|
-
5. Check for any `.env` files accidentally tracked
|
|
10
|
-
|
|
11
|
-
## Output Format
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
{{PROJECT_NAME_PASCAL}} Status
|
|
15
|
-
──────────────────────────
|
|
16
|
-
Lint: PASS / FAIL (N issues)
|
|
17
|
-
Types: PASS / FAIL (N errors)
|
|
18
|
-
Tests: PASS / FAIL (N passed, M failed)
|
|
19
|
-
Git: clean / N uncommitted changes
|
|
20
|
-
Secrets: clean / WARNING
|
|
21
|
-
──────────────────────────
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
If anything fails, suggest the next step to fix it.
|
|
1
|
+
Run all validation checks and show a project dashboard.
|
|
2
|
+
|
|
3
|
+
## Steps
|
|
4
|
+
|
|
5
|
+
1. Run lint: `{{LINT_COMMAND}}`
|
|
6
|
+
2. Run type check: `{{TYPE_CHECK_COMMAND}}`
|
|
7
|
+
3. Run tests: `{{TEST_COMMAND}}`
|
|
8
|
+
4. Check git status for uncommitted changes
|
|
9
|
+
5. Check for any `.env` files accidentally tracked
|
|
10
|
+
|
|
11
|
+
## Output Format
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
{{PROJECT_NAME_PASCAL}} Status
|
|
15
|
+
──────────────────────────
|
|
16
|
+
Lint: PASS / FAIL (N issues)
|
|
17
|
+
Types: PASS / FAIL (N errors)
|
|
18
|
+
Tests: PASS / FAIL (N passed, M failed)
|
|
19
|
+
Git: clean / N uncommitted changes
|
|
20
|
+
Secrets: clean / WARNING
|
|
21
|
+
──────────────────────────
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If anything fails, suggest the next step to fix it.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Show the developer what workflows are available.
|
|
2
|
+
|
|
3
|
+
## Available Workflows
|
|
4
|
+
|
|
5
|
+
### Daily Development
|
|
6
|
+
- `/status` — Run all checks and show a project dashboard
|
|
7
|
+
- `/next` — Figure out what to work on next
|
|
8
|
+
- `/done` — Verify the current task is complete before moving on
|
|
9
|
+
|
|
10
|
+
### Verification
|
|
11
|
+
- `/verify-all` — Run lint, type check, tests, then launch all reviewers
|
|
12
|
+
- `/audit-spec` — Validate implementation against a spec/PRD
|
|
13
|
+
- `/audit-wiring` — Find dead or unwired features
|
|
14
|
+
- `/audit-security` — Run a security audit
|
|
15
|
+
|
|
16
|
+
### Release
|
|
17
|
+
- `/pre-pr` — Run the complete pre-PR checklist
|
|
18
|
+
- `/run-uat` — Execute UAT scenarios
|
|
19
|
+
|
|
20
|
+
### Generation
|
|
21
|
+
- `/generate-prd` — Generate a PRD from the current codebase
|
|
22
|
+
- `/generate-uat` — Generate UAT scenarios and checklists
|
|
23
|
+
- `/optimize-claude-md` — Slim down an oversized CLAUDE.md
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
Run `/status` to see where things stand, then `/next` to pick up work.
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"PreToolUse": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "Write|Edit",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "bash .claude/hooks/guard-protected-files.sh"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"PostToolUse": [
|
|
15
|
-
{
|
|
16
|
-
"matcher": "Write|Edit",
|
|
17
|
-
"hooks": [
|
|
18
|
-
{
|
|
19
|
-
"type": "command",
|
|
20
|
-
"command": "bash .claude/hooks/autofix-polyglot.sh"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"Stop": [
|
|
26
|
-
{
|
|
27
|
-
"hooks": [
|
|
28
|
-
{
|
|
29
|
-
"type": "command",
|
|
30
|
-
"command": "cd frontend && npx tsc --noEmit 2>&1 && npx eslint . 2>&1 && cd ../backend && ruff check . 2>&1"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Write|Edit",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "bash .claude/hooks/guard-protected-files.sh"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"PostToolUse": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "Write|Edit",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "bash .claude/hooks/autofix-polyglot.sh"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"Stop": [
|
|
26
|
+
{
|
|
27
|
+
"hooks": [
|
|
28
|
+
{
|
|
29
|
+
"type": "command",
|
|
30
|
+
"command": "cd frontend && npx tsc --noEmit 2>&1 && npx eslint . 2>&1 && cd ../backend && ruff check . 2>&1"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"PreToolUse": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "Write|Edit",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "bash .claude/hooks/guard-protected-files.sh"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"PostToolUse": [
|
|
15
|
-
{
|
|
16
|
-
"matcher": "Write|Edit",
|
|
17
|
-
"hooks": [
|
|
18
|
-
{
|
|
19
|
-
"type": "command",
|
|
20
|
-
"command": "bash .claude/hooks/autofix-python.sh"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"Stop": [
|
|
26
|
-
{
|
|
27
|
-
"hooks": [
|
|
28
|
-
{
|
|
29
|
-
"type": "command",
|
|
30
|
-
"command": "cd backend && ruff check . 2>&1 && pyright 2>&1"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Write|Edit",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "bash .claude/hooks/guard-protected-files.sh"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"PostToolUse": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "Write|Edit",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "bash .claude/hooks/autofix-python.sh"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"Stop": [
|
|
26
|
+
{
|
|
27
|
+
"hooks": [
|
|
28
|
+
{
|
|
29
|
+
"type": "command",
|
|
30
|
+
"command": "cd backend && ruff check . 2>&1 && pyright 2>&1"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Auto-fix lint issues on saved TypeScript or Python files (polyglot)
|
|
3
|
-
INPUT=$(cat)
|
|
4
|
-
FILE_PATH=$(echo "$INPUT" | jq -r ".tool_input.file_path // empty")
|
|
5
|
-
|
|
6
|
-
if [ -z "$FILE_PATH" ]; then
|
|
7
|
-
exit 0
|
|
8
|
-
fi
|
|
9
|
-
|
|
10
|
-
if [[ "$FILE_PATH" == *.ts || "$FILE_PATH" == *.tsx ]]; then
|
|
11
|
-
cd frontend && npx eslint --fix "$FILE_PATH" 2>&1 || true
|
|
12
|
-
elif [[ "$FILE_PATH" == *.py ]]; then
|
|
13
|
-
cd backend && ruff check --fix "$FILE_PATH" 2>&1 || true
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Auto-fix lint issues on saved TypeScript or Python files (polyglot)
|
|
3
|
+
INPUT=$(cat)
|
|
4
|
+
FILE_PATH=$(echo "$INPUT" | jq -r ".tool_input.file_path // empty")
|
|
5
|
+
|
|
6
|
+
if [ -z "$FILE_PATH" ]; then
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
if [[ "$FILE_PATH" == *.ts || "$FILE_PATH" == *.tsx ]]; then
|
|
11
|
+
cd frontend && npx eslint --fix "$FILE_PATH" 2>&1 || true
|
|
12
|
+
elif [[ "$FILE_PATH" == *.py ]]; then
|
|
13
|
+
cd backend && ruff check --fix "$FILE_PATH" 2>&1 || true
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
exit 0
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Auto-fix lint issues on saved Python files
|
|
3
|
-
INPUT=$(cat)
|
|
4
|
-
FILE_PATH=$(echo "$INPUT" | jq -r ".tool_input.file_path // empty")
|
|
5
|
-
|
|
6
|
-
if [ -z "$FILE_PATH" ]; then
|
|
7
|
-
exit 0
|
|
8
|
-
fi
|
|
9
|
-
|
|
10
|
-
if [[ "$FILE_PATH" == *.py ]]; then
|
|
11
|
-
cd backend && ruff check --fix "$FILE_PATH" 2>&1 || true
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Auto-fix lint issues on saved Python files
|
|
3
|
+
INPUT=$(cat)
|
|
4
|
+
FILE_PATH=$(echo "$INPUT" | jq -r ".tool_input.file_path // empty")
|
|
5
|
+
|
|
6
|
+
if [ -z "$FILE_PATH" ]; then
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
if [[ "$FILE_PATH" == *.py ]]; then
|
|
11
|
+
cd backend && ruff check --fix "$FILE_PATH" 2>&1 || true
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
exit 0
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Auto-fix lint issues on saved TypeScript files
|
|
3
|
-
INPUT=$(cat)
|
|
4
|
-
FILE_PATH=$(echo "$INPUT" | jq -r ".tool_input.file_path // empty")
|
|
5
|
-
|
|
6
|
-
if [ -z "$FILE_PATH" ]; then
|
|
7
|
-
exit 0
|
|
8
|
-
fi
|
|
9
|
-
|
|
10
|
-
if [[ "$FILE_PATH" == *.ts || "$FILE_PATH" == *.tsx ]]; then
|
|
11
|
-
npx eslint --fix "$FILE_PATH" 2>&1 || true
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Auto-fix lint issues on saved TypeScript files
|
|
3
|
+
INPUT=$(cat)
|
|
4
|
+
FILE_PATH=$(echo "$INPUT" | jq -r ".tool_input.file_path // empty")
|
|
5
|
+
|
|
6
|
+
if [ -z "$FILE_PATH" ]; then
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
if [[ "$FILE_PATH" == *.ts || "$FILE_PATH" == *.tsx ]]; then
|
|
11
|
+
npx eslint --fix "$FILE_PATH" 2>&1 || true
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
exit 0
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Block modifications to .env files and migration files
|
|
3
|
-
INPUT=$(cat)
|
|
4
|
-
FILE_PATH=$(echo "$INPUT" | jq -r ".tool_input.file_path // empty")
|
|
5
|
-
|
|
6
|
-
if [ -z "$FILE_PATH" ]; then
|
|
7
|
-
exit 0
|
|
8
|
-
fi
|
|
9
|
-
|
|
10
|
-
case "$FILE_PATH" in
|
|
11
|
-
*.env|*.env.*)
|
|
12
|
-
echo "BLOCKED: Do not modify .env files directly" >&2
|
|
13
|
-
exit 2
|
|
14
|
-
;;
|
|
15
|
-
*/prisma/migrations/*|*/alembic/versions/*)
|
|
16
|
-
echo "BLOCKED: Do not modify migration files directly" >&2
|
|
17
|
-
exit 2
|
|
18
|
-
;;
|
|
19
|
-
esac
|
|
20
|
-
|
|
21
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Block modifications to .env files and migration files
|
|
3
|
+
INPUT=$(cat)
|
|
4
|
+
FILE_PATH=$(echo "$INPUT" | jq -r ".tool_input.file_path // empty")
|
|
5
|
+
|
|
6
|
+
if [ -z "$FILE_PATH" ]; then
|
|
7
|
+
exit 0
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
case "$FILE_PATH" in
|
|
11
|
+
*.env|*.env.*)
|
|
12
|
+
echo "BLOCKED: Do not modify .env files directly" >&2
|
|
13
|
+
exit 2
|
|
14
|
+
;;
|
|
15
|
+
*/prisma/migrations/*|*/alembic/versions/*)
|
|
16
|
+
echo "BLOCKED: Do not modify migration files directly" >&2
|
|
17
|
+
exit 2
|
|
18
|
+
;;
|
|
19
|
+
esac
|
|
20
|
+
|
|
21
|
+
exit 0
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"PreToolUse": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "Write|Edit",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "bash .claude/hooks/guard-protected-files.sh"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"PostToolUse": [
|
|
15
|
-
{
|
|
16
|
-
"matcher": "Write|Edit",
|
|
17
|
-
"hooks": [
|
|
18
|
-
{
|
|
19
|
-
"type": "command",
|
|
20
|
-
"command": "bash .claude/hooks/autofix-typescript.sh"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"Stop": [
|
|
26
|
-
{
|
|
27
|
-
"hooks": [
|
|
28
|
-
{
|
|
29
|
-
"type": "command",
|
|
30
|
-
"command": "npx tsc --noEmit 2>&1 && npx eslint . 2>&1"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Write|Edit",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "bash .claude/hooks/guard-protected-files.sh"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"PostToolUse": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "Write|Edit",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "bash .claude/hooks/autofix-typescript.sh"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"Stop": [
|
|
26
|
+
{
|
|
27
|
+
"hooks": [
|
|
28
|
+
{
|
|
29
|
+
"type": "command",
|
|
30
|
+
"command": "npx tsc --noEmit 2>&1 && npx eslint . 2>&1"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Show the developer what workflows are available.
|
|
2
|
-
|
|
3
|
-
## Available Workflows
|
|
4
|
-
|
|
5
|
-
### Daily Development
|
|
6
|
-
- `/project:status` — Run all checks and show a project dashboard
|
|
7
|
-
- `/project:next` — Figure out what to work on next
|
|
8
|
-
- `/project:done` — Verify the current task is complete before moving on
|
|
9
|
-
|
|
10
|
-
### Verification
|
|
11
|
-
- `/project:verify-all` — Run lint, type check, tests, then launch all reviewers
|
|
12
|
-
- `/project:audit-spec` — Validate implementation against a spec/PRD
|
|
13
|
-
- `/project:audit-wiring` — Find dead or unwired features
|
|
14
|
-
- `/project:audit-security` — Run a security audit
|
|
15
|
-
|
|
16
|
-
### Release
|
|
17
|
-
- `/project:pre-pr` — Run the complete pre-PR checklist
|
|
18
|
-
- `/project:run-uat` — Execute UAT scenarios
|
|
19
|
-
|
|
20
|
-
### Generation
|
|
21
|
-
- `/project:generate-prd` — Generate a PRD from the current codebase
|
|
22
|
-
- `/project:generate-uat` — Generate UAT scenarios and checklists
|
|
23
|
-
- `/project:optimize-claude-md` — Slim down an oversized CLAUDE.md
|
|
24
|
-
|
|
25
|
-
## Quick Start
|
|
26
|
-
Run `/project:status` to see where things stand, then `/project:next` to pick up work.
|