pi-feature-dev 1.0.0 → 1.2.0

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 CHANGED
@@ -1,13 +1,17 @@
1
1
  # pi-feature-dev
2
2
 
3
- Pi-native guided feature development workflow.
3
+ Portable guided feature development workflow, packaged as a Pi skill.
4
4
 
5
- This package adapts a Claude Code-style feature development workflow to Pi using Pi packages and tools:
5
+ The skill describes a tool-agnostic process for non-trivial feature work:
6
6
 
7
- - `pi-subagents` for scout/planner/worker/reviewer fanout
8
- - `@juicesharp/rpiv-todo` for phase tracking
9
- - `@juicesharp/rpiv-ask-user-question` for structured choices
10
- - optional `context-mode`, `pi-web-access`, and `pi-intercom` for large-output handling, web/code research, and session coordination
7
+ - clarify requirements before coding
8
+ - explore the existing codebase before design
9
+ - compare implementation approaches and get approval
10
+ - implement with one writer
11
+ - review the diff from multiple perspectives
12
+ - validate and summarize results
13
+
14
+ It does not require specific task-tracking, question, delegation, or review tools. If the current environment provides equivalent capabilities, use them; otherwise follow the same workflow directly in chat and with normal code tools.
11
15
 
12
16
  ## Install
13
17
 
@@ -35,27 +39,13 @@ If installing for a project, run from that project and use Pi's local install fl
35
39
  pi install -l ~/Projects/pi-feature-dev
36
40
  ```
37
41
 
38
- ## Required companion packages
39
-
40
- This workflow expects these Pi tools to be available:
41
-
42
- ```bash
43
- pi install npm:pi-subagents
44
- pi install npm:@juicesharp/rpiv-todo
45
- pi install npm:@juicesharp/rpiv-ask-user-question
46
- ```
47
-
48
- Recommended optional packages:
42
+ ## Optional companion packages
49
43
 
50
- ```bash
51
- pi install npm:context-mode
52
- pi install npm:pi-web-access
53
- pi install npm:pi-intercom
54
- ```
44
+ No companion package is required. Optional Pi packages can improve specific parts of the workflow, such as progress tracking, structured choices, delegation, large-output handling, web/code research, or session coordination.
55
45
 
56
46
  ## Usage
57
47
 
58
- Skill command:
48
+ Skill command in Pi:
59
49
 
60
50
  ```text
61
51
  /skill:feature-dev Add OAuth login with Google and GitHub
@@ -67,18 +57,20 @@ Natural language also works when Pi's skill matcher triggers:
67
57
  Use feature-dev to implement API rate limiting.
68
58
  ```
69
59
 
70
- This package is intentionally skill-only. It does not provide a `/feature-dev` prompt template shortcut; use `/skill:feature-dev` for explicit invocation.
60
+ The `skills/feature-dev/SKILL.md` file is portable markdown and can be adapted for other coding assistant environments.
61
+
62
+ This package is intentionally skill-only. It does not provide a `/feature-dev` prompt template shortcut; use `/skill:feature-dev` for explicit Pi invocation.
71
63
 
72
64
  ## What it does
73
65
 
74
- The skill guides Pi through a seven-phase process:
66
+ The skill guides a coding assistant through a seven-phase process:
75
67
 
76
- 1. Discovery — understand the feature and create todos
77
- 2. Codebase exploration — inspect relevant code and patterns, optionally with parallel subagents
68
+ 1. Discovery — understand the feature and establish lightweight progress tracking
69
+ 2. Codebase exploration — inspect relevant code and patterns, optionally with read-only helper passes
78
70
  3. Clarifying questions — resolve ambiguity before design
79
71
  4. Architecture design — compare minimal, clean, and pragmatic approaches
80
72
  5. Implementation — only after approval, with a single writer
81
- 6. Quality review — parallel fresh-context reviewers inspect the diff
73
+ 6. Quality review — inspect the diff from correctness, validation, and maintainability perspectives
82
74
  7. Validation and summary — run focused checks and summarize changes
83
75
 
84
76
  ## Package contents
@@ -91,8 +83,6 @@ pi-feature-dev/
91
83
  └── SKILL.md
92
84
  ```
93
85
 
94
- The package intentionally does **not** ship custom subagent definitions. It uses the built-in roles from `pi-subagents` (`scout`, `context-builder`, `planner`, `worker`, `reviewer`, `researcher`, `oracle`) so it stays small and tracks improvements in that package.
95
-
96
86
  ## Release
97
87
 
98
88
  Releases are automated with GitHub Actions and semantic-release.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-feature-dev",
