@nklisch/pi-agile-workflow 0.16.1 → 0.16.4

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.
Files changed (36) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/docs/ARCHITECTURE.md +42 -21
  4. package/docs/PRINCIPLES.md +108 -38
  5. package/docs/SPEC.md +19 -2
  6. package/docs/VISION.md +17 -10
  7. package/hooks/scripts/prompt-context.py +8 -1
  8. package/hooks/scripts/test_prompt_context.py +16 -0
  9. package/package.json +1 -1
  10. package/scripts/work-view.sh +1 -1
  11. package/skills/autopilot/SKILL.md +54 -37
  12. package/skills/convert/SKILL.md +30 -4
  13. package/skills/epic-design/SKILL.md +21 -3
  14. package/skills/feature-design/SKILL.md +34 -11
  15. package/skills/gate-cruft/SKILL.md +69 -24
  16. package/skills/gate-docs/SKILL.md +56 -30
  17. package/skills/gate-patterns/SKILL.md +7 -3
  18. package/skills/gate-refactor/SKILL.md +18 -6
  19. package/skills/gate-security/SKILL.md +16 -7
  20. package/skills/gate-tests/SKILL.md +86 -71
  21. package/skills/implement/SKILL.md +18 -8
  22. package/skills/principles/SKILL.md +76 -21
  23. package/skills/principles/references/advisory-review.md +8 -1
  24. package/skills/principles/references/code-design.md +62 -5
  25. package/skills/principles/references/models.md +69 -57
  26. package/skills/refactor-design/SKILL.md +23 -13
  27. package/skills/review/SKILL.md +39 -19
  28. package/skills/review/references/review-lenses.md +14 -4
  29. package/skills/review/references/substrate-side-effects.md +17 -10
  30. package/skills/review/references/target-resolution.md +2 -1
  31. package/skills/scope/SKILL.md +20 -7
  32. package/work-view/crates/cli/.work-view-version +1 -1
  33. package/work-view/dist/aarch64-apple-darwin/work-view +0 -0
  34. package/work-view/dist/aarch64-unknown-linux-musl/work-view +0 -0
  35. package/work-view/dist/x86_64-apple-darwin/work-view +0 -0
  36. package/work-view/dist/x86_64-unknown-linux-musl/work-view +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agile-workflow",
3
3
  "description": "Markdown-based work-tracking substrate for AI-driven projects. Items as files in .work/, late-binding releases, gates that produce items, goal-backed autopilot queue runner. See docs/VISION.md.",
