agcel 1.0.1
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/.agent/workflows/api-gen.md +59 -0
- package/.agent/workflows/architect.md +44 -0
- package/.agent/workflows/brainstorm.md +223 -0
- package/.agent/workflows/build.md +38 -0
- package/.agent/workflows/changelog.md +51 -0
- package/.agent/workflows/checkpoint.md +138 -0
- package/.agent/workflows/commit.md +223 -0
- package/.agent/workflows/debug.md +57 -0
- package/.agent/workflows/deploy.md +76 -0
- package/.agent/workflows/doc.md +247 -0
- package/.agent/workflows/execute-plan.md +225 -0
- package/.agent/workflows/feature.md +255 -0
- package/.agent/workflows/fix.md +323 -0
- package/.agent/workflows/help.md +63 -0
- package/.agent/workflows/index.md +148 -0
- package/.agent/workflows/load.md +112 -0
- package/.agent/workflows/mode.md +170 -0
- package/.agent/workflows/optimize.md +53 -0
- package/.agent/workflows/plan.md +337 -0
- package/.agent/workflows/pr.md +74 -0
- package/.agent/workflows/product-plan.md +36 -0
- package/.agent/workflows/production-deploy.md +39 -0
- package/.agent/workflows/refactor.md +63 -0
- package/.agent/workflows/research.md +116 -0
- package/.agent/workflows/review.md +344 -0
- package/.agent/workflows/security-scan.md +56 -0
- package/.agent/workflows/ship.md +221 -0
- package/.agent/workflows/spawn.md +177 -0
- package/.agent/workflows/status.md +59 -0
- package/.agent/workflows/tdd.md +139 -0
- package/.agent/workflows/test.md +340 -0
- package/.agent/workflows/verify.md +35 -0
- package/LICENSE +21 -0
- package/README.md +67 -0
- package/dist/commands/init.js +142 -0
- package/dist/commands/install.js +98 -0
- package/dist/commands/list.js +49 -0
- package/dist/commands/restart.js +17 -0
- package/dist/commands/start.js +41 -0
- package/dist/commands/status.js +24 -0
- package/dist/commands/stop.js +29 -0
- package/dist/commands/uninstall.js +78 -0
- package/dist/index.js +58 -0
- package/dist/server/index.js +174 -0
- package/dist/utils/index.js +63 -0
- package/package.json +54 -0
- package/skills/api-security-best-practices/SKILL.md +291 -0
- package/skills/api-security-best-practices/references/examples.md +617 -0
- package/skills/architecture/SKILL.md +59 -0
- package/skills/architecture/context-discovery.md +43 -0
- package/skills/architecture/examples.md +94 -0
- package/skills/architecture/pattern-selection.md +68 -0
- package/skills/architecture/patterns-reference.md +50 -0
- package/skills/architecture/trade-off-analysis.md +77 -0
- package/skills/aws-serverless/SKILL.md +327 -0
- package/skills/brainstorming/SKILL.md +234 -0
- package/skills/c4-context/SKILL.md +154 -0
- package/skills/ci-cd-engineer/SKILL.md +50 -0
- package/skills/code-auditing/SKILL.md +55 -0
- package/skills/copywriting/SKILL.md +248 -0
- package/skills/database-engineer/SKILL.md +47 -0
- package/skills/doc-coauthoring/SKILL.md +379 -0
- package/skills/docker-expert/SKILL.md +412 -0
- package/skills/langgraph/SKILL.md +291 -0
- package/skills/postgresql/SKILL.md +73 -0
- package/skills/pricing-strategy/SKILL.md +360 -0
- package/skills/product-manager/SKILL.md +57 -0
- package/skills/prompt-engineer/README.md +659 -0
- package/skills/prompt-engineer/SKILL.md +256 -0
- package/skills/python-patterns/SKILL.md +445 -0
- package/skills/qa-engineer/SKILL.md +42 -0
- package/skills/rag-engineer/SKILL.md +94 -0
- package/skills/react-patterns/SKILL.md +202 -0
- package/skills/secure-refactoring/SKILL.md +54 -0
- package/skills/security-documentation/SKILL.md +53 -0
- package/skills/senior-architect/SKILL.md +213 -0
- package/skills/senior-architect/references/architecture_patterns.md +103 -0
- package/skills/senior-architect/references/system_design_workflows.md +103 -0
- package/skills/senior-architect/references/tech_decision_guide.md +103 -0
- package/skills/senior-architect/scripts/architecture_diagram_generator.py +114 -0
- package/skills/senior-architect/scripts/dependency_analyzer.py +114 -0
- package/skills/senior-architect/scripts/project_architect.py +114 -0
- package/skills/seo-audit/SKILL.md +491 -0
- package/skills/sql-injection-testing/SKILL.md +452 -0
- package/skills/test-driven-development/SKILL.md +375 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/test-fixing/SKILL.md +123 -0
- package/skills/testing-patterns/SKILL.md +263 -0
- package/skills/typescript-expert/SKILL.md +202 -0
- package/skills/typescript-expert/references/advanced-topics.md +252 -0
- package/skills/typescript-expert/references/tsconfig-strict.json +92 -0
- package/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/skills/typescript-expert/references/utility-types.ts +335 -0
- package/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/skills/ui-ux-designer/SKILL.md +46 -0
- package/skills/vercel-deployment/SKILL.md +83 -0
- package/skills/vulnerability-scanner/SKILL.md +280 -0
- package/skills/vulnerability-scanner/checklists.md +121 -0
- package/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/skills/writing-plans/SKILL.md +120 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# /ship - Ship Code Command
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Complete workflow to commit changes, run reviews, execute tests, and create a pull request ready for merge.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
/ship [commit message or 'quick']
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Arguments
|
|
14
|
+
|
|
15
|
+
- `$ARGUMENTS`:
|
|
16
|
+
- Commit message: Use as commit subject
|
|
17
|
+
- `quick`: Auto-generate message, skip review
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
Ship the current changes with: **$ARGUMENTS**
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
### Phase 1: Pre-Ship Checks
|
|
26
|
+
|
|
27
|
+
1. **Check Repository Status**
|
|
28
|
+
```bash
|
|
29
|
+
git status
|
|
30
|
+
git diff --staged
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. **Identify Changes**
|
|
34
|
+
- Files modified
|
|
35
|
+
- Files added
|
|
36
|
+
- Files deleted
|
|
37
|
+
|
|
38
|
+
3. **Quick Validation**
|
|
39
|
+
- No secrets in changes
|
|
40
|
+
- No debug statements
|
|
41
|
+
- No commented-out code
|
|
42
|
+
|
|
43
|
+
### Phase 2: Code Review (unless 'quick')
|
|
44
|
+
|
|
45
|
+
1. **Run Self-Review**
|
|
46
|
+
- Check code quality
|
|
47
|
+
- Verify style compliance
|
|
48
|
+
- Identify security issues
|
|
49
|
+
|
|
50
|
+
2. **Address Critical Issues**
|
|
51
|
+
- Fix any critical problems
|
|
52
|
+
- Note recommendations
|
|
53
|
+
|
|
54
|
+
### Phase 3: Run Tests
|
|
55
|
+
|
|
56
|
+
1. **Execute Test Suite**
|
|
57
|
+
```bash
|
|
58
|
+
# Python
|
|
59
|
+
pytest -v
|
|
60
|
+
|
|
61
|
+
# TypeScript
|
|
62
|
+
pnpm test
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
2. **Verify All Pass**
|
|
66
|
+
- No failing tests
|
|
67
|
+
- No new warnings
|
|
68
|
+
|
|
69
|
+
3. **Check Coverage**
|
|
70
|
+
- Coverage not decreased
|
|
71
|
+
- New code is tested
|
|
72
|
+
|
|
73
|
+
### Phase 4: Create Commit
|
|
74
|
+
|
|
75
|
+
1. **Stage Changes**
|
|
76
|
+
```bash
|
|
77
|
+
git add -A
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
2. **Generate Commit Message**
|
|
81
|
+
- Follow conventional commit format
|
|
82
|
+
- Reference issues if applicable
|
|
83
|
+
|
|
84
|
+
3. **Create Commit**
|
|
85
|
+
```bash
|
|
86
|
+
git commit -m "$(cat <<'EOF'
|
|
87
|
+
type(scope): subject
|
|
88
|
+
|
|
89
|
+
body
|
|
90
|
+
|
|
91
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
92
|
+
|
|
93
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
94
|
+
EOF
|
|
95
|
+
)"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Phase 5: Push and Create PR
|
|
99
|
+
|
|
100
|
+
1. **Push to Remote**
|
|
101
|
+
```bash
|
|
102
|
+
git push -u origin [branch-name]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
2. **Create Pull Request**
|
|
106
|
+
```bash
|
|
107
|
+
gh pr create --title "type(scope): description" --body "$(cat <<'EOF'
|
|
108
|
+
## Summary
|
|
109
|
+
- Change 1
|
|
110
|
+
- Change 2
|
|
111
|
+
|
|
112
|
+
## Test Plan
|
|
113
|
+
- [ ] Tests pass
|
|
114
|
+
- [ ] Manual testing
|
|
115
|
+
|
|
116
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
117
|
+
EOF
|
|
118
|
+
)"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Output
|
|
122
|
+
|
|
123
|
+
### Ship Report
|
|
124
|
+
|
|
125
|
+
```markdown
|
|
126
|
+
## Ship Complete
|
|
127
|
+
|
|
128
|
+
### Commit
|
|
129
|
+
**Hash**: `abc1234`
|
|
130
|
+
**Message**: `feat(auth): add password reset functionality`
|
|
131
|
+
|
|
132
|
+
### Changes
|
|
133
|
+
| File | Change |
|
|
134
|
+
|------|--------|
|
|
135
|
+
| `src/auth/reset.ts` | Added |
|
|
136
|
+
| `src/auth/routes.ts` | Modified |
|
|
137
|
+
| `tests/auth/reset.test.ts` | Added |
|
|
138
|
+
|
|
139
|
+
### Checks
|
|
140
|
+
- [x] Code review passed
|
|
141
|
+
- [x] Tests passing (42 tests)
|
|
142
|
+
- [x] Coverage: 85% (+3%)
|
|
143
|
+
- [x] No security issues
|
|
144
|
+
|
|
145
|
+
### Pull Request
|
|
146
|
+
**URL**: https://github.com/org/repo/pull/123
|
|
147
|
+
**Title**: feat(auth): add password reset functionality
|
|
148
|
+
**Base**: main
|
|
149
|
+
**Status**: Ready for review
|
|
150
|
+
|
|
151
|
+
### Next Steps
|
|
152
|
+
1. Request review from team
|
|
153
|
+
2. Address any feedback
|
|
154
|
+
3. Merge when approved
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Quick Ship Mode
|
|
158
|
+
|
|
159
|
+
When using `/ship quick`:
|
|
160
|
+
- Skip detailed code review
|
|
161
|
+
- Auto-generate commit message
|
|
162
|
+
- Minimal output
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Quick ship for small changes
|
|
166
|
+
/ship quick
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Commit Message Generation
|
|
170
|
+
|
|
171
|
+
Based on changes, generate appropriate message:
|
|
172
|
+
|
|
173
|
+
### Feature
|
|
174
|
+
```
|
|
175
|
+
feat(scope): add [feature]
|
|
176
|
+
|
|
177
|
+
- Added [component/function]
|
|
178
|
+
- Implemented [functionality]
|
|
179
|
+
- Added tests for [scenarios]
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Bug Fix
|
|
183
|
+
```
|
|
184
|
+
fix(scope): resolve [issue]
|
|
185
|
+
|
|
186
|
+
- Fixed [bug description]
|
|
187
|
+
- Added null check for [case]
|
|
188
|
+
- Updated tests
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Refactor
|
|
192
|
+
```
|
|
193
|
+
refactor(scope): improve [area]
|
|
194
|
+
|
|
195
|
+
- Extracted [logic] to [location]
|
|
196
|
+
- Renamed [old] to [new]
|
|
197
|
+
- Simplified [complex code]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Pre-Ship Checklist
|
|
201
|
+
|
|
202
|
+
- [ ] All changes staged
|
|
203
|
+
- [ ] No unintended files included
|
|
204
|
+
- [ ] Tests pass
|
|
205
|
+
- [ ] No secrets in code
|
|
206
|
+
- [ ] No debug statements
|
|
207
|
+
- [ ] Commit message is descriptive
|
|
208
|
+
- [ ] PR description is complete
|
|
209
|
+
|
|
210
|
+
<!-- CUSTOMIZATION POINT -->
|
|
211
|
+
## Variations
|
|
212
|
+
|
|
213
|
+
Modify behavior via CLAUDE.md:
|
|
214
|
+
- Required checks before ship
|
|
215
|
+
- Commit message format
|
|
216
|
+
- PR template requirements
|
|
217
|
+
- Auto-merge settings
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## Gap Analysis Rule
|
|
221
|
+
Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# /spawn
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Launch background tasks for parallel execution. Enables concurrent work on independent tasks with result aggregation.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Launch a background task or manage running tasks.
|
|
10
|
+
|
|
11
|
+
## Spawn Operations
|
|
12
|
+
|
|
13
|
+
### Launch Task
|
|
14
|
+
|
|
15
|
+
Start a new background task:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
/spawn "[task description]"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Process:**
|
|
22
|
+
1. Analyze task for parallelizability
|
|
23
|
+
2. Launch subagent with task
|
|
24
|
+
3. Return task ID for tracking
|
|
25
|
+
4. Continue main conversation
|
|
26
|
+
|
|
27
|
+
**Output:**
|
|
28
|
+
```markdown
|
|
29
|
+
Spawned: Task #1
|
|
30
|
+
- Description: Research authentication patterns
|
|
31
|
+
- Status: Running
|
|
32
|
+
- Agent: researcher
|
|
33
|
+
|
|
34
|
+
Continue working. Use `/spawn --list` to check status.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### List Tasks
|
|
38
|
+
|
|
39
|
+
Show running and completed tasks:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
/spawn --list
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Output:**
|
|
46
|
+
```markdown
|
|
47
|
+
## Active Tasks
|
|
48
|
+
|
|
49
|
+
| ID | Description | Status | Duration |
|
|
50
|
+
|----|-------------|--------|----------|
|
|
51
|
+
| #1 | Research auth patterns | Running | 2m |
|
|
52
|
+
| #2 | Analyze security | Complete | 5m |
|
|
53
|
+
|
|
54
|
+
## Completed Tasks (last hour)
|
|
55
|
+
| #2 | Analyze security | ✅ Complete | Results ready |
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Collect Results
|
|
59
|
+
|
|
60
|
+
Gather results from completed tasks:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
/spawn --collect
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Output:**
|
|
67
|
+
```markdown
|
|
68
|
+
## Collected Results
|
|
69
|
+
|
|
70
|
+
### Task #1: Research auth patterns
|
|
71
|
+
**Status**: Complete
|
|
72
|
+
**Findings**:
|
|
73
|
+
- Pattern A: JWT with refresh tokens
|
|
74
|
+
- Pattern B: Session-based with Redis
|
|
75
|
+
- Recommendation: JWT for stateless API
|
|
76
|
+
|
|
77
|
+
### Task #2: Analyze security
|
|
78
|
+
**Status**: Complete
|
|
79
|
+
**Findings**:
|
|
80
|
+
- 2 high-priority issues found
|
|
81
|
+
- See detailed report below
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Cancel Task
|
|
85
|
+
|
|
86
|
+
Stop a running task:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
/spawn --cancel [id]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Task Types
|
|
93
|
+
|
|
94
|
+
| Type | Best For | Agent Used |
|
|
95
|
+
|------|----------|------------|
|
|
96
|
+
| Research | Information gathering | researcher |
|
|
97
|
+
| Analysis | Code analysis | scout |
|
|
98
|
+
| Review | Code review | code-reviewer |
|
|
99
|
+
| Test | Test generation | tester |
|
|
100
|
+
| Scan | Security scanning | security-auditor |
|
|
101
|
+
|
|
102
|
+
## Flags
|
|
103
|
+
|
|
104
|
+
| Flag | Description |
|
|
105
|
+
|------|-------------|
|
|
106
|
+
| `--list` | Show all tasks |
|
|
107
|
+
| `--collect` | Gather completed results |
|
|
108
|
+
| `--cancel [id]` | Cancel running task |
|
|
109
|
+
| `--wait` | Wait for all tasks to complete |
|
|
110
|
+
| `--agent=[type]` | Specify agent type |
|
|
111
|
+
| `--priority=[high\|normal]` | Task priority |
|
|
112
|
+
|
|
113
|
+
## Usage Examples
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
/spawn "Research OAuth2 best practices"
|
|
117
|
+
/spawn "Analyze user service for performance issues"
|
|
118
|
+
/spawn "Review security of auth module" --agent=security-auditor
|
|
119
|
+
/spawn --list
|
|
120
|
+
/spawn --collect
|
|
121
|
+
/spawn --wait # Block until all complete
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Arguments
|
|
125
|
+
|
|
126
|
+
$ARGUMENTS
|
|
127
|
+
|
|
128
|
+
If quoted text: spawn that task
|
|
129
|
+
If flag: execute that operation
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Parallel Workflow
|
|
134
|
+
|
|
135
|
+
### Pattern: Research Phase
|
|
136
|
+
```bash
|
|
137
|
+
/spawn "Research authentication approaches"
|
|
138
|
+
/spawn "Analyze current auth implementation"
|
|
139
|
+
/spawn "Review competitor auth patterns"
|
|
140
|
+
# Continue other work...
|
|
141
|
+
/spawn --wait
|
|
142
|
+
/spawn --collect
|
|
143
|
+
# Synthesize findings
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Pattern: Multi-File Review
|
|
147
|
+
```bash
|
|
148
|
+
/spawn "Review src/auth/ for security"
|
|
149
|
+
/spawn "Review src/api/ for performance"
|
|
150
|
+
/spawn "Review src/db/ for SQL injection"
|
|
151
|
+
/spawn --collect
|
|
152
|
+
# Address findings
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Best Practices
|
|
156
|
+
|
|
157
|
+
1. **Independent Tasks**: Only spawn truly independent work
|
|
158
|
+
2. **Clear Descriptions**: Specific task descriptions get better results
|
|
159
|
+
3. **Regular Collection**: Don't let results pile up
|
|
160
|
+
4. **Resource Awareness**: Don't spawn too many concurrent tasks
|
|
161
|
+
|
|
162
|
+
## Limitations
|
|
163
|
+
|
|
164
|
+
- Tasks cannot communicate with each other
|
|
165
|
+
- Results are collected, not streamed
|
|
166
|
+
- Heavy tasks may take time
|
|
167
|
+
- Some tasks benefit from sequential execution
|
|
168
|
+
|
|
169
|
+
## Combines With
|
|
170
|
+
|
|
171
|
+
- Orchestration mode: Manages multiple spawned tasks
|
|
172
|
+
- `/plan`: Plan tasks, then spawn parallel execution
|
|
173
|
+
- `/execute-plan`: Orchestrated task execution
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## Gap Analysis Rule
|
|
177
|
+
Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# /status - Project Status Command
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Get current project status including tasks, git state, and recent activity.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
/status
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Show current project status.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. **Check Git Status**
|
|
20
|
+
```bash
|
|
21
|
+
git status
|
|
22
|
+
git log --oneline -5
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
2. **Review Todos**
|
|
26
|
+
- In progress
|
|
27
|
+
- Pending
|
|
28
|
+
- Completed today
|
|
29
|
+
|
|
30
|
+
3. **Recent Activity**
|
|
31
|
+
- Recent commits
|
|
32
|
+
- Open PRs
|
|
33
|
+
- Open issues
|
|
34
|
+
|
|
35
|
+
## Output
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
## Project Status
|
|
39
|
+
|
|
40
|
+
### Git
|
|
41
|
+
- Branch: `feature/xyz`
|
|
42
|
+
- Status: Clean / X modified files
|
|
43
|
+
|
|
44
|
+
### Tasks
|
|
45
|
+
- In Progress: X
|
|
46
|
+
- Pending: Y
|
|
47
|
+
- Completed: Z
|
|
48
|
+
|
|
49
|
+
### Recent Commits
|
|
50
|
+
1. [commit message]
|
|
51
|
+
2. [commit message]
|
|
52
|
+
|
|
53
|
+
### Open PRs
|
|
54
|
+
- #123: [title]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Gap Analysis Rule
|
|
59
|
+
Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# /tdd - Test-Driven Development Workflow
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Start a TDD workflow: write failing tests first, then implement to make them pass.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
/tdd [feature or function description]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Start TDD workflow for: **$ARGUMENTS**
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
### Phase 1: Red - Write Failing Tests
|
|
20
|
+
|
|
21
|
+
1. **Understand Requirements**
|
|
22
|
+
- What should the code do?
|
|
23
|
+
- What are the inputs/outputs?
|
|
24
|
+
- What edge cases exist?
|
|
25
|
+
|
|
26
|
+
2. **Write Tests First**
|
|
27
|
+
```python
|
|
28
|
+
def test_feature_does_expected_thing():
|
|
29
|
+
result = feature("input")
|
|
30
|
+
assert result == "expected"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
3. **Run Tests (Expect Failure)**
|
|
34
|
+
```bash
|
|
35
|
+
pytest -v # Should fail
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Phase 2: Green - Make Tests Pass
|
|
39
|
+
|
|
40
|
+
1. **Implement Minimal Code**
|
|
41
|
+
- Just enough to pass tests
|
|
42
|
+
- No premature optimization
|
|
43
|
+
|
|
44
|
+
2. **Run Tests (Expect Success)**
|
|
45
|
+
```bash
|
|
46
|
+
pytest -v # Should pass
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Phase 3: Refactor
|
|
50
|
+
|
|
51
|
+
1. **Improve Code Quality**
|
|
52
|
+
- Clean up implementation
|
|
53
|
+
- Remove duplication
|
|
54
|
+
- Improve naming
|
|
55
|
+
|
|
56
|
+
2. **Run Tests (Ensure Still Passing)**
|
|
57
|
+
```bash
|
|
58
|
+
pytest -v # Should still pass
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Phase 4: Repeat
|
|
62
|
+
|
|
63
|
+
Add more test cases and repeat the cycle.
|
|
64
|
+
|
|
65
|
+
## TDD Best Practices
|
|
66
|
+
|
|
67
|
+
- Write one test at a time
|
|
68
|
+
- Tests should be specific and focused
|
|
69
|
+
- Keep the red-green-refactor cycle short
|
|
70
|
+
- Commit after each green phase
|
|
71
|
+
|
|
72
|
+
## Superpowers TDD Methodology
|
|
73
|
+
|
|
74
|
+
**Reference**: `.claude/skills/methodology/test-driven-development/SKILL.md`
|
|
75
|
+
|
|
76
|
+
### Non-Negotiable Rule
|
|
77
|
+
|
|
78
|
+
**NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST**
|
|
79
|
+
|
|
80
|
+
This is not a guideline - it's a rule.
|
|
81
|
+
|
|
82
|
+
### If You Already Wrote Code
|
|
83
|
+
|
|
84
|
+
Delete it. Completely. Don't keep it as reference.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
WRONG: "I'll keep this code as reference while writing tests"
|
|
88
|
+
RIGHT: Delete the code, write test, rewrite implementation
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Verification Before Completion
|
|
92
|
+
|
|
93
|
+
**Reference**: `.claude/skills/methodology/verification-before-completion/SKILL.md`
|
|
94
|
+
|
|
95
|
+
Before claiming tests pass:
|
|
96
|
+
1. **Identify** the command that proves assertion
|
|
97
|
+
2. **Execute** it fully and freshly
|
|
98
|
+
3. **Read** complete output
|
|
99
|
+
4. **Verify** output matches claim
|
|
100
|
+
5. **Only then** make the claim
|
|
101
|
+
|
|
102
|
+
### Forbidden Language
|
|
103
|
+
|
|
104
|
+
Never use without verification:
|
|
105
|
+
- "should work"
|
|
106
|
+
- "probably fixed"
|
|
107
|
+
- "seems to pass"
|
|
108
|
+
|
|
109
|
+
### Testing Anti-Patterns to Avoid
|
|
110
|
+
|
|
111
|
+
**Reference**: `.claude/skills/methodology/testing-anti-patterns/SKILL.md`
|
|
112
|
+
|
|
113
|
+
1. Testing mock behavior instead of real code
|
|
114
|
+
2. Polluting production with test-only methods
|
|
115
|
+
3. Mocking without understanding dependencies
|
|
116
|
+
4. Creating incomplete mocks
|
|
117
|
+
5. Writing tests as afterthoughts
|
|
118
|
+
|
|
119
|
+
## Output
|
|
120
|
+
|
|
121
|
+
```markdown
|
|
122
|
+
## TDD Session: [Feature]
|
|
123
|
+
|
|
124
|
+
### Tests Written
|
|
125
|
+
1. `test_basic_functionality` - [description]
|
|
126
|
+
2. `test_edge_case` - [description]
|
|
127
|
+
|
|
128
|
+
### Implementation
|
|
129
|
+
`src/feature.py` - [description]
|
|
130
|
+
|
|
131
|
+
### Cycle Summary
|
|
132
|
+
- Red: 3 tests written
|
|
133
|
+
- Green: All passing
|
|
134
|
+
- Refactor: Extracted helper function
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## Gap Analysis Rule
|
|
139
|
+
Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.
|