@gtrabanco/pi-agentic-workflow 0.20.0 → 0.24.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/package.json +1 -1
- package/skills/execute-phase/SKILL.md +23 -1
- package/skills/fold-findings/SKILL.md +29 -9
- package/skills/fold-findings/references/FOLD_PROCESS.md +6 -4
- 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/review-change/SKILL.md +1 -1
- package/skills/review-change/references/PERSIST_AND_DECIDE.md +4 -3
- package/skills/review-implementation/SKILL.md +1 -1
- package/skills/review-implementation/references/CLASSIFY.md +1 -1
- package/skills/triage-issue/SKILL.md +1 -1
- package/skills/triage-issue/references/REVIEW_FINDING_PROCESS.md +8 -1
- package/skills/unit-lane/SKILL.md +25 -1
- package/skills/unit-lane/references/DESIGN.md +11 -0
- package/skills/unit-lane/references/RESEARCH.md +11 -0
package/package.json
CHANGED
|
@@ -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
|
|
@@ -102,9 +102,9 @@ no schema field). Six fields, always present:
|
|
|
102
102
|
- Repaired: <F-ids with (VF-<n>) refs, joined ` + `, or `none`>
|
|
103
103
|
- Refuted/open: <F-ids joined ` + `, or `none`>
|
|
104
104
|
- Gate: <command> → exit <n> at head <40-hex sha> · n/a when nothing was folded
|
|
105
|
-
- Batch class: <all-repair-in-place | frozen (replan present) | none>
|
|
105
|
+
- Batch class: <all-repair-in-place | frozen (replan present) | frozen (product owner present) | none>
|
|
106
106
|
- Fold diff: <shortstat from a real `git diff` run> · none when nothing was folded
|
|
107
|
-
- Branch: <RE-REVIEW-REQUIRED (delta) | RE-REVIEW-OPTIONAL | RE-REVIEW-SKIPPED | REPLAN-ROUTE>
|
|
107
|
+
- Branch: <RE-REVIEW-REQUIRED (delta) | RE-REVIEW-OPTIONAL | RE-REVIEW-SKIPPED | REPLAN-ROUTE | PRODUCT-ROUTE>
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
- The `Gate` line carries the actual exit codes observed at the head the gate
|
|
@@ -114,9 +114,9 @@ no schema field). Six fields, always present:
|
|
|
114
114
|
- The `Fold diff` shortstat comes from a real `git diff` run over the batch's
|
|
115
115
|
commits.
|
|
116
116
|
- The `Batch class` derives from the taken queue's frozen rows only — the fold
|
|
117
|
-
never reclassifies (`all-repair-in-place`, `frozen (replan present)`,
|
|
118
|
-
`none` for an empty queue); the
|
|
119
|
-
`review-implementation`'s closed class set.
|
|
117
|
+
never reclassifies (`all-repair-in-place`, `frozen (replan present)`,
|
|
118
|
+
`frozen (product owner present)`, or `none` for an empty queue); the
|
|
119
|
+
vocabulary comes from `review-implementation`'s closed class set.
|
|
120
120
|
|
|
121
121
|
**Freeze-batch (replan present).** When the taken queue contains any row whose
|
|
122
122
|
frozen class is `replan-in-unit` or `decision-required`, nothing folds: no
|
|
@@ -129,13 +129,31 @@ and surface the decision to the user, never a planner. `<unit>` is the bare fold
|
|
|
129
129
|
`node scripts/unit-route.mjs <unit>` is the discovery step the fold already
|
|
130
130
|
ran; it is never the recommendation.
|
|
131
131
|
|
|
132
|
+
**Freeze-batch (product owner present).** Any taken `fix-now` row whose `Route`
|
|
133
|
+
cell begins `product owner`, `product-owned` or `owned by product` (head-anchored,
|
|
134
|
+
identical to `scripts/unit-route.mjs`'s `PRODUCT_ROUTE` regex,
|
|
135
|
+
per `#293`) freezes the batch too —
|
|
136
|
+
nothing folds, no `folded: yes` flips, no commits: the fold loop repairs source,
|
|
137
|
+
never authority (`pre-execution-review` POLICY §4, `#293`). The receipt records
|
|
138
|
+
the `PRODUCT-ROUTE` branch and the retained row ids; the consumer is the
|
|
139
|
+
router's printed `route: product` lane hand-off. Full condition and hand-off
|
|
140
|
+
table: [`FOLD_PROCESS.md`](references/FOLD_PROCESS.md) §Batch classification.
|
|
141
|
+
|
|
132
142
|
## Guardrails
|
|
133
143
|
|
|
134
144
|
Scope is the ledger (or explicit ID subset); unlisted discoveries are proposals
|
|
135
145
|
for user triage. Batch only when one root-cause correction, validator set and
|
|
136
146
|
rollback boundary own the rows: one commit/push, individual ticks/lines. Split
|
|
137
|
-
otherwise.
|
|
138
|
-
|
|
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
|
|
139
157
|
instruction > project docs language > English; conversation language never decides.
|
|
140
158
|
|
|
141
159
|
## Portability (agents other than Claude Code)
|
|
@@ -175,6 +193,7 @@ or touched outside the queue.
|
|
|
175
193
|
· any BLOCKED (<F1> + <F2> + …) → supply the listed missing inputs, then re-run /fold-findings
|
|
176
194
|
· any REPLAN (<F1> + <F2> + …) → /unit-lane <slug> or /unit-lane --fix <n> — the lane re-runs its plan step, appends the phases to the unit's SPEC; its review step gates before /execute-phase on this unit
|
|
177
195
|
· any DECISION (<F1> + <F2> + …) → stop and surface the decision to the user — a `route: decision` conclusion names no planner, so the unit waits on the user before any plan or code change
|
|
196
|
+
· any PRODUCT (<F1> + <F2> + …) → /unit-lane <slug> or /unit-lane --fix <n> — the lane repairs the half, its review step re-judges it
|
|
178
197
|
```
|
|
179
198
|
|
|
180
199
|
Every `· ` sub-bullet is exactly one physical line — never hard-wrapped across
|
|
@@ -187,12 +206,13 @@ carry `<slug>` or `<n>` into a live hand-off.
|
|
|
187
206
|
|
|
188
207
|
## Closing-block decision branch (choose one, at emission)
|
|
189
208
|
|
|
190
|
-
The closing block picks exactly one of
|
|
209
|
+
The closing block picks exactly one of five outcomes. The **no-decision →
|
|
191
210
|
re-review default** holds whenever the turn carries no recorded prior consumer
|
|
192
211
|
decision to skip.
|
|
193
212
|
|
|
194
213
|
| Batch state | Branch | `→ Next:` (consumer) |
|
|
195
214
|
|---|---|---|
|
|
215
|
+
| freeze-batch (≥ 1 product-owned row) | `PRODUCT-ROUTE` | `/unit-lane <slug>` (feature) or `/unit-lane --fix <n>` (fix) when the router concludes `product` — the lane repairs the half through its `design` step, its `review` step re-judges it; the conclusion printed by `node scripts/unit-route.mjs <unit>` (discovery step the fold already ran) |
|
|
196
216
|
| freeze-batch (≥ 1 replan-class row) | `REPLAN-ROUTE` | `/unit-lane <slug>` (feature) or `/unit-lane --fix <n>` (fix) when the router concludes `replan` — user confirms, the lane's `plan` step appends the phases and its `review` step gates, then `/execute-phase` on this unit; on `route: decision` stop and surface the decision to the user — the conclusion printed by `node scripts/unit-route.mjs <unit>` (discovery step the fold already ran) |
|
|
197
217
|
| `all-repair-in-place` + docs-only + no folded row severity `high` + prior consumer skip decision | `RE-REVIEW-SKIPPED` | skip — consumer has explicitly decided to skip the re-review |
|
|
198
218
|
| `all-repair-in-place` + docs-only + no folded row severity `high` | `RE-REVIEW-OPTIONAL` | `/review-change` (default, delta mode) — or the consumer's recorded skip decision |
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
| Condition over the taken batch | Batch class | Fold behavior |
|
|
45
45
|
|---|---|---|
|
|
46
46
|
| ≥ 1 row with frozen class `replan-in-unit` or `decision-required` | `frozen (replan present)` | **freeze-batch** — nothing folds, no `folded: yes` flips, no commits; the receipt records the REPLAN-ROUTE and every retained (unfolded) row id; the loop stops; the consumer is the conclusion printed by `node scripts/unit-route.mjs <unit>` (discovery step the fold already ran), where `<unit>` is the bare folder number or the full slug (both resolve): on `route: replan` the planner command the router printed — `/unit-lane <slug>` (feature) or `/unit-lane --fix <n>` (fix) — the lane appends the phases and its `review` step gates, then `/execute-phase` on this unit; on `route: decision` stop and surface the decision to the user, never a planner |
|
|
47
|
+
| ≥ 1 row with frozen class `fix-now` whose `Route` cell begins `product owner`, `product-owned` or `owned by product` (head-anchored, identical to `scripts/unit-route.mjs`'s `PRODUCT_ROUTE` regex: `/^(?:product[- ]owner\|product[- ]owned\|owned by product)\b/i`, per `#293`) | `frozen (product owner present)` | **freeze-batch** — nothing folds, no `folded: yes` flips, no commits; the receipt records the PRODUCT-ROUTE and every retained (unfolded) row id; the loop stops; the consumer is the conclusion printed by `node scripts/unit-route.mjs <unit>`: `route: product` and the lane hand-off — `/unit-lane <slug>` (feature) or `/unit-lane --fix <n>` (fix) — the lane repairs the half, its `review` step re-judges it, then `/execute-phase` on this unit |
|
|
47
48
|
| all taken rows foldable, none replan-class | `all-repair-in-place` | fold as today (group → fix → gate → commit → flip) |
|
|
48
49
|
| empty queue (zero findings taken) | `none` | receipt only |
|
|
49
50
|
|
|
@@ -51,8 +52,9 @@
|
|
|
51
52
|
class set (`CLASSIFY.md`); the receipt invents no parallel vocabulary.
|
|
52
53
|
|
|
53
54
|
The emitted branch follows the closing-block decision inputs in the skill:
|
|
54
|
-
a freeze-batch
|
|
55
|
-
|
|
55
|
+
a freeze-batch selects `REPLAN-ROUTE` for a `frozen (replan present)` batch
|
|
56
|
+
and `PRODUCT-ROUTE` for a `frozen (product owner present)` batch; otherwise
|
|
57
|
+
the docs-only file-set test (E-D3) and the frozen-severity-`high` override (E-D2) select
|
|
56
58
|
`RE-REVIEW-OPTIONAL` vs `RE-REVIEW-REQUIRED (delta)`.
|
|
57
59
|
8. **Disputes.** Non-reproducible/already-fixed/wrong findings become
|
|
58
60
|
`DISPUTED <evidence → user decision>`; never edit classification or create an
|
|
@@ -82,7 +84,7 @@ present:
|
|
|
82
84
|
- Repaired: <F-ids with (VF-<n>) refs, joined ` + `, or `none`>
|
|
83
85
|
- Refuted/open: <F-ids joined ` + `, or `none`>
|
|
84
86
|
- Gate: <command> → exit <n> at head <40-hex sha> · n/a when nothing was folded
|
|
85
|
-
- Batch class: <all-repair-in-place | frozen (replan present) | none>
|
|
87
|
+
- Batch class: <all-repair-in-place | frozen (replan present) | frozen (product owner present) | none>
|
|
86
88
|
- Fold diff: <shortstat from a real `git diff` run> · none when nothing was folded
|
|
87
|
-
- Branch: <RE-REVIEW-REQUIRED (delta) | RE-REVIEW-OPTIONAL | RE-REVIEW-SKIPPED | REPLAN-ROUTE>
|
|
89
|
+
- Branch: <RE-REVIEW-REQUIRED (delta) | RE-REVIEW-OPTIONAL | RE-REVIEW-SKIPPED | REPLAN-ROUTE | PRODUCT-ROUTE>
|
|
88
90
|
```
|
|
@@ -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
|
|
@@ -138,9 +138,10 @@ exact command tokens.
|
|
|
138
138
|
fix); the lane re-runs its plan step on this branch, its review step
|
|
139
139
|
gates, then `/execute-phase <unit>` (yes: list the finding ids; no: omit
|
|
140
140
|
this line)
|
|
141
|
-
· any finding owned by product? → /unit-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
· any finding owned by product? → `node scripts/unit-route.mjs <unit>` prints
|
|
142
|
+
`route: product` + the lane hand-off — `/unit-lane <unit>` for a feature,
|
|
143
|
+
`/unit-lane --fix <n>` for a fix: the lane repairs the half, its review
|
|
144
|
+
step re-judges it (yes: list the ids; no: omit this line)
|
|
144
145
|
· independent proposals → present to the user; only the user routes them
|
|
145
146
|
to /triage-issue
|
|
146
147
|
· adversarial recommendation checklist fired AND this run was
|
|
@@ -175,7 +175,7 @@ finding in its `Route` cell.
|
|
|
175
175
|
|---|---|---|
|
|
176
176
|
| `source` | fold locally: `/fold-findings`, then re-run `/review-change` on the changed HEAD | — |
|
|
177
177
|
| `plan` | run `node scripts/unit-route.mjs <unit>` → `route: replan`; the planning author re-cuts the artifact (SPEC `## Phases`, an obligation row, an acceptance mapping, a ledger) on the same branch with the user's confirmation, then the lane's **`review` step** precedes `execute-phase` | fold it in code and leave the plan describing the old build |
|
|
178
|
-
| `product` | `/unit-lane <unit>` repairs the half through its `design` step, its `review` step re-judges it | patch the product claim into agreement in code |
|
|
178
|
+
| `product` | run `node scripts/unit-route.mjs <unit>` → `route: product` → `/unit-lane <slug>` (feature) or `/unit-lane --fix <n>` (fix): the lane repairs the half through its `design` step, its `review` step re-judges it | patch the product claim into agreement in code |
|
|
179
179
|
| `environment` / `runtime` | the existing retry/`BLOCKED` paths | translate into a PASS, or an issue |
|
|
180
180
|
|
|
181
181
|
- `fix-now` with a `plan` or `product` owner keeps its severity but is **not**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: triage-issue
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.11.0
|
|
5
5
|
argument-hint: <issue-number> [more issue numbers…] | <audit-id> F<k> [F<j>…] | --prioritize-now <unit> F<k> [F<j>…]
|
|
6
6
|
author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
|
|
7
7
|
license: MIT
|
|
@@ -24,6 +24,13 @@ after `/fold-findings` leaves rows unresolved.
|
|
|
24
24
|
`decision-required`. Ask the user; do not guess or weaken the finish line.
|
|
25
25
|
- A finding disproved by current evidence is `disputed`. Preserve the row
|
|
26
26
|
and show the evidence; do not mark it folded or silently delete it.
|
|
27
|
+
- A `fix-now` finding whose owning stage is `product` — the finding is
|
|
28
|
+
against the product half, not the code — is `product-repair` (#293). Run
|
|
29
|
+
`node scripts/unit-route.mjs <unit>`; its `route: product` line prints the
|
|
30
|
+
lane hand-off (`/unit-lane <unit>` for a feature, `/unit-lane --fix <n>`
|
|
31
|
+
for a fix): the lane repairs the half, its review step re-judges it. Never
|
|
32
|
+
fold it into the current unit — the fold loop repairs source, not
|
|
33
|
+
authority (`pre-execution-review` POLICY §4).
|
|
27
34
|
|
|
28
35
|
4. Never implement the new phases in this triage turn. After a replan, ask the
|
|
29
36
|
user to continue manually with `/execute-phase <unit> P<n>` (or the fix
|
|
@@ -34,7 +41,7 @@ Return exactly one block per finding:
|
|
|
34
41
|
```text
|
|
35
42
|
REVIEW FINDING <F-k> — <short title>
|
|
36
43
|
Checked: <commands and evidence>
|
|
37
|
-
VERDICT: fix-now | replan-in-unit | decision-required | disputed
|
|
44
|
+
VERDICT: fix-now | replan-in-unit | decision-required | product-repair | disputed
|
|
38
45
|
Action taken: <current-unit fold/phase | unit-lane | user decision>
|
|
39
46
|
```
|
|
40
47
|
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|