@nklisch/pi-agile-workflow 0.16.3 → 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.
@@ -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.3",
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.3",
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
 
@@ -568,7 +571,7 @@ to the unbound backlog so the gate does not silently expand release scope.
568
571
  | `gate-security` | Bound items' code changes against security checklist | Items with `gate_origin: security`, tagged `[security]`, `release_binding` set |
569
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 |
570
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 |
571
- | `gate-docs` | Foundation-doc alignment with the bundle's behavior changes | Items with `gate_origin: docs`, tagged `[documentation]` — enforces rolling-foundation |
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 |
572
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` |
573
576
 
574
577
  For gates that emit findings as items, placement flows through
@@ -617,7 +620,9 @@ parent, and dependency. Common patterns:
617
620
  - `work-view --help` for the full flag set
618
621
 
619
622
  Foundation docs in `docs/` describe the system's current state or intended
620
- 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
621
626
  itself is durable memory: record decisions, blockers, implementation
622
627
  discoveries, and review findings in item bodies instead of depending on chat
623
628
  history.
@@ -680,12 +685,16 @@ class is needed and allowed.
680
685
 
681
686
  Concrete model guidance lives in `skills/principles/references/models.md` and is
682
687
  resolved against current availability when selection matters. GPT-5.6 Luna is
683
- the implementation workhorse; Sol is preferred for design, review, complex code,
684
- and as the low-thinking bridge above Luna; Terra is a situational middle pick;
685
- and Claude Fable is a high-cost design, orchestration, and review specialist
686
- rather than the default implementer. These are capability recommendations, not
687
- fixed routing. Luna, Terra, Sol, and Codex share OpenAI lineage, so moving among
688
- 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.
689
698
 
690
699
  ### Bootstrap (user-invocable only)
691
700
 
@@ -742,7 +751,7 @@ neither substitutes inline self-approval for a required fresh-context lane.
742
751
  | `gate-security` | Security scan over bound items; produces items with `gate_origin: security` |
743
752
  | `gate-tests` | Test-coverage scan; produces gap items with `gate_origin: tests` |
744
753
  | `gate-cruft` | Dead-code scan; produces cleanup items with `gate_origin: cruft` |
745
- | `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 |
746
755
  | `gate-patterns` | Pattern extraction; writes pattern skills (`.agents/skills/patterns/`), the generated `.agents/rules/patterns.md` digest, + tracking item with `gate_origin: patterns` |
747
756
 
748
757
  All five fire during `release-deploy`'s `quality-gate` stage in the order
@@ -383,10 +383,12 @@ stages advance. Reading the file IS reading the state of the work.
383
383
  ## 9. Rolling-Foundation
384
384
 
385
385
  Foundation docs (`docs/VISION.md`, `docs/SPEC.md`, `docs/ARCHITECTURE.md`,
386
- and any others) describe the project's vision (future-looking) and current
387
- intent what is true now, OR what will be true once in-flight design lands.
388
- They roll forward in place as either evolves. No legacy comments. Git carries
389
- 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.
390
392
 
391
393
  ### Two timing styles
392
394
 
@@ -402,9 +404,9 @@ Both are legitimate; the project picks one or mixes per change size:
402
404
 
403
405
  The discipline is identical in both styles: replace stale assertions in
404
406
  place, never accumulate "previously" / "in v1.x" / migration prose.
405
- `gate-docs` at release-deploy time is the backstop it catches drift between
406
- intent (what the doc asserts) and reality (what code does) regardless of
407
- 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.
408
410
 
409
411
  ### What this forbids
410
412
 
@@ -418,14 +420,14 @@ which timing style was used.
418
420
 
419
421
  ### What this enables
420
422
 
421
- - A new contributor reads the doc and learns the system as it IS or as
422
- 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
423
425
  - Foundation docs stay short and current rather than growing with every
424
426
  change
425
427
  - `git log docs/<file>.md` shows every rolling-forward edit — perfect
426
428
  audit trail without bloating the doc
427
- - Discrepancies between intent and reality become bugs that `gate-docs`
428
- 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
429
431
 
430
432
  ### At design time
431
433
 
@@ -434,8 +436,8 @@ which timing style was used.
434
436
  the update as part of scope)
435
437
  - For large-scope `scope` operations, design-first is the default —
436
438
  `scope` rolls foundation docs forward as part of the same operation
437
- - Identify which foundation doc(s) need rolling forward; reading them
438
- 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
439
441
  - If a feature's design contradicts a foundation doc, EITHER the design
440
442
  is wrong OR the doc is. Resolve before designing the implementation.
441
443
 
@@ -449,18 +451,20 @@ which timing style was used.
449
451
  adjust whichever was wrong (implementation or assertion).
450
452
  - Replace stale assertions in place. Delete the old text. Never append
451
453
  "previously" / "in v1.x" / migration prose.
452
- - The `gate-docs` runs at release-deploy time and produces items for
453
- 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.
454
456
 
455
457
  ### Design checklist
456
458
 
457
- - [ ] Every assertion in SPEC and ARCHITECTURE reflects current code OR
458
- 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)
459
461
  - [ ] VISION.md reflects the project's current direction, not past direction