4
- "version": "0.16.1",
4
+ "version": "0.16.4",
5
5
  "author": {
6
6
  "name": "nklisch"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agile-workflow",
3
- "version": "0.16.1",
3
+ "version": "0.16.4",
4
4
  "description": "Markdown-based work-tracking substrate for AI-driven projects. Items as files in .work/, late-binding releases, gates that produce items, goal-backed autopilot queue runner.",
5
5
  "author": {
6
6
  "name": "nklisch"
@@ -305,8 +305,11 @@ git log --since='1 day ago' -- .work/
305
305
  ## Foundation docs (rolling-forward principle)
306
306
  docs/ holds standing context: VISION.md, SPEC.md, ARCHITECTURE.md, etc.
307
307
  - Foundation docs describe the system's current state or intended future state
308
+ - Future-state claims are valid before implementation exists; foundation docs
309
+ need not mention every capability
308
310
  - Never retain superseded behavior descriptions or versioned migration notes
309
- - When implementation changes a foundation-doc assertion, update the doc
311
+ - Update only assertions that become false, stale, or contradictory; omission is
312
+ not drift
310
313
  - Git history is the audit trail; the doc carries the active truth
311
314
  ````
312
315
 
@@ -369,7 +372,10 @@ Advisory review follows risk in both direct and autopilot design. Independent
369
372
  review uses completeness/advisory before adversarial posture, is labeled
370
373
  cross-model only for a known different model class, and is non-blocking at
371
374
  design time. Final autopilot completion still requires the successful review
372
- path selected by the effective review weight.
375
+ path selected by the effective review weight. The receiving orchestrator owns
376
+ finding disposition: it verifies reviewer proposals in repository context,
377
+ keeps only credible material current-cycle risks blocking, and parks valid
378
+ lower-priority work in the unbound backlog.
373
379
 
374
380
  ### Queue selection algorithm
375
381
 
@@ -397,11 +403,12 @@ path selected by the effective review weight.
397
403
  7. Re-read substrate state after the production skill returns; it may already
398
404
  have completed review and eligible parent roll-up. Commit each item
399
405
  transition separately.
400
- 8. If review bounced an item, treat its durable findings as the next
401
- implementation input and keep cycling implementation → verification → review.
402
- Bounce count is diagnostic history, never a stop condition. Recurring findings
403
- trigger deeper root-cause/design diagnosis and fresh context where useful,
404
- not a human handoff.
406
+ 8. If review bounced an item, treat only receiver-confirmed material blockers as
407
+ the next implementation input and keep cycling implementation → verification
408
+ review. Park valid lower-priority findings unbound; they do not reopen the
409
+ scoped queue. Bounce count is diagnostic history, never a stop condition.
410
+ Recurring blockers trigger deeper root-cause/design diagnosis and fresh
411
+ context where useful, but repetition alone does not elevate severity.
405
412
  9. Goto 1 unless a stop condition applies.
406
413
  ```
407
414
 
@@ -500,6 +507,9 @@ session epoch:
500
507
  Code-design capsule:
501
508
  - Ports & Adapters: keep domain logic independent of DB/filesystem/HTTP/time/randomness.
502
509
  - Single Source of Truth: define growing variant sets once; derive downstream behavior.
510
+ - Proportional rigor: validate real boundaries; add invariants, edge handling, and determinism only when context warrants them.
511
+ - Code economy: prefer the shortest clear solution; test useful interfaces, complex units, and bug regressions.
512
+ - Leave it simpler: eliminate unnecessary code, tests, checks, abstractions, and compatibility paths; ask before reducing guarantees.
503
513
  ...
504
514
  ```
505
515
 
@@ -548,15 +558,20 @@ Override via `gates_for_release` in `.work/CONVENTIONS.md`.
548
558
 
549
559
  ### Gate-as-item-producer pattern
550
560
 
551
- Each gate scans the bundle of items at `release_binding: <current-version>`
552
- and produces new items rather than emitting a pass/fail report:
561
+ Each gate focuses on the bundle of items at
562
+ `release_binding: <current-version>` and produces new items rather than
563
+ emitting a pass/fail report. The bundle is a center of gravity, not a hard scan
564
+ boundary: gates may follow concrete evidence into adjacent dependencies, shared
565
+ infrastructure, or system-wide mechanisms. Findings caused by, exposed by, or
566
+ materially relevant to the release bind to it; merely ambient discoveries go
567
+ to the unbound backlog so the gate does not silently expand release scope.
553
568
 
554
569
  | Gate | What it scans | What it produces |
555
570
  |---|---|---|
556
571
  | `gate-security` | Bound items' code changes against security checklist | Items with `gate_origin: security`, tagged `[security]`, `release_binding` set |
557
- | `gate-tests` | Coverage of bound items' acceptance criteria | Items with `gate_origin: tests`, tagged `[testing]` for gaps |
558
- | `gate-cruft` | Dead code introduced or revealed by the bundle | Items with `gate_origin: cruft`, tagged `[cleanup]` |
559
- | `gate-docs` | Foundation-doc alignment with the bundle's behavior changes | Items with `gate_origin: docs`, tagged `[documentation]` — enforces rolling-foundation |
572
+ | `gate-tests` | Useful coverage at stable interfaces, complex units, and bug regressions; low-value tests exposed by the bundle | Items with `gate_origin: tests`, tagged `[testing]` for valuable gaps or removals |
573
+ | `gate-cruft` | Local or system-wide code, tests, checks, compatibility paths, and abstractions that may no longer earn their cost | Items with `gate_origin: cruft`, tagged `[cleanup]`; guarantee-reducing removals require user confirmation |
574
+ | `gate-docs` | Existing foundation assertions that may be false, stale, or contradictory; omissions and unimplemented future claims are excluded | Items with `gate_origin: docs`, tagged `[documentation]` — enforces rolling-foundation |
560
575
  | `gate-patterns` | Reusable patterns that emerged in the bundle | Detailed pattern-skill files in `.agents/skills/patterns/` (single source of truth) with optional Claude mirror, the generated hook-loaded `.agents/rules/patterns.md` digest (slug+one-liner index pointing back at the skill, with banner + source hash), plus a tracking item with `gate_origin: patterns` |
561
576
 
562
577
  For gates that emit findings as items, placement flows through
@@ -605,7 +620,9 @@ parent, and dependency. Common patterns:
605
620
  - `work-view --help` for the full flag set
606
621
 
607
622
  Foundation docs in `docs/` describe the system's current state or intended
608
- future state, never the past; git history is the audit trail. The substrate
623
+ future state, never the past; git history is the audit trail. Review existing
624
+ assertions only: missing coverage and unimplemented future intent are not drift;
625
+ flag only false, stale, or contradictory claims. The substrate
609
626
  itself is durable memory: record decisions, blockers, implementation
610
627
  discoveries, and review findings in item bodies instead of depending on chat
611
628
  history.
@@ -668,12 +685,16 @@ class is needed and allowed.
668
685
 
669
686
  Concrete model guidance lives in `skills/principles/references/models.md` and is
670
687
  resolved against current availability when selection matters. GPT-5.6 Luna is
671
- the implementation workhorse; Sol is preferred for design, review, complex code,
672
- and as the low-thinking bridge above Luna; Terra is a situational middle pick;
673
- and Claude Fable is a high-cost design, orchestration, and review specialist
674
- rather than the default implementer. These are capability recommendations, not
675
- fixed routing. Luna, Terra, Sol, and Codex share OpenAI lineage, so moving among
676
- them can provide fresh context but is not cross-model evidence.
688
+ the cost-efficient routine implementation and fan-out workhorse; Sol is the
689
+ quality-first general coding choice and remains preferred for design, review,
690
+ and complex code; Terra is a situational middle pick. Sonnet 5 is the capable
691
+ high-throughput Claude worker, Opus 4.8 the stable premium complex-coding and
692
+ review default, and Fable 5 the high-cost escalation for the hardest ambiguous,
693
+ long-running, orchestration, design, and review work. Model-specific prompting
694
+ is conditional and symptom-driven rather than fixed boilerplate. These are
695
+ capability recommendations, not fixed routing. Luna, Terra, Sol, and Codex share
696
+ OpenAI lineage, so moving among them can provide fresh context but is not
697
+ cross-model evidence.
677
698
 
678
699
  ### Bootstrap (user-invocable only)
679
700
 
@@ -730,7 +751,7 @@ neither substitutes inline self-approval for a required fresh-context lane.
730
751
  | `gate-security` | Security scan over bound items; produces items with `gate_origin: security` |
731
752
  | `gate-tests` | Test-coverage scan; produces gap items with `gate_origin: tests` |
732
753
  | `gate-cruft` | Dead-code scan; produces cleanup items with `gate_origin: cruft` |
733
- | `gate-docs` | Foundation-doc alignment; enforces rolling-foundation; produces doc-update items |
754
+ | `gate-docs` | Assertion-only foundation-doc alignment; ignores omissions and unimplemented future claims; produces doc-update items |
734
755
  | `gate-patterns` | Pattern extraction; writes pattern skills (`.agents/skills/patterns/`), the generated `.agents/rules/patterns.md` digest, + tracking item with `gate_origin: patterns` |
735
756
 
736
757
  All five fire during `release-deploy`'s `quality-gate` stage in the order
@@ -741,7 +762,7 @@ configured in `CONVENTIONS.md` (default: security → tests → cruft → docs
741
762
 
742
763
  | Skill | Role | Notes |
743
764
  |---|---|---|
744
- | `principles` | Loads code-design + substrate-execution principles | Code-design (Ports & Adapters, SSOT, Generated Contracts, Fail Fast) carried from workflow; substrate-execution (item-IS-the-work, rolling-foundation, late-binding) added |
765
+ | `principles` | Loads code-design + substrate-execution principles | Code-design includes clear boundaries, proportional rigor, code economy, useful tests, and continuous simplification; substrate-execution includes item-IS-the-work, rolling-foundation, and late-binding |
745
766
  | `research` | Investigate libraries/APIs | Carried; produces research docs in `docs/research/` (separate from `.work/`) |
746
767
  | `refactor-conventions-creator` | Create project-specific refactor conventions skill | Carried |
747
768
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  The plugin's `principles` skill loads two distinct paradigms:
4
4
 
5
- - **Code-design principles** — Ports & Adapters, Single Source of Truth,
6
- Generated Contracts, Fail Fast. Carried from the `workflow` plugin.
5
+ - **Code-design principles** — clear boundaries and sources of truth,
6
+ proportional rigor, code economy, useful tests, and continuous simplification.
7
7
  These tell the agent how to write good code at design time and
8
8
  implementation time.
9
9
  - **Substrate-execution principles** — Item-IS-the-Work, Rolling-Foundation,
@@ -18,7 +18,7 @@ shapes how work moves through the system.
18
18
 
19
19
  # Part I — Code-Design Principles
20
20
 
21
- These four principles govern both architectural decisions and how code is
21
+ These principles govern both architectural decisions and how code is
22
22
  written. Each section has guidance for design time and implementation time.
23
23
 
24
24
  ## 1. Ports & Adapters
@@ -213,21 +213,20 @@ If a generated type needs extending, use
213
213
  `type MyType = GeneratedType & { extra: string }` — extend the source of
214
214
  truth, don't replace it.
215
215
 
216
- ## 4. Fail Fast (implementation only)
216
+ ## 4. Fail Fast—Where It Matters
217
217
 
218
- Catch bad data at the door, not three calls deep where the stack trace is
219
- useless. Validate inputs at the entry point of every function or system
220
- boundary.
218
+ Catch bad data at real trust boundaries, not three calls deep. Validate
219
+ untrusted input and required external contracts before domain logic runs. Add
220
+ internal checks only where a violated precondition is plausible and
221
+ consequential for this project.
221
222
 
222
223
  - At system boundaries (HTTP handlers, CLI args, external API responses,
223
- config files): parse with Zod or equivalent before any logic runs
224
- - At internal function boundaries: assert preconditions at the top of the
225
- function guard clauses, not nested ifs
226
- - Prefer `throw`/`return early` over propagating bad state deep into call
227
- chains
228
- - Errors should be loud and specific at the point of violation —
229
- "expected positive number, got -3" beats a cryptic null reference five
230
- layers down
224
+ config files): parse before logic runs
225
+ - At internal boundaries: add guards when they protect a real invariant, not
226
+ mechanically at every function
227
+ - Prefer early, specific failure when failure is part of the required contract
228
+ - Do not manufacture exhaustive edge handling, invariants, retries, or firm
229
+ determinism that the project's scope and consequences do not need
231
230
 
232
231
  **Good:**
233
232
  ```typescript
@@ -250,6 +249,73 @@ function processOrder(input: any) {
250
249
  }
251
250
  ```
252
251
 
252
+ ## 5. Code Economy
253
+
254
+ Short, direct code is a virtue when it stays clear. Prefer fewer concepts,
255
+ layers, branches, options, and lines over speculative generality. Terse does not
256
+ mean cryptic: simplify the model first, then its expression. Every abstraction
257
+ or extension point must earn its maintenance cost in current scope.
258
+
259
+ ### At design time
260
+
261
+ - Start with the most direct solution that satisfies the actual brief
262
+ - Reject hypothetical flexibility without a current second use or committed need
263
+ - Compare approaches by concepts removed as well as capabilities added
264
+
265
+ ### At implementation time
266
+
267
+ - Delete obsolete paths and incidental machinery exposed by the change
268
+ - Inline or consolidate before extracting another abstraction
269
+ - Match rigor to the project's context rather than treating every codebase as
270
+ critical infrastructure
271
+
272
+ ## 6. Tests Earn Their Keep
273
+
274
+ Tests are maintained code. Prioritize stable public interfaces, important seams,
275
+ high-consequence behavior, and regressions learned from real bugs. Unit tests
276
+ belong around genuinely complex isolated logic, not every wrapper, branch, or
277
+ line. Coverage numbers are evidence, not goals.
278
+
279
+ ### At design time
280
+
281
+ - Name the interface, risk, or regression each proposed test protects
282
+ - Prefer one useful interface test over several implementation-bound unit tests
283
+ - Do not require one automated test per unit, edge, or acceptance statement
284
+
285
+ ### At implementation time
286
+
287
+ - Add regression tests when bugs reveal meaningful risk
288
+ - Remove duplicate, tautological, brittle, obsolete, or low-value tests
289
+ - Keep simple code simple when an isolated test adds no useful confidence
290
+
291
+ ## 7. Leave It Simpler
292
+
293
+ Exploration, design, and implementation include an elimination pass. Look for
294
+ code, tests, checks, abstractions, configuration, and compatibility paths the
295
+ feature can make unnecessary. Fold safe cohesive cleanup into the task or create
296
+ explicit cleanup/refactor stories; park broader opportunities.
297
+
298
+ Question whole systems, not only local fragments. A validation layer, invariant
299
+ system, test suite, compatibility mechanism, or defensive subsystem may no
300
+ longer justify its cost. Removing behavior, guarantees, validation, determinism,
301
+ compatibility, or safety is a product decision: explain the trade-off and ask
302
+ the user rather than silently weakening it.
303
+
304
+ ### Review proportionality
305
+
306
+ Reviewer output is evidence, not authority. The receiving agent verifies claims
307
+ and judges their current-cycle risk against the repository's acceptance criteria,
308
+ supported users and deployment shape, likelihood, blast radius, recoverability,
309
+ safeguards, and delay cost. Credible material risks to required correctness,
310
+ security, data, public contracts, acceptance, release safety, or trustworthy
311
+ verification block. Valid lower-priority concerns are parked unbound; nits stay
312
+ in review notes; unsupported advice is rejected with a brief rationale.
313
+
314
+ A successful independent review path requires adjudicating every proposal, not
315
+ implementing every suggestion. A rare severe case may still block, while a real
316
+ corner case with negligible consequence need not. Reviewer labels, model
317
+ strength, and repeated mention do not replace the receiving agent's judgment.
318
+
253
319
  ---
254
320
 
255
321
  # Part II — Substrate-Execution Principles
@@ -259,7 +325,7 @@ shape stage transitions, item bodies, foundation-doc evolution, and
259
325
  release binding. The agent applies these whenever operating on `.work/`
260
326
  or `docs/`.
261
327
 
262
- ## 5. Item-IS-the-Work
328
+ ## 8. Item-IS-the-Work
263
329
 
264
330
  The unit of work is its file. The brief, the design, the implementation
265
331
  notes, and the review findings all accumulate in the item's body as
@@ -314,13 +380,15 @@ stages advance. Reading the file IS reading the state of the work.
314
380
  - [ ] Item body at completion is a complete record
315
381
  - [ ] Code does not reference item IDs; only logical concepts
316
382
 
317
- ## 6. Rolling-Foundation
383
+ ## 9. Rolling-Foundation
318
384
 
319
385
  Foundation docs (`docs/VISION.md`, `docs/SPEC.md`, `docs/ARCHITECTURE.md`,
320
- and any others) describe the project's vision (future-looking) and current
321
- intent what is true now, OR what will be true once in-flight design lands.
322
- They roll forward in place as either evolves. No legacy comments. Git carries
323
- history; the doc carries truth.
386
+ and any others) describe what is true now or the future state the project
387
+ intends to reach. A future-state claim remains valid before implementation
388
+ exists. Foundation docs are selective standing context, not an exhaustive
389
+ inventory: silence about a capability is allowed. They roll forward when an
390
+ assertion becomes false, stale, or contradictory. Git carries history; the doc
391
+ carries truth.
324
392
 
325
393
  ### Two timing styles
326
394
 
@@ -336,9 +404,9 @@ Both are legitimate; the project picks one or mixes per change size:
336
404
 
337
405
  The discipline is identical in both styles: replace stale assertions in
338
406
  place, never accumulate "previously" / "in v1.x" / migration prose.
339
- `gate-docs` at release-deploy time is the backstop it catches drift between
340
- intent (what the doc asserts) and reality (what code does) regardless of
341
- which timing style was used.
407
+ `gate-docs` is an assertion-consistency backstop: it catches false, stale, or
408
+ contradictory claims, but never treats missing coverage or merely unimplemented
409
+ future intent as drift.
342
410
 
343
411
  ### What this forbids
344
412
 
@@ -352,14 +420,14 @@ which timing style was used.
352
420
 
353
421
  ### What this enables
354
422
 
355
- - A new contributor reads the doc and learns the system as it IS or as
356
- it is meant to imminently become — not as it was
423
+ - A new contributor reads the doc and learns the system as it is or as
424
+ it is intended to become — not as it was
357
425
  - Foundation docs stay short and current rather than growing with every
358
426
  change
359
427
  - `git log docs/<file>.md` shows every rolling-forward edit — perfect
360
428
  audit trail without bloating the doc
361
- - Discrepancies between intent and reality become bugs that `gate-docs`
362
- surfaces, not historical artifacts to be reconciled mentally
429
+ - False, stale, or contradictory assertions become bugs that `gate-docs`
430
+ surfaces; omissions and not-yet-implemented future claims do not
363
431
 
364
432
  ### At design time
365
433
 
@@ -368,8 +436,8 @@ which timing style was used.
368
436
  the update as part of scope)
