@qazuor/claude-code-config 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1248 -0
- package/dist/bin.cjs +11886 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +11869 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.cjs +3887 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1325 -0
- package/dist/index.d.ts +1325 -0
- package/dist/index.js +3835 -0
- package/dist/index.js.map +1 -0
- package/package.json +86 -0
- package/templates/.log/notifications.log +1775 -0
- package/templates/agents/README.md +164 -0
- package/templates/agents/_registry.json +443 -0
- package/templates/agents/design/content-writer.md +353 -0
- package/templates/agents/design/ux-ui-designer.md +382 -0
- package/templates/agents/engineering/astro-engineer.md +293 -0
- package/templates/agents/engineering/db-drizzle-engineer.md +360 -0
- package/templates/agents/engineering/express-engineer.md +316 -0
- package/templates/agents/engineering/fastify-engineer.md +399 -0
- package/templates/agents/engineering/hono-engineer.md +263 -0
- package/templates/agents/engineering/mongoose-engineer.md +473 -0
- package/templates/agents/engineering/nestjs-engineer.md +429 -0
- package/templates/agents/engineering/nextjs-engineer.md +451 -0
- package/templates/agents/engineering/node-typescript-engineer.md +347 -0
- package/templates/agents/engineering/prisma-engineer.md +432 -0
- package/templates/agents/engineering/react-senior-dev.md +394 -0
- package/templates/agents/engineering/tanstack-start-engineer.md +447 -0
- package/templates/agents/engineering/tech-lead.md +269 -0
- package/templates/agents/product/product-functional.md +329 -0
- package/templates/agents/product/product-technical.md +578 -0
- package/templates/agents/quality/debugger.md +514 -0
- package/templates/agents/quality/qa-engineer.md +390 -0
- package/templates/agents/specialized/enrichment-agent.md +277 -0
- package/templates/agents/specialized/i18n-specialist.md +322 -0
- package/templates/agents/specialized/seo-ai-specialist.md +387 -0
- package/templates/agents/specialized/tech-writer.md +300 -0
- package/templates/code-style/.editorconfig +27 -0
- package/templates/code-style/.prettierignore +25 -0
- package/templates/code-style/.prettierrc +12 -0
- package/templates/code-style/biome.json +78 -0
- package/templates/code-style/commitlint.config.js +44 -0
- package/templates/commands/README.md +175 -0
- package/templates/commands/_registry.json +420 -0
- package/templates/commands/add-new-entity.md +211 -0
- package/templates/commands/audit/accessibility-audit.md +360 -0
- package/templates/commands/audit/performance-audit.md +290 -0
- package/templates/commands/audit/security-audit.md +231 -0
- package/templates/commands/code-check.md +127 -0
- package/templates/commands/five-why.md +225 -0
- package/templates/commands/formatting/format-markdown.md +197 -0
- package/templates/commands/git/commit.md +247 -0
- package/templates/commands/meta/create-agent.md +257 -0
- package/templates/commands/meta/create-command.md +312 -0
- package/templates/commands/meta/create-skill.md +321 -0
- package/templates/commands/meta/help.md +318 -0
- package/templates/commands/planning/check-completed-tasks.md +224 -0
- package/templates/commands/planning/cleanup-issues.md +248 -0
- package/templates/commands/planning/planning-cleanup.md +251 -0
- package/templates/commands/planning/sync-planning-github.md +133 -0
- package/templates/commands/planning/sync-todos-github.md +203 -0
- package/templates/commands/quality-check.md +211 -0
- package/templates/commands/run-tests.md +159 -0
- package/templates/commands/start-feature-plan.md +232 -0
- package/templates/commands/start-refactor-plan.md +244 -0
- package/templates/commands/sync-planning.md +176 -0
- package/templates/commands/update-docs.md +242 -0
- package/templates/docs/CHECKPOINT-SYSTEM.md +504 -0
- package/templates/docs/INDEX.md +677 -0
- package/templates/docs/RECOMMENDED-HOOKS.md +415 -0
- package/templates/docs/_registry.json +329 -0
- package/templates/docs/diagrams/README.md +220 -0
- package/templates/docs/diagrams/agent-hierarchy.mmd +55 -0
- package/templates/docs/diagrams/documentation-map.mmd +61 -0
- package/templates/docs/diagrams/tools-relationship.mmd +55 -0
- package/templates/docs/diagrams/workflow-decision-tree.mmd +38 -0
- package/templates/docs/doc-sync.md +533 -0
- package/templates/docs/examples/end-to-end-workflow.md +1505 -0
- package/templates/docs/glossary.md +495 -0
- package/templates/docs/guides/mockup-prompt-engineering.md +644 -0
- package/templates/docs/guides/mockup-setup.md +737 -0
- package/templates/docs/learnings/README.md +250 -0
- package/templates/docs/learnings/common-architectural-patterns.md +123 -0
- package/templates/docs/learnings/common-mistakes-to-avoid.md +149 -0
- package/templates/docs/learnings/markdown-formatting-standards.md +104 -0
- package/templates/docs/learnings/monorepo-command-execution.md +64 -0
- package/templates/docs/learnings/optimization-tips.md +146 -0
- package/templates/docs/learnings/planning-linear-sync-workflow.md +70 -0
- package/templates/docs/learnings/shell-compatibility-fish.md +46 -0
- package/templates/docs/learnings/test-organization-structure.md +68 -0
- package/templates/docs/mcp-installation.md +613 -0
- package/templates/docs/mcp-servers.md +989 -0
- package/templates/docs/notification-installation.md +570 -0
- package/templates/docs/quick-start.md +354 -0
- package/templates/docs/standards/architecture-patterns.md +1064 -0
- package/templates/docs/standards/atomic-commits.md +513 -0
- package/templates/docs/standards/code-standards.md +993 -0
- package/templates/docs/standards/design-standards.md +656 -0
- package/templates/docs/standards/documentation-standards.md +1160 -0
- package/templates/docs/standards/testing-standards.md +969 -0
- package/templates/docs/system-maintenance.md +604 -0
- package/templates/docs/templates/PDR-template.md +561 -0
- package/templates/docs/templates/TODOs-template.md +534 -0
- package/templates/docs/templates/tech-analysis-template.md +800 -0
- package/templates/docs/workflows/README.md +519 -0
- package/templates/docs/workflows/atomic-task-protocol.md +955 -0
- package/templates/docs/workflows/decision-tree.md +482 -0
- package/templates/docs/workflows/edge-cases.md +856 -0
- package/templates/docs/workflows/phase-1-planning.md +957 -0
- package/templates/docs/workflows/phase-2-implementation.md +896 -0
- package/templates/docs/workflows/phase-3-validation.md +792 -0
- package/templates/docs/workflows/phase-4-finalization.md +927 -0
- package/templates/docs/workflows/quick-fix-protocol.md +505 -0
- package/templates/docs/workflows/task-atomization.md +537 -0
- package/templates/docs/workflows/task-completion-protocol.md +448 -0
- package/templates/hooks/on-notification.sh +28 -0
- package/templates/schemas/checkpoint.schema.json +97 -0
- package/templates/schemas/code-registry.schema.json +84 -0
- package/templates/schemas/pdr.schema.json +314 -0
- package/templates/schemas/problems.schema.json +55 -0
- package/templates/schemas/tech-analysis.schema.json +404 -0
- package/templates/schemas/telemetry.schema.json +298 -0
- package/templates/schemas/todos.schema.json +234 -0
- package/templates/schemas/workflows.schema.json +69 -0
- package/templates/scripts/add-changelogs.sh +105 -0
- package/templates/scripts/generate-code-registry.ts +270 -0
- package/templates/scripts/health-check.sh +343 -0
- package/templates/scripts/sync-registry.sh +40 -0
- package/templates/scripts/telemetry-report.ts +36 -0
- package/templates/scripts/validate-docs.sh +224 -0
- package/templates/scripts/validate-registry.sh +225 -0
- package/templates/scripts/validate-schemas.ts +283 -0
- package/templates/scripts/validate-structure.sh +165 -0
- package/templates/scripts/worktree-cleanup.sh +81 -0
- package/templates/scripts/worktree-create.sh +63 -0
- package/templates/sessions/planning/.gitkeep +0 -0
- package/templates/sessions/planning/archived/.gitkeep +0 -0
- package/templates/settings.json +202 -0
- package/templates/settings.local.json +138 -0
- package/templates/skills/README.md +197 -0
- package/templates/skills/_registry.json +473 -0
- package/templates/skills/audit/accessibility-audit.md +309 -0
- package/templates/skills/audit/performance-audit.md +257 -0
- package/templates/skills/audit/security-audit.md +217 -0
- package/templates/skills/auth/nextauth-patterns.md +308 -0
- package/templates/skills/brand-guidelines.md +240 -0
- package/templates/skills/documentation/markdown-formatter.md +302 -0
- package/templates/skills/git/git-commit-helper.md +321 -0
- package/templates/skills/i18n/i18n-patterns.md +251 -0
- package/templates/skills/patterns/error-handling-patterns.md +242 -0
- package/templates/skills/patterns/tdd-methodology.md +342 -0
- package/templates/skills/qa/qa-criteria-validator.md +383 -0
- package/templates/skills/qa/web-app-testing.md +398 -0
- package/templates/skills/react/react-hook-form-patterns.md +359 -0
- package/templates/skills/state/redux-toolkit-patterns.md +272 -0
- package/templates/skills/state/tanstack-query-patterns.md +299 -0
- package/templates/skills/state/zustand-patterns.md +301 -0
- package/templates/skills/tech/mermaid-diagram-specialist.md +195 -0
- package/templates/skills/tech/shadcn-specialist.md +252 -0
- package/templates/skills/tech/vercel-specialist.md +297 -0
- package/templates/skills/testing/api-app-testing.md +254 -0
- package/templates/skills/testing/performance-testing.md +275 -0
- package/templates/skills/testing/security-testing.md +348 -0
- package/templates/skills/utils/add-memory.md +295 -0
- package/templates/skills/utils/json-data-auditor.md +283 -0
- package/templates/skills/utils/pdf-creator-editor.md +342 -0
- package/templates/tools/format-markdown.sh +185 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-audit
|
|
3
|
+
description: Comprehensive security audit and vulnerability assessment
|
|
4
|
+
type: audit
|
|
5
|
+
category: quality
|
|
6
|
+
config_required:
|
|
7
|
+
- SECURITY_SCAN_COMMAND: "Command to run security scans (e.g., pnpm audit)"
|
|
8
|
+
- AUTH_PATTERN: "Authentication pattern used (e.g., JWT, OAuth, Clerk)"
|
|
9
|
+
- DATABASE_ORM: "ORM/Database library (e.g., Drizzle, Prisma)"
|
|
10
|
+
- VALIDATION_LIBRARY: "Input validation library (e.g., Zod)"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Security Audit Command
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Performs comprehensive security audit validating authentication, authorization, input validation, data protection, and security best practices.
|
|
18
|
+
|
|
19
|
+
## ⚙️ Configuration
|
|
20
|
+
|
|
21
|
+
| Setting | Description | Example |
|
|
22
|
+
|---------|-------------|---------|
|
|
23
|
+
| SECURITY_SCAN_COMMAND | Dependency security scan | `pnpm audit` |
|
|
24
|
+
| AUTH_PATTERN | Authentication method | `JWT`, `OAuth`, `Clerk` |
|
|
25
|
+
| DATABASE_ORM | Database ORM used | `Drizzle`, `Prisma` |
|
|
26
|
+
| VALIDATION_LIBRARY | Input validation | `Zod`, `Joi` |
|
|
27
|
+
| REPORT_OUTPUT | Report file path | `.claude/reports/security-audit-report.md` |
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
/security-audit [options]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Options
|
|
36
|
+
|
|
37
|
+
- `--scope <area>`: Focus on specific area (auth, api, database, frontend, all)
|
|
38
|
+
- `--depth <level>`: Analysis depth (quick, standard, thorough)
|
|
39
|
+
- `--report`: Generate detailed report
|
|
40
|
+
- `--fix-suggestions`: Include automated fix suggestions
|
|
41
|
+
|
|
42
|
+
## Audit Checklist
|
|
43
|
+
|
|
44
|
+
### 1. Authentication & Authorization
|
|
45
|
+
|
|
46
|
+
| Check | Validation |
|
|
47
|
+
|-------|------------|
|
|
48
|
+
| Authentication implementation | {{AUTH_PATTERN}} properly configured |
|
|
49
|
+
| Token validation | Expiry and signature verification |
|
|
50
|
+
| Session management | Secure session handling |
|
|
51
|
+
| Authorization checks | RBAC/permissions on protected routes |
|
|
52
|
+
| Password policies | Strong password requirements |
|
|
53
|
+
|
|
54
|
+
### 2. Input Validation & Sanitization
|
|
55
|
+
|
|
56
|
+
| Check | Validation |
|
|
57
|
+
|-------|------------|
|
|
58
|
+
| Input validation | All inputs validated with {{VALIDATION_LIBRARY}} |
|
|
59
|
+
| SQL injection prevention | {{DATABASE_ORM}} parameterized queries |
|
|
60
|
+
| XSS prevention | Output encoding/escaping |
|
|
61
|
+
| CSRF protection | Token validation on state changes |
|
|
62
|
+
| Path traversal | File access validation |
|
|
63
|
+
|
|
64
|
+
### 3. Data Protection
|
|
65
|
+
|
|
66
|
+
| Check | Validation |
|
|
67
|
+
|-------|------------|
|
|
68
|
+
| Encryption at rest | Sensitive data encrypted |
|
|
69
|
+
| Encryption in transit | HTTPS enforced |
|
|
70
|
+
| Secret management | No hardcoded secrets |
|
|
71
|
+
| Environment variables | Proper configuration |
|
|
72
|
+
| Logging | No sensitive data logged |
|
|
73
|
+
|
|
74
|
+
### 4. API Security
|
|
75
|
+
|
|
76
|
+
| Check | Validation |
|
|
77
|
+
|-------|------------|
|
|
78
|
+
| Rate limiting | Implemented on public endpoints |
|
|
79
|
+
| Authentication | Required where needed |
|
|
80
|
+
| Error handling | No information leakage |
|
|
81
|
+
| CORS configuration | Properly configured |
|
|
82
|
+
| Request validation | Size limits enforced |
|
|
83
|
+
|
|
84
|
+
### 5. Infrastructure & Configuration
|
|
85
|
+
|
|
86
|
+
| Check | Validation |
|
|
87
|
+
|-------|------------|
|
|
88
|
+
| Security headers | CSP, HSTS, X-Frame-Options |
|
|
89
|
+
| Dependency vulnerabilities | {{SECURITY_SCAN_COMMAND}} passing |
|
|
90
|
+
| Debug mode | Disabled in production |
|
|
91
|
+
| Error stack traces | Hidden in production |
|
|
92
|
+
| Admin interfaces | Protected |
|
|
93
|
+
|
|
94
|
+
### 6. Code Security Patterns
|
|
95
|
+
|
|
96
|
+
| Check | Validation |
|
|
97
|
+
|-------|------------|
|
|
98
|
+
| Dangerous functions | No eval, Function constructor |
|
|
99
|
+
| Secure randomness | Cryptographically secure RNG |
|
|
100
|
+
| Error handling | No information disclosure |
|
|
101
|
+
| File operations | Safe file handling |
|
|
102
|
+
| Cookie security | HttpOnly, Secure, SameSite |
|
|
103
|
+
|
|
104
|
+
## Output Format
|
|
105
|
+
|
|
106
|
+
### Terminal Output
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
🔒 Security Audit Report
|
|
110
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
111
|
+
|
|
112
|
+
📋 Summary
|
|
113
|
+
Total Checks: {{TOTAL}}
|
|
114
|
+
Passed: {{PASSED}} ({{PERCENTAGE}}%)
|
|
115
|
+
Failed: {{FAILED}} ({{PERCENTAGE}}%)
|
|
116
|
+
Warnings: {{WARNINGS}} ({{PERCENTAGE}}%)
|
|
117
|
+
|
|
118
|
+
🔴 Critical Issues ({{COUNT}})
|
|
119
|
+
{{#each CRITICAL_ISSUES}}
|
|
120
|
+
{{INDEX}}. {{TITLE}}
|
|
121
|
+
Location: {{FILE}}:{{LINE}}
|
|
122
|
+
Fix: {{FIX_SUGGESTION}}
|
|
123
|
+
{{/each}}
|
|
124
|
+
|
|
125
|
+
🟠 High Priority Issues ({{COUNT}})
|
|
126
|
+
{{#each HIGH_ISSUES}}
|
|
127
|
+
{{INDEX}}. {{TITLE}}
|
|
128
|
+
Location: {{FILE}}:{{LINE}}
|
|
129
|
+
Fix: {{FIX_SUGGESTION}}
|
|
130
|
+
{{/each}}
|
|
131
|
+
|
|
132
|
+
🟡 Medium Priority Issues ({{COUNT}})
|
|
133
|
+
{{#each MEDIUM_ISSUES}}
|
|
134
|
+
{{INDEX}}. {{TITLE}}
|
|
135
|
+
{{/each}}
|
|
136
|
+
|
|
137
|
+
🟢 Passed Checks
|
|
138
|
+
{{#each PASSED_CHECKS}}
|
|
139
|
+
✓ {{CHECK_NAME}}
|
|
140
|
+
{{/each}}
|
|
141
|
+
|
|
142
|
+
💡 Recommendations
|
|
143
|
+
{{#each RECOMMENDATIONS}}
|
|
144
|
+
{{INDEX}}. {{RECOMMENDATION}}
|
|
145
|
+
{{/each}}
|
|
146
|
+
|
|
147
|
+
📄 Detailed report: {{REPORT_OUTPUT}}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Report File Structure
|
|
151
|
+
|
|
152
|
+
```markdown
|
|
153
|
+
# Security Audit Report
|
|
154
|
+
|
|
155
|
+
**Date**: {{AUDIT_DATE}}
|
|
156
|
+
**Scope**: {{SCOPE}}
|
|
157
|
+
**Depth**: {{DEPTH}}
|
|
158
|
+
|
|
159
|
+
## Executive Summary
|
|
160
|
+
|
|
161
|
+
{{SUMMARY}}
|
|
162
|
+
|
|
163
|
+
## Critical Issues
|
|
164
|
+
|
|
165
|
+
### CRIT-{{ID}}: {{TITLE}}
|
|
166
|
+
- **Severity**: Critical
|
|
167
|
+
- **Location**: {{FILE}}:{{LINE}}
|
|
168
|
+
- **Description**: {{DESCRIPTION}}
|
|
169
|
+
- **Impact**: {{IMPACT}}
|
|
170
|
+
- **Fix**: {{FIX_STEPS}}
|
|
171
|
+
- **References**: {{LINKS}}
|
|
172
|
+
|
|
173
|
+
## High Priority Issues
|
|
174
|
+
|
|
175
|
+
{{#each HIGH_ISSUES}}
|
|
176
|
+
### HIGH-{{ID}}: {{TITLE}}
|
|
177
|
+
{{DETAILS}}
|
|
178
|
+
{{/each}}
|
|
179
|
+
|
|
180
|
+
## Passed Checks
|
|
181
|
+
|
|
182
|
+
{{PASSED_CHECKS_LIST}}
|
|
183
|
+
|
|
184
|
+
## Recommendations
|
|
185
|
+
|
|
186
|
+
{{RECOMMENDATIONS_LIST}}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Integration with Workflow
|
|
190
|
+
|
|
191
|
+
### Phase 3 - Validation
|
|
192
|
+
|
|
193
|
+
Run during validation phase:
|
|
194
|
+
- After implementation complete
|
|
195
|
+
- Before deployment
|
|
196
|
+
- As part of `/quality-check`
|
|
197
|
+
|
|
198
|
+
### CI/CD Integration
|
|
199
|
+
|
|
200
|
+
```yaml
|
|
201
|
+
- name: Security Audit
|
|
202
|
+
run: {{CLI_TOOL}} /security-audit --report
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Common Vulnerabilities Detected
|
|
206
|
+
|
|
207
|
+
### Critical
|
|
208
|
+
- Missing authentication checks
|
|
209
|
+
- SQL injection vulnerabilities
|
|
210
|
+
- XSS vulnerabilities
|
|
211
|
+
- Hardcoded secrets
|
|
212
|
+
- Insecure data exposure
|
|
213
|
+
|
|
214
|
+
### High
|
|
215
|
+
- Missing authorization checks
|
|
216
|
+
- Insufficient input validation
|
|
217
|
+
- Weak session management
|
|
218
|
+
- Missing rate limiting
|
|
219
|
+
|
|
220
|
+
### Medium
|
|
221
|
+
- Missing security headers
|
|
222
|
+
- Outdated dependencies
|
|
223
|
+
- Information disclosure
|
|
224
|
+
- Insecure cookie configuration
|
|
225
|
+
|
|
226
|
+
## Related Commands
|
|
227
|
+
|
|
228
|
+
- `/quality-check` - Comprehensive validation (includes security)
|
|
229
|
+
- `/performance-audit` - Performance audits
|
|
230
|
+
- `/accessibility-audit` - Accessibility checks
|
|
231
|
+
- `/code-check` - Code quality validation
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-check
|
|
3
|
+
description: Run linting and type checking validation
|
|
4
|
+
type: quality
|
|
5
|
+
category: validation
|
|
6
|
+
config_required:
|
|
7
|
+
- TYPECHECK_COMMAND: "Command to run type checking (e.g., pnpm typecheck)"
|
|
8
|
+
- LINT_COMMAND: "Command to run linting (e.g., pnpm lint)"
|
|
9
|
+
- PROJECT_ROOT: "Project root directory path"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code Check Command
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
Run linting and type checking validation across the codebase. Stops at first error for immediate fixing.
|
|
17
|
+
|
|
18
|
+
## ⚙️ Configuration
|
|
19
|
+
|
|
20
|
+
| Setting | Description | Example |
|
|
21
|
+
|---------|-------------|---------|
|
|
22
|
+
| TYPECHECK_COMMAND | Type checking command | `pnpm typecheck` |
|
|
23
|
+
| LINT_COMMAND | Linting command | `pnpm lint` |
|
|
24
|
+
| PROJECT_ROOT | Project root directory | `/path/to/project` |
|
|
25
|
+
| STOP_ON_ERROR | Stop on first error | `true` |
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
/code-check
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Execution Flow
|
|
34
|
+
|
|
35
|
+
### 1. Type Checking
|
|
36
|
+
|
|
37
|
+
**Process:**
|
|
38
|
+
|
|
39
|
+
| Step | Action |
|
|
40
|
+
|------|--------|
|
|
41
|
+
| 1 | Navigate to {{PROJECT_ROOT}} |
|
|
42
|
+
| 2 | Execute {{TYPECHECK_COMMAND}} |
|
|
43
|
+
| 3 | Validate type compilation |
|
|
44
|
+
| 4 | Stop on first error |
|
|
45
|
+
|
|
46
|
+
**Output on Error:**
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
❌ Type Check Failed
|
|
50
|
+
|
|
51
|
+
File: {{FILE_PATH}}:{{LINE}}:{{COL}}
|
|
52
|
+
Error: {{ERROR_MESSAGE}}
|
|
53
|
+
|
|
54
|
+
Fix required before proceeding.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2. Lint Validation
|
|
58
|
+
|
|
59
|
+
**Process:**
|
|
60
|
+
|
|
61
|
+
| Step | Action |
|
|
62
|
+
|------|--------|
|
|
63
|
+
| 1 | Execute {{LINT_COMMAND}} |
|
|
64
|
+
| 2 | Apply linting rules |
|
|
65
|
+
| 3 | Check code style |
|
|
66
|
+
| 4 | Stop on first error |
|
|
67
|
+
|
|
68
|
+
**Output on Error:**
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
❌ Lint Failed
|
|
72
|
+
|
|
73
|
+
File: {{FILE_PATH}}:{{LINE}}:{{COL}}
|
|
74
|
+
Rule: {{RULE_NAME}}
|
|
75
|
+
Error: {{ERROR_MESSAGE}}
|
|
76
|
+
|
|
77
|
+
Fix required before proceeding.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Quality Standards
|
|
81
|
+
|
|
82
|
+
| Category | Checks |
|
|
83
|
+
|----------|--------|
|
|
84
|
+
| **Type Safety** | Strict mode, no implicit any, import resolution |
|
|
85
|
+
| **Code Style** | Formatting, import organization, best practices |
|
|
86
|
+
| **Code Quality** | No unused code, proper error handling |
|
|
87
|
+
|
|
88
|
+
## Output Format
|
|
89
|
+
|
|
90
|
+
### Success
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
✅ CODE CHECK PASSED
|
|
94
|
+
|
|
95
|
+
Type Check:
|
|
96
|
+
✅ All files compile successfully
|
|
97
|
+
✅ No type errors found
|
|
98
|
+
|
|
99
|
+
Lint:
|
|
100
|
+
✅ All linting rules passed
|
|
101
|
+
✅ Code style consistent
|
|
102
|
+
|
|
103
|
+
🚀 Ready to proceed
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Failure
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
❌ CODE CHECK FAILED
|
|
110
|
+
|
|
111
|
+
{{ERROR_DETAILS}}
|
|
112
|
+
|
|
113
|
+
Fix required before proceeding.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Related Commands
|
|
117
|
+
|
|
118
|
+
- `/quality-check` - Full quality validation
|
|
119
|
+
- `/run-tests` - Test execution
|
|
120
|
+
- `/review-code` - Code review
|
|
121
|
+
|
|
122
|
+
## When to Use
|
|
123
|
+
|
|
124
|
+
- Before committing changes
|
|
125
|
+
- Before code reviews
|
|
126
|
+
- As part of CI/CD pipeline
|
|
127
|
+
- Required by `/quality-check`
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: five-why
|
|
3
|
+
description: Root cause analysis using Five Whys technique
|
|
4
|
+
type: development
|
|
5
|
+
category: analysis
|
|
6
|
+
config_required:
|
|
7
|
+
- problem_categories: "Define problem types (technical, process, system)"
|
|
8
|
+
- analysis_depth: "Configure analysis depth and iteration count"
|
|
9
|
+
- solution_framework: "Define solution evaluation criteria"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Five Why Command
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
Systematic root cause analysis using Five Whys technique to identify underlying causes of problems, bugs, or architectural decisions.
|
|
17
|
+
|
|
18
|
+
## ⚙️ Configuration
|
|
19
|
+
|
|
20
|
+
| Setting | Description | Example |
|
|
21
|
+
|---------|-------------|---------|
|
|
22
|
+
| `problem_categories` | Problem classification types | `technical, process, system` |
|
|
23
|
+
| `analysis_depth` | Number of why iterations | `5` (default) |
|
|
24
|
+
| `solution_types` | Solution categories | `immediate, process, architectural` |
|
|
25
|
+
| `evaluation_criteria` | Solution assessment factors | `effort, risk, benefit` |
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
/five-why {problem_description}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Execution Flow
|
|
34
|
+
|
|
35
|
+
### Step 1: Problem Analysis
|
|
36
|
+
|
|
37
|
+
**Agent**: `debugger`
|
|
38
|
+
|
|
39
|
+
- Analyze presented problem
|
|
40
|
+
- Gather context and information
|
|
41
|
+
- Identify symptoms vs causes
|
|
42
|
+
- Prepare for systematic questioning
|
|
43
|
+
|
|
44
|
+
### Step 2: Five Whys Analysis
|
|
45
|
+
|
|
46
|
+
**Process**:
|
|
47
|
+
|
|
48
|
+
1. Problem Statement: Clear issue definition
|
|
49
|
+
2. Why #1: Immediate cause
|
|
50
|
+
3. Why #2: Underlying cause
|
|
51
|
+
4. Why #3: Deeper cause
|
|
52
|
+
5. Why #4: Systemic cause
|
|
53
|
+
6. Why #5: Root cause
|
|
54
|
+
|
|
55
|
+
### Step 3: Root Cause Identification
|
|
56
|
+
|
|
57
|
+
- Identify fundamental cause
|
|
58
|
+
- Validate logic
|
|
59
|
+
- Assess impact and scope
|
|
60
|
+
- Categorize problem type
|
|
61
|
+
|
|
62
|
+
### Step 4: Solution Development
|
|
63
|
+
|
|
64
|
+
- Generate solution options
|
|
65
|
+
- Analyze tradeoffs
|
|
66
|
+
- Assess complexity
|
|
67
|
+
- Present recommendations
|
|
68
|
+
|
|
69
|
+
## Problem Categories
|
|
70
|
+
|
|
71
|
+
### Technical Problems
|
|
72
|
+
|
|
73
|
+
**Areas**: Bugs, performance, architecture, integration, deployment
|
|
74
|
+
|
|
75
|
+
**Focus**: Code-level issues, system design, configuration, dependencies
|
|
76
|
+
|
|
77
|
+
### Process Problems
|
|
78
|
+
|
|
79
|
+
**Areas**: Workflow, communication, quality gaps, deployment failures
|
|
80
|
+
|
|
81
|
+
**Focus**: Process design, tools, knowledge gaps, resource allocation
|
|
82
|
+
|
|
83
|
+
### System Problems
|
|
84
|
+
|
|
85
|
+
**Areas**: Scalability, reliability, security, maintenance
|
|
86
|
+
|
|
87
|
+
**Focus**: Architecture design, infrastructure, operational procedures
|
|
88
|
+
|
|
89
|
+
## Output Format
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
🔍 FIVE WHYS ANALYSIS COMPLETE
|
|
93
|
+
|
|
94
|
+
Problem: {problem_statement}
|
|
95
|
+
|
|
96
|
+
📋 Analysis:
|
|
97
|
+
|
|
98
|
+
❓ Why #1: {question}
|
|
99
|
+
💡 Answer: {immediate_cause}
|
|
100
|
+
Evidence: {supporting_data}
|
|
101
|
+
|
|
102
|
+
❓ Why #2: {question}
|
|
103
|
+
💡 Answer: {underlying_cause}
|
|
104
|
+
Evidence: {supporting_data}
|
|
105
|
+
|
|
106
|
+
[... continues through Why #5]
|
|
107
|
+
|
|
108
|
+
🎯 ROOT CAUSE: {root_cause}
|
|
109
|
+
|
|
110
|
+
📊 Impact:
|
|
111
|
+
- Severity: {level}
|
|
112
|
+
- Scope: {affected_areas}
|
|
113
|
+
- Users Affected: {count}
|
|
114
|
+
|
|
115
|
+
🔧 Solution Options:
|
|
116
|
+
|
|
117
|
+
Option 1: {name}
|
|
118
|
+
✅ Pros: {benefits}
|
|
119
|
+
❌ Cons: {tradeoffs}
|
|
120
|
+
Implementation: {steps}
|
|
121
|
+
|
|
122
|
+
Option 2: {name}
|
|
123
|
+
[Similar structure...]
|
|
124
|
+
|
|
125
|
+
🎯 RECOMMENDED: {option} ({rationale})
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Analysis Techniques
|
|
129
|
+
|
|
130
|
+
### Systematic Questioning
|
|
131
|
+
|
|
132
|
+
**Question Types**:
|
|
133
|
+
|
|
134
|
+
- Open-ended (avoid yes/no)
|
|
135
|
+
- Evidence-based
|
|
136
|
+
- Context-gathering
|
|
137
|
+
- Assumption-challenging
|
|
138
|
+
|
|
139
|
+
### Evidence Collection
|
|
140
|
+
|
|
141
|
+
**Data Sources**:
|
|
142
|
+
|
|
143
|
+
- Logs and metrics
|
|
144
|
+
- Performance data
|
|
145
|
+
- User reports
|
|
146
|
+
- Code history
|
|
147
|
+
- Configuration changes
|
|
148
|
+
|
|
149
|
+
## Common Use Cases
|
|
150
|
+
|
|
151
|
+
### Bug Investigation
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
Problem: {symptom}
|
|
155
|
+
Why chain → Root cause: {technical_gap}
|
|
156
|
+
Solution: {fix} + {process_improvement}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Performance Issues
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
Problem: {slow_response}
|
|
163
|
+
Why chain → Root cause: {design_limitation}
|
|
164
|
+
Solution: {optimization} + {monitoring}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Architecture Decisions
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
Problem: {complexity}
|
|
171
|
+
Why chain → Root cause: {planning_gap}
|
|
172
|
+
Solution: {refactor} + {standards}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Solution Development
|
|
176
|
+
|
|
177
|
+
### Solution Categories
|
|
178
|
+
|
|
179
|
+
| Category | Characteristics | When to Use |
|
|
180
|
+
|----------|----------------|-------------|
|
|
181
|
+
| Immediate | Quick fixes, low risk | Critical issues, time-sensitive |
|
|
182
|
+
| Process | Systematic improvements | Recurring problems, quality needs |
|
|
183
|
+
| Architectural | Fundamental changes | Scalability, strategic requirements |
|
|
184
|
+
|
|
185
|
+
### Tradeoff Analysis
|
|
186
|
+
|
|
187
|
+
**Assessment Factors**:
|
|
188
|
+
|
|
189
|
+
- Implementation effort
|
|
190
|
+
- Technical risk
|
|
191
|
+
- User impact
|
|
192
|
+
- Long-term maintenance
|
|
193
|
+
- Business value
|
|
194
|
+
|
|
195
|
+
## Related Commands
|
|
196
|
+
|
|
197
|
+
- `/start-refactor-plan` - Architectural solutions
|
|
198
|
+
- `/review-code` - Code quality analysis
|
|
199
|
+
- `/quality-check` - Systematic quality problems
|
|
200
|
+
|
|
201
|
+
## When to Use
|
|
202
|
+
|
|
203
|
+
- Bug investigation
|
|
204
|
+
- Performance analysis
|
|
205
|
+
- Process problems
|
|
206
|
+
- Architecture decisions
|
|
207
|
+
- Incident post-mortems
|
|
208
|
+
|
|
209
|
+
## Best Practices
|
|
210
|
+
|
|
211
|
+
### Analysis Quality
|
|
212
|
+
|
|
213
|
+
- Focus on process, not blame
|
|
214
|
+
- Use evidence-based reasoning
|
|
215
|
+
- Challenge assumptions
|
|
216
|
+
- Validate each level
|
|
217
|
+
- Stop at actionable root cause
|
|
218
|
+
|
|
219
|
+
### Solution Development
|
|
220
|
+
|
|
221
|
+
- Generate multiple options
|
|
222
|
+
- Consider short and long-term
|
|
223
|
+
- Assess effort realistically
|
|
224
|
+
- Include process improvements
|
|
225
|
+
- Present clear tradeoffs
|