460
462
  - [ ] No "previously" / "originally" / "in v1.x" prose anywhere in `docs/`
461
- - [ ] When a feature changes behavior or direction, foundation docs update
462
- in the same commit set as the change (code-first) or were preflight-
463
- 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
464
468
  - [ ] `git log docs/<file>.md` shows the audit trail; the doc shows the
465
469
  present
466
470
 
package/docs/VISION.md CHANGED
@@ -34,9 +34,11 @@ 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
@@ -111,7 +113,7 @@ The pattern proves itself when a fresh session in a substrate-bootstrapped repo
111
113
  picks up active work without re-feed; when direct production work and autopilot
112
114
  both finish decisively while respecting dependency, test-integrity, review, and
113
115
  parent-roll-up invariants; and when foundation docs five features later still
114
- describe the present without legacy comments.
116
+ make true, noncontradictory current-or-future claims without legacy comments.
115
117
 
116
118
  ## Relationship to workflow
117
119
 
@@ -110,6 +110,7 @@ CAPSULES = {
110
110
  "Stories fast-advance on verification; features and epics get deeper review.",
111
111
  "Reviewer findings are proposals; the receiving orchestrator judges actual risk in repository context.",
112
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.",
113
114
  "Advisory review is non-blocking during design, but final autopilot completion needs a successful review path.",
114
115
  ],
115
116
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nklisch/pi-agile-workflow",
3
- "version": "0.16.3",
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.3"
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)
@@ -303,9 +303,11 @@ When the scoped queue appears drained:
303
303
  - `standard`: use balanced risk-based fresh-context review.
304
304
  - `thorough`: increase complementary and adversarial fresh-context coverage.
305
305
  - `maximum`: seek multi-model, multi-pass complementary → adversarial review.
306
- Ask for bugs, missed acceptance criteria, unreviewed risks, foundation-doc
307
- drift, and substrate-state inconsistencies that would make "complete"
308
- premature. Exact reviewer count and pass depth remain model judgment within
306
+ Ask for bugs, missed acceptance criteria, unreviewed risks, false/stale/
307
+ contradictory foundation-doc assertions, and substrate-state inconsistencies
308
+ that would make "complete" premature. Foundation-doc omissions and
309
+ unimplemented future-state claims are not findings. Exact reviewer count and
310
+ pass depth remain model judgment within
309
311
  the weight's ceiling/intent.
310
312
  3. When independent review runs, use a different-class peer when reachable;
311
313
  otherwise spawn a generic same-harness fresh-context reviewer from
@@ -514,7 +514,9 @@ parent, and dependency. Common patterns:
514
514
  - `work-view --help` for the full flag set
515
515
 
516
516
  Foundation docs in `docs/` describe the system's current state or intended
517
- future state, never the past; git history is the audit trail. Item files are
517
+ future state, never the past; git history is the audit trail. Review existing
518
+ assertions only: missing coverage and unimplemented future intent are not drift;
519
+ flag only false, stale, or contradictory claims. Item files are
518
520
  the durable state: update the body with implementation discoveries, review
519
521
  findings, blockers, and decisions instead of relying on chat history.
520
522
 
@@ -3,7 +3,7 @@ name: gate-docs
3
3
  description: >
4
4
  Documentation gate that enforces the rolling-foundation principle. Delegates the full drift
5
5
  detection to a deep documentation scanner agent which scans the bundle's changes for
6
- foundation-doc drift (assertions in docs/ that no longer match implementation), changelog gaps,
6
+ foundation-doc drift (false, stale, or contradictory assertions—not missing coverage), changelog gaps,
7
7
  README staleness, and skill/pattern-skill staleness. The orchestrator converts findings into items
8
8
  in .work/active/ with gate_origin:docs and tags:[documentation]. Auto-triggers during
9
9
  /agile-workflow:release-deploy.
@@ -12,10 +12,12 @@ description: >
12
12
  # Gate-Docs
13
13
 
14
14
  You orchestrate a documentation gate that enforces the **rolling-foundation
15
- principle**: foundation docs in `docs/` describe current truth or intended
16
- future state, never past state. After implementation work, foundation-doc
17
- assertions can drift from reality or from the intended state they are meant to
18
- describe.
15
+ principle**: foundation docs in `docs/` may describe current truth or intended
16
+ future state, never superseded truth. Future-state claims do not become drift
17
+ merely because implementation has not reached them, and foundation docs are not
18
+ required to mention every capability or bundle change. Drift exists only when an
19
+ assertion is false for the time/state it claims, stale after intent changed, or
20
+ contradictory with another authoritative claim.
19
21
 
20
22
  The actual drift detection runs inside a **deep documentation scanner agent**
21
23
  (a generic sub-agent prompted with the scanner posture from `../principles/references/subagents.md`); your role is to
@@ -77,10 +79,14 @@ returns structured findings.
77
79
  **Brief template**:
78
80
 
79
81
  > You are conducting a documentation drift audit for release `<version>` as an