369
437
  - For large-scope `scope` operations, design-first is the default —
370
438
  `scope` rolls foundation docs forward as part of the same operation
371
- - Identify which foundation doc(s) need rolling forward; reading them
372
- at design time prevents stale assumptions
439
+ - Identify any existing foundation assertions the design changes or
440
+ contradicts; do not add coverage merely because the docs omit the capability
373
441
  - If a feature's design contradicts a foundation doc, EITHER the design
374
442
  is wrong OR the doc is. Resolve before designing the implementation.
375
443
 
@@ -383,22 +451,24 @@ which timing style was used.
383
451
  adjust whichever was wrong (implementation or assertion).
384
452
  - Replace stale assertions in place. Delete the old text. Never append
385
453
  "previously" / "in v1.x" / migration prose.
386
- - The `gate-docs` runs at release-deploy time and produces items for
387
- any remaining drift but the goal is to leave it nothing to find.
454
+ - The `gate-docs` skill produces items only for remaining false, stale, or
455
+ contradictory assertionsnot missing coverage or unimplemented future intent.
388
456
 
389
457
  ### Design checklist
390
458
 
391
- - [ ] Every assertion in SPEC and ARCHITECTURE reflects current code OR
392
- imminent in-flight design (no stale assertions from cancelled work)
459
+ - [ ] Every assertion in SPEC and ARCHITECTURE is true for the current or
460
+ intended-future state it claims (no stale assertions from superseded intent)
393
461
  - [ ] VISION.md reflects the project's current direction, not past direction
