@gtrabanco/pi-agentic-workflow 0.21.0 → 0.24.2
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.
- package/package.json +1 -1
- package/skills/audit-pr/SKILL.md +1 -1
- package/skills/audit-pr/references/02_CLOSURE_AND_SCOPE_GATES.md +8 -4
- package/skills/execute-phase/SKILL.md +23 -1
- package/skills/fold-findings/SKILL.md +11 -3
- package/skills/init-workspace/SKILL.md +21 -2
- package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +1 -1
- package/skills/init-workspace/references/UPGRADE.md +2 -2
- package/skills/orchestration-envelope/SKILL.md +1 -1
- package/skills/orchestration-envelope/references/TURN_CONTRACT.md +44 -0
- package/skills/pre-execution-review/SKILL.md +1 -1
- package/skills/pre-execution-review/references/LEDGERS.md +2 -2
- package/skills/pre-execution-review/references/POLICY.md +3 -2
- package/skills/pre-execution-review/references/SNAPSHOT.md +2 -1
- package/skills/review-change/SKILL.md +3 -2
- package/skills/review-change/references/REVIEW_PROCESS.md +10 -9
- package/skills/review-implementation/SKILL.md +1 -1
- package/skills/review-implementation/references/CLASSIFY.md +1 -1
- package/skills/unit-lane/SKILL.md +29 -2
- package/skills/unit-lane/references/DESIGN.md +11 -0
- package/skills/unit-lane/references/IMPLEMENT.md +4 -2
- package/skills/unit-lane/references/RESEARCH.md +11 -0
- package/skills/verification-contract/SKILL.md +37 -25
- package/skills/workflow-status/SKILL.md +1 -1
- package/skills/workflow-status/references/PRE_EXECUTION.md +2 -1
package/package.json
CHANGED
package/skills/audit-pr/SKILL.md
CHANGED
|
@@ -96,7 +96,8 @@ verdict:
|
|
|
96
96
|
that route). The check keys the lane-era/legacy split on evidence, not on an
|
|
97
97
|
author-controlled artifact (fix/285; the lane-era pipeline structurally never
|
|
98
98
|
writes `progress.md` or `ACCEPTANCE.md`, so demanding them made the gate
|
|
99
|
-
unsatisfiable for every lane-era unit
|
|
99
|
+
unsatisfiable for every lane-era unit; the post-feature 61 unit doc's `## Acceptance
|
|
100
|
+
criteria` is the canonical acceptance source — issue #285):
|
|
100
101
|
- **Legacy path** — opened only when the unit's `progress.md` carries a
|
|
101
102
|
`## Pre-execution review receipt v1 — plan` whose digest **re-derives**
|
|
102
103
|
(`scripts/pre-execution-snapshot.mjs verify --stage plan` exits 0 over the
|
|
@@ -108,13 +109,15 @@ verdict:
|
|
|
108
109
|
`structural.reasonCode`/`changedPaths` name the drifted dimension), and —
|
|
109
110
|
for a feature unit — its named `— spec` parent re-derives the same way.
|
|
110
111
|
The acceptance manifest binds when present (fix/285): a unit that carries
|
|
111
|
-
`ACCEPTANCE.md` still binds it in the snapshot
|
|
112
|
+
`ACCEPTANCE.md` still binds it in the snapshot; post-feature 61 units bind
|
|
113
|
+
the unit doc's `## Acceptance criteria` section instead. Bound artifacts
|
|
112
114
|
are frozen: new implementation-phase files are allowed, edits to a bound
|
|
113
115
|
artifact are not. A receipt that does not re-derive — stale, missing,
|
|
114
116
|
wrong-stage **or impossible-timeline** — is never a pass: the check falls
|
|
115
117
|
through to the lane-era path, so a planted or stale `progress.md` cannot
|
|
116
118
|
buy a weaker gate (and a unit doc with no lane-era surface left is then
|
|
117
|
-
**BLOCKED**, `→ Next: /unit-lane <unit>`).
|
|
119
|
+
**BLOCKED**, `→ Next: /unit-lane <unit>`). Restoring the bound artifact or obtaining explicit user approval for a
|
|
120
|
+
SPEC amendment and replacement manifest, then write a fresh receipt.
|
|
118
121
|
- **Lane-era path** (feature 61's single-doc contract) — the unit doc's
|
|
119
122
|
Evidence section carries the `## Triaged steps` block whose `Steps:` /
|
|
120
123
|
`Skipped:` / `Budget:` lines re-derive identically from the doc's own
|
|
@@ -154,5 +157,6 @@ verdict:
|
|
|
154
157
|
A legacy unit with no ledgers is not exempt: the missing ledgers must be constructed
|
|
155
158
|
and reviewed through the adoption route (the pre-execution gate in `execute-phase`'s
|
|
156
159
|
preflight) before MERGE-READY. The audit never coerces old evidence into the new
|
|
157
|
-
format, never edits `ACCEPTANCE.md
|
|
160
|
+
format, never edits `ACCEPTANCE.md` (legacy (pre-feature 61)) or the unit doc's acceptance
|
|
161
|
+
section (post-feature 61), and never accepts a hand-written table that the
|
|
158
162
|
plan snapshot does not bind.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: execute-phase
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version:
|
|
4
|
+
version: 6.0.0
|
|
5
5
|
argument-hint: <NN-slug> [P<k>|step] [--max-attempts N] [--force]
|
|
6
6
|
allowed-tools: [Bash, Read, Edit, Write, MultiEdit]
|
|
7
7
|
author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
|
|
@@ -34,6 +34,9 @@ Tick every box before ending the turn; an unchecked box means the turn is not
|
|
|
34
34
|
done:
|
|
35
35
|
|
|
36
36
|
```
|
|
37
|
+
✓ Required user inputs were answered concretely (not defaulted). Nothing here
|
|
38
|
+
is inferred: a gap runs `node scripts/needs-input.mjs <unit-dir>` and the
|
|
39
|
+
`open-questions@1` block is pasted, then the run stops.
|
|
37
40
|
✓ Triage verified — unit doc Evidence section header matches
|
|
38
41
|
`bun scripts/unit-route.mjs --triage <slug>` output block (PREFLIGHT.md)
|
|
39
42
|
✓ Unit doc read and step selected (explicit P<k> or first unfinished)
|
|
@@ -54,6 +57,25 @@ done:
|
|
|
54
57
|
- To execute all remaining steps: `<NN-slug>` with no step argument.
|
|
55
58
|
- To repair a failed step: `<NN-slug> P<k>` (retry the same step).
|
|
56
59
|
|
|
60
|
+
## Inputs — artifacts, never questions
|
|
61
|
+
|
|
62
|
+
This skill **never interviews**. It reads its inputs — the unit doc's `Tasks`,
|
|
63
|
+
`unit-route.mjs --triage`'s block, the route's tier — and a missing or ambiguous
|
|
64
|
+
one is a **gap**, resolved in one fixed order and never by inference:
|
|
65
|
+
**(0) provenance** (search the repo's own docs and record where) →
|
|
66
|
+
**(1) research** (2–3 concrete options with trade-offs; asking for more research
|
|
67
|
+
is a legitimate answer) → **(2) halt**: run `node scripts/needs-input.mjs
|
|
68
|
+
<unit-dir>`, paste the `open-questions@1` block verbatim, stop. Interactive the
|
|
69
|
+
block is the pause point, unattended it is a hard fail. Grammar and exit codes:
|
|
70
|
+
`orchestration-envelope`'s `references/TURN_CONTRACT.md` §Open questions.
|
|
71
|
+
|
|
72
|
+
Bare `<NN-slug>` runs **all remaining steps** — the phase is not an input. File
|
|
73
|
+
targets are the unit doc's nested `Relevant files:` metadata plus the
|
|
74
|
+
path-protection checkpoint. `--max-attempts N` defaults to 3; `--force` skips the
|
|
75
|
+
*stop* on the dependency and phase-lint gates (never the check — `PREFLIGHT.md`
|
|
76
|
+
records the override in the Progress log) and has **no bypass** on the
|
|
77
|
+
path-protection checkpoint.
|
|
78
|
+
|
|
57
79
|
## Step 0 — Discover the project
|
|
58
80
|
|
|
59
81
|
Per the agent guide's **Workflow conventions** + **documentation map**, read the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fold-findings
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.9.0
|
|
5
5
|
argument-hint: [finding-id …]
|
|
6
6
|
author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
|
|
7
7
|
license: MIT
|
|
@@ -144,8 +144,16 @@ table: [`FOLD_PROCESS.md`](references/FOLD_PROCESS.md) §Batch classification.
|
|
|
144
144
|
Scope is the ledger (or explicit ID subset); unlisted discoveries are proposals
|
|
145
145
|
for user triage. Batch only when one root-cause correction, validator set and
|
|
146
146
|
rollback boundary own the rows: one commit/push, individual ticks/lines. Split
|
|
147
|
-
otherwise.
|
|
148
|
-
|
|
147
|
+
otherwise.
|
|
148
|
+
|
|
149
|
+
**The fix covers the change and everything that depends on it.** When what a
|
|
150
|
+
piece receives changes, find its callers; when what it delivers changes, find
|
|
151
|
+
its consumers; when something is removed, check what still uses it and ask
|
|
152
|
+
before breaking it. A surviving mention of what changed — a comment, a prose
|
|
153
|
+
claim, a declared validator, a manifest narration, a sibling surface stating
|
|
154
|
+
the same thing — is part of this same fold, never a finding for the next
|
|
155
|
+
cycle. The fold ends when nothing still asserts what is no longer true; state
|
|
156
|
+
in the commit which surfaces the correction swept. Artifact language follows user
|
|
149
157
|
instruction > project docs language > English; conversation language never decides.
|
|
150
158
|
|
|
151
159
|
## Portability (agents other than Claude Code)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: init-workspace
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.2
|
|
5
5
|
argument-hint: <target-dir>
|
|
6
6
|
author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
|
|
7
7
|
license: MIT
|
|
@@ -21,6 +21,10 @@ raw placeholders.
|
|
|
21
21
|
## Turn contract — verify before ending the turn
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
+
✓ Required user inputs were answered concretely (not defaulted). Consent for
|
|
25
|
+
every install, hook, and overwrite is explicit; a consent gap runs the
|
|
26
|
+
three-tier dispatch and stops with the dispatcher's `open-questions@1` block
|
|
27
|
+
— against a scratch unit folder when no unit exists yet (§Consent).
|
|
24
28
|
✓ The adapted scaffold and repository-state ledger are written (or the merge/abort decision was asked) and remaining placeholders are listed
|
|
25
29
|
✓ Nothing was installed or overwritten without an explicit yes
|
|
26
30
|
✓ Artifact language: explicit user instruction > the project's declared docs language > English. The CONVERSATION language never decides — a Spanish prompt still produces English PRs/issues/commits/SPECs unless one of the first two says otherwise
|
|
@@ -38,6 +42,21 @@ first on purpose).
|
|
|
38
42
|
- Prefer this over a static `npx degit gtrabanco/agentic-workflow/template` when you
|
|
39
43
|
want the gate commands, architecture, and doc domains filled in by interview.
|
|
40
44
|
|
|
45
|
+
## Consent — mandatory, never defaulted
|
|
46
|
+
|
|
47
|
+
Installing a tool, wiring a hook, or overwriting an existing file each need an
|
|
48
|
+
explicit yes; context never supplies one, and an ambiguous repository state
|
|
49
|
+
(partially scaffolding) is not a route to guess. A consent gap is an open
|
|
50
|
+
question: **(0) provenance** (search the repo's own docs and record where) →
|
|
51
|
+
**(1) research** (concrete options) → **(2) halt**: run `node
|
|
52
|
+
scripts/needs-input.mjs <unit-dir>`, paste the `open-questions@1` block verbatim,
|
|
53
|
+
stop with the questions carried in it. The dispatcher needs a unit folder, and
|
|
54
|
+
consent gaps usually precede any unit — so the run first writes a scratch one
|
|
55
|
+
(`SPEC.md` + `decisions.md` in a `mktemp` directory, deleted after the paste)
|
|
56
|
+
and runs the dispatcher against that. Grammar and exit codes:
|
|
57
|
+
`orchestration-envelope`'s `references/TURN_CONTRACT.md` §Open questions.
|
|
58
|
+
`[target-dir]` is optional — absent means the current directory, recorded.
|
|
59
|
+
|
|
41
60
|
## Step 0 — Discover the project (always first)
|
|
42
61
|
|
|
43
62
|
Inspect the target dir (`[target-dir]`, default cwd) before touching anything:
|
|
@@ -133,7 +152,7 @@ loads exactly upgrade and skips bootstrap plus portability.
|
|
|
133
152
|
|
|
134
153
|
The adaptive lane (feature 61) replaces the fixed pipeline with a single-unit-
|
|
135
154
|
document model. Every NEW unit produces one `SPEC.md` under
|
|
136
|
-
`docs/features/<NN>-<slug>/` with
|
|
155
|
+
`docs/features/<NN>-<slug>/` with 14 sections: Objective, Why, User outcome, Impact,
|
|
137
156
|
Acceptance criteria, Non-goals, Future cost, Applicable tests, Known pre-existing
|
|
138
157
|
issues, Tasks, Evidence, Progress log, Next, References.
|
|
139
158
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
that the scaffold failed. If retained, add its documentation-map row and
|
|
23
23
|
name the project's explicit architectural-decision authority.
|
|
24
24
|
7. **Propagate the unit doc template.** Ensure
|
|
25
|
-
`docs/features/_TEMPLATE/SPEC.md` exists with all
|
|
25
|
+
`docs/features/_TEMPLATE/SPEC.md` exists with all 14 sections sections.
|
|
26
26
|
This is the template used when creating new unit documents.
|
|
27
27
|
8. **Provision the Serena project config.** Load
|
|
28
28
|
[SERENA](SERENA.md), ask consent, then: (a) append the `.gitignore`
|
|
@@ -36,11 +36,11 @@ lacks**. Nine ordered steps:
|
|
|
36
36
|
4. **Propose the adaptive lane conventions (feature 61 P11).** For pre-lane
|
|
37
37
|
installs (before the fixed pipeline was retired), propose these missing
|
|
38
38
|
blocks additively — **never clobber existing content**:
|
|
39
|
-
- The **unit document conventions** section in AGENTS.md (the
|
|
39
|
+
- The **unit document conventions** section in AGENTS.md (the 14-section
|
|
40
40
|
SPEC.md, triage-driven step selection, diff-size guard, evidence rows,
|
|
41
41
|
dated progress log, closed commit format `type(scope): description`).
|
|
42
42
|
- The **unit doc template** under `docs/features/_TEMPLATE/SPEC.md` if
|
|
43
|
-
absent — the same
|
|
43
|
+
absent — the same 14-section template used by new units.
|
|
44
44
|
- The **lane workflow doc** under `docs/workflow/` if absent: `FEATURE_WORKFLOW.md`
|
|
45
45
|
(unit doc → triage → catalog steps → evidence → review → release),
|
|
46
46
|
`ISSUE_WORKFLOW.md` (issues route through triage to the lane).
|
|
@@ -85,6 +85,50 @@ next | suggested
|
|
|
85
85
|
next | continuation
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
## Open questions (the needs-input halt)
|
|
89
|
+
|
|
90
|
+
An input a step cannot resolve is never inferred: the step stops and hands the
|
|
91
|
+
questions back. The block below is that hand-off — printed by
|
|
92
|
+
`scripts/needs-input.mjs`, never hand-authored — so a weaker model copies it
|
|
93
|
+
instead of paraphrasing the questions away. Interactive, the block is the pause
|
|
94
|
+
point and the run waits for a user decision; unattended, it is a hard fail
|
|
95
|
+
carrying the same block.
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
open-questions@1
|
|
99
|
+
# produced-by: scripts/needs-input.mjs <unit-dir> [--json]
|
|
100
|
+
# input: <unit-dir>/SPEC.md + <unit-dir>/decisions.md (the ledger's own grammar is
|
|
101
|
+
# published by the template agent guide, template/AGENTS.md)
|
|
102
|
+
# machine: continuation-refusal-type (schema-export:CONTINUATION_REFUSALS)
|
|
103
|
+
# exit: 0 well-formed artifact (pending questions or none) | 1 fail-closed | 2 usage error
|
|
104
|
+
header: open-questions@1
|
|
105
|
+
fields: Unit: <unit-folder-name>
|
|
106
|
+
Open questions: <count>
|
|
107
|
+
- <question-id> · <route> · <the question>
|
|
108
|
+
Blocks: <why nothing proceeds without it>
|
|
109
|
+
Searched: <where the repository was searched: path:line, greps, prior units>
|
|
110
|
+
Options:
|
|
111
|
+
- <one researched option with its trade-off>
|
|
112
|
+
Pending: none (only when the count is 0)
|
|
113
|
+
Route back: <design | unit-lane> · … | none
|
|
114
|
+
Continuation: no-decision-available | none
|
|
115
|
+
Decision: open | none
|
|
116
|
+
fail-block: NEEDS-INPUT FAIL — needs-input@1
|
|
117
|
+
Unit: <unit-folder-name>
|
|
118
|
+
Reason: <missing-unit-doc | malformed-ledger-header | malformed-entry |
|
|
119
|
+
missing-search-receipt | missing-options | unknown-route |
|
|
120
|
+
unknown-question | invalid-authority | duplicate-id>
|
|
121
|
+
Where: <path[:line]>
|
|
122
|
+
Continuation: no-decision-available
|
|
123
|
+
route: design | unit-lane
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`route` is the stage that owns the fact and therefore receives it back —
|
|
127
|
+
`design` for scope/architecture questions, `unit-lane` for plan-owned facts.
|
|
128
|
+
Execution never interviews: it halts with the questions. `Continuation` reuses
|
|
129
|
+
the schema's existing `no-decision-available` (`decisionAvailable === false`),
|
|
130
|
+
so the halt needs no new envelope field.
|
|
131
|
+
|
|
88
132
|
## Path-protection checkpoint (feature 60)
|
|
89
133
|
|
|
90
134
|
The Tier 1 path gate is versioned so the checkpoint invocation, the closed
|
|
@@ -55,7 +55,7 @@ task | implementation-owner | validator | required-evidence | status
|
|
|
55
55
|
| `authority-source` | the SPEC/acceptance/criterion or ledger row that *requires* it — never the implementation |
|
|
56
56
|
| `phase` / `task` | exactly one phase and one task; a row needing two phases means the phase cut is wrong |
|
|
57
57
|
| `implementation-owner` | the skill/role that performs it (usually `execute-phase`) |
|
|
58
|
-
| `validator` | the command or check that proves it, copied from `ACCEPTANCE.md` or the phase's done-when |
|
|
58
|
+
| `validator` | the command or check that proves it, copied from the acceptance artifact (`ACCEPTANCE.md` for legacy (pre-feature 61) units; `sed -n '/^## Acceptance criteria/,/^## /p' <unit>/SPEC.md \| git hash-object --stdin` for post-feature 61) or the phase's done-when |
|
|
59
59
|
| `required-evidence` | what must be recorded where (test name, receipt line, ledger row) |
|
|
60
60
|
| `status` | `planned \| in-progress \| verified \| n/a \| deferred` |
|
|
61
61
|
|
|
@@ -147,7 +147,7 @@ progress | docs/features/<NN>-<slug>/SPEC.md · docs/fix/<issue>-<topic>/SPEC.md
|
|
|
147
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
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
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
|
|
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 (legacy pre-feature 61) · sed -n '/^## Acceptance criteria/,/^## /p' <unit>/SPEC.md then git hash-object --stdin (unit doc era, post-feature 61)
|
|
151
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
|
|
152
152
|
```
|
|
153
153
|
|
|
@@ -63,7 +63,7 @@ in the unit's unbound `progress.md`:
|
|
|
63
63
|
## Wording-only determination v1 — <spec|plan>
|
|
64
64
|
- Determination: <opaque id>
|
|
65
65
|
- Artifact revision: <the rotated artifactRevisionId>
|
|
66
|
-
- Acceptance fingerprint: <the ACCEPTANCE.md blob the batch left unmoved>
|
|
66
|
+
- Acceptance fingerprint: <the acceptance artifact (ACCEPTANCE.md for legacy (pre-feature 61), unit doc ## Acceptance criteria for post-feature 61) blob the batch left unmoved>
|
|
67
67
|
- Intent and authority unchanged: yes
|
|
68
68
|
```
|
|
69
69
|
|
|
@@ -149,7 +149,8 @@ One rule, same shape for every consumer:
|
|
|
149
149
|
|
|
150
150
|
- **Construct, never coerce.** Add what the unit is missing — the planning-evidence
|
|
151
151
|
and obligation ledgers, built from the artifacts as they stand today — and leave
|
|
152
|
-
`ACCEPTANCE.md
|
|
152
|
+
`ACCEPTANCE.md` (legacy (pre-feature 61)), the unit doc's `## Acceptance criteria` (post-feature
|
|
153
|
+
61), `PLAN.md`, `TASKS.md`, the phase commits and any older receipt
|
|
153
154
|
byte-identical. Rewriting an old verdict, its digest, or its date is forgery.
|
|
154
155
|
- **Re-review, then resume.** The adopted unit re-runs the lane's `review` step like any other and
|
|
155
156
|
`execute-phase` resumes **only** on that current verdict. A pre-lane unit
|
|
@@ -61,7 +61,8 @@ Rules the builder enforces and no caller may improvise around:
|
|
|
61
61
|
`Depends on:` line plus the closure roadmap rows); the unit's artifacts and the
|
|
62
62
|
authorities above stay bound.
|
|
63
63
|
- **A snapshot digest is not a git blob id.** `git hash-object` stays the convention
|
|
64
|
-
for the frozen `ACCEPTANCE.md` manifest receipt only
|
|
64
|
+
for the frozen `ACCEPTANCE.md` manifest receipt only (legacy pre-feature 61) or the post-feature
|
|
65
|
+
61 unit doc acceptance section; comparing it to a snapshot
|
|
65
66
|
digest proves nothing and a sensor that does so is wrong, not cheap.
|
|
66
67
|
|
|
67
68
|
### Re-verifying a receipt (consumers)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-change
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version: 3.12.
|
|
4
|
+
version: 3.12.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
|
|
@@ -59,7 +59,8 @@ or edits code. A `REVIEW-FAIL`/`NEEDS-DECISION` turn closes when the report
|
|
|
59
59
|
block is printed (report step 13).
|
|
60
60
|
|
|
61
61
|
Consume the internal [verification contract](<../verification-contract/SKILL.md>);
|
|
62
|
-
the reviewer checks the same frozen `ACCEPTANCE.md`
|
|
62
|
+
the reviewer checks the same frozen acceptance artifact (legacy (pre-feature 61) `ACCEPTANCE.md`
|
|
63
|
+
or post-feature-61 unit doc `## Acceptance criteria`) as the executor before
|
|
63
64
|
mapping candidate evidence.
|
|
64
65
|
|
|
65
66
|
## When to use
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
2. Review the **fold diff only** (`git diff <pre-batch HEAD>..<batch HEAD>`
|
|
32
32
|
over the commits this turn's batch produced);
|
|
33
33
|
3. Require the **gate green at the reviewed head** and the sibling
|
|
34
|
-
|
|
35
|
-
structural precondition, unchanged and still mandatory
|
|
34
|
+
acceptance-manifest (step-2 artifact) blob recomputed to an **exact match**
|
|
35
|
+
— the step-2 structural precondition, unchanged and still mandatory.
|
|
36
36
|
4. Append the normal `review-mark@1` `REVIEW-RAN` mark — delta cycles count
|
|
37
37
|
toward the two-cycle cap from the unchanged source (marks + forge
|
|
38
38
|
receipts), never a fresh reset;
|
|
@@ -52,13 +52,14 @@
|
|
|
52
52
|
read from `git diff --unified=0` hunk headers);
|
|
53
53
|
- **Size** — added+deleted changed lines **> 200**, or changed files
|
|
54
54
|
**> 15** (`git diff --numstat`).
|
|
55
|
-
2. **Frozen acceptance + SPEC drift check (structural).** Locate
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
2. **Frozen acceptance + SPEC drift check (structural).** Locate the acceptance
|
|
56
|
+
artifact — legacy (pre-feature 61) `ACCEPTANCE.md` or the unit doc's
|
|
57
|
+
`## Acceptance criteria` section (post-feature 61) — recompute its blob,
|
|
58
|
+
and require an exact match with the execution receipt before assessing the
|
|
59
|
+
candidate. Missing/mismatch is a `workflow` fix-now finding and no passing
|
|
60
|
+
receipt may be posted. Legacy units use the verification contract's
|
|
61
|
+
committed SPEC-blob fallback. Then build a **per-criterion coverage table**
|
|
62
|
+
from the manifest — one row per acceptance criterion, no free-form comparison:
|
|
62
63
|
|
|
63
64
|
```
|
|
64
65
|
| criterion | evidence (file:line or command run) | met | unmet | untouched |
|
|
@@ -42,7 +42,7 @@ A finding **blocks** only when the reviewer cites which single-owner source
|
|
|
42
42
|
fails — blocking is a table lookup over cited sources, never a severity
|
|
43
43
|
opinion. The four citation categories are:
|
|
44
44
|
|
|
45
|
-
1. **ACCEPTANCE criterion** unverified or failed.
|
|
45
|
+
1. **ACCEPTANCE criterion** (legacy `ACCEPTANCE.md` or post-feature 61 unit doc `## Acceptance criteria`) unverified or failed.
|
|
46
46
|
2. **Obligation row** in the unit's ledger is not `verified` or `n-a`.
|
|
47
47
|
3. **Gate is red** at the reviewed head (the project gate exited non-zero at
|
|
48
48
|
the exact head under review).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: unit-lane
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
argument-hint: <NN-slug | "<idea>"> [--retriage] | --fix <issue-number> | --from-issue <issue-number>
|
|
6
6
|
description: >
|
|
7
7
|
One-shot lane conductor for a delivery unit: triage, implement, evidence, and
|
|
@@ -21,6 +21,10 @@ Tick every box before ending the turn; an unchecked box means the turn is not
|
|
|
21
21
|
done:
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
+
✓ Required user inputs were answered concretely (not defaulted). Nothing here
|
|
25
|
+
is inferred: a gap re-enters provenance → research, and a gap surviving both
|
|
26
|
+
runs `node scripts/needs-input.mjs <unit-dir>` and stops with the
|
|
27
|
+
`open-questions@1` block routed back to the owning stage.
|
|
24
28
|
✓ Triage ran (bun scripts/unit-route.mjs --triage <slug>) and its block pasted
|
|
25
29
|
verbatim into the unit doc's Evidence section as the authoritative step list
|
|
26
30
|
✓ Unit doc exists at docs/features/<NN>-<slug>/SPEC.md (created from template
|
|
@@ -44,6 +48,26 @@ Both `--fix <n>` and `--from-issue <n>` are the exact forms
|
|
|
44
48
|
`scripts/unit-route.mjs` prints for a tracked issue with no unit folder
|
|
45
49
|
(`route: plan-from-issue`) — never invent a different spelling.
|
|
46
50
|
|
|
51
|
+
## Inputs — never inferred, never defaulted
|
|
52
|
+
|
|
53
|
+
The unit identifier, a mode's issue number, the unit kind, and the
|
|
54
|
+
objective/why/user-outcome the SPEC carries are **never inferred**: no silent
|
|
55
|
+
`feature` default, no acceptance criterion invented from a vague request. A gap
|
|
56
|
+
is resolved in one fixed order — **(0) provenance** (search the repo's own docs
|
|
57
|
+
and append an `open-question` row to the unit's `decisions.md` recording where)
|
|
58
|
+
→ **(1) research** (2–3 concrete options with trade-offs; asking for more
|
|
59
|
+
research is a legitimate answer) → **(2) halt**: run `node
|
|
60
|
+
scripts/needs-input.mjs <unit-dir>`, paste the `open-questions@1` block verbatim,
|
|
61
|
+
stop. The block routes each question back to the stage that owns the fact —
|
|
62
|
+
`design` for scope/architecture, `unit-lane` for plan-owned facts. Grammar and
|
|
63
|
+
exit codes: `orchestration-envelope`'s `references/TURN_CONTRACT.md` §Open
|
|
64
|
+
questions.
|
|
65
|
+
|
|
66
|
+
The conversation lives in the unit folder's `decisions.md` (append-only
|
|
67
|
+
`open-questions@1`; its two entry types are published in the template agent
|
|
68
|
+
guide's question protocol). A resumed session re-reads the pending rows and
|
|
69
|
+
continues from the first one still open — never re-asks them.
|
|
70
|
+
|
|
47
71
|
## Step 0 — Discover the project
|
|
48
72
|
|
|
49
73
|
Per the agent guide's **Workflow conventions** + **documentation map**, then read
|
|
@@ -111,7 +135,10 @@ execution work hands off one phase per turn:
|
|
|
111
135
|
```
|
|
112
136
|
|
|
113
137
|
`<k>` is the first unfinished phase (the unit doc's Progress log records the
|
|
114
|
-
phases done so far; `bun scripts/unit-route.mjs <NN-slug>` prints it
|
|
138
|
+
phases done so far; `bun scripts/unit-route.mjs <NN-slug>` prints it — when every
|
|
139
|
+
phase is recorded but the index still reads `in-progress`, the router refuses with
|
|
140
|
+
`UNIT ROUTE — error … settle the index or roadmap status` and exits 1: settle the
|
|
141
|
+
status, then continue the ladder) and
|
|
115
142
|
`<tier>` is the `implement` entry of the triage block's `Tiers:` line. Never
|
|
116
143
|
print the bare whole-unit `/execute-phase <NN-slug>` — whole-unit loop mode
|
|
117
144
|
survives only as an explicit operator choice. When the last phase's turn
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Design step
|
|
2
2
|
|
|
3
|
+
## Needs-input guard
|
|
4
|
+
|
|
5
|
+
A blank or vague scope or acceptance-criteria input is a gap, not a licence to
|
|
6
|
+
infer. The order is fixed: search the repository's own docs first and append an
|
|
7
|
+
`open-question` row to the unit folder's `decisions.md` recording where; research
|
|
8
|
+
an external gap into 2–3 concrete options. A gap surviving both runs
|
|
9
|
+
`node scripts/needs-input.mjs <unit-dir>`, pastes the `open-questions@1` block
|
|
10
|
+
and stops — route `design` for scope/architecture questions. "Decide for me" is
|
|
11
|
+
a legitimate answer: the lane chooses and records the choice with its reason.
|
|
12
|
+
Cheap-to-change defaults are recorded as assumptions, never silent.
|
|
13
|
+
|
|
3
14
|
## Purpose
|
|
4
15
|
|
|
5
16
|
Run the gap interview, induce acceptance criteria from user scenarios, and
|
|
@@ -22,8 +22,10 @@ At each execution boundary, print exactly one phase hand-off and end the turn:
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
`<k>` = first unfinished phase (lowest `P<n>` bullet the Progress log does not
|
|
25
|
-
record; `bun scripts/unit-route.mjs <NN-slug>` prints it
|
|
26
|
-
|
|
25
|
+
record; `bun scripts/unit-route.mjs <NN-slug>` prints it — if every phase is
|
|
26
|
+
recorded while the index still reads `in-progress`, the router refuses with
|
|
27
|
+
`UNIT ROUTE — error … settle the index or roadmap status` and exits 1). `<tier>` =
|
|
28
|
+
the `implement` entry of the triage block's `Tiers:` line. Never the bare
|
|
27
29
|
whole-unit command.
|
|
28
30
|
|
|
29
31
|
When the last phase's turn closes, `execute-phase` resumes the lane. Verify
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Research step
|
|
2
2
|
|
|
3
|
+
## Needs-input guard
|
|
4
|
+
|
|
5
|
+
**Unit objective and scope** are the input to this step, and the lane authors
|
|
6
|
+
them, not the user. A blank or missing objective/scope is therefore a **document
|
|
7
|
+
defect**: stop and repair the SPEC (`/unit-lane <unit>` — its §1 writes the
|
|
8
|
+
objective/why/user-outcome) or re-triage. Never infer unit scope, and never
|
|
9
|
+
turn a doc defect into a question the user cannot answer. A gap that survives
|
|
10
|
+
the repair runs `node scripts/needs-input.mjs <unit-dir>`, pastes the
|
|
11
|
+
`open-questions@1` block and stops, routed to `design` or `unit-lane` by the
|
|
12
|
+
owning stage.
|
|
13
|
+
|
|
3
14
|
## Purpose
|
|
4
15
|
|
|
5
16
|
Establish what is known and what is uncertain about the unit's domain before
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verification-contract
|
|
3
3
|
user-invocable: false
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.2
|
|
5
5
|
author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
|
|
6
6
|
license: MIT
|
|
7
7
|
description: >
|
|
8
|
-
Internal contract:
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Internal contract: the acceptance artifact per delivery unit — legacy (pre-
|
|
9
|
+
feature 61) units may carry a frozen `ACCEPTANCE.md` (binding if present);
|
|
10
|
+
post-feature 61 units use the unit doc's `## Acceptance criteria` section as
|
|
11
|
+
the canonical acceptance source; the unit doc's `## Evidence` table serves as
|
|
12
|
+
the execution receipt. Consumed by planners, execute-phase, and review-change.
|
|
11
13
|
---
|
|
12
14
|
|
|
13
15
|
# Verification Contract (internal)
|
|
@@ -17,12 +19,18 @@ strengthen coverage but cannot move it; review checks the same bytes.
|
|
|
17
19
|
|
|
18
20
|
## Artifact
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
criterion; `Required outcome`; named `Validator`; literal
|
|
23
|
-
commands. Prefer commands, otherwise use
|
|
24
|
-
`manual: <exact observation>`. Unlabelled prose
|
|
25
|
-
name its future project runner; it cannot
|
|
22
|
+
Legacy (pre-feature 61) units (ACCEPTANCE.md present — binding if present):
|
|
23
|
+
the frozen `ACCEPTANCE.md` beside the SPEC; required parts: `Status: frozen`;
|
|
24
|
+
one stable ID per SPEC criterion; `Required outcome`; named `Validator`; literal
|
|
25
|
+
quality floor; project commands. Prefer commands, otherwise use
|
|
26
|
+
`read-verified: <evidence>` or `manual: <exact observation>`. Unlabelled prose
|
|
27
|
+
is invalid. A planned test may name its future project runner; it cannot
|
|
28
|
+
substitute a narrower runner later.
|
|
29
|
+
|
|
30
|
+
Lane-era units (post-feature 61): the unit doc's `## Acceptance criteria` section is the
|
|
31
|
+
canonical acceptance source. Criteria are numbered, each induced from a concrete
|
|
32
|
+
user scenario, and command-verified where possible (label `read-verified` for
|
|
33
|
+
prose-only checks). Unlabelled prose is invalid.
|
|
26
34
|
|
|
27
35
|
**Validator stability.** A validator must never gate on a surface other workflow
|
|
28
36
|
actors mutate — the branch diff as a whole, the session log, progress entries,
|
|
@@ -33,31 +41,36 @@ diff-based validator enumerates the unit's paths or excludes the
|
|
|
33
41
|
workflow-mutated surfaces explicitly (docs/LOGS.md, the unit's own docs
|
|
34
42
|
directory, harness/toolstate).
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
**Validator determinism.** A frozen validator must be deterministic — pin network,
|
|
45
|
+
clock, randomness, and unordered-concurrency dependencies (fixed version,
|
|
46
|
+
frozen fixture, recorded input) or downgrade the row to `read-verified:`/
|
|
47
|
+
`manual:`.
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
**Property / fuzz validators.** A planner may emit a property or fuzz validator as
|
|
50
|
+
a bounded `commands` row — deterministic, bounded runtime within the project's
|
|
51
|
+
per-command timeout budgets. No new validator kind in `VerificationPlan
|
|
52
|
+
v1` is needed: property/fuzz rides the existing `commands` class.
|
|
40
53
|
|
|
41
|
-
|
|
42
|
-
## Acceptance receipt v1
|
|
43
|
-
- Manifest: <path> · Blob: <sha> · Status: frozen · Verified: <date>
|
|
44
|
-
```
|
|
54
|
+
## Freeze and receipt
|
|
45
55
|
|
|
46
|
-
|
|
47
|
-
|
|
56
|
+
The unit doc's `## Evidence` table is the execution receipt: each Evidence row
|
|
57
|
+
records a validator command, its exit code or blob digest, output excerpt, and
|
|
58
|
+
who verified it. A frozen criterion's receipt is the Evidence row for that
|
|
59
|
+
criterion — exact match continues; missing/mismatched evidence stops before
|
|
60
|
+
edits:
|
|
48
61
|
|
|
49
62
|
```text
|
|
50
63
|
ACCEPTANCE GATE — <unit> BLOCKED
|
|
51
|
-
Expected blob
|
|
52
|
-
Reason: the frozen finish line is missing or changed.
|
|
64
|
+
Expected Evidence row for AC<N>: present with blob <sha> · Actual: missing/changed
|
|
65
|
+
Reason: the frozen finish line evidence is missing or changed.
|
|
53
66
|
|
|
54
67
|
→ Next: restore the frozen manifest, or obtain explicit user approval for a
|
|
55
|
-
SPEC amendment and replacement manifest; then
|
|
68
|
+
SPEC amendment and replacement manifest; then record a fresh Evidence row
|
|
56
69
|
· never edit tests, commands, or acceptance to make the current candidate pass
|
|
57
70
|
```
|
|
58
71
|
|
|
59
72
|
A legitimate change requires, in order: explicit user approval; dated SPEC
|
|
60
|
-
`## Amendments` row; replacement manifest; committed fresh
|
|
73
|
+
`## Amendments` row; replacement manifest; committed fresh Evidence row. The
|
|
61
74
|
executor never self-authorizes it.
|
|
62
75
|
|
|
63
76
|
Legacy unit with no manifest mention: fingerprint committed `SPEC.md` and record
|
|
@@ -99,5 +112,4 @@ semantics are verified against authoritative documentation **before a test encod
|
|
|
99
112
|
|
|
100
113
|
## Done when
|
|
101
114
|
|
|
102
|
-
|
|
103
|
-
floor; executor and reviewer evaluate identical bytes.
|
|
115
|
+
Execution receipt (unit doc `## Evidence` table for post-feature 61 units; legacy `ACCEPTANCE.md` manifest binding-if-present) + named validators + literal quality floor; executor and reviewer evaluate identical evidence.
|
|
@@ -24,7 +24,8 @@ For every unit whose resolved status is `defined`, `planned` or `in-progress`:
|
|
|
24
24
|
name the dimension that stopped being true, which is what the sensor labels
|
|
25
25
|
`stale`. A snapshot digest is a canonical
|
|
26
26
|
SHA-256 over the snapshot object, so `git hash-object` is never a substitute: it
|
|
27
|
-
stays correct only for the frozen `ACCEPTANCE.md`
|
|
27
|
+
stays correct only for the frozen acceptance artifact: `ACCEPTANCE.md` (legacy (pre-feature 61)) or the
|
|
28
|
+
unit doc's `## Acceptance criteria` section (post-feature 61).
|
|
28
29
|
3. The verdict, the reviewed `unit`, the stage, and the author fields
|
|
29
30
|
(`reviewer` and `authorId` — the receipt's `Reviewer:` / `Author:` lines — and
|
|
30
31
|
`authorExclusion`).
|