80
- > agile-workflow scanner. The principle: docs in `docs/` describe current truth
81
- > or intended future state, never past state. Drift = doc says X, but the
82
- > completed bundle now does Y or the intended future state has changed to Y. Use
83
- > read/search/shell tools as needed, but do not spawn nested sub-agents or fix docs.
82
+ > agile-workflow scanner. The principle: foundation docs in `docs/` may describe
83
+ > current truth or intended future state. Drift is assertion-only: a claim is
84
+ > false for the state/time it says it describes, stale because intent changed,
85
+ > or contradictory with another authoritative claim. A future-state assertion
86
+ > is not drift merely because code does not implement it yet. Missing foundation-
87
+ > doc coverage is allowed: do not flag, add, or request claims for bundle changes
88
+ > the foundation docs do not discuss. Use read/search/shell tools as needed, but
89
+ > do not spawn nested sub-agents or fix docs.
84
90
  >
85
91
  > **Bundle scope** (the changes that may have caused drift):
86
92
  > ```
@@ -110,8 +116,9 @@ returns structured findings.
110
116
  > - Generated files (look for `# generated`, `llms-full.txt` — never
111
117
  > edit; flag for regeneration)
112
118
  >
113
- > 2. **Classify each bound item's change type**:
114
- > | Change type | Doc owners |
119
+ > 2. **Classify each bound item's change type**. This table identifies places to
120
+ > check for existing claims; it does not require foundation-doc coverage:
121
+ > | Change type | Potential references |
115
122
  > |---|---|
116
123
  > | New feature / behavior | SPEC.md, ARCHITECTURE.md, relevant guide pages |
117
124
  > | New CLI command or flag | CLI reference, SPEC.md, guide pages |
@@ -123,10 +130,15 @@ returns structured findings.
123
130
  > | Changed interface used by repo skills | Repo-specific skills referencing it |
124
131
  >
125
132
  > 3. **Drift-check passes** — run each relevant pass yourself:
126
- > - **Foundation-doc drift** — for VISION.md, SPEC.md, ARCHITECTURE.md,
127
- > for each assertion (interface, contract, component, behavior), grep
128
- > the bundle's changed files. Flag any assertion where the doc says X
129
- > but the code now does Y. Cite file:line for the doc and the code.
133
+ > - **Foundation-doc drift** — inspect only assertions that exist in
134
+ > VISION.md, SPEC.md, ARCHITECTURE.md, and domain foundation docs. First
135
+ > classify each assertion as current-state or intended-future-state. For a
136
+ > current-state claim, flag only when authoritative implementation now
137
+ > contradicts it. For a future-state claim, flag only when newer accepted
138
+ > intent or another authoritative foundation claim contradicts it—not when
139
+ > implementation is absent. Never flag a bundle capability merely because
140
+ > no foundation doc mentions it. Cite file:line for the claim and its
141
+ > contradicting source.
130
142
  > - **README staleness** — verify quick-start, install steps, examples,
131
143
  > command names match the codebase post-bundle.
132
144
  > - **CHANGELOG gap** — for each item bound to release `<version>`,
@@ -157,10 +169,12 @@ returns structured findings.
157
169
  > - **Confidence**: High | Medium
158
170
  > - **Relevance**: Release-relevant | Ambient
159
171
  > - **Doc location**: `<file>:<line>`
160
- > - **Code location**: `<file>:<line>` (for assertion drift; omit for gaps)
172
+ > - **Contradicting source**: `<file>:<line>` (implementation, newer intent,
173
+ > or another authoritative claim; omit for non-assertion categories)
161
174
  > - **Current doc text**:
162
175
  > > <quote — what the doc currently says>
163
- > - **Reality**: <what the code now does, post-bundle>
176
+ > - **Contradiction**: <why the quoted claim is false, stale, or contradictory
177
+ > for the state/time it claims to describe>
164
178
  > - **Required edit**: <roll the doc forward to match the new active truth.
165
179
  > Apply rolling-foundation: no "previously" prose, no "in v1.x" notes.
166
180
  > Replace the assertion in place. For generated files, give the
@@ -184,6 +198,9 @@ returns structured findings.
184
198
  > Follow concrete references into adjacent docs, generated catalogs, or
185
199
  > system-wide documentation when needed; do not perform an aimless doc sweep.
186
200
  > - Cite file:line for every finding.
201
+ > - Absence is not a foundation-doc finding. Do not propose adding coverage for
202
+ > an undocumented bundle change, and do not treat unimplemented future intent
203
+ > as stale current-state documentation.
187
204
  > - Required edits ENFORCE rolling-foundation: replace stale assertions in
188
205
  > place. Do NOT propose adding "previously" or "in v1.x" prose. Git is the
189
206
  > audit trail; the doc carries the active truth.
@@ -225,13 +242,13 @@ updated: YYYY-MM-DD
225
242
 
226
243
  ## Location
227
244
  - Doc: `<file>:<line>`
228
- - Code: `<file>:<line>` (for assertion drift)
245
+ - Contradicting source: `<file>:<line>` (for assertion drift)
229
246
 
230
247
  ## Current doc text
231
248
  > <quote the doc — what it currently says>
232
249
 
233
- ## Reality
234
- <what the code now does, post-bundle>
250
+ ## Contradiction
251
+ <why the claim is false, stale, or contradictory for its stated time/state>
235
252
 