394
462
  - [ ] No "previously" / "originally" / "in v1.x" prose anywhere in `docs/`
395
- - [ ] When a feature changes behavior or direction, foundation docs update
396
- in the same commit set as the change (code-first) or were preflight-
397
- updated and are still accurate (design-first)
463
+ - [ ] When a feature invalidates an existing foundation assertion, that
464
+ assertion updates in the same commit set (code-first) or was preflight-
465
+ updated and remains accurate (design-first)
466
+ - [ ] No finding or edit was created solely because foundation docs omit a
467
+ capability or describe future intent not yet implemented
398
468
  - [ ] `git log docs/<file>.md` shows the audit trail; the doc shows the
399
469
  present
400
470
 
401
- ## 7. Late-Binding
471
+ ## 10. Late-Binding
402
472
 
403
473
  Items advance stages when work actually completes. Releases bind items
404
474
  only when the user cuts a version. Foundation docs are not pre-decided
package/docs/SPEC.md CHANGED
@@ -95,7 +95,9 @@ item kind as a starting heuristic. Low-risk stories can close from recorded
95
95
  green verification, while risky stories, features, and epics receive the
96
96
  fresh-context coverage allowed by the effective weight. Child completion may
97
97
  make a parent eligible for its own review, but never approves the parent by
98
- itself.
98
+ itself. Fresh-reviewer findings are proposals: the receiving agent verifies and
99
+ classifies them against repository context. Only credible material current-cycle
100
+ risk blocks advancement; valid lower-priority findings are parked unbound.
99
101
 
