5-phase-workflow 1.9.5 → 2.0.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/README.md +81 -410
- package/bin/install.js +385 -70
- package/bin/sync-agents.js +50 -11
- package/docs/findings.md +3 -3
- package/docs/workflow-guide.md +110 -1046
- package/package.json +6 -5
- package/src/agents/step-executor-agent.md +49 -0
- package/src/agents/step-orchestrator-agent.md +111 -0
- package/src/agents/verification-agent.md +78 -0
- package/src/commands/5/address-review-findings.md +69 -403
- package/src/commands/5/apply-review-findings.md +66 -0
- package/src/commands/5/configure.md +110 -76
- package/src/commands/5/discuss-feature.md +47 -57
- package/src/commands/5/eject.md +7 -6
- package/src/commands/5/implement.md +202 -0
- package/src/commands/5/plan.md +164 -0
- package/src/commands/5/reconfigure.md +32 -31
- package/src/commands/5/reply-pr-comments.md +46 -0
- package/src/commands/5/review.md +95 -0
- package/src/commands/5/split.md +190 -0
- package/src/commands/5/synchronize-agents.md +4 -4
- package/src/commands/5/triage-pr-comments.md +70 -0
- package/src/commands/5/update.md +8 -8
- package/src/hooks/check-updates.js +50 -7
- package/src/hooks/plan-guard.js +28 -22
- package/src/hooks/statusline.js +55 -4
- package/src/skills/configure-docs-index/SKILL.md +16 -21
- package/src/skills/configure-skills/SKILL.md +21 -24
- package/src/templates/AGENTS.md +94 -0
- package/src/templates/workflow/FIX-PLAN.md +1 -1
- package/src/templates/workflow/PLAN-COMPACT.md +42 -0
- package/src/templates/workflow/PLAN.md +58 -34
- package/src/templates/workflow/REVIEW-FINDINGS.md +7 -16
- package/src/templates/workflow/REVIEW-SUMMARY.md +5 -0
- package/src/templates/workflow/STATE.json +32 -3
- package/src/agents/component-executor.md +0 -57
- package/src/commands/5/implement-feature.md +0 -381
- package/src/commands/5/plan-feature.md +0 -293
- package/src/commands/5/plan-implementation.md +0 -333
- package/src/commands/5/quick-implement.md +0 -375
- package/src/commands/5/review-code.md +0 -212
- package/src/commands/5/verify-implementation.md +0 -277
- package/src/templates/workflow/FEATURE-SPEC.md +0 -100
- package/src/templates/workflow/VERIFICATION-REPORT.md +0 -103
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-docs-index
|
|
3
|
-
description: Analyzes the codebase, creates project documentation, generates a rebuildable codebase index, and updates AGENTS.md. Used during /5:implement
|
|
3
|
+
description: Analyzes the codebase, creates project documentation, generates a rebuildable codebase index, and updates AGENTS.md. Used during /5:implement CONFIGURE.
|
|
4
4
|
allowed-tools: Read, Write, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
6
|
-
context: fork
|
|
7
6
|
user-invocable: false
|
|
8
7
|
---
|
|
9
8
|
|
|
@@ -11,7 +10,7 @@ user-invocable: false
|
|
|
11
10
|
|
|
12
11
|
## Overview
|
|
13
12
|
|
|
14
|
-
This skill handles the documentation and indexing work during
|
|
13
|
+
This skill handles the documentation and indexing work during implementation for the CONFIGURE feature. It is called by step-executor to create the project docs, codebase index, and `AGENTS.md`.
|
|
15
14
|
|
|
16
15
|
It handles one task:
|
|
17
16
|
|
|
@@ -27,10 +26,10 @@ This skill supports two modes. The analysis (A1), template filling (A2-A3), inde
|
|
|
27
26
|
|
|
28
27
|
### Full Mode (default)
|
|
29
28
|
|
|
30
|
-
Used by `/5:configure` → `/5:implement
|
|
29
|
+
Used by `/5:configure` → `/5:implement CONFIGURE` flow.
|
|
31
30
|
|
|
32
|
-
- **Input:** Pattern/command selections from
|
|
33
|
-
- **Behavior:** Creates documentation, index files, and `AGENTS.md` from scratch based on
|
|
31
|
+
- **Input:** Pattern/command selections from unified plan (`.5/features/CONFIGURE/plan.md`)
|
|
32
|
+
- **Behavior:** Creates documentation, index files, and `AGENTS.md` from scratch based on unified plan requirements
|
|
34
33
|
|
|
35
34
|
### Refresh Mode
|
|
36
35
|
|
|
@@ -143,20 +142,16 @@ Generate a repository-local codebase index that stays generic and works for any
|
|
|
143
142
|
|
|
144
143
|
Generate `AGENTS.md` — the provider-agnostic instructions file that works with any AI coding tool:
|
|
145
144
|
|
|
146
|
-
AGENTS.md
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
- **Coding Guidelines:** The 6 mandatory principles (types, concise docs, short files, extract methods, SRP/DRY, maintainable/modular)
|
|
157
|
-
- **Project Documentation:** Links to whichever `.5/` files were created (only list files that exist)
|
|
158
|
-
- **Codebase Index:** Add a section linking `.5/index/README.md`, the generated index files, and the rebuild script
|
|
159
|
-
- **Index Freshness Rule:** State clearly that if the index files are more than one day old, the agent should regenerate them by running `.5/index/rebuild-index.sh` before relying on them
|
|
145
|
+
Use `.claude/templates/AGENTS.md` as the source template.
|
|
146
|
+
|
|
147
|
+
Placeholder mapping:
|
|
148
|
+
- `{PROJECT_OVERVIEW}` → 1-2 sentences from README/package.json
|
|
149
|
+
- `{BUILD_RUN_COMMANDS}` → build, test, and other detected commands
|
|
150
|
+
- `{PROJECT_DOCUMENTATION_LINKS}` → links to whichever `.5/` files were created (only list files that exist)
|
|
151
|
+
- `{CODEBASE_INDEX_LINKS}` → links to `.5/index/README.md`, generated index files, and `.5/index/rebuild-index.sh`
|
|
152
|
+
- `{CUSTOM_DOCUMENTATION}` → preserved user-authored sections under `## Custom Documentation`; remove the placeholder entirely if there is no custom content
|
|
153
|
+
|
|
154
|
+
Preserve the static template sections exactly as written, including skill usage, workflow rules, coding guidelines, simplicity, testing, surgical changes, goal-driven execution, and index freshness.
|
|
160
155
|
|
|
161
156
|
### A5. Migrate and Preserve Existing Content
|
|
162
157
|
|
|
@@ -166,7 +161,7 @@ AGENTS.md structure:
|
|
|
166
161
|
- Read current content
|
|
167
162
|
- Identify user-written custom sections (not matching template structure)
|
|
168
163
|
- Preserve under "Custom Documentation" section in new AGENTS.md
|
|
169
|
-
- Ensure
|
|
164
|
+
- Ensure the generated guidance sections are retained
|
|
170
165
|
|
|
171
166
|
**If `CLAUDE.md` already exists with real content (not just `@AGENTS.md`):**
|
|
172
167
|
- Read current CLAUDE.md content
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-skills
|
|
3
|
-
description: Generates project-specific create-*/run-* skills and scoped rules from the current codebase. Used during /5:implement
|
|
4
|
-
allowed-tools: Read, Write, Bash, Glob, Grep
|
|
3
|
+
description: Generates project-specific create-*/run-* skills and scoped rules from the current codebase. Used during /5:implement CONFIGURE.
|
|
4
|
+
allowed-tools: Read, Write, Bash, Glob, Grep, create-skill, scaffold-skill
|
|
5
5
|
model: sonnet
|
|
6
|
-
context: fork
|
|
7
6
|
user-invocable: false
|
|
8
7
|
---
|
|
9
8
|
|
|
@@ -11,7 +10,7 @@ user-invocable: false
|
|
|
11
10
|
|
|
12
11
|
## Overview
|
|
13
12
|
|
|
14
|
-
This skill handles skill and rule generation during
|
|
13
|
+
This skill handles skill and rule generation during implementation for the CONFIGURE feature. It is called by step-executor to create project-specific skills and scoped rules.
|
|
15
14
|
|
|
16
15
|
It handles two tasks:
|
|
17
16
|
|
|
@@ -28,10 +27,10 @@ This skill supports two modes. The skill generation and rule generation logic is
|
|
|
28
27
|
|
|
29
28
|
### Full Mode (default)
|
|
30
29
|
|
|
31
|
-
Used by `/5:configure` → `/5:implement
|
|
30
|
+
Used by `/5:configure` → `/5:implement CONFIGURE` flow.
|
|
32
31
|
|
|
33
|
-
- **Input:** Pattern/command selections from
|
|
34
|
-
- **Behavior:** Creates all selected skills and rules from scratch based on
|
|
32
|
+
- **Input:** Pattern/command selections from unified plan (`.5/features/CONFIGURE/plan.md`)
|
|
33
|
+
- **Behavior:** Creates all selected skills and rules from scratch based on unified plan requirements
|
|
35
34
|
|
|
36
35
|
### Refresh Mode
|
|
37
36
|
|
|
@@ -53,7 +52,7 @@ If `tools.skillCreator.available` is `true` in `.5/config.json`, use the skill-c
|
|
|
53
52
|
|
|
54
53
|
If skill-creator is not available, use the existing template-based generation below — no degradation in workflow behavior.
|
|
55
54
|
|
|
56
|
-
**Reads:** Pattern selections from
|
|
55
|
+
**Reads:** Pattern selections from unified plan (`.5/features/CONFIGURE/plan.md`)
|
|
57
56
|
|
|
58
57
|
**Creates:** SKILL.md files in `.claude/skills/{name}/SKILL.md`
|
|
59
58
|
|
|
@@ -61,7 +60,7 @@ If skill-creator is not available, use the existing template-based generation be
|
|
|
61
60
|
|
|
62
61
|
Skills are determined by what patterns exist in the codebase (detected during `/5:configure`) and what the user selected — not by project type.
|
|
63
62
|
|
|
64
|
-
For EACH pattern selected by the user in the
|
|
63
|
+
For EACH pattern selected by the user in the unified plan:
|
|
65
64
|
|
|
66
65
|
1. **Find examples** - Read 2-3 files from the pattern's location
|
|
67
66
|
2. **Extract conventions:**
|
|
@@ -77,24 +76,23 @@ For EACH pattern selected by the user in the feature spec:
|
|
|
77
76
|
|
|
78
77
|
### A2. Skill Template Structure
|
|
79
78
|
|
|
80
|
-
For each skill, create `.claude/skills/
|
|
79
|
+
For each skill, create `.claude/skills/{pattern}/SKILL.md`:
|
|
81
80
|
|
|
82
81
|
```yaml
|
|
83
82
|
---
|
|
84
|
-
name:
|
|
85
|
-
description: Creates a {Pattern} following project conventions at {location}.
|
|
83
|
+
name: {pattern}
|
|
84
|
+
description: Creates or updates a {Pattern} following project conventions at {location}.
|
|
86
85
|
allowed-tools: Read, Write, Glob, Grep
|
|
87
86
|
model: haiku
|
|
88
|
-
context: fork
|
|
89
87
|
user-invocable: true
|
|
90
88
|
---
|
|
91
89
|
```
|
|
92
90
|
|
|
93
91
|
```markdown
|
|
94
|
-
#
|
|
92
|
+
# {Pattern}
|
|
95
93
|
|
|
96
|
-
## What This Skill
|
|
97
|
-
|
|
94
|
+
## What This Skill Does
|
|
95
|
+
Creates or updates a {pattern} following this project's conventions.
|
|
98
96
|
|
|
99
97
|
## Detected Conventions
|
|
100
98
|
- **Location:** {detected-location}
|
|
@@ -103,14 +101,14 @@ A {pattern} following this project's conventions.
|
|
|
103
101
|
- **Imports:** {detected-import-pattern}
|
|
104
102
|
|
|
105
103
|
## Template
|
|
106
|
-
Based on {example-file},
|
|
104
|
+
Based on {example-file}, {patterns} should follow:
|
|
107
105
|
|
|
108
106
|
\`\`\`{language}
|
|
109
107
|
{template-derived-from-analysis}
|
|
110
108
|
\`\`\`
|
|
111
109
|
|
|
112
110
|
## Checklist
|
|
113
|
-
- [ ] File
|
|
111
|
+
- [ ] File at correct location
|
|
114
112
|
- [ ] Naming convention followed
|
|
115
113
|
- [ ] Required imports added
|
|
116
114
|
- [ ] {pattern-specific-items}
|
|
@@ -118,19 +116,19 @@ Based on {example-file}, new {patterns} should follow:
|
|
|
118
116
|
|
|
119
117
|
### A3. Pattern to Skill Name Mapping
|
|
120
118
|
|
|
121
|
-
**Rule:** Skill name is `
|
|
119
|
+
**Rule:** Skill name is `{pattern}` (e.g., `controller` → `controller`, `component` → `component`, `dto` → `dto`). For compound patterns, use the short form: `model/entity` → `model`, `api-route` → `api-route`.
|
|
122
120
|
|
|
123
121
|
---
|
|
124
122
|
|
|
125
123
|
## B. Generate Command Skills (run-*)
|
|
126
124
|
|
|
127
|
-
**Reads:** Command selections from
|
|
125
|
+
**Reads:** Command selections from unified plan (`.5/features/CONFIGURE/plan.md`)
|
|
128
126
|
|
|
129
127
|
**Creates:** SKILL.md files in `.claude/skills/run-{command}/SKILL.md`
|
|
130
128
|
|
|
131
129
|
### B1. Command-Based Skill Generation
|
|
132
130
|
|
|
133
|
-
For EACH command selected by the user in the
|
|
131
|
+
For EACH command selected by the user in the unified plan:
|
|
134
132
|
|
|
135
133
|
1. **Read the source** - Check package.json scripts, Makefile, etc.
|
|
136
134
|
2. **Document the command:**
|
|
@@ -153,7 +151,6 @@ name: run-{command}
|
|
|
153
151
|
description: Runs {command} for this project using {source}.
|
|
154
152
|
allowed-tools: Bash
|
|
155
153
|
model: haiku
|
|
156
|
-
context: fork
|
|
157
154
|
user-invocable: true
|
|
158
155
|
---
|
|
159
156
|
```
|
|
@@ -219,7 +216,7 @@ For each applicable rule:
|
|
|
219
216
|
1. **Derive `paths:` globs** from detected file locations (e.g., if tests are at `src/**/*.test.ts` and `tests/**/*.spec.ts`, use those patterns)
|
|
220
217
|
2. **Convert analysis observations into imperative directives** — "Use X", "Always Y", "Never Z"
|
|
221
218
|
3. **Keep each file 15-40 lines** — be concise and actionable
|
|
222
|
-
4. **Do not repeat** the
|
|
219
|
+
4. **Do not repeat** the general guidance sections from `AGENTS.md`
|
|
223
220
|
|
|
224
221
|
Write files to `.claude/rules/`:
|
|
225
222
|
|
|
@@ -311,4 +308,4 @@ Component D (Rules): SKIPPED - rules.generate is false in config
|
|
|
311
308
|
- DO NOT hardcode conventions - always derive from actual project analysis
|
|
312
309
|
- DO NOT generate empty or placeholder skill or rule files
|
|
313
310
|
- DO NOT assume command syntax - always read from actual config files (package.json, Makefile, etc.)
|
|
314
|
-
- DO NOT repeat the
|
|
311
|
+
- DO NOT repeat the general guidance sections from `AGENTS.md` in rule files
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Repository Guide
|
|
2
|
+
|
|
3
|
+
{PROJECT_OVERVIEW}
|
|
4
|
+
|
|
5
|
+
## Build & Run Commands
|
|
6
|
+
|
|
7
|
+
{BUILD_RUN_COMMANDS}
|
|
8
|
+
|
|
9
|
+
## Skill Usage
|
|
10
|
+
|
|
11
|
+
Before implementing changes, always check the available skills for relevant implementation guidance.
|
|
12
|
+
|
|
13
|
+
Use skills to understand project-specific workflows, commands, testing expectations, and implementation conventions before editing code.
|
|
14
|
+
|
|
15
|
+
## Workflow Rules
|
|
16
|
+
|
|
17
|
+
When running `/5:` workflow commands, follow the command instructions exactly as written.
|
|
18
|
+
Do not skip steps, combine phases, or proceed to actions not specified in the current command.
|
|
19
|
+
Each phase produces a specific artifact - do not create artifacts belonging to other phases.
|
|
20
|
+
|
|
21
|
+
## Coding Guidelines
|
|
22
|
+
|
|
23
|
+
1. Prefer explicit types or contracts for public APIs, data transfer shapes, service methods, hooks, and async return values where the language supports them.
|
|
24
|
+
2. Keep comments and docs concise; document constraints and non-obvious behavior, not the obvious.
|
|
25
|
+
3. Keep files focused and bounded; split broad controllers, services, hooks, and components early.
|
|
26
|
+
4. Extract helpers or classes when logic starts mixing orchestration, parsing, IO, and mapping in one place.
|
|
27
|
+
5. Favor SRP and DRY, but follow surrounding module conventions before introducing new abstractions.
|
|
28
|
+
6. Keep features modular: wire backend providers in feature modules, keep UI state in hooks, and avoid cross-layer shortcuts.
|
|
29
|
+
|
|
30
|
+
## Simplicity First
|
|
31
|
+
|
|
32
|
+
- No features beyond what was asked.
|
|
33
|
+
- No abstractions for single-use code.
|
|
34
|
+
- No flexibility or configurability that was not requested.
|
|
35
|
+
- No error handling for impossible scenarios.
|
|
36
|
+
- If you write 200 lines and it could be 50, rewrite it.
|
|
37
|
+
|
|
38
|
+
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
|
|
39
|
+
|
|
40
|
+
## Testing
|
|
41
|
+
|
|
42
|
+
- Add unit tests for business logic when they provide real value.
|
|
43
|
+
- Do not create unit tests just to satisfy coverage or test trivial code.
|
|
44
|
+
- New features must be covered by e2e or integration tests where practical.
|
|
45
|
+
- Bug fixes should include a regression test when practical.
|
|
46
|
+
|
|
47
|
+
## Surgical Changes
|
|
48
|
+
|
|
49
|
+
Touch only what you must. Clean up only your own mess.
|
|
50
|
+
When editing existing code:
|
|
51
|
+
|
|
52
|
+
- Do not improve adjacent code, comments, or formatting.
|
|
53
|
+
- Do not refactor things that are not broken.
|
|
54
|
+
- Match existing style, even if you would do it differently.
|
|
55
|
+
- If you notice unrelated dead code, mention it; do not delete it.
|
|
56
|
+
|
|
57
|
+
When your changes create orphans:
|
|
58
|
+
|
|
59
|
+
- Remove imports, variables, functions, and files that your changes made unused.
|
|
60
|
+
- Do not remove pre-existing dead code unless asked.
|
|
61
|
+
|
|
62
|
+
The test: Every changed line should trace directly to the user's request.
|
|
63
|
+
|
|
64
|
+
## Goal-Driven Execution
|
|
65
|
+
|
|
66
|
+
Define success criteria. Loop until verified.
|
|
67
|
+
|
|
68
|
+
Transform tasks into verifiable goals:
|
|
69
|
+
|
|
70
|
+
- "Add validation" -> "Write tests for invalid inputs, then make them pass"
|
|
71
|
+
- "Fix the bug" -> "Write a test that reproduces it, then make it pass"
|
|
72
|
+
- "Refactor X" -> "Ensure tests pass before and after"
|
|
73
|
+
|
|
74
|
+
For multi-step tasks, state a brief plan:
|
|
75
|
+
|
|
76
|
+
1. [Step] -> verify: [check]
|
|
77
|
+
2. [Step] -> verify: [check]
|
|
78
|
+
3. [Step] -> verify: [check]
|
|
79
|
+
|
|
80
|
+
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
|
|
81
|
+
|
|
82
|
+
## Project Documentation
|
|
83
|
+
|
|
84
|
+
{PROJECT_DOCUMENTATION_LINKS}
|
|
85
|
+
|
|
86
|
+
## Codebase Index
|
|
87
|
+
|
|
88
|
+
{CODEBASE_INDEX_LINKS}
|
|
89
|
+
|
|
90
|
+
## Index Freshness
|
|
91
|
+
|
|
92
|
+
If the codebase index files are more than one day old, regenerate them by running `.5/index/rebuild-index.sh` before relying on them.
|
|
93
|
+
|
|
94
|
+
{CUSTOM_DOCUMENTATION}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
## Feature Gap Fixes
|
|
18
18
|
|
|
19
|
-
{If no feature gaps or Layer 2 was skipped: "No feature gaps found." or "Skipped — no
|
|
19
|
+
{If no feature gaps or Layer 2 was skipped: "No feature gaps found." or "Skipped — no plan.md available."}
|
|
20
20
|
|
|
21
21
|
| # | File | Issue | Fix | Complexity |
|
|
22
22
|
|---|------|-------|-----|------------|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
ticket: {TICKET-ID}
|
|
3
|
+
feature: {feature-name}
|
|
4
|
+
created: {ISO-timestamp}
|
|
5
|
+
planFormat: compact
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- PLAN RULES:
|
|
9
|
+
- Use only for low-risk changes with 1-2 components.
|
|
10
|
+
- Write requirements and implementation intent, not code.
|
|
11
|
+
- Keep the Component Checklist human-readable. Do not add step/model/pattern/verify columns.
|
|
12
|
+
- Decisions must be labeled [DECIDED], [FLEXIBLE], or [DEFERRED].
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
# Plan: {TICKET-ID} - {Title}
|
|
16
|
+
|
|
17
|
+
## Overview
|
|
18
|
+
|
|
19
|
+
{Short narrative describing the problem and desired outcome.}
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
- In: {included work}
|
|
24
|
+
- Out: {excluded work}
|
|
25
|
+
|
|
26
|
+
## Acceptance Criteria
|
|
27
|
+
|
|
28
|
+
- [ ] {Observable success criterion}
|
|
29
|
+
|
|
30
|
+
## Decisions
|
|
31
|
+
|
|
32
|
+
- [DECIDED] {Decision and rationale}
|
|
33
|
+
|
|
34
|
+
## Existing Patterns to Follow
|
|
35
|
+
|
|
36
|
+
- `{path}` - {what pattern this provides}
|
|
37
|
+
|
|
38
|
+
## Component Checklist
|
|
39
|
+
|
|
40
|
+
| Component | Action | Target Path | Intent |
|
|
41
|
+
|-----------|--------|-------------|--------|
|
|
42
|
+
| {component-name} | modify | `{path}` | {one-sentence intent} |
|
|
@@ -1,52 +1,76 @@
|
|
|
1
1
|
---
|
|
2
2
|
ticket: {TICKET-ID}
|
|
3
3
|
feature: {feature-name}
|
|
4
|
-
spec: .5/features/{feature-name}/feature.md
|
|
5
4
|
created: {ISO-timestamp}
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
<!-- PLAN RULES:
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- Components table must cover all functional requirements from feature.md
|
|
16
|
-
- Three test tiers: unit (always required for logic), integration (when framework detected + cross-module/DB/API), e2e (when framework detected + endpoints/UI flows)
|
|
17
|
-
- Every "create" component with logic (services, controllers, repositories, utilities) must have a corresponding unit test component
|
|
18
|
-
- Integration/e2e test components are planned only when the project has the corresponding framework
|
|
19
|
-
- Declarative-only components (types, interfaces, route wiring) are exempt from test requirements
|
|
8
|
+
- One planning artifact only: this file.
|
|
9
|
+
- Write requirements and implementation intent, not code.
|
|
10
|
+
- Keep the Component Checklist human-readable. Do not add step/model/pattern/verify columns; step-orchestrator-agent derives those into state.json.
|
|
11
|
+
- Existing Patterns to Follow should name high-value files and conventions so the orchestrator can wire executor prompts cheaply.
|
|
12
|
+
- Decisions must be labeled [DECIDED], [FLEXIBLE], or [DEFERRED].
|
|
13
|
+
- Omit optional sections when they would only contain "none", "n/a", or placeholder content.
|
|
20
14
|
-->
|
|
21
15
|
|
|
22
|
-
#
|
|
16
|
+
# Plan: {TICKET-ID} - {Title}
|
|
23
17
|
|
|
24
|
-
|
|
18
|
+
## Overview
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
{Short narrative describing the problem, desired outcome, and why this change is needed.}
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|------|-----------|--------|------|-------------|-------------|--------|------------|------------|
|
|
30
|
-
| 1 | {name} | create | {path} | {what it does} | {existing file to read first} | {grep/test command} | simple | — |
|
|
31
|
-
| 1 | {name} | create | {path} | {what it does} | {pattern} | {verify} | simple | — |
|
|
32
|
-
| 2 | {name} | create | {path} | {what it does} | {pattern} | {verify} | moderate | {step-1-component} |
|
|
33
|
-
| 2 | {name} | modify | {path} | {what to change} | {target file} | {verify} | moderate | — |
|
|
34
|
-
| 3 | {name} | create | {path} | {what it does} | {pattern} | {verify} | complex | {step-2-component} |
|
|
35
|
-
| 4 | {name} unit tests | create | {test-path} | Test {what it tests} | {existing test} | {test command} | moderate | {tested-component} |
|
|
36
|
-
| 4 | {name} integration tests | create | {test-path} | Test {cross-module interaction} | {existing test} | {test command} | moderate | {tested-component} |
|
|
37
|
-
| 4 | {name} e2e tests | create | {test-path} | Test {user-facing flow end-to-end} | {existing test} | {test command} | moderate | {tested-component} |
|
|
22
|
+
## What Changes
|
|
38
23
|
|
|
39
|
-
|
|
24
|
+
- {Logical behavior or capability that changes}
|
|
25
|
+
- {User-visible or system-visible outcome}
|
|
40
26
|
|
|
41
|
-
|
|
27
|
+
## Existing Patterns to Follow
|
|
42
28
|
|
|
43
|
-
|
|
29
|
+
- `{path}` - {what pattern this provides}
|
|
30
|
+
- `{path}` - {what convention this establishes}
|
|
44
31
|
|
|
45
|
-
|
|
46
|
-
- [Step N] {Convention or context relevant to all components in step N}
|
|
47
|
-
- [{component-name}] {Key business rule or integration point specific to this component}
|
|
32
|
+
## Constraints
|
|
48
33
|
|
|
49
|
-
|
|
34
|
+
- {Technical, product, compatibility, performance, or rollout constraint}
|
|
50
35
|
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
## Scope
|
|
37
|
+
|
|
38
|
+
### In
|
|
39
|
+
|
|
40
|
+
- {Included work}
|
|
41
|
+
|
|
42
|
+
### Out
|
|
43
|
+
|
|
44
|
+
- {Explicitly excluded work}
|
|
45
|
+
|
|
46
|
+
## Acceptance Criteria
|
|
47
|
+
|
|
48
|
+
- [ ] {Observable success criterion}
|
|
49
|
+
- [ ] {Observable success criterion}
|
|
50
|
+
|
|
51
|
+
## Decisions
|
|
52
|
+
|
|
53
|
+
- [DECIDED] {Decision and rationale}
|
|
54
|
+
- [FLEXIBLE] {Area where implementation may choose the best local pattern}
|
|
55
|
+
- [DEFERRED] {Work intentionally not included}
|
|
56
|
+
|
|
57
|
+
## Module Impact
|
|
58
|
+
|
|
59
|
+
| Module/Area | Impact |
|
|
60
|
+
|-------------|--------|
|
|
61
|
+
| {module} | {create/modify/delete behavior at a high level} |
|
|
62
|
+
|
|
63
|
+
## Component Checklist
|
|
64
|
+
|
|
65
|
+
| Component | Action | Target Path | Intent |
|
|
66
|
+
|-----------|--------|-------------|--------|
|
|
67
|
+
| {component-name} | create | `{path}` | {one-sentence intent} |
|
|
68
|
+
| {component-name} | modify | `{path}` | {one-sentence intent} |
|
|
69
|
+
|
|
70
|
+
## Technical Notes
|
|
71
|
+
|
|
72
|
+
- {Important implementation context, invariants, or migration notes}
|
|
73
|
+
|
|
74
|
+
## Alternatives Considered
|
|
75
|
+
|
|
76
|
+
- {Alternative}: {why it was not chosen}
|
|
@@ -8,15 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
## How to Use This File
|
|
10
10
|
|
|
11
|
-
1. Review
|
|
12
|
-
2.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- `[MANUAL]` - Custom instructions (change FIX to MANUAL and add instructions)
|
|
16
|
-
3. Save this file
|
|
17
|
-
4. Run: `/5:address-review-findings`
|
|
11
|
+
1. Review this file if you want context before applying fixes
|
|
12
|
+
2. Run: `/5:address-review-findings`
|
|
13
|
+
3. The command will present each finding one by one with a recommendation
|
|
14
|
+
4. Choose `fix`, `wont_fix`, `wait`, or provide textual instructions
|
|
18
15
|
|
|
19
|
-
The command
|
|
16
|
+
The command records your decisions separately and applies only findings marked `fix`.
|
|
20
17
|
|
|
21
18
|
---
|
|
22
19
|
|
|
@@ -38,12 +35,6 @@ The command will read your annotations and apply marked fixes.
|
|
|
38
35
|
{raw output from reviewer}
|
|
39
36
|
```
|
|
40
37
|
|
|
41
|
-
**Action:** [FIX]
|
|
42
|
-
|
|
43
|
-
**Custom Instructions:** (only if you selected [MANUAL])
|
|
44
|
-
<!-- Add detailed instructions here if you want a custom fix -->
|
|
45
|
-
|
|
46
|
-
|
|
47
38
|
---
|
|
48
39
|
|
|
49
40
|
## Summary
|
|
@@ -54,5 +45,5 @@ The command will read your annotations and apply marked fixes.
|
|
|
54
45
|
- Manual Review: {N}
|
|
55
46
|
|
|
56
47
|
**Next Steps:**
|
|
57
|
-
1.
|
|
58
|
-
2.
|
|
48
|
+
1. Run: `/5:address-review-findings`
|
|
49
|
+
2. Decide on each finding interactively
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
- **User-Resolved Questions:** {N}
|
|
12
12
|
- **Manual Review Needed:** {N}
|
|
13
13
|
- **Skipped by User:** {N}
|
|
14
|
+
- **Deferred by User:** {N}
|
|
14
15
|
|
|
15
16
|
## Applied Fixes (User Approved)
|
|
16
17
|
|
|
@@ -29,6 +30,10 @@
|
|
|
29
30
|
|
|
30
31
|
- `{file-path}:{line}` - User chose not to apply
|
|
31
32
|
|
|
33
|
+
## Deferred Issues
|
|
34
|
+
|
|
35
|
+
- `{file-path}:{line}` - User chose to wait
|
|
36
|
+
|
|
32
37
|
## Files Modified
|
|
33
38
|
|
|
34
39
|
- {file-path} ({N} fixes applied)
|
|
@@ -4,11 +4,40 @@
|
|
|
4
4
|
"status": "in-progress",
|
|
5
5
|
"currentStep": 1,
|
|
6
6
|
"totalSteps": 0,
|
|
7
|
-
"
|
|
7
|
+
"steps": [
|
|
8
|
+
{
|
|
9
|
+
"number": 1,
|
|
10
|
+
"name": "{step-name}",
|
|
11
|
+
"mode": "parallel",
|
|
12
|
+
"model": "haiku",
|
|
13
|
+
"components": []
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"pendingComponents": [
|
|
17
|
+
{
|
|
18
|
+
"name": "{component-name}",
|
|
19
|
+
"action": "create",
|
|
20
|
+
"step": 1,
|
|
21
|
+
"mode": "parallel",
|
|
22
|
+
"model": "haiku",
|
|
23
|
+
"file": "{target-path}",
|
|
24
|
+
"sourceFile": null,
|
|
25
|
+
"description": "{one-sentence intent}",
|
|
26
|
+
"dependsOn": [],
|
|
27
|
+
"patternRefs": [],
|
|
28
|
+
"verifyCommands": [],
|
|
29
|
+
"notes": []
|
|
30
|
+
}
|
|
31
|
+
],
|
|
8
32
|
"completedComponents": [],
|
|
9
|
-
"
|
|
33
|
+
"recentFailures": [],
|
|
34
|
+
"baseline": {},
|
|
35
|
+
"latestCommandResults": [],
|
|
36
|
+
"verificationStatus": "pending",
|
|
10
37
|
"verificationResults": {},
|
|
11
|
-
"
|
|
38
|
+
"verifiedAt": null,
|
|
39
|
+
"latestCommitResults": [],
|
|
40
|
+
"eventLog": ".5/features/{feature-name}/state-events.jsonl",
|
|
12
41
|
"startedAt": "{ISO-timestamp}",
|
|
13
42
|
"lastUpdated": "{ISO-timestamp}"
|
|
14
43
|
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: component-executor
|
|
3
|
-
description: Implements individual components by following existing codebase patterns. Spawned by /5:implement-feature orchestrator.
|
|
4
|
-
tools: Read, Write, Edit, Glob, Grep, Bash, context7
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<role>
|
|
8
|
-
You are a Component Executor. You implement individual components for a feature.
|
|
9
|
-
You follow existing codebase patterns. You do NOT deviate from the plan.
|
|
10
|
-
</role>
|
|
11
|
-
|
|
12
|
-
<process>
|
|
13
|
-
## Implementation Process
|
|
14
|
-
|
|
15
|
-
1. **Read required files FIRST** — If your prompt includes a `Pattern File` or `Read First` field, you MUST read every listed file before writing any code. This establishes ground truth and prevents assumptions about conventions, naming, or structure.
|
|
16
|
-
2. **For creating files:**
|
|
17
|
-
- Read the pattern file (from step 1) to understand conventions
|
|
18
|
-
- Create the new file following the same patterns exactly
|
|
19
|
-
- If no pattern file was provided, find a similar existing file via Glob and read it
|
|
20
|
-
3. **For modifying files:**
|
|
21
|
-
- Read the target file
|
|
22
|
-
- Apply the described change via Edit
|
|
23
|
-
- Verify the change is correct
|
|
24
|
-
4. **Run verify command** — If your prompt includes a `Verify` field, run that command and confirm it passes. If it fails, fix the issue (subject to the 3-attempt limit). If no verify command was provided, verify each file exists after changes.
|
|
25
|
-
</process>
|
|
26
|
-
|
|
27
|
-
<output-format>
|
|
28
|
-
When done, output your result in this exact format:
|
|
29
|
-
|
|
30
|
-
---RESULT---
|
|
31
|
-
STATUS: success | failed
|
|
32
|
-
FILES_CREATED: [comma-separated paths]
|
|
33
|
-
FILES_MODIFIED: [comma-separated paths]
|
|
34
|
-
VERIFY: passed | failed | skipped
|
|
35
|
-
DEVIATIONS: none | {brief list of auto-fixes applied}
|
|
36
|
-
ERROR: none | {error description}
|
|
37
|
-
---END---
|
|
38
|
-
</output-format>
|
|
39
|
-
|
|
40
|
-
<deviation-rules>
|
|
41
|
-
## Deviation Rules
|
|
42
|
-
|
|
43
|
-
You WILL discover unplanned work. Handle as follows:
|
|
44
|
-
|
|
45
|
-
| Trigger | Action | Permission |
|
|
46
|
-
|---------|--------|------------|
|
|
47
|
-
| Bug/error in existing code | Fix → verify → note in result | Auto |
|
|
48
|
-
| Missing import/dependency | Add → verify → note in result | Auto |
|
|
49
|
-
| Missing validation/auth/logging | Add → verify → note in result | Auto |
|
|
50
|
-
| Blocking issue (prevents task completion) | Fix → verify → note in result | Auto |
|
|
51
|
-
| Architectural change needed (new DB table, schema change, service switch) | STOP → report in ERROR field | Ask user |
|
|
52
|
-
| Auth error ("401", "Not authenticated", "Set ENV_VAR") | STOP → report as AUTH_GATE in ERROR | Ask user |
|
|
53
|
-
|
|
54
|
-
**Priority:** Architectural/Auth (ask) > Auto-fix rules > Unsure (treat as architectural, ask)
|
|
55
|
-
|
|
56
|
-
**3-attempt limit:** If you have attempted 3 auto-fixes on a SINGLE issue and it still fails, STOP. Report the issue in the ERROR field with `ATTEMPTS_EXHAUSTED: {description}`. Do not keep trying — the orchestrator will handle it.
|
|
57
|
-
</deviation-rules>
|