236
253
  ## Required edit
237
254
  <roll the doc forward to match the new active truth. Apply rolling-foundation:
@@ -263,17 +280,19 @@ In conversation:
263
280
  - **Drift found**: count by category
264
281
  - **Items created**: count, with new ids
265
282
  - **Generated files needing regen**: list (if any)
266
- - **Goal reminder**: rolling-foundation enforces docs describing current truth
267
- or intended future state, never past state. Findings here become items the
268
- release flow drains to `done` before shipping.
283
+ - **Goal reminder**: rolling-foundation permits current truth or intended future
284
+ state. Only false, stale, or contradictory assertions become findings; missing
285
+ coverage and unimplemented future intent do not. Findings here become items
286
+ the release flow drains to `done` before shipping.
269
287
 
270
288
  ## Guardrails
271
289
 
272
290
  - **The drift detection happens in the scanner agent, not here.** Your job is
273
291
  bundle prep, dispatch, and item-writing. Don't replicate the scanner's
274
292
  analysis in the orchestrator's context.
275
- - Foundation-doc drift is the gate's primary job. The scanner surfaces it;
276
- you turn it into items.
293
+ - Foundation-doc drift is assertion-only: false, stale, or contradictory
294
+ claims. Missing coverage and merely unimplemented future-state claims are not
295
+ findings and must not produce items or edits.
277
296
  - Required edits ENFORCE rolling-foundation: replace stale assertions in
278
297
  place. Do NOT propose adding "previously" or "in v1.x" prose.
279
298
  - Don't fix the docs in this skill — produce items only. Implementation of
@@ -127,7 +127,7 @@ The unit of work is its file. The brief, the design, the implementation notes, a
127
127
 
128
128
  ## 9. Rolling-Foundation
129
129
 
130
- Foundation docs (`docs/VISION.md`, `docs/SPEC.md`, `docs/ARCHITECTURE.md`, and any others) describe the project's vision (future-looking) and current intent what is true now, OR what will be true once in-flight design lands. They roll forward in place as either evolves. No legacy comments. Git carries history; the doc carries truth.
130
+ Foundation docs (`docs/VISION.md`, `docs/SPEC.md`, `docs/ARCHITECTURE.md`, and any others) describe what is true now or the future state the project intends to reach. A future-state claim remains valid before implementation exists. Foundation docs are selective standing context, not an exhaustive inventory: silence about a capability is allowed. They roll forward when an assertion becomes false, stale, or contradictory. Git carries history; the doc carries truth.
131
131
 
132
132
  ### Two timing styles
133
133
 
@@ -136,7 +136,7 @@ Both are legitimate; the project picks one or mixes per change size:
136
136
  - **Code-first (default for routine features):** docs update at implementation merge, in the same commit set as the code that lands the change.
137
137
  - **Design-first (for large scope, initial ideation, architectural shifts):** docs preflight-update at scope time, leading the code through the implementation window. The doc temporarily describes an intended near-future state. The agile-workflow `scope` skill operates this way for large scope; `ideate` operates this way at project bootstrap.
138
138
 
139
- The discipline is identical in both styles: replace stale assertions in place, never accumulate "previously" / "in v1.x" / migration prose. `gate-docs` at release-deploy time is the backstop it catches drift between intent and reality regardless of which timing style was used.
139
+ The discipline is identical in both styles: replace stale assertions in place, never accumulate "previously" / "in v1.x" / migration prose. `gate-docs` is an assertion-consistency backstop: it catches false, stale, or contradictory claims, but never treats missing coverage or merely unimplemented future intent as drift.
140
140
 
141
141
  ### What this forbids
142
142
 
@@ -148,16 +148,16 @@ The discipline is identical in both styles: replace stale assertions in place, n
148
148
 
149
149
  ### What this enables
150
150
 
151
- - A new contributor reads the doc and learns the system as it IS or as it is meant to imminently become — not as it was
151
+ - A new contributor reads the doc and learns the system as it is or as it is intended to become — not as it was
152
152
  - Foundation docs stay short and current rather than growing with every change
153
153
  - `git log docs/<file>.md` shows every rolling-forward edit — perfect audit trail
154
- - Discrepancies between intent (what the doc asserts) and reality (what code does) become bugs that gate-docs surfaces, not historical artifacts
154
+ - False, stale, or contradictory assertions become bugs that gate-docs surfaces; omissions and not-yet-implemented future claims do not
155
155
 
156
156
  ### At design time
157
157
 
158
158
  - When scoping a feature that changes a foundation-doc assertion, decide the timing: code-first (defer the doc update) or design-first (preflight the update as part of scope)
159
159
  - For large-scope `scope` operations, design-first is the default — `scope` rolls foundation docs forward as part of the same operation
160
- - Identify which foundation doc(s) need rolling forward; reading them at design time prevents stale assumptions
160
+ - Identify any existing foundation assertions the design changes or contradicts; do not add coverage merely because the docs omit the capability
161
161
  - If a feature's design contradicts a foundation doc, EITHER the design is wrong OR the doc is. Resolve before designing the implementation.
162
162
 
163
163
  ### At implementation time
