specialist-agent 2.0.0 → 2.7.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 (104) hide show
  1. package/.claude-plugin/marketplace.json +7 -7
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.cursor-plugin/marketplace.json +1 -1
  4. package/.cursor-plugin/plugin.json +2 -2
  5. package/LICENSE +1 -1
  6. package/README.md +17 -7
  7. package/agents/api.md +374 -93
  8. package/agents/architect-lite.md +104 -0
  9. package/agents/architect.md +553 -0
  10. package/agents/data.md +108 -0
  11. package/agents/deps.md +323 -167
  12. package/agents/devops.md +12 -0
  13. package/agents/docs.md +381 -134
  14. package/agents/executor.md +117 -0
  15. package/agents/finance.md +85 -0
  16. package/agents/i18n.md +512 -117
  17. package/agents/memory.md +1 -1
  18. package/agents/perf.md +287 -109
  19. package/agents/refactor.md +380 -92
  20. package/agents/ripple-lite.md +106 -0
  21. package/agents/ripple.md +162 -0
  22. package/agents/scout-lite.md +1 -1
  23. package/agents/scout.md +1 -1
  24. package/agents/security.md +65 -0
  25. package/agents/tdd.md +11 -3
  26. package/cli/index.mjs +54 -36
  27. package/hooks/native/auto-dispatch.mjs +6 -0
  28. package/hooks/native/security-guard.mjs +3 -2
  29. package/hooks/native/settings-template.json +4 -4
  30. package/package.json +15 -2
  31. package/packs/angular/ARCHITECTURE.md +814 -0
  32. package/packs/angular/CLAUDE.md +105 -0
  33. package/packs/angular/agents/builder.md +157 -0
  34. package/packs/angular/agents/doctor.md +241 -0
  35. package/packs/angular/agents/migrator.md +195 -0
  36. package/packs/angular/agents/reviewer.md +263 -0
  37. package/packs/angular/agents-lite/builder.md +65 -0
  38. package/packs/angular/agents-lite/doctor.md +64 -0
  39. package/packs/angular/agents-lite/migrator.md +75 -0
  40. package/packs/angular/agents-lite/reviewer.md +69 -0
  41. package/packs/angular/skills/dev-create-component/SKILL.md +56 -0
  42. package/packs/angular/skills/dev-create-injectable/SKILL.md +60 -0
  43. package/packs/angular/skills/dev-create-module/SKILL.md +49 -0
  44. package/packs/angular/skills/dev-create-service/SKILL.md +34 -0
  45. package/packs/angular/skills/dev-create-test/SKILL.md +78 -0
  46. package/packs/angular/skills/dev-generate-types/SKILL.md +37 -0
  47. package/packs/angular/skills/docs-onboard/SKILL.md +42 -0
  48. package/packs/angular/skills/migration-migrate-component/SKILL.md +42 -0
  49. package/packs/angular/skills/migration-migrate-module/SKILL.md +25 -0
  50. package/packs/angular/skills/review-check-architecture/SKILL.md +67 -0
  51. package/packs/angular/skills/review-fix-violations/SKILL.md +43 -0
  52. package/packs/angular/skills/review-review/SKILL.md +42 -0
  53. package/packs/astro/ARCHITECTURE.md +718 -0
  54. package/packs/astro/CLAUDE.md +106 -0
  55. package/packs/astro/agents/builder.md +192 -0
  56. package/packs/astro/agents/doctor.md +254 -0
  57. package/packs/astro/agents/migrator.md +209 -0
  58. package/packs/astro/agents/reviewer.md +263 -0
  59. package/packs/astro/agents-lite/builder.md +71 -0
  60. package/packs/astro/agents-lite/doctor.md +66 -0
  61. package/packs/astro/agents-lite/migrator.md +71 -0
  62. package/packs/astro/agents-lite/reviewer.md +70 -0
  63. package/packs/astro/skills/dev-create-component/SKILL.md +50 -0
  64. package/packs/astro/skills/dev-create-island/SKILL.md +63 -0
  65. package/packs/astro/skills/dev-create-module/SKILL.md +49 -0
  66. package/packs/astro/skills/dev-create-service/SKILL.md +34 -0
  67. package/packs/astro/skills/dev-create-test/SKILL.md +76 -0
  68. package/packs/astro/skills/dev-generate-types/SKILL.md +37 -0
  69. package/packs/astro/skills/docs-onboard/SKILL.md +51 -0
  70. package/packs/astro/skills/migration-migrate-component/SKILL.md +48 -0
  71. package/packs/astro/skills/migration-migrate-module/SKILL.md +25 -0
  72. package/packs/astro/skills/review-check-architecture/SKILL.md +72 -0
  73. package/packs/astro/skills/review-fix-violations/SKILL.md +43 -0
  74. package/packs/astro/skills/review-review/SKILL.md +44 -0
  75. package/packs/nuxt/ARCHITECTURE.md +831 -0
  76. package/packs/nuxt/CLAUDE.md +111 -0
  77. package/packs/nuxt/agents/builder.md +165 -0
  78. package/packs/nuxt/agents/doctor.md +252 -0
  79. package/packs/nuxt/agents/migrator.md +203 -0
  80. package/packs/nuxt/agents/reviewer.md +275 -0
  81. package/packs/nuxt/agents-lite/builder.md +67 -0
  82. package/packs/nuxt/agents-lite/doctor.md +67 -0
  83. package/packs/nuxt/agents-lite/migrator.md +80 -0
  84. package/packs/nuxt/agents-lite/reviewer.md +71 -0
  85. package/packs/nuxt/skills/dev-create-component/SKILL.md +60 -0
  86. package/packs/nuxt/skills/dev-create-composable/SKILL.md +33 -0
  87. package/packs/nuxt/skills/dev-create-module/SKILL.md +49 -0
  88. package/packs/nuxt/skills/dev-create-service/SKILL.md +34 -0
  89. package/packs/nuxt/skills/dev-create-test/SKILL.md +61 -0
  90. package/packs/nuxt/skills/dev-generate-types/SKILL.md +37 -0
  91. package/packs/nuxt/skills/docs-onboard/SKILL.md +49 -0
  92. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +48 -0
  93. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +25 -0
  94. package/packs/nuxt/skills/review-check-architecture/SKILL.md +71 -0
  95. package/packs/nuxt/skills/review-fix-violations/SKILL.md +43 -0
  96. package/packs/nuxt/skills/review-review/SKILL.md +44 -0
  97. package/skills/checkpoint/SKILL.md +8 -0
  98. package/skills/codereview/SKILL.md +255 -0
  99. package/skills/commit/SKILL.md +150 -0
  100. package/skills/estimate/SKILL.md +9 -0
  101. package/skills/finish/SKILL.md +9 -0
  102. package/skills/health/SKILL.md +9 -0
  103. package/skills/lint/SKILL.md +126 -0
  104. package/skills/plan/SKILL.md +9 -0
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: codereview
3
+ description: "Use when you need a comprehensive code review combining architecture, security, and test perspectives — especially before merging, releasing, or after major changes."
4
+ user-invocable: true
5
+ argument-hint: "[path, module, or PR]"
6
+ allowed-tools: Read, Bash, Glob, Grep
7
+ ---
8
+
9
+ # /codereview — Multi-Reviewer Parallel Code Review
10
+
11
+ Run a comprehensive code review that dispatches 3 specialized perspectives concurrently — architecture, security, and testing — then consolidates into a single actionable verdict.
12
+
13
+ **Target:** $ARGUMENTS
14
+
15
+ ## Why 3 Perspectives, Not 6
16
+
17
+ Most multi-reviewer systems use 5-7 overlapping perspectives that waste tokens and produce redundant findings. `/codereview` uses exactly 3 orthogonal perspectives — each covers a distinct failure mode with zero overlap:
18
+
19
+ ```
20
+ ┌──────────────────────────────────────────────────────────────┐
21
+ │ PARALLEL REVIEW DISPATCH │
22
+ │ │
23
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
24
+ │ │ @reviewer │ │ @security │ │ @tester │ │
25
+ │ │ Architecture│ │ OWASP/Auth │ │ Coverage │ │
26
+ │ │ + Quality │ │ + Data │ │ + Edge Cases│ │
27
+ │ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
28
+ │ │ │ │ │
29
+ │ └────────────────┼────────────────┘ │
30
+ │ ▼ │
31
+ │ ┌──────────────┐ │
32
+ │ │ CONSOLIDATE │ │
33
+ │ │ Deduplicate │ │
34
+ │ │ Assign Sev. │ │
35
+ │ │ Verdict │ │
36
+ │ └──────────────┘ │
37
+ └──────────────────────────────────────────────────────────────┘
38
+ ```
39
+
40
+ ## When to Use
41
+
42
+ - Before merging a pull request
43
+ - Before a production release
44
+ - After major refactors that touch multiple modules
45
+ - After new contributor PRs (unfamiliar with codebase conventions)
46
+ - When a change touches auth, payments, or data handling
47
+ - NOT for: quick single-file fixes (use `@reviewer` directly)
48
+ - NOT for: security-only audit (use `@security` directly)
49
+ - NOT for: test strategy design (use `@tester` directly)
50
+
51
+ ## Workflow
52
+
53
+ ### Step 1: Scope Detection
54
+
55
+ Determine the review target:
56
+
57
+ ```
58
+ IF $ARGUMENTS is a file/directory path → review that path
59
+ IF $ARGUMENTS is a module name → find and review the module
60
+ IF $ARGUMENTS is a PR number/URL → extract changed files from PR diff
61
+ IF $ARGUMENTS is empty → review staged/uncommitted changes
62
+ ```
63
+
64
+ Gather scope metrics:
65
+
66
+ ```bash
67
+ # Count files and lines in scope
68
+ find $TARGET -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.vue" -o -name "*.svelte" \) | head -200 | xargs wc -l 2>/dev/null || true
69
+
70
+ # If PR, get the diff
71
+ gh pr diff $PR_NUMBER 2>/dev/null || git diff main...HEAD 2>/dev/null || true
72
+ ```
73
+
74
+ Read the project's `docs/ARCHITECTURE.md` if it exists — this is the source of truth for architecture review.
75
+
76
+ ### Step 2: Parallel Review Dispatch
77
+
78
+ Dispatch 3 concurrent review perspectives. Each reviewer gets the full file context but applies a different lens.
79
+
80
+ ---
81
+
82
+ **Perspective 1: Architecture Review** (`@reviewer` focus)
83
+
84
+ Review the code for structural integrity and quality:
85
+
86
+ | Check | What to Look For |
87
+ |-------|------------------|
88
+ | Layer separation | Services don't import from components, no cross-module imports |
89
+ | Naming conventions | Files, functions, variables follow project conventions |
90
+ | Design patterns | DRY, SOLID, composition over inheritance |
91
+ | API contracts | DTOs/schemas at boundaries, typed inputs and outputs |
92
+ | Dependency direction | Layers depend inward, not outward |
93
+ | Code smells | Long methods (>40 lines), deep nesting (>3 levels), god objects |
94
+ | Type safety | No `any` abuse, strict mode, proper generics |
95
+ | Error handling | Try/catch at boundaries, custom error types, no swallowed errors |
96
+ | Import hygiene | No circular dependencies, barrel file discipline |
97
+
98
+ ```bash
99
+ # Architecture checks
100
+ grep -rn ": any\|as any" $TARGET --include="*.ts" --include="*.tsx" 2>/dev/null | head -20
101
+ grep -rn "console\.\|debugger" $TARGET --include="*.ts" --include="*.tsx" --include="*.vue" 2>/dev/null | head -20
102
+ ```
103
+
104
+ ---
105
+
106
+ **Perspective 2: Security Review** (`@security` focus)
107
+
108
+ Review the code for vulnerabilities and data safety:
109
+
110
+ | Check | What to Look For |
111
+ |-------|------------------|
112
+ | Injection | SQL/NoSQL injection, command injection, template injection |
113
+ | XSS | Unsanitized output, `dangerouslySetInnerHTML`, `v-html`, raw HTML |
114
+ | Auth/AuthZ | Missing auth checks, broken access control, IDOR vulnerabilities |
115
+ | Input validation | Missing or insufficient validation, type coercion issues |
116
+ | Secrets | Hardcoded API keys, tokens, passwords, connection strings |
117
+ | Data exposure | Sensitive data in logs, error messages, API responses, URLs |
118
+ | CSRF | Missing CSRF tokens on state-changing operations |
119
+ | Cryptography | Weak algorithms, predictable tokens, missing encryption |
120
+ | Headers | Missing security headers (CSP, HSTS, X-Frame-Options) |
121
+ | Dependencies | Known CVEs in packages |
122
+
123
+ ```bash
124
+ # Security checks
125
+ npm audit --json 2>/dev/null | head -50 || true
126
+ grep -rn "password\|secret\|token\|api_key\|apikey" $TARGET --include="*.ts" --include="*.tsx" --include="*.env*" 2>/dev/null | head -20
127
+ grep -rn "v-html\|dangerouslySetInnerHTML\|innerHTML" $TARGET --include="*.ts" --include="*.tsx" --include="*.vue" 2>/dev/null | head -20
128
+ grep -rn "eval(\|new Function(" $TARGET --include="*.ts" --include="*.tsx" --include="*.js" 2>/dev/null | head -20
129
+ ```
130
+
131
+ ---
132
+
133
+ **Perspective 3: Test Review** (`@tester` focus)
134
+
135
+ Review the code for test quality and coverage:
136
+
137
+ | Check | What to Look For |
138
+ |-------|------------------|
139
+ | Coverage gaps | Business logic without corresponding tests |
140
+ | Missing edge cases | Null, empty, boundary values, error paths not tested |
141
+ | Test quality | Tests that test implementation vs behavior |
142
+ | Mocking correctness | Over-mocking, mocking what you own, leaking mocks |
143
+ | Assertion strength | Weak assertions (`toBeTruthy` vs `toEqual`), missing assertions |
144
+ | Test isolation | Shared mutable state, order-dependent tests |
145
+ | Naming clarity | Descriptive `it('should...')` vs vague test names |
146
+ | Test types | Right balance of unit/integration/e2e for the change |
147
+ | Regression risk | Changed code without updated tests |
148
+ | Flakiness signals | Timing dependencies, network calls in unit tests |
149
+
150
+ ```bash
151
+ # Test checks
152
+ find $TARGET -name "*.spec.ts" -o -name "*.test.ts" -o -name "*.spec.tsx" -o -name "*.test.tsx" 2>/dev/null | wc -l
153
+ npx vitest run --passWithNoTests --reporter=json 2>/dev/null || npx jest --json --passWithNoTests 2>/dev/null || true
154
+ ```
155
+
156
+ ### Step 3: Consolidation
157
+
158
+ Merge findings from all 3 perspectives:
159
+
160
+ 1. **Deduplicate** — Remove findings flagged by multiple perspectives (keep highest severity)
161
+ 2. **Cross-reference** — A security finding that also lacks tests is escalated one severity level
162
+ 3. **Assign severity** — Every finding gets a severity level (see table below)
163
+ 4. **Sort** — CRITICAL first, then HIGH, MEDIUM, LOW
164
+ 5. **Group** — By file, then by severity within each file
165
+
166
+ ### Step 4: Verdict
167
+
168
+ Apply verdict rules based on the consolidated findings. The verdict is final and non-negotiable — it follows the rules mechanically.
169
+
170
+ ## Severity Levels
171
+
172
+ | Level | Description | Action |
173
+ |-------|-------------|--------|
174
+ | CRITICAL | Security vulnerability, data loss risk, auth bypass | Block merge. Fix immediately. |
175
+ | HIGH | Architecture violation, missing validation, untested critical path | Request changes. Fix before merge. |
176
+ | MEDIUM | Code quality issue, weak test, minor vulnerability | Approve with notes. Fix in next sprint. |
177
+ | LOW | Style issue, minor improvement, optional optimization | Approve. Fix when convenient. |
178
+
179
+ ## Verdict Rules
180
+
181
+ | Condition | Verdict | Meaning |
182
+ |-----------|---------|---------|
183
+ | Any CRITICAL finding | **BLOCK** | Do not merge under any circumstances |
184
+ | Any HIGH finding (no CRITICAL) | **REQUEST_CHANGES** | Fix HIGH findings, then re-review |
185
+ | MEDIUM findings only | **APPROVE WITH NOTES** | Safe to merge, but address MEDIUM items soon |
186
+ | LOW findings only (or none) | **APPROVE** | Clean to merge |
187
+
188
+ **Escalation rules:**
189
+ - A security finding without a corresponding test → severity +1 level
190
+ - A finding that recurs from a previous review → severity +1 level
191
+ - A finding in auth, payments, or PII handling → minimum severity HIGH
192
+
193
+ ## Verification Protocol
194
+
195
+ **Before claiming the review is complete:**
196
+
197
+ 1. All 3 perspectives were executed (architecture, security, tests)
198
+ 2. Every finding has a severity level assigned
199
+ 3. Every CRITICAL or HIGH finding includes a specific file:line reference
200
+ 4. Every CRITICAL or HIGH finding includes a concrete remediation suggestion
201
+ 5. Automated checks were run where available (`npm audit`, `tsc`, linting, test suite)
202
+ 6. The verdict follows the Verdict Rules mechanically — no exceptions
203
+ 7. Cross-referencing was performed (security findings checked for test coverage)
204
+
205
+ ## Anti-Rationalization
206
+
207
+ | Excuse | Reality |
208
+ |--------|---------|
209
+ | "No security issues found" | Did you check all OWASP categories? Absence of evidence is not evidence of absence. |
210
+ | "Tests look fine" | Did you check edge cases, error paths, and assertion strength? Or just that tests exist? |
211
+ | "Architecture is clean" | Did you trace actual imports and dependency direction? Or just scan filenames? |
212
+ | "It's just a small change" | Small changes cause production outages. Review scope does not reduce rigor. |
213
+ | "The CI passed" | CI checks syntax, not logic. A green build is not a security audit. |
214
+ | "Previous review approved this pattern" | Patterns can be wrong. Evaluate independently every time. |
215
+ | "Too many files to review thoroughly" | Scope down to critical paths (auth, data, business logic). Never skip security. |
216
+ | "The author is senior, they know what they're doing" | Seniority does not prevent bugs. Review the code, not the author. |
217
+
218
+ ## Rules
219
+
220
+ 1. **All 3 perspectives are mandatory** — Skipping one defeats the purpose of multi-reviewer review
221
+ 2. **Read-only** — Never modify files during a review
222
+ 3. **Evidence required** — Every finding needs a file:line reference and explanation
223
+ 4. **Remediation required** — Findings without fix suggestions are useless
224
+ 5. **Verdict is mechanical** — Follow the Verdict Rules table, no subjective overrides
225
+ 6. **No sycophancy** — Never say "LGTM", "looks good", or "great job" without evidence
226
+ 7. **Cross-reference findings** — A security issue without tests is worse than either alone
227
+ 8. **Severity must be justified** — Every rating needs a specific technical reason
228
+ 9. **Run automated tools** — Never skip `npm audit`, linting, or type checking if available
229
+ 10. **Fresh context per perspective** — Each reviewer perspective starts from the code, not from another reviewer's output
230
+
231
+ ## Output
232
+
233
+ ```
234
+ ──── /codereview ────
235
+ Target: [path or PR]
236
+ Scope: [X files, Y lines]
237
+
238
+ Architecture: [N findings] — @reviewer
239
+ Security: [N findings] — @security
240
+ Tests: [N findings] — @tester
241
+
242
+ Severity:
243
+ CRITICAL: N
244
+ HIGH: N
245
+ MEDIUM: N
246
+ LOW: N
247
+
248
+ Top Findings:
249
+ 1. [CRITICAL] [description] — [file:line]
250
+ 2. [HIGH] [description] — [file:line]
251
+ 3. [HIGH] [description] — [file:line]
252
+
253
+ Verdict: [APPROVE | APPROVE WITH NOTES | REQUEST_CHANGES | BLOCK]
254
+ Reason: [1-line justification]
255
+ ```
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: commit
3
+ description: "Use when changes are ready to commit — generates conventional commit messages with scope detection and validation."
4
+ user-invocable: true
5
+ argument-hint: "[optional message override]"
6
+ allowed-tools: Read, Bash, Glob, Grep
7
+ ---
8
+
9
+ # /commit — Smart Commit
10
+
11
+ Generate and execute conventional commits with automatic scope detection and pre-commit validation.
12
+
13
+ **Override:** $ARGUMENTS
14
+
15
+ ## When to Use
16
+ - After completing a feature, fix, or refactor
17
+ - When you want a well-formatted conventional commit
18
+ - To validate changes before committing
19
+ - NOT for: empty working tree (nothing to commit)
20
+
21
+ ## Workflow
22
+
23
+ ### Step 1: Analyze Changes
24
+ ```bash
25
+ git status --porcelain
26
+ git diff --stat
27
+ git diff --cached --stat
28
+ ```
29
+
30
+ Determine:
31
+ - Which files changed
32
+ - Are changes staged or unstaged?
33
+ - How many files and lines affected
34
+
35
+ ### Step 2: Auto-Detect Type and Scope
36
+
37
+ **Type detection from file patterns:**
38
+
39
+ | Changed Files | Type |
40
+ |---------------|------|
41
+ | `src/components/*`, `src/pages/*` | feat or fix |
42
+ | `tests/*`, `*.test.*`, `*.spec.*` | test |
43
+ | `docs/*`, `*.md` | docs |
44
+ | `.github/*`, `docker*`, `*.yml` | ci or chore |
45
+ | `*.config.*`, `tsconfig*`, `package.json` | chore |
46
+ | Rename/move only | refactor |
47
+ | Delete only | chore |
48
+
49
+ **Scope detection from paths:**
50
+ - `src/modules/auth/*` -> scope: `auth`
51
+ - `src/components/Button/*` -> scope: `button`
52
+ - `src/services/*` -> scope: `services`
53
+ - Multiple directories -> no scope (too broad)
54
+
55
+ **Type from diff content:**
56
+ - New file created -> `feat`
57
+ - Existing file modified (bug context) -> `fix`
58
+ - Restructuring without behavior change -> `refactor`
59
+ - Performance improvement -> `perf`
60
+
61
+ ### Step 3: Generate Commit Message
62
+
63
+ Format: `type(scope): description`
64
+
65
+ Rules:
66
+ - Type: lowercase (`feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `perf`, `ci`, `style`)
67
+ - Scope: optional, lowercase, max 15 chars
68
+ - Description: imperative mood, lowercase start, no period, max 72 chars
69
+ - Body: optional, for complex changes — wrap at 72 chars
70
+
71
+ If $ARGUMENTS provided, use it as description override but still validate format.
72
+
73
+ ### Step 4: Pre-Commit Validation
74
+
75
+ ```bash
76
+ # Check for secrets/sensitive files
77
+ git diff --cached --name-only | grep -E '\.(env|pem|key)$'
78
+
79
+ # Check for debug artifacts
80
+ git diff --cached | grep -E '(console\.log|debugger|TODO.*HACK)'
81
+
82
+ # Check for large files
83
+ git diff --cached --stat | awk '{print $NF}' | head -5
84
+ ```
85
+
86
+ Warn if:
87
+ - `.env` or credential files staged
88
+ - `console.log` / `debugger` statements in diff
89
+ - Files > 1MB staged
90
+
91
+ ### Step 5: Execute Commit
92
+
93
+ ```bash
94
+ # Stage if not staged
95
+ git add [relevant files]
96
+
97
+ # Commit
98
+ git commit -m "type(scope): description"
99
+ ```
100
+
101
+ If commit message needs body:
102
+ ```bash
103
+ git commit -m "type(scope): description" -m "body with more details"
104
+ ```
105
+
106
+ ## Output
107
+
108
+ ```
109
+ ──── /commit ────
110
+ Type: feat
111
+ Scope: auth
112
+ Message: feat(auth): add JWT refresh token rotation
113
+
114
+ Files: 4 changed (+120 / -15)
115
+ Warnings: none
116
+
117
+ ✓ Committed: abc1234
118
+ ```
119
+
120
+ ## Validation Warnings Output
121
+
122
+ ```
123
+ ──── /commit ────
124
+ ⚠ WARNINGS:
125
+ - console.log found in src/service.ts:42
126
+ - .env.local is staged (contains secrets?)
127
+
128
+ Proceed anyway? Showing commit preview:
129
+ fix(api): handle timeout in payment service
130
+
131
+ Files: 2 changed (+8 / -3)
132
+ ```
133
+
134
+ ## Anti-Rationalization
135
+
136
+ | Excuse | Reality |
137
+ |--------|---------|
138
+ | "I'll write a proper message later" | You won't. The context is fresh NOW. A bad commit message is permanent. |
139
+ | "It's just a small fix, message doesn't matter" | `git log` is the project's history book. Every entry matters. |
140
+ | "I'll squash before merging anyway" | Squash doesn't fix the habit. Good messages help during review too. |
141
+ | "Validation slows me down" | A leaked secret or committed console.log slows the whole team down. |
142
+
143
+ ## Rules
144
+
145
+ 1. **Always validate before committing** — Check for secrets and debug code
146
+ 2. **Follow conventional commits** — type(scope): description
147
+ 3. **Imperative mood** — "add feature" not "added feature"
148
+ 4. **Never commit .env files** — Block and warn
149
+ 5. **Max 72 chars** — Subject line must fit in git log
150
+ 6. **One logical change per commit** — Don't mix features
@@ -137,6 +137,15 @@ Comparison:
137
137
  | New module | ~15,000 | ~$0.23 |
138
138
  | Full feature | ~40,000 | ~$0.60 |
139
139
 
140
+ ## Anti-Rationalization
141
+
142
+ | Excuse | Reality |
143
+ |--------|---------|
144
+ | "Estimating wastes time, just start building" | Building without estimates wastes 10x more when you pick the wrong model or approach. |
145
+ | "I can eyeball the complexity" | Eyeballing misses hidden dependencies. A structured estimate catches them. |
146
+ | "Cost doesn't matter for this task" | Every token has a cost. Knowing the cost helps choose Haiku vs Sonnet vs Opus. |
147
+ | "Estimates are always wrong anyway" | Rough estimates beat no estimates. Even ±50% accuracy saves money. |
148
+
140
149
  ## Rules
141
150
 
142
151
  1. **Always estimate before complex work**
@@ -203,6 +203,15 @@ To fix:
203
203
  3. Run /finish again
204
204
  ```
205
205
 
206
+ ## Anti-Rationalization
207
+
208
+ | Excuse | Reality |
209
+ |--------|---------|
210
+ | "Tests pass locally, good enough" | CI runs in a clean environment. Your local cache hides broken imports and missing deps. |
211
+ | "I'll fix the lint errors in the next PR" | Technical debt compounds. Fix now or carry it forever. |
212
+ | "The build takes too long to run" | A broken build in production takes even longer to fix. Run it. |
213
+ | "I already reviewed the code mentally" | Mental review misses what automated checks catch. Run the full suite. |
214
+
206
215
  ## Rules
207
216
 
208
217
  1. **Never skip validation** — All checks must pass
@@ -233,6 +233,15 @@ Only checks:
233
233
  - Test status
234
234
  - File count
235
235
 
236
+ ## Anti-Rationalization
237
+
238
+ | Excuse | Reality |
239
+ |--------|---------|
240
+ | "The score doesn't matter, the app works" | Working today doesn't mean maintainable tomorrow. The score measures long-term health. |
241
+ | "We'll improve the score after the deadline" | After the deadline there's another deadline. Measure now, fix incrementally. |
242
+ | "80% coverage is overkill" | 80% is the baseline. Below that, regressions hide in untested code. |
243
+ | "Security checks are paranoid" | One vulnerability costs more than 100 health scans. Paranoia is appropriate. |
244
+
236
245
  ## Rules
237
246
 
238
247
  1. **Be objective** — Numbers, not opinions
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: lint
3
+ description: "Use when you need to lint the codebase and auto-fix issues — detects linter, runs it, and fixes what it can."
4
+ user-invocable: true
5
+ argument-hint: "[path or --fix]"
6
+ allowed-tools: Read, Bash, Glob, Grep
7
+ ---
8
+
9
+ # /lint — Lint & Auto-Fix
10
+
11
+ Detect the project's linter, run it, auto-fix what's possible, and report remaining issues.
12
+
13
+ **Target:** $ARGUMENTS
14
+
15
+ ## When to Use
16
+ - Before committing changes
17
+ - After generating code with AI
18
+ - When CI fails on lint
19
+ - During code cleanup
20
+ - NOT for: type checking (use `tsc` directly)
21
+
22
+ ## Workflow
23
+
24
+ ### Step 1: Detect Linter
25
+
26
+ Check for installed linters in order of priority:
27
+
28
+ | Check | Linter |
29
+ |-------|--------|
30
+ | `biome.json` or `biome.jsonc` exists | Biome |
31
+ | `.eslintrc.*` or `eslint.config.*` exists | ESLint |
32
+ | `deno.json` with `lint` config | Deno lint |
33
+ | `package.json` has `lint` script | npm run lint |
34
+
35
+ ```bash
36
+ # Check for config files
37
+ ls biome.json biome.jsonc .eslintrc.* eslint.config.* 2>/dev/null
38
+ # Check package.json scripts
39
+ cat package.json | grep -A5 '"scripts"' | grep lint
40
+ ```
41
+
42
+ ### Step 2: Detect Formatter
43
+
44
+ | Check | Formatter |
45
+ |-------|-----------|
46
+ | `.prettierrc*` or `prettier.config.*` exists | Prettier |
47
+ | `biome.json` exists (has built-in formatter) | Biome |
48
+ | `deno.json` with `fmt` config | Deno fmt |
49
+ | `package.json` has `format` script | npm run format |
50
+
51
+ ### Step 3: Run Lint
52
+
53
+ ```bash
54
+ # Based on detected linter:
55
+ # Biome
56
+ npx biome check $TARGET --write 2>&1
57
+
58
+ # ESLint
59
+ npx eslint $TARGET --fix 2>&1
60
+
61
+ # npm script
62
+ npm run lint -- --fix 2>&1
63
+
64
+ # Deno
65
+ deno lint --fix $TARGET 2>&1
66
+ ```
67
+
68
+ ### Step 4: Run Formatter (if separate from linter)
69
+
70
+ ```bash
71
+ # Prettier
72
+ npx prettier --write $TARGET 2>&1
73
+
74
+ # npm script
75
+ npm run format 2>&1
76
+ ```
77
+
78
+ ### Step 5: Report
79
+
80
+ Count fixed vs remaining issues.
81
+
82
+ ## Output
83
+
84
+ ```
85
+ ──── /lint ────
86
+ Linter: ESLint
87
+ Formatter: Prettier
88
+ Target: src/
89
+
90
+ Fixed automatically:
91
+ - 12 formatting issues (Prettier)
92
+ - 5 unused imports (ESLint --fix)
93
+ - 3 missing semicolons (ESLint --fix)
94
+
95
+ Remaining (manual fix needed):
96
+ - src/auth.ts:42 — no-explicit-any: Unexpected any
97
+ - src/api.ts:18 — no-unused-vars: 'result' is defined but never used
98
+
99
+ Summary: 20 fixed, 2 remaining
100
+ ```
101
+
102
+ ### Clean Output (no issues):
103
+ ```
104
+ ──── /lint ────
105
+ Linter: Biome
106
+ Target: src/
107
+
108
+ ✓ No issues found
109
+ ```
110
+
111
+ ## Anti-Rationalization
112
+
113
+ | Excuse | Reality |
114
+ |--------|---------|
115
+ | "It's just a style warning, not a real issue" | Style inconsistency makes code harder to read for every future developer. Fix it. |
116
+ | "I'll fix lint errors when I have time" | Lint errors accumulate. 5 today become 50 next week. Fix them now. |
117
+ | "Auto-fix might change behavior" | Lint auto-fixes (formatting, imports) are safe. If unsure, review the diff. |
118
+ | "My code works, lint doesn't matter" | Lint catches bugs too (unused vars, implicit any, unreachable code). It matters. |
119
+
120
+ ## Rules
121
+
122
+ 1. **Always auto-fix first** — Run with --fix/--write before reporting
123
+ 2. **Detect, don't assume** — Check which linter is installed
124
+ 3. **Format after lint** — Linter first, formatter second (if separate)
125
+ 4. **Report remaining** — Only show issues that need manual intervention
126
+ 5. **Never install linters** — Use what's already in the project
@@ -124,6 +124,15 @@ Estimated tokens: ~N
124
124
  Next: Awaiting approval
125
125
  ```
126
126
 
127
+ ## Anti-Rationalization
128
+
129
+ | Excuse | Reality |
130
+ |--------|---------|
131
+ | "It's simple enough to just start coding" | That's what every developer says before a 3-day rabbit hole. 10 minutes of planning saves hours. |
132
+ | "I already know the architecture" | Plans aren't just for you — they create alignment and a checkpoint to rollback to. |
133
+ | "Planning is waterfall" | Adaptive planning IS agile. Skipping planning is chaos, not agility. |
134
+ | "I'll refactor later if the approach is wrong" | Refactoring costs 10x more than planning. Get it right first. |
135
+
127
136
  ## Rules
128
137
 
129
138
  - Never force heavy planning for simple tasks