@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,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-todos-github
|
|
3
|
+
description: Sync code TODO comments to GitHub Issues
|
|
4
|
+
type: planning
|
|
5
|
+
category: planning
|
|
6
|
+
config_required:
|
|
7
|
+
github_token_env: "GitHub token environment variable"
|
|
8
|
+
github_owner_env: "Repository owner env variable"
|
|
9
|
+
github_repo_env: "Repository name env variable"
|
|
10
|
+
tracking_file: "GitHub tracking file path"
|
|
11
|
+
todo_patterns: "Patterns to match (e.g., TODO, HACK, DEBUG)"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Sync Code TODOs to GitHub
|
|
15
|
+
|
|
16
|
+
Scan codebase for TODO/HACK/DEBUG comments and sync to GitHub Issues.
|
|
17
|
+
|
|
18
|
+
## ⚙️ Configuration
|
|
19
|
+
|
|
20
|
+
| Setting | Description | Example |
|
|
21
|
+
|---------|-------------|---------|
|
|
22
|
+
| `github_token_env` | GitHub token variable | `{{GITHUB_TOKEN}}` |
|
|
23
|
+
| `github_owner_env` | Owner variable | `{{GITHUB_OWNER}}` |
|
|
24
|
+
| `github_repo_env` | Repository variable | `{{GITHUB_REPO}}` |
|
|
25
|
+
| `tracking_file` | Tracking data file | `{{TRACKING_FILE}}` |
|
|
26
|
+
| `todo_patterns` | Comment patterns to match | `TODO, HACK, DEBUG` |
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
/sync-todos-github [scan_path]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## When to Use
|
|
35
|
+
|
|
36
|
+
- Before committing code with new TODOs
|
|
37
|
+
- To convert technical debt markers to issues
|
|
38
|
+
- For team visibility on code tasks
|
|
39
|
+
- As part of pre-commit hook
|
|
40
|
+
- When reviewing technical debt
|
|
41
|
+
|
|
42
|
+
## Process
|
|
43
|
+
|
|
44
|
+
### Step 1: Identify Scope
|
|
45
|
+
|
|
46
|
+
Scan options:
|
|
47
|
+
|
|
48
|
+
- **Full codebase:** All files
|
|
49
|
+
- **Specific directory:** Single package/app
|
|
50
|
+
- **Changed files:** Git-modified only (recommended)
|
|
51
|
+
|
|
52
|
+
### Step 2: Get Configuration
|
|
53
|
+
|
|
54
|
+
Required:
|
|
55
|
+
|
|
56
|
+
- `{{GITHUB_TOKEN}}`
|
|
57
|
+
- `{{GITHUB_OWNER}}`
|
|
58
|
+
- `{{GITHUB_REPO}}`
|
|
59
|
+
|
|
60
|
+
### Step 3: Scan for TODOs
|
|
61
|
+
|
|
62
|
+
Match patterns:
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
// TODO: Description
|
|
66
|
+
// TODO(username): Assigned task
|
|
67
|
+
// TODO[HIGH]: High priority
|
|
68
|
+
// TODO: #bug Task with label
|
|
69
|
+
// HACK: Temporary workaround
|
|
70
|
+
// DEBUG: Remove before production
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Step 4: Execute Sync
|
|
74
|
+
|
|
75
|
+
- Create issues for new TODOs
|
|
76
|
+
- Update existing issues
|
|
77
|
+
- Close issues for removed TODOs
|
|
78
|
+
- Add issue links to comments
|
|
79
|
+
|
|
80
|
+
### Step 5: Report Results
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
✅ TODOs synced to GitHub!
|
|
84
|
+
|
|
85
|
+
Statistics:
|
|
86
|
+
• {n} new issues created
|
|
87
|
+
• {n} issues updated
|
|
88
|
+
• {n} issues closed (TODOs removed)
|
|
89
|
+
• {n} skipped
|
|
90
|
+
|
|
91
|
+
Created Issues:
|
|
92
|
+
• #{n}: Description (file.ts:42)
|
|
93
|
+
• #{n}: Description (file.ts:78)
|
|
94
|
+
|
|
95
|
+
Updated Comments:
|
|
96
|
+
Comments now have issue links
|
|
97
|
+
|
|
98
|
+
Next Steps:
|
|
99
|
+
1. Review issues in GitHub
|
|
100
|
+
2. Commit updated files
|
|
101
|
+
3. Use /check-completed when resolved
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Step 6: Update Comments
|
|
105
|
+
|
|
106
|
+
Automatically adds issue links:
|
|
107
|
+
|
|
108
|
+
**Before:**
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
// TODO: Fix authentication error
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**After:**
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
// TODO: Fix authentication error
|
|
118
|
+
// GitHub: {issue_url}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Error Handling
|
|
122
|
+
|
|
123
|
+
| Error | Solution |
|
|
124
|
+
|-------|----------|
|
|
125
|
+
| Missing config | Set environment variables |
|
|
126
|
+
| No TODOs found | Verify patterns and scan path |
|
|
127
|
+
| API errors | Check token and permissions |
|
|
128
|
+
| Parse errors | Fix syntax, re-run sync |
|
|
129
|
+
|
|
130
|
+
## Advanced Options
|
|
131
|
+
|
|
132
|
+
### Scan Specific Directory
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
{ scanPath: 'packages/api' }
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Dry Run
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
{ dryRun: true }
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Custom Patterns
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
{
|
|
148
|
+
include: ['**/*.ts', '**/*.tsx'],
|
|
149
|
+
exclude: ['**/node_modules/**']
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Preserve Comments
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
{ updateComments: false }
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Comment Format
|
|
160
|
+
|
|
161
|
+
### Basic
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
// TODO: Add validation
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### With Priority
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
// TODO[HIGH]: Fix security issue
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### With Assignment
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
// TODO(john): Review query
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### With Labels
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
// TODO: #bug #security Fix injection
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Combined
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
// TODO[HIGH](maria): #feature Add auth
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Important Notes
|
|
192
|
+
|
|
193
|
+
- **Labels:** Auto-generated from comment type
|
|
194
|
+
- **Priority:** [HIGH], [MEDIUM], [LOW] become labels
|
|
195
|
+
- **Assignment:** TODO(username) auto-assigns
|
|
196
|
+
- **Context:** Issues include code snippet and location
|
|
197
|
+
- **Auto-close:** Issues close when TODOs removed
|
|
198
|
+
|
|
199
|
+
## Related Commands
|
|
200
|
+
|
|
201
|
+
- `/sync-planning-github` - Sync planning sessions
|
|
202
|
+
- `/check-completed` - Auto-close completed
|
|
203
|
+
- `/cleanup-issues` - Clean stale issues
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-check
|
|
3
|
+
description: Master quality validation before merge - runs code checks, tests, and reviews
|
|
4
|
+
type: quality
|
|
5
|
+
category: validation
|
|
6
|
+
config_required:
|
|
7
|
+
- test_command: "Command to run tests (e.g., pnpm test)"
|
|
8
|
+
- lint_command: "Command to run linting (e.g., pnpm lint)"
|
|
9
|
+
- typecheck_command: "Command to run type checking (e.g., pnpm typecheck)"
|
|
10
|
+
- coverage_target: "Minimum coverage percentage (default: 90)"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Quality Check Command
|
|
14
|
+
|
|
15
|
+
## ⚙️ Configuration
|
|
16
|
+
|
|
17
|
+
Ensure your project has these commands configured in `package.json`:
|
|
18
|
+
|
|
19
|
+
| Setting | Description | Example |
|
|
20
|
+
|---------|-------------|---------|
|
|
21
|
+
| `test` | Run test suite with coverage | `vitest run --coverage` |
|
|
22
|
+
| `lint` | Run linter | `eslint .` or `biome check .` |
|
|
23
|
+
| `typecheck` | Run TypeScript compiler | `tsc --noEmit` |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Purpose
|
|
28
|
+
|
|
29
|
+
Master quality validation command that runs all quality checks before code can be merged. This is a **required gate** before any PR merge.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
/quality-check
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Execution Flow
|
|
42
|
+
|
|
43
|
+
### Step 1: Code Quality (STOP on error)
|
|
44
|
+
```bash
|
|
45
|
+
{{TYPECHECK_COMMAND}} # e.g., pnpm typecheck
|
|
46
|
+
{{LINT_COMMAND}} # e.g., pnpm lint
|
|
47
|
+
```
|
|
48
|
+
**Behavior**: If either fails, STOP and report errors. Do not continue.
|
|
49
|
+
|
|
50
|
+
### Step 2: Tests & Coverage (STOP on failure)
|
|
51
|
+
```bash
|
|
52
|
+
{{TEST_COMMAND}} # e.g., pnpm test:coverage
|
|
53
|
+
```
|
|
54
|
+
**Behavior**:
|
|
55
|
+
- If tests fail, STOP and report failures
|
|
56
|
+
- If coverage < {{COVERAGE_TARGET}}%, STOP and report
|
|
57
|
+
|
|
58
|
+
### Step 3: Code Review (REPORT findings)
|
|
59
|
+
Invoke tech-lead agent for code review:
|
|
60
|
+
- Architecture patterns
|
|
61
|
+
- Code quality standards
|
|
62
|
+
- Documentation completeness
|
|
63
|
+
|
|
64
|
+
**Behavior**: Report all findings, do not stop.
|
|
65
|
+
|
|
66
|
+
### Step 4: Security Review (REPORT findings)
|
|
67
|
+
Check for:
|
|
68
|
+
- Input validation
|
|
69
|
+
- Authentication/authorization
|
|
70
|
+
- Sensitive data handling
|
|
71
|
+
- Dependency vulnerabilities
|
|
72
|
+
|
|
73
|
+
**Behavior**: Report all findings, do not stop.
|
|
74
|
+
|
|
75
|
+
### Step 5: Performance Review (REPORT findings)
|
|
76
|
+
Check for:
|
|
77
|
+
- N+1 queries
|
|
78
|
+
- Missing indexes
|
|
79
|
+
- Inefficient algorithms
|
|
80
|
+
- Bundle size (frontend)
|
|
81
|
+
|
|
82
|
+
**Behavior**: Report all findings, do not stop.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Output Format
|
|
87
|
+
|
|
88
|
+
### Success
|
|
89
|
+
```
|
|
90
|
+
✅ QUALITY CHECK PASSED
|
|
91
|
+
|
|
92
|
+
📋 Results:
|
|
93
|
+
✅ TypeScript: No errors
|
|
94
|
+
✅ Linting: No issues
|
|
95
|
+
✅ Tests: 142 passed, 0 failed
|
|
96
|
+
✅ Coverage: 94.2% (target: 90%)
|
|
97
|
+
|
|
98
|
+
📝 Review Notes:
|
|
99
|
+
- Code follows patterns ✓
|
|
100
|
+
- Documentation complete ✓
|
|
101
|
+
- No security issues ✓
|
|
102
|
+
- Performance acceptable ✓
|
|
103
|
+
|
|
104
|
+
🚀 Ready to merge
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Failure (Critical)
|
|
108
|
+
```
|
|
109
|
+
❌ QUALITY CHECK FAILED
|
|
110
|
+
|
|
111
|
+
📋 Results:
|
|
112
|
+
✅ TypeScript: No errors
|
|
113
|
+
❌ Tests: 140 passed, 2 failed
|
|
114
|
+
⚠️ Coverage: 87.3% (target: 90%)
|
|
115
|
+
|
|
116
|
+
🛑 BLOCKING ISSUES:
|
|
117
|
+
|
|
118
|
+
1. Test Failures:
|
|
119
|
+
- src/services/user.test.ts:45 - "should validate email"
|
|
120
|
+
- src/api/auth.test.ts:78 - "should reject expired tokens"
|
|
121
|
+
|
|
122
|
+
2. Coverage Below Target:
|
|
123
|
+
- Current: 87.3%
|
|
124
|
+
- Required: 90%
|
|
125
|
+
- Missing: src/utils/date-helper.ts (45% coverage)
|
|
126
|
+
|
|
127
|
+
Fix these issues before merging.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Partial Success (Warnings)
|
|
131
|
+
```
|
|
132
|
+
⚠️ QUALITY CHECK PASSED WITH WARNINGS
|
|
133
|
+
|
|
134
|
+
📋 Results:
|
|
135
|
+
✅ TypeScript: No errors
|
|
136
|
+
✅ Linting: No issues
|
|
137
|
+
✅ Tests: 142 passed
|
|
138
|
+
✅ Coverage: 91.5%
|
|
139
|
+
|
|
140
|
+
⚠️ ADVISORY ISSUES:
|
|
141
|
+
|
|
142
|
+
Code Review:
|
|
143
|
+
- Medium: Missing JSDoc on 3 exported functions
|
|
144
|
+
- Low: Consider extracting repeated logic in UserService
|
|
145
|
+
|
|
146
|
+
Security Review:
|
|
147
|
+
- Low: Consider adding rate limiting to /api/auth endpoints
|
|
148
|
+
|
|
149
|
+
Performance Review:
|
|
150
|
+
- Medium: Potential N+1 query in getOrdersWithItems()
|
|
151
|
+
|
|
152
|
+
These don't block merge but should be addressed.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Behavior Rules
|
|
158
|
+
|
|
159
|
+
| Check | On Failure |
|
|
160
|
+
|-------|------------|
|
|
161
|
+
| TypeScript errors | **STOP** - Must fix |
|
|
162
|
+
| Lint errors | **STOP** - Must fix |
|
|
163
|
+
| Test failures | **STOP** - Must fix |
|
|
164
|
+
| Coverage below target | **STOP** - Must fix |
|
|
165
|
+
| Code review issues | **REPORT** - Advisory |
|
|
166
|
+
| Security issues | **REPORT** - Advisory (unless Critical) |
|
|
167
|
+
| Performance issues | **REPORT** - Advisory |
|
|
168
|
+
|
|
169
|
+
**Exception**: Critical security issues should block merge.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Issue Severity
|
|
174
|
+
|
|
175
|
+
| Severity | Description | Action |
|
|
176
|
+
|----------|-------------|--------|
|
|
177
|
+
| **Critical** | Security vulnerabilities, data loss risk | Must fix before merge |
|
|
178
|
+
| **High** | Bugs, broken functionality | Must fix before merge |
|
|
179
|
+
| **Medium** | Code quality, patterns, performance | Should fix, can merge |
|
|
180
|
+
| **Low** | Style, minor improvements | Nice to have |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Quick Reference
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Run individual checks
|
|
188
|
+
{{TYPECHECK_COMMAND}}
|
|
189
|
+
{{LINT_COMMAND}}
|
|
190
|
+
{{TEST_COMMAND}}
|
|
191
|
+
|
|
192
|
+
# Run full quality check
|
|
193
|
+
/quality-check
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Related Commands
|
|
199
|
+
|
|
200
|
+
- `/code-check` - Only lint + typecheck (faster)
|
|
201
|
+
- `/run-tests` - Only tests with coverage
|
|
202
|
+
- `/security-audit` - Deep security review
|
|
203
|
+
- `/performance-audit` - Deep performance review
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## When to Use
|
|
208
|
+
|
|
209
|
+
- **Required**: Before every PR merge
|
|
210
|
+
- **Recommended**: Before pushing to main
|
|
211
|
+
- **Optional**: During development for early feedback
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: run-tests
|
|
3
|
+
description: Execute test suite and validate coverage requirements
|
|
4
|
+
type: quality
|
|
5
|
+
category: validation
|
|
6
|
+
config_required:
|
|
7
|
+
- TEST_COMMAND: "Command to run tests (e.g., pnpm test)"
|
|
8
|
+
- COVERAGE_COMMAND: "Command to run coverage (e.g., pnpm test:coverage)"
|
|
9
|
+
- COVERAGE_THRESHOLD: "Minimum coverage percentage (e.g., 90)"
|
|
10
|
+
- PROJECT_ROOT: "Project root directory path"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Run Tests Command
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Execute comprehensive test suite and validate coverage requirements. Stops at first failure.
|
|
18
|
+
|
|
19
|
+
## ⚙️ Configuration
|
|
20
|
+
|
|
21
|
+
| Setting | Description | Example |
|
|
22
|
+
|---------|-------------|---------|
|
|
23
|
+
| TEST_COMMAND | Test execution command | `pnpm test` |
|
|
24
|
+
| COVERAGE_COMMAND | Coverage command | `pnpm test:coverage` |
|
|
25
|
+
| COVERAGE_THRESHOLD | Minimum coverage % | `90` |
|
|
26
|
+
| PROJECT_ROOT | Project root directory | `/path/to/project` |
|
|
27
|
+
| STOP_ON_ERROR | Stop on first failure | `true` |
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
/run-tests
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Execution Flow
|
|
36
|
+
|
|
37
|
+
### 1. Test Execution
|
|
38
|
+
|
|
39
|
+
**Process:**
|
|
40
|
+
|
|
41
|
+
| Step | Action |
|
|
42
|
+
|------|--------|
|
|
43
|
+
| 1 | Navigate to {{PROJECT_ROOT}} |
|
|
44
|
+
| 2 | Execute {{TEST_COMMAND}} |
|
|
45
|
+
| 3 | Run all test suites |
|
|
46
|
+
| 4 | Stop on first failure |
|
|
47
|
+
|
|
48
|
+
**Test Categories:**
|
|
49
|
+
|
|
50
|
+
- Unit tests
|
|
51
|
+
- Integration tests
|
|
52
|
+
- API/Endpoint tests
|
|
53
|
+
- Component tests
|
|
54
|
+
|
|
55
|
+
**Output on Failure:**
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
❌ TESTS FAILED
|
|
59
|
+
|
|
60
|
+
Test: {{TEST_NAME}}
|
|
61
|
+
File: {{FILE_PATH}}:{{LINE}}
|
|
62
|
+
|
|
63
|
+
Expected: {{EXPECTED}}
|
|
64
|
+
Received: {{ACTUAL}}
|
|
65
|
+
|
|
66
|
+
Error: {{ERROR_MESSAGE}}
|
|
67
|
+
|
|
68
|
+
Fix required before proceeding.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 2. Coverage Validation
|
|
72
|
+
|
|
73
|
+
**Process:**
|
|
74
|
+
|
|
75
|
+
| Step | Action |
|
|
76
|
+
|------|--------|
|
|
77
|
+
| 1 | Execute {{COVERAGE_COMMAND}} |
|
|
78
|
+
| 2 | Validate coverage thresholds |
|
|
79
|
+
| 3 | Generate coverage report |
|
|
80
|
+
| 4 | Identify uncovered code |
|
|
81
|
+
|
|
82
|
+
**Coverage Metrics:**
|
|
83
|
+
|
|
84
|
+
| Metric | Threshold |
|
|
85
|
+
|--------|-----------|
|
|
86
|
+
| Statements | ≥ {{COVERAGE_THRESHOLD}}% |
|
|
87
|
+
| Branches | ≥ {{COVERAGE_THRESHOLD}}% |
|
|
88
|
+
| Functions | ≥ {{COVERAGE_THRESHOLD}}% |
|
|
89
|
+
| Lines | ≥ {{COVERAGE_THRESHOLD}}% |
|
|
90
|
+
|
|
91
|
+
**Output on Insufficient Coverage:**
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
❌ INSUFFICIENT COVERAGE
|
|
95
|
+
|
|
96
|
+
Coverage Results:
|
|
97
|
+
❌ Statements: {{ACTUAL}}% (target: ≥{{THRESHOLD}}%)
|
|
98
|
+
❌ Branches: {{ACTUAL}}% (target: ≥{{THRESHOLD}}%)
|
|
99
|
+
❌ Functions: {{ACTUAL}}% (target: ≥{{THRESHOLD}}%)
|
|
100
|
+
❌ Lines: {{ACTUAL}}% (target: ≥{{THRESHOLD}}%)
|
|
101
|
+
|
|
102
|
+
Uncovered Files:
|
|
103
|
+
- {{FILE_PATH}} (Lines: {{UNCOVERED_LINES}})
|
|
104
|
+
|
|
105
|
+
Add tests for uncovered code paths.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Quality Standards
|
|
109
|
+
|
|
110
|
+
| Category | Requirements |
|
|
111
|
+
|----------|--------------|
|
|
112
|
+
| **Test Structure** | AAA pattern (Arrange, Act, Assert) |
|
|
113
|
+
| **Coverage** | Minimum {{COVERAGE_THRESHOLD}}% across all metrics |
|
|
114
|
+
| **Test Isolation** | No dependencies between tests |
|
|
115
|
+
| **Assertions** | Clear, specific assertions |
|
|
116
|
+
|
|
117
|
+
## Output Format
|
|
118
|
+
|
|
119
|
+
### Success
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
✅ TESTS PASSED
|
|
123
|
+
|
|
124
|
+
Test Results:
|
|
125
|
+
✅ Unit Tests: {{PASSED}}/{{TOTAL}} passed
|
|
126
|
+
✅ Integration Tests: {{PASSED}}/{{TOTAL}} passed
|
|
127
|
+
✅ All test suites passing
|
|
128
|
+
|
|
129
|
+
Coverage Results:
|
|
130
|
+
✅ Statements: {{ACTUAL}}% (target: ≥{{THRESHOLD}}%)
|
|
131
|
+
✅ Branches: {{ACTUAL}}% (target: ≥{{THRESHOLD}}%)
|
|
132
|
+
✅ Functions: {{ACTUAL}}% (target: ≥{{THRESHOLD}}%)
|
|
133
|
+
✅ Lines: {{ACTUAL}}% (target: ≥{{THRESHOLD}}%)
|
|
134
|
+
|
|
135
|
+
🚀 All quality standards met
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Failure
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
❌ TESTS FAILED
|
|
142
|
+
|
|
143
|
+
{{ERROR_DETAILS}}
|
|
144
|
+
|
|
145
|
+
Fix failing tests or add missing coverage.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Related Commands
|
|
149
|
+
|
|
150
|
+
- `/quality-check` - Full quality validation
|
|
151
|
+
- `/code-check` - Code quality validation
|
|
152
|
+
- `/review-code` - Code review
|
|
153
|
+
|
|
154
|
+
## When to Use
|
|
155
|
+
|
|
156
|
+
- Before every commit
|
|
157
|
+
- As part of `/quality-check`
|
|
158
|
+
- After significant changes
|
|
159
|
+
- In CI/CD pipeline
|