5-phase-workflow 1.8.6 → 1.8.8
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 +67 -33
- package/bin/install.js +510 -34
- 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 +39 -27
- package/src/commands/5/eject.md +110 -0
- package/src/commands/5/plan-feature.md +0 -1
- package/src/commands/5/plan-implementation.md +0 -1
- package/src/commands/5/quick-implement.md +0 -1
- package/src/commands/5/reconfigure.md +20 -17
- package/src/commands/5/update.md +16 -3
- package/src/hooks/statusline.js +80 -41
- package/src/skills/configure-docs-index/SKILL.md +196 -0
- package/src/skills/configure-skills/SKILL.md +314 -0
- 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/configure-project/SKILL.md +0 -465
- 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
package/src/templates/TESTING.md
CHANGED
|
@@ -1,107 +1,24 @@
|
|
|
1
1
|
# Testing Patterns
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Organization
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
{Co-located with source or separate directory? Naming pattern for test files?}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- {Framework} {Version}
|
|
9
|
-
- Config: `{config file}`
|
|
7
|
+
## Patterns
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
- {Library}
|
|
13
|
-
|
|
14
|
-
**Run Commands:**
|
|
15
|
-
```bash
|
|
16
|
-
{command} # Run all tests
|
|
17
|
-
{command} # Watch mode
|
|
18
|
-
{command} # Coverage
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Test File Organization
|
|
22
|
-
|
|
23
|
-
**Location:**
|
|
24
|
-
|
|
25
|
-
{Pattern: co-located or separate}
|
|
26
|
-
|
|
27
|
-
**Naming:**
|
|
28
|
-
|
|
29
|
-
{Pattern}
|
|
30
|
-
|
|
31
|
-
**Structure:**
|
|
32
|
-
|
|
33
|
-
{Directory pattern}
|
|
34
|
-
|
|
35
|
-
## Test Structure
|
|
36
|
-
|
|
37
|
-
**Suite Organization:**
|
|
38
|
-
|
|
39
|
-
{Show actual pattern from codebase}
|
|
40
|
-
|
|
41
|
-
**Patterns:**
|
|
42
|
-
|
|
43
|
-
- {Setup pattern}
|
|
44
|
-
- {Teardown pattern}
|
|
45
|
-
- {Assertion pattern}
|
|
9
|
+
{Project-specific test structure — describe how tests are organized within a file, setup/teardown conventions}
|
|
46
10
|
|
|
47
11
|
## Mocking
|
|
48
12
|
|
|
49
|
-
**
|
|
50
|
-
- {
|
|
51
|
-
|
|
52
|
-
**Patterns:**
|
|
53
|
-
|
|
54
|
-
{Show actual mocking pattern from codebase}
|
|
55
|
-
|
|
56
|
-
**What to Mock:**
|
|
57
|
-
|
|
58
|
-
{Guidelines}
|
|
59
|
-
|
|
60
|
-
**What NOT to Mock:**
|
|
61
|
-
|
|
62
|
-
{Guidelines}
|
|
63
|
-
|
|
64
|
-
## Fixtures and Factories
|
|
65
|
-
|
|
66
|
-
**Test Data:**
|
|
67
|
-
|
|
68
|
-
{Show pattern from codebase}
|
|
69
|
-
|
|
70
|
-
**Location:**
|
|
71
|
-
|
|
72
|
-
{Where fixtures live}
|
|
73
|
-
|
|
74
|
-
## Coverage
|
|
75
|
-
|
|
76
|
-
**Requirements:**
|
|
77
|
-
- {Target or "None enforced"}
|
|
78
|
-
|
|
79
|
-
**View Coverage:**
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
{command}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Test Types
|
|
86
|
-
|
|
87
|
-
**Unit Tests:**
|
|
88
|
-
|
|
89
|
-
{Scope and approach}
|
|
90
|
-
|
|
91
|
-
**Integration Tests:**
|
|
92
|
-
|
|
93
|
-
{Scope and approach}
|
|
94
|
-
|
|
95
|
-
**E2E Tests:**
|
|
96
|
-
|
|
97
|
-
{Framework or "Not used"}
|
|
98
|
-
|
|
99
|
-
## Common Patterns
|
|
13
|
+
**Approach:**
|
|
14
|
+
- {Mocking framework/tool used}
|
|
100
15
|
|
|
101
|
-
**
|
|
16
|
+
**What to mock:**
|
|
17
|
+
- {Guidelines — e.g., external APIs, database calls}
|
|
102
18
|
|
|
103
|
-
|
|
19
|
+
**What NOT to mock:**
|
|
20
|
+
- {Guidelines — e.g., pure business logic, utility functions}
|
|
104
21
|
|
|
105
|
-
|
|
22
|
+
## Gotchas
|
|
106
23
|
|
|
107
|
-
{
|
|
24
|
+
{Things that trip people up: setup/teardown quirks, env requirements, flaky areas, test-specific config}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build-project
|
|
3
|
-
description: Builds the project using auto-detected or configured build system. Supports npm, gradle, cargo, go, maven, make, and more. Use when compiling, building, or verifying project build status.
|
|
4
|
-
allowed-tools: Bash, Read, Grep
|
|
5
|
-
model: sonnet
|
|
6
|
-
context: fork
|
|
7
|
-
user-invocable: true
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Build Project
|
|
11
|
-
|
|
12
|
-
## Overview
|
|
13
|
-
|
|
14
|
-
This skill executes build tasks with auto-detection of the build system and sufficient timeout for long-running builds. It provides structured error reporting and actionable suggestions when builds fail.
|
|
15
|
-
|
|
16
|
-
## Build System Detection
|
|
17
|
-
|
|
18
|
-
The skill automatically detects the build system using:
|
|
19
|
-
|
|
20
|
-
1. **Config file** (`.5/config.json`) - if `build.command` is specified
|
|
21
|
-
2. **Auto-detection** - by examining project files:
|
|
22
|
-
- `package.json` → npm/yarn/pnpm
|
|
23
|
-
- `build.gradle` or `build.gradle.kts` → Gradle
|
|
24
|
-
- `pom.xml` → Maven
|
|
25
|
-
- `Cargo.toml` → Cargo (Rust)
|
|
26
|
-
- `go.mod` → Go
|
|
27
|
-
- `Makefile` → Make
|
|
28
|
-
- `setup.py` or `pyproject.toml` → Python
|
|
29
|
-
|
|
30
|
-
## Build Targets
|
|
31
|
-
|
|
32
|
-
| Target | Use Case |
|
|
33
|
-
|--------|----------|
|
|
34
|
-
| `compile` | Fast compilation check (no tests, no packaging) |
|
|
35
|
-
| `build` | Full build (may include tests depending on tool) |
|
|
36
|
-
| `clean` | Clean build (removes previous artifacts first) |
|
|
37
|
-
|
|
38
|
-
## Parameters
|
|
39
|
-
|
|
40
|
-
When invoked, the skill expects:
|
|
41
|
-
|
|
42
|
-
- **target** (optional, default: `build`): One of `compile`, `build`, `clean`
|
|
43
|
-
- **module** (optional): Specific module to build (for monorepos)
|
|
44
|
-
|
|
45
|
-
## Execution Process
|
|
46
|
-
|
|
47
|
-
### 1. Load Configuration
|
|
48
|
-
|
|
49
|
-
Read `.5/config.json` if it exists:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"build": {
|
|
54
|
-
"command": "npm run build",
|
|
55
|
-
"compileCommand": "npm run compile",
|
|
56
|
-
"cleanCommand": "npm run clean"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
If commands are specified, use them. Otherwise, auto-detect.
|
|
62
|
-
|
|
63
|
-
### 2. Detect Build System
|
|
64
|
-
|
|
65
|
-
If no config, detect by checking project files: `package.json` + lock files (npm/yarn/pnpm), `build.gradle` (gradle), `pom.xml` (mvn), `Cargo.toml` (cargo), `go.mod` (go), `Makefile` (make).
|
|
66
|
-
|
|
67
|
-
### 3. Determine Build Command
|
|
68
|
-
|
|
69
|
-
Based on detected tool and target:
|
|
70
|
-
|
|
71
|
-
| Tool | compile | build | clean |
|
|
72
|
-
|------|---------|-------|-------|
|
|
73
|
-
| npm | `npm run build` | `npm run build` | `rm -rf dist node_modules && npm install` |
|
|
74
|
-
| yarn | `yarn build` | `yarn build` | `yarn clean` or `rm -rf dist` |
|
|
75
|
-
| pnpm | `pnpm build` | `pnpm build` | `pnpm clean` or `rm -rf dist` |
|
|
76
|
-
| gradle | `./gradlew compileJava -x test --offline` | `./gradlew build -x test --offline` | `./gradlew clean build` |
|
|
77
|
-
| mvn | `mvn compile` | `mvn package -DskipTests` | `mvn clean package` |
|
|
78
|
-
| cargo | `cargo check` | `cargo build` | `cargo clean && cargo build` |
|
|
79
|
-
| go | `go build ./...` | `go build ./...` | `go clean && go build ./...` |
|
|
80
|
-
| make | `make` | `make` | `make clean` |
|
|
81
|
-
|
|
82
|
-
### 4. Execute Build with Proper Timeout
|
|
83
|
-
|
|
84
|
-
**IMPORTANT**: Builds can take several minutes. Use generous timeout:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
# Timeout based on target
|
|
88
|
-
# - compile: 2 minutes (120000ms)
|
|
89
|
-
# - build: 10 minutes (600000ms)
|
|
90
|
-
# - clean: 15 minutes (900000ms)
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Execute the command and capture output.
|
|
94
|
-
|
|
95
|
-
### 5. Parse Build Output
|
|
96
|
-
|
|
97
|
-
Determine success/failure from tool-specific patterns (exit code, `BUILD SUCCESSFUL`, `BUILD SUCCESS`, `Finished`, etc.). For failures, extract file paths, line numbers, and error messages. Identify error type (compilation, dependency, memory, tool not found) and suggest appropriate fix.
|
|
98
|
-
|
|
99
|
-
### 6. Format Output
|
|
100
|
-
|
|
101
|
-
Provide structured response:
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
BUILD STATUS: ✓ SUCCESS | ✗ FAILED
|
|
105
|
-
DURATION: 2m 34s
|
|
106
|
-
TOOL: {detected-tool}
|
|
107
|
-
TARGET: {target}
|
|
108
|
-
MODULE: {module or "all"}
|
|
109
|
-
|
|
110
|
-
SUMMARY:
|
|
111
|
-
- Build completed successfully
|
|
112
|
-
OR
|
|
113
|
-
- Build failed with X errors
|
|
114
|
-
|
|
115
|
-
ERRORS: (if any)
|
|
116
|
-
File: path/to/file.ext:42
|
|
117
|
-
Error: {error message}
|
|
118
|
-
|
|
119
|
-
File: path/to/another.ext:15
|
|
120
|
-
Error: {error message}
|
|
121
|
-
|
|
122
|
-
SUGGESTIONS:
|
|
123
|
-
- {actionable suggestion based on error type}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Error Handling
|
|
127
|
-
|
|
128
|
-
- If build tool cannot be detected, return error with list of checked locations
|
|
129
|
-
- If command times out, report timeout with suggestion to increase timeout or optimize build
|
|
130
|
-
- If build fails, extract and format all errors for user
|
|
131
|
-
- Always include the raw command that was executed for reproducibility
|
|
132
|
-
|
|
133
|
-
## DO NOT
|
|
134
|
-
|
|
135
|
-
- DO NOT modify source files
|
|
136
|
-
- DO NOT install dependencies (unless explicitly part of clean target)
|
|
137
|
-
- DO NOT run tests (use `/run-tests` skill for that)
|
|
138
|
-
- DO NOT assume a specific build system - always detect or use config
|
|
139
|
-
- DO NOT use overly short timeouts (builds can be slow)
|
|
140
|
-
|
|
141
|
-
## Example
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
User: /build-project
|
|
145
|
-
Skill: [Detects npm] → [Runs: npm run build] → [Reports success with duration]
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## Related Documentation
|
|
149
|
-
|
|
150
|
-
- [5-Phase Workflow Guide](../../docs/workflow-guide.md)
|
|
151
|
-
- [/run-tests skill](../run-tests/SKILL.md)
|