5-phase-workflow 1.8.5 → 1.8.7
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 +17 -0
- package/bin/install.js +6 -7
- package/docs/workflow-guide.md +1 -1
- package/package.json +1 -1
- package/src/commands/5/address-review-findings.md +2 -2
- package/src/commands/5/configure.md +22 -24
- package/src/commands/5/eject.md +91 -0
- package/src/commands/5/plan-feature.md +24 -22
- package/src/commands/5/reconfigure.md +11 -9
- package/src/hooks/plan-guard.js +41 -2
- package/src/hooks/statusline.js +80 -41
- package/src/skills/configure-project/SKILL.md +34 -85
- package/src/skills/generate-readme/SKILL.md +1 -2
- package/src/templates/ARCHITECTURE.md +16 -47
- package/src/templates/CONCERNS.md +12 -54
- package/src/templates/TESTING.md +12 -95
- package/src/skills/build-project/SKILL.md +0 -151
- package/src/skills/run-tests/SKILL.md +0 -162
- package/src/templates/CONVENTIONS.md +0 -75
- package/src/templates/INTEGRATIONS.md +0 -65
- package/src/templates/STACK.md +0 -60
- package/src/templates/STRUCTURE.md +0 -60
|
@@ -1,162 +0,0 @@
|
|
|
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** (`.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 `.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, 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).
|
|
69
|
-
|
|
70
|
-
### 3. Determine Test Command
|
|
71
|
-
|
|
72
|
-
Based on detected runner and target:
|
|
73
|
-
|
|
74
|
-
| Runner | all | module | file | test |
|
|
75
|
-
|--------|-----|--------|------|------|
|
|
76
|
-
| npm | `npm test` | `npm test -- {module}` | `npm test -- {file}` | `npm test -- -t "{name}"` |
|
|
77
|
-
| jest | `jest` | `jest {module}` | `jest {file}` | `jest -t "{name}"` |
|
|
78
|
-
| vitest | `vitest run` | `vitest run {module}` | `vitest run {file}` | `vitest run -t "{name}"` |
|
|
79
|
-
| pytest | `pytest` | `pytest {module}` | `pytest {file}` | `pytest -k "{name}"` |
|
|
80
|
-
| cargo | `cargo test` | `cargo test -p {module}` | N/A | `cargo test {name}` |
|
|
81
|
-
| go | `go test ./...` | `go test ./{module}/...` | `go test {file}` | `go test -run {name}` |
|
|
82
|
-
| gradle | `./gradlew test --offline` | `./gradlew :{module}:test --offline` | N/A | `./gradlew test --tests {name} --offline` |
|
|
83
|
-
| mvn | `mvn test` | `mvn test -pl {module}` | `mvn test -Dtest={ClassName}` | `mvn test -Dtest={ClassName}#{method}` |
|
|
84
|
-
|
|
85
|
-
### 4. Execute Tests with Proper Timeout
|
|
86
|
-
|
|
87
|
-
**IMPORTANT**: Test suites can take several minutes. Use generous timeout:
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
# Timeout based on target:
|
|
91
|
-
# - single test: 1 minute (60000ms)
|
|
92
|
-
# - file: 5 minutes (300000ms)
|
|
93
|
-
# - module: 10 minutes (600000ms)
|
|
94
|
-
# - all: 15 minutes (900000ms)
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Execute the command and capture output.
|
|
98
|
-
|
|
99
|
-
### 5. Parse Test Output
|
|
100
|
-
|
|
101
|
-
Parse runner-specific output to extract: total tests, passed, failed, skipped, duration, and failed test names with error messages and file/line info.
|
|
102
|
-
|
|
103
|
-
### 6. Format Output
|
|
104
|
-
|
|
105
|
-
Provide structured response:
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
TEST STATUS: ✓ PASSED | ✗ FAILED | ⚠ PARTIAL
|
|
109
|
-
DURATION: 1m 23s
|
|
110
|
-
RUNNER: {detected-runner}
|
|
111
|
-
TARGET: {target type}
|
|
112
|
-
MODULE: {module or "all"}
|
|
113
|
-
|
|
114
|
-
SUMMARY:
|
|
115
|
-
- {N} tests total
|
|
116
|
-
- {N} passed
|
|
117
|
-
- {N} failed
|
|
118
|
-
- {N} skipped
|
|
119
|
-
|
|
120
|
-
FAILED TESTS: (if any)
|
|
121
|
-
|
|
122
|
-
1. {TestSuite} › {test name}
|
|
123
|
-
File: path/to/file.test.ext:42
|
|
124
|
-
Error: {error message}
|
|
125
|
-
|
|
126
|
-
2. {Another test}
|
|
127
|
-
File: path/to/another.test.ext:15
|
|
128
|
-
Error: {error message}
|
|
129
|
-
|
|
130
|
-
SUGGESTIONS:
|
|
131
|
-
- Review failed test assertions
|
|
132
|
-
- Check test fixtures and mocks
|
|
133
|
-
- Run specific failed tests individually to debug
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Error Handling
|
|
137
|
-
|
|
138
|
-
- If test runner cannot be detected, return error with detection attempted
|
|
139
|
-
- If command times out, report timeout with suggestion
|
|
140
|
-
- Always include failed test details with file locations
|
|
141
|
-
- If no tests found, report warning (not error)
|
|
142
|
-
- Include suggestion to check test file patterns
|
|
143
|
-
|
|
144
|
-
## DO NOT
|
|
145
|
-
|
|
146
|
-
- DO NOT modify source or test files
|
|
147
|
-
- DO NOT retry failed tests automatically (user decides)
|
|
148
|
-
- DO NOT run build before tests (use `/build-project` first if needed)
|
|
149
|
-
- DO NOT assume a specific test framework - always detect or use config
|
|
150
|
-
- DO NOT truncate test output too aggressively (users need full error messages)
|
|
151
|
-
|
|
152
|
-
## Example
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
User: /run-tests
|
|
156
|
-
Skill: [Detects jest] → [Runs: jest] → [Reports: 47 passed, 0 failed]
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Related Documentation
|
|
160
|
-
|
|
161
|
-
- [5-Phase Workflow Guide](../../docs/workflow-guide.md)
|
|
162
|
-
- [/build-project skill](../build-project/SKILL.md)
|
|
@@ -1,75 +0,0 @@
|
|
|
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}*
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# External Integrations
|
|
2
|
-
|
|
3
|
-
**Analysis Date:** {YYYY-MM-DD}
|
|
4
|
-
|
|
5
|
-
## APIs & External Services
|
|
6
|
-
|
|
7
|
-
**{Category}:**
|
|
8
|
-
- {Service} - {What it's used for}
|
|
9
|
-
- SDK/Client: {package}
|
|
10
|
-
- Auth: {env var name}
|
|
11
|
-
|
|
12
|
-
## Data Storage
|
|
13
|
-
|
|
14
|
-
**Databases:**
|
|
15
|
-
- {Type/Provider}
|
|
16
|
-
- Connection: {env var}
|
|
17
|
-
- Client: {ORM/client}
|
|
18
|
-
|
|
19
|
-
**File Storage:**
|
|
20
|
-
- {Service or "Local filesystem only"}
|
|
21
|
-
|
|
22
|
-
**Caching:**
|
|
23
|
-
- {Service or "None"}
|
|
24
|
-
|
|
25
|
-
## Authentication & Identity
|
|
26
|
-
|
|
27
|
-
**Auth Provider:**
|
|
28
|
-
- {Service or "Custom"}
|
|
29
|
-
- Implementation: {approach}
|
|
30
|
-
|
|
31
|
-
## Monitoring & Observability
|
|
32
|
-
|
|
33
|
-
**Error Tracking:**
|
|
34
|
-
- {Service or "None"}
|
|
35
|
-
|
|
36
|
-
**Logs:**
|
|
37
|
-
- {Approach}
|
|
38
|
-
|
|
39
|
-
## CI/CD & Deployment
|
|
40
|
-
|
|
41
|
-
**Hosting:**
|
|
42
|
-
- {Platform}
|
|
43
|
-
|
|
44
|
-
**CI Pipeline:**
|
|
45
|
-
- {Service or "None"}
|
|
46
|
-
|
|
47
|
-
## Environment Configuration
|
|
48
|
-
|
|
49
|
-
**Required env vars:**
|
|
50
|
-
- {List critical vars}
|
|
51
|
-
|
|
52
|
-
**Secrets location:**
|
|
53
|
-
- {Where secrets are stored}
|
|
54
|
-
|
|
55
|
-
## Webhooks & Callbacks
|
|
56
|
-
|
|
57
|
-
**Incoming:**
|
|
58
|
-
- {Endpoints or "None"}
|
|
59
|
-
|
|
60
|
-
**Outgoing:**
|
|
61
|
-
- {Endpoints or "None"}
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
*Integration audit: {date}*
|
package/src/templates/STACK.md
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Technology Stack
|
|
2
|
-
|
|
3
|
-
**Analysis Date:** {YYYY-MM-DD}
|
|
4
|
-
|
|
5
|
-
## Languages
|
|
6
|
-
|
|
7
|
-
**Primary:**
|
|
8
|
-
- {Language} {Version} - {Where used}
|
|
9
|
-
|
|
10
|
-
**Secondary:**
|
|
11
|
-
- {Language} {Version} - {Where used}
|
|
12
|
-
|
|
13
|
-
## Runtime
|
|
14
|
-
|
|
15
|
-
**Environment:**
|
|
16
|
-
- {Runtime} {Version}
|
|
17
|
-
|
|
18
|
-
**Package Manager:**
|
|
19
|
-
- {Manager} {Version}
|
|
20
|
-
- Lockfile: {present/missing}
|
|
21
|
-
|
|
22
|
-
## Frameworks
|
|
23
|
-
|
|
24
|
-
**Core:**
|
|
25
|
-
- {Framework} {Version} - {Purpose}
|
|
26
|
-
|
|
27
|
-
**Testing:**
|
|
28
|
-
- {Framework} {Version} - {Purpose}
|
|
29
|
-
|
|
30
|
-
**Build/Dev:**
|
|
31
|
-
- {Tool} {Version} - {Purpose}
|
|
32
|
-
|
|
33
|
-
## Key Dependencies
|
|
34
|
-
|
|
35
|
-
**Critical:**
|
|
36
|
-
- {Package} {Version} - {Why it matters}
|
|
37
|
-
|
|
38
|
-
**Infrastructure:**
|
|
39
|
-
- {Package} {Version} - {Purpose}
|
|
40
|
-
|
|
41
|
-
## Configuration
|
|
42
|
-
|
|
43
|
-
**Environment:**
|
|
44
|
-
- {How configured}
|
|
45
|
-
- {Key configs required}
|
|
46
|
-
|
|
47
|
-
**Build:**
|
|
48
|
-
- {Build config files}
|
|
49
|
-
|
|
50
|
-
## Platform Requirements
|
|
51
|
-
|
|
52
|
-
**Development:**
|
|
53
|
-
- {Requirements}
|
|
54
|
-
|
|
55
|
-
**Production:**
|
|
56
|
-
- {Deployment target}
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
*Stack analysis: {date}*
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Codebase Structure
|
|
2
|
-
|
|
3
|
-
**Analysis Date:** {YYYY-MM-DD}
|
|
4
|
-
|
|
5
|
-
## Directory Layout
|
|
6
|
-
|
|
7
|
-
{project-root} {dir} # {Purpose} / {dir} # {Purpose} / {file} # {Purpose}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Directory Purposes
|
|
11
|
-
|
|
12
|
-
**{Directory Name}:**
|
|
13
|
-
- Purpose: {What lives here}
|
|
14
|
-
- Contains: {Types of files}
|
|
15
|
-
- Key files: `{important files}`
|
|
16
|
-
|
|
17
|
-
## Key File Locations
|
|
18
|
-
|
|
19
|
-
**Entry Points:**
|
|
20
|
-
- `{path}`: {Purpose}
|
|
21
|
-
|
|
22
|
-
**Configuration:**
|
|
23
|
-
- `{path}`: {Purpose}
|
|
24
|
-
|
|
25
|
-
**Core Logic:**
|
|
26
|
-
- `{path}`: {Purpose}
|
|
27
|
-
|
|
28
|
-
**Testing:**
|
|
29
|
-
- `{path}`: {Purpose}
|
|
30
|
-
|
|
31
|
-
## Naming Conventions
|
|
32
|
-
|
|
33
|
-
**Files:**
|
|
34
|
-
- {Pattern}: {Example}
|
|
35
|
-
|
|
36
|
-
**Directories:**
|
|
37
|
-
- {Pattern}: {Example}
|
|
38
|
-
|
|
39
|
-
## Where to Add New Code
|
|
40
|
-
|
|
41
|
-
**New Feature:**
|
|
42
|
-
- Primary code: `{path}`
|
|
43
|
-
- Tests: `{path}`
|
|
44
|
-
|
|
45
|
-
**New Component/Module:**
|
|
46
|
-
- Implementation: `{path}`
|
|
47
|
-
|
|
48
|
-
**Utilities:**
|
|
49
|
-
- Shared helpers: `{path}`
|
|
50
|
-
|
|
51
|
-
## Special Directories
|
|
52
|
-
|
|
53
|
-
**{Directory}:**
|
|
54
|
-
- Purpose: {What it contains}
|
|
55
|
-
- Generated: {Yes/No}
|
|
56
|
-
- Committed: {Yes/No}
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
*Structure analysis: {date}*
|