@@ -165,14 +165,15 @@ The discipline is identical in both styles: replace stale assertions in place, n
165
165
  - If working code-first: after implementing a change, ask "what does a foundation doc now say that's no longer true?" — update assertions in place, commit with the implementation
166
166
  - If working design-first: the doc was preflight-updated at scope time. Verify the implementation matches the doc's assertion; if it deviates, adjust whichever was wrong (implementation or assertion).
167
167
  - Replace stale assertions in place. Delete the old text. Never append.
168
- - The `gate-docs` skill runs at release-deploy time and produces items for any remaining drift but the goal is to leave it nothing to find.
168
+ - The `gate-docs` skill produces items only for remaining false, stale, or contradictory assertions—not missing coverage or unimplemented future intent.
169
169
 
170
170
  ### Design checklist
171
171
 
172
- - [ ] Every assertion in SPEC and ARCHITECTURE reflects current code OR imminent in-flight design (no stale assertions from cancelled work)
172
+ - [ ] Every assertion in SPEC and ARCHITECTURE is true for the current or intended-future state it claims (no stale assertions from superseded intent)
173
173
  - [ ] VISION.md reflects the project's current direction, not past direction
174
174
  - [ ] No "previously" / "originally" / "in v1.x" prose anywhere in `docs/`
175
- - [ ] When a feature changes behavior or direction, foundation docs update in the same commit set as the change (code-first) or were preflight-updated and are still accurate (design-first)
175
+ - [ ] When a feature invalidates an existing foundation assertion, that assertion updates in the same commit set (code-first) or was preflight-updated and remains accurate (design-first)
176
+ - [ ] No finding or edit was created solely because foundation docs omit a capability or describe future intent not yet implemented
176
177
  - [ ] `git log docs/<file>.md` shows the audit trail; the doc shows the present
177
178
 
178
179
  ---
@@ -9,8 +9,8 @@
9
9
  > "use a different model class".
10
10
 
11
11
  Model generations move fast — the *families and classes* below are the durable
12
- abstraction; specific versions and names (for example Claude Fable, GPT-5.6
13
- Luna/Terra/Sol, GPT-5.x-Codex, Gemini 3.5, and GLM-5.2) are current resolutions
12
+ abstraction; specific versions and names (for example Claude Fable 5, GPT-5.6
13
+ Luna/Terra/Sol, Gemini 3.5, and GLM-5.2) are current resolutions
14
14
  of each class as of writing. Always resolve
15
15
  the concrete model against current sources when the choice is load-bearing.
16
16
 