100
102
  ### Questions and advisory review
101
103
 
@@ -125,7 +127,13 @@ convention, then `standard`:
125
127
  available for the highest-risk scopes.
126
128
 
127
129
  These levels state review intent and ceilings, not fixed reviewer counts or pass
128
- recipes.
130
+ recipes. A successful review path requires every proposed finding to be
131
+ adjudicated, not implemented. The receiving orchestrator weighs acceptance
132
+ criteria, supported users and deployment shape, likelihood, blast radius,
133
+ recoverability, safeguards, and delay cost. It fixes or activates material
134
+ current-cycle blockers, parks valid lower-priority concerns in the unbound
135
+ backlog, and rejects unsupported advice with a rationale. Reviewer labels and
136
+ repetition are evidence, not authority.
129
137
 
130
138
  ### Backlog item shape
131
139
 
@@ -204,6 +212,15 @@ backlog_staleness_days: 90
204
212
  The default `gates_for_release` order is fixed: **security → tests → cruft
205
213
  → docs → patterns**. Override only if the project has a justified reason.
206
214
 
215
+ Release-bound items define each gate's focus, not a hard scan boundary. A gate
216
+ may follow concrete evidence into adjacent dependencies, shared infrastructure,
217
+ or system-wide mechanisms. Findings caused by, exposed by, or materially
218
+ relevant to the release bind to it. Merely ambient discoveries must be written
219
+ to the unbound backlog, so wider inspection does not silently expand release
220
+ scope. Any cruft proposal that reduces behavior, validation, determinism,
221
+ compatibility, safety, or another meaningful guarantee requires explicit user
222
+ confirmation before it becomes active removal work.
223
+
207
224
  **`gate-refactor` is an opt-in gate** — not in the default list. Add it when your project has
