@gtrabanco/pi-agentic-workflow 0.13.2 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +3 -9
  2. package/dist/routing/catalogue.d.ts +1 -1
  3. package/dist/routing/catalogue.js +1 -1
  4. package/dist/runtime.d.ts +45 -0
  5. package/dist/runtime.js +62 -0
  6. package/package.json +10 -8
  7. package/skills/audit-docs/SKILL.md +6 -5
  8. package/skills/audit-pr/SKILL.md +1 -1
  9. package/skills/audit-pr/references/PORTABILITY.md +1 -1
  10. package/skills/execute-phase/SKILL.md +207 -116
  11. package/skills/execute-phase/references/DESCOPE.md +22 -18
  12. package/skills/execute-phase/references/EXECUTION_CONTRACT.md +69 -77
  13. package/skills/execute-phase/references/FOLDING.md +34 -47
  14. package/skills/execute-phase/references/PREFLIGHT.md +103 -114
  15. package/skills/execute-phase/references/PRE_EXECUTION_GATE.md +53 -60
  16. package/skills/init-workspace/SKILL.md +52 -16
  17. package/skills/init-workspace/references/BOOTSTRAP_DISCOVERY.md +6 -6
  18. package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +17 -10
  19. package/skills/init-workspace/references/PORTABILITY.md +1 -1
  20. package/skills/init-workspace/references/UPGRADE.md +50 -15
  21. package/skills/log-session/SKILL.md +4 -3
  22. package/skills/orchestration-envelope/references/TURN_CONTRACT.md +1 -1
  23. package/skills/pre-execution-review/references/LEDGERS.md +39 -39
  24. package/skills/pre-execution-review/references/POLICY.md +1 -0
  25. package/skills/product-audit/SKILL.md +4 -4
  26. package/skills/product-audit/references/AUDIT_PROCESS.md +3 -3
  27. package/skills/review-change/SKILL.md +1 -1
  28. package/skills/review-change/references/PORTABILITY.md +1 -1
  29. package/skills/unit-lane/SKILL.md +154 -0
  30. package/skills/unit-lane/references/DESIGN.md +35 -0
  31. package/skills/unit-lane/references/DOCS.md +36 -0
  32. package/skills/unit-lane/references/EVIDENCE.md +34 -0
  33. package/skills/unit-lane/references/IMPLEMENT.md +45 -0
  34. package/skills/unit-lane/references/PLAN.md +38 -0
  35. package/skills/unit-lane/references/RELEASE.md +45 -0
  36. package/skills/unit-lane/references/RESEARCH.md +37 -0
  37. package/skills/unit-lane/references/REVIEW.md +45 -0
  38. package/skills/unit-lane/references/STEPS.md +23 -0
  39. package/skills/unit-lane/references/TESTS.md +32 -0
  40. package/skills/workflow-status/references/ENVELOPE_FIELDS.md +5 -6
  41. package/skills/workflow-status/references/SENSOR_CORE.md +16 -20
  42. package/skills/workflow-status/references/SENSOR_SIGNALS.md +5 -7
  43. package/skills/design-feature/SKILL.md +0 -231
  44. package/skills/design-feature/references/INTERVIEW.md +0 -74
  45. package/skills/design-feature/references/PORTABILITY.md +0 -15
  46. package/skills/design-feature/references/REPAIR.md +0 -88
  47. package/skills/design-feature/references/UPSERT_EXAMPLE.md +0 -8
  48. package/skills/design-feature/references/WRITE_AND_UPSERT.md +0 -115
  49. package/skills/evidence-grounding/SKILL.md +0 -174
  50. package/skills/evidence-grounding/references/DELEGATION.md +0 -131
  51. package/skills/evidence-grounding/references/READINESS.md +0 -130
  52. package/skills/evidence-grounding/references/ROWS.md +0 -93
  53. package/skills/execute-phase/references/BATCH_AND_PORTABILITY.md +0 -57
  54. package/skills/execute-phase/references/CLOSEOUT.md +0 -77
  55. package/skills/execute-phase/references/HANDOFF.md +0 -21
  56. package/skills/execute-phase/references/OPPORTUNISTIC_FINDING.md +0 -45
  57. package/skills/execute-phase/references/UNIT_LOOP.md +0 -88
  58. package/skills/execute-phase/references/WORKFLOWS_FEATURE.md +0 -37
  59. package/skills/execute-phase/references/WORKFLOWS_FIX.md +0 -43
  60. package/skills/execute-phase/references/WORKFLOWS_LEGACY.md +0 -26
  61. package/skills/execute-phase/references/WORKFLOWS_SMALL_PHASED.md +0 -38
  62. package/skills/generate-docs/SKILL.md +0 -145
  63. package/skills/generate-docs/references/ADAPTERS.md +0 -15
  64. package/skills/generate-docs/references/ADAPTER_DISCOVERY.md +0 -33
  65. package/skills/generate-docs/references/GENERATION_PROCESS.md +0 -90
  66. package/skills/implementation-discovery/SKILL.md +0 -209
  67. package/skills/plan-feature/SKILL.md +0 -208
  68. package/skills/plan-feature/references/ROUTING.md +0 -155
  69. package/skills/plan-feature-from-issue/SKILL.md +0 -162
  70. package/skills/plan-feature-scaffold/SKILL.md +0 -112
  71. package/skills/plan-feature-scaffold/references/SCAFFOLD_PROCESS.md +0 -122
  72. package/skills/plan-fix/SKILL.md +0 -161
  73. package/skills/plan-fix/references/PLANNING_PROCESS.md +0 -148
  74. package/skills/plan-fix/references/SPEC_CONTRACT.md +0 -22
  75. package/skills/planning-preflight/SKILL.md +0 -130
  76. package/skills/replan-findings/SKILL.md +0 -131
  77. package/skills/replan-findings/references/PHASE_APPEND.md +0 -89
  78. package/skills/review-plan/SKILL.md +0 -154
  79. package/skills/review-plan/references/CHECKS.md +0 -111
  80. package/skills/review-plan/references/ENG-CHECKS.md +0 -30
  81. package/skills/review-plan/references/OUTPUT.md +0 -166
  82. package/skills/review-spec/SKILL.md +0 -145
  83. package/skills/review-spec/references/CHECKS.md +0 -108
  84. package/skills/review-spec/references/OUTPUT.md +0 -160
  85. package/skills/ship-roadmap/SKILL.md +0 -120
  86. package/skills/ship-roadmap/references/ADVANCE.md +0 -117
  87. package/skills/ship-roadmap/references/AUDIT_AND_MERGE.md +0 -64
  88. package/skills/ship-roadmap/references/CLOSEOUT_AND_LOG.md +0 -27
  89. package/skills/ship-roadmap/references/FOUNDING.md +0 -101
  90. package/skills/ship-roadmap/references/GUARDRAILS.md +0 -56
  91. package/skills/ship-roadmap/references/MODEL_ROUTING.md +0 -16
  92. package/skills/ship-roadmap/references/PORTABILITY.md +0 -34
  93. package/skills/ship-roadmap/references/RECOVERY_AND_SELECTION.md +0 -94
  94. package/skills/ship-roadmap/references/STOP_CONDITIONS.md +0 -9
  95. package/skills/ship-roadmap/references/TERMINAL_REPORT.md +0 -34
