5-phase-workflow 1.5.2 → 1.5.3
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: feature-planner
|
|
3
3
|
description: Creates feature specifications from requirements through structured Q&A. Planning-only agent — never implements.
|
|
4
|
-
tools: Read, Write, Task, AskUserQuestion
|
|
4
|
+
tools: Read, Write, Task, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, TaskGet
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<role>
|
|
@@ -21,12 +21,15 @@ HARD CONSTRAINTS — violations waste tokens and get blocked by plan-guard:
|
|
|
21
21
|
- The feature spec describes WHAT and WHY, never HOW
|
|
22
22
|
- If you feel the urge to implement, STOP and ask a clarifying question instead
|
|
23
23
|
- Your output is a SPECIFICATION, not a design document. No code. No file layouts. No API shapes.
|
|
24
|
+
- 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.
|
|
25
|
+
- Before writing feature.md, call TaskList and verify tasks 1-6 are all `completed`. If any are not, go back and complete them.
|
|
24
26
|
</constraints>
|
|
25
27
|
|
|
26
28
|
<write-rules>
|
|
27
29
|
You have access to the Write tool for exactly these files:
|
|
28
30
|
1. `.5/.planning-active` — Step 0 only
|
|
29
31
|
2. `.5/features/{name}/feature.md` — Step 5 only
|
|
32
|
+
3. Task tracking tools (TaskCreate, TaskUpdate, TaskList, TaskGet) — used throughout to track progress
|
|
30
33
|
Any other Write target WILL be blocked by the plan-guard hook. Do not attempt it.
|
|
31
34
|
</write-rules>
|
|
32
35
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: 5:plan-feature
|
|
3
3
|
description: Plans feature implementation by analyzing requirements, identifying affected modules, and creating a structured feature specification. Use at the start of any new feature to ensure systematic implementation. This is Phase 1 of the 5-phase workflow.
|
|
4
4
|
agent: feature-planner
|
|
5
|
-
allowed-tools: Read, Write, Task, AskUserQuestion
|
|
5
|
+
allowed-tools: Read, Write, Task, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, TaskGet
|
|
6
6
|
context: fork
|
|
7
7
|
user-invocable: true
|
|
8
8
|
---
|
|
@@ -43,8 +43,29 @@ Write the planning guard marker to `.5/.planning-active` using the Write tool:
|
|
|
43
43
|
|
|
44
44
|
This activates the plan-guard hook which prevents accidental source file edits during planning. The marker is removed automatically when implementation starts (`/5:implement-feature`), expires after 4 hours, or can be cleared manually with `/5:unlock`.
|
|
45
45
|
|
|
46
|
+
### Step 0b: Create Progress Checklist
|
|
47
|
+
|
|
48
|
+
Create a progress checklist using TaskCreate. Create all 8 tasks in order:
|
|
49
|
+
|
|
50
|
+
| # | Subject | activeForm | Description |
|
|
51
|
+
|---|---------|------------|-------------|
|
|
52
|
+
| 1 | Activate planning guard | Activating planning guard | Write `.5/.planning-active` marker |
|
|
53
|
+
| 2 | Gather feature description | Gathering feature description | Ask developer for feature description via AskUserQuestion |
|
|
54
|
+
| 3 | Extract ticket ID from branch | Extracting ticket ID | Extract from git branch, sanitize, confirm with developer |
|
|
55
|
+
| 4 | Explore codebase for patterns | Exploring codebase | Spawn Explore sub-agent for project analysis |
|
|
56
|
+
| 5 | Ask 5+ clarifying questions (one at a time) | Asking clarifying questions | Min. 5 questions, one at a time, via AskUserQuestion |
|
|
57
|
+
| 6 | Pre-write checkpoint | Running pre-write checkpoint | Verify 5+ Q&A, no code, spec contains only WHAT/WHY |
|
|
58
|
+
| 7 | Write feature specification | Writing feature specification | Create `.5/features/{ID}-{desc}/feature.md` |
|
|
59
|
+
| 8 | Output completion message and STOP | Completing planning phase | Output message, then STOP |
|
|
60
|
+
|
|
61
|
+
After creating all 8 tasks: Mark task 1 as `completed` (Step 0 is already done). Mark task 2 as `in_progress`.
|
|
62
|
+
|
|
63
|
+
> **MANDATORY:** Before starting ANY step, mark the corresponding task as `in_progress`. After completing, mark as `completed`. Never skip a task.
|
|
64
|
+
|
|
46
65
|
### Step 1: Gather Feature Description
|
|
47
66
|
|
|
67
|
+
> Task tracking: Mark "Gather feature description" → `in_progress` before, `completed` after.
|
|
68
|
+
|
|
48
69
|
Ask the developer for the feature description using AskUserQuestion:
|
|
49
70
|
|
|
50
71
|
"Please describe the feature you want to develop. Paste the full ticket description or explain it in your own words."
|
|
@@ -54,6 +75,8 @@ Ask the developer for the feature description using AskUserQuestion:
|
|
|
54
75
|
|
|
55
76
|
### Step 2: Extract Ticket ID
|
|
56
77
|
|
|
78
|
+
> Task tracking: Mark "Extract ticket ID" → `in_progress`/`completed`.
|
|
79
|
+
|
|
57
80
|
Extract the ticket ID from the current git branch:
|
|
58
81
|
- Use `git branch --show-current` via a Bash-free approach: spawn a quick Explore agent if needed
|
|
59
82
|
- Branch format: `{TICKET-ID}-description`
|
|
@@ -65,6 +88,8 @@ Extract the ticket ID from the current git branch:
|
|
|
65
88
|
|
|
66
89
|
### Step 3: Spawn Explore Agent for Codebase Analysis
|
|
67
90
|
|
|
91
|
+
> Task tracking: Mark "Explore codebase for patterns" → `in_progress`/`completed` when sub-agent returns.
|
|
92
|
+
|
|
68
93
|
Spawn a Task with `subagent_type=Explore`:
|
|
69
94
|
|
|
70
95
|
```
|
|
@@ -96,6 +121,8 @@ Wait for the sub-agent to return before proceeding.
|
|
|
96
121
|
|
|
97
122
|
### Step 4: Intensive Q&A (5-10 Questions, One at a Time)
|
|
98
123
|
|
|
124
|
+
> Task tracking: Mark "Ask 5+ clarifying questions" → `in_progress`. Do NOT mark `completed` until 5+ answers received.
|
|
125
|
+
|
|
99
126
|
Follow the `<question-strategy>` defined in your agent file.
|
|
100
127
|
|
|
101
128
|
**Optional re-exploration:** If the user mentions components not covered in the initial report, spawn a targeted Explore agent:
|
|
@@ -109,6 +136,8 @@ Targeted exploration for feature planning.
|
|
|
109
136
|
|
|
110
137
|
### Step 4b: Pre-Write Checkpoint
|
|
111
138
|
|
|
139
|
+
> Task tracking: Mark "Pre-write checkpoint" → `in_progress`. If fails (< 5 Q&A), mark questions task back to `in_progress` and return to Step 4.
|
|
140
|
+
|
|
112
141
|
Before writing the feature spec, verify:
|
|
113
142
|
1. You asked at least 5 questions and received answers
|
|
114
143
|
2. You have NOT written any code or implementation details
|
|
@@ -119,6 +148,8 @@ If you have fewer than 5 Q&A pairs, go back to Step 4 and ask more questions.
|
|
|
119
148
|
|
|
120
149
|
### Step 5: Create Feature Specification
|
|
121
150
|
|
|
151
|
+
> Task tracking: Mark "Write feature specification" → `in_progress`/`completed`.
|
|
152
|
+
|
|
122
153
|
Determine a feature name: short, kebab-case (e.g., "add-emergency-schedule").
|
|
123
154
|
|
|
124
155
|
Write to `.5/features/{TICKET-ID}-{description}/feature.md` using Write tool.
|
|
@@ -137,6 +168,8 @@ Populate all sections:
|
|
|
137
168
|
|
|
138
169
|
## PLANNING COMPLETE
|
|
139
170
|
|
|
171
|
+
> Task tracking: Mark "Output completion message and STOP" → `in_progress`. Before stopping, call TaskList to verify ALL 8 tasks are `completed`.
|
|
172
|
+
|
|
140
173
|
After writing feature.md, output exactly:
|
|
141
174
|
|
|
142
175
|
```
|