208
225
  scan-rule libraries installed under `gate_refactor_scan_library_roots` (defaults:
209
226
  `{project}/.agents/skills/scan-*/SKILL.md`, then
package/docs/VISION.md CHANGED
@@ -34,18 +34,20 @@ The plugin enforces three execution principles:
34
34
  review findings — all accumulate in the item's body as stages advance.
35
35
  Reading the file IS reading the state of work.
36
36
  - **Foundation docs roll forward.** `docs/VISION.md`, `docs/SPEC.md`,
37
- `docs/ARCHITECTURE.md` describe current truth or intended future state.
38
- When implementation changes what those docs assert, the docs update to
39
- match the new truth. No retained descriptions of superseded behavior or
37
+ `docs/ARCHITECTURE.md` describe current truth or intended future state. They
38
+ are selective rather than exhaustive: omission is allowed, and a future-state
39
+ claim is valid before implementation exists. When an assertion becomes false,
40
+ stale, or contradictory, it updates to match the new truth. No retained
41
+ descriptions of superseded behavior or
40
42
  migration commentary. Git is the audit trail.
41
43
  - **Late-bind everything.** No upfront roadmap. No pre-populated stages.
42
44
  No pre-tagged release bindings. Items advance stages when work actually
43
45
  completes. Releases bind items only when the user cuts a version.
44
46
 
45
- The plugin's `principles` skill loads these alongside the code-design
46
- principles (Ports & Adapters, Single Source of Truth, Generated Contracts,
47
- Fail Fast) carried over from `workflow`. The two paradigms substrate
48
- execution and code design operate together during agile-workflow work.
47
+ The plugin's `principles` skill loads these alongside code-design principles
48
+ for clear boundaries, proportional rigor, code economy, useful tests, and
49
+ continuous simplification. The two paradigms—substrate execution and code
50
+ design—operate together during agile-workflow work.
49
51
 
50
52
  ## Who this is for
51
53
 
@@ -95,9 +97,14 @@ agile-workflow is complete enough to operate as the supported workflow engine:
95
97
  - Questions and advisory review are consequence-driven: routine reversible
96
98
  choices use recorded judgment; strategic or difficult-to-reverse choices get
97
99
  an explicit checkpoint; independent review scales through the project's
98
- high-level review weight while preserving fresh-context deep review.
100
+ high-level review weight while preserving fresh-context deep review. Reviewer
101
+ findings remain proposals: the receiving orchestrator weighs actual repository
102
+ risk, blocks only on material current-cycle concerns, and parks valid
103
+ lower-priority work rather than forcing every suggestion into implementation.
99
104
  - Real releases move through scope → design → implement → review →
100
- release-deploy on the substrate; gates produce durable findings, and the
105
+ release-deploy on the substrate; gates focus on bound work while following
106
+ relevant evidence into adjacent or system-wide code, distinguish release
107
+ findings from ambient backlog discoveries, and produce durable items. The
101
108
  release ships only after every bound item is terminal. Foundation docs roll
102
109
  forward, release binding stays late, and terminal retention keeps git as the
103
110
  audit trail without leaking obsolete authority.
@@ -106,7 +113,7 @@ The pattern proves itself when a fresh session in a substrate-bootstrapped repo
106
113
  picks up active work without re-feed; when direct production work and autopilot
107
114
  both finish decisively while respecting dependency, test-integrity, review, and
108
115
  parent-roll-up invariants; and when foundation docs five features later still
109
- describe the present without legacy comments.
116
+ make true, noncontradictory current-or-future claims without legacy comments.
110
117
 
111
118
  ## Relationship to workflow
112
119
 
@@ -78,7 +78,10 @@ CAPSULES = {
78
78
  "Ports & Adapters: domain logic stays independent of DB/filesystem/HTTP/time/randomness.",
79
79
  "Single Source of Truth: growing variant sets have one registry; types, validation, routing, and display derive from it.",
80
80
  "Generated Contracts: boundary types come from schema/router/DB inference or generation instead of hand copies.",
81
- "Fail Fast: unknown input is validated at system boundaries and internal preconditions are asserted early.",
81
+ "Proportional rigor: validate real boundaries; add invariants, edge handling, and determinism only when context warrants them.",
82
+ "Code economy: prefer the shortest clear solution and fewer concepts over speculative generality.",
83
+ "Useful tests: protect important interfaces, complex units, and bug regressions—not every line or surface.",
84
+ "Leave it simpler: when touching an area, eliminate unnecessary code, tests, checks, abstractions, and compatibility paths; ask before reducing guarantees.",
82
85
  ],
83
86
  },
