@gtrabanco/pi-agentic-workflow 0.13.3 → 0.15.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 (118) hide show
  1. package/README.md +3 -9
  2. package/dist/conductor/closeout.d.ts +18 -0
  3. package/dist/conductor/closeout.js +24 -0
  4. package/dist/conductor/decide.d.ts +25 -0
  5. package/dist/conductor/decide.js +104 -0
  6. package/dist/conductor/index.d.ts +16 -0
  7. package/dist/conductor/index.js +15 -0
  8. package/dist/conductor/invoke.d.ts +15 -0
  9. package/dist/conductor/invoke.js +59 -0
  10. package/dist/conductor/loop.d.ts +25 -0
  11. package/dist/conductor/loop.js +236 -0
  12. package/dist/conductor/sensor.d.ts +12 -0
  13. package/dist/conductor/sensor.js +150 -0
  14. package/dist/conductor/snapshot.d.ts +13 -0
  15. package/dist/conductor/snapshot.js +60 -0
  16. package/dist/conductor/types.d.ts +248 -0
  17. package/dist/conductor/types.js +47 -0
  18. package/dist/conductor/urgency.d.ts +16 -0
  19. package/dist/conductor/urgency.js +70 -0
  20. package/dist/config/merge.js +21 -1
  21. package/dist/config/schema.js +45 -2
  22. package/dist/config/types.d.ts +22 -0
  23. package/dist/config/types.js +7 -0
  24. package/dist/extension/conductor-command.d.ts +23 -0
  25. package/dist/extension/conductor-command.js +93 -0
  26. package/dist/extension/factory.js +6 -1
  27. package/dist/routing/types.d.ts +2 -0
  28. package/dist/routing/types.js +2 -0
  29. package/dist/runtime.d.ts +45 -0
  30. package/dist/runtime.js +62 -0
  31. package/package.json +4 -2
  32. package/skills/audit-docs/SKILL.md +6 -5
  33. package/skills/audit-pr/SKILL.md +1 -1
  34. package/skills/audit-pr/references/PORTABILITY.md +1 -1
  35. package/skills/execute-phase/SKILL.md +207 -116
  36. package/skills/execute-phase/references/DESCOPE.md +22 -18
  37. package/skills/execute-phase/references/EXECUTION_CONTRACT.md +69 -77
  38. package/skills/execute-phase/references/FOLDING.md +34 -47
  39. package/skills/execute-phase/references/PREFLIGHT.md +103 -114
  40. package/skills/execute-phase/references/PRE_EXECUTION_GATE.md +53 -60
  41. package/skills/init-workspace/SKILL.md +35 -5
  42. package/skills/init-workspace/references/BOOTSTRAP_DISCOVERY.md +5 -5
  43. package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +15 -8
  44. package/skills/init-workspace/references/PORTABILITY.md +1 -1
  45. package/skills/init-workspace/references/UPGRADE.md +17 -7
  46. package/skills/log-session/SKILL.md +4 -3
  47. package/skills/orchestration-envelope/references/TURN_CONTRACT.md +1 -1
  48. package/skills/pre-execution-review/references/LEDGERS.md +39 -39
  49. package/skills/pre-execution-review/references/POLICY.md +1 -0
  50. package/skills/review-change/SKILL.md +1 -1
  51. package/skills/review-change/references/PORTABILITY.md +1 -1
  52. package/skills/unit-lane/SKILL.md +154 -0
  53. package/skills/unit-lane/references/DESIGN.md +35 -0
  54. package/skills/unit-lane/references/DOCS.md +36 -0
  55. package/skills/unit-lane/references/EVIDENCE.md +34 -0
  56. package/skills/unit-lane/references/IMPLEMENT.md +45 -0
  57. package/skills/unit-lane/references/PLAN.md +38 -0
  58. package/skills/unit-lane/references/RELEASE.md +45 -0
  59. package/skills/unit-lane/references/RESEARCH.md +37 -0
  60. package/skills/unit-lane/references/REVIEW.md +45 -0
  61. package/skills/unit-lane/references/STEPS.md +23 -0
  62. package/skills/unit-lane/references/TESTS.md +32 -0
  63. package/skills/workflow-status/references/ENVELOPE_FIELDS.md +5 -6
  64. package/skills/workflow-status/references/SENSOR_CORE.md +16 -20
  65. package/skills/workflow-status/references/SENSOR_SIGNALS.md +5 -7
  66. package/skills/design-feature/SKILL.md +0 -231
  67. package/skills/design-feature/references/INTERVIEW.md +0 -74
  68. package/skills/design-feature/references/PORTABILITY.md +0 -15
  69. package/skills/design-feature/references/REPAIR.md +0 -88
  70. package/skills/design-feature/references/UPSERT_EXAMPLE.md +0 -8
  71. package/skills/design-feature/references/WRITE_AND_UPSERT.md +0 -115
  72. package/skills/evidence-grounding/SKILL.md +0 -174
  73. package/skills/evidence-grounding/references/DELEGATION.md +0 -131
  74. package/skills/evidence-grounding/references/READINESS.md +0 -130
  75. package/skills/evidence-grounding/references/ROWS.md +0 -93
  76. package/skills/execute-phase/references/BATCH_AND_PORTABILITY.md +0 -57
  77. package/skills/execute-phase/references/CLOSEOUT.md +0 -77
  78. package/skills/execute-phase/references/HANDOFF.md +0 -21
  79. package/skills/execute-phase/references/OPPORTUNISTIC_FINDING.md +0 -45
  80. package/skills/execute-phase/references/UNIT_LOOP.md +0 -88
  81. package/skills/execute-phase/references/WORKFLOWS_FEATURE.md +0 -37
  82. package/skills/execute-phase/references/WORKFLOWS_FIX.md +0 -43
  83. package/skills/execute-phase/references/WORKFLOWS_LEGACY.md +0 -26
  84. package/skills/execute-phase/references/WORKFLOWS_SMALL_PHASED.md +0 -38
  85. package/skills/generate-docs/SKILL.md +0 -145
  86. package/skills/generate-docs/references/ADAPTERS.md +0 -15
  87. package/skills/generate-docs/references/ADAPTER_DISCOVERY.md +0 -33
  88. package/skills/generate-docs/references/GENERATION_PROCESS.md +0 -90
  89. package/skills/implementation-discovery/SKILL.md +0 -209
  90. package/skills/plan-feature/SKILL.md +0 -208
  91. package/skills/plan-feature/references/ROUTING.md +0 -155
  92. package/skills/plan-feature-from-issue/SKILL.md +0 -162
  93. package/skills/plan-feature-scaffold/SKILL.md +0 -112
  94. package/skills/plan-feature-scaffold/references/SCAFFOLD_PROCESS.md +0 -122
  95. package/skills/plan-fix/SKILL.md +0 -161
  96. package/skills/plan-fix/references/PLANNING_PROCESS.md +0 -148
  97. package/skills/plan-fix/references/SPEC_CONTRACT.md +0 -22
  98. package/skills/planning-preflight/SKILL.md +0 -130
  99. package/skills/replan-findings/SKILL.md +0 -131
  100. package/skills/replan-findings/references/PHASE_APPEND.md +0 -89
  101. package/skills/review-plan/SKILL.md +0 -154
  102. package/skills/review-plan/references/CHECKS.md +0 -111
  103. package/skills/review-plan/references/ENG-CHECKS.md +0 -30
  104. package/skills/review-plan/references/OUTPUT.md +0 -166
  105. package/skills/review-spec/SKILL.md +0 -145
  106. package/skills/review-spec/references/CHECKS.md +0 -108
  107. package/skills/review-spec/references/OUTPUT.md +0 -160
  108. package/skills/ship-roadmap/SKILL.md +0 -120
  109. package/skills/ship-roadmap/references/ADVANCE.md +0 -117
  110. package/skills/ship-roadmap/references/AUDIT_AND_MERGE.md +0 -64
  111. package/skills/ship-roadmap/references/CLOSEOUT_AND_LOG.md +0 -27
  112. package/skills/ship-roadmap/references/FOUNDING.md +0 -101
  113. package/skills/ship-roadmap/references/GUARDRAILS.md +0 -56
  114. package/skills/ship-roadmap/references/MODEL_ROUTING.md +0 -16
  115. package/skills/ship-roadmap/references/PORTABILITY.md +0 -34
  116. package/skills/ship-roadmap/references/RECOVERY_AND_SELECTION.md +0 -94
  117. package/skills/ship-roadmap/references/STOP_CONDITIONS.md +0 -9
  118. package/skills/ship-roadmap/references/TERMINAL_REPORT.md +0 -34
