@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.
- package/README.md +3 -9
- package/dist/routing/catalogue.d.ts +1 -1
- package/dist/routing/catalogue.js +1 -1
- package/dist/runtime.d.ts +45 -0
- package/dist/runtime.js +62 -0
- package/package.json +10 -8
- package/skills/audit-docs/SKILL.md +6 -5
- package/skills/audit-pr/SKILL.md +1 -1
- package/skills/audit-pr/references/PORTABILITY.md +1 -1
- package/skills/execute-phase/SKILL.md +207 -116
- package/skills/execute-phase/references/DESCOPE.md +22 -18
- package/skills/execute-phase/references/EXECUTION_CONTRACT.md +69 -77
- package/skills/execute-phase/references/FOLDING.md +34 -47
- package/skills/execute-phase/references/PREFLIGHT.md +103 -114
- package/skills/execute-phase/references/PRE_EXECUTION_GATE.md +53 -60
- package/skills/init-workspace/SKILL.md +52 -16
- package/skills/init-workspace/references/BOOTSTRAP_DISCOVERY.md +6 -6
- package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +17 -10
- package/skills/init-workspace/references/PORTABILITY.md +1 -1
- package/skills/init-workspace/references/UPGRADE.md +50 -15
- package/skills/log-session/SKILL.md +4 -3
- package/skills/orchestration-envelope/references/TURN_CONTRACT.md +1 -1
- package/skills/pre-execution-review/references/LEDGERS.md +39 -39
- package/skills/pre-execution-review/references/POLICY.md +1 -0
- package/skills/product-audit/SKILL.md +4 -4
- package/skills/product-audit/references/AUDIT_PROCESS.md +3 -3
- package/skills/review-change/SKILL.md +1 -1
- package/skills/review-change/references/PORTABILITY.md +1 -1
- package/skills/unit-lane/SKILL.md +154 -0
- package/skills/unit-lane/references/DESIGN.md +35 -0
- package/skills/unit-lane/references/DOCS.md +36 -0
- package/skills/unit-lane/references/EVIDENCE.md +34 -0
- package/skills/unit-lane/references/IMPLEMENT.md +45 -0
- package/skills/unit-lane/references/PLAN.md +38 -0
- package/skills/unit-lane/references/RELEASE.md +45 -0
- package/skills/unit-lane/references/RESEARCH.md +37 -0
- package/skills/unit-lane/references/REVIEW.md +45 -0
- package/skills/unit-lane/references/STEPS.md +23 -0
- package/skills/unit-lane/references/TESTS.md +32 -0
- package/skills/workflow-status/references/ENVELOPE_FIELDS.md +5 -6
- package/skills/workflow-status/references/SENSOR_CORE.md +16 -20
- package/skills/workflow-status/references/SENSOR_SIGNALS.md +5 -7
- package/skills/design-feature/SKILL.md +0 -231
- package/skills/design-feature/references/INTERVIEW.md +0 -74
- package/skills/design-feature/references/PORTABILITY.md +0 -15
- package/skills/design-feature/references/REPAIR.md +0 -88
- package/skills/design-feature/references/UPSERT_EXAMPLE.md +0 -8
- package/skills/design-feature/references/WRITE_AND_UPSERT.md +0 -115
- package/skills/evidence-grounding/SKILL.md +0 -174
- package/skills/evidence-grounding/references/DELEGATION.md +0 -131
- package/skills/evidence-grounding/references/READINESS.md +0 -130
- package/skills/evidence-grounding/references/ROWS.md +0 -93
- package/skills/execute-phase/references/BATCH_AND_PORTABILITY.md +0 -57
- package/skills/execute-phase/references/CLOSEOUT.md +0 -77
- package/skills/execute-phase/references/HANDOFF.md +0 -21
- package/skills/execute-phase/references/OPPORTUNISTIC_FINDING.md +0 -45
- package/skills/execute-phase/references/UNIT_LOOP.md +0 -88
- package/skills/execute-phase/references/WORKFLOWS_FEATURE.md +0 -37
- package/skills/execute-phase/references/WORKFLOWS_FIX.md +0 -43
- package/skills/execute-phase/references/WORKFLOWS_LEGACY.md +0 -26
- package/skills/execute-phase/references/WORKFLOWS_SMALL_PHASED.md +0 -38
- package/skills/generate-docs/SKILL.md +0 -145
- package/skills/generate-docs/references/ADAPTERS.md +0 -15
- package/skills/generate-docs/references/ADAPTER_DISCOVERY.md +0 -33
- package/skills/generate-docs/references/GENERATION_PROCESS.md +0 -90
- package/skills/implementation-discovery/SKILL.md +0 -209
- package/skills/plan-feature/SKILL.md +0 -208
- package/skills/plan-feature/references/ROUTING.md +0 -155
- package/skills/plan-feature-from-issue/SKILL.md +0 -162
- package/skills/plan-feature-scaffold/SKILL.md +0 -112
- package/skills/plan-feature-scaffold/references/SCAFFOLD_PROCESS.md +0 -122
- package/skills/plan-fix/SKILL.md +0 -161
- package/skills/plan-fix/references/PLANNING_PROCESS.md +0 -148
- package/skills/plan-fix/references/SPEC_CONTRACT.md +0 -22
- package/skills/planning-preflight/SKILL.md +0 -130
- package/skills/replan-findings/SKILL.md +0 -131
- package/skills/replan-findings/references/PHASE_APPEND.md +0 -89
- package/skills/review-plan/SKILL.md +0 -154
- package/skills/review-plan/references/CHECKS.md +0 -111
- package/skills/review-plan/references/ENG-CHECKS.md +0 -30
- package/skills/review-plan/references/OUTPUT.md +0 -166
- package/skills/review-spec/SKILL.md +0 -145
- package/skills/review-spec/references/CHECKS.md +0 -108
- package/skills/review-spec/references/OUTPUT.md +0 -160
- package/skills/ship-roadmap/SKILL.md +0 -120
- package/skills/ship-roadmap/references/ADVANCE.md +0 -117
- package/skills/ship-roadmap/references/AUDIT_AND_MERGE.md +0 -64
- package/skills/ship-roadmap/references/CLOSEOUT_AND_LOG.md +0 -27
- package/skills/ship-roadmap/references/FOUNDING.md +0 -101
- package/skills/ship-roadmap/references/GUARDRAILS.md +0 -56
- package/skills/ship-roadmap/references/MODEL_ROUTING.md +0 -16
- package/skills/ship-roadmap/references/PORTABILITY.md +0 -34
- package/skills/ship-roadmap/references/RECOVERY_AND_SELECTION.md +0 -94
- package/skills/ship-roadmap/references/STOP_CONDITIONS.md +0 -9
- package/skills/ship-roadmap/references/TERMINAL_REPORT.md +0 -34
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
## Snapshot, prompt, and Product checks
|
|
2
|
-
|
|
3
|
-
Run in this order: build the snapshot, then falsify, then check. Nothing below
|
|
4
|
-
writes to the reviewed artifact.
|
|
5
|
-
|
|
6
|
-
### 1. Build the snapshot (exact bytes, one revision)
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
git rev-parse HEAD # sourceRevision — one value for the whole review
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Construct `PreExecutionArtifactSnapshot v1` (`agentic-workflow/
|
|
13
|
-
pre-execution-artifact-snapshot@1`) over the bytes just read. The authoritative
|
|
14
|
-
validator is `@gtrabanco/agentic-workflow-schema`'s
|
|
15
|
-
`validatePreExecutionArtifactSnapshotV1`; the generated JSON Schema is a
|
|
16
|
-
structural projection, never the authority. Where that package is unavailable,
|
|
17
|
-
record the same fields by hand and state `validated: manual` in the receipt note.
|
|
18
|
-
|
|
19
|
-
A SPEC-stage snapshot is deliberately narrow:
|
|
20
|
-
|
|
21
|
-
| Field | Value for this stage |
|
|
22
|
-
|---|---|
|
|
23
|
-
| `stage` | `spec` |
|
|
24
|
-
| `unitKind` | `feature` (a `fix` unit is refused here — no Product half) |
|
|
25
|
-
| `unitId` | the roadmap unit id, e.g. `28-evidence-grounded-spec-plan-review` |
|
|
26
|
-
| `sourceRevision` | the exact revision read above |
|
|
27
|
-
| `artifactRevisionId` | the author's current revision id from the handoff |
|
|
28
|
-
| `artifacts` | **exactly one row**: `kind: spec`, `path` normalized repo-relative, `selector: spec-product-v1`, `byteLength`, lowercase SHA-256 `digest` |
|
|
29
|
-
| `parentSpecSnapshotDigest` | `null` — a SPEC snapshot roots its own lineage |
|
|
30
|
-
| `contexts` | each authoritative source actually consulted: `governing-issue`, `normalized-repository-state`, `architectural-invariants`, `dependency-unit`, `project-guide` — `present` with its exact digest, or `absent` with `null`. The roadmap row is read as routing data and deliberately unbound: the shared `ROADMAP.md` ledger moves for reasons this unit never reviewed (other units' rows, the status machine's own sanctioned writes) |
|
|
31
|
-
|
|
32
|
-
`spec-product-v1` selects the title, `## Goal`, `## Branch`, `## Size`,
|
|
33
|
-
`## Dependencies`, the whole Product half, and `## Design status` — never the
|
|
34
|
-
empty or future Engineering half, so planning writes cannot invalidate this
|
|
35
|
-
review by themselves. Contexts are all-or-nothing on purpose: "I did not look"
|
|
36
|
-
is not representable, so an unread authority must appear as `absent` and is then
|
|
37
|
-
visible to whoever reads the receipt.
|
|
38
|
-
|
|
39
|
-
Ordering is normative, not cosmetic: artifact rows sort by UTF-8 path bytes,
|
|
40
|
-
context rows by `kind` then `identifier`, and each `(kind, identifier)` context
|
|
41
|
-
appears once. Duplicate kinds, out-of-order rows, or extra artifact rows are
|
|
42
|
-
contract failures, not style.
|
|
43
|
-
|
|
44
|
-
Then build the snapshot with the recipe owner —
|
|
45
|
-
`pre-execution-review`'s [`SKILL.md`](<../../pre-execution-review/SKILL.md>) →
|
|
46
|
-
SNAPSHOT reference: `bun scripts/pre-execution-snapshot.mjs build --stage spec
|
|
47
|
-
--unit <unitId>` (canonical serializer: sorted keys, context rows ordered by kind
|
|
48
|
-
then identifier, UTF-8, lowercase SHA-256). The digest is stdout's first line, so
|
|
49
|
-
this recipe writes no file; `--json` is in-repository only. Paste the digest it
|
|
50
|
-
prints. Every verdict below is bound to that digest, and a refused build
|
|
51
|
-
(partial binding) ends this turn in the refusal form [`OUTPUT.md`](OUTPUT.md) fixes —
|
|
52
|
-
`Snapshot: refused` beside the builder's own code, never a hand-computed substitute.
|
|
53
|
-
|
|
54
|
-
### 2. Clean-context falsification prompt
|
|
55
|
-
|
|
56
|
-
Read the snapshot's Product bytes as if the document were adversarial, then
|
|
57
|
-
answer, in writing, before checking anything:
|
|
58
|
-
|
|
59
|
-
```text
|
|
60
|
-
FALSIFICATION — <unitId> @ <sourceRevision short>
|
|
61
|
-
- Name 3 specific product decisions in this half that a hostile reader could
|
|
62
|
-
call invented rather than recorded: <section/row pointers or "none found">
|
|
63
|
-
- Name the user outcome the SPEC promises that has no observable check: <row>
|
|
64
|
-
- Name one role the matrix leaves unspecified for a capability it does list:
|
|
65
|
-
<row or "none">
|
|
66
|
-
- What would have to be true in the repository for this half to be wrong, and is
|
|
67
|
-
it true? <evidence pointer>
|
|
68
|
-
- Verdict stance before checking: <CONFIRMED-GAPS | NO-CONFIRMED-GAPS>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
The point is to try to break the document, not to summarize it. A gap this pass
|
|
72
|
-
confirms is a finding; a suspicion it cannot evidence is not.
|
|
73
|
-
|
|
74
|
-
### 3. Product checks (fixed list — one row each, in order)
|
|
75
|
-
|
|
76
|
-
| # | Check | PASS only if |
|
|
77
|
-
|---|---|---|
|
|
78
|
-
| C1 | Outcome ownership | the user outcome each in-scope item produces is stated and observable, not "improve X" |
|
|
79
|
-
| C2 | Actors and roles | every actor that can trigger or be affected is named, and the role matrix covers every inventory role per capability with no unlisted role |
|
|
80
|
-
| C3 | Entity closure | every entity introduced or touched resolves CRUD + state transitions to UI/API/test or an explicit `n/a: <reason>`; zero blank rows |
|
|
81
|
-
| C4 | Limits and failure states | size/failure/empty/concurrency limits are stated or explicitly out of scope; each named failure state has a resolution |
|
|
82
|
-
| C5 | Scope and non-goals | every out-of-scope bullet names an owner or a non-goal; nothing is excluded by silence |
|
|
83
|
-
| C6 | Integration closure | one resolved row per subsystem of the derived capability inventory; none skipped; the inventory is recorded when `docs/CAPABILITIES.md` is absent |
|
|
84
|
-
| C7 | Expectation sweep | ≥ 10 rows (M/L) / ≥ 5 (XS/S), each forced to in-scope/out-of-scope/deferred with a pointer |
|
|
85
|
-
| C8 | Acceptance objectivity | every criterion is objective and labelled command-verified or read-verified, and every in-scope bullet maps to ≥ 1 criterion |
|
|
86
|
-
| C9 | Internal contradiction | no two sections of the half assert incompatible behaviour, counts, or ownership |
|
|
87
|
-
| C10 | Repository contradiction | the half's claims about existing surfaces match what is in the repository now (cited `path:line`, roadmap row, or frozen ledger fact) |
|
|
88
|
-
| C11 | Evidence integrity | material claims resolve to `proven`/`decision` rows that are `current`; every `unknown` names an owner and next evidence; no `drifted`/`stale` row survives |
|
|
89
|
-
| C12 | Open product choices | `Deferred decisions` is `none`, or each open item is genuinely product-owned and flagged for the human |
|
|
90
|
-
| C13 | Engineering leakage | the Product half pre-fills no architecture, phases, tasks, or validators (that is the Plan stage's authority) |
|
|
91
|
-
| C14 | Obligation containment | no current-unit obligation is exported to a future issue or "later" — the unit's own scope carries it |
|
|
92
|
-
|
|
93
|
-
Every row gets exactly one result: `pass`, `finding`, or `n/a: <reason>`. `n/a`
|
|
94
|
-
requires a reason that does not contradict scope (an accessibility row is `n/a`
|
|
95
|
-
when no UI exists; "skipped because large" is not `n/a`).
|
|
96
|
-
|
|
97
|
-
### 4. Assemble findings
|
|
98
|
-
|
|
99
|
-
Each finding is one row of the receipt's `findings` array: stable `id`,
|
|
100
|
-
`severity` (`info | low | medium | high | critical`), `class` (`product | plan |
|
|
101
|
-
source | environment | runtime`), `claim` (what is wrong, with the section
|
|
102
|
-
pointer), `evidenceRefs` (≥ 1 — a finding without evidence is a hunch and gets
|
|
103
|
-
dropped), `verification` (`verified | unverified`), `resolution` (`open` on
|
|
104
|
-
emission). Material = `medium` and above; a `low` row is a persisted report-note
|
|
105
|
-
the stage author resolves without a re-review, and `info` is immaterial.
|
|
106
|
-
Deflating a real defect below the `medium` minimum to unblock a pass is itself a
|
|
107
|
-
finding; a `PASS` may not carry an open or
|
|
108
|
-
unverified material row.
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
## Verdicts, receipt, and routes
|
|
2
|
-
|
|
3
|
-
### Persist the receipt first, then report
|
|
4
|
-
|
|
5
|
-
Append the receipt to the unit's `docs/features/<NN>-<slug>/progress.md` **and
|
|
6
|
-
each finding row to the unit's `planning-findings.md`** with
|
|
7
|
-
`stage: spec` (ledger contract: `pre-execution-review/references/LEDGERS.md`);
|
|
8
|
-
create the file from that contract when the unit has none. A findings ledger the
|
|
9
|
-
reviewer cannot write is not a ledger. Any later write to a reviewed artifact
|
|
10
|
-
rotates `artifactRevisionId` and makes this receipt stale — that is the contract
|
|
11
|
-
working, not a mistake. When a missing or stale receipt is the reason for re-entry,
|
|
12
|
-
the re-entry command is the **emitted** `next.continuation` (`rendering` for display):
|
|
13
|
-
quote it, never author exact command tokens.
|
|
14
|
-
|
|
15
|
-
One `PreExecutionReviewReceipt v1`
|
|
16
|
-
(`agentic-workflow/pre-execution-review-receipt@1`) per review, in a fenced block:
|
|
17
|
-
|
|
18
|
-
```text
|
|
19
|
-
## Pre-execution review receipt v1 — spec
|
|
20
|
-
- Review: <receipt-id> · Snapshot: <64-hex|refused> · Verdict: <spec-review-pass|spec-review-fail|needs-design>
|
|
21
|
-
- Unit: <unitId> · Stage: spec · Unit kind: <feature|fix> · Parent: null
|
|
22
|
-
- Source revision: <40-hex> · Artifact revision: <artifactRevisionId>
|
|
23
|
-
- Reviewer: <id> · Session: <id> · Role: reviewer · Author: <id>
|
|
24
|
-
- Author exclusion: <enforced|not-enforceable> · Context clean: <true|false>
|
|
25
|
-
- Model diversity: <same-model|cross-model|not-applicable> · Policy: <policyVersion>
|
|
26
|
-
- Started/finished: <UTC>/<UTC> · Findings: <n> (material open: <n>)
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Fields the runtime can enforce but a manual review must still state:
|
|
30
|
-
`contextClean`, `authorExclusion`, `modelDiversity`. If context cleanliness is
|
|
31
|
-
false or the reviewer identity equals the author's under an enforced exclusion,
|
|
32
|
-
a PASS is not emit-able — return `SPEC-REVIEW-FAIL` and name the reason.
|
|
33
|
-
|
|
34
|
-
A `Snapshot:` line carries the digest the builder printed, or the one form a refused
|
|
35
|
-
build may take — `refused`, with the builder's own code beside it, never a value
|
|
36
|
-
computed here instead:
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
- Snapshot: refused · Build: refused (<the reason code the builder printed>)
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Write that pair in place of the `Snapshot:` line, end the turn with this stage's FAIL
|
|
43
|
-
verdict, and file one finding row per refused artifact carrying its code verbatim: the
|
|
44
|
-
checks bind to a snapshot, so with no snapshot none of them ran. `SNAPSHOT.md` owns why
|
|
45
|
-
a refusal prints no digest and what a consumer then reads this receipt as.
|
|
46
|
-
|
|
47
|
-
**Self-check (`verify --stage spec …`, POLICY §8).** In the same act as appending the
|
|
48
|
-
receipt, run the recipe owner's re-verify for this stage and paste the sensor's JSON
|
|
49
|
-
answer beside the verdict block before reporting:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
bun scripts/pre-execution-snapshot.mjs verify --stage spec --unit <NN-slug> --dir docs/features/<NN>-<slug> --unit-kind <feature|fix>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
A digest-bound receipt requires `structural.fresh: true` (and, for a PASS verdict,
|
|
56
|
-
`current: true`); `exit 3` (`missing-receipt-snapshot`) or a digest-bound
|
|
57
|
-
`structural.fresh: false` means the mark did not land — fix the write and re-run, the
|
|
58
|
-
verdict is not emit-able in this turn. A `Snapshot: refused` receipt's
|
|
59
|
-
`missing-receipt-snapshot` answer is its sanctioned form. A verdict block printed
|
|
60
|
-
without the pasted self-check output is a contract defect — chat-only is
|
|
61
|
-
`missing-receipt-snapshot` to every consumer.
|
|
62
|
-
|
|
63
|
-
### Verdict blocks — return exactly one
|
|
64
|
-
|
|
65
|
-
```text
|
|
66
|
-
SPEC-REVIEW-PASS — <NN-slug>
|
|
67
|
-
- Snapshot: <digest> · Artifact revision: <artifactRevisionId> · Checks: 14/14
|
|
68
|
-
- Material findings open: 0 · Read-only: no reviewed artifact modified
|
|
69
|
-
- Authority: planning may bind this receipt as its Product parent
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
```text
|
|
73
|
-
SPEC-REVIEW-FAIL — <NN-slug> BLOCKED
|
|
74
|
-
- Snapshot: <digest> · Artifact revision: <artifactRevisionId>
|
|
75
|
-
- Failed checks: <Cnn, …>
|
|
76
|
-
- Findings (unioned, one row each):
|
|
77
|
-
| id | severity | class | check | claim | evidence | verification |
|
|
78
|
-
- Repair owner: `design-feature <NN-slug>` — one batch over this whole set
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
NEEDS-DESIGN — <NN-slug>
|
|
83
|
-
- Snapshot: <digest> · Blocking rows: <Cnn / decision id>
|
|
84
|
-
- Missing product choice (product authority only): <one bounded question>
|
|
85
|
-
- Recommended default: <the smallest coherent answer>
|
|
86
|
-
- Downstream: any Plan evidence bound to this unit is now invalid and must be
|
|
87
|
-
re-reviewed after the answer lands
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
`NEEDS-DESIGN` when the answer requires inventing product intent, scope, role,
|
|
91
|
-
authority, or user outcome; `SPEC-REVIEW-FAIL` when the half is decidable but
|
|
92
|
-
incomplete, contradictory, or unsupported. Never blend them, and never emit a
|
|
93
|
-
fourth verdict.
|
|
94
|
-
|
|
95
|
-
### Routes
|
|
96
|
-
|
|
97
|
-
**Resolution map — the finding's `class` cell names its resolver, and only that
|
|
98
|
-
resolver:** class `product` → `design-feature` (then `/review-spec` re-judges the
|
|
99
|
-
new revision) · class `plan` → `plan-feature` / `plan-fix` re-cuts the plan (then
|
|
100
|
-
`/review-plan` re-judges) · class `source` | `environment` | `runtime` → the
|
|
101
|
-
executor's fold path (`/fold-findings`, then re-run `/review-change`).
|
|
102
|
-
**`fold-findings` never repairs a planning artifact**, and a planning finding is
|
|
103
|
-
never resolved by patching the artifact during review — folding repairs source,
|
|
104
|
-
not authority.
|
|
105
|
-
|
|
106
|
-
| Verdict | Who repairs | What happens next |
|
|
107
|
-
|---|---|---|
|
|
108
|
-
| `SPEC-REVIEW-PASS` | nobody | `/plan-feature <NN-slug>` binds this receipt + exact snapshot digest |
|
|
109
|
-
| `SPEC-REVIEW-FAIL` | `design-feature` (the author) | one root-caused repair batch → new revision → next cycle (default re-review; a recorded wording-only batch skips it) |
|
|
110
|
-
| `NEEDS-DESIGN` | the human, through `design-feature` | dated `## Amendments`/`Product decisions` entry → new revision → next cycle |
|
|
111
|
-
|
|
112
|
-
A finding whose `class` is `plan`, `source`, `environment`, or `runtime` does not
|
|
113
|
-
become work here: record it, keep it open, and route it to its owner (`review-plan`
|
|
114
|
-
for plan defects, the executor for source defects). This skill repairs nothing and
|
|
115
|
-
schedules nothing.
|
|
116
|
-
|
|
117
|
-
Repeating this review follows the no-progress and convergence rules in
|
|
118
|
-
`pre-execution-review/references/POLICY.md` §4: a repeat needs a
|
|
119
|
-
changed snapshot or a named falsifiable question plus a new evidence route, and
|
|
120
|
-
a second consecutive repair/re-review cycle prints `CONVERGENCE-ANOMALY` before
|
|
121
|
-
any further edit. A third cycle never starts without explicit user instruction:
|
|
122
|
-
the orchestrator's `stop-review-loop-cap` refusal stops the invocation and names
|
|
123
|
-
`design-feature` as the human route, and a PASS resets the count. A
|
|
124
|
-
`design-feature` repair turn re-reads the union of open findings
|
|
125
|
-
from `planning-findings.md`, not just the newest receipt, so nothing recorded here
|
|
126
|
-
is ever lost between cycles.
|
|
127
|
-
|
|
128
|
-
### Skill-specific turn-contract boxes
|
|
129
|
-
|
|
130
|
-
```text
|
|
131
|
-
✓ Snapshot digest computed from one revision and pasted; no mixed-revision bytes
|
|
132
|
-
✓ All 14 Product checks resolved to pass / finding / n/a with a reason
|
|
133
|
-
✓ One verdict block returned verbatim from the closed set
|
|
134
|
-
✓ RUN `verify --stage spec` for this stage in-turn, JSON pasted beside the block;
|
|
135
|
-
`structural.fresh: true` (+ `current: true` on PASS) — `exit 3`/`structural.fresh: false` means
|
|
136
|
-
the mark did not land, fix and re-run, verdict not emit-able; `exit 4`/`current: false` means
|
|
137
|
-
a verdict persisted but not a PASS — the verdict itself is the emit result, route per verdict
|
|
138
|
-
✓ `git status --porcelain` shows no change to any reviewed artifact
|
|
139
|
-
✓ Closing `→ Next:` printed as the absolute last output
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Closing recommendation
|
|
143
|
-
|
|
144
|
-
On PASS:
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
→ Next: /plan-feature <NN-slug> — Product half reviewed; the plan binds this receipt
|
|
148
|
-
· design changed underneath → re-run /review-spec <NN-slug> first
|
|
149
|
-
· recurring closure gaps across units → /product-audit (a systemic pattern, not one SPEC)
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
On FAIL or NEEDS-DESIGN, name every finding id once, in order, joined with ` + `:
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
→ Next: /design-feature <NN-slug> "<instruction>" — one repair batch for F1 + F2 + F4,
|
|
156
|
-
then /review-spec <NN-slug> judges the new artifact revision
|
|
157
|
-
· a third cycle → explicit user instruction first; the decider refuses it (`stop-review-loop-cap`) and names design-feature
|
|
158
|
-
· a product choice is missing → answer it in the instruction; nothing here chooses for you
|
|
159
|
-
· finding class is plan/source/environment/runtime → route to its owner, do not edit the SPEC
|
|
160
|
-
```
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ship-roadmap
|
|
3
|
-
user-invocable: true
|
|
4
|
-
version: 5.2.2
|
|
5
|
-
author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
|
|
6
|
-
license: MIT
|
|
7
|
-
argument-hint: "[--fullauto] | --continue [--fullauto]"
|
|
8
|
-
description: >
|
|
9
|
-
Found or continue a roadmap autopilot one stage per invocation. Default:
|
|
10
|
-
human merge. --fullauto is invocation-scoped and uses the transient wrapper
|
|
11
|
-
only after a fresh audit. Triggers: "ship-roadmap", "ship the roadmap",
|
|
12
|
-
"autopilot this project".
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Ship the roadmap (autopilot)
|
|
16
|
-
|
|
17
|
-
Found once, then run the driver-fired loop (Claude `/loop`, external driver, or
|
|
18
|
-
manual re-invocation): plan, implement, review, open and optionally merge one PR
|
|
19
|
-
per roadmap unit. After the roadmap, sweep existing issues, ship fix-now work,
|
|
20
|
-
report residue as proposals (never create backlog automatically), and print the
|
|
21
|
-
final report. Use strong tiers for judgment, cheap tiers for typing, and humans
|
|
22
|
-
at expensive-to-undo decisions.
|
|
23
|
-
|
|
24
|
-
`ship-roadmap` is the conductor of the loop. It emits its native fixed `SHIP:`
|
|
25
|
-
banner and closing `→ Next:` block; the package-owned machine-result profiles
|
|
26
|
-
apply to the worker and sensor skills that a driver invokes inside the loop.
|
|
27
|
-
|
|
28
|
-
## Turn contract — verify before ending the turn
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
✓ Exactly ONE stage advanced (or a terminal banner printed) and ONE line appended to the run log
|
|
32
|
-
✓ Nothing was merged outside the active --fullauto wrapper; direct merge
|
|
33
|
-
commands remained blocked and no authorization survived the iteration
|
|
34
|
-
✓ 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
|
|
35
|
-
✓ The closing `→ Next:` block is printed as the ABSOLUTE last output
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Any unchecked box means the turn is not done.
|
|
39
|
-
|
|
40
|
-
## When to use
|
|
41
|
-
|
|
42
|
-
Use for a locked roadmap with supervision at merge/end points. For one feature,
|
|
43
|
-
one bug, or exploratory work use the manual planning/execution flow instead.
|
|
44
|
-
|
|
45
|
-
## Step 0 — Discover the project (always first)
|
|
46
|
-
|
|
47
|
-
Read before acting: `CLAUDE.md`/`AGENTS.md` Workflow conventions, documentation
|
|
48
|
-
map, `docs/features/ROADMAP.md`, fix index, architecture doc, and `.github/`
|
|
49
|
-
templates. Then establish:
|
|
50
|
-
|
|
51
|
-
1. **Substrate:** if the guide, map, roadmap and fix index exist, skip founding
|
|
52
|
-
and confirm their answers; otherwise founding creates missing pieces.
|
|
53
|
-
2. **Skills:** verify `plan-feature`, `execute-phase`, `review-change`, and
|
|
54
|
-
`audit-pr` are installed and record their directory for worker prompts. If
|
|
55
|
-
absent, stop with `npx skills add gtrabanco/agentic-workflow`. With
|
|
56
|
-
`--fullauto`, also require executable `.agentic-workflow/hooks/fullauto-merge.sh`
|
|
57
|
-
and its platform guard; otherwise route to `init-workspace`, never direct merge.
|
|
58
|
-
3. **Run:** existing `docs/features/SHIP_DECISIONS.md` or an open
|
|
59
|
-
`docs/ship-founding` PR means resume with `--continue`; bare invocation reports
|
|
60
|
-
status instead of founding again.
|
|
61
|
-
4. **Shape:** greenfield/existing, branch, and dirty tree; unexplained dirty
|
|
62
|
-
default branch stops (never clean it silently).
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## Progressive loading — select the invocation route
|
|
66
|
-
|
|
67
|
-
The allowlist is exactly the linked paths below. Never invent another reference.
|
|
68
|
-
Every route starts with [guardrails](references/GUARDRAILS.md), then loads only
|
|
69
|
-
its matching row:
|
|
70
|
-
|
|
71
|
-
**Hard rule for `--continue` at AUDIT:** LOAD exactly, in this order,
|
|
72
|
-
`references/GUARDRAILS.md`, `references/RECOVERY_AND_SELECTION.md`,
|
|
73
|
-
`references/STOP_CONDITIONS.md`, `references/ADVANCE.md`,
|
|
74
|
-
`references/MODEL_ROUTING.md`, and
|
|
75
|
-
`references/AUDIT_AND_MERGE.md`; after the stage, load
|
|
76
|
-
`references/CLOSEOUT_AND_LOG.md`. When the run is not terminal and all named
|
|
77
|
-
primitives exist, every other reference is forbidden for that turn.
|
|
78
|
-
|
|
79
|
-
| Condition now | LOAD complete route in this order | SKIP now |
|
|
80
|
-
|---|---|---|
|
|
81
|
-
| Found or inspect a run, no `--continue` (default mode or greenfield `--fullauto`) | [guardrails](references/GUARDRAILS.md) → [founding](references/FOUNDING.md) | recovery, stop conditions, advance, model routing, audit/merge, terminal report, portability |
|
|
82
|
-
| Existing-repo founding with `--fullauto` | [guardrails](references/GUARDRAILS.md) → [founding](references/FOUNDING.md) → [audit and merge policy](references/AUDIT_AND_MERGE.md) | recovery, stop conditions, advance, model routing, terminal report, portability |
|
|
83
|
-
| Continue one non-AUDIT iteration | [guardrails](references/GUARDRAILS.md) → [recovery and selection](references/RECOVERY_AND_SELECTION.md) → [stop conditions](references/STOP_CONDITIONS.md) → [advance](references/ADVANCE.md) → [model routing](references/MODEL_ROUTING.md) before stage execution → [closeout and log](references/CLOSEOUT_AND_LOG.md) after it | founding, audit/merge, terminal report, portability |
|
|
84
|
-
| Continue an AUDIT/fullauto iteration | [guardrails](references/GUARDRAILS.md) → [recovery and selection](references/RECOVERY_AND_SELECTION.md) → [stop conditions](references/STOP_CONDITIONS.md) → [advance](references/ADVANCE.md) → [model routing](references/MODEL_ROUTING.md) → [audit and merge policy](references/AUDIT_AND_MERGE.md) before the AUDIT stage → [closeout and log](references/CLOSEOUT_AND_LOG.md) after it | founding, terminal report, portability |
|
|
85
|
-
| Terminal stop/report | the active row above, then [terminal report](references/TERMINAL_REPORT.md) | unrelated rows |
|
|
86
|
-
| A named platform primitive is absent | the active row above, then [portability](references/PORTABILITY.md) | unrelated rows |
|
|
87
|
-
|
|
88
|
-
Do not load terminal reporting before terminal state or portability when all
|
|
89
|
-
primitives exist. Model routing precedes every stage; audit/merge precedes every
|
|
90
|
-
AUDIT stage, including non-`--fullauto` runs.
|
|
91
|
-
|
|
92
|
-
Selected resources are one hop from this file. Fixed banners, transitions, floor
|
|
93
|
-
checks and output blocks are normative; an unreadable required resource stops the
|
|
94
|
-
run—never improvise from an older run.
|
|
95
|
-
|
|
96
|
-
## Portability
|
|
97
|
-
|
|
98
|
-
The workflow is driver-neutral. Use the exact [portability](references/PORTABILITY.md)
|
|
99
|
-
fallback only when a primitive is unavailable; keep stage order and safety floors.
|
|
100
|
-
|
|
101
|
-
## Relationship to other skills
|
|
102
|
-
|
|
103
|
-
| Relation | Skills/policy |
|
|
104
|
-
|---|---|
|
|
105
|
-
| Compose (same/lower tier) | `init-workspace`; JIT `design-feature` + `plan-feature-scaffold`; `plan-feature`; the review→fold manual path (`/review-change` → `/fold-findings` on `REVIEW-FAIL` → re-run `/review-change`); verdict-only `audit-pr`; `audit-docs`. |
|
|
106
|
-
| Cheap workers | `execute-phase` (fresh context/phase), mechanical folds, audit-blocker fixes; use the validated worker model. |
|
|
107
|
-
| Human hand-off | Default merges, `product-audit` (higher effort), and report issue batches via `triage-issue`. |
|
|
108
|
-
| Sibling | `workflow-status` supplies the strict sensor result; worker skills use the package-owned output profiles, while the conductor keeps its native `SHIP:` turn contract. |
|
|
109
|
-
|
|
110
|
-
Manual feature-by-feature flow remains the default; this skill packages it with
|
|
111
|
-
the human at its edges.
|
|
112
|
-
|
|
113
|
-
## Done when
|
|
114
|
-
|
|
115
|
-
- A terminal banner and final report exist with an open PR; roadmap statuses are
|
|
116
|
-
true; every PR is merged, open/audited, or parked with a reason. `SHIP: COMPLETE`
|
|
117
|
-
also accounts for the issue sweep and reports residue as proposals.
|
|
118
|
-
- Locked answers, iteration evidence, outcomes and recommendations are traceable
|
|
119
|
-
in `SHIP_DECISIONS.md`, the run log and report; the report states exact next
|
|
120
|
-
human actions (merges, triage, proposals, product-audit timing).
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
## Advance exactly one stage
|
|
2
|
-
|
|
3
|
-
4. **ADVANCE exactly one stage:**
|
|
4
|
-
- **DESIGN (mid-run `idea`/`defined` unit only)** — compose `design-feature`
|
|
5
|
-
in-turn (equal tier, opus/high — within the ≥ rule already stated for
|
|
6
|
-
founding), **deriving the product half strictly from the locked
|
|
7
|
-
`SHIP_DECISIONS.md` record — no new questions, ever** (the "no further
|
|
8
|
-
questions after the interview" contract this skill already enforces for
|
|
9
|
-
every other stage applies here identically). Walk capability closure
|
|
10
|
-
from what rounds 2–4 already answered for this feature; stamp `## Design
|
|
11
|
-
status: designed` and promote the roadmap row `idea → defined` on
|
|
12
|
-
success. Then compose `plan-feature-scaffold` in the same iteration to
|
|
13
|
-
promote `defined → planned` (both writes are the same JIT pass — a
|
|
14
|
-
feature never sits mid-promotion between iterations). **Undesignable
|
|
15
|
-
from the locked record** (the feature as scoped contradicts a locked
|
|
16
|
-
decision, or needs an answer rounds 2–4 never covered) → do **not**
|
|
17
|
-
guess and do **not** ask: emit `NEEDS_INPUT`, **park the unit** with the
|
|
18
|
-
specific gap recorded (mirrors a red-gate park — see Stop conditions),
|
|
19
|
-
and SELECT continues with the next startable unit this same run (or ends
|
|
20
|
-
the iteration per the capacity guard if none remain). A parked
|
|
21
|
-
undesignable unit is picked back up only by a human answering the
|
|
22
|
-
recorded question and re-running `/design-feature <slug> "<answer>"`
|
|
23
|
-
directly — the autopilot never re-asks it.
|
|
24
|
-
- **REVIEW-SPEC** (only between DESIGN and PLAN) — compose `review-spec` in a
|
|
25
|
-
clean context at the routed tier (opus/high), never in the turn that wrote the
|
|
26
|
-
product half. `SPEC-REVIEW-PASS` releases the unit into PLAN. A FAIL whose
|
|
27
|
-
findings are common-root-cause or wording-only returns to the same unit's
|
|
28
|
-
author for one root-caused repair batch, then a fresh review. `NEEDS-DESIGN`
|
|
29
|
-
means a product choice is open that this run's locked record cannot answer:
|
|
30
|
-
**park the unit** with the exact question (`NEEDS_INPUT`, same shape as the
|
|
31
|
-
undesignable park above) — the autopilot never answers a product question
|
|
32
|
-
itself, and `SELECT` continues with the next startable unit.
|
|
33
|
-
- **PLAN** — compose `plan-feature` in-turn via its scoped path (equal
|
|
34
|
-
tier). Every unit reaching PLAN holds a current `SPEC-REVIEW-PASS` (REVIEW-SPEC
|
|
35
|
-
ran first, or the unit was already planned before this gate existed and its
|
|
36
|
-
own Product receipt is current), so `plan-feature`'s PRODUCT-REVIEW gate passes
|
|
37
|
-
here. The interview path is **forbidden** mid-run:
|
|
38
|
-
SPEC gaps are resolved silently from the decision record and logged. JIT
|
|
39
|
-
planning that reveals the feature's premise is wrong (obsolete, absorbed,
|
|
40
|
-
impossible on this stack) → mark it blocked with the contradiction
|
|
41
|
-
recorded; never re-ask.
|
|
42
|
-
- **REVIEW-PLAN** (only between PLAN and EXECUTE) — compose `review-plan` in a
|
|
43
|
-
clean context at the routed tier over the plan the previous stage just froze.
|
|
44
|
-
`PLAN-REVIEW-PASS` releases EXECUTE. A FAIL routes by root cause: plan-local
|
|
45
|
-
(bad phase cut, blank validator, ledger drift) → root-caused re-cut by the
|
|
46
|
-
planning author and a review; product-rooted or an assumption this record
|
|
47
|
-
cannot settle → PLAN-REVIEW-FAIL with class: product → design-feature. A second local cycle
|
|
48
|
-
that changes nothing stops editing and reports `CONVERGENCE-ANOMALY` instead of
|
|
49
|
-
burning a third budget. **No stage between PLAN and EXECUTE may create a forge
|
|
50
|
-
issue or defer an obligation to one** — an unmet obligation fails this stage, it
|
|
51
|
-
is never exported.
|
|
52
|
-
- **EXECUTE** — run each unfinished **implementation phase** in a **fresh cheap-tier context**: on Claude
|
|
53
|
-
Code, spawn one subagent per phase with `model: sonnet` (the override is
|
|
54
|
-
the only mechanism that runs *below* the conductor's turn tier); on an
|
|
55
|
-
agent without subagents, the equivalent is one headless invocation per
|
|
56
|
-
phase driven from outside (see `docs/workflow/ORCHESTRATION.md`), or —
|
|
57
|
-
last resort — executing the phase in THIS turn while noting in the run
|
|
58
|
-
log that it ran at the conductor's tier. Whatever the mechanism, the
|
|
59
|
-
phase executor is instructed to read the **installed `execute-phase`
|
|
60
|
-
SKILL.md first** (at the skills directory
|
|
61
|
-
located in Step 0 and recorded in the decision record — e.g.
|
|
62
|
-
`.claude/skills/execute-phase/SKILL.md` in Claude Code) and follow it for
|
|
63
|
-
exactly one explicit phase: tests-first where it
|
|
64
|
-
applies, gate green, one commit, per-phase docs. Two autopilot overrides
|
|
65
|
-
to its recipe: (a) **never ask** — SPEC ambiguity is resolved from the
|
|
66
|
-
committed decision record with the most conservative reading, and the
|
|
67
|
-
assumption is surfaced in the phase docs so the conductor logs it;
|
|
68
|
-
(b) the **P1 planning commit also carries `ROADMAP.md`** (the feature's
|
|
69
|
-
`in-progress` flip rides it; the **`done` flip rides the PR-stage commit**
|
|
70
|
-
when the PR opens; any flips left at run end ride the report commit).
|
|
71
|
-
Stop before the literal final `Hardening & PR` phase: PR owns that explicit
|
|
72
|
-
phase so close-out has one owner. Never bundle phases into one worker.
|
|
73
|
-
- **REVIEW** — compose the review→fold path (equal tier) once: `/review-change`, then `/fold-findings` (on `REVIEW-FAIL`), then re-run `/review-change`. It reuses a current exact-SHA receipt or runs `review-change`
|
|
74
|
-
context-clean, batches compatible fixes through `fold-findings`, and
|
|
75
|
-
re-reviews only changed HEADs. Default correction budget is two; unchanged
|
|
76
|
-
evidence stops NO-PROGRESS. L/sensitive features
|
|
77
|
-
forward `--adversarial 2` (security/auth: `3`) as the unattended floor;
|
|
78
|
-
other units use one final reviewer. There are no intermediate phase
|
|
79
|
-
reviews in autopilot: phase gates + frozen acceptance guard execution,
|
|
80
|
-
and the independent final loop judges one complete candidate. Independent
|
|
81
|
-
future work remains proposals; no review/fold stage creates issues.
|
|
82
|
-
- **PR** — run the unit's explicit final `Hardening & PR` phase through one
|
|
83
|
-
fresh cheap-tier `execute-phase` worker. That canonical close-out flips the
|
|
84
|
-
feature to `done` (built, not merged), pushes, creates the PR with `Closes
|
|
85
|
-
#N` where issue-born, prints its URL, links it from the roadmap, commits the
|
|
86
|
-
link, and pushes. Reconcile an already-open matching PR idempotently; never
|
|
87
|
-
create a second one. The stage is incomplete until the row carries its PR
|
|
88
|
-
link and the branch is clean/current.
|
|
89
|
-
- **AUDIT** — compose `audit-pr` in-turn (equal tier); bind the verdict to
|
|
90
|
-
the PR's head SHA in the run log, and **print the PR's full URL next to
|
|
91
|
-
the verdict in the iteration output** (the human merging works from the
|
|
92
|
-
chat, not from a CI monitor). MERGE-READY → default mode logs and
|
|
93
|
-
moves on; `--fullauto` treats `audit-pr` as verdict/comment-only, checks
|
|
94
|
-
the floors, **records the merge intent in the run log first**, then calls
|
|
95
|
-
`.agentic-workflow/hooks/fullauto-merge.sh` with only the PR number and
|
|
96
|
-
run id. The wrapper derives and verifies head, base, decision, and audit
|
|
97
|
-
evidence from the forge. Never invoke `gh pr merge` directly.
|
|
98
|
-
BLOCKED → in-scope blockers go to a
|
|
99
|
-
cheap-tier worker next iteration (max 2 audit cycles, then the feature is
|
|
100
|
-
parked and the loop moves on); the fixer's cycle ends committed AND
|
|
101
|
-
pushed (step 5), so the re-audit judges the real branch.
|
|
102
|
-
|
|
103
|
-
Fix units take the same pair in miniature: **plan-fix → REVIEW-PLAN → EXECUTE
|
|
104
|
-
(`--fix`)** — a fix has no Product hop to wait on (D6), so its plan review is the
|
|
105
|
-
only pre-execution gate it can have. The stage sequence is per-feature and size-dependent — always **one stage
|
|
106
|
-
per iteration**: a feature starting at `idea`/`defined` gets a DESIGN stage
|
|
107
|
-
first; one already `planned` (including the founding-scaffolded feature 01)
|
|
108
|
-
goes to its missing review stage, and skips to EXECUTE only when a current
|
|
109
|
-
`PLAN-REVIEW-PASS` is bound to its bytes. Every size follows
|
|
110
|
-
**[DESIGN → REVIEW-SPEC] → PLAN → REVIEW-PLAN → EXECUTE**
|
|
111
|
-
(implementation phases, fresh cheap worker per phase) → PR (explicit
|
|
112
|
-
`Hardening & PR`) → REVIEW (bounded final loop) → AUDIT. Risk changes final
|
|
113
|
-
review strength, not phase cadence. The two review stages are the pre-execution
|
|
114
|
-
pair: they judge documents in a clean context and are **not** the post-code
|
|
115
|
-
REVIEW loop, which stays exactly as described below. Merge policy is unchanged —
|
|
116
|
-
the human (or the `--fullauto` wrapper behind its recorded floors) still owns the
|
|
117
|
-
merge, and neither review stage may merge, close, or file anything.
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
### Merge policy
|
|
2
|
-
|
|
3
|
-
**Default — the human merges.** The autopilot opens PRs and never merges. It
|
|
4
|
-
continues with the next feature whose dependencies are all merged (new branches
|
|
5
|
-
always cut from the freshly pulled default branch); when everything remaining
|
|
6
|
-
waits on human merges, it stops with `SHIP: BLOCKED` + the unblock map. After
|
|
7
|
-
merging, re-run the same launch command (`/loop /ship-roadmap --continue`, plus
|
|
8
|
-
`--fullauto` on fullauto runs) — recovery records the merges (the rows are already
|
|
9
|
-
`done` from PR-open), unblocks the dependents, and resumes.
|
|
10
|
-
|
|
11
|
-
**`--fullauto` — dual-keyed.** Auto-merge requires a fresh SHA-bound
|
|
12
|
-
`audit-pr:merge-ready` comment and `merge: fullauto` in the decision file at
|
|
13
|
-
the PR's current head — stale or caller-supplied local evidence can never
|
|
14
|
-
enable it. The **first
|
|
15
|
-
feature PR of a greenfield run is always human-merged** (calibration: inspect
|
|
16
|
-
one complete artifact — code, tests, docs, review trail — before delegating).
|
|
17
|
-
|
|
18
|
-
This AUDIT stage is the **sole automated merge authority**. Authorization lasts
|
|
19
|
-
for this invocation and this merge attempt only:
|
|
20
|
-
|
|
21
|
-
1. `audit-pr` returns a fresh SHA-bound MERGE-READY verdict and never merges.
|
|
22
|
-
2. Record merge intent in `.ship-run.log` before execution.
|
|
23
|
-
3. Invoke exactly:
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
.agentic-workflow/hooks/fullauto-merge.sh \
|
|
27
|
-
--pr <number> --run-id <run-id>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
The wrapper derives the PR head and forge default base itself. A project
|
|
31
|
-
with no forge-reported checks fails closed.
|
|
32
|
-
4. The wrapper re-checks the current PR head, forge default base, SHA-bound
|
|
33
|
-
audit comment, decision file fetched from that head, clean/synchronized
|
|
34
|
-
branch, mergeability, and CI evidence. It
|
|
35
|
-
creates a namespaced marker under the git common directory only after those
|
|
36
|
-
checks, installs cleanup with `trap`, and removes the marker on success,
|
|
37
|
-
failure, signal, or already-merged recovery.
|
|
38
|
-
5. After the forge reports MERGED, the wrapper posts one idempotent comment
|
|
39
|
-
marked `<!-- agentic-workflow:automerge head=<sha> -->`, containing the run,
|
|
40
|
-
audited head, and merge commit. That PR comment is the durable automerge log;
|
|
41
|
-
no repository log grows.
|
|
42
|
-
|
|
43
|
-
Direct `gh pr merge`, `glab mr merge`, `git merge`, and forge-API merge calls
|
|
44
|
-
remain blocked by the command guard at all times. There is no `.automerge` file
|
|
45
|
-
and no persistent exception for a later manual `audit-pr` or shell session.
|
|
46
|
-
|
|
47
|
-
Non-negotiable floors, evaluated fresh immediately before every merge —
|
|
48
|
-
**fail-closed: a floor that cannot be evaluated counts as breached**:
|
|
49
|
-
|
|
50
|
-
1. **Never merge red** — re-verify CI status via the forge CLI at merge time;
|
|
51
|
-
the audit verdict is evidence, fresh green CI is the precondition. In a
|
|
52
|
-
no-CI project the accepted evidence is a **fresh local verification-gate run
|
|
53
|
-
on the PR's exact head SHA**, recorded in the run log — without one of the
|
|
54
|
-
two, the floor is unevaluable and therefore breached.
|
|
55
|
-
2. **Verdict freshness** — MERGE-READY must reference the PR's current head
|
|
56
|
-
SHA; any later commit forces a re-audit.
|
|
57
|
-
3. **Sensitive-area pause** — PRs touching the declared sensitive set are
|
|
58
|
-
never auto-merged; the run continues around them and the report flags them.
|
|
59
|
-
4. **Destructive-operation pause** — data-deleting or schema-destructive
|
|
60
|
-
diffs pause even when not in the declared set (users forget to declare it).
|
|
61
|
-
5. **Forge refusal is a signal** — never bypass branch protection, never
|
|
62
|
-
force-push, never merge to anything but the default branch; a refused merge
|
|
63
|
-
parks the PR and is reported.
|
|
64
|
-
6. **Budget floors still bind** — no cap is exempted by `--fullauto`.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
## Close out and log the iteration
|
|
2
|
-
|
|
3
|
-
5. **CLEAN CLOSE-OUT — verify before logging the stage complete.** A stage
|
|
4
|
-
only counts as advanced when the conductor has RUN and checked, on the
|
|
5
|
-
unit's branch: `git status --porcelain` → empty (no tracked modification
|
|
6
|
-
left behind — **docs included**: progress/testing/known-issues/roadmap
|
|
7
|
-
edits ride the stage's commit, never linger), and — once the unit's PR
|
|
8
|
-
exists — `git status -sb` after `git fetch` → not ahead of the remote
|
|
9
|
-
(every commit pushed; the PR and CI must see what was actually done).
|
|
10
|
-
A subagent that "finished" but left the tree dirty or the branch unpushed
|
|
11
|
-
did NOT finish: the conductor commits/pushes the remainder itself (same
|
|
12
|
-
stage, same iteration) or marks the stage partial. This check is
|
|
13
|
-
unconditional for REVIEW-SPEC/REVIEW-PLAN repairs, EXECUTE, REVIEW fix cycles,
|
|
14
|
-
PR, and AUDIT fix cycles.
|
|
15
|
-
6. **LOG** one line to `.ship-run.log`; print `→ Next: <unit> (CONTINUE)` (the
|
|
16
|
-
canonical next-step shape; `CONTINUE` stays the loop's keep-going signal).
|
|
17
|
-
**Say WHY the turn is ending** — one explicit
|
|
18
|
-
line before the `→ Next:` block, always one of: "iteration complete — one
|
|
19
|
-
stage advanced (normal; re-invoke to continue)", "parked <unit>: <exact cap
|
|
20
|
-
hit — red-gate retries / review ping-pong / audit ping-pong / 3 partials /
|
|
21
|
-
planning contradiction>", or the terminal banner's reason. A turn ending
|
|
22
|
-
silently reads as a crash on agents without `/loop` — never leave the stop
|
|
23
|
-
unexplained.
|
|
24
|
-
|
|
25
|
-
**Capacity guard:** an iteration that cannot finish its stage in one turn
|
|
26
|
-
(e.g. an oversized review) writes a partial-stage marker and ends cleanly;
|
|
27
|
-
three consecutive partials on the same stage parks the feature as blocked.
|