84
87
  "dispatch_economy": {
@@ -92,6 +95,7 @@ CAPSULES = {
92
95
  "Agents are for breadth, isolation, fresh judgment, or independent write ownership.",
93
96
  "Parallelism follows ownership and dependency layers rather than item count.",
94
97
  "Dispatch rationale belongs in run notes or the item body when it affects bundling or wave width.",
98
+ "Gate scope: release-bound work is the focus, not a hard boundary; follow concrete evidence and route ambient findings to the unbound backlog.",
95
99
  ],
96
100
  },
97
101
  "advisory_review": {
@@ -104,6 +108,9 @@ CAPSULES = {
104
108
  "Cross-model peer review applies only when a different model class is available.",
105
109
  "Same-model review uses a fresh-context sub-agent rather than inline self-review.",
106
110
  "Stories fast-advance on verification; features and epics get deeper review.",
111
+ "Reviewer findings are proposals; the receiving orchestrator judges actual risk in repository context.",
112
+ "Only material current-cycle risk blocks completion; park valid lower-priority findings and continue.",
113
+ "Foundation docs may describe future intent: review existing claims only; omission or absent implementation is not drift.",
107
114
  "Advisory review is non-blocking during design, but final autopilot completion needs a successful review path.",
108
115
  ],
109
116
  },
