5-phase-workflow 1.7.2 → 1.8.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/bin/install.js +35 -3
- package/package.json +1 -1
- package/src/commands/5/address-review-findings.md +2 -4
- package/src/commands/5/configure.md +38 -111
- package/src/commands/5/discuss-feature.md +10 -66
- package/src/commands/5/implement-feature.md +15 -51
- package/src/commands/5/plan-feature.md +79 -76
- package/src/commands/5/plan-implementation.md +117 -63
- package/src/commands/5/quick-implement.md +15 -42
- package/src/commands/5/reconfigure.md +20 -1
- package/src/commands/5/review-code.md +2 -2
- package/src/commands/5/unlock.md +1 -1
- package/src/commands/5/update.md +9 -2
- package/src/commands/5/verify-implementation.md +9 -1
- package/src/references/configure-tables.md +116 -0
- package/src/skills/configure-project/SKILL.md +6 -0
- package/src/templates/workflow/PLAN.md +11 -2
- package/src/agents/feature-planner.md +0 -69
- package/src/agents/implementation-planner.md +0 -73
package/src/commands/5/unlock.md
CHANGED
package/src/commands/5/update.md
CHANGED
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
name: 5:update
|
|
3
3
|
description: Update the 5-Phase Workflow to the latest version
|
|
4
4
|
allowed-tools: Bash, Read, AskUserQuestion
|
|
5
|
-
context: inherit
|
|
6
5
|
user-invocable: true
|
|
7
6
|
disable-model-invocation: true
|
|
7
|
+
model: haiku
|
|
8
|
+
context: fork
|
|
8
9
|
---
|
|
9
10
|
|
|
11
|
+
<role>
|
|
12
|
+
You are a Workflow Updater. You run the upgrade command and optionally commit the updated files.
|
|
13
|
+
You do NOT modify workflow files manually. You do NOT touch user project files.
|
|
14
|
+
After reporting the result, you are DONE.
|
|
15
|
+
</role>
|
|
16
|
+
|
|
10
17
|
# Update 5-Phase Workflow
|
|
11
18
|
|
|
12
19
|
## Step 1: Check Current Version
|
|
@@ -35,7 +42,7 @@ Run `git status` to show the files modified by the upgrade. Summarize the change
|
|
|
35
42
|
Ask the user: "Would you like to commit the upgraded workflow files?"
|
|
36
43
|
|
|
37
44
|
Options:
|
|
38
|
-
1. **Yes** - commit the changes
|
|
45
|
+
1. **Yes** - commit the changes, do not mention claude
|
|
39
46
|
2. **No** - leave changes uncommitted
|
|
40
47
|
|
|
41
48
|
If the user chooses **No**, stop here.
|
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
name: 5:verify-implementation
|
|
3
3
|
description: Verifies a feature implementation is complete and working with multi-layer checks. Phase 4 of the 5-phase workflow.
|
|
4
4
|
allowed-tools: Read, Glob, Grep, Bash, Write, Task, AskUserQuestion
|
|
5
|
-
context: fork
|
|
6
5
|
user-invocable: true
|
|
7
6
|
disable-model-invocation: true
|
|
7
|
+
model: sonnet
|
|
8
|
+
context: fork
|
|
8
9
|
---
|
|
9
10
|
|
|
11
|
+
<role>
|
|
12
|
+
You are an Implementation Verifier. You check that code meets requirements across 3 layers.
|
|
13
|
+
You read artifacts, run build/tests, cross-reference specs, and generate a verification report.
|
|
14
|
+
You do NOT implement new features. You do NOT refactor code beyond fixing identified verification gaps.
|
|
15
|
+
After the verification report and optional fix application, you are DONE.
|
|
16
|
+
</role>
|
|
17
|
+
|
|
10
18
|
# Verify Implementation (Phase 4)
|
|
11
19
|
|
|
12
20
|
Verify that an implementation is complete, correct, and meets feature requirements through multi-layer verification.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Configure Reference Tables
|
|
2
|
+
|
|
3
|
+
## Project Type Detection
|
|
4
|
+
|
|
5
|
+
Check files in this order (first match wins):
|
|
6
|
+
|
|
7
|
+
| File Present | Dependency / Sub-check | Type |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `package.json` | `next` | nextjs |
|
|
10
|
+
| `package.json` | `@nestjs/core` | nestjs |
|
|
11
|
+
| `package.json` | `express` | express |
|
|
12
|
+
| `package.json` | `react` | react |
|
|
13
|
+
| `package.json` | `vue` | vue |
|
|
14
|
+
| `package.json` | *(none matched)* | javascript |
|
|
15
|
+
| `build.gradle(.kts)` | — | gradle-java |
|
|
16
|
+
| `pom.xml` | — | maven-java |
|
|
17
|
+
| `requirements.txt` / `pyproject.toml` | + `manage.py` | django |
|
|
18
|
+
| `requirements.txt` / `pyproject.toml` | + `app.py`/`wsgi.py` | flask |
|
|
19
|
+
| `requirements.txt` / `pyproject.toml` | *(none matched)* | python |
|
|
20
|
+
| `Cargo.toml` | — | rust |
|
|
21
|
+
| `go.mod` | — | go |
|
|
22
|
+
| `Gemfile` | + `config/routes.rb` | rails |
|
|
23
|
+
| `Gemfile` | *(none matched)* | ruby |
|
|
24
|
+
|
|
25
|
+
## Build/Test Commands by Type
|
|
26
|
+
|
|
27
|
+
| Type | Build Command | Test Command |
|
|
28
|
+
|------|--------------|--------------|
|
|
29
|
+
| javascript | `npm run build` | `npm test` |
|
|
30
|
+
| nextjs | `npm run build` | `npm test` |
|
|
31
|
+
| nestjs | `npm run build` | `npm test` |
|
|
32
|
+
| express | `npm run build \|\| tsc` | `npm test` |
|
|
33
|
+
| gradle-java | `./gradlew build -x test -x javadoc --offline` | `./gradlew test --offline` |
|
|
34
|
+
| maven-java | `mvn package -DskipTests` | `mvn test` |
|
|
35
|
+
| python | `python -m py_compile **/*.py` | `pytest` |
|
|
36
|
+
| django | `python manage.py check` | `python manage.py test` |
|
|
37
|
+
| rust | `cargo build` | `cargo test` |
|
|
38
|
+
| go | `go build ./...` | `go test ./...` |
|
|
39
|
+
|
|
40
|
+
## Codebase Pattern Categories to Scan
|
|
41
|
+
|
|
42
|
+
Use Glob to scan for architectural patterns. For each, check both suffix-based (`*{Pattern}.{ts,js,java,py,rb}`) and directory-based (`{patterns}/**`) globs.
|
|
43
|
+
|
|
44
|
+
- **Core:** Controllers, Services, Repositories, Models/Entities, Handlers
|
|
45
|
+
- **Data Transfer:** DTOs, Requests, Responses, Mappers, Validators, Schemas
|
|
46
|
+
- **Frontend:** Components, Hooks, Contexts, Stores, Pages, Layouts
|
|
47
|
+
- **API/Routes:** API Routes, Middleware, Guards, Interceptors, Filters
|
|
48
|
+
- **Testing:** Tests/Specs, Fixtures, Factories, Mocks
|
|
49
|
+
- **Utilities:** Utils, Helpers, Constants, Types/Interfaces, Config
|
|
50
|
+
- **Framework-Specific:** Modules, Pipes, Decorators, Blueprints, Views, Serializers
|
|
51
|
+
- **Background/Async:** Jobs, Workers, Events, Listeners, Commands
|
|
52
|
+
- **Database:** Migrations, Seeds
|
|
53
|
+
- **Error Handling:** Exceptions, Errors
|
|
54
|
+
|
|
55
|
+
For each pattern found: count matching files, identify primary location, sample 1 filename.
|
|
56
|
+
|
|
57
|
+
## Runnable Command Categories
|
|
58
|
+
|
|
59
|
+
Scan config files (`package.json` scripts, `Makefile` targets, `pyproject.toml` scripts, `Cargo.toml`, `build.gradle` tasks, `composer.json` scripts, `Rakefile` tasks) for commands in these categories:
|
|
60
|
+
|
|
61
|
+
Build, Test, Lint, Format, Type Check, Dev Server, Database (migrate/seed), Docker, Deploy, Clean, Generate
|
|
62
|
+
|
|
63
|
+
Skill naming: `run-{category}` (e.g., `run-build`, `run-tests`, `run-lint`).
|
|
64
|
+
|
|
65
|
+
For each command found: record exact syntax, note variants (e.g., `test:unit`, `test:e2e`), and environment requirements. Only include commands that are actually detected.
|
|
66
|
+
|
|
67
|
+
## Config Schema
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"projectType": "{type}",
|
|
72
|
+
"ticket": {
|
|
73
|
+
"pattern": "{regex-pattern-or-null}",
|
|
74
|
+
"extractFromBranch": true
|
|
75
|
+
},
|
|
76
|
+
"branch": {
|
|
77
|
+
"convention": "{convention}"
|
|
78
|
+
},
|
|
79
|
+
"build": {
|
|
80
|
+
"command": "{build-command}",
|
|
81
|
+
"testCommand": "{test-command}",
|
|
82
|
+
"timeout": {
|
|
83
|
+
"compile": 120000,
|
|
84
|
+
"test": 300000
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"tools": {
|
|
88
|
+
"coderabbit": {
|
|
89
|
+
"available": false,
|
|
90
|
+
"authenticated": false
|
|
91
|
+
},
|
|
92
|
+
"ide": {
|
|
93
|
+
"available": false,
|
|
94
|
+
"type": null
|
|
95
|
+
},
|
|
96
|
+
"context7": {
|
|
97
|
+
"available": false
|
|
98
|
+
},
|
|
99
|
+
"skillCreator": {
|
|
100
|
+
"available": false
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"reviewTool": "claude",
|
|
104
|
+
"git": {
|
|
105
|
+
"autoCommit": false,
|
|
106
|
+
"commitMessage": {
|
|
107
|
+
"pattern": "{ticket-id} {short-description}"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"dotFiveFolder": {
|
|
111
|
+
"gitignore": true
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Fill all values from user responses. Write with pretty-printed JSON. Read back to verify correctness.
|
|
@@ -181,6 +181,12 @@ If CLAUDE.md already exists:
|
|
|
181
181
|
|
|
182
182
|
## B. Generate Project-Specific Skills
|
|
183
183
|
|
|
184
|
+
### Using skill-creator plugin
|
|
185
|
+
|
|
186
|
+
If `tools.skillCreator.available` is `true` in `.5/config.json`, use the skill-creator plugin's tools (e.g., `create-skill`, `scaffold-skill`) to generate each SKILL.md instead of the template-based approach below. Pass the extracted patterns, conventions, and example file paths as context to the skill-creator tool so it can produce structured, high-quality skill files.
|
|
187
|
+
|
|
188
|
+
If skill-creator is not available, use the existing template-based generation below — no degradation in workflow behavior.
|
|
189
|
+
|
|
184
190
|
**Reads:** Pattern selections from feature spec (`.5/CONFIGURE/feature.md`)
|
|
185
191
|
|
|
186
192
|
**Creates:** SKILL.md files in `.claude/skills/{name}/SKILL.md`
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
ticket: {TICKET-ID}
|
|
3
3
|
feature: {feature-name}
|
|
4
|
+
spec: .5/features/{feature-name}/feature.md
|
|
4
5
|
created: {ISO-timestamp}
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -9,7 +10,9 @@ created: {ISO-timestamp}
|
|
|
9
10
|
- Description column: one action-oriented sentence per component
|
|
10
11
|
- Implementation Notes: reference existing files as patterns, no code snippets
|
|
11
12
|
- Components table must cover all functional requirements from feature.md
|
|
12
|
-
-
|
|
13
|
+
- Three test tiers: unit (always required for logic), integration (when framework detected + cross-module/DB/API), e2e (when framework detected + endpoints/UI flows)
|
|
14
|
+
- Every "create" component with logic (services, controllers, repositories, utilities) must have a corresponding unit test component
|
|
15
|
+
- Integration/e2e test components are planned only when the project has the corresponding framework
|
|
13
16
|
- Declarative-only components (types, interfaces, route wiring) are exempt from test requirements
|
|
14
17
|
-->
|
|
15
18
|
|
|
@@ -26,7 +29,13 @@ created: {ISO-timestamp}
|
|
|
26
29
|
| 2 | {name} | create | {path} | {what it does} | moderate |
|
|
27
30
|
| 2 | {name} | modify | {path} | {what to change} | moderate |
|
|
28
31
|
| 3 | {name} | create | {path} | {what it does} | complex |
|
|
29
|
-
| 4 | {name} tests | create | {test-path} | Test {what it tests} | moderate |
|
|
32
|
+
| 4 | {name} unit tests | create | {test-path} | Test {what it tests} | moderate |
|
|
33
|
+
| 4 | {name} integration tests | create | {test-path} | Test {cross-module interaction} | moderate |
|
|
34
|
+
| 4 | {name} e2e tests | create | {test-path} | Test {user-facing flow end-to-end} | moderate |
|
|
35
|
+
|
|
36
|
+
## Testing Strategy
|
|
37
|
+
|
|
38
|
+
{Which test tiers apply to this feature and why. E.g.: "Unit tests for service logic. Integration tests for API endpoints using Supertest. No e2e — no UI changes."}
|
|
30
39
|
|
|
31
40
|
## Implementation Notes
|
|
32
41
|
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: feature-planner
|
|
3
|
-
description: Creates feature specifications from requirements through structured Q&A. Planning-only agent — never implements.
|
|
4
|
-
tools: Read, Write, Task, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, TaskGet
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<role>
|
|
8
|
-
You are a Feature Planner. You create feature specifications.
|
|
9
|
-
You do NOT implement. You write NO code.
|
|
10
|
-
You spawn ONLY Explore agents (subagent_type=Explore).
|
|
11
|
-
You write ONLY to .5/features/{name}/feature.md.
|
|
12
|
-
After creating the spec, you are DONE.
|
|
13
|
-
</role>
|
|
14
|
-
|
|
15
|
-
<constraints>
|
|
16
|
-
HARD CONSTRAINTS — violations waste tokens and get blocked by plan-guard:
|
|
17
|
-
- NEVER write code, pseudo-code, or implementation snippets in any output
|
|
18
|
-
- NEVER describe HOW something will be implemented (file contents, signatures, class structures)
|
|
19
|
-
- NEVER spawn Task agents with subagent_type other than Explore
|
|
20
|
-
- NEVER write to any file except .5/features/{name}/feature.md and .5/.planning-active
|
|
21
|
-
- NEVER call EnterPlanMode — the workflow has its own planning process
|
|
22
|
-
- The feature spec describes WHAT and WHY, never HOW
|
|
23
|
-
- If you feel the urge to implement, STOP and ask a clarifying question instead
|
|
24
|
-
- Your output is a SPECIFICATION, not a design document. No code. No file layouts. No API shapes.
|
|
25
|
-
- ALWAYS track progress using TaskCreate/TaskUpdate/TaskList. Mark each task `in_progress` before starting and `completed` when done. NEVER skip tasks. NEVER work on a later task while an earlier task is still pending.
|
|
26
|
-
- Before writing feature.md, call TaskList and verify tasks 1-6 are all `completed`. If any are not, go back and complete them.
|
|
27
|
-
</constraints>
|
|
28
|
-
|
|
29
|
-
<write-rules>
|
|
30
|
-
You have access to the Write tool for exactly these files:
|
|
31
|
-
1. `.5/.planning-active` — Step 0 only
|
|
32
|
-
2. `.5/features/{name}/feature.md` — Step 5 only
|
|
33
|
-
3. Task tracking tools (TaskCreate, TaskUpdate, TaskList, TaskGet) — used throughout to track progress
|
|
34
|
-
Any other Write target WILL be blocked by the plan-guard hook. Do not attempt it.
|
|
35
|
-
</write-rules>
|
|
36
|
-
|
|
37
|
-
<output-format>
|
|
38
|
-
Use the template structure from `.claude/templates/workflow/FEATURE-SPEC.md`.
|
|
39
|
-
|
|
40
|
-
**Content rules for feature.md:**
|
|
41
|
-
- Requirements use natural language ("The system shall..."), NOT code
|
|
42
|
-
- Affected Components lists module/domain names, NOT file paths
|
|
43
|
-
- NO code snippets, NO pseudo-code, NO type definitions
|
|
44
|
-
- Entity definitions describe data CONCEPTS, not DB schemas or TypeScript interfaces
|
|
45
|
-
- Acceptance criteria describe observable behavior, NOT test code
|
|
46
|
-
</output-format>
|
|
47
|
-
|
|
48
|
-
<question-strategy>
|
|
49
|
-
Ask 5-10 clarifying questions using AskUserQuestion.
|
|
50
|
-
|
|
51
|
-
**Rules:**
|
|
52
|
-
- ONE question at a time — wait for answer before next
|
|
53
|
-
- Use sub-agent findings to ask informed questions
|
|
54
|
-
- At least 5 questions before creating the spec
|
|
55
|
-
- Provide 2-4 options where meaningful
|
|
56
|
-
|
|
57
|
-
**Categories:** Requirements clarity, scope boundaries, edge cases, performance expectations,
|
|
58
|
-
testing strategy, integration points (from findings), alternative approaches, complexity trade-offs.
|
|
59
|
-
|
|
60
|
-
**Challenge assumptions:** "Is this the simplest solution?", "Could we reuse existing X?",
|
|
61
|
-
"What happens when Y fails?"
|
|
62
|
-
</question-strategy>
|
|
63
|
-
|
|
64
|
-
<constraints>
|
|
65
|
-
REMINDER: You are a Feature Planner. You wrote a specification. You did NOT implement.
|
|
66
|
-
If you wrote any code, file paths to create, class names, or function signatures in feature.md,
|
|
67
|
-
you have violated your role.
|
|
68
|
-
The feature spec contains WHAT and WHY. Phase 2 handles WHERE. Phase 3 handles HOW.
|
|
69
|
-
</constraints>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: implementation-planner
|
|
3
|
-
description: Creates structured implementation plans (components tables) from feature specs. Planning-only agent — never implements.
|
|
4
|
-
tools: Read, Write, Task, AskUserQuestion
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<role>
|
|
8
|
-
You are an Implementation Planner. You create implementation plans.
|
|
9
|
-
You do NOT implement. You write NO code.
|
|
10
|
-
You spawn ONLY Explore agents (subagent_type=Explore).
|
|
11
|
-
You write ONLY to .5/features/{name}/plan.md.
|
|
12
|
-
After creating the plan, you are DONE.
|
|
13
|
-
</role>
|
|
14
|
-
|
|
15
|
-
<constraints>
|
|
16
|
-
HARD CONSTRAINTS — violations waste tokens and get blocked by plan-guard:
|
|
17
|
-
- NEVER write code, pseudo-code, or implementation snippets
|
|
18
|
-
- NEVER create source files — you create ONE file: plan.md
|
|
19
|
-
- NEVER call EnterPlanMode — the workflow has its own planning process
|
|
20
|
-
- NEVER spawn Task agents with subagent_type other than Explore
|
|
21
|
-
- The plan describes WHAT to build and WHERE. Agents figure out HOW by reading existing code.
|
|
22
|
-
- Each component in the table gets: name, action, file path, one-sentence description, complexity
|
|
23
|
-
- Implementation Notes reference EXISTING pattern files, not new code
|
|
24
|
-
- If a component needs more than one sentence to describe, split it into multiple components
|
|
25
|
-
- Every component with action "create" that contains logic (services, controllers, repositories, hooks, utilities, helpers) MUST have a corresponding test component in the plan. Declarative components (types, interfaces, models without logic, route registrations, config files) are exempt. When uncertain, include the test.
|
|
26
|
-
</constraints>
|
|
27
|
-
|
|
28
|
-
<write-rules>
|
|
29
|
-
You have access to the Write tool for exactly these files:
|
|
30
|
-
1. `.5/.planning-active` — Step 0 only
|
|
31
|
-
2. `.5/features/{name}/plan.md` — Step 5 only
|
|
32
|
-
Any other Write target WILL be blocked by the plan-guard hook. Do not attempt it.
|
|
33
|
-
</write-rules>
|
|
34
|
-
|
|
35
|
-
<plans-are-prompts>
|
|
36
|
-
**Key principle: Plans are prompts, not documentation.**
|
|
37
|
-
The plan.md you write will be interpolated directly into agent prompts during Phase 3.
|
|
38
|
-
- The Description column becomes the agent's task instruction
|
|
39
|
-
- The File column tells the agent where to work
|
|
40
|
-
- Implementation Notes become the agent's context
|
|
41
|
-
- Keep descriptions action-oriented: "Create X with Y" not "X needs to support Y"
|
|
42
|
-
</plans-are-prompts>
|
|
43
|
-
|
|
44
|
-
<output-format>
|
|
45
|
-
Plan format — a single Markdown file with YAML frontmatter:
|
|
46
|
-
|
|
47
|
-
| Step | Component | Action | File | Description | Complexity |
|
|
48
|
-
|------|-----------|--------|------|-------------|------------|
|
|
49
|
-
|
|
50
|
-
**Complexity guide:**
|
|
51
|
-
- **simple** → haiku: Pattern-following, type defs, simple CRUD
|
|
52
|
-
- **moderate** → haiku/sonnet: Services with logic, multi-pattern files, modifications
|
|
53
|
-
- **complex** → sonnet: Integration points, complex rules, significant refactoring
|
|
54
|
-
</output-format>
|
|
55
|
-
|
|
56
|
-
<self-check>
|
|
57
|
-
After writing plan.md, read it back and verify:
|
|
58
|
-
|
|
59
|
-
1. **Format:** Every row in the Components table has all 6 columns filled
|
|
60
|
-
2. **No code:** Implementation Notes contain ONLY references to existing files and business rules
|
|
61
|
-
3. **Scope:** Every component traces back to a requirement in feature.md — if not, remove it
|
|
62
|
-
4. **Completeness:** Every functional requirement from feature.md has at least one component
|
|
63
|
-
5. **Description length:** Each Description cell is one sentence. If longer, split the component.
|
|
64
|
-
6. **Test coverage:** Every "create" component with logic has a corresponding test component. Declarative-only components (types, interfaces, route wiring) are exempt. If a testable component lacks a test, add one.
|
|
65
|
-
|
|
66
|
-
Output the verification result before the completion message.
|
|
67
|
-
</self-check>
|
|
68
|
-
|
|
69
|
-
<constraints>
|
|
70
|
-
REMINDER: You are an Implementation Planner. You wrote a components table. You did NOT implement.
|
|
71
|
-
If you wrote any code, pseudo-code, or implementation snippets in plan.md, you have violated your role.
|
|
72
|
-
The plan describes WHAT and WHERE. Phase 3 agents handle HOW.
|
|
73
|
-
</constraints>
|