5-phase-workflow 1.0.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/README.md +332 -0
- package/bin/install.js +408 -0
- package/docs/workflow-guide.md +1024 -0
- package/package.json +34 -0
- package/src/agents/integration-agent.md +219 -0
- package/src/agents/review-processor.md +160 -0
- package/src/agents/step-executor.md +108 -0
- package/src/agents/step-fixer.md +132 -0
- package/src/agents/step-verifier.md +125 -0
- package/src/agents/verification-agent.md +411 -0
- package/src/commands/5/configure.md +309 -0
- package/src/commands/5/discuss-feature.md +393 -0
- package/src/commands/5/implement-feature.md +502 -0
- package/src/commands/5/plan-feature.md +285 -0
- package/src/commands/5/plan-implementation.md +376 -0
- package/src/commands/5/quick-implement.md +263 -0
- package/src/commands/5/review-code.md +583 -0
- package/src/commands/5/verify-implementation.md +277 -0
- package/src/hooks/statusline.js +53 -0
- package/src/settings.json +6 -0
- package/src/skills/build-project/SKILL.md +277 -0
- package/src/skills/configure-project/SKILL.md +355 -0
- package/src/skills/generate-readme/EXAMPLES.md +168 -0
- package/src/skills/generate-readme/SKILL.md +123 -0
- package/src/skills/generate-readme/TEMPLATE.md +141 -0
- package/src/skills/run-tests/SKILL.md +365 -0
- package/src/templates/ARCHITECTURE.md +64 -0
- package/src/templates/CONCERNS.md +75 -0
- package/src/templates/CONVENTIONS.md +75 -0
- package/src/templates/INTEGRATIONS.md +65 -0
- package/src/templates/STACK.md +60 -0
- package/src/templates/STRUCTURE.md +60 -0
- package/src/templates/TESTING.md +107 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Module README Template
|
|
2
|
+
|
|
3
|
+
Use this template structure for all module READMEs. Keep them concise and focused.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# [Module Name]
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
[1-3 sentences describing what this module does and its role in the system]
|
|
12
|
+
|
|
13
|
+
Example: "This module contains the core Mission domain model, including the Mission aggregate root, Order, UnitOrder,
|
|
14
|
+
and related entities. It provides the MissionFactory for creating and modifying missions according to business rules."
|
|
15
|
+
|
|
16
|
+
## Key Components
|
|
17
|
+
|
|
18
|
+
[List only the 3-5 most important components - not exhaustive]
|
|
19
|
+
|
|
20
|
+
- `EntityName` - Brief description of key entity
|
|
21
|
+
- `EntityFactory` - Key factory operations (create, addX, updateY)
|
|
22
|
+
- `EntityRepository` - Repository interface with implementations
|
|
23
|
+
- Package references for groups: "Validators in `validation/` package"
|
|
24
|
+
|
|
25
|
+
**Guidelines:**
|
|
26
|
+
|
|
27
|
+
- **DO NOT** list every file
|
|
28
|
+
- **DO** use package references for groups of related files
|
|
29
|
+
- **DO** focus on what developers will use most frequently
|
|
30
|
+
- **DO** mention main interfaces/abstractions, not every implementation
|
|
31
|
+
|
|
32
|
+
## Testing
|
|
33
|
+
|
|
34
|
+
[Brief description of test fixtures and key testing patterns]
|
|
35
|
+
|
|
36
|
+
**Only include this section if:**
|
|
37
|
+
|
|
38
|
+
- Module has test fixtures in `src/testFixtures/`
|
|
39
|
+
- Module has a separate `-testing` sibling
|
|
40
|
+
- Testing approach is non-standard or important to document
|
|
41
|
+
|
|
42
|
+
Example:
|
|
43
|
+
|
|
44
|
+
```java
|
|
45
|
+
// Simple example
|
|
46
|
+
var entity = entityTestFixture.create();
|
|
47
|
+
|
|
48
|
+
// Customized example
|
|
49
|
+
var entity = entityTestFixture.createBuilder()
|
|
50
|
+
.withProperty(value)
|
|
51
|
+
.build();
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Optional Sections
|
|
57
|
+
|
|
58
|
+
Include these sections only if they add significant value:
|
|
59
|
+
|
|
60
|
+
### Critical Patterns
|
|
61
|
+
|
|
62
|
+
[List only 3-5 most important patterns specific to this module]
|
|
63
|
+
|
|
64
|
+
Focus on patterns that:
|
|
65
|
+
|
|
66
|
+
- Will break things if not followed
|
|
67
|
+
- Are non-obvious
|
|
68
|
+
- Are critical to understanding the module
|
|
69
|
+
|
|
70
|
+
Examples:
|
|
71
|
+
|
|
72
|
+
1. **Always use MissionFactory** - Never manually create Mission/Order/UnitOrder connections
|
|
73
|
+
2. **Factory manages state** - Offsets, aliases, and IDs are calculated automatically
|
|
74
|
+
3. **Result objects** - Factory operations return result objects with both created entity and updated aggregate
|
|
75
|
+
|
|
76
|
+
**DO NOT include:**
|
|
77
|
+
|
|
78
|
+
- General patterns covered in CLAUDE.md
|
|
79
|
+
- Obvious patterns like "use builders for construction"
|
|
80
|
+
- Implementation details
|
|
81
|
+
|
|
82
|
+
### Dependencies
|
|
83
|
+
|
|
84
|
+
**Only include if:**
|
|
85
|
+
|
|
86
|
+
- Dependencies are non-obvious
|
|
87
|
+
- There are critical ordering or version requirements
|
|
88
|
+
- External systems are involved
|
|
89
|
+
|
|
90
|
+
**Depends on:** [Brief list of key dependencies]
|
|
91
|
+
|
|
92
|
+
**Used by:** [Brief list of main consumers]
|
|
93
|
+
|
|
94
|
+
### Related Documentation
|
|
95
|
+
|
|
96
|
+
**Don't include:**
|
|
97
|
+
|
|
98
|
+
- Links to CLAUDE.md sections relevant to this module
|
|
99
|
+
- Don't repeat things and patterns already documented in CLAUDE.md
|
|
100
|
+
|
|
101
|
+
**Include for:**
|
|
102
|
+
|
|
103
|
+
- Parent or sibling module READMEs
|
|
104
|
+
- External documentation
|
|
105
|
+
- [Related module READMEs](../path/README.md)
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Anti-Patterns in READMEs
|
|
110
|
+
|
|
111
|
+
**DO NOT:**
|
|
112
|
+
|
|
113
|
+
1. List every validator, query, or handler class individually
|
|
114
|
+
2. Document implementation details
|
|
115
|
+
3. Copy content from CLAUDE.md
|
|
116
|
+
4. Include exhaustive method signatures
|
|
117
|
+
5. Create walls of text
|
|
118
|
+
6. Document every package
|
|
119
|
+
7. Include obvious information
|
|
120
|
+
|
|
121
|
+
**DO:**
|
|
122
|
+
|
|
123
|
+
1. Focus on top-level overview
|
|
124
|
+
2. List 3-5 key components only
|
|
125
|
+
3. Reference CLAUDE.md for patterns
|
|
126
|
+
4. Keep it under 100 lines
|
|
127
|
+
5. Use examples sparingly
|
|
128
|
+
6. Use package references for groups
|
|
129
|
+
7. Document only critical information
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Example README Lengths
|
|
134
|
+
|
|
135
|
+
- **ID module**: 10-30 lines (very simple)
|
|
136
|
+
- **Model module**: 20-80 lines
|
|
137
|
+
- **Handler module**: 20-80 lines
|
|
138
|
+
- **Service module**: 20-80 lines
|
|
139
|
+
- **Testing module**: 20-60 lines
|
|
140
|
+
|
|
141
|
+
If your README exceeds 150 lines, it's too detailed.
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: run-tests
|
|
3
|
+
description: Executes tests using auto-detected or configured test runner. Supports jest, pytest, cargo test, go test, gradle, maven, and more. Use when running tests, verifying test results, or checking test status.
|
|
4
|
+
allowed-tools: Bash, Read, Grep
|
|
5
|
+
model: sonnet
|
|
6
|
+
context: fork
|
|
7
|
+
user-invocable: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Run Tests
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
This skill executes test tasks with auto-detection of the test runner and sufficient timeout for long-running test suites. It provides structured test result reporting and actionable suggestions when tests fail.
|
|
15
|
+
|
|
16
|
+
## Test Runner Detection
|
|
17
|
+
|
|
18
|
+
The skill automatically detects the test runner using:
|
|
19
|
+
|
|
20
|
+
1. **Config file** (`.claude/.5/config.json`) - if `build.testCommand` is specified
|
|
21
|
+
2. **Auto-detection** - by examining project files and package.json scripts:
|
|
22
|
+
- `package.json` with jest/vitest/mocha → npm test
|
|
23
|
+
- `pytest.ini` or test files → pytest
|
|
24
|
+
- `Cargo.toml` → cargo test
|
|
25
|
+
- `go.mod` → go test
|
|
26
|
+
- `build.gradle` → gradle test
|
|
27
|
+
- `pom.xml` → mvn test
|
|
28
|
+
|
|
29
|
+
## Test Targets
|
|
30
|
+
|
|
31
|
+
| Target | Use Case |
|
|
32
|
+
|--------|----------|
|
|
33
|
+
| `all` | Run all tests in all modules |
|
|
34
|
+
| `module` | Run all tests in a specific module |
|
|
35
|
+
| `file` | Run tests in a specific file |
|
|
36
|
+
| `test` | Run a specific test by name |
|
|
37
|
+
|
|
38
|
+
## Parameters
|
|
39
|
+
|
|
40
|
+
When invoked, the skill expects:
|
|
41
|
+
|
|
42
|
+
- **target** (optional, default: `all`): One of `all`, `module`, `file`, `test`
|
|
43
|
+
- **module** (optional): Module name (for monorepos)
|
|
44
|
+
- **file** (optional): Test file path (for `file` target)
|
|
45
|
+
- **test** (optional): Specific test name (for `test` target)
|
|
46
|
+
- **pattern** (optional): Test name pattern/filter
|
|
47
|
+
|
|
48
|
+
## Execution Process
|
|
49
|
+
|
|
50
|
+
### 1. Load Configuration
|
|
51
|
+
|
|
52
|
+
Read `.claude/.5/config.json` if it exists:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"build": {
|
|
57
|
+
"testCommand": "npm test",
|
|
58
|
+
"testFileCommand": "npm test -- {{file}}",
|
|
59
|
+
"testNameCommand": "npm test -- -t {{name}}"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If commands are specified, use them with variable substitution. Otherwise, auto-detect.
|
|
65
|
+
|
|
66
|
+
### 2. Detect Test Runner
|
|
67
|
+
|
|
68
|
+
If no config, examine project files:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Check package.json for test configuration
|
|
72
|
+
if [ -f "package.json" ]; then
|
|
73
|
+
# Check for test frameworks
|
|
74
|
+
if grep -q '"jest"' package.json || grep -q '"@jest"' package.json; then
|
|
75
|
+
TEST_RUNNER="jest"
|
|
76
|
+
elif grep -q '"vitest"' package.json; then
|
|
77
|
+
TEST_RUNNER="vitest"
|
|
78
|
+
elif grep -q '"mocha"' package.json; then
|
|
79
|
+
TEST_RUNNER="mocha"
|
|
80
|
+
else
|
|
81
|
+
TEST_RUNNER="npm" # Use npm test script
|
|
82
|
+
fi
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# Check for pytest
|
|
86
|
+
if [ -f "pytest.ini" ] || [ -f "setup.py" ] || ls tests/*.py >/dev/null 2>&1; then
|
|
87
|
+
TEST_RUNNER="pytest"
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
# Check for Cargo
|
|
91
|
+
if [ -f "Cargo.toml" ]; then
|
|
92
|
+
TEST_RUNNER="cargo"
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
# Check for Go
|
|
96
|
+
if [ -f "go.mod" ]; then
|
|
97
|
+
TEST_RUNNER="go"
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# Check for Gradle
|
|
101
|
+
if [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
|
|
102
|
+
TEST_RUNNER="gradle"
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
# Check for Maven
|
|
106
|
+
if [ -f "pom.xml" ]; then
|
|
107
|
+
TEST_RUNNER="mvn"
|
|
108
|
+
fi
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 3. Determine Test Command
|
|
112
|
+
|
|
113
|
+
Based on detected runner and target:
|
|
114
|
+
|
|
115
|
+
| Runner | all | module | file | test |
|
|
116
|
+
|--------|-----|--------|------|------|
|
|
117
|
+
| npm | `npm test` | `npm test -- {module}` | `npm test -- {file}` | `npm test -- -t "{name}"` |
|
|
118
|
+
| jest | `jest` | `jest {module}` | `jest {file}` | `jest -t "{name}"` |
|
|
119
|
+
| vitest | `vitest run` | `vitest run {module}` | `vitest run {file}` | `vitest run -t "{name}"` |
|
|
120
|
+
| pytest | `pytest` | `pytest {module}` | `pytest {file}` | `pytest -k "{name}"` |
|
|
121
|
+
| cargo | `cargo test` | `cargo test -p {module}` | N/A | `cargo test {name}` |
|
|
122
|
+
| go | `go test ./...` | `go test ./{module}/...` | `go test {file}` | `go test -run {name}` |
|
|
123
|
+
| gradle | `./gradlew test --offline` | `./gradlew :{module}:test --offline` | N/A | `./gradlew test --tests {name} --offline` |
|
|
124
|
+
| mvn | `mvn test` | `mvn test -pl {module}` | `mvn test -Dtest={ClassName}` | `mvn test -Dtest={ClassName}#{method}` |
|
|
125
|
+
|
|
126
|
+
### 4. Execute Tests with Proper Timeout
|
|
127
|
+
|
|
128
|
+
**IMPORTANT**: Test suites can take several minutes. Use generous timeout:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Timeout based on target:
|
|
132
|
+
# - single test: 1 minute (60000ms)
|
|
133
|
+
# - file: 5 minutes (300000ms)
|
|
134
|
+
# - module: 10 minutes (600000ms)
|
|
135
|
+
# - all: 15 minutes (900000ms)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Execute the command and capture output.
|
|
139
|
+
|
|
140
|
+
### 5. Parse Test Output
|
|
141
|
+
|
|
142
|
+
Analyze output to extract test results. Parser varies by runner:
|
|
143
|
+
|
|
144
|
+
#### Jest/Vitest Output
|
|
145
|
+
```
|
|
146
|
+
Tests: 2 failed, 5 passed, 7 total
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
#### Pytest Output
|
|
150
|
+
```
|
|
151
|
+
====== 5 passed, 2 failed in 1.23s ======
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### Cargo Output
|
|
155
|
+
```
|
|
156
|
+
test result: FAILED. 5 passed; 2 failed; 0 ignored
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
#### Go Output
|
|
160
|
+
```
|
|
161
|
+
FAIL package/name 0.123s
|
|
162
|
+
PASS package/other 0.456s
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
#### Gradle/Maven Output
|
|
166
|
+
```
|
|
167
|
+
Tests run: 7, Failures: 2, Errors: 0, Skipped: 0
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Extract:
|
|
171
|
+
- Total tests
|
|
172
|
+
- Passed
|
|
173
|
+
- Failed
|
|
174
|
+
- Skipped/Ignored
|
|
175
|
+
- Duration
|
|
176
|
+
- Failed test names and error messages with file/line info
|
|
177
|
+
|
|
178
|
+
### 6. Parse Failure Details
|
|
179
|
+
|
|
180
|
+
For each failed test, extract:
|
|
181
|
+
|
|
182
|
+
**Jest/Vitest:**
|
|
183
|
+
```
|
|
184
|
+
● TestSuite › test name
|
|
185
|
+
|
|
186
|
+
expect(received).toBe(expected)
|
|
187
|
+
|
|
188
|
+
at Object.<anonymous> (path/to/file.test.ts:42:5)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Pytest:**
|
|
192
|
+
```
|
|
193
|
+
FAILED path/to/test_file.py::test_name - AssertionError: assert False
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Cargo:**
|
|
197
|
+
```
|
|
198
|
+
---- test_name stdout ----
|
|
199
|
+
thread 'test_name' panicked at 'assertion failed', src/lib.rs:42:5
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Go:**
|
|
203
|
+
```
|
|
204
|
+
--- FAIL: TestName (0.00s)
|
|
205
|
+
file_test.go:42: expected 5, got 3
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### 7. Format Output
|
|
209
|
+
|
|
210
|
+
Provide structured response:
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
TEST STATUS: ✓ PASSED | ✗ FAILED | ⚠ PARTIAL
|
|
214
|
+
DURATION: 1m 23s
|
|
215
|
+
RUNNER: {detected-runner}
|
|
216
|
+
TARGET: {target type}
|
|
217
|
+
MODULE: {module or "all"}
|
|
218
|
+
|
|
219
|
+
SUMMARY:
|
|
220
|
+
- {N} tests total
|
|
221
|
+
- {N} passed
|
|
222
|
+
- {N} failed
|
|
223
|
+
- {N} skipped
|
|
224
|
+
|
|
225
|
+
FAILED TESTS: (if any)
|
|
226
|
+
|
|
227
|
+
1. {TestSuite} › {test name}
|
|
228
|
+
File: path/to/file.test.ext:42
|
|
229
|
+
Error: {error message}
|
|
230
|
+
|
|
231
|
+
2. {Another test}
|
|
232
|
+
File: path/to/another.test.ext:15
|
|
233
|
+
Error: {error message}
|
|
234
|
+
|
|
235
|
+
SUGGESTIONS:
|
|
236
|
+
- Review failed test assertions
|
|
237
|
+
- Check test fixtures and mocks
|
|
238
|
+
- Run specific failed tests individually to debug
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Common Test Scenarios
|
|
242
|
+
|
|
243
|
+
### Run All Tests Before Commit
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
Target: all
|
|
247
|
+
Use: Verify all tests pass before pushing changes
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Test Specific Module After Changes
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
Target: module
|
|
254
|
+
Module: user-service
|
|
255
|
+
Use: Quick verification after modifying specific module
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Debug Single Failing Test
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
Target: test
|
|
262
|
+
Test: UserService › should create user
|
|
263
|
+
Use: Isolate and debug specific test failure
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Test File After Refactoring
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
Target: file
|
|
270
|
+
File: src/services/user.test.ts
|
|
271
|
+
Use: Verify tests in refactored file
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Common Test Issues
|
|
275
|
+
|
|
276
|
+
### Tests Fail with "Module Not Found"
|
|
277
|
+
|
|
278
|
+
**Indicator**: Import/require errors
|
|
279
|
+
|
|
280
|
+
**Suggestions**:
|
|
281
|
+
- Run `npm install` or equivalent
|
|
282
|
+
- Check test file paths
|
|
283
|
+
- Verify module resolution config
|
|
284
|
+
|
|
285
|
+
### Tests Timeout
|
|
286
|
+
|
|
287
|
+
**Indicator**: `Exceeded timeout` messages
|
|
288
|
+
|
|
289
|
+
**Suggestions**:
|
|
290
|
+
- Increase test timeout in config
|
|
291
|
+
- Check for infinite loops or blocking operations
|
|
292
|
+
- Review async code completion
|
|
293
|
+
|
|
294
|
+
### Flaky Tests
|
|
295
|
+
|
|
296
|
+
**Indicator**: Tests pass sometimes, fail other times
|
|
297
|
+
|
|
298
|
+
**Suggestions**:
|
|
299
|
+
- Check for time-dependent code (use mocked time)
|
|
300
|
+
- Review concurrent code and race conditions
|
|
301
|
+
- Ensure tests don't depend on execution order
|
|
302
|
+
|
|
303
|
+
### Environment Issues
|
|
304
|
+
|
|
305
|
+
**Indicator**: Tests fail in CI but pass locally
|
|
306
|
+
|
|
307
|
+
**Suggestions**:
|
|
308
|
+
- Check environment variables
|
|
309
|
+
- Verify test database/services availability
|
|
310
|
+
- Review CI-specific configurations
|
|
311
|
+
|
|
312
|
+
## Error Handling
|
|
313
|
+
|
|
314
|
+
- If test runner cannot be detected, return error with detection attempted
|
|
315
|
+
- If command times out, report timeout with suggestion
|
|
316
|
+
- Always include failed test details with file locations
|
|
317
|
+
- If no tests found, report warning (not error)
|
|
318
|
+
- Include suggestion to check test file patterns
|
|
319
|
+
|
|
320
|
+
## DO NOT
|
|
321
|
+
|
|
322
|
+
- DO NOT modify source or test files
|
|
323
|
+
- DO NOT retry failed tests automatically (user decides)
|
|
324
|
+
- DO NOT run build before tests (use `/build-project` first if needed)
|
|
325
|
+
- DO NOT assume a specific test framework - always detect or use config
|
|
326
|
+
- DO NOT truncate test output too aggressively (users need full error messages)
|
|
327
|
+
|
|
328
|
+
## Examples
|
|
329
|
+
|
|
330
|
+
### Example 1: Auto-detect and run all tests
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
User: /run-tests
|
|
334
|
+
|
|
335
|
+
Skill: [Detects package.json with jest]
|
|
336
|
+
Skill: [Runs: jest]
|
|
337
|
+
Skill: [Reports: 47 tests, 47 passed, 0 failed]
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Example 2: Run module tests
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
User: /run-tests target=module module=user-service
|
|
344
|
+
|
|
345
|
+
Skill: [Detects pytest]
|
|
346
|
+
Skill: [Runs: pytest tests/user-service]
|
|
347
|
+
Skill: [Reports: 12 tests, 10 passed, 2 failed]
|
|
348
|
+
Skill: [Lists failed test details]
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Example 3: Run specific test
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
User: /run-tests target=test test="should validate email format"
|
|
355
|
+
|
|
356
|
+
Skill: [Detects jest]
|
|
357
|
+
Skill: [Runs: jest -t "should validate email format"]
|
|
358
|
+
Skill: [Reports: 1 test, 0 passed, 1 failed]
|
|
359
|
+
Skill: [Shows assertion error with file:line]
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## Related Documentation
|
|
363
|
+
|
|
364
|
+
- [5-Phase Workflow Guide](../../docs/workflow-guide.md)
|
|
365
|
+
- [/build-project skill](../build-project/SKILL.md)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
**Analysis Date:** {YYYY-MM-DD}
|
|
4
|
+
|
|
5
|
+
## Pattern Overview
|
|
6
|
+
|
|
7
|
+
**Overall:** {Pattern name}
|
|
8
|
+
|
|
9
|
+
**Key Characteristics:**
|
|
10
|
+
- {Characteristic 1}
|
|
11
|
+
- {Characteristic 2}
|
|
12
|
+
- {Characteristic 3}
|
|
13
|
+
|
|
14
|
+
## Layers
|
|
15
|
+
|
|
16
|
+
**{Layer Name}:**
|
|
17
|
+
- Purpose: {What this layer does}
|
|
18
|
+
- Location: `{path}`
|
|
19
|
+
- Contains: {Types of code}
|
|
20
|
+
- Depends on: {What it uses}
|
|
21
|
+
- Used by: {What uses it}
|
|
22
|
+
|
|
23
|
+
## Data Flow
|
|
24
|
+
|
|
25
|
+
**{Flow Name}:**
|
|
26
|
+
|
|
27
|
+
1. {Step 1}
|
|
28
|
+
2. {Step 2}
|
|
29
|
+
3. {Step 3}
|
|
30
|
+
|
|
31
|
+
**State Management:**
|
|
32
|
+
- {How state is handled}
|
|
33
|
+
|
|
34
|
+
## Key Abstractions
|
|
35
|
+
|
|
36
|
+
**{Abstraction Name}:**
|
|
37
|
+
- Purpose: {What it represents}
|
|
38
|
+
- Examples: `{file paths}`
|
|
39
|
+
- Pattern: {Pattern used}
|
|
40
|
+
|
|
41
|
+
## Entry Points
|
|
42
|
+
|
|
43
|
+
**{Entry Point}:**
|
|
44
|
+
- Location: `{path}`
|
|
45
|
+
- Triggers: {What invokes it}
|
|
46
|
+
- Responsibilities: {What it does}
|
|
47
|
+
|
|
48
|
+
## Error Handling
|
|
49
|
+
|
|
50
|
+
**Strategy:** {Approach}
|
|
51
|
+
|
|
52
|
+
**Patterns:**
|
|
53
|
+
- {Pattern 1}
|
|
54
|
+
- {Pattern 2}
|
|
55
|
+
|
|
56
|
+
## Cross-Cutting Concerns
|
|
57
|
+
|
|
58
|
+
**Logging:** {Approach}
|
|
59
|
+
**Validation:** {Approach}
|
|
60
|
+
**Authentication:** {Approach}
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
*Architecture analysis: {date}*
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Codebase Concerns
|
|
2
|
+
|
|
3
|
+
**Analysis Date:** {YYYY-MM-DD}
|
|
4
|
+
|
|
5
|
+
## Tech Debt
|
|
6
|
+
|
|
7
|
+
**{Area/Component}:**
|
|
8
|
+
- Issue: {What's the shortcut/workaround}
|
|
9
|
+
- Files: `{file paths}`
|
|
10
|
+
- Impact: {What breaks or degrades}
|
|
11
|
+
- Fix approach: {How to address it}
|
|
12
|
+
|
|
13
|
+
## Known Bugs
|
|
14
|
+
|
|
15
|
+
**{Bug description}:**
|
|
16
|
+
- Symptoms: {What happens}
|
|
17
|
+
- Files: `{file paths}`
|
|
18
|
+
- Trigger: {How to reproduce}
|
|
19
|
+
- Workaround: {If any}
|
|
20
|
+
|
|
21
|
+
## Security Considerations
|
|
22
|
+
|
|
23
|
+
**{Area}:**
|
|
24
|
+
- Risk: {What could go wrong}
|
|
25
|
+
- Files: `{file paths}`
|
|
26
|
+
- Current mitigation: {What's in place}
|
|
27
|
+
- Recommendations: {What should be added}
|
|
28
|
+
|
|
29
|
+
## Performance Bottlenecks
|
|
30
|
+
|
|
31
|
+
**{Slow operation}:**
|
|
32
|
+
- Problem: {What's slow}
|
|
33
|
+
- Files: `{file paths}`
|
|
34
|
+
- Cause: {Why it's slow}
|
|
35
|
+
- Improvement path: {How to speed up}
|
|
36
|
+
|
|
37
|
+
## Fragile Areas
|
|
38
|
+
|
|
39
|
+
**{Component/Module}:**
|
|
40
|
+
- Files: `{file paths}`
|
|
41
|
+
- Why fragile: {What makes it break easily}
|
|
42
|
+
- Safe modification: {How to change safely}
|
|
43
|
+
- Test coverage: {Gaps}
|
|
44
|
+
|
|
45
|
+
## Scaling Limits
|
|
46
|
+
|
|
47
|
+
**{Resource/System}:**
|
|
48
|
+
- Current capacity: {Numbers}
|
|
49
|
+
- Limit: {Where it breaks}
|
|
50
|
+
- Scaling path: {How to increase}
|
|
51
|
+
|
|
52
|
+
## Dependencies at Risk
|
|
53
|
+
|
|
54
|
+
**{Package}:**
|
|
55
|
+
- Risk: {What's wrong}
|
|
56
|
+
- Impact: {What breaks}
|
|
57
|
+
- Migration plan: {Alternative}
|
|
58
|
+
|
|
59
|
+
## Missing Critical Features
|
|
60
|
+
|
|
61
|
+
**{Feature gap}:**
|
|
62
|
+
- Problem: {What's missing}
|
|
63
|
+
- Blocks: {What can't be done}
|
|
64
|
+
|
|
65
|
+
## Test Coverage Gaps
|
|
66
|
+
|
|
67
|
+
**{Untested area}:**
|
|
68
|
+
- What's not tested: {Specific functionality}
|
|
69
|
+
- Files: `{file paths}`
|
|
70
|
+
- Risk: {What could break unnoticed}
|
|
71
|
+
- Priority: {High/Medium/Low}
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
*Concerns audit: {date}*
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Coding Conventions
|
|
2
|
+
|
|
3
|
+
**Analysis Date:** {YYYY-MM-DD}
|
|
4
|
+
|
|
5
|
+
## Naming Patterns
|
|
6
|
+
|
|
7
|
+
**Files:**
|
|
8
|
+
- {Pattern observed}
|
|
9
|
+
|
|
10
|
+
**Functions:**
|
|
11
|
+
- {Pattern observed}
|
|
12
|
+
|
|
13
|
+
**Variables:**
|
|
14
|
+
- {Pattern observed}
|
|
15
|
+
|
|
16
|
+
**Types:**
|
|
17
|
+
- {Pattern observed}
|
|
18
|
+
|
|
19
|
+
## Code Style
|
|
20
|
+
|
|
21
|
+
**Formatting:**
|
|
22
|
+
- {Tool used}
|
|
23
|
+
- {Key settings}
|
|
24
|
+
|
|
25
|
+
**Linting:**
|
|
26
|
+
- {Tool used}
|
|
27
|
+
- {Key rules}
|
|
28
|
+
|
|
29
|
+
## Import Organization
|
|
30
|
+
|
|
31
|
+
**Order:**
|
|
32
|
+
1. {First group}
|
|
33
|
+
2. {Second group}
|
|
34
|
+
3. {Third group}
|
|
35
|
+
|
|
36
|
+
**Path Aliases:**
|
|
37
|
+
- {Aliases used}
|
|
38
|
+
|
|
39
|
+
## Error Handling
|
|
40
|
+
|
|
41
|
+
**Patterns:**
|
|
42
|
+
- {How errors are handled}
|
|
43
|
+
|
|
44
|
+
## Logging
|
|
45
|
+
|
|
46
|
+
**Framework:** {Tool or "console"}
|
|
47
|
+
|
|
48
|
+
**Patterns:**
|
|
49
|
+
- {When/how to log}
|
|
50
|
+
|
|
51
|
+
## Comments
|
|
52
|
+
|
|
53
|
+
**When to Comment:**
|
|
54
|
+
- {Guidelines observed}
|
|
55
|
+
|
|
56
|
+
**JSDoc/TSDoc:**
|
|
57
|
+
- {Usage pattern}
|
|
58
|
+
|
|
59
|
+
## Function Design
|
|
60
|
+
|
|
61
|
+
**Size:** {Guidelines}
|
|
62
|
+
|
|
63
|
+
**Parameters:** {Pattern}
|
|
64
|
+
|
|
65
|
+
**Return Values:** {Pattern}
|
|
66
|
+
|
|
67
|
+
## Module Design
|
|
68
|
+
|
|
69
|
+
**Exports:** {Pattern}
|
|
70
|
+
|
|
71
|
+
**Barrel Files:** {Usage}
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
*Convention analysis: {date}*
|