pi-feature-dev 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 pi-feature-dev contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,126 @@
1
+ # pi-feature-dev
2
+
3
+ Pi-native guided feature development workflow.
4
+
5
+ This package adapts a Claude Code-style feature development workflow to Pi using Pi packages and tools:
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
11
+
12
+ ## Install
13
+
14
+ From npm:
15
+
16
+ ```bash
17
+ pi install npm:pi-feature-dev
18
+ ```
19
+
20
+ From this local repo:
21
+
22
+ ```bash
23
+ pi install ~/Projects/pi-feature-dev
24
+ ```
25
+
26
+ Or for one run only:
27
+
28
+ ```bash
29
+ pi -e ~/Projects/pi-feature-dev
30
+ ```
31
+
32
+ If installing for a project, run from that project and use Pi's local install flag if desired:
33
+
34
+ ```bash
35
+ pi install -l ~/Projects/pi-feature-dev
36
+ ```
37
+
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:
49
+
50
+ ```bash
51
+ pi install npm:context-mode
52
+ pi install npm:pi-web-access
53
+ pi install npm:pi-intercom
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ Skill command:
59
+
60
+ ```text
61
+ /skill:feature-dev Add OAuth login with Google and GitHub
62
+ ```
63
+
64
+ Natural language also works when Pi's skill matcher triggers:
65
+
66
+ ```text
67
+ Use feature-dev to implement API rate limiting.
68
+ ```
69
+
70
+ This package is intentionally skill-only. It does not provide a `/feature-dev` prompt template shortcut; use `/skill:feature-dev` for explicit invocation.
71
+
72
+ ## What it does
73
+
74
+ The skill guides Pi through a seven-phase process:
75
+
76
+ 1. Discovery — understand the feature and create todos
77
+ 2. Codebase exploration — inspect relevant code and patterns, optionally with parallel subagents
78
+ 3. Clarifying questions — resolve ambiguity before design
79
+ 4. Architecture design — compare minimal, clean, and pragmatic approaches
80
+ 5. Implementation — only after approval, with a single writer
81
+ 6. Quality review — parallel fresh-context reviewers inspect the diff
82
+ 7. Validation and summary — run focused checks and summarize changes
83
+
84
+ ## Package contents
85
+
86
+ ```text
87
+ pi-feature-dev/
88
+ ├── package.json
89
+ └── skills/
90
+ └── feature-dev/
91
+ └── SKILL.md
92
+ ```
93
+
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
+ ## Release
97
+
98
+ Releases are automated with GitHub Actions and semantic-release.
99
+
100
+ - Push conventional commits to `main`.
101
+ - With no existing `v*` tags, the first release will be `v1.0.0`.
102
+ - After that, semantic-release calculates the next version from commit messages.
103
+ - The workflow publishes to npm using `NPM_TOKEN`.
104
+ - GitHub release notes and git tags are created automatically.
105
+
106
+ Examples:
107
+
108
+ ```text
109
+ fix: clarify approval rules
110
+ feat: add review synthesis guidance
111
+ feat!: redesign workflow phases
112
+ ```
113
+
114
+ ## Development
115
+
116
+ Validate the package shape:
117
+
118
+ ```bash
119
+ npm test
120
+ ```
121
+
122
+ Then test in Pi without installing globally:
123
+
124
+ ```bash
125
+ pi -e ~/Projects/pi-feature-dev
126
+ ```
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
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.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/r13v/pi-feature-dev.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/r13v/pi-feature-dev/issues"
13
+ },
14
+ "homepage": "https://github.com/r13v/pi-feature-dev#readme",
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "keywords": [
19
+ "pi-package",
20
+ "pi",
21
+ "pi-coding-agent",
22
+ "feature-development",
23
+ "subagents",
24
+ "skills"
25
+ ],
26
+ "files": [
27
+ "skills/**/*",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "scripts": {
32
+ "test": "npm pack --dry-run",
33
+ "release": "semantic-release"
34
+ },
35
+ "pi": {
36
+ "skills": [
37
+ "./skills"
38
+ ]
39
+ },
40
+ "devDependencies": {
41
+ "@semantic-release/commit-analyzer": "^13.0.1",
42
+ "@semantic-release/github": "^12.0.6",
43
+ "@semantic-release/npm": "^13.1.5",
44
+ "@semantic-release/release-notes-generator": "^14.1.0",
45
+ "conventional-changelog-conventionalcommits": "^9.3.1",
46
+ "semantic-release": "^25.0.3"
47
+ }
48
+ }
@@ -0,0 +1,262 @@
1
+ ---
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."
5
+ ---
6
+
7
+ # Feature Dev for Pi
8
+
9
+ Run a guided, Pi-native feature development workflow. This skill replaces the Claude Code `feature-dev` command/agents with Pi tools:
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
16
+
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.
18
+
19
+ ## Operating Rules
20
+
21
+ 1. **Clarify before coding.** Do not implement until scope, acceptance criteria, constraints, and non-goals are clear enough.
22
+ 2. **Explore before designing.** Inspect relevant existing code and patterns before proposing architecture.
23
+ 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.
45
+
46
+ ## Workflow
47
+
48
+ ### Phase 1 — Discovery
49
+
50
+ Goal: understand what needs to be built.
51
+
52
+ Actions:
53
+
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.
55
+ 2. If the feature request is unclear, ask concise questions before doing deep work:
56
+ - What problem should this solve?
57
+ - What should the user-visible behavior be?
58
+ - What constraints, deadlines, compatibility requirements, or non-goals matter?
59
+ 3. Summarize your understanding and call out assumptions.
60
+
61
+ Use `ask_user_question` only for questions with 2-4 clear choices. For open-ended requirements, ask normally in chat.
62
+
63
+ ### Phase 2 — Codebase Exploration
64
+
65
+ Goal: understand relevant code and project patterns at high and low levels.
66
+
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
+ ```
93
+
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.
95
+
96
+ After subagents return:
97
+
98
+ 1. Read the essential files they identified.
99
+ 2. Follow imports/callers/tests/config as needed.
100
+ 3. Present a concise findings summary: similar patterns, relevant files, likely integration points, risks, and unknowns.
101
+
102
+ ### Phase 3 — Clarifying Questions
103
+
104
+ Goal: resolve ambiguity before architecture.
105
+
106
+ Review the feature request plus exploration findings. Identify gaps in:
107
+
108
+ - scope boundaries and non-goals
109
+ - user-visible behavior and acceptance criteria
110
+ - edge cases and error handling
111
+ - data model/API/schema changes
112
+ - migration/backward compatibility
113
+ - performance/security/accessibility requirements
114
+ - tests and validation expectations
115
+ - rollout/feature flags/documentation needs
116
+
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.
118
+
119
+ 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
+
121
+ ### Phase 4 — Architecture Design
122
+
123
+ Goal: compare viable implementation approaches and get approval.
124
+
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
+ ```
147
+
148
+ Then synthesize:
149
+
150
+ - brief summary of each approach
151
+ - concrete file/component differences
152
+ - trade-offs
153
+ - your recommendation and reasoning
154
+ - validation plan
155
+
156
+ Ask the user which approach to use. `ask_user_question` is ideal here with options like Minimal, Pragmatic, Clean.
157
+
158
+ ### Phase 5 — Implementation
159
+
160
+ Goal: build the approved feature.
161
+
162
+ Do not start without explicit approval.
163
+
164
+ Implementation options:
165
+
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.
168
+
169
+ Worker handoff shape:
170
+
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
+ })
176
+ ```
177
+
178
+ During implementation:
179
+
180
+ 1. Follow existing patterns discovered earlier.
181
+ 2. Keep changes focused on the approved scope.
182
+ 3. Add or update tests when appropriate.
183
+ 4. Update todos as each implementation subtask finishes.
184
+ 5. If a new major decision appears, stop and ask.
185
+
186
+ ### Phase 6 — Quality Review
187
+
188
+ Goal: catch correctness, test, and maintainability issues.
189
+
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
+ ```
212
+
213
+ Synthesize reviewer output into:
214
+
215
+ - blockers / must-fix now
216
+ - fixes worth doing now
217
+ - optional improvements
218
+ - feedback to ignore/defer
219
+
220
+ If the user already approved auto-fixing review findings, apply the “must-fix” and “worth doing now” items with one writer. Otherwise ask whether to fix now, defer, or proceed as-is.
221
+
222
+ ### Phase 7 — Validation and Summary
223
+
224
+ Goal: prove the feature is complete and document outcomes.
225
+
226
+ Actions:
227
+
228
+ 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.
231
+ 4. Summarize:
232
+ - what was built
233
+ - key decisions made
234
+ - files modified
235
+ - validation performed and results
236
+ - known limitations
237
+ - suggested next steps
238
+
239
+ ## Lightweight Mode
240
+
241
+ Use a reduced workflow for small but non-trivial changes:
242
+
243
+ 1. Clarify scope briefly.
244
+ 2. Inspect relevant files directly.
245
+ 3. Present one recommended implementation approach.
246
+ 4. Ask for approval.
247
+ 5. Implement with one writer.
248
+ 6. Run focused validation.
249
+ 7. Summarize.
250
+
251
+ Still do not skip clarification, approval before edits, or validation.
252
+
253
+ ## When Not to Use
254
+
255
+ Avoid this full workflow for:
256
+
257
+ - single-line fixes
258
+ - mechanical renames
259
+ - formatting-only changes
260
+ - urgent hotfixes where the user explicitly asks for the fastest safe patch
261
+
262
+ For those, use normal focused coding behavior and optionally borrow only the clarification/review parts.