@@ -19,11 +19,12 @@ the concrete model against current sources when the choice is load-bearing.
19
19
  1. [Capability axes (the decision vocabulary)](#1-capability-axes-the-decision-vocabulary)
20
20
  2. [Model-family cards](#2-model-family-cards)
21
21
  3. [Role → capability → model](#3-role--capability--model)
22
- 4. [Host cross-class peer pairing](#4-host--cross-class-peer-pairing)
23
- 5. [Multi-class review for deep/complex work](#5-multi-class-review-for-deepcomplex-work)
24
- 6. [Two-phase design review: advisory then adversarial](#6-two-phase-design-review-advisory-then-adversarial)
25
- 7. [peeragent invocation cheatsheet](#7-peeragent-invocation-cheatsheet)
26
- 8. [Fallbacks when no peer is reachable](#8-fallbacks-when-no-peer-is-reachable)
22
+ 4. [Conditional prompt tuning](#4-conditional-prompt-tuning)
23
+ 5. [Host → cross-class peer pairing](#5-host--cross-class-peer-pairing)
24
+ 6. [Multi-class review for deep/complex work](#6-multi-class-review-for-deepcomplex-work)
25
+ 7. [Two-phase design review: advisory then adversarial](#7-two-phase-design-review-advisory-then-adversarial)
26
+ 8. [peeragent invocation cheatsheet](#8-peeragent-invocation-cheatsheet)
27
+ 9. [Fallbacks when no peer is reachable](#9-fallbacks-when-no-peer-is-reachable)
27
28
 
28
29
  ---
29
30
 
@@ -36,49 +37,47 @@ the in-skill prose names; this is what they mean.
36
37
  entire value of a cross-model peer is independent blind spots, *not* a more
37
38
  authoritative answer. Two models that share training add little over one.
38
39
  - **Reasoning depth** — multi-step deduction, proof-like correctness, holding a
39
- large logical structure. Raised by high/xhigh effort tiers; strongest in
40
- Opus-class, GPT-5.x-Codex at xhigh, GLM-5.2 at xhigh.
40
+ large logical structure. Raised by high/xhigh effort tiers; high-capability
41
+ choices include Fable 5, Opus 4.8, GPT-5.6 Sol, and GLM-5.2.
41
42
  - **Long-horizon agentic stamina** — sustained self-correcting multi-step tool
42
- use over many turns / long autonomous runs. Strongest in Codex, GLM-5.2
43
- (built for up-to-8h agentic runs), and Opus-class.
44
- - **Context window** — how much the model can hold at once. GLM-5.2 (1M),
45
- Opus-class (1M), Gemini 3.5 (2M, Deep Think), Sonnet-class (1M beta).
46
- - **Latency budget** — wall-clock cost. Top-tier reasoning peers (Opus-class,
47
- xhigh Codex/GLM) commonly take **10–30 minutes** for large reviews and may be
48
- quiet for most of it. Budget for it; do not treat a long quiet period as a hang.
43
+ use over many turns / long autonomous runs. Fable 5, Opus 4.8, GPT-5.6 Sol,
44
+ and GLM-5.2 are credible choices, but none makes weak approval or verification
45
+ boundaries safe.
46
+ - **Context window** how much the model can hold at once. GLM-5.2 (1M maximum;
47
+ stable full-window fidelity remains under-tested independently), Fable 5 / Opus
48
+ 4.8 / Sonnet 5 (1M), Gemini 3.5 (2M, Deep Think).
49
+ - **Latency budget** wall-clock cost. Top-tier reasoning peers (Fable 5,
50
+ Opus 4.8, Sol, and xhigh GLM) commonly take **10–30 minutes** for large reviews
51
+ and may be quiet for most of it. Budget for it; do not treat a long quiet
52
+ period as a hang.
49
53
  - **Write fidelity** — code-writing accuracy and instruction-following for
50
54
  production edits. The property that earns a model a *worker* role.
51
55
 
52
56
  ## 2. Model-family cards
53
57
 
54
58
  **Claude (Anthropic)** — `--agent claude`
55
- - Tiers include `opus`, `sonnet`, `haiku`, and Claude Fable where available.
56
- - Effort: `high | xhigh` (default `xhigh`).
57
- - Recommendations: Opus for deep review/adversarial work, Sonnet for primary
58
- work and scouting, Haiku for cheap leaf fan-out. Fable is a strong but
59
- expensive design, orchestration, and review choice; it can implement, but its
60
- cost usually makes another capable worker preferable.
59
+ - Current upper tiers are Fable 5, Opus 4.8, and Sonnet 5; Haiku remains the
60
+ cheap leaf-fan-out tier. Effort: `high | xhigh` (wrapper default `xhigh`).
61
+ - Sonnet 5 high is the capable high-throughput worker/scout; use xhigh for its
62
+ hardest coding. Opus 4.8 xhigh is the stable premium default for complex
63
+ coding, debugging, and deep review. Fable 5 high/xhigh is the expensive
64
+ escalation for the hardest ambiguous, long-running, orchestration, design,
65
+ and review work—not the routine implementer. Prefer Opus for security-adjacent
66
+ work where Fable's safety classifier/fallback could interrupt the run.
61
67
 
62
68
  **GPT-5.6 (OpenAI; host-native where available)**
63
- - **Luna** is the recommended implementation workhorse: medium thinking for
64
- simple/routine work, scaling through xhigh for fairly complicated work short
65
- of the hardest tier.
66
- - **Terra** remains a situational middle pick. Current practitioner preference
67
- often favors Sol at low thinking as the bridge above Luna rather than treating
68
- Terra as a mandatory rung.
69
- - **Sol** is preferred for design, review, and complex/large implementation. Low
70
- thinking bridges above Luna; raise thinking for the hardest architecture,
71
- review, and coding work.
72
- - These are recommendations, not fixed capability facts. Discover current host
73
- availability before selection. Luna, Terra, Sol, and Codex share OpenAI
74
- lineage, so switching among them is not cross-model evidence.
75
-
76
- **Codex (OpenAI)** — `--agent codex`
77
- - Current class: GPT-5.x-Codex (model auto-selected; no `--model` flag).
78
- - Effort: `medium | high | xhigh` (default `high`).
79
- - Strengths: top-tier long-horizon agentic coding, multi-step tool use.
80
- - Best roles: cross-class peer from a Claude/Gemini/GLM host; highest-tier
81
- worker for long agentic write paths.
69
+ - **Luna** is the cost-efficient routine implementation and fan-out workhorse:
70
+ start at medium, then raise effort for bounded work that still benefits from
71
+ the cheaper tier. Do not make it the default for every implementation task.
72
+ - **Terra** remains a situational middle pick for moderate work and bounded
73
+ context reading. Luna at more effort or Sol at less effort often gives a
74
+ better cost/capability point, so Terra is not a mandatory rung.
75
+ - **Sol** is the quality-first general coding default at medium/high and the
76
+ preferred model for design, review, and complex/large implementation at
77
+ higher effort. Reserve max-like modes for measured quality gains behind tight
78
+ action boundaries; documented over-persistence grows at the highest efforts.
79
+ - Discover current host availability before selection. Luna, Terra, Sol, and
80
+ Codex share OpenAI lineage, so switching among them is not cross-model evidence.
82
81
 
83
82
  **Gemini (Google)** — `--agent gemini`
84
83
  - Model: `gemini-3.5` (2M context, Deep Think mode).
@@ -86,31 +85,44 @@ the in-skill prose names; this is what they mean.
86
85
  - Best roles: cross-class peer; large-context review where 2M context matters.
87
86
 
88
87
  **Z.AI GLM 5.2** — `--agent zai`
89
- - Model: `glm-5.2` only (MoE 744B / 40B-active; stable 1M context; DeepSeek
90
- Sparse Attention; built for long-horizon agentic engineering, ~8h runs).
91
- - Effort: `medium | high | xhigh` (default `high`).
92
- - Best roles: cross-class peer (distinct training lineage distinct blind
93
- spots); long-horizon agentic worker; highest-tier reviewer at `xhigh`.
94
- - Note: the peeragent `zai` adapter runs GLM 5.2 **through Pi**, and needs a
95
- current peeragent build (`zai` agent). Older cached builds only list
88
+ - Model: `glm-5.2` only (MoE 744B / 40B-active; 1M maximum context; DeepSeek
89
+ Sparse Attention). Effort: `medium | high | xhigh` (wrapper default `high`).
90
+ - Best roles: cross-class peer; cost-efficient localized implementation and
91
+ parallel inspection; high-tier reviewer when the relevant behavior is named.
92
+ Independent evidence is strong but variable: use a second pass or stronger
93
+ model when correctness depends on product rules distributed across files.
94
+ - The peeragent `zai` adapter runs GLM 5.2 **through Pi** and needs a current
95
+ peeragent build (`zai` agent). Older cached builds only list
96
96
  `codex|claude|gemini`.
97
97
 
98
98
  ## 3. Role → capability → model
99
99
 
100
100
  | Role | Needs (capability) | Primary models |
101
101
  |---|---|---|
102
- | Primary worker | write fidelity, agentic stamina | GPT-5.6 Luna medium→xhigh / Sonnet-class / Codex high / GLM-5.2 high; Sol for complex/large implementation |
103
- | Scanner/scout (deep read-only fan-out) | domain inspection, evidence, scoped artifacts | Haiku / Luna or Sonnet for volume; Sol/Opus/Codex xhigh/GLM xhigh for subtle gates |
104
- | Deep reviewer | reasoning depth, fresh context | GPT-5.6 Sol / Claude Fable or Opus / Codex xhigh / GLM-5.2 xhigh |
102
+ | Primary worker | write fidelity, agentic stamina | Luna medium→xhigh for routine/high-volume work; Sonnet 5 high or Sol medium/high for substantial work; Opus 4.8 xhigh / Fable 5 high→xhigh / GLM-5.2 high when complexity or horizon earns it |
103
+ | Scanner/scout (deep read-only fan-out) | domain inspection, evidence, scoped artifacts | Haiku / Luna / Sonnet 5 for volume; Sol / Opus 4.8 / Fable 5 / GLM xhigh for subtle gates |
104
+ | Deep reviewer | reasoning depth, fresh context | GPT-5.6 Sol / Claude Opus 4.8 or Fable 5 / GLM-5.2 xhigh, with a second pass for distributed invariants |
105
105
  | Advisory peer (Phase 1) | blind-spot diversity, augmentation | a **different class** than the host |
106
106
  | Adversarial peer (Phase 2) | blind-spot diversity, attack posture | a **different class** than host + than Phase 1 |
107
107
 
108
- ## 4. Host cross-class peer pairing
108
+ ## 4. Conditional prompt tuning
109
+
110
+ Apply these only when the task shape or an observed trace warrants them; effort
111
+ and a clear success criterion usually beat permanent model-specific boilerplate.
112
+
113
+ | Model / symptom | Small adjustment |
114
+ |---|---|
115
+ | GPT-5.6 prompt bloat or scope drift | State outcome, success criteria, constraints, approval boundaries, and stop rules once; expose only relevant tools. Avoid generic persistence language. Require tool/diff/test evidence before claiming completion. |
116
+ | Opus 4.8 / Sonnet 5 literalism or low review recall | State the rule's full scope explicitly. For review, ask for coverage first and rank/filter findings afterward. Raise effort before adding process prose; add tool triggers only when tool use is actually weak. |
117
+ | Fable 5 over-planning or unrequested work | Ask for the simplest in-scope result; forbid speculative features/refactors and unrequested side actions. Ground progress claims in tool results. Never request hidden chain-of-thought reproduction. |
118
+ | GLM-5.2 cross-file review misses | Name the behavioral invariant and every surface that must agree. Generic “strict production review” can divert into hardening checklists; for distributed correctness, require explicit validation plus an independent second pass. |
119
+
120
+ ## 5. Host → cross-class peer pairing
109
121
 
110
122
  The rule: the peer must be a **different model class** than the host, or it is
111
123
  not cross-model evidence (fall back to a fresh same-class sub-agent instead).
112
124
  For each host, several valid peer classes exist — pick by **maximum blind-spot
113
- diversity**, and for deep work use **two distinct peer classes** (§5).
125
+ diversity**, and for deep work use **two distinct peer classes** (§6).
114
126
 
115
127
  | Host class | Valid peer classes (any different class) |
116
128
  |---|---|
@@ -123,7 +135,7 @@ When the natural pair is unavailable, fall through to the next class; never
123
135
  peer within the host lineage and call it cross-model. A same-lineage reviewer
124
136
  may still provide fresh context when labeled accurately.
125
137
 
126
- ## 5. Multi-class review for deep/complex work
138
+ ## 6. Multi-class review for deep/complex work
127
139
 
128
140
  The risk and `review_weight` policy lives in
129
141
  [advisory-review.md](advisory-review.md). At model-selection time, when that
@@ -131,7 +143,7 @@ policy calls for two classes, choose two distinct training lineages that also
131
143
  differ from the host where availability permits. Pair one with each phase;
132
144
  disagreement is evidence to investigate, not a vote.
133
145
 
134
- ## 6. Two-phase design review: advisory then adversarial
146
+ ## 7. Two-phase design review: advisory then adversarial
135
147
 
136
148
  The phase order, artifact-specific loop shapes, ceilings, and recording format
137
149
  live in [advisory-review.md](advisory-review.md). This model-layer reference adds
@@ -139,7 +151,7 @@ one constraint: when two classes are selected, Phase 2 should differ from both
139
151
  the host and Phase 1 where the available class set permits it. Never label an
140
152
  unknown or same-class reviewer cross-model.
141
153
 
142
- ## 7. peeragent invocation cheatsheet
154
+ ## 8. peeragent invocation cheatsheet
143
155
 
144
156
  Resolve the wrapper before calling — never assume `peeragent` is on `PATH`
145
157
  (`PEERAGENT_BIN` → bundled `bin/peeragent` → bare `peeragent`). Run in the
@@ -157,7 +169,7 @@ host harness's outside-sandbox mode; never `--full-access` for review.
157
169
  Always tell the reviewer **not** to recurse back through peeragent's own
158
170
  `peer`/`peer-review` skills or the wrapper — the reviewer is the endpoint.
159
171
 
160
- ## 8. Fallbacks when no peer is reachable
172
+ ## 9. Fallbacks when no peer is reachable
161
173
 
162
174
  When peeragent is unavailable, fails, would be same-class, or the needed class
163
175
  isn't reachable: spawn a **fresh max-effort generic sub-agent** at the highest
@@ -245,8 +245,8 @@ model strength, or repeated mention does not make a finding blocking.
245
245
  security, data integrity, public contracts, acceptance criteria, release
246
246
  safety, or trustworthy verification. It must be fixed or kept active before
247
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.
248
+ vulnerability, unintended breaking change, a false/stale/contradictory
249
+ foundation-doc assertion, or a test that proves required behavior is wrong.
250
250
  - **Important**: valid work below the current-cycle blocker bar. Park it in the
251
251
  unbound backlog with the risk rationale and advance the reviewed item. Examples
252
252
  include unlikely low-consequence edges, worthwhile hardening, nonessential
@@ -362,8 +362,9 @@ Nothing blocking or significant to flag."
362
362
  concerns evaporate into review prose.
363
363
  - Review's security check is lightweight. For a full security gate, use
364
364
  `/agile-workflow:gate-security`.
365
- - Foundation-doc drift is a blocker, not a nit. Rolling foundation is a hard
366
- rule.
365
+ - A false, stale, or contradictory foundation-doc assertion is a blocker, not a
366
+ nit. Missing coverage and future-state claims whose implementation has not yet
367
+ landed are not drift and must not be flagged or changed.
367
368
  - Do not advance an item past review unless the verdict is Approve or Approve
368
369
  with comments. Pushing through receiver-confirmed material blockers defeats
369
370
  the point of the stage; parking lower-risk findings does not.
@@ -43,10 +43,20 @@ lenses and note any lens skipped with the reason.
43
43
 
44
44
  ## Foundation-Doc Alignment
45
45
 
46
- - Does implementation invalidate any assertion in foundation docs such as
47
- `docs/VISION.md`, `docs/SPEC.md`, or `docs/ARCHITECTURE.md`?
48
- - If yes, did the implementer roll the doc forward in the same change?
49
- - Foundation-doc drift is a blocker in substrate mode.
46
+ Foundation docs may describe current state or intended future state and need not
47
+ cover every capability. Review assertions, not omissions:
48
+
49
+ - Does implementation make an existing current-state assertion in
50
+ `docs/VISION.md`, `docs/SPEC.md`, `docs/ARCHITECTURE.md`, or another foundation
51
+ doc false or stale?
52
+ - Does an existing future-state assertion contradict newer accepted intent or
53
+ another authoritative foundation claim? Lack of implementation alone is not a
54
+ contradiction.
55
+ - If an assertion is false, stale, or contradictory, did the implementer roll it
56
+ forward in the same change?
57
+ - Never request a foundation-doc addition merely because the change is missing
58
+ from those docs. Assertion drift is a blocker in substrate mode; omission is
59
+ not a finding.
50
60
 
51
61
  ## Naming And Comments
52
62
 
@@ -40,7 +40,8 @@ or story should already have passed review. Gather:
40
40
  children.
41
41
 
42
42
  Use the aggregate scope to spot cross-cutting concerns: public API shifts,
43
- foundation-doc drift, release gaps, and capability completeness.
43
+ false/stale/contradictory foundation-doc assertions (not omissions or
44
+ unimplemented future intent), release gaps, and capability completeness.
44
45
 
45
46
  ## Empty Diff Handling
46
47
 
@@ -1 +1 @@
1
- 0.16.3
1
+ 0.16.4