pi-feature-dev 1.1.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/package.json +1 -4
- package/skills/plan-make/SKILL.md +196 -0
- package/skills/plan-review/SKILL.md +201 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-feature-dev",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Portable guided feature development workflow for coding assistants, packaged as a Pi skill.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,9 +16,6 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
|
-
"pi-package",
|
|
20
|
-
"pi",
|
|
21
|
-
"pi-coding-agent",
|
|
22
19
|
"feature-development",
|
|
23
20
|
"coding-assistants",
|
|
24
21
|
"workflow",
|
|
@@ -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.
|