pi-feature-dev 1.3.0 → 1.5.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
@@ -19,8 +19,16 @@ isolated workers, Git task commits, internal reviews, finalize, and a portable
19
19
  run summary. It is portable across host agents that provide fresh-context
20
20
  isolated workers and Git access.
21
21
 
22
+ The `grill` skill runs a dependency-aware interview that researches facts,
23
+ exhausts the current decision frontier round by round, sharpens domain language,
24
+ and records agreed terminology and durable architectural decisions.
25
+
22
26
  ## Install
23
27
 
28
+ ```
29
+ npx skills add https://github.com/r13v/pi-feature-dev
30
+ ```
31
+
24
32
  From npm:
25
33
 
26
34
  ```bash
@@ -56,6 +64,7 @@ versions came from:
56
64
 
57
65
  - [umputun/cc-thingz](https://github.com/umputun/cc-thingz)
58
66
  - [anthropics/claude-code feature-dev plugin](https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev)
67
+ - [mattpocock/skills batch-grill-me and domain-modeling skills](https://github.com/mattpocock/skills)
59
68
 
60
69
  ## Usage
61
70
 
@@ -79,6 +88,12 @@ Run a plan with `plan-exec`:
79
88
  /skill:plan-exec docs/plans/20260518-example.md
80
89
  ```
81
90
 
91
+ Stress-test an idea before planning or implementation:
92
+
93
+ ```text
94
+ /skill:grill Challenge the design for usage-based billing.
95
+ ```
96
+
82
97
  This package is intentionally skill-only. It does not provide prompt template shortcuts; use `/skill:<name>` for explicit Pi invocation.
83
98
 
84
99
  ## Feature-dev workflow
@@ -100,14 +115,23 @@ pi-feature-dev/
100
115
  ├── package.json
101
116
  └── skills/
102
117
  ├── feature-dev/
118
+ │ ├── agents/openai.yaml
103
119
  │ └── SKILL.md
120
+ ├── grill/
121
+ │ ├── agents/openai.yaml
122
+ │ ├── SKILL.md
123
+ │ ├── CONTEXT-FORMAT.md
124
+ │ └── ADR-FORMAT.md
104
125
  ├── plan-exec/
126
+ │ ├── agents/openai.yaml
105
127
  │ ├── SKILL.md
106
128
  │ ├── references/
107
129
  │ └── scripts/
108
130
  ├── plan-make/
131
+ │ ├── agents/openai.yaml
109
132
  │ └── SKILL.md
110
133
  └── plan-review/
134
+ ├── agents/openai.yaml
111
135
  └── SKILL.md