@@ -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
@@ -33,13 +33,23 @@ lacks**. Eight ordered steps:
33
33
  dated migration note so the proposal explains *why* the block exists and
34
34
  *what* it migrates. If `MIGRATION.md` is absent, proceed on the template
35
35
  diff alone and say so in the report — never block on a missing note.
36
- 4. **Propose only the missing blocks — one short, batched interview round.**
37
- Each item is the block, a discovery-based default (the same detection
38
- bootstrap mode already runs — e.g. `astro.config.*` + Starlight ⇒ `Docs
39
- site` default, Biome ⇒ the complexity-lint slot, the remote URL ⇒ forge),
40
- and the `MIGRATION.md` rationale when available. The user accepts, edits,
41
- or skips each block. **Never re-ask what the project already answered** —
42
- 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.
43
53
  5. **Write additively.** Insert accepted blocks, including a missing
44
54
  `docs/workflow/REPOSITORY_STATE.md`; fill raw, still-placeholder
45
55
  blocks with the confirmed values. **Never rewrite a block the project has
@@ -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
@@ -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
@@ -0,0 +1,36 @@
1
+ # Docs step
2
+
3
+ ## Purpose
4
+
5
+ Docs-only units (changelog, template, migration) and the docs step for code
6
+ units. Updates documentation surfaces per project conventions.
7
+
8
+ ## Inputs
9
+
10
+ - The unit's objective and tasks
11
+ - The project's documentation conventions from the agent guide
12
+ - Template/ directory layout
13
+
14
+ ## Fixed output contract
15
+
16
+ Update the unit doc's **Progress log** and any project docs:
17
+
18
+ - Changelog updated per project conventions
19
+ - Template files updated if the unit changes a template
20
+ - Documentation map updated if new artifacts were created
21
+ - Each doc change committed with a conventional commit message
22
+
23
+ ## Checklist (pass only if)
24
+
25
+ - [ ] All docs the unit demands are updated
26
+ - [ ] Changelog/templates follow the project's declared conventions
27
+ - [ ] Documentation map references resolve (no broken links)
28
+ - [ ] Changes committed on the correct branch with no unpushed changes
29
+ - [ ] Progress log entry records the commit sha and what was documented
30
+
31
+ ## Forbidden
32
+
33
+ - Do not change code in the docs step — only doc surfaces
34
+ - Do not add docs the unit's scope does not demand
35
+ - Do not skip the docs step for a code unit when the catalog demands it
36
+ - Do not change the unit doc's Evidence or Progress sections here
@@ -0,0 +1,34 @@
1
+ # Evidence step
2
+
3
+ ## Purpose
4
+
5
+ One row per acceptance criterion: what was run, exit status/digest, observed
6
+ output (≤2 lines), verified-by. A reviewer re-runs it.
7
+
8
+ ## Inputs
9
+
10
+ - The unit's Acceptance criteria
11
+ - The Evidence section (where evidence rows are appended)
12
+
13
+ ## Fixed output contract
14
+
15
+ Append to the unit doc's **Evidence** table. One row per AC:
16
+
17
+ | AC | What was run | Exit / digest | Output (≤2 lines) | Verified-by |
18
+ |---|---|---|---|---|
19
+ | ACn | <command or sha> | <exit / sha> | <≤2 lines> | <model or reviewer> |
20
+
21
+ ## Checklist (pass only if)
22
+
23
+ - [ ] Every AC has exactly one evidence row
24
+ - [ ] Each row contains: command/run, exit status/digest, output ≤2 lines
25
+ - [ ] Verified-by names the model that ran it or a human reviewer
26
+ - [ ] No invented evidence — every row corresponds to an actual run
27
+ - [ ] The evidence reproduces — a reviewer can run the same command
28
+
29
+ ## Forbidden
30
+
31
+ - Invented evidence is the cardinal sin — never record a row without running it
32
+ - Never alter acceptance criteria to match evidence
33
+ - Never claim a command passed when it did not
34
+ - Never omit the exit status or digest
@@ -0,0 +1,45 @@
1
+ # Implement step
2
+
3
+ ## Purpose
4
+
5
+ Execute the plan's tasks against the code. One phase per commit. Layer order
6
+ respected. Guard enforced.
7
+
8
+ ## Inputs
9
+
10
+ - The unit's Tasks section (filled by the plan step)
11
+ - The project's architecture doc (layer rules)
12
+ - The diff guard baseline from the triage step's reference
13
+
14
+ ## Fixed output contract
15
+
16
+ After each phase commit, update the unit doc's **Evidence** section and
17
+ **Progress log**:
18
+
19
+ | AC | What was run | Exit / digest | Output (≤2 lines) | Verified-by |
20
+ |---|---|---|---|---|
21
+ | P1 | <git commit sha> | 0 · <sha> | <result ≤2 lines> | <model> |
22
+
23
+ ## Checklist (pass only if)
24
+
25
+ - [ ] Phases executed in P1, P2, … order from the Tasks section
26
+ - [ ] One phase per commit (no bundling)
27
+ - [ ] Layer order respected (inner layers don't import outer)
28
+ - [ ] `git status --porcelain` is empty after each commit
29
+ - [ ] Diff guard passed after each phase (see step 4 in SKILL.md)
30
+ - [ ] Red run avoided — tests pass before committing, or tests-first red-run
31
+ evidence recorded
32
+
33
+ ## Allowed
34
+
35
+ - Changes scoped to the phase's acceptance criteria only
36
+ - Bug fixes in affected paths that the phase touches
37
+ - Documentation updates in the same commit as the code change
38
+
39
+ ## Forbidden
40
+
41
+ - No unrelated refactors in the same commit
42
+ - No new abstractions or dependencies beyond what the unit doc demands
43
+ - Never commit red (test failure)
44
+ - Never shrink a diff by deleting comments, blank lines, docs, or tests
45
+ - Do not expand scope beyond the unit's non-goals
@@ -0,0 +1,38 @@
1
+ # Plan step
2
+
3
+ ## Purpose
4
+
5
+ Cut tasks from acceptance criteria. Each task names its validator. Smallest
6
+ first. No future-phase work.
7
+
8
+ ## Inputs
9
+
10
+ - The unit's Acceptance criteria (filled by the design step)
11
+ - The unit's non-goals
12
+
13
+ ## Fixed output contract
14
+
15
+ Fill the unit doc's **Tasks** section:
16
+
17
+ ```
18
+ P1 — <task description> (validator: <what proves it works>)
19
+ P2 — <task description> (validator: <what proves it works>)
20
+ …
21
+ Pn — last task is verification when the unit has behavior
22
+ ```
23
+
24
+ ## Checklist (pass only if)
25
+
26
+ - [ ] Every AC maps to at least one task
27
+ - [ ] Tasks are ordered smallest first
28
+ - [ ] Each task names its validator (command, output, or observation)
29
+ - [ ] Final task is verification (proves the whole unit works)
30
+ - [ ] No task reaches into a future-phase concern (docs, release, migrations)
31
+ - [ ] Phases labeled P1, P2, … (never S1, Step 1)
32
+
33
+ ## Forbidden
34
+
35
+ - Do not bundle across phase boundaries — one phase = one commit
36
+ - Do not plan work beyond the unit's acceptance criteria
37
+ - Do not include docs/release tasks here — those are separate catalog steps
38
+ - Do not invent tasks that the ACs do not demand
@@ -0,0 +1,45 @@
1
+ # Release step
2
+
3
+ ## Purpose
4
+
5
+ Close the unit: branch hygiene, PR creation, and forge reconciliation.
6
+
7
+ ## Inputs
8
+
9
+ - The unit's completed SPEC.md (all sections current)
10
+ - The unit's Evidence section
11
+ - The project's Workflow conventions (branch/PR)
12
+
13
+ ## Fixed output contract
14
+
15
+ Write into the unit doc's **References** section:
16
+
17
+ ```
18
+ ## References
19
+ - Closes #<N>
20
+ - PR: <url>
21
+ - Branch: <branch-name>
22
+ - Commit: <sha>
23
+ ```
24
+
25
+ ## Checklist (pass only if)
26
+
27
+ - [ ] PR created on `main` with `Closes #N` from the References section
28
+ - [ ] Branch follows the project's Workflow conventions
29
+ - [ ] Commit messages follow conventional format (`type(scope): description`)
30
+ - [ ] PR body includes the Evidence section as verification record
31
+ - [ ] Roadmap row updated to `done` (or `merged` per conventions)
32
+ - [ ] `git status --porcelain` is empty
33
+
34
+ ## Allowed
35
+
36
+ - PR body references the unit's Evidence rows
37
+ - PR closes absorbed issues via `Closes #N`
38
+ - Roadmap annotation (folded → <NN>, superseded, re-scoped)
39
+
40
+ ## Forbidden
41
+
42
+ - Never stack PRs — one PR per unit of work, always against `main`
43
+ - Never work on `main` directly
44
+ - Never close the unit without an opened PR
45
+ - Never alter the unit doc's Evidence or Progress after this step