@@ -372,6 +372,22 @@ class RulesLoaderTest(unittest.TestCase):
372
372
  printed = out.getvalue()
373
373
  self.assertIn("Agile Workflow Principles", printed)
374
374
  self.assertIn("Code-design capsule", printed)
375
+ self.assertIn("Code economy", printed)
376
+ self.assertIn("Useful tests", printed)
377
+ self.assertIn("ask before reducing guarantees", printed)
378
+
379
+ def test_gate_prompt_emits_wider_scope_rule(self) -> None:
380
+ payload = self._payload(
381
+ session_id="gate-scope", cwd=str(self.root), prompt="gate the release items"
382
+ )
383
+ out = io.StringIO()
384
+ with mock.patch.object(
385
+ prompt_context.sys, "stdin", io.StringIO(json.dumps(payload))
386
+ ), mock.patch.object(prompt_context.sys, "stdout", out):
387
+ rc = prompt_context.main()
388
+ self.assertEqual(rc, 0)
389
+ self.assertIn("release-bound work is the focus, not a hard boundary", out.getvalue())
390
+ self.assertIn("ambient findings", out.getvalue())
375
391
 
376
392
  def test_main_sessionstart_emits_rules(self) -> None:
377
393
  (self.rules_dir / "a.md").write_text("Rule A body", encoding="utf-8")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nklisch/pi-agile-workflow",
3
- "version": "0.16.1",
3
+ "version": "0.16.4",
4
4
  "description": "Markdown-based work-tracking substrate for AI-driven projects.",
5
5
  "author": {
6
6
  "name": "nklisch"
@@ -22,7 +22,7 @@
22
22
  set -euo pipefail
23
23
 
24
24
  # Kept in lockstep with plugin.json by scripts/bump-version.sh. Do not hand-edit.
25
- WORK_VIEW_VERSION="0.16.1"
25
+ WORK_VIEW_VERSION="0.16.4"
26
26
 
27
27
  # ============================================================================
28
28
  # Version prelude (POSIX / bash 3.2 safe — runs BEFORE the Bash-4 guard)