@@ -1,11 +1,13 @@
1
1
  ## Write and verify the bootstrap
2
2
 
3
- 4. **Write the adapted scaffold.** Fill the `CLAUDE.md` placeholders (commands,
4
- the documentation map rows, architecture); keep `AGENTS.md`, the
5
- `features/_TEMPLATE` + `ROADMAP`, the `fix/_TEMPLATE` + `README`, and the
6
- `.github/` templates; keep `.agentic-workflow/hooks/` and activate only the
7
- adapters explicitly accepted in the interview; prune unused doc folders and
8
- map rows. Leave honest placeholders where the user hasn't decided — never
3
+ 4. **Write the adapted scaffold.** Fill the `AGENTS.md` placeholders (commands,
4
+ the documentation map rows, architecture); write the **adaptive lane
5
+ conventions** (unit document, triage, catalog steps, guards, evidence rows,
6
+ dated progress log, closed commit format `type(scope): description`); keep
7
+ the `features/_TEMPLATE` + `ROADMAP`, the `fix/_TEMPLATE` + `README`, and
8
+ the `.github/` templates; keep `.agentic-workflow/hooks/` and activate only
9
+ the adapters explicitly accepted in the interview; prune unused doc folders
10
+ and map rows. Leave honest placeholders where the user hasn't decided — never
9
11
  invent values.
10
12
  5. **Seed Normalized Repository State.** Copy
11
13
  `template/docs/workflow/REPOSITORY_STATE.md` to
@@ -19,6 +21,10 @@
19
21
  optional: an absent document means no project invariants are declared, not
20
22
  that the scaffold failed. If retained, add its documentation-map row and
21
23
  name the project's explicit architectural-decision authority.
24
+ 6. **Propagate the unit doc template.** Ensure
25
+ `docs/features/_TEMPLATE/SPEC.md` exists with all 13 mandatory sections.
26
+ This is the template used when creating new unit documents.
27
+
22
28
  7. **Install accepted agent safety hooks.** Keep the canonical policy and
23
29
  fullauto wrapper at `.agentic-workflow/hooks/`. Seed the shipped
24
30
  path-protection policy at `.agentic-workflow/path-policy.json` and its doc
@@ -41,7 +47,7 @@
41
47
  `review-a11y`, `review-brand`, `review-perf`, `review-seo`) — it installs
42
48
  with the skills and covers every review axis, so **no external review skill
43
49
  is required on any agent**. If the user wants platform-specific extras (a
44
- framework skill, a stack-specific security skill), record them in `CLAUDE.md`
50
+ framework skill, a stack-specific security skill), record them in `AGENTS.md`
45
51
  under a short "Optional review extras" note so `review-change` and
46
52
  `product-audit` run them **in addition** — never as a dependency. Don't
47
53
  install anything without a yes.
@@ -58,7 +64,8 @@
58
64
  forge is unavailable or the user declines forge setup, skip this step and
59
65
  list the two labels as a residual for the user to create manually later
60
66
  (never fail the whole scaffold on it).
61
- 11. **Report.** List what was created, which placeholders still need human input,
67
+ 12. **Report.** List what was created, which placeholders still need human input,
62
68
  the companion skills recorded/installed, the urgency labels seeded (or
63
- skipped, with reason), and the next step: `discover-repository-state` →
64
- `design-feature` → `plan-feature` → `execute-phase`.
69
+ skipped, with reason), and the next step:
70
+ `discover-repository-state` → `/unit-lane` (or `workflow-status`) → catalog
71
+ steps → `execute-phase`.
@@ -7,7 +7,7 @@ enables:
7
7
  - **No slash-command menu** — where this skill says `/<skill>`, open that
8
8
  skill's `SKILL.md` (wherever your agent installed the skills) and follow it
9
9
  literally, in a fresh conversation: hand-offs assume a clean context.
10
- - **No per-skill `model:`/`effort:`** — on the `#claude` branch the frontmatter pins these tiers; here, pick tiers yourself:
10
+ - **No per-skill `model:`/`effort:`** — no skill pins a tier; pick tiers yourself:
11
11
  the interview and adaptation are judgment work — run them on your
12
12
  **strongest** model.
13
13
  - **No Claude Code hooks** — choose the Cursor, Copilot, or OpenCode adapter
@@ -4,13 +4,14 @@ Entered when Step 0 finds an existing **agentic-workflow scaffold** (not a
4
4
  bare or foreign repo). Bootstrap mode (the Process section above) never
5
5
  engages here — upgrade mode reuses the same discovery + interview machinery,
6
6
  scoped to **only the blocks the current template has that this project
7
- lacks**. Seven ordered steps:
7
+ lacks**. Eight ordered steps:
8
8
 
9
9
  1. **Locate the current template.** Fetch the current `template/` the same
10
10
  way bootstrap does — `npx degit gtrabanco/agentic-workflow/template <temp-dir>`
11
11
  (always into a temp dir here, never into the target); the SSH/local-path