3
- "version": "1.0.0",
4
- "description": "Pi-native guided feature development workflow using subagents, todos, clarification questions, implementation, and review loops.",
3
+ "version": "1.2.0",
4
+ "description": "Portable guided feature development workflow for coding assistants, packaged as a Pi skill.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "repository": {
@@ -16,11 +16,9 @@
16
16
  "access": "public"
17
17
  },
18
18
  "keywords": [
19
- "pi-package",
20
- "pi",
21
- "pi-coding-agent",
22
19
  "feature-development",
23
- "subagents",
20
+ "coding-assistants",
21
+ "workflow",
24
22
  "skills"
25
23
  ],
26
24
  "files": [
@@ -1,47 +1,29 @@
1
1
  ---
2
2
  name: feature-dev
3
- description: Structured feature development workflow for Pi. Use for non-trivial feature work requiring codebase exploration, clarification, architecture trade-offs, implementation approval, subagent review, and final summary.
4
- compatibility: "Pi. Best with pi-subagents, @juicesharp/rpiv-todo, and @juicesharp/rpiv-ask-user-question installed; optional context-mode, pi-web-access, and pi-intercom improve the workflow."
3
+ description: Structured feature development workflow for coding assistants. Use for non-trivial feature work requiring codebase exploration, clarification, architecture trade-offs, implementation approval, review, and final summary.
4
+ compatibility: "Portable across coding assistant environments. Optional task tracking, structured-question, delegation, search, and browser tools can improve the workflow, but are not required."
5
5
  ---
6
6
 
7
- # Feature Dev for Pi
7
+ # Feature Dev
8
8
 
9
- Run a guided, Pi-native feature development workflow. This skill replaces the Claude Code `feature-dev` command/agents with Pi tools:
9
+ Run a guided, tool-agnostic feature development workflow. Adapt each step to the capabilities of the current environment:
10
10
 
11
- - `todo` for phase/progress tracking
12
- - `subagent` from `pi-subagents` for scout/planner/worker/reviewer fanout
13
- - `ask_user_question` for structured decisions and multiple-choice clarification
14
- - `web_search`, `code_search`, and `fetch_content` for external context when needed
15
- - `intercom` only when coordinating with separate live Pi sessions or subagent escalations
11
+ - Track phase/progress state with any available planning mechanism, or keep a concise written checklist in chat.
12
+ - Ask clarification and decision questions in normal chat; use structured-choice UI/tools only if available.
13
+ - Use search, documentation, browser, or repository tools for external context when needed.
14
+ - For broad work, optionally delegate read-only exploration, planning, or review to independent helpers if the environment supports it.
16
15
 
17
- This skill is for the parent/orchestrator session. Child subagents should receive concrete role-specific tasks; do not ask child agents to run this workflow or spawn their own subagents.
16
+ This workflow is for the main orchestrating session. Keep responsibilities clear: one writer owns file edits, while any optional helpers stay read-only unless the user explicitly approves a different handoff.
18
17
 
19
18
  ## Operating Rules
20
19
 
21
20
  1. **Clarify before coding.** Do not implement until scope, acceptance criteria, constraints, and non-goals are clear enough.
22
21
  2. **Explore before designing.** Inspect relevant existing code and patterns before proposing architecture.
23
22
  3. **Ask before implementation.** Present the preferred architecture and wait for explicit user approval before editing.
24
- 4. **Keep writes single-threaded.** Use the parent session or one `worker` subagent as the writer. Never run parallel writers in the same checkout.
25
- 5. **Review after implementation.** Use fresh-context reviewers to inspect the diff, synthesize findings, then apply only approved/worthwhile fixes.
26
- 6. **Use available tools only.** If a recommended tool is unavailable, continue with the closest Pi-native alternative and state the fallback briefly.
27
- 7. **For large outputs.** If context-mode tools are available, use them for test/build/log/git output. Otherwise run focused commands and summarize concise output.
28
-
29
- Before executing any subagent, call `subagent({ action: "list" })` and only use executable/non-disabled agents from the result.
30
-
31
- ## Recommended Agent Mapping
32
-
33
- Use built-in `pi-subagents` roles by default:
34
-
35
- | Need | Pi role |
36
- | --- | --- |
37
- | Codebase exploration | `scout` or `context-builder` |
38
- | Architecture planning | `planner` |
39
- | Implementation handoff | `worker` |
40
- | Quality review | `reviewer` |
41
- | External evidence | `researcher` |
42
- | Decision consistency/advisory review | `oracle` |
43
-
44
- Do not create custom agents unless the user explicitly wants persistent role overrides. This package intentionally works with built-in Pi subagents.
23
+ 4. **Keep writes single-threaded.** Use the main session or one dedicated writer. Never run parallel writers in the same checkout.
24
+ 5. **Review after implementation.** Inspect the diff from fresh perspectives, synthesize findings, then apply only approved/worthwhile fixes.
25
+ 6. **Use available tools only.** If a recommended capability is unavailable, continue with the closest alternative and state the fallback briefly.
26
+ 7. **For large outputs.** Use any available large-output/log-processing tools. Otherwise run focused commands and summarize concise output.
45
27
 
46
28
  ## Workflow
47
29
 
@@ -51,51 +33,30 @@ Goal: understand what needs to be built.
51
33
 
52
34
  Actions:
53
35
 
54
- 1. Create phase todos with `todo` for Discovery, Exploration, Clarification, Architecture, Implementation, Review, and Summary/Validation. Keep exactly one todo `in_progress` at a time.
36
+ 1. Establish lightweight phase tracking for Discovery, Exploration, Clarification, Architecture, Implementation, Review, and Summary/Validation. Keep exactly one phase active at a time when your environment supports explicit progress state.
55
37
  2. If the feature request is unclear, ask concise questions before doing deep work:
56
38
  - What problem should this solve?
57
39
  - What should the user-visible behavior be?
58
40
  - What constraints, deadlines, compatibility requirements, or non-goals matter?
59
41
  3. Summarize your understanding and call out assumptions.
60
42
 
61
- Use `ask_user_question` only for questions with 2-4 clear choices. For open-ended requirements, ask normally in chat.
43
+ Use structured-choice prompts only for questions with 2-4 clear choices. For open-ended requirements, ask normally in chat.
62
44
 
63
45
  ### Phase 2 — Codebase Exploration
64
46
 
65
47
  Goal: understand relevant code and project patterns at high and low levels.
66
48
 
67
- Default subagent fanout for non-trivial features:
68
-
69
- ```ts
70
- subagent({
71
- action: "list"
72
- })
73
-
74
- subagent({
75
- tasks: [
76
- {
77
- agent: "scout",
78
- task: "Find features similar to <feature> and trace their implementation. Return key entry points, data flow, conventions, risks, and 5-10 essential files to read. Do not edit files."
79
- },
80
- {
81
- agent: "context-builder",
82
- task: "Map the architecture, abstractions, module boundaries, and integration points relevant to <feature>. Return file:line references and 5-10 essential files to read. Do not edit files."
83
- },
84
- {
85
- agent: "scout",
86
- task: "Identify tests, validation patterns, UI/API patterns, configuration, and extension points relevant to <feature>. Return concrete files and gaps. Do not edit files."
87
- }
88
- ],
89
- concurrency: 3,
90
- context: "fresh"
91
- })
92
- ```
49
+ For non-trivial features, perform these read-only exploration passes. Use independent helpers only if available; otherwise do the passes yourself:
93
50
 
94
- Adapt the tasks to the project. Use two agents for medium work; three for broad features. Skip subagents for trivial single-file changes, but still inspect relevant files yourself.
51
+ 1. Find features similar to the requested feature and trace their implementation. Return key entry points, data flow, conventions, risks, and 5-10 essential files to read.
52
+ 2. Map architecture, abstractions, module boundaries, and integration points relevant to the feature. Return file:line references and 5-10 essential files to read.
53
+ 3. Identify tests, validation patterns, UI/API patterns, configuration, and extension points relevant to the feature. Return concrete files and gaps.
95
54
 
96
- After subagents return:
55
+ Use two passes for medium work; three for broad features. Skip delegation for trivial single-file changes, but still inspect relevant files yourself.
97
56
 
98
- 1. Read the essential files they identified.
57
+ After exploration:
58
+
59
+ 1. Read the essential files identified.
99
60
  2. Follow imports/callers/tests/config as needed.
100
61
  3. Present a concise findings summary: similar patterns, relevant files, likely integration points, risks, and unknowns.
101
62
 
@@ -114,7 +75,7 @@ Review the feature request plus exploration findings. Identify gaps in:
114
75
  - tests and validation expectations
115
76
  - rollout/feature flags/documentation needs
116
77
 
117
- Ask all necessary questions in one organized batch. Use `ask_user_question` for structured decisions; otherwise ask a numbered free-form list. Wait for answers before architecture design.
78
+ Ask all necessary questions in one organized batch. Use structured-choice prompts for discrete decisions when available; otherwise ask a numbered free-form list. Wait for answers before architecture design.
118
79
 
119
80
  If the user says “whatever you think is best,” state your recommendation and get explicit confirmation unless the decision is low-risk and reversible.
120
81
 
@@ -122,28 +83,18 @@ If the user says “whatever you think is best,” state your recommendation and
122
83
 
123
84
  Goal: compare viable implementation approaches and get approval.
124
85
 
125
- For complex work, run 2-3 planning passes with different trade-off lenses:
126
-
127
- ```ts
128
- subagent({
129
- tasks: [
130
- {
131
- agent: "planner",
132
- task: "Design a minimal-change implementation for <feature> using the exploration findings and clarified requirements below. Include files to change, build sequence, risks, validation. Do not edit files.\n\n<context>..."
133
- },
134
- {
135
- agent: "planner",
136
- task: "Design a clean-architecture implementation for <feature> prioritizing maintainability and testability. Include files to change, build sequence, risks, validation. Do not edit files.\n\n<context>..."
137
- },
138
- {
139
- agent: "planner",
140
- task: "Design a pragmatic balanced implementation for <feature>. Include files to change, build sequence, risks, validation. Do not edit files.\n\n<context>..."
141
- }
142
- ],
143
- concurrency: 3,
144
- context: "fresh"
145
- })
146
- ```
86
+ For complex work, run 2-3 planning passes with different trade-off lenses. These can be separate self-review passes or delegated read-only planning if available:
87
+
88
+ 1. **Minimal-change implementation** — smallest safe diff using existing patterns.
89
+ 2. **Clean-architecture implementation** — prioritize maintainability, testability, and clear boundaries.
90
+ 3. **Pragmatic balanced implementation** — balance implementation cost, maintainability, and risk.
91
+
92
+ Each pass should include:
93
+
94
+ - files to change
95
+ - build sequence
96
+ - risks and trade-offs
97
+ - validation plan
147
98
 
148
99
  Then synthesize:
149
100
 
@@ -153,7 +104,7 @@ Then synthesize:
153
104
  - your recommendation and reasoning
154
105
  - validation plan
155
106
 
156
- Ask the user which approach to use. `ask_user_question` is ideal here with options like Minimal, Pragmatic, Clean.
107
+ Ask the user which approach to use. A structured choice is helpful when available, with options like Minimal, Pragmatic, Clean.
157
108
 
158
109
  ### Phase 5 — Implementation
159
110
 
@@ -163,16 +114,33 @@ Do not start without explicit approval.
163
114
 
164
115
  Implementation options:
165
116
 
166
- - **Parent writes directly** for small/medium scoped changes where you already have enough context.
167
- - **One `worker` subagent** for larger changes after approval. Provide a complete handoff: requirements, chosen approach, files/areas, non-goals, acceptance criteria, validation, and escalation rules.
117
+ - **Main session writes directly** for small/medium scoped changes where enough context is already available.
118
+ - **One dedicated writer** for larger changes after approval, if the environment supports handoff. Provide requirements, chosen approach, files/areas, non-goals, acceptance criteria, validation, and escalation rules.
119
+
120
+ Writer handoff shape:
121
+
122
+ ```text
123
+ Implement the approved <feature> plan.
124
+
125
+ Clarified requirements:
126
+ - ...
127
+
128
+ Chosen approach:
129
+ - ...
130
+
131
+ Likely files/areas:
132
+ - ...
168
133
 
169
- Worker handoff shape:
134
+ Non-goals:
135
+ - ...
170
136
 
171
- ```ts
172
- subagent({
173
- agent: "worker",
174
- task: "Implement the approved <feature> plan.\n\nClarified requirements:\n- ...\n\nChosen approach:\n- ...\n\nLikely files/areas:\n- ...\n\nNon-goals:\n- ...\n\nAcceptance criteria:\n- ...\n\nValidation expected:\n- ...\n\nUse one writer thread only. Ask before unapproved product, API, or architecture changes. Summarize files changed and validation results."
175
- })
137
+ Acceptance criteria:
138
+ - ...
139
+
140
+ Validation expected:
141
+ - ...
142
+
143
+ Use one writer thread only. Ask before unapproved product, API, or architecture changes. Summarize files changed and validation results.
176
144
  ```
177
145
 
178
146
  During implementation:
@@ -180,37 +148,22 @@ During implementation:
180
148
  1. Follow existing patterns discovered earlier.
181
149
  2. Keep changes focused on the approved scope.
182
150
  3. Add or update tests when appropriate.
183
- 4. Update todos as each implementation subtask finishes.
151
+ 4. Update progress tracking as each implementation subtask finishes when such tracking is available.
184
152
  5. If a new major decision appears, stop and ask.
185
153
 
186
154
  ### Phase 6 — Quality Review
187
155
 
188
156
  Goal: catch correctness, test, and maintainability issues.
189
157
 
190
- After implementation, review the current diff. Default parallel review:
191
-
192
- ```ts
193
- subagent({
194
- tasks: [
195
- {
196
- agent: "reviewer",
197
- task: "Review the current diff for correctness, regressions, edge cases, and security issues. Inspect changed files directly. Do not edit files. Report only evidence-backed issues with file/line references."
198
- },
199
- {
200
- agent: "reviewer",
201
- task: "Review the current diff for tests and validation quality. Inspect changed files directly. Do not edit files. Report missing high-value tests or broken validation with file/line references."
202
- },
203
- {
204
- agent: "reviewer",
205
- task: "Review the current diff for simplicity, DRYness, maintainability, and project convention fit. Inspect changed files directly. Do not edit files. Report only important issues with file/line references."
206
- }
207
- ],
208
- concurrency: 3,
209
- context: "fresh"
210
- })
211
- ```
158
+ After implementation, review the current diff. For non-trivial changes, inspect it from these independent perspectives yourself or with read-only review helpers if available:
159
+
160
+ 1. Correctness, regressions, edge cases, and security.
161
+ 2. Tests and validation quality.
162
+ 3. Simplicity, maintainability, duplication, and project convention fit.
163
+
164
+ Each review perspective should inspect changed files directly and report only evidence-backed issues with file/line references.
212
165
 
213
- Synthesize reviewer output into:
166
+ Synthesize review output into:
214
167
 
215
168
  - blockers / must-fix now
216
169
  - fixes worth doing now
@@ -226,8 +179,8 @@ Goal: prove the feature is complete and document outcomes.
226
179
  Actions:
227
180
 
228
181
  1. Run focused validation: tests, typecheck, lint, build, or manual checks appropriate to the project.
229
- 2. If validation fails, keep the current todo `in_progress`, explain the blocker, and fix or ask for direction.
230
- 3. When validation passes or the user accepts known limitations, mark todos complete.
182
+ 2. If validation fails, keep the current phase active, explain the blocker, and fix or ask for direction.
183
+ 3. When validation passes or the user accepts known limitations, mark the workflow complete in whatever progress tracking is available.
231
184
  4. Summarize:
232
185
  - what was built
233
186
  - key decisions made
@@ -0,0 +1,196 @@
1
+ ---
2
+ name: plan-make
3
+ description: Create structured implementation plans in docs/plans/ for feature work, bug fixes, refactors, migrations, or unclear implementation requests. Use when the user asks to make an implementation plan, planning document, task checklist, or staged coding plan before implementation.
4
+ ---
5
+
6
+ # Implementation Plan Creation
7
+
8
+ Create an implementation plan in `docs/plans/YYYYMMDD-title.md` after focused discovery and user-guided scope decisions.
9
+
10
+ ## Workflow
11
+
12
+ 1. Parse the user's request to identify the likely intent: feature development, bug fix, refactor, migration, or generic exploration.
13
+ 2. Gather context before asking questions. Inspect relevant files, project structure, tests, recent status, and existing patterns.
14
+ 3. Present a concise context summary, including likely affected areas and any uncertainty.
15
+ 4. Ask focused questions one at a time. Prefer multiple-choice questions with a recommended option when the answer can be bounded.
16
+ 5. If there are multiple viable implementation paths, present 2-3 approaches with trade-offs and recommend one. Ask the user to choose before writing the plan. Skip this only when the path is obvious or the user already specified the approach.
17
+ 6. Preserve enough context in the plan for an isolated reviewer to understand the request, decisions, assumptions, and non-goals without hidden conversation context.
18
+ 7. Create the plan file under `docs/plans/` using the current date and a short slug.
19
+ 8. After creating the plan, ask the user whether to review, start implementation, or stop after the plan.
20
+
21
+ ## Project Guidance Discovery
22
+
23
+ Read relevant project guidance when present:
24
+ - `AGENTS.md`
25
+ - `CLAUDE.md`
26
+ - nearby README or contributor docs
27
+
28
+ Use these files to identify conventions, preferred libraries, test expectations, and existing workflow rules. Limit context loading to guidance relevant to the requested change.
29
+
30
+ ## Discovery Guidance
31
+
32
+ For feature development:
33
+
34
+ - Locate related code, patterns, and nearby tests.
35
+ - Identify affected components, dependencies, and user-facing surfaces.
36
+
37
+ For bug fixing:
38
+
39
+ - Look for failing tests, logs, stack traces, reproduction clues, and likely owner code.
40
+ - Check recent changes in the problem area when available.
41
+
42
+ For refactors and migrations:
43
+
44
+ - Identify all affected files and integration points.
45
+ - Check current test coverage and compatibility requirements.
46
+
47
+ For generic or unclear requests:
48
+
49
+ - Check `git status`, top-level structure, package metadata, and primary language/framework.
50
+ - Infer the likely goal from current work, but state uncertainty explicitly.
51
+
52
+ ## Question Flow
53
+
54
+ Ask only what is needed to make the plan accurate. Use one question per turn.
55
+
56
+ Typical sequence:
57
+
58
+ 1. Main goal.
59
+ 2. Scope or affected components.
60
+ 3. Constraints or non-goals.
61
+ 4. Testing preference: TDD or regular code-first with tests in each task.
62
+ 5. Short plan title.
63
+
64
+ Do not ask all five if discovery already answers some of them.
65
+
66
+ ## Approach Selection
67
+
68
+ When alternatives are useful, present them conversationally:
69
+
70
+ ```markdown
71
+ I see three approaches:
72
+
73
+ **Option A: [name]** (recommended)
74
+ - How it works: ...
75
+ - Pros: ...
76
+ - Cons: ...
77
+
78
+ **Option B: [name]**
79
+ - How it works: ...
80
+ - Pros: ...
81
+ - Cons: ...
82
+
83
+ Which direction do you prefer?
84
+ ```
85
+
86
+ If repeated code is involved, explicitly compare duplication versus abstraction and ask when both are reasonable.
87
+
88
+ ## Plan Template
89
+
90
+ Use this structure and adapt it to the project:
91
+
92
+ ```markdown
93
+ # [Plan Title]
94
+
95
+ ## Overview
96
+ - Clear description of the feature/change.
97
+ - Problem it solves and key benefits.
98
+ - How it integrates with the existing system.
99
+
100
+ ## Context
101
+ - Files/components involved: [list from discovery]
102
+ - Related patterns found: [patterns discovered]
103
+ - Dependencies identified: [dependencies]
104
+
105
+ ## Review Handoff
106
+ - Original request: [user's requested outcome]
107
+ - Key decisions made during planning: [brief bullets]
108
+ - Explicit non-goals: [if any]
109
+ - Open questions or assumptions: [if any]
110
+
111
+ ## Development Approach
112
+ - Testing approach: [TDD / Regular]
113
+ - Complete each task fully before moving to the next.
114
+ - Make small, focused changes.
115
+ - Every code-change task must include new or updated tests.
116
+ - All tests for a task must pass before starting the next task.
117
+ - Update this plan when scope changes during implementation.
118
+
119
+ ## Testing Strategy
120
+ - Unit tests required for every code-change task.
121
+ - E2E tests required for UI flows when the project has an E2E setup.
122
+ - Cover success, error, and edge cases.
123
+
124
+ ## Progress Tracking
125
+ - Mark completed items with `[x]` immediately when done.
126
+ - Add newly discovered tasks with `+` prefix.
127
+ - Document blockers with `BLOCKED:` prefix.
128
+ - Keep the plan in sync with actual work.
129
+
130
+ ## What Goes Where
131
+ - Implementation Steps: tasks achievable within this codebase.
132
+ - Post-Completion: manual or external-system work, without checkboxes.
133
+
134
+ ## Implementation Steps
135
+
136
+ ### Task 1: [specific name]
137
+ **Files:**
138
+ - Create: `exact/path/to/new_file`
139
+ - Modify: `exact/path/to/existing_file`
140
+
141
+ - [ ] [specific code action with file reference]
142
+ - [ ] [specific test action for success cases]
143
+ - [ ] [specific test action for error/edge cases]
144
+ - [ ] Run relevant tests and confirm they pass before next task.
145
+
146
+ ### Task N-1: Verify Acceptance Criteria
147
+ - [ ] Verify all Overview requirements are implemented.
148
+ - [ ] Verify edge cases are handled.
149
+ - [ ] Run full test suite: `[command]`
150
+ - [ ] Run E2E tests if applicable: `[command]`
151
+
152
+ ### Task N: Final Documentation
153
+ - [ ] Update README or project docs if needed.
154
+ - [ ] Update agent/project instructions if new patterns were discovered.
155
+ - [ ] Move this plan to `docs/plans/completed/`.
156
+
157
+ ## Technical Details
158
+ - Data structures and changes.
159
+ - Parameters and formats.
160
+ - Processing flow.
161
+
162
+ ## Post-Completion
163
+ Items requiring manual intervention or external systems.
164
+
165
+ **Manual verification**:
166
+ - [scenario]
167
+
168
+ **External system updates**:
169
+ - [system/configuration/integration]
170
+ ```
171
+
172
+ ## Execution Rules
173
+
174
+ If the user chooses to start implementation from the plan:
175
+
176
+ 1. Complete one task at a time.
177
+ 2. Write or update tests in the same task as the code change.
178
+ 3. Run the relevant test command before moving to the next task.
179
+ 4. Mark task checkboxes as soon as work is completed.
180
+ 5. If tests fail, fix failures before proceeding.
181
+ 6. If a task cannot fully pass until a later task, still write the test, note the dependency in the plan, and revisit it when the dependent task completes.
182
+ 7. On completion, run the final verification commands and move the plan to `docs/plans/completed/`.
183
+
184
+ ## Next Step Prompt
185
+
186
+ After creating the file, tell the user:
187
+
188
+ ```text
189
+ Created plan: docs/plans/YYYYMMDD-title.md
190
+ ```
191
+
192
+ Then ask what to do next. Offer options such as:
193
+
194
+ - Review the plan.
195
+ - Start implementation.
196
+ - Stop after the plan.
@@ -0,0 +1,201 @@
1
+ ---
2
+ name: plan-review
3
+ description: Review implementation plans before execution. Use after a plan is created or when the user asks to validate a plan for correctness, scope, over-engineering, missing tests, unclear tasks, or project-convention fit. Reviews plan files such as docs/plans/*.md or a user-provided plan path. Prefer isolated read-only review when the host and policy support subagents, fresh-context workers, or review-only agents.
4
+ ---
5
+
6
+
7
+ You are an expert plan reviewer specializing in validating implementation plans before execution. Your role is to ensure plans solve the stated problem correctly, avoid over-engineering, include proper testing, and follow project conventions.
8
+
9
+ **CRITICAL: READ-ONLY. Never modify files, only analyze and report findings.**
10
+
11
+ **CRITICAL: Every finding MUST include `[plan-review]` tag and reference specific plan sections.**
12
+
13
+ ## Isolation Protocol
14
+
15
+ Prefer an isolated reviewer when the host agent and active policy support subagents, fresh-context workers, review-only agents, or equivalent delegation.
16
+
17
+ Give the isolated reviewer only:
18
+ - The plan path or plan text
19
+ - The original user request, if available
20
+ - The repository root
21
+ - Any explicit review focus from the user
22
+
23
+ Do not pass the plan creator's hidden reasoning, conclusions, intended fixes, confidence claims, or prior review commentary.
24
+
25
+ If isolated review is unavailable, perform a local read-only review. Treat prior planning context as untrusted, reload the plan and relevant project files from disk, and judge the plan against the repository and the original request.
26
+
27
+ ## Expected Plan Contract
28
+
29
+ A good implementation plan should include:
30
+ - The problem being solved
31
+ - Relevant files, systems, or workflows
32
+ - Project context and existing patterns
33
+ - A development approach
34
+ - Ordered implementation tasks
35
+ - Per-task code actions
36
+ - Per-task test actions
37
+ - Verification commands
38
+ - Acceptance criteria or final validation
39
+ - Explicit non-goals or post-completion work when relevant
40
+
41
+ If the plan was created by `plan-make`, also check that it follows the expected structure from that skill, but do not require loading `plan-make` to perform this review.
42
+
43
+ Key rules for implementation tasks:
44
+ - Each task = one logical unit (one function, one endpoint, one component, one migration step, etc.)
45
+ - Use specific descriptive names, not generic "[Core Logic]" or "[Implementation]"
46
+ - Aim for ~5 checkboxes per task (more is OK if logically atomic)
47
+ - Each code-change task MUST include writing/updating tests before moving to the next task
48
+ - Tests are separate checklist items, not bundled with implementation
49
+ - Relevant tests must be run and pass before moving to the next task
50
+
51
+ ## Review Workflow
52
+
53
+ ### Step 1: Locate Plan File
54
+
55
+ 1. If the user provided a plan path, review that plan
56
+ 2. Check `docs/plans/` for plan files (exclude `completed/` subdirectory)
57
+ 3. If multiple plans exist and context is unclear, list available plans and ask user which to review
58
+ 4. If no plans found, inform user and ask for plan location
59
+
60
+ ### Step 2: Load Project Context
61
+
62
+ Read relevant project guidance when present:
63
+ - `AGENTS.md`
64
+ - `CLAUDE.md`
65
+ - nearby README or contributor docs
66
+
67
+ Then:
68
+ 1. Check for existing code patterns the plan should follow
69
+ 2. Understand the codebase structure relevant to the plan
70
+ 3. Limit context loading to files relevant to the plan's scope
71
+
72
+ ### Step 3: Analyze Plan
73
+
74
+ **Review Checklist:**
75
+
76
+ #### Problem Definition (Critical)
77
+ - Plan clearly states what problem is being solved
78
+ - Problem description is specific, not vague
79
+ - Success criteria are implicit or explicit
80
+
81
+ #### Solution Correctness (Critical)
82
+ - Proposed solution actually addresses the stated problem
83
+ - No missing steps that would leave problem unsolved
84
+ - Edge cases considered
85
+
86
+ #### Scope Assessment (Important)
87
+ - Scope is appropriate - not too broad, not too narrow
88
+ - No scope creep (unrelated features bundled in)
89
+ - Dependencies between tasks are logical
90
+
91
+ #### Over-Engineering Detection (Critical)
92
+ Patterns to detect:
93
+ - Unnecessary abstractions
94
+ - Premature generalization
95
+ - Pattern abuse (using design patterns where simple code suffices)
96
+ - Features "just in case" (YAGNI violations)
97
+ - Excessive layering
98
+ - Complex where simple would work
99
+
100
+ #### Testing Requirements (Critical)
101
+ Per expected plan contract:
102
+ - Every code-change task includes test writing as separate checklist items
103
+ - Tests for success AND error cases specified
104
+ - Relevant test commands are listed and must pass before the next task
105
+ - Test locations specified (path to test file)
106
+
107
+ #### Maintainability (Important)
108
+ - Solution will produce readable, maintainable code
109
+ - Follows project conventions from loaded project instructions
110
+ - No clever solutions where clear would work
111
+ - Appropriate decomposition
112
+
113
+ #### Task Granularity (Important)
114
+ - Tasks are one logical unit (not multiple features bundled)
115
+ - Specific names, not generic like "[Core Logic]"
116
+ - Approximately 5 checkboxes per task (more OK if atomic)
117
+ - Clear progression from task to task
118
+
119
+ #### Convention Adherence (Important)
120
+ - Follows naming conventions from loaded project instructions
121
+ - Matches existing code patterns in the project
122
+ - Uses project's preferred libraries/approaches
123
+ - Comment style matches project rules
124
+ - Aligns with user-provided custom rules (if loaded above)
125
+
126
+ ## Output Format
127
+
128
+ ```
129
+ ## Plan Review: [plan-filename]
130
+
131
+ ### Summary
132
+ Brief assessment of plan quality (2-3 sentences)
133
+
134
+ ### Critical Issues
135
+ Issues that would cause the plan to fail or produce incorrect results.
136
+
137
+ 1. [plan-review] **Section: Implementation Steps > Task 2** (severity: critical)
138
+ - Issue: Task bundles multiple unrelated features (user auth + logging)
139
+ - Impact: Will create tangled code, harder to test and review
140
+ - Fix: Split into Task 2a (user auth) and Task 2b (logging)
141
+
142
+ ### Important Issues
143
+ Issues affecting quality or maintainability.
144
+
145
+ 1. [plan-review] **Section: Technical Details** (severity: important)
146
+ - Issue: Proposes custom validation library when project uses go-playground/validator
147
+ - Impact: Inconsistent with existing codebase patterns
148
+ - Fix: Use existing validator with custom rules
149
+
150
+ ### Minor Issues
151
+ Suggestions for improvement.
152
+
153
+ 1. [plan-review] **Section: Overview** (severity: minor)
154
+ - Issue: Success criteria not explicitly stated
155
+ - Fix: Add "Acceptance Criteria" subsection
156
+
157
+ ### Over-Engineering Concerns
158
+ Specific patterns detected that add unnecessary complexity:
159
+
160
+ - [plan-review] **Task 4**: Proposes interface for single implementation - defer abstraction until needed
161
+ - [plan-review] **Technical Details**: Custom error type hierarchy when simple wrapped errors suffice
162
+
163
+ ### Testing Coverage Assessment
164
+ - Tasks with proper test requirements: X/Y
165
+ - Missing test specifications: [list tasks]
166
+ - Test-first (TDD) compliance: [yes/partial/no]
167
+
168
+ ### Verdict
169
+ **[APPROVE / APPROVE WITH NOTES / NEEDS REVISION]**
170
+
171
+ [If NEEDS REVISION]:
172
+ Priority fixes before implementation:
173
+ 1. [most critical fix]
174
+ 2. [second priority]
175
+ 3. [third priority]
176
+ ```
177
+
178
+ ## Key Principles
179
+
180
+ 1. **Solve the actual problem** - Plans must address the stated problem, not adjacent issues
181
+ 2. **YAGNI ruthlessly** - Flag anything "for future flexibility" without current need
182
+ 3. **Tests are mandatory** - Every code-change task must include test requirements
183
+ 4. **Match existing patterns** - New code should look like it belongs in the codebase
184
+ 5. **Simple over clever** - Prefer straightforward solutions
185
+ 6. **Ask when unclear** - If plan context is ambiguous, ask user rather than guess
186
+
187
+ ## When NOT to Flag
188
+
189
+ - Reasonable abstractions that solve real problems
190
+ - Testing infrastructure that the plan will actually use
191
+ - Complexity that's inherent to the problem domain
192
+ - Patterns that match existing codebase conventions
193
+
194
+ ## Confidence Scoring
195
+
196
+ Rate severity as:
197
+ - **Critical**: Would cause plan failure or major issues
198
+ - **Important**: Affects quality but plan could work
199
+ - **Minor**: Suggestions for polish
200
+
201
+ Only report issues you're confident about. If unsure whether something is over-engineering, note it as a question rather than a finding.