112
136
  ```
113
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-feature-dev",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Portable coding-agent workflows packaged as skills.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Feature Dev"
3
+ short_description: "Develop features with a guided workflow"
4
+ default_prompt: "Use $feature-dev to implement this feature through discovery, design approval, review, and validation."
@@ -0,0 +1,35 @@
1
+ # ADR Format
2
+
3
+ Store an ADR in the `docs/adr/` directory owned by the applicable context. Use root `docs/adr/` for a system-wide decision. Create the directory lazily when the first ADR is accepted.
4
+
5
+ Use sequential filenames such as `0001-event-sourced-orders.md` and `0002-postgres-for-write-model.md`. Scan the target directory for the highest existing number and increment it by one.
6
+
7
+ ## Template
8
+
9
+ ```md
10
+ # {Short title of the decision}
11
+
12
+ {In one to three sentences, state the context, the decision, and why it was chosen.}
13
+ ```
14
+
15
+ That is enough for most ADRs. Record that a decision was made and why; do not fill sections for ceremony.
16
+
17
+ ## Optional sections
18
+
19
+ Include a section only when it adds information a future reader needs:
20
+
21
+ - `status` frontmatter (`proposed`, `accepted`, `deprecated`, or `superseded by ADR-NNNN`) when the decision may be revisited.
22
+ - **Considered Options** when rejected alternatives are worth remembering.
23
+ - **Consequences** when non-obvious downstream effects need to be explicit.
24
+
25
+ ## Qualification test
26
+
27
+ Create an ADR only when all three statements are true:
28
+
29
+ 1. Reversing the decision later would be meaningfully costly.
30
+ 2. A future reader would find the choice surprising without its context.
31
+ 3. The decision resolved a real trade-off among genuine alternatives.
32
+
33
+ Qualifying decisions commonly include architectural shape, cross-context integration, lock-in-heavy technology choices, ownership boundaries, deliberate deviations from the obvious path, constraints invisible in code, and non-obvious rejected alternatives.
34
+
35
+ Skip easy-to-reverse choices, obvious implementation details, and decisions with no real alternative.
@@ -0,0 +1,61 @@
1
+ # `CONTEXT.md` Format
2
+
3
+ Use `CONTEXT.md` as an opinionated domain glossary and nothing else.
4
+
5
+ ## Structure
6
+
7
+ ```md
8
+ # {Context Name}
9
+
10
+ {One or two sentences describing what this context is and why it exists.}
11
+
12
+ ## Language
13
+
14
+ **Order**: {A one- or two-sentence definition of the term.}
15
+ _Avoid_: Purchase, transaction
16
+
17
+ **Invoice**: A request for payment sent to a customer after delivery.
18
+ _Avoid_: Bill, payment request
19
+
20
+ **Customer**: A person or organization that places orders.
21
+ _Avoid_: Client, buyer, account
22
+ ```
23
+
24
+ ## Rules
25
+
26
+ - Be opinionated. When several words describe the same concept, choose one canonical term and list the others under `_Avoid_`.
27
+ - Keep definitions to one or two sentences. Define what the concept is, not everything it does.
28
+ - Include only terms specific to this project's domain. Exclude general programming concepts, implementation details, requirements, and architectural decisions.
29
+ - Group terms under subheadings only when natural clusters emerge. Keep a flat list for one cohesive area.
30
+ - Add or change a term only after the user explicitly resolves it.
31
+
32
+ Before adding a term, ask whether it is unique to this domain or merely a general technical concept. Include only the former.
33
+
34
+ ## Single- and multi-context repositories
35
+
36
+ Use one root `CONTEXT.md` for a single context.
37
+
38
+ For multiple contexts, use a root `CONTEXT-MAP.md` to list the contexts, locations, and relationships:
39
+
40
+ ```md
41
+ # Context Map
42
+
43
+ ## Contexts
44
+
45
+ - [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
46
+ - [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
47
+ - [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
48
+
49
+ ## Relationships
50
+
51
+ - **Ordering → Fulfillment**: Ordering emits `OrderPlaced`; Fulfillment consumes it to start picking
52
+ - **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched`; Billing consumes it to generate an invoice
53
+ - **Ordering ↔ Billing**: Both use the canonical `CustomerId` and `Money` value definitions
54
+ ```
55
+
56
+ Infer the structure from existing files:
57
+
58
+ - If `CONTEXT-MAP.md` exists, read it and update the relevant context.
59
+ - If only a root `CONTEXT.md` exists, use the single context.
60
+ - If neither exists, create a root `CONTEXT.md` lazily after the first term is resolved.
61
+ - If several contexts exist and the correct owner is unclear, ask before writing.
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: grill
3
+ description: Relentlessly stress-test an idea, plan, requirement, architecture, or domain model through dependency-aware interview rounds. Use when the user asks to be grilled, challenged, interviewed, or pushed toward shared understanding; when assumptions and decision branches must be exhausted before action; or when domain terminology and durable architectural decisions should be sharpened and recorded in CONTEXT.md and ADRs.
4
+ ---
5
+
6
+ # Grill
7
+
8
+ Interview the user until both sides share an explicit, evidence-backed understanding. Model the topic as a decision tree, research discoverable facts, challenge the domain language, and record settled terminology and durable decisions as they crystallize.
9
+
10
+ Do not implement the resulting plan or design during or immediately after the grill. Capturing agreed terminology and accepted ADRs is part of the session. The skill ends after reporting the confirmed result; planning or implementation requires a separate user request.
11
+
12
+ ## Core distinctions
13
+
14
+ - Treat a **fact** as something discoverable from the environment, artifacts, documentation, or code. Find it yourself.
15
+ - Treat a **decision** as a choice among viable alternatives. Put it to the user with a recommendation.
16
+ - Treat a **prerequisite** as a fact or decision that must settle before a downstream question can be answered without guessing.
17
+ - Treat the **frontier** as every unresolved decision whose prerequisites are settled now.
18
+
19
+ Never turn a discoverable fact into homework for the user. Never silently turn an unresolved decision into an assumption.
20
+
21
+ ## Workflow
22
+
23
+ ### 1. Establish the subject
24
+
25
+ Restate the outcome being explored, the requested deliverable, and any explicit constraints. Mark interpretations as provisional until the user confirms them.
26
+
27
+ Build a mental decision tree rooted in that outcome. Add only branches that can materially change the result, such as:
28
+
29
+ - scope and non-goals
30
+ - actors, responsibilities, and boundaries
31
+ - domain terms and invariants
32
+ - lifecycle, states, and failure behavior
33
+ - data ownership and integration points
34
+ - usability, security, performance, or operational constraints
35
+ - trade-offs, validation, rollout, and reversibility
36
+
37
+ Tailor the branches to the subject. Do not ask ceremonial questions that cannot affect a decision.
38
+
39
+ ### 2. Research the facts
40
+
41
+ Inspect the relevant workspace, code, tests, documentation, prior decisions, and external sources before questioning the user. Distinguish direct evidence, reasonable inference, and remaining unknowns.
42
+
43
+ Use read-only tools or isolated research workers when the host provides them and current instructions permit them. If research runs asynchronously, treat its result as an unsettled prerequisite: defer only the dependent questions and continue with the rest of the frontier. If delegation is unavailable, research directly.
44
+
45
+ When code, documentation, and the user's statement disagree, surface the conflict with concrete evidence. Do not average contradictory models. Ask which model is authoritative and identify the losing model as cleanup or migration work when relevant.
46
+
47
+ ### 3. Load and challenge the domain language
48
+
49
+ Look for `CONTEXT-MAP.md` and the relevant `CONTEXT.md` before inventing terminology:
50
+
51
+ - If `CONTEXT-MAP.md` exists, use it to locate the applicable bounded context and its ADR directory.
52
+ - If only a root `CONTEXT.md` exists, treat the repository as a single context.
53
+ - If neither exists, wait until the first domain term is explicitly resolved before creating a root `CONTEXT.md`.
54
+
55
+ Call out glossary conflicts immediately. Replace fuzzy or overloaded words with a proposed canonical term and ask the user to choose. Stress-test relationships and boundaries with concrete scenarios, especially edge cases that distinguish similar concepts.
56
+
57
+ Do not force domain documentation into a conversation-only session or a workspace where file writes are out of scope. Keep a concise decision and terminology ledger in the conversation instead.
58
+
59
+ ### 4. Ask one frontier round
60
+
61
+ Compute the full current frontier. Exclude:
62
+
63
+ - questions answerable through research
64
+ - questions whose prerequisites are unresolved
65
+ - questions whose answers cannot change the outcome
66
+
67
+ Ask every frontier question in one numbered round. For each question:
68
+
69
+ 1. State the decision precisely.
70
+ 2. Give a recommended answer and a brief reason.
71
+ 3. Present meaningful alternatives or invite a free-form answer when the choice is not bounded.
72
+
73
+ Then stop and wait for the user's answers. A question that depends on another question in the same round belongs to a later round.
74
+
75
+ ### 5. Process answers and advance the tree
76
+
77
+ After each response:
78
+
79
+ 1. Convert answers into explicit decisions without adding unstated meaning.
80
+ 2. Resolve contradictions or ambiguity before depending on the answer.
81
+ 3. Confirm delegated choices: when the user says "you decide," state the chosen recommendation and its trade-off, then ask the user to accept or revise it.
82
+ 4. Update the terminology and decision ledger.
83
+ 5. Recompute the tree and ask the next complete frontier round.
84
+
85
+ Continue until no unresolved branch can materially affect the result. Respect an explicit request to stop or defer a branch, but record the resulting unresolved decision and its impact.
86
+
87
+ ## Record decisions during the grill
88
+
89
+ When a project term is explicitly resolved, update the applicable `CONTEXT.md` immediately. Read and follow [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md) before the first update. Keep `CONTEXT.md` a glossary only: no implementation details, requirements, scratch notes, or architectural decisions.
90
+
91
+ Offer an ADR only when all three conditions hold:
92
+
93
+ 1. The decision is hard or costly to reverse.
94
+ 2. The choice would be surprising without its context.
95
+ 3. Genuine alternatives were considered and rejected for specific reasons.
96
+
97
+ If any condition is missing, do not create an ADR. If all three hold, ask the user whether to record it, then read and follow [ADR-FORMAT.md](./ADR-FORMAT.md). Create directories and files lazily.
98
+
99
+ ## Finish with a confirmed session result
100
+
101
+ The grill is complete when research is settled enough for the decision, the frontier is empty, and no material branch remains silently assumed.
102
+
103
+ Present a candidate shared-understanding summary containing:
104
+
105
+ - objective and success criteria
106
+ - settled decisions and their main trade-offs
107
+ - canonical domain language
108
+ - constraints, invariants, and explicit non-goals
109
+ - unresolved facts, deferred decisions, and risks
110
+ - documentation created or updated
111
+
112
+ Ask the user to confirm that this is the shared understanding. If they correct or reopen anything, add the affected branches and resume the rounds.
113
+
114
+ After the user confirms, show a final `Grill Result` that records the accepted objective, decisions, canonical language, constraints, non-goals, unresolved items, and documentation changes. Then stop and return control to the user. Do not create a plan, write implementation code, launch an implementation handoff, or treat confirmation as permission to act.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Grill"
3
+ short_description: "Challenge ideas and sharpen domain decisions"
4
+ default_prompt: "Use $grill to stress-test this idea until every decision is explicit."
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Plan Exec"
3
+ short_description: "Execute implementation plans with isolated workers"
4
+ default_prompt: "Use $plan-exec to execute this implementation plan task by task with isolated workers and reviews."
@@ -5,7 +5,7 @@ description: Create structured implementation plans in docs/plans/ for feature w
5
5
 
6
6
  # Implementation Plan Creation
7
7
 
8
- Create an implementation plan in `docs/plans/YYYYMMDD-title.md` after focused discovery and user-guided scope decisions.
8
+ Create an implementation plan in `docs/plans/YYYYMMDD-title.md` after focused discovery and user-guided scope decisions. The plan file is the execution contract: a fresh agent must be able to execute it without reading the prior chat.
9
9
 
10
10
  ## Workflow
11
11
 
@@ -14,9 +14,10 @@ Create an implementation plan in `docs/plans/YYYYMMDD-title.md` after focused di
14
14
  3. Present a concise context summary, including likely affected areas and any uncertainty.
15
15
  4. Ask focused questions one at a time. Prefer multiple-choice questions with a recommended option when the answer can be bounded.
16
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.
17
+ 6. Preserve enough context in the plan for an isolated executor and reviewer to understand the request, decisions, assumptions, non-goals, implementation path, and verification commands without hidden conversation context.
18
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.
19
+ 8. Before finishing, audit the plan against the Self-Contained Plan Contract below and revise until it passes.
20
+ 9. After creating the plan, ask the user whether to review, start implementation, or stop after the plan.
20
21
 
21
22
  ## Project Guidance Discovery
22
23
 
@@ -85,6 +86,31 @@ Which direction do you prefer?
85
86
 
86
87
  If repeated code is involved, explicitly compare duplication versus abstraction and ask when both are reasonable.
87
88
 
89
+ ## Self-Contained Plan Contract
90
+
91
+ Every plan must be autonomous. Treat the plan as the only document available to a fresh implementation worker besides the repository itself.
92
+
93
+ A self-contained plan includes:
94
+ - The original request and the exact outcome expected.
95
+ - Explicit assumptions, decisions, non-goals, and unresolved questions.
96
+ - Relevant repository context discovered during planning, with concrete file paths, components, exports, APIs, commands, and patterns.
97
+ - The selected approach and why alternatives were rejected when alternatives were considered.
98
+ - Acceptance criteria that define when the work is complete.
99
+ - Ordered tasks with exact files to create or modify, specific implementation actions, specific test actions, and exact validation commands.
100
+ - Any external dependency, credential, manual step, or environment constraint required to complete or verify the work.
101
+
102
+ Avoid hidden-context references:
103
+ - Do not write "as discussed", "current behavior", "use the existing helper", "same as above", or "the relevant file" without naming the file, symbol, or behavior.
104
+ - Do not leave placeholders such as `[command]`, `[TBD]`, `[exact/path]`, or `[if needed]` in the final plan.
105
+ - Do not rely on future executor discovery for decisions already made during planning. If discovery is still needed, make it an explicit task with what to inspect and why.
106
+ - Do not include speculative abstractions, future-proofing, or optional work as implementation tasks. Put external or manual follow-up in Post-Completion.
107
+
108
+ Before writing the final file, verify:
109
+ - Could a fresh agent start from this plan and the repository alone?
110
+ - Does every task explain why it exists and how to verify it?
111
+ - Are all referenced commands, files, and symbols concrete?
112
+ - Are all assumptions and user decisions recorded in the plan?
113
+
88
114
  ## Plan Template
89
115
 
90
116
  Use this structure and adapt it to the project:
@@ -96,17 +122,21 @@ Use this structure and adapt it to the project:
96
122
  - Clear description of the feature/change.
97
123
  - Problem it solves and key benefits.
98
124
  - How it integrates with the existing system.
125
+ - Acceptance criteria for completion.
99
126
 
100
127
  ## Context
101
128
  - Files/components involved: [list from discovery]
102
- - Related patterns found: [patterns discovered]
129
+ - Related patterns found: [patterns discovered, with file paths and symbols]
103
130
  - Dependencies identified: [dependencies]
131
+ - Relevant commands discovered: [test/lint/build commands]
132
+ - Constraints from project guidance: [AGENTS.md/CLAUDE.md/README rules that affect this plan]
104
133
 
105
134
  ## Review Handoff
106
135
  - Original request: [user's requested outcome]
107
136
  - Key decisions made during planning: [brief bullets]
108
137
  - Explicit non-goals: [if any]
109
138
  - Open questions or assumptions: [if any]
139
+ - Hidden context: none; this plan is self-contained for a fresh executor.
110
140
 
111
141
  ## Development Approach
112
142
  - Testing approach: [TDD / Regular]
@@ -115,11 +145,13 @@ Use this structure and adapt it to the project:
115
145
  - Every code-change task must include new or updated tests.
116
146
  - All tests for a task must pass before starting the next task.
117
147
  - Update this plan when scope changes during implementation.
148
+ - Do not rely on chat history; decisions and constraints must be recorded here before execution.
118
149
 
119
150
  ## Testing Strategy
120
151
  - Unit tests required for every code-change task.
121
152
  - E2E tests required for UI flows when the project has an E2E setup.
122
153
  - Cover success, error, and edge cases.
154
+ - Exact validation commands: [commands discovered during planning]
123
155
 
124
156
  ## Progress Tracking
125
157
  - Mark completed items with `[x]` immediately when done.
@@ -134,14 +166,16 @@ Use this structure and adapt it to the project:
134
166
  ## Implementation Steps
135
167
 
136
168
  ### Task 1: [specific name]
169
+ **Why:** [reason this task is needed for the requested outcome]
170
+
137
171
  **Files:**
138
172
  - Create: `exact/path/to/new_file`
139
173
  - Modify: `exact/path/to/existing_file`
140
174
 
141
- - [ ] [specific code action with file reference]
175
+ - [ ] [specific code action with file and symbol reference]
142
176
  - [ ] [specific test action for success cases]
143
177
  - [ ] [specific test action for error/edge cases]
144
- - [ ] Run relevant tests and confirm they pass before next task.
178
+ - [ ] Run relevant tests and confirm they pass before next task
145
179
 
146
180
  ### Task N-1: Verify Acceptance Criteria
147
181
  - [ ] Verify all Overview requirements are implemented.
@@ -155,9 +189,11 @@ Use this structure and adapt it to the project:
155
189
  - [ ] Move this plan to `docs/plans/completed/`.
156
190
 
157
191
  ## Technical Details
192
+ - Existing APIs, exports, components, or commands the implementation must use.
158
193
  - Data structures and changes.
159
194
  - Parameters and formats.
160
195
  - Processing flow.
196
+ - Invariants and edge cases the executor must preserve.
161
197
 
162
198
  ## Post-Completion
163
199
  Items requiring manual intervention or external systems.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Plan Make"
3
+ short_description: "Create self-contained implementation plans"
4
+ default_prompt: "Use $plan-make to create a self-contained implementation plan for this change."
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Plan Review"
3
+ short_description: "Review implementation plans before execution"
4
+ default_prompt: "Use $plan-review to review this implementation plan for correctness, scope, testing, and project fit."