@nklisch/pi-agile-workflow 0.16.1 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/docs/ARCHITECTURE.md +23 -11
- package/docs/PRINCIPLES.md +84 -18
- package/docs/SPEC.md +19 -2
- package/docs/VISION.md +11 -6
- package/hooks/scripts/prompt-context.py +7 -1
- package/hooks/scripts/test_prompt_context.py +16 -0
- package/package.json +1 -1
- package/scripts/work-view.sh +1 -1
- package/skills/autopilot/SKILL.md +49 -34
- package/skills/convert/SKILL.md +27 -3
- package/skills/epic-design/SKILL.md +21 -3
- package/skills/feature-design/SKILL.md +34 -11
- package/skills/gate-cruft/SKILL.md +69 -24
- package/skills/gate-docs/SKILL.md +12 -5
- package/skills/gate-patterns/SKILL.md +7 -3
- package/skills/gate-refactor/SKILL.md +18 -6
- package/skills/gate-security/SKILL.md +16 -7
- package/skills/gate-tests/SKILL.md +86 -71
- package/skills/implement/SKILL.md +18 -8
- package/skills/principles/SKILL.md +67 -13
- package/skills/principles/references/advisory-review.md +8 -1
- package/skills/principles/references/code-design.md +62 -5
- package/skills/refactor-design/SKILL.md +23 -13
- package/skills/review/SKILL.md +36 -17
- package/skills/review/references/substrate-side-effects.md +17 -10
- package/skills/scope/SKILL.md +20 -7
- package/work-view/crates/cli/.work-view-version +1 -1
- package/work-view/dist/aarch64-apple-darwin/work-view +0 -0
- package/work-view/dist/aarch64-unknown-linux-musl/work-view +0 -0
- package/work-view/dist/x86_64-apple-darwin/work-view +0 -0
- package/work-view/dist/x86_64-unknown-linux-musl/work-view +0 -0
|
@@ -195,8 +195,8 @@ across the lenses below and skip exploratory fanout. If one area is unclear, use
|
|
|
195
195
|
focused exploratory sub-agent. Use parallel exploratory sub-agents only when the lenses need separate
|
|
196
196
|
attention across a medium/large target.
|
|
197
197
|
|
|
198
|
-
The first
|
|
199
|
-
refactor-conventions catalog exists. The catalog adds a
|
|
198
|
+
The first five scan axes are mandatory. Run them even when a project-specific
|
|
199
|
+
refactor-conventions catalog exists. The catalog adds a sixth scan axis; it
|
|
200
200
|
does not narrow or disable the default refactor judgment.
|
|
201
201
|
|
|
202
202
|
- Use the host's generic/general-purpose subagent prompted with the scanner
|
|
@@ -207,28 +207,35 @@ does not narrow or disable the default refactor judgment.
|
|
|
207
207
|
deployment-provided read-only role only if it is already available; otherwise
|
|
208
208
|
keep the host-local scan fallback.
|
|
209
209
|
|
|
210
|
-
1. **
|
|
210
|
+
1. **Elimination First** — "Before proposing extraction or a new abstraction,
|
|
211
|
+
find code, tests, checks, wrappers, options, compatibility paths, and files
|
|
212
|
+
that can be deleted, inlined, merged, or made unnecessary. Include whole
|
|
213
|
+
subsystems whose maintenance cost may exceed their current value, but mark
|
|
214
|
+
any removal that changes behavior or guarantees as a user decision rather
|
|
215
|
+
than a pure refactor."
|
|
216
|
+
|
|
217
|
+
2. **Code Smells** — "Find code that smells off in <area>. Look for: duplicated
|
|
211
218
|
logic across files; long files (>500 lines); deep nesting (>4 levels); god
|
|
212
219
|
functions (>100 lines doing multiple distinct things); god modules (>15
|
|
213
220
|
methods or multiple responsibilities); leaky abstractions (consumers reaching
|
|
214
221
|
past a module's public API). Report each with file:line and a one-line
|
|
215
222
|
explanation."
|
|
216
223
|
|
|
217
|
-
|
|
224
|
+
3. **Missing Abstractions** — "Find places where multiple modules implement
|
|
218
225
|
similar logic that could be extracted. Report each with file:line references
|
|
219
226
|
and which modules would benefit."
|
|
220
227
|
|
|
221
|
-
|
|
228
|
+
4. **Pattern Violations & Naming Inconsistencies** — "Read
|
|
222
229
|
`.agents/skills/patterns/*.md` and legacy `.claude/skills/patterns/*.md` if
|
|
223
230
|
they exist. Find code that deviates from established patterns. Report
|
|
224
231
|
naming inconsistencies — same concept named differently across modules. Report
|
|
225
232
|
each with file:line."
|
|
226
233
|
|
|
227
|
-
|
|
234
|
+
5. **Dead Weight** — "Find dead code: unused exports (cross-check against grep
|
|
228
235
|
for importers), commented-out blocks, TODO/FIXME where the work is clearly
|
|
229
236
|
already done, files with very few callers. Report each with file:line."
|
|
230
237
|
|
|
231
|
-
|
|
238
|
+
6. **Project Refactor Conventions** — Run only when
|
|
232
239
|
`.agents/skills/refactor-conventions/` exists. "Read
|
|
233
240
|
`.agents/skills/refactor-conventions/SKILL.md`, its referenced rule files,
|
|
234
241
|
and the `## Refactor Style Conventions` section in AGENTS.md if present.
|
|
@@ -245,7 +252,7 @@ findings.
|
|
|
245
252
|
### Phase 4: Categorize findings
|
|
246
253
|
|
|
247
254
|
Sort the findings into:
|
|
248
|
-
- **High value** —
|
|
255
|
+
- **High value** — eliminates code or concepts, reduces duplication, consolidates
|
|
249
256
|
similar code, or corrects convention drift that materially improves module
|
|
250
257
|
boundaries or repeated project workflow
|
|
251
258
|
- **Medium value** — improves consistency, aligns with established patterns
|
|
@@ -262,14 +269,15 @@ run summary.
|
|
|
262
269
|
|
|
263
270
|
For each step, specify:
|
|
264
271
|
- **Step name and value tier** (High / Medium / Low)
|
|
265
|
-
- **Source lens**: code smell / missing abstraction / pattern drift /
|
|
272
|
+
- **Source lens**: elimination / code smell / missing abstraction / pattern drift /
|
|
266
273
|
dead weight / refactor convention `<rule>` (if applicable)
|
|
267
274
|
- **Files affected**: paths
|
|
268
275
|
- **Current state**: actual code showing what exists now
|
|
269
276
|
- **Target state**: exact code showing what it should look like after
|
|
270
277
|
- **Implementation notes**: how to get from current to target; non-obvious considerations
|
|
271
|
-
- **Acceptance criteria**:
|
|
272
|
-
check
|
|
278
|
+
- **Acceptance criteria**: relevant verification passes plus a specific
|
|
279
|
+
structural/behavioral check; add or retain tests only where they protect an
|
|
280
|
+
important interface, complex unit, or regression
|
|
273
281
|
- **Risk**: Low / Medium / High — what could go wrong
|
|
274
282
|
- **Rollback**: how to revert this step if it breaks something
|
|
275
283
|
|
|
@@ -308,7 +316,7 @@ Append to the feature file's body:
|
|
|
308
316
|
### Step 1: <name>
|
|
309
317
|
**Priority**: High/Medium/Low
|
|
310
318
|
**Risk**: Low/Medium/High
|
|
311
|
-
**Source Lens**: code smell / missing abstraction / pattern drift / dead weight / refactor convention `<rule>`
|
|
319
|
+
**Source Lens**: elimination / code smell / missing abstraction / pattern drift / dead weight / refactor convention `<rule>`
|
|
312
320
|
**Files**: `src/path/file.ext`, ...
|
|
313
321
|
**Story**: `<story-id>` (if spawned)
|
|
314
322
|
|
|
@@ -369,7 +377,9 @@ In conversation:
|
|
|
369
377
|
add — escalate via `/agile-workflow:scope` instead.
|
|
370
378
|
- Each step is self-contained and committable in isolation. Multi-step PRs lose the
|
|
371
379
|
ability to roll back individual steps.
|
|
372
|
-
- Specify
|
|
380
|
+
- Specify proportionate verification for every step. Do not require a new unit
|
|
381
|
+
test for simple structural edits when build, type, integration, or existing
|
|
382
|
+
interface evidence is more useful.
|
|
373
383
|
- Prioritize measurable improvements (less duplication, clearer boundaries) over
|
|
374
384
|
aesthetic preferences. Beauty that doesn't reduce complexity isn't worth the risk.
|
|
375
385
|
- Project-specific refactor conventions extend the defaults; they never replace
|
package/skills/review/SKILL.md
CHANGED
|
@@ -233,19 +233,32 @@ Deep lane:
|
|
|
233
233
|
inline when the selected weight requires a fresh reviewer and none is available.
|
|
234
234
|
- Apply the core lenses plus the applicable deep dimensions.
|
|
235
235
|
|
|
236
|
-
### Phase 5: Classify Findings
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
- **
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
236
|
+
### Phase 5: Adjudicate And Classify Findings
|
|
237
|
+
|
|
238
|
+
The host/receiving agent owns classification. Treat fresh-reviewer severities as
|
|
239
|
+
proposals, verify concrete claims, and weigh each finding against repository
|
|
240
|
+
context: acceptance criteria, supported deployment and users, likelihood, blast
|
|
241
|
+
radius, recoverability, existing safeguards, and delay cost. Reviewer confidence,
|
|
242
|
+
model strength, or repeated mention does not make a finding blocking.
|
|
243
|
+
|
|
244
|
+
- **Blocker**: a credible, material current-cycle risk to required correctness,
|
|
245
|
+
security, data integrity, public contracts, acceptance criteria, release
|
|
246
|
+
safety, or trustworthy verification. It must be fixed or kept active before
|
|
247
|
+
advancing. Examples include a demonstrated correctness bug, exploitable
|
|
248
|
+
vulnerability, unintended breaking change, material foundation-doc drift, or
|
|
249
|
+
a test that proves required behavior is wrong.
|
|
250
|
+
- **Important**: valid work below the current-cycle blocker bar. Park it in the
|
|
251
|
+
unbound backlog with the risk rationale and advance the reviewed item. Examples
|
|
252
|
+
include unlikely low-consequence edges, worthwhile hardening, nonessential
|
|
253
|
+
tests, design cleanup, naming, or refactor opportunities.
|
|
254
|
+
- **Nit**: optional polish that does not warrant a substrate item.
|
|
255
|
+
- **Rejected**: unsupported, inapplicable, or cost-disproportionate advice;
|
|
256
|
+
record a brief reason when it came from an independent reviewer.
|
|
257
|
+
|
|
258
|
+
Rarity alone is not dismissal: a corner case with severe consequences may still
|
|
259
|
+
block. Conversely, a real issue does not block merely because a reviewer found
|
|
260
|
+
it. If there are zero receiver-confirmed blockers and zero important findings,
|
|
261
|
+
say so plainly. Do not pad the review with invented concerns.
|
|
249
262
|
|
|
250
263
|
### Phase 6: Finish
|
|
251
264
|
|
|
@@ -259,8 +272,10 @@ Standalone mode:
|
|
|
259
272
|
|
|
260
273
|
Substrate mode:
|
|
261
274
|
- Load [substrate-side-effects.md](references/substrate-side-effects.md).
|
|
262
|
-
- File
|
|
263
|
-
|
|
275
|
+
- File receiver-accepted findings according to their disposition: current-cycle
|
|
276
|
+
blockers active, important findings in the unbound backlog, and nits nowhere.
|
|
277
|
+
- Advance the item if there are no receiver-confirmed blockers, or bounce it if
|
|
278
|
+
blockers exist.
|
|
264
279
|
- Append the review record and commit the reviewed item's transition.
|
|
265
280
|
- After an approval reaches `done`, run Conservative Parent Roll-Up below.
|
|
266
281
|
|
|
@@ -315,8 +330,11 @@ Approve | Approve with comments | Request changes | Block
|
|
|
315
330
|
### Nits
|
|
316
331
|
- Nit: <brief note> (`file:line`)
|
|
317
332
|
|
|
333
|
+
### Rejected proposals
|
|
334
|
+
- <reviewer proposal>: <repository-context rationale>
|
|
335
|
+
|
|
318
336
|
## Notes
|
|
319
|
-
<mode, depth, skipped lenses, limitations, or anything else worth recording>
|
|
337
|
+
<mode, depth, risk context, skipped lenses, limitations, or anything else worth recording>
|
|
320
338
|
```
|
|
321
339
|
|
|
322
340
|
If no findings above nit level in substrate mode: "This change looks good.
|
|
@@ -347,7 +365,8 @@ Nothing blocking or significant to flag."
|
|
|
347
365
|
- Foundation-doc drift is a blocker, not a nit. Rolling foundation is a hard
|
|
348
366
|
rule.
|
|
349
367
|
- Do not advance an item past review unless the verdict is Approve or Approve
|
|
350
|
-
with comments. Pushing through blockers defeats
|
|
368
|
+
with comments. Pushing through receiver-confirmed material blockers defeats
|
|
369
|
+
the point of the stage; parking lower-risk findings does not.
|
|
351
370
|
- Child completion never substitutes for a parent's review. Roll-up may move an
|
|
352
371
|
implementing parent to `review`, but only that parent's selected lane may move
|
|
353
372
|
it to `done`.
|
|
@@ -8,15 +8,21 @@ commit unless the user explicitly asks for that side effect.
|
|
|
8
8
|
|
|
9
9
|
## Triage Findings Into Items
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
The receiving agent first adjudicates reviewer proposals under
|
|
12
|
+
`principles/SKILL.md` Part IV. Reviewer severity labels are not authoritative.
|
|
13
|
+
For each accepted finding above nit level, preserve the chosen disposition so it
|
|
14
|
+
does not disappear into prose:
|
|
15
|
+
|
|
16
|
+
- **Blocker**: a receiver-confirmed material current-cycle risk. Either fix
|
|
17
|
+
inline if small, or create a story in `.work/active/stories/` with
|
|
18
|
+
`stage: implementing` and tags such as `[bug]`, `[security]`, `[tests]`, or the
|
|
19
|
+
appropriate category. It prevents the reviewed item from advancing.
|
|
20
|
+
- **Important**: valid work below the blocker bar. Park it as an unbound backlog
|
|
21
|
+
item in `.work/backlog/` with the contextual risk rationale; do not scope it
|
|
22
|
+
active merely because it is substantial or a reviewer called it blocking.
|
|
23
|
+
- **Nit**: keep in review notes only; nits do not warrant items.
|
|
24
|
+
- **Rejected**: create no item; record a brief reason in the review record when
|
|
25
|
+
independent review proposed it.
|
|
20
26
|
|
|
21
27
|
Review-created items use `gate_origin: null`; gate-produced findings set
|
|
22
28
|
`gate_origin`.
|
|
@@ -140,8 +146,9 @@ Append this section to the reviewed item:
|
|
|
140
146
|
**Blockers**: <list with item ids> (or "none")
|
|
141
147
|
**Important**: <list with item ids> (or "none")
|
|
142
148
|
**Nits**: <inline notes - not items>
|
|
149
|
+
**Rejected**: <reviewer proposals and brief reasons> (or "none")
|
|
143
150
|
|
|
144
|
-
**Notes**: <mode, depth, skipped lenses, limitations, or anything else worth recording>
|
|
151
|
+
**Notes**: <mode, depth, risk context, skipped lenses, limitations, or anything else worth recording>
|
|
145
152
|
```
|
|
146
153
|
|
|
147
154
|
## Commit
|
package/skills/scope/SKILL.md
CHANGED
|
@@ -170,18 +170,21 @@ second confirmation round.
|
|
|
170
170
|
|
|
171
171
|
### Phase B8: Promote each confirmed cluster
|
|
172
172
|
|
|
173
|
-
For each cluster, run the single-idea-mode Phases 3-6 inline:
|
|
173
|
+
For each cluster, run the single-idea-mode Phase 1.9 and Phases 3-6 inline:
|
|
174
174
|
|
|
175
|
-
1. **
|
|
175
|
+
1. **Frame simplification opportunities** — record what the cluster can delete,
|
|
176
|
+
consolidate, replace, or make unnecessary; separate cohesive cleanup from
|
|
177
|
+
unrelated backlog work.
|
|
178
|
+
2. **Declare dependencies** — within-cluster (child stories under a feature)
|
|
176
179
|
and cross-cluster (one feature depends on another's output). Use
|
|
177
180
|
`work-view --blocking` for cycle detection.
|
|
178
|
-
|
|
181
|
+
3. **Foundation-doc roll-forward** (large clusters only) — full Phase 4 of
|
|
179
182
|
single-idea mode, scoped to that cluster's impact.
|
|
180
|
-
|
|
183
|
+
4. **Write item files** — the parent (epic or feature) plus any child files.
|
|
181
184
|
Use `git mv` to move backlog files into the new structure where they map
|
|
182
185
|
1:1; reference the backlog idea in the parent's brief and `git rm` the
|
|
183
186
|
backlog file where it was absorbed without a direct child.
|
|
184
|
-
|
|
187
|
+
5. **Commit per cluster** — `scope: <cluster-id> (<kind>, <size>)` with a
|
|
185
188
|
foundation-doc roll-forward note where applicable.
|
|
186
189
|
|
|
187
190
|
Promote leftovers per the Phase B7 decision (one commit per promoted leftover,
|
|
@@ -267,7 +270,7 @@ interfaces).
|
|
|
267
270
|
Aim for 2-5 questions. Zero is fine if the user's brief and foundation docs
|
|
268
271
|
already pin every strategic choice. For small (story) and medium (feature)
|
|
269
272
|
scope, the bar is higher — only ask if a strategic ambiguity genuinely
|
|
270
|
-
affects framing; otherwise
|
|
273
|
+
affects framing; otherwise continue through Phases 1.8 and 1.9 without questions.
|
|
271
274
|
|
|
272
275
|
Use `structured question tool` to ask. Capture answers in the item body under a
|
|
273
276
|
`## Strategic decisions` section so the downstream design family inherits
|
|
@@ -306,7 +309,14 @@ journey before the item is written.
|
|
|
306
309
|
|
|
307
310
|
Skip this phase if `ux-ui-design` is not installed.
|
|
308
311
|
|
|
309
|
-
Then proceed to Phase
|
|
312
|
+
Then proceed to Phase 1.9.
|
|
313
|
+
|
|
314
|
+
### Phase 1.9: Frame simplification opportunities
|
|
315
|
+
|
|
316
|
+
Record what the idea could delete, consolidate, replace, or make unnecessary—code,
|
|
317
|
+
tests, checks, abstractions, compatibility paths, configuration, or whole subsystems.
|
|
318
|
+
Fold cohesive cleanup into the brief, note independent `[refactor]`/`[cleanup]`
|
|
319
|
+
children, and park unrelated work. Removing guarantees requires a strategic decision.
|
|
310
320
|
|
|
311
321
|
### Phase 2: Size the scope
|
|
312
322
|
|
|
@@ -414,6 +424,9 @@ updated: YYYY-MM-DD
|
|
|
414
424
|
## Brief
|
|
415
425
|
<one to three paragraphs describing what this is and why it exists>
|
|
416
426
|
|
|
427
|
+
## Simplification opportunity
|
|
428
|
+
<what this work may delete, consolidate, replace, or deliberately retain; "none identified" is valid>
|
|
429
|
+
|
|
417
430
|
<!-- Subsequent sections (Design, Implementation Notes, etc.) accumulate as
|
|
418
431
|
work progresses. -->
|
|
419
432
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.16.
|
|
1
|
+
0.16.3
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|