5-phase-workflow 1.4.3 → 1.5.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 +18 -10
- package/bin/install.js +177 -218
- package/docs/workflow-guide.md +4 -4
- package/package.json +1 -1
- package/src/commands/5/configure.md +124 -328
- package/src/commands/5/discuss-feature.md +7 -172
- package/src/commands/5/implement-feature.md +40 -152
- package/src/commands/5/plan-feature.md +15 -8
- package/src/commands/5/plan-implementation.md +14 -10
- package/src/commands/5/quick-implement.md +41 -142
- package/src/commands/5/review-code.md +4 -14
- package/src/commands/5/unlock.md +23 -0
- package/src/commands/5/update.md +41 -4
- package/src/commands/5/verify-implementation.md +34 -201
- package/src/hooks/check-updates.js +4 -3
- package/src/hooks/config-guard.js +30 -0
- package/src/hooks/plan-guard.js +79 -32
- package/src/hooks/statusline.js +4 -3
- package/src/settings.json +11 -1
- package/src/skills/build-project/SKILL.md +6 -132
- package/src/skills/configure-project/SKILL.md +26 -215
- package/src/skills/run-tests/SKILL.md +7 -210
- package/src/templates/workflow/QUICK-PLAN.md +0 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-project
|
|
3
|
-
description:
|
|
3
|
+
description: Analyzes codebase for CLAUDE.md and generates project-specific skills. Used during /5:implement-feature CONFIGURE.
|
|
4
4
|
allowed-tools: Read, Write, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
6
6
|
context: fork
|
|
@@ -13,76 +13,20 @@ user-invocable: false
|
|
|
13
13
|
|
|
14
14
|
This skill does the heavy lifting during Phase 3 (implement-feature) for the CONFIGURE feature. It is called by step-executor to create the actual configuration files.
|
|
15
15
|
|
|
16
|
-
It handles
|
|
16
|
+
It handles two distinct tasks, invoked with different parameters per component:
|
|
17
17
|
|
|
18
|
-
- **A.
|
|
19
|
-
- **B.
|
|
20
|
-
- **C. Generate Project-Specific Skills** - Creates SKILL.md files for common project patterns
|
|
18
|
+
- **A. Analyze Codebase and Create/Update CLAUDE.md** - Maps codebase and documents conventions
|
|
19
|
+
- **B. Generate Project-Specific Skills** - Creates SKILL.md files for common project patterns
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## A. Write config.json
|
|
25
|
-
|
|
26
|
-
**Receives:** project type, ticket config, branch config, build/test commands, tool availability
|
|
27
|
-
|
|
28
|
-
**Creates:** `.claude/.5/config.json`
|
|
29
|
-
|
|
30
|
-
**Schema (no `steps` array):**
|
|
31
|
-
|
|
32
|
-
```json
|
|
33
|
-
{
|
|
34
|
-
"projectType": "{type}",
|
|
35
|
-
"ticket": {
|
|
36
|
-
"pattern": "{regex-pattern-or-null}",
|
|
37
|
-
"extractFromBranch": true
|
|
38
|
-
},
|
|
39
|
-
"branch": {
|
|
40
|
-
"convention": "{convention}"
|
|
41
|
-
},
|
|
42
|
-
"build": {
|
|
43
|
-
"command": "{build-command}",
|
|
44
|
-
"testCommand": "{test-command}",
|
|
45
|
-
"timeout": {
|
|
46
|
-
"compile": 120000,
|
|
47
|
-
"test": 300000
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"tools": {
|
|
51
|
-
"coderabbit": {
|
|
52
|
-
"available": false,
|
|
53
|
-
"authenticated": false
|
|
54
|
-
},
|
|
55
|
-
"ide": {
|
|
56
|
-
"available": false,
|
|
57
|
-
"type": null
|
|
58
|
-
},
|
|
59
|
-
"context7": {
|
|
60
|
-
"available": false
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"reviewTool": "claude" or "coderabbit" or "none",
|
|
64
|
-
"git": {
|
|
65
|
-
"autoCommit": false,
|
|
66
|
-
"commitMessage": {
|
|
67
|
-
"pattern": "{ticket-id} {short-description}"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**Process:**
|
|
74
|
-
1. Read all values from the feature spec (`.5/features/CONFIGURE/feature.md`), including `git.autoCommit` and `git.commitMessage.pattern`
|
|
75
|
-
2. Ensure `.claude/.5/` directory exists (create with `mkdir -p` if needed)
|
|
76
|
-
3. Write `config.json` with pretty-printed JSON
|
|
77
|
-
4. Read back to verify correctness
|
|
21
|
+
Note: config.json is written directly by `/5:configure` during the Q&A phase.
|
|
78
22
|
|
|
79
23
|
---
|
|
80
24
|
|
|
81
|
-
##
|
|
25
|
+
## A. Analyze Codebase and Create/Update CLAUDE.md
|
|
82
26
|
|
|
83
27
|
**Process:**
|
|
84
28
|
|
|
85
|
-
###
|
|
29
|
+
### A1. Unified Codebase Analysis
|
|
86
30
|
|
|
87
31
|
Perform comprehensive analysis once to gather data for ALL templates:
|
|
88
32
|
|
|
@@ -140,7 +84,7 @@ Perform comprehensive analysis once to gather data for ALL templates:
|
|
|
140
84
|
- Identify deprecated dependencies (check for warnings in package manifests)
|
|
141
85
|
- Look for complex code sections (deeply nested conditionals, long functions)
|
|
142
86
|
|
|
143
|
-
###
|
|
87
|
+
### A2. Fill Templates
|
|
144
88
|
|
|
145
89
|
For each template in `src/templates/`:
|
|
146
90
|
|
|
@@ -177,7 +121,7 @@ INTEGRATIONS.md:
|
|
|
177
121
|
CONCERNS.md:
|
|
178
122
|
- `{file paths}` → Actual file paths from grep results
|
|
179
123
|
|
|
180
|
-
###
|
|
124
|
+
### A3. Write Documentation Files
|
|
181
125
|
|
|
182
126
|
Write filled templates to `.5/` folder:
|
|
183
127
|
|
|
@@ -191,63 +135,18 @@ Write filled templates to `.5/` folder:
|
|
|
191
135
|
- `.5/INTEGRATIONS.md`
|
|
192
136
|
- `.5/CONCERNS.md`
|
|
193
137
|
|
|
194
|
-
###
|
|
138
|
+
### A4. Create Master CLAUDE.md
|
|
195
139
|
|
|
196
140
|
Generate CLAUDE.md as a navigation hub:
|
|
197
141
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
## Quick Reference
|
|
205
|
-
|
|
206
|
-
- [Technology Stack](./.5/STACK.md) - Languages, frameworks, dependencies
|
|
207
|
-
- [Codebase Structure](./.5/STRUCTURE.md) - Directory layout and organization
|
|
208
|
-
- [Architecture](./.5/ARCHITECTURE.md) - Patterns, layers, and data flow
|
|
209
|
-
- [Coding Conventions](./.5/CONVENTIONS.md) - Naming, style, and patterns
|
|
210
|
-
- [Testing Patterns](./.5/TESTING.md) - Test framework and patterns
|
|
211
|
-
- [External Integrations](./.5/INTEGRATIONS.md) - APIs, databases, services
|
|
212
|
-
- [Codebase Concerns](./.5/CONCERNS.md) - Tech debt, bugs, and risks
|
|
213
|
-
|
|
214
|
-
## Project Overview
|
|
215
|
-
|
|
216
|
-
{1-2 paragraph summary from README or package.json description}
|
|
217
|
-
|
|
218
|
-
## Build & Run Commands
|
|
219
|
-
|
|
220
|
-
- Build: `{build-command}`
|
|
221
|
-
- Test: `{test-command}`
|
|
222
|
-
- {Other detected scripts}
|
|
223
|
-
|
|
224
|
-
## Coding Guidelines
|
|
225
|
-
|
|
226
|
-
When working with this codebase, follow these principles:
|
|
227
|
-
|
|
228
|
-
1. Types should be clear and types should be available when possible
|
|
229
|
-
2. Use doc (jsdoc, javadoc, pydoc, etc) concisely. No doc is better than meaningless doc
|
|
230
|
-
3. Keep files short and structured
|
|
231
|
-
4. Extract methods, classes
|
|
232
|
-
5. Respect SRP and DRY
|
|
233
|
-
6. Make code maintainable and modular
|
|
234
|
-
|
|
235
|
-
## Getting Started
|
|
236
|
-
|
|
237
|
-
**For new developers:**
|
|
238
|
-
1. Review [Stack](./.5/STACK.md) for technology overview
|
|
239
|
-
2. Read [Structure](./.5/STRUCTURE.md) to understand organization
|
|
240
|
-
3. Study [Conventions](./.5/CONVENTIONS.md) for coding standards
|
|
241
|
-
4. Check [Architecture](./.5/ARCHITECTURE.md) for design patterns
|
|
242
|
-
|
|
243
|
-
**For specific tasks:**
|
|
244
|
-
- Adding features → See [Architecture](./.5/ARCHITECTURE.md)
|
|
245
|
-
- Writing tests → See [Testing](./.5/TESTING.md)
|
|
246
|
-
- Integration work → See [Integrations](./.5/INTEGRATIONS.md)
|
|
247
|
-
- Reviewing concerns → See [Concerns](./.5/CONCERNS.md)
|
|
248
|
-
```
|
|
142
|
+
CLAUDE.md structure:
|
|
143
|
+
- **Quick Reference:** Links to all 7 `.5/*.md` files (STACK, STRUCTURE, ARCHITECTURE, CONVENTIONS, TESTING, INTEGRATIONS, CONCERNS)
|
|
144
|
+
- **Project Overview:** 1-2 paragraphs from README/package.json
|
|
145
|
+
- **Build & Run Commands:** Build, test, and other detected commands
|
|
146
|
+
- **Coding Guidelines:** The 6 mandatory principles (types, concise docs, short files, extract methods, SRP/DRY, maintainable/modular)
|
|
147
|
+
- **Getting Started:** Links to relevant `.5/` files for new devs and specific tasks
|
|
249
148
|
|
|
250
|
-
###
|
|
149
|
+
### A5. Preserve Existing Content
|
|
251
150
|
|
|
252
151
|
If CLAUDE.md already exists:
|
|
253
152
|
- Read current content
|
|
@@ -257,7 +156,7 @@ If CLAUDE.md already exists:
|
|
|
257
156
|
|
|
258
157
|
---
|
|
259
158
|
|
|
260
|
-
##
|
|
159
|
+
## B. Generate Project-Specific Skills
|
|
261
160
|
|
|
262
161
|
**Reads:** Pattern selections from feature spec (`.5/CONFIGURE/feature.md`)
|
|
263
162
|
|
|
@@ -324,85 +223,11 @@ Based on {example-file}, new {patterns} should follow:
|
|
|
324
223
|
|
|
325
224
|
### Pattern to Skill Name Mapping
|
|
326
225
|
|
|
327
|
-
|
|
328
|
-
|------------------|------------|
|
|
329
|
-
| **Core Architecture** | |
|
|
330
|
-
| controller | create-controller |
|
|
331
|
-
| service | create-service |
|
|
332
|
-
| repository | create-repository |
|
|
333
|
-
| model/entity | create-model |
|
|
334
|
-
| handler | create-handler |
|
|
335
|
-
| **Data Transfer** | |
|
|
336
|
-
| dto | create-dto |
|
|
337
|
-
| request | create-request |
|
|
338
|
-
| response | create-response |
|
|
339
|
-
| mapper | create-mapper |
|
|
340
|
-
| validator | create-validator |
|
|
341
|
-
| schema | create-schema |
|
|
342
|
-
| **Frontend** | |
|
|
343
|
-
| component | create-component |
|
|
344
|
-
| hook | create-hook |
|
|
345
|
-
| context | create-context |
|
|
346
|
-
| store | create-store |
|
|
347
|
-
| page | create-page |
|
|
348
|
-
| layout | create-layout |
|
|
349
|
-
| **API/Routes** | |
|
|
350
|
-
| api-route | create-api-route |
|
|
351
|
-
| middleware | create-middleware |
|
|
352
|
-
| guard | create-guard |
|
|
353
|
-
| interceptor | create-interceptor |
|
|
354
|
-
| filter | create-filter |
|
|
355
|
-
| **Testing** | |
|
|
356
|
-
| test | create-test |
|
|
357
|
-
| spec | create-spec |
|
|
358
|
-
| fixture | create-fixture |
|
|
359
|
-
| factory | create-factory |
|
|
360
|
-
| mock | create-mock |
|
|
361
|
-
| **Utilities** | |
|
|
362
|
-
| util | create-util |
|
|
363
|
-
| helper | create-helper |
|
|
364
|
-
| constant | create-constant |
|
|
365
|
-
| type | create-type |
|
|
366
|
-
| config | create-config |
|
|
367
|
-
| **Framework-Specific** | |
|
|
368
|
-
| module | create-module |
|
|
369
|
-
| pipe | create-pipe |
|
|
370
|
-
| decorator | create-decorator |
|
|
371
|
-
| blueprint | create-blueprint |
|
|
372
|
-
| view | create-view |
|
|
373
|
-
| serializer | create-serializer |
|
|
374
|
-
| **Background/Async** | |
|
|
375
|
-
| job | create-job |
|
|
376
|
-
| worker | create-worker |
|
|
377
|
-
| event | create-event |
|
|
378
|
-
| listener | create-listener |
|
|
379
|
-
| command | create-command |
|
|
380
|
-
| **Database** | |
|
|
381
|
-
| migration | create-migration |
|
|
382
|
-
| seed | create-seed |
|
|
383
|
-
| **Error Handling** | |
|
|
384
|
-
| exception | create-exception |
|
|
385
|
-
| error | create-error |
|
|
386
|
-
|
|
387
|
-
### Why `user-invocable: true`
|
|
388
|
-
|
|
389
|
-
Generated skills are user-invocable so users can invoke them directly:
|
|
390
|
-
- `/create-controller UserController`
|
|
391
|
-
- `/create-component Button`
|
|
392
|
-
- `/create-service AuthService`
|
|
393
|
-
|
|
394
|
-
This is more useful than internal-only skills.
|
|
395
|
-
|
|
396
|
-
### Why `model: haiku`
|
|
397
|
-
|
|
398
|
-
Pattern-following is simple once conventions are documented:
|
|
399
|
-
- Faster and cheaper than sonnet
|
|
400
|
-
- Deep analysis already happened during generation
|
|
401
|
-
- The skill just needs to follow the documented template
|
|
226
|
+
**Rule:** Skill name is `create-{pattern}` (e.g., `controller` → `create-controller`, `component` → `create-component`, `dto` → `create-dto`). For compound patterns, use the short form: `model/entity` → `create-model`, `api-route` → `create-api-route`.
|
|
402
227
|
|
|
403
228
|
---
|
|
404
229
|
|
|
405
|
-
##
|
|
230
|
+
## B2. Generate Command Skills (run-*)
|
|
406
231
|
|
|
407
232
|
**Reads:** Command selections from feature spec (`.5/CONFIGURE/feature.md`)
|
|
408
233
|
|
|
@@ -469,20 +294,7 @@ Executes the project's {command} command.
|
|
|
469
294
|
|
|
470
295
|
### Command to Skill Name Mapping
|
|
471
296
|
|
|
472
|
-
|
|
473
|
-
|------------------|------------|
|
|
474
|
-
| build | run-build |
|
|
475
|
-
| test, spec | run-tests |
|
|
476
|
-
| lint, eslint | run-lint |
|
|
477
|
-
| format, prettier | run-format |
|
|
478
|
-
| typecheck, tsc | run-typecheck |
|
|
479
|
-
| dev, start | run-dev |
|
|
480
|
-
| db:migrate, migrate | run-migrate |
|
|
481
|
-
| db:seed, seed | run-seed |
|
|
482
|
-
| docker:build | run-docker-build |
|
|
483
|
-
| docker:up, compose up | run-docker-up |
|
|
484
|
-
| clean | run-clean |
|
|
485
|
-
| generate, codegen | run-generate |
|
|
297
|
+
**Rule:** Skill name is `run-{category}` (e.g., `build` → `run-build`, `test`/`spec` → `run-tests`, `lint` → `run-lint`). Group variants under the primary category name.
|
|
486
298
|
|
|
487
299
|
---
|
|
488
300
|
|
|
@@ -491,8 +303,7 @@ Executes the project's {command} command.
|
|
|
491
303
|
Returns structured results for each component:
|
|
492
304
|
|
|
493
305
|
```
|
|
494
|
-
Component A (
|
|
495
|
-
Component B (Documentation): SUCCESS - Created 7 documentation files + index
|
|
306
|
+
Component A (Documentation): SUCCESS - Created 7 documentation files + index
|
|
496
307
|
- .5/ARCHITECTURE.md (Pattern: Layered, 4 layers identified)
|
|
497
308
|
- .5/STACK.md (TypeScript + Express, 23 dependencies)
|
|
498
309
|
- .5/STRUCTURE.md (8 top-level directories mapped)
|
|
@@ -501,15 +312,15 @@ Component B (Documentation): SUCCESS - Created 7 documentation files + index
|
|
|
501
312
|
- .5/INTEGRATIONS.md (PostgreSQL, 2 APIs, GitHub Actions)
|
|
502
313
|
- .5/CONCERNS.md (3 TODO items, 1 deprecated dependency)
|
|
503
314
|
- CLAUDE.md (index with references)
|
|
504
|
-
Component
|
|
505
|
-
Component
|
|
315
|
+
Component B (Pattern Skills): SUCCESS - Generated 3 create-* skills (create-component, create-hook, create-context)
|
|
316
|
+
Component C (Command Skills): SUCCESS - Generated 2 run-* skills (run-tests, run-lint)
|
|
506
317
|
```
|
|
507
318
|
|
|
508
319
|
Or on failure:
|
|
509
320
|
|
|
510
321
|
```
|
|
511
|
-
Component A (
|
|
512
|
-
Component B (
|
|
322
|
+
Component A (Documentation): FAILED - Unable to read template files
|
|
323
|
+
Component B (Pattern Skills): FAILED - No patterns found in codebase
|
|
513
324
|
```
|
|
514
325
|
|
|
515
326
|
## DO NOT
|
|
@@ -17,7 +17,7 @@ This skill executes test tasks with auto-detection of the test runner and suffic
|
|
|
17
17
|
|
|
18
18
|
The skill automatically detects the test runner using:
|
|
19
19
|
|
|
20
|
-
1. **Config file** (`.
|
|
20
|
+
1. **Config file** (`.5/config.json`) - if `build.testCommand` is specified
|
|
21
21
|
2. **Auto-detection** - by examining project files and package.json scripts:
|
|
22
22
|
- `package.json` with jest/vitest/mocha → npm test
|
|
23
23
|
- `pytest.ini` or test files → pytest
|
|
@@ -49,7 +49,7 @@ When invoked, the skill expects:
|
|
|
49
49
|
|
|
50
50
|
### 1. Load Configuration
|
|
51
51
|
|
|
52
|
-
Read `.
|
|
52
|
+
Read `.5/config.json` if it exists:
|
|
53
53
|
|
|
54
54
|
```json
|
|
55
55
|
{
|
|
@@ -65,48 +65,7 @@ If commands are specified, use them with variable substitution. Otherwise, auto-
|
|
|
65
65
|
|
|
66
66
|
### 2. Detect Test Runner
|
|
67
67
|
|
|
68
|
-
If no config,
|
|
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
|
-
```
|
|
68
|
+
If no config, detect by checking project files: `package.json` (jest/vitest/mocha), `pytest.ini`/test files (pytest), `Cargo.toml` (cargo), `go.mod` (go), `build.gradle` (gradle), `pom.xml` (mvn).
|
|
110
69
|
|
|
111
70
|
### 3. Determine Test Command
|
|
112
71
|
|
|
@@ -139,73 +98,9 @@ Execute the command and capture output.
|
|
|
139
98
|
|
|
140
99
|
### 5. Parse Test Output
|
|
141
100
|
|
|
142
|
-
|
|
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
|
|
101
|
+
Parse runner-specific output to extract: total tests, passed, failed, skipped, duration, and failed test names with error messages and file/line info.
|
|
179
102
|
|
|
180
|
-
|
|
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
|
|
103
|
+
### 6. Format Output
|
|
209
104
|
|
|
210
105
|
Provide structured response:
|
|
211
106
|
|
|
@@ -238,77 +133,6 @@ SUGGESTIONS:
|
|
|
238
133
|
- Run specific failed tests individually to debug
|
|
239
134
|
```
|
|
240
135
|
|
|
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
136
|
## Error Handling
|
|
313
137
|
|
|
314
138
|
- If test runner cannot be detected, return error with detection attempted
|
|
@@ -325,38 +149,11 @@ Use: Verify tests in refactored file
|
|
|
325
149
|
- DO NOT assume a specific test framework - always detect or use config
|
|
326
150
|
- DO NOT truncate test output too aggressively (users need full error messages)
|
|
327
151
|
|
|
328
|
-
##
|
|
329
|
-
|
|
330
|
-
### Example 1: Auto-detect and run all tests
|
|
152
|
+
## Example
|
|
331
153
|
|
|
332
154
|
```
|
|
333
155
|
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]
|
|
156
|
+
Skill: [Detects jest] → [Runs: jest] → [Reports: 47 passed, 0 failed]
|
|
360
157
|
```
|
|
361
158
|
|
|
362
159
|
## Related Documentation
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Quick Implementation: {TICKET-ID}
|
|
2
|
-
|
|
3
|
-
## Task
|
|
4
|
-
{DESCRIPTION}
|
|
5
|
-
|
|
6
|
-
## Components
|
|
7
|
-
|
|
8
|
-
| # | Type | Name | Skill | Module |
|
|
9
|
-
|---|------|------|-------|--------|
|
|
10
|
-
| 1 | {type} | {name} | {skill} | {module} |
|
|
11
|
-
|
|
12
|
-
## Affected Modules
|
|
13
|
-
- {module-1}
|
|
14
|
-
- {module-2}
|
|
15
|
-
|
|
16
|
-
## Execution
|
|
17
|
-
{parallel | sequential | direct}
|