@nklisch/pi-agile-workflow 0.15.3 → 0.16.1

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.
@@ -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.15.3",
4
+ "version": "0.16.1",
5
5
  "author": {
6
6
  "name": "nklisch"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agile-workflow",
3
- "version": "0.15.3",
3
+ "version": "0.16.1",
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"
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Autonomous review convergence
6
+
7
+ - **Removed the two-bounce circuit-breaker** — autopilot no longer parks an item
8
+ at review or blocks the run after two failed correction passes. Review findings
9
+ re-enter implementation until they pass; recurring findings trigger deeper
10
+ root-cause/design diagnosis and fresh context where useful. Only a separate,
11
+ genuine blocker may stop autonomous progress.
12
+
5
13
  ### Dynamic subagent prompting
6
14
 
7
15
  - **No shipped custom agents** — removed agile-workflow's Claude/Pi agent
@@ -59,14 +59,19 @@ An item flows through tiers as work progresses on it.
59
59
  (design written into body; child stories spawned)
60
60
 
61
61
 
62
- /implement-orchestrator (default; scope-driven,
63
- cross-feature waves) or /implement (inline alternative)
62
+ /implement-orchestrator (delegated topology)
63
+ or /implement (cohesive inline delivery)
64
64
 
65
65
 
66
66
  stage: review
67
+ (real state; optional stop boundary)
67
68
 
68
69
 
69
- /review (advance to done)
70
+ risk-appropriate /review lane
71
+ (production skills invoke it by default)
72
+
73
+
74
+ stage: done
70
75
 
71
76
  ┌─────────────────┼─────────────────┐
72
77
  ▼ ▼ ▼
@@ -98,11 +103,20 @@ Stages advance only when work completes; they are never pre-populated.
98
103
 
99
104
  | Kind | drafting | implementing | review | done |
100
105
  |---|---|---|---|---|
101
- | epic | initial state when scoped | once children are designed and started | once all children are at review/done | once all children are at done |
102
- | feature | initial state when scoped | once design is written into body and acceptance criteria clear | once code lands and tests pass | once user-facing review approves |
103
- | story | optional initial state | initial state more often (skips drafting) | once code lands | once user/code-review approves |
106
+ | epic | initial state when scoped | once children are designed and started | once all children are terminal and the epic is ready for its own review | once the epic's selected review lane approves |
107
+ | feature | initial state when scoped | once design is written into the body and acceptance criteria are clear | once implementation is verified, or all child work is terminal, and the feature is ready for its own review | once the feature's selected review lane approves |
108
+ | story | optional initial state | initial state more often (skips drafting) | once implementation and required verification complete | once the story's selected review lane approves |
104
109
  | release | initial state when cut | once gates begin running (`stage: quality-gate`) | n/a | n/a — terminal stage is `released` |
105
110
 
111
+ `review` is a real state but not a mandatory user handoff. `implement`, `fix`,
112
+ and `implement-orchestrator` continue through the selected review lane in the
113
+ same invocation by default. An explicit `stop-at-review` request or stable
114
+ project convention leaves the item there. Approval advances to `done`; a bounce
115
+ returns to `implementing` with durable findings, and blockers remain recorded in
116
+ the item body. Child completion only makes an ancestor eligible for its own
117
+ review: conservative roll-up never substitutes child evidence for parent
118
+ approval.
119
+
106
120
  The PostToolUse hook auto-bumps `updated:` whenever an item file is edited;
107
121
  skills only need to advance `stage:` explicitly.
108
122
 
@@ -291,7 +305,7 @@ git log --since='1 day ago' -- .work/
291
305
  ## Foundation docs (rolling-forward principle)
292
306
  docs/ holds standing context: VISION.md, SPEC.md, ARCHITECTURE.md, etc.
293
307
  - Foundation docs describe the system's current state or intended future state
294
- - Never add "previously this was…" or "note: in v1.2 we…"
308
+ - Never retain superseded behavior descriptions or versioned migration notes
295
309
  - When implementation changes a foundation-doc assertion, update the doc
296
310
  - Git history is the audit trail; the doc carries the active truth
297
311
  ````
@@ -336,45 +350,26 @@ Direct skill invocation remains supported: `/agile-workflow:autopilot
336
350
  maintain a progress file; harness goal/continuation owns long-running
337
351
  persistence and `.work/active/` is the resume point.
338
352
 
339
- ### Pre-flight: align on strategic questions first
353
+ ### Strategic alignment before autonomous work
340
354
 
341
- **Before kicking off autopilot, run `epic-design --only-questions` over the
342
- epics you're about to drain.** This is the single highest-leverage step in
343
- the agile-workflow loop and should generally always be done.
355
+ Normal design resolves routine, reversible decisions with judgment and records
356
+ the rationale. Use the structured question tool only for choices that set
357
+ product direction, materially affect user-facing behavior or an external
358
+ contract, or commit the project to an expensive, difficult-to-reverse path.
344
359
 
345
- ```bash
346
- # Per-epic align on one epic before autopilot picks it up
347
- /agile-workflow:epic-design --only-questions <epic-id>
348
-
349
- # Cover the whole active queue at once recommended before a --all autopilot goal
350
- /agile-workflow:epic-design --only-questions --all
351
- ```
360
+ `epic-design --only-questions <id>` (or `--all`) remains the explicit
361
+ interactive alignment mode when the operator wants those strategic decisions
362
+ captured under `## Design decisions` before autonomous work. It does not design,
363
+ decompose, or advance an item, and it refuses to run inside autopilot. Autopilot
364
+ does not stop for ordinary ambiguity: it uses the existing decisions and
365
+ foundation evidence, chooses the least irreversible sound path, and records the
366
+ rationale.
352
367
 
353
- What the pass does (see `epic-design` SKILL Phase 4.7): for each epic at
354
- `stage: drafting`, it grounds in foundation docs + codebase, surfaces the
355
- 2–5 directional product / architecture / scope questions specific to that
356
- epic, asks the user via `AskUserQuestion`, and writes the answers under
357
- `## Design decisions` in the epic body. It does NOT decompose into child
358
- features and does NOT advance stage — that's left to the real design pass.
359
-
360
- Why it matters:
361
-
362
- - **Autopilot inherits the answers.** When `epic-design` (full pass) runs
363
- later under autopilot, it reads the already-captured `## Design decisions`
364
- and skips Phase 4.7 — no autonomous judgment on directional choices,
365
- because they're already locked in by the user.
366
- - **Cheap up front, expensive later.** Five minutes of interactive Q&A on
367
- the whole drafting queue prevents autopilot from committing to a wrong
368
- architectural direction across multiple features before the user notices.
369
- - **One human checkpoint instead of N.** A single `--only-questions --all`
370
- pass answers every strategic question across the queue in one sitting,
371
- rather than autopilot pausing per-epic mid-run (or worse, not pausing and
372
- guessing).
373
-
374
- `--only-questions` mode refuses to run under autopilot itself — it's
375
- explicitly a pre-autopilot, human-in-the-loop step. The right invocation
376
- shape is: `--only-questions --all` first, review the captured decisions,
377
- then start an autopilot goal for `--all` (or `<epic-id>`).
368
+ Advisory review follows risk in both direct and autopilot design. Independent
369
+ review uses completeness/advisory before adversarial posture, is labeled
370
+ cross-model only for a known different model class, and is non-blocking at
371
+ design time. Final autopilot completion still requires the successful review
372
+ path selected by the effective review weight.
378
373
 
379
374
  ### Queue selection algorithm
380
375
 
@@ -392,22 +387,51 @@ then start an autopilot goal for `--all` (or `<epic-id>`).
392
387
  - created ascending (FIFO tie-break)
393
388
  5. Pop the first item.
394
389
  6. Work it:
395
- - if drafting → invoke /design (or /refactor-design / /perf-design by tag)
390
+ - if drafting → invoke the design skill selected by kind and tags
396
391
  - if implementing → invoke /implement-orchestrator with the autopilot
397
- scope (the picked item is an anchor; the orchestrator drains the whole
398
- in-scope implementing band as one batch, cross-feature is fine).
399
- /implement is reserved for the inline small-delivery case.
400
- - if review → invoke /review (autonomous: produces verdict, advances
401
- review→done or sends back to implementing)
402
- 7. Advance stage on completion. Commit.
403
- 8. Goto 1 unless stop condition.
392
+ scope (the picked item is an anchor; the orchestrator derives execution
393
+ topology from the unified graph, ownership, repository shape, and risk).
394
+ Use /implement when one cohesive delivery is safer in the host context.
395
+ - if review → invoke /review (autonomous: produces a verdict, advances
396
+ review→done, or sends the item back to implementing)
397
+ 7. Re-read substrate state after the production skill returns; it may already
398
+ have completed review and eligible parent roll-up. Commit each item
399
+ 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.
405
+ 9. Goto 1 unless a stop condition applies.
404
406
  ```
405
407
 
408
+ The implementation orchestrator guarantees outcomes rather than prescribing a
409
+ recipe: dependency-graph scheduling, cycle validation, write-set-independent
410
+ parallelism, explicit ownership, per-wave integration verification, one commit
411
+ per item, worker self-containment, and conservative parent roll-up. It chooses
412
+ bundle shape, wave width, isolation, and worker briefs for the actual work; no
413
+ fixed sizes or prompt templates are part of the contract. Worker capability is
414
+ chosen from scope and risk unless an explicit caller or stable project
415
+ convention overrides it, and the choice is recorded rather than routinely
416
+ asked.
417
+
418
+ Autopilot resolves one effective `review_weight` for the run: explicit
419
+ invocation selector, then `.work/CONVENTIONS.md`, then `standard`. The five
420
+ levels — `none`, `light`, `standard`, `thorough`, and `maximum` — scale
421
+ independent-review intent from administrative evidence-only closure through
422
+ multi-model, multi-pass review. They do not prescribe reviewer counts or exact
423
+ orchestration. Even `none` requires green implementation verification and
424
+ acceptance evidence.
425
+
406
426
  ### Stop conditions
407
427
 
408
428
  - Empty queue (all candidates exhausted)
409
429
  - User invokes a halt command or sends a manual prompt
410
- - A skill reports a blocker that can't be resolved autonomously
430
+ - A skill reports a genuine blocker that autonomous diagnosis and correction
431
+ cannot resolve
432
+
433
+ Repeated review bounces are not a stop condition. Autopilot keeps correcting and
434
+ re-reviewing until the item passes or exposes a separate genuine blocker.
411
435
 
412
436
  ### Harness goal continuation
413
437
 
@@ -642,6 +666,15 @@ cross-model only when the host explicitly spawns the subagent with a different
642
666
  model class; otherwise use `peeragent` only when a cross-harness different model
643
667
  class is needed and allowed.
644
668
 
669
+ Concrete model guidance lives in `skills/principles/references/models.md` and is
670
+ 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.
677
+
645
678
  ### Bootstrap (user-invocable only)
646
679
 
647
680
  | Skill | Role | Trigger |
@@ -656,7 +689,7 @@ class is needed and allowed.
656
689
  |---|---|---|
657
690
  | `park` | Capture an unscoped idea, context note, or roadmap-style thought into `.work/backlog/`. Minimal frontmatter; body sized to the supplied context. | "park this", "remind me about X", "add to backlog" |
658
691
  | `scope` | Promote backlog item or fresh request to `.work/active/`. Sizes as epic/feature/story. If large, rolls foundation docs forward. Declares dependencies. | "scope this", "promote this", "let's track this" |
659
- | `fix` | Park-and-implement quick bug as a story. Single-stride: creates story at `stage: implementing`, writes fix, advances to review. | "fix bug X", "fix the typo in", "fix this issue" |
692
+ | `fix` | Diagnose a verified bug as a cohesive story, reproduce it, add the failing test, apply the bounded repair, verify it, and continue through the selected review lane to `done` by default. Honors an explicit `stop-at-review` boundary and records bounces/blockers. | "fix bug X", "fix the typo in", "fix this issue" |
660
693
  | `groom` | Backlog-hygiene sweep over `.work/backlog/`. Classifies items DONE/SUPERSEDED/DUPLICATE/STALE/MERGEABLE/VALID via mechanical signals (`work-view --stale`, missing-field, cites-done-work) + a grounded semantic pass; writes a triage report. Propose-not-prune: dispositions are operator-confirmed and route through terminal-tier retention; never auto-prunes. Not a release gate. Opt-in; staleness face inert unless `backlog_staleness_days` is set. | "groom the backlog", "backlog hygiene", "find stale/dead/duplicate items" |
661
694
 
662
695
  ### Design family (model-invocable, kind- and tag-routed)
@@ -672,14 +705,19 @@ class is needed and allowed.
672
705
 
673
706
  | Skill | Role | Trigger |
674
707
  |---|---|---|
675
- | `implement-orchestrator` | Default. Orchestrates implementation sub-agents over a scope (feature, epic, --all, or explicit list). Builds a unified `depends_on` graph across the scope (cross-feature is fine), chooses bundles/waves/write-scope isolation, and advances every parent feature whose children all reach `review`. | item(s) at `stage: implementing` |
676
- | `implement` | Inline alternative. Read item body, write code, run build+tests, advance stage. | small / focused work where sub-agent fan-out wouldn't pay off, or user asks to implement inline |
708
+ | `implement-orchestrator` | Delegated implementation over a feature, epic, `--all`, or explicit set. Derives ownership and waves from the unified dependency graph, write-set independence, repository shape, and risk; verifies every wave, keeps one commit per item, rolls eligible parents conservatively, and continues through review by default. | implementing scope where separate ownership, isolation, or sequencing improves the result |
709
+ | `implement` | Cohesive inline delivery. Grounds in the item, implements and verifies it in the host context, records capability and evidence, then continues through the selected review lane to `done` by default. | work best kept under one ownership context, or an explicit inline request |
710
+
711
+ Choose between these production lanes from cohesion, write ownership,
712
+ dependency sequencing, isolation needs, and uncertainty. Line or file counts may
713
+ inform judgment but never gate the choice. Both honor `stop-at-review`, and
714
+ neither substitutes inline self-approval for a required fresh-context lane.
677
715
 
678
716
  ### Review & delivery (mixed invocability)
679
717
 
680
718
  | Skill | Invocability | Role | Trigger |
681
719
  |---|---|---|---|
682
- | `review` | model-invocable | Code review of changes for an item. Triages findings into items with proper tags. Advances to done if approved. | item at `stage: review` |
720
+ | `review` | model-invocable | Selects fast, standard, or deep review from effective weight, risk, evidence, and kind as a heuristic; preserves fresh context for deep review, records durable findings, advances or bounces the item, and conservatively rolls approved children through each eligible ancestor's own review. | item at `stage: review` or explicit review target |
683
721
  | `board` | user-invocable | Launch the live localhost substrate board through `work-view board`. Opens a browser after binding when a desktop session is available; prints the URL in headless sessions. | User-invoked when the user wants to inspect active work visually |
684
722
  | `release-deploy` | user-invocable | Bind items to release, run gates, ship, archive. Idempotent. | User-invoked when ready to cut a version |
685
723
  | `bold-refactor` | user-invocable | Multi-feature architectural refactor. Scopes a refactor epic with child features. Aggressive — only on user request. | User-invoked |
@@ -707,7 +745,9 @@ configured in `CONVENTIONS.md` (default: security → tests → cruft → docs
707
745
  | `research` | Investigate libraries/APIs | Carried; produces research docs in `docs/research/` (separate from `.work/`) |
708
746
  | `refactor-conventions-creator` | Create project-specific refactor conventions skill | Carried |
709
747
 
710
- (`repo-eval` and `tool-evaluator` were originally carried here. `repo-eval` now lives in the standalone `code-audit` plugin as the supported report-only scorecard, while `tool-evaluator` was extracted to `nates-toolkit` and renamed `agent-reflection`.)
748
+ Holistic report-only repository scoring is provided by `code-audit:repo-eval`;
749
+ end-of-session tool and skill reflection is provided by
750
+ `nates-toolkit:agent-reflection`.
711
751
 
712
752
  ---
713
753
 
package/docs/SPEC.md CHANGED
@@ -12,7 +12,7 @@ Located at `plugins/agile-workflow/.claude-plugin/plugin.json`:
12
12
  {
13
13
  "name": "agile-workflow",
14
14
  "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.",
15
- "version": "0.10.0",
15
+ "version": "0.15.3",
16
16
  "author": { "name": "nklisch" },
17
17
  "repository": "https://github.com/nklisch/skills",
18
18
  "license": "MIT"
@@ -81,7 +81,51 @@ release: planned → quality-gate → released
81
81
  task: [ ] → [x] (checklist line in parent body)
82
82
  ```
83
83
 
84
- Stages advance only when work completes. No pre-population.
84
+ Stages advance only when work completes. No pre-population. For epics,
85
+ features, and stories, `review` is a real evaluation state and `done` means the
86
+ selected review lane approved the item. It is not a mandatory user handoff:
87
+ production skills drive verified work through the risk-appropriate review lane
88
+ in the same invocation by default. An explicit `stop-at-review` request (or
89
+ project convention) leaves the item at `review`. Approval advances to `done`;
90
+ a review bounce returns the item to `implementing` with durable findings, and a
91
+ blocker remains recorded in the item body.
92
+
93
+ Review effort is selected from risk, evidence, effective `review_weight`, and
94
+ item kind as a starting heuristic. Low-risk stories can close from recorded
95
+ green verification, while risky stories, features, and epics receive the
96
+ fresh-context coverage allowed by the effective weight. Child completion may
97
+ make a parent eligible for its own review, but never approves the parent by
98
+ itself.
99
+
100
+ ### Questions and advisory review
101
+
102
+ Normal design resolves routine, reversible decisions with judgment and records
103
+ the rationale. The structured question tool is reserved for choices that set
104
+ product direction, materially change user-facing behavior or an external
105
+ contract, or commit the project to an expensive, difficult-to-reverse path.
106
+ `--only-questions` remains an explicit interactive alignment mode and does not
107
+ design or advance an item; an active autopilot run instead chooses the least
108
+ irreversible sound option and logs it.
109
+
110
+ Advisory review is risk-driven in direct and autopilot modes. When independent
111
+ review is warranted, completeness/advisory review precedes adversarial review,
112
+ and a pass is called cross-model only when the reviewer is a known different
113
+ model class. Design-time advisory failure is non-blocking; final autopilot
114
+ completion must clear the review path required by its effective weight. The
115
+ effective `review_weight` resolves from an explicit invocation, then project
116
+ convention, then `standard`:
117
+
118
+ - `none` — no independent reviewer; green implementation verification and
119
+ acceptance evidence are still required.
120
+ - `light` — minimal independent ceremony with focused scrutiny where risk
121
+ clearly warrants it.
122
+ - `standard` — balanced, risk-driven independent review.
123
+ - `thorough` — increased fresh-context breadth and depth for meaningful risk.
124
+ - `maximum` — multi-model, multi-pass complementary-then-adversarial review is
125
+ available for the highest-risk scopes.
126
+
127
+ These levels state review intent and ceilings, not fixed reviewer counts or pass
128
+ recipes.
85
129
 
86
130
  ### Backlog item shape
87
131
 
@@ -153,6 +197,7 @@ gate_refactor_scan_library_roots:
153
197
  - .claude/skills
154
198
  binding_guard: warn
155
199
  epic_cohesion: phased
200
+ review_weight: standard
156
201
  backlog_staleness_days: 90
157
202
  ```
158
203
 
@@ -204,6 +249,12 @@ treats them as mismatches acted on per `binding_guard`, like CONFLICTs (the proj
204
249
  ship whole"). CONFLICTs (a child bound to a *different* version than its bound parent, or a done
205
250
  parent unbound while its children are bound) always follow `binding_guard` regardless of this dial.
206
251
 
252
+ **`review_weight`** is optional and defaults to **`standard`** when absent. Valid values are
253
+ `none`, `light`, `standard`, `thorough`, and `maximum`. An explicit invocation selector overrides
254
+ the project value. The setting controls independent-review intent; it never relaxes implementation
255
+ verification or acceptance evidence. The canonical level semantics and lane selection live in the
256
+ `principles` and `review` skills rather than in project bootstrap configuration.
257
+
207
258
  **`backlog_staleness_days`** (integer; **absent ⇒ feature inert**) is the age threshold for the
208
259
  opt-in backlog staleness query `work-view --stale`. When set, `--stale` lists `.work/backlog/`
209
260
  items whose last-touched date — `updated` if present, else `created` — is more than this many days
package/docs/VISION.md CHANGED
@@ -36,8 +36,8 @@ The plugin enforces three execution principles:
36
36
  - **Foundation docs roll forward.** `docs/VISION.md`, `docs/SPEC.md`,
37
37
  `docs/ARCHITECTURE.md` describe current truth or intended future state.
38
38
  When implementation changes what those docs assert, the docs update to
39
- match the new truth. No "previously this worked differently." No legacy
40
- comments. Git is the audit trail.
39
+ match the new truth. No retained descriptions of superseded behavior or
40
+ migration commentary. Git is the audit trail.
41
41
  - **Late-bind everything.** No upfront roadmap. No pre-populated stages.
42
42
  No pre-tagged release bindings. Items advance stages when work actually
43
43
  completes. Releases bind items only when the user cuts a version.
@@ -82,15 +82,31 @@ agile-workflow is complete enough to operate as the supported workflow engine:
82
82
  - Three-channel plugin distribution metadata: Claude Code marketplace, OpenAI
83
83
  Codex marketplace, and Pi packages share the same `skills/` source while
84
84
  each channel carries native metadata and ergonomics.
85
+ - Operational skills finish their semantic promise: verified implementation
86
+ continues through a risk-appropriate review lane to `done` by default, while
87
+ an explicit `stop-at-review` request preserves a deliberate handoff boundary.
88
+ Review remains a real, independently evidenced state rather than an inline
89
+ self-approval ceremony.
90
+ - Implementation orchestration derives dependency waves, write ownership,
91
+ isolation, and worker capability from the work's graph, cohesion, repository
92
+ shape, uncertainty, and risk. It preserves dependency/cycle integrity,
93
+ per-wave verification, one commit per item, worker self-containment, and
94
+ conservative parent roll-up without fixed sizing or prompt recipes.
95
+ - Questions and advisory review are consequence-driven: routine reversible
96
+ choices use recorded judgment; strategic or difficult-to-reverse choices get
97
+ an explicit checkpoint; independent review scales through the project's
98
+ high-level review weight while preserving fresh-context deep review.
85
99
  - Real releases move through scope → design → implement → review →
86
- release-deploy on the substrate; gates produce items, and the release ships
87
- only after every bound item is terminal.
100
+ release-deploy on the substrate; gates produce durable findings, and the
101
+ release ships only after every bound item is terminal. Foundation docs roll
102
+ forward, release binding stays late, and terminal retention keeps git as the
103
+ audit trail without leaking obsolete authority.
88
104
 
89
105
  The pattern proves itself when a fresh session in a substrate-bootstrapped repo
90
- picks up active work without re-feed, when an autopilot run drains an epic to
91
- done autonomously across compaction events while respecting the declared
92
- dependency graph, and when foundation docs five features later still describe
93
- the present without legacy comments.
106
+ picks up active work without re-feed; when direct production work and autopilot
107
+ both finish decisively while respecting dependency, test-integrity, review, and
108
+ parent-roll-up invariants; and when foundation docs five features later still
109
+ describe the present without legacy comments.
94
110
 
95
111
  ## Relationship to workflow
96
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nklisch/pi-agile-workflow",
3
- "version": "0.15.3",
3
+ "version": "0.16.1",
4
4
  "description": "Markdown-based work-tracking substrate for AI-driven projects.",
5
5
  "author": {
6
6
  "name": "nklisch"
@@ -199,10 +199,10 @@ FAMILY_SKILLS=(
199
199
 
200
200
  # grounds_on_rules <skill-md> — true iff the file references the
201
201
  # `.agents/rules/*.md` path AND a "force-loaded" grounding descriptor appears
202
- # within +/- GROUND_WINDOW lines of that path. Window-based so it tolerates the
203
- # line-wrapping some skills use ("...the project's force-loaded" / "agent rules"
204
- # on the next line) without weakening to a bare path match.
205
- GROUND_WINDOW=2
202
+ # within +/- GROUND_WINDOW lines of that path. Window-based so it tolerates both
203
+ # line wrapping and compact grounding lists where the path and the re-read
204
+ # instruction are neighboring bullets, without weakening to a bare path match.
205
+ GROUND_WINDOW=5
206
206
  grounds_on_rules() {
207
207
  local md="$1"
208
208
  local total; total="$(wc -l < "$md")"
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env bash
2
+ # Structural contract test for review_weight handling in convert/SKILL.md.
3
+
4
+ set -uo pipefail
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
+ SKILL_MD="${SCRIPT_DIR}/../../skills/convert/SKILL.md"
8
+ PASS=0
9
+ FAIL=0
10
+
11
+ assert_contains() {
12
+ local label="$1" block="$2" pattern="$3"
13
+ if printf '%s' "$block" | grep -Fq -- "$pattern"; then
14
+ echo " PASS: $label"
15
+ ((PASS++))
16
+ else
17
+ echo " FAIL: $label"
18
+ ((FAIL++))
19
+ fi
20
+ }
21
+
22
+ extract_block() {
23
+ local start="$1" end="$2"
24
+ awk -v start="$start" -v end="$end" '
25
+ $0 == start { collecting = 1 }
26
+ collecting && $0 == end { collecting = 0 }
27
+ collecting { print }
28
+ ' "$SKILL_MD"
29
+ }
30
+
31
+ if [ ! -f "$SKILL_MD" ]; then
32
+ echo "FAIL: convert/SKILL.md not found at $SKILL_MD" >&2
33
+ exit 1
34
+ fi
35
+
36
+ INTERVIEW_BLOCK="$(extract_block '### Phase 3: Conventions interview' '### Phase 4: Create substrate skeleton')"
37
+ WRITE_BLOCK="$(extract_block '### Phase 5: Write CONVENTIONS.md' '### Phase 6: Write the canonical AGENTS.md section')"
38
+ AUDIT_BLOCK="$(extract_block '### Phase S1: Audit substrate health' '### Phase S2: Plan the sync')"
39
+ PRESERVE_BLOCK="$(extract_block '### Phase S4: Preserve user state' '### Phase S5: Commit')"
40
+
41
+ assert_contains "bootstrap keeps the six-question interview" "$INTERVIEW_BLOCK" \
42
+ 'Six questions, in order'
43
+ assert_contains "review weight adds no interview question" "$INTERVIEW_BLOCK" \
44
+ 'not another interview question'
45
+ assert_contains "fresh bootstrap writes the standard default" "$WRITE_BLOCK" \
46
+ 'review_weight: standard'
47
+ assert_contains "all five values are discoverable" "$WRITE_BLOCK" \
48
+ 'none | light | standard | thorough | maximum'
49
+ assert_contains "missing setting resolves to standard" "$WRITE_BLOCK" \
50
+ 'is absent, review and autopilot resolve it to `standard`'
51
+ assert_contains "convert points to canonical policy" "$WRITE_BLOCK" \
52
+ 'principles/SKILL.md` Part IV and `review/SKILL.md'
53
+ assert_contains "sync accepts absence without migration" "$AUDIT_BLOCK" \
54
+ 'sync neither inserts the default into older projects'
55
+ assert_contains "sync preserves existing values" "$PRESERVE_BLOCK" \
56
+ 'preserve an existing value byte-for-byte'
57
+ assert_contains "sync never resets the setting" "$PRESERVE_BLOCK" \
58
+ 'never added, reset, or rewritten by sync'
59
+
60
+ printf '\nResults: %d passed, %d failed\n' "$PASS" "$FAIL"
61
+ [ "$FAIL" -eq 0 ]
@@ -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.15.3"
25
+ WORK_VIEW_VERSION="0.16.1"
26
26
 
27
27
  # ============================================================================
28
28
  # Version prelude (POSIX / bash 3.2 safe — runs BEFORE the Bash-4 guard)