12
12
  variant applies verbatim for a private source.
13
- 2. **Diff the substrate.** Compare the project's `CLAUDE.md` (and the `docs/`
13
+ 2. **Diff the substrate.** Compare the project's agent guide (`AGENTS.md`,
14
+ or a legacy `CLAUDE.md`) (and the `docs/`
14
15
  blocks its documentation map references) against the fetched template.
15
16
  Produce the list of blocks/conventions the template carries that this
16
17
  project's substrate lacks, or still holds as a raw, unfilled placeholder —
@@ -32,13 +33,23 @@ lacks**. Seven ordered steps:
32
33
  dated migration note so the proposal explains *why* the block exists and
33
34
  *what* it migrates. If `MIGRATION.md` is absent, proceed on the template
34
35
  diff alone and say so in the report — never block on a missing note.
35
- 4. **Propose only the missing blocks — one short, batched interview round.**
36
- Each item is the block, a discovery-based default (the same detection
37
- bootstrap mode already runs — e.g. `astro.config.*` + Starlight ⇒ `Docs
38
- site` default, Biome ⇒ the complexity-lint slot, the remote URL ⇒ forge),
39
- and the `MIGRATION.md` rationale when available. The user accepts, edits,
40
- or skips each block. **Never re-ask what the project already answered** —
41
- a block that's already filled is skipped, not re-interviewed.
36
+ 4. **Propose the adaptive lane conventions (feature 61 P11).** For pre-lane
37
+ installs (before the fixed pipeline was retired), propose these missing
38
+ blocks additively — **never clobber existing content**:
39
+ - The **unit document conventions** section in AGENTS.md (the 13-section
40
+ SPEC.md, triage-driven step selection, diff-size guard, evidence rows,
41
+ dated progress log, closed commit format `type(scope): description`).
42
+ - The **unit doc template** under `docs/features/_TEMPLATE/SPEC.md` if
43
+ absent — the same 13-section template used by new units.
44
+ - The **lane workflow doc** under `docs/workflow/` if absent: `FEATURE_WORKFLOW.md`
45
+ (unit doc → triage → catalog steps → evidence → review → release),
46
+ `ISSUE_WORKFLOW.md` (issues route through triage to the lane).
47
+ - A **documentation-map row** for `docs/features/_TEMPLATE/SPEC.md` and the
48
+ lane workflow docs if missing from the existing map.
49
+ Each item is accepted, edited, or skipped by the user. **Never re-ask what
50
+ the project already answered** — a block that's already filled is skipped,
51
+ not re-interviewed. The lane conventions are additive only: existing content
52
+ is never rewritten, only new blocks are inserted where missing.
42
53
  5. **Write additively.** Insert accepted blocks, including a missing
43
54
  `docs/workflow/REPOSITORY_STATE.md`; fill raw, still-placeholder
44
55
  blocks with the confirmed values. **Never rewrite a block the project has
@@ -50,16 +61,39 @@ lacks**. Seven ordered steps:
50
61
  `path-protection.md` page are proposed from the template; an existing
51
62
  owner-written `path-policy.json` is never clobbered and is listed as a
52
63
  residual instead. Leave honest placeholders where the user skipped.
53
- 6. **Seed missing urgency labels, additively (feature 15).** Independent of
54
- the `CLAUDE.md`/`docs/` block diff above (this is forge-repo state, not a
64
+ 6. **Retire the legacy `CLAUDE.md` — only with an explicit yes, never as a side
65
+ effect.** Older releases of this workflow wrote the guide as `CLAUDE.md`;
66
+ current ones write `AGENTS.md`, and current Claude Code reads `AGENTS.md`.
67
+ When the project has a `CLAUDE.md`, three ordered moves — never skip (a):
68
+ a. **Reconcile first.** Diff `CLAUDE.md` against `AGENTS.md` and fold every
69
+ block, rule, or value that exists only in `CLAUDE.md` into `AGENTS.md`,
70
+ keeping the project's own wording and values. Name each folded item in the
71
+ report; when nothing is unique, say that plainly instead of implying a
72
+ merge happened.
73
+ b. **Then ask once, stating the risk.** A user may deliberately be on a Claude
74
+ Code release that reads only `CLAUDE.md`, and deleting the file would stop
75
+ their agent from seeing the guide at all. Present the choice as remove
76
+ (one guide, nothing left to drift) or keep (older client), and take the
77
+ answer. Never delete a tailored `CLAUDE.md` because "the template moved
78
+ on".
79
+ c. **On yes:** delete `CLAUDE.md`, keeping the reconciliation from (a) already
80
+ written. **On keep:** leave the file byte-identical and list it as a
81
+ residual naming the reason (the user's client still reads it) — a kept
82
+ legacy guide is a decision, not drift.
83
+
84
+ This step is the only writer of `CLAUDE.md` in upgrade mode, and it is never
85
+ reached without the answer from (b).
86
+ 7. **Seed missing urgency labels, additively (feature 15).** Independent of
87
+ the agent-guide/`docs/` block diff above (this is forge-repo state, not a
55
88
  doc block): check whether the target repo already has the `urgent` and
56
89
  `fix-next` labels (`gh label list`); create whichever is missing with the
57
90
  same `gh label create` calls bootstrap mode uses (see Process step 9) —
58
91
  never touch a label that already exists (additive-only, same never-clobber
59
92
  rule as the doc blocks; a pre-existing `urgent`/`fix-next` label the
60
93
  project recolored or redescribed is left exactly as-is).
61
- 7. **Report + hand off.** Summarize blocks added, filled, and skipped
62
- (residuals), the urgency labels seeded (or already present), then print the
94
+ 8. **Report + hand off.** Summarize blocks added, filled, and skipped
95
+ (residuals), the legacy `CLAUDE.md` outcome (folded items and removed, or kept
96
+ with the reason), the urgency labels seeded (or already present), then print the
63
97
  recommendation to run `product-audit` next to see which newly-available
64
98
  *capabilities* apply to the code (upgrade mode migrates the substrate only,
65
99
  never the code).
@@ -81,8 +115,9 @@ lacks**. Seven ordered steps:
81
115
  separately, via an explicit bootstrap adapt-in-place run, whether to
82
116
  re-tailor it.
83
117
  - **Bootstrap stays unchanged on a bare or foreign repo.** If Step 0's
84
- scaffold markers (`CLAUDE.md` + `docs/features/ROADMAP.md` or
85
- `docs/workflow/`) are absent — no repo, an empty repo, or a `CLAUDE.md`
118
+ scaffold markers (an agent guide — `AGENTS.md` or a legacy `CLAUDE.md` — plus
119
+ `docs/features/ROADMAP.md` or
120
+ `docs/workflow/`) are absent — no repo, an empty repo, or a guide
86
121
  that isn't this workflow's — upgrade mode never engages; the existing
87
122
  bootstrap Process (merge/adapt/abort) runs exactly as before this mode was
88
123
  added.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: log-session
3
3
  user-invocable: true
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  argument-hint: "[note to prepend to the entry]"
6
6
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
@@ -9,8 +9,9 @@ description: >
9
9
  Append a structured entry to the project's session log (`docs/LOGS.md`):
10
10
  what was done this session, files touched, decisions taken, and the next
11
11
  step — so the next session (or another person) can pick up the thread
12
- without re-reading git history. Run it before `/clear`, before closing
13
- Claude Code, or at any natural stopping point. On Claude Code and want hand-tuned per-skill model/effort tiers? Install the `#claude` branch instead (`npx skills add gtrabanco/agentic-workflow#claude`) — see the README. This branch is model-agnostic: the skill inherits whatever model and effort your agent session is already using.
12
+ without re-reading git history. Run it before `/clear`, before closing your
13
+ agent session, or at any natural stopping point. Model-agnostic: the skill
14
+ inherits whatever model and effort your agent session is already using.
14
15
  Triggers: "log this
15
16
  session", "log-session", "write a session log", "journal what we did",
16
17
  "record this session before I clear", "save the session summary".
@@ -41,7 +41,7 @@ preserving the fixed block shape.
41
41
  turn-contract-receipt@1
42
42
  ok-line: TURN-CONTRACT ok
43
43
  fail-line: TURN-CONTRACT fail box<N>: <code>
44
- codes: branch-default | not-a-repo | no-commits | acceptance-missing |
44
+ codes: branch-default | not-a-repo | no-commits | unit-doc-missing |
45
45
  phase-lint-failed | pr-not-open | pr-head-mismatch |
46
46
  pr-unreachable | dirty-tree | ahead-of-remote
47
47
  exit: 0 ok | 1 contract fail | 2 usage error
@@ -6,9 +6,9 @@ Plan snapshot binds them, and `execute-phase` may not invent a substitute.
6
6
 
7
7
  | Ledger | Home | Written by | Read by |
8
8
  |---|---|---|---|
9
- | Planning evidence | `planning-evidence.md` (M/L) · `### Planning evidence` inside the SPEC (XS/S) | the authoring planner | `review-plan`, then the phase slice for `execute-phase` |
10
- | Obligations | `planning-obligations.md` (M/L) · `### Obligations` inside the SPEC (XS/S) | the authoring planner, then the phase owner for `status` | `review-plan`, `execute-phase`, `fold-findings`, `audit-pr` |
11
- | Findings | `planning-findings.md` (one per unit, both stages) | reviewers append; only the stage's author resolves | the author skill, `review-plan` on re-review, `audit-pr` |
9
+ | Planning evidence | `### Planning evidence` inside the unit doc (XS/S) · separate file (M/L) | `unit-lane:planning-evidence` | `execute-phase`, `fold-findings`, `audit-pr` |
10
+ | Obligations | `### Obligations` inside the unit doc (XS/S) · separate file (M/L) | `unit-lane:obligations` | `execute-phase`, `fold-findings`, `audit-pr` |
11
+ | Findings | `review-findings.md` (one per unit, both stages) | reviewers append; only the stage's author resolves | `execute-phase` on re-review, `audit-pr` |
12
12
 
13
13
  XS/S embeds both tables in the SPEC to stay within the size's artifact budget;
14
14
  the Plan snapshot then binds them through the whole-SPEC row (kind `spec`), and
@@ -19,10 +19,9 @@ M/L freeze the separate files and bind them with their own rows. Never both.
19
19
 
20
20
  Row shape — the base row, the closed `authority-kind` / `freshness` vocabularies,
21
21
  the prefixed stable `id`, and the `affected-decision-or-obligation` Plan-stage
22
- extension with its full column order — is owned by the `evidence-grounding`
23
- reference `ROWS.md` (§ "Plan-stage table — one declared extension"): one
24
- definition, no second copy. This ledger owns only the lifecycle rules and uses
25
- markdown headings, nothing else. Ids are stable (`PE-001`, `PE-002`, …): an
22
+ extension with its full column order — is owned by the unit-lane's planning
23
+ reference: one definition, no second copy. This ledger owns only the lifecycle
24
+ rules and uses markdown headings, nothing else. Ids are stable (`PE-001`, `PE-002`, …): an
26
25
  obligation or finding cites a row by id, so renumbering the table is a replan,
27
26
  not a formatting edit.
28
27
 
@@ -36,8 +35,8 @@ Rules specific to this ledger:
36
35
  - An assumption about a model's or service's behaviour that was never sampled is
37
36
  `unknown` with an owner — `ASSUMPTION-UNVERIFIED` is what the row *means*, and
38
37
  the row must stay visible in the artifact rather than becoming a citation.
39
- - `review-plan` reads the whole table; `execute-phase` reads only the rows whose
40
- `affected-decision-or-obligation` names its frozen phase.
38
+ - `execute-phase` reads only the rows whose `affected-decision-or-obligation`
39
+ names its frozen phase; the unit-lane plans the table before `execute-phase` runs.
41
40
 
42
41
  ### 2. Obligations
43
42
 
@@ -101,9 +100,9 @@ status | resolution-evidence | resolving-artifact-revision
101
100
  - `status` is `open | resolved | dismissed`. `dismissed` requires
102
101
  counter-evidence that falsifies the finding ([POLICY.md](POLICY.md) §2); the
103
102
  evidence goes in `resolution-evidence`, not in chat.
104
- - The author resolves a row through its own route: `design-feature` for
105
- `class: product`, `plan-feature` / `plan-fix` for `class: plan`, and the
106
- candidate loop (`review-change` → `fold-findings`) only for
103
+ - The author resolves a row through its own route: `unit-lane` for
104
+ `class: product` and `class: plan`, and the candidate loop
105
+ (`review-change` → `fold-findings`) only for
107
106
  `class: source | environment | runtime`.
108
107
  - `resolving-artifact-revision` is the `artifactRevisionId` of the write that
109
108
  closed the row — the link that lets a re-review prove the snapshot actually
@@ -125,41 +124,41 @@ its `· fold <sha>` (or `· ticked <sha>` on a row that scores 1) plus the
125
124
  annotation — never a `yes` of its own.
126
125
 
127
126
  `scripts/ledger-ownership.test.mjs` reads the block below as the single source of
128
- truth for the seven AC16 truth classes and the projections in
129
- `docs/features/_TEMPLATE/LEDGERS.md` and `docs/fix/_TEMPLATE/LEDGERS.md` as its
130
- copies. It fails closed on a missing or malformed block, an owner-less row, drift
131
- in either direction, a token the annotator cannot produce, and any non-test script
132
- under `scripts/` or `packages/<name>/scripts/` whose write or append target names a
133
- durable ledger its row does not name it for. Cells carry bare values: ` · ` joins
134
- ledgers, ` + ` joins owners, an owner is `<skill>:<column-set>` (the literal
135
- `human-owner` marks the person, the only authority for an amendment), and a `#`
136
- line is a directive. A script that writes only generated artifacts names no ledger
137
- and is out of scope; a copy or shell rewrite stays the reviewer's job. Validator
138
- commands follow the repository's runtime convention: **bun first** (`bun test …`),
139
- with the same command under `node --test …` when bun is absent — both runtimes
140
- must pass; the CI node-compat job enforces the fallback.
127
+ truth for the seven AC16 truth classes and the projection in
128
+ `docs/fix/_TEMPLATE/LEDGERS.md` as its copy (the features-template projection
129
+ was retired at P8b). It fails closed on a missing or malformed block, an owner-less
130
+ row, drift in either direction, a token the annotator cannot produce, and any
131
+ non-test script under `scripts/` or `packages/<name>/scripts/` whose write or append
132
+ target names a durable ledger its row does not name it for. Cells carry bare values:
133
+ ` · ` joins ledgers, ` + ` joins owners, an owner is `<skill>:<column-set>` (the
134
+ literal `human-owner` marks the person, the only authority for an amendment), and a
135
+ `#` line is a directive. A script that writes only generated artifacts names no
136
+ ledger and is out of scope; a copy or shell rewrite stays the reviewer's job.
137
+ Validator commands follow the repository's runtime convention: **bun first**
138
+ (`bun test …`), with the same command under `node --test …` when bun is absent —
139
+ both runtimes must pass; the CI node-compat job enforces the fallback.
141
140
 
142
141
  ```text
143
142
  ledger-ownership@1
144
143
  truth-class | ledger | owner | annotator | annotator-token | validator
145
144
  review-findings | docs/features/<NN>-<slug>/review-findings.md · docs/fix/<issue>-<topic>/review-findings.md | review-change:finding-rows + review-change:finding-mark + review-change:review-mark + review-change:review-gate-ran-marks + audit-pr:audit-rows + triage-issue:triage-rows + execute-phase:gate-ran-marks + fold-findings:folded-flag | scripts/ledger-provenance.mjs | · fold <sha> + · ticked <sha> + · REOPENED | bun test scripts/ledger-provenance.test.mjs
146
- planning-findings | docs/features/<NN>-<slug>/planning-findings.md · docs/fix/<issue>-<topic>/planning-findings.md | review-spec:spec-stage-rows + review-plan:plan-stage-rows + design-feature:product-class-resolutions + plan-feature:plan-class-resolutions + plan-fix:fix-plan-class-resolutions + fold-findings:source-class-resolutions | none | none | bun test scripts/pre-execution-quality.test.mjs
147
- progress | docs/features/<NN>-<slug>/progress.md · docs/fix/<issue>-<topic>/progress.md | plan-feature-scaffold:create + execute-phase:phase-entries + execute-phase:gate-rejection-traces + review-spec:product-receipt + review-plan:plan-receipt | none | none | bun test scripts/pre-execution-sensor.test.mjs
148
- known-issues | docs/features/<NN>-<slug>/known-issues.md · docs/fix/<issue>-<topic>/known-issues.md | plan-feature-scaffold:create + execute-phase:blocker-entries-and-status | none | none | bun test scripts/ledger-ownership.test.mjs
149
- decisions | docs/features/<NN>-<slug>/decisions.md · docs/fix/<issue>-<topic>/decisions.md | plan-feature-scaffold:create + design-feature:product-decisions + plan-feature:engineering-decisions + execute-phase:phase-decisions + human-owner:ratified-verdicts | none | none | bun test scripts/ledger-ownership.test.mjs
150
- roadmap | docs/features/ROADMAP.md · docs/fix/README.md | design-feature:idea-or-defined-row + plan-feature-scaffold:planned-row + plan-fix:fix-index-row + execute-phase:status-and-pr-link + ship-roadmap:founding-and-flip + audit-docs:low-risk-row-repair | none | none | bun test scripts/bounded-delivery-loops.test.mjs
151
- acceptance-manifest | docs/features/<NN>-<slug>/ACCEPTANCE.md · docs/fix/<issue>-<topic>/ACCEPTANCE.md | plan-feature-scaffold:feature-freeze + plan-fix:fix-freeze + human-owner:approved-amendment | none | none | git hash-object docs/features/<NN>-<slug>/ACCEPTANCE.md
145
+ planning-findings | docs/features/<NN>-<slug>/planning-findings.md · docs/fix/<issue>-<topic>/planning-findings.md | unit-lane:planning-findings + fold-findings:source-class-resolutions | none | none | bun test scripts/pre-execution-quality.test.mjs
146
+ progress | docs/features/<NN>-<slug>/SPEC.md · docs/fix/<issue>-<topic>/SPEC.md | unit-lane:progress-entries + execute-phase:phase-entries + execute-phase:gate-rejection-traces | none | none | bun test scripts/pre-execution-sensor.test.mjs
147
+ known-issues | docs/features/<NN>-<slug>/known-issues.md · docs/fix/<issue>-<topic>/known-issues.md | unit-lane:known-entries + execute-phase:blocker-entries-and-status | none | none | bun test scripts/ledger-ownership.test.mjs
148
+ decisions | docs/features/<NN>-<slug>/decisions.md · docs/fix/<issue>-<topic>/decisions.md | unit-lane:decisions + execute-phase:phase-decisions + human-owner:ratified-verdicts | none | none | bun test scripts/ledger-ownership.test.mjs
149
+ roadmap | docs/features/ROADMAP.md · docs/fix/README.md | unit-lane:row-registration + execute-phase:status-and-pr-link + audit-docs:low-risk-row-repair | none | none | bun test scripts/bounded-delivery-loops.test.mjs
150
+ acceptance-manifest | docs/features/<NN>-<slug>/ACCEPTANCE.md · docs/fix/<issue>-<topic>/ACCEPTANCE.md | unit-lane:acceptance-freeze + human-owner:approved-amendment | none | none | git hash-object docs/features/<NN>-<slug>/ACCEPTANCE.md
152
151
  # no-script-writer: SPEC.md · PLAN.md · TASKS.md · CHECKLIST.md · testing.md · architecture-notes.md · planning-evidence.md · planning-obligations.md · delegated-evidence.md
153
152
  ```
154
153
 
155
154
  `SPEC.md`, `PLAN.md`, `TASKS.md`, `testing.md` and `architecture-notes.md` are
156
155
  durable unit records, but not ledgers with a row lifecycle of their own: their
157
- writers are the phases that already order them (`plan-feature-scaffold` creates
158
- them, `execute-phase` ticks and appends), so the directive line keeps any script
159
- away from them instead of forking the table above. Same for the two frozen
160
- planning ledgers at the top of this file, and for `delegated-evidence.md`: a
161
- versioned artifact of a delegated reading pass, whose writer and zones are stated
162
- by `evidence-grounding`'s `references/DELEGATION.md`, not by this map.
156
+ writers are the phases that already order them (`unit-lane` creates them, `execute-phase`
157
+ ticks and appends), so the directive line keeps any script away from them instead
158
+ of forking the table above. Same for the two frozen planning ledgers at the top
159
+ of this file, and for `delegated-evidence.md`: a versioned artifact of a delegated
160
+ reading pass, whose writer and zones are stated by the triage/research step's
161
+ documentation, not by this map.
163
162
 
164
163
  ### The durable review mark
165
164
 
@@ -236,7 +235,8 @@ GATE-RAN | HEAD <40-hex sha> | <cmds> | exit <code> | [reserved trailing slot: `
236
235
  declares `execute-phase:gate-ran-marks` (executor phase gates) and
237
236
  `review-change:review-gate-ran-marks` (reviewer gate runs), distinct column-set
238
237
  names per the one-writer-per-column-set rule.
239
- - **Owner extension**: the identical owner cell is mirrored into both template
240
- projections (`docs/features/_TEMPLATE/LEDGERS.md` and `docs/fix/_TEMPLATE/LEDGERS.md`).
238
+ - **Owner extension**: the identical owner cell is mirrored into the fix-template
239
+ projection (`docs/fix/_TEMPLATE/LEDGERS.md`); the features-template projection
240
+ was retired at P8b because the unit doc carries its evidence sections.
241
241
  - **No new truth-class row**: the grammar admits no new row — the existing
242
242
  `review-findings.md` ledger pattern is reused with extended owner cells.
@@ -218,6 +218,7 @@ reports; a printed verdict whose mark is still "for next turn" is not finished.
218
218
  phase-lint | PREFLIGHT.md
219
219
  path-protection | PREFLIGHT.md
220
220
  stale-or-missing-receipt | PRE_EXECUTION_GATE.md
221
+ stale-unit-doc | PRE_EXECUTION_GATE.md
221
222
  ```
222
223
 
223
224
  `execute-phase` appends that trace to the unit's `progress.md`, under
@@ -2,7 +2,7 @@
2
2
  name: product-audit
3
3
  user-invocable: true
4
4
  disable-model-invocation: true
5
- version: 3.2.0
5
+ version: 3.2.1
6
6
  metadata:
7
7
  opencode/autoinvoke: false
8
8
  argument-hint: <path-or-area> (optional — defaults to the whole product)
@@ -125,7 +125,7 @@ Verdict: <one-line honest health verdict>
125
125
  (none — <why>)
126
126
 
127
127
  ### Tooling — register / re-design
128
- - <skill|MCP> — register in CLAUDE.md (Optional review extras): <why> — route: user edits CLAUDE.md
128
+ - <skill|MCP> — register in AGENTS.md (Optional review extras): <why> — route: user edits AGENTS.md
129
129
  - <skill|MCP> — would change <feature> scope: <why> — route: /design-feature <slug>
130
130
  (none — <why>)
131
131
 
@@ -161,7 +161,7 @@ security items to track first").
161
161
  lineage lives only in Delta mappings as `<audit-id> F<k>`, never global slugs or
162
162
  replaced ids. When the user accepts, route: `triage-issue` files/classifies,
163
163
  `plan-feature` adds roadmap work, `plan-fix` scopes a concrete fix.
164
- - **Never registers tooling or edits `CLAUDE.md`.** The tooling sweep proposes a
164
+ - **Never registers tooling or edits `AGENTS.md`.** The tooling sweep proposes a
165
165
  skill/MCP to register, but the user (or a routed `design-feature` run)
166
166
  performs the edit; a scope-affecting discovery routes to
167
167
  `/design-feature <slug>`, which the user approves.
@@ -201,7 +201,7 @@ product-audit (whole product, all axes, periodic)
201
201
  └─ proposes ─┬─ Issues to open ........ ▶ triage-issue / plan-fix
202
202
  ├─ Roadmap: add .......... ▶ plan-feature
203
203
  ├─ Roadmap: remove/revise ▶ triage-issue / roadmap edit (user decides)
204
- └─ Tooling: register/re-design ▶ user edits CLAUDE.md / design-feature
204
+ └─ Tooling: register/re-design ▶ user edits AGENTS.md / design-feature
205
205
  ```
206
206
 
207
207
  - Broader than `review-change` (one change) and `audit-pr` (one PR); subsumes
@@ -41,9 +41,9 @@ step (2–5). Each item ends with exactly one fallback; never pick another one m
41
41
  5. **Sweep installed tooling** — (a) inventory the installed skills and
42
42
  connected MCP servers available to the agent; (b) cross-reference each
43
43
  against the applicable review axes and the roadmap features; (c) classify
44
- each as **register** (useful, not yet named in the project's `CLAUDE.md`),
44
+ each as **register** (useful, not yet named in the project's `AGENTS.md`),
45
45
  **re-design** (would change a feature's definition/scope), or
46
- **not-relevant**; (d) dedupe against what `CLAUDE.md` already registers —
46
+ **not-relevant**; (d) dedupe against what `AGENTS.md` already registers —
47
47
  only unregistered/relevant items survive into proposals. If the agent
48
48
  cannot enumerate its installed skills / connected MCPs, say so plainly
49
49
  (no silent caps) rather than inventing an inventory.
@@ -54,7 +54,7 @@ step (2–5). Each item ends with exactly one fallback; never pick another one m
54
54
  - **Roadmap: remove or revise** — features that are obsolete, superseded, or no
55
55
  longer make sense.
56
56
  - **Tooling: register or re-design** — unregistered-but-useful tooling to add
57
- to `CLAUDE.md`, or a discovered skill/MCP that would rescope a feature.
57
+ to `AGENTS.md`, or a discovered skill/MCP that would rescope a feature.
58
58
  7. **Number the findings.** Assign every finding in the severity-ranked list a
59
59
  sequential id `F1, F2, …` — **one single `F` sequence for the whole audit**,
60
60
  in ranked order, regardless of dimension. Never use a different letter per
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: review-change
3
3
  user-invocable: true
4
- version: 3.7.0
4
+ version: 3.7.1
5
5
  argument-hint: <path-or-glob> [--adversarial N] [--synthesize]
6
6
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
@@ -13,7 +13,7 @@ enables:
13
13
  tiers as `--adversarial N` (subagents / headless / fresh conversations); an
14
14
  agent with none of them runs the documented inline fallback: sequential
15
15
  in-turn passes, each reduced to its findings table before the next starts.
16
- - **No per-skill `model:`/`effort:`** — on the `#claude` branch the frontmatter pins these tiers; here, pick tiers yourself:
16
+ - **No per-skill `model:`/`effort:`** — no skill pins a tier; pick tiers yourself:
17
17
  this review needs your **strongest** model. Never review a change with a
18
18
  model weaker than the one that wrote it — and prefer a different model family
19
19
  than the writer's: same-family instances share training blind spots,
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: unit-lane
3
+ user-invocable: true
4
+ version: 1.0.0
5
+ argument-hint: <NN-slug | "<idea>"> [--retriage]
6
+ description: >
7
+ One-shot lane conductor for a delivery unit: triage, implement, evidence, and
8
+ close in a single document. Triggers: "unit-lane", "run the lane",
9
+ "work on this feature/fix", "build this unit".
10
+ ---
11
+
12
+ # Unit Lane — Adaptive Conductor
13
+
14
+ One document, adaptive steps. The lane reads a closed catalog, triages which
15
+ steps a unit needs, executes them in order, and commits at each gate. Replaces:
16
+ design-feature, plan-feature, review-spec, review-plan.
17
+
18
+ ## Turn contract
19
+
20
+ Tick every box before ending the turn; an unchecked box means the turn is not
21
+ done:
22
+
23
+ ```
24
+ ✓ Triage ran (bun scripts/unit-route.mjs --triage <slug>) and its block pasted
25
+ verbatim into the unit doc's Evidence section as the authoritative step list
26
+ ✓ Unit doc exists at docs/features/<NN>-<slug>/SPEC.md (created from template
27
+ if new, with all mandatory sections filled or n/a)
28
+ ✓ Guard ran (bun scripts/diff-guard.mjs --base <ref>) after each implement step;
29
+ on BREACH: re-triage or record exception, never shrink the diff
30
+ ✓ Unit doc's Evidence rows updated (command → exit/digest → output → verified-by)
31
+ and Progress log updated (dated entry) before every commit
32
+ ✓ → Next: block printed as the absolute last output
33
+ ```
34
+
35
+ ## When to use
36
+
37
+ - A known unit slug: `unit-lane <NN-slug>`
38
+ - A raw idea (no slug yet): `unit-lane "<idea description>"`
39
+ - Force re-triage: `unit-lane <NN-slug> --retriage`
40
+
41
+ ## Step 0 — Discover the project
42
+
43
+ Per the agent guide's **Workflow conventions** + **documentation map**, then read
44
+ `docs/features/_TEMPLATE/SPEC.md` (the unit doc template). If the unit folder
45
+ exists, read its current `SPEC.md` to avoid overwriting.
46
+
47
+ ## Process
48
+
49
+ ### 1. Resolve or create the unit doc
50
+
51
+ If the idea has no slug, assign the next number from `docs/features/ROADMAP.md`
52
+ and create `docs/features/<NN>-<slug>/SPEC.md` from the template. Fill
53
+ objective, why, user outcome, and non-goals from the invocation. Acceptance
54
+ criteria are induced from user scenarios — **ask-don't-infer**; if the request
55
+ is too vague, STOP and ask the user with concrete options. See
56
+ [the unit doc template](references/STEPS.md) for section order.
57
+
58
+ ### 2. Triage — read the catalog, never re-derive
59
+
60
+ Run `bun scripts/unit-route.mjs --triage <slug>` (or `<NN>` for numeric). PASTE
61
+ its stdout block **verbatim** into the unit doc's Evidence section header under
62
+ a `## Triaged steps` heading. This block is authoritative. The model never
63
+ re-derives, reorders, or invents steps — it executes only what the catalog says.
64
+
65
+ ### 3. Execute triaged steps in order
66
+
67
+ For each step the triage returned, follow its reference file. Execute **one step
68
+ per turn-commit**:
69
+
70
+ 1. Read the step's reference — for example:
71
+ [research](references/RESEARCH.md), [design](references/DESIGN.md),
72
+ [plan](references/PLAN.md), [implement](references/IMPLEMENT.md),
73
+ [tests](references/TESTS.md), [evidence](references/EVIDENCE.md),
74
+ [review](references/REVIEW.md), [docs](references/DOCS.md),
75
+ [release](references/RELEASE.md) — only the ones the triage demands).
76
+ 2. Perform the step's checklist items.
77
+ 3. Write/update evidence in the unit doc.
78
+ 4. Update the Progress log with a dated entry.
79
+ 5. Commit with a conventional commit message.
80
+ 6. For implement steps, run the diff guard (step 4 below).
81
+
82
+ ### 4. Diff-size guard (after each implement step)
83
+
84
+ Run `bun scripts/diff-guard.mjs --base <last-reviewed-ref> --unit <NN>`. Paste
85
+ the output verbatim. On **BREACH**: stop, re-triage the unit, or record an
86
+ exception. **Anti-gaming: NEVER shrink a diff by deleting comments, blank lines,
87
+ docs or tests.** If the unit cannot fit the budget, record the exception and stop.
88
+
89
+ ### 5. Update evidence and progress
90
+
91
+ Before every commit:
92
+
93
+ - **Evidence rows**: One row per AC satisfied — `| AC | command | exit/digest |
94
+ output (≤2 lines) | verified-by |`
95
+ - **Progress log**: `YYYY-MM-DD HH:MM — <what was done> → <commit sha> — next:
96
+ <what is next>`
97
+
98
+ ### 6. Close the unit
99
+
100
+ When all triaged steps are done, run the review pack axis summary, update the
101
+ unit doc's status, and print the closing block.
102
+
103
+ ## Guardrails
104
+
105
+ **Allowed:**
106
+ - Only the triaged steps listed by the catalog
107
+ - Changes scoped to the acceptance criteria
108
+ - Documentation updates in docs/ and template/
109
+ - Conventional commit messages per the project's Workflow conventions
110
+
111
+ **Forbidden:**
112
+ - Never expand scope beyond what Non-goals define — findings discovered during
113
+ implementation never widen the unit
114
+ - Never invent an acceptance criterion — ask the user with concrete options
115
+ - Never skip a triaged step silently — every step the catalog demands must run
116
+ - Findings never authorize scope growth — record them, route to their owner
117
+ - Never commit red (test failure) — fix or replan, never silence tests
118
+ - Never alter a triaged step's order
119
+
120
+ ## Relationship to other skills
121
+
122
+ `unit-lane` absorbs the fixed-pipeline skills (design-feature, plan-feature,
123
+ review-spec, review-plan) into catalog steps. The review pack axes
124
+ (`review-implementation`, `review-code`, `review-security`, `review-perf`,
125
+ `review-a11y`, `review-debt`) compose the review step; `triage-issue` feeds
126
+ issues into the lane; `workflow-status` computes the next lane invocation.
127
+ `init-workspace` seeds the unit doc template and catalog conventions into target
128
+ projects.
129
+
130
+ ## Portability (agents other than Claude Code)
131
+
132
+ - **No slash menu** — open this `SKILL.md` and follow it literally in a fresh
133
+ conversation. Where it says `run`, execute the shell command directly.
134
+ - **No model tiers** — triage and review use the strongest model; execution
135
+ steps may use cheaper. Never review with a weaker model than the author.
136
+ - **No `/loop`/subagents** — re-invoke manually and follow the closing `→ Next:`
137
+ block at each step boundary.
138
+
139
+ ## Done when
140
+
141
+ - Every triaged step is executed and committed.
142
+ - The unit doc's Evidence rows, Progress log, and References section are current.
143
+ - The diff guard passed for all implement steps.
144
+ - The review step is complete (or skipped per catalog).
145
+ - **The closing `→ Next:` block is printed.**
146
+
147
+ ## Closing recommendation
148
+
149
+ ```
150
+ → Next: /unit-lane <NN-slug> — continue to the next triaged step
151
+ · all steps done → /review-change (review the accumulated diff)
152
+ · re-triage needed → /unit-lane <NN-slug> --retriage
153
+ · finished and merge-ready → /audit-pr (merge gate)
154
+ ```
@@ -0,0 +1,35 @@
1
+ # Design step
2
+
3
+ ## Purpose
4
+
5
+ Induce acceptance criteria from user scenarios and close entity, role, and
6
+ expectation boundaries — distilled from the full design skill's closure.
7
+
8
+ ## Inputs
9
+
10
+ - The unit's objective, why, and user outcome from the SPEC
11
+ - Research findings from the research step
12
+
13
+ ## Fixed output contract
14
+
15
+ Fill the unit doc's **Acceptance criteria** section. Each AC must be:
16
+ - Induced from a concrete user scenario ("I do X and observe Y")
17
+ - Command-verified where possible (not "feel correct")
18
+ - Numbered (AC1, AC2, …)
19
+
20
+ ## Checklist (pass only if)
21
+
22
+ - [ ] Every AC is induced from a user scenario, not inferred from vague intent
23
+ - [ ] Acceptance criteria are command-verified where possible
24
+ - [ ] Entity closure: every entity mentioned has its role in the unit stated
25
+ - [ ] Role closure: every actor/role that interacts with the unit is listed
26
+ - [ ] Expectation sweep: user's accepted and rejected inputs are bounded
27
+ - [ ] Vague items → ask the user with concrete options, never invent
28
+
29
+ ## Forbidden
30
+
31
+ - Do not build a separate DESIGN.md — one SPEC, all in the unit doc
32
+ - Do not invent product scope the user did not confirm
33
+ - Do not pre-fill engineering content (phases, tests, architecture)
34
+ - Do not stamp "designed" with an incomplete closure row
35
+ - An incomplete row silently un-does the skill's purpose