@gtrabanco/pi-agentic-workflow 0.13.3 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -9
- package/dist/conductor/closeout.d.ts +18 -0
- package/dist/conductor/closeout.js +24 -0
- package/dist/conductor/decide.d.ts +25 -0
- package/dist/conductor/decide.js +104 -0
- package/dist/conductor/index.d.ts +16 -0
- package/dist/conductor/index.js +15 -0
- package/dist/conductor/invoke.d.ts +15 -0
- package/dist/conductor/invoke.js +59 -0
- package/dist/conductor/loop.d.ts +25 -0
- package/dist/conductor/loop.js +236 -0
- package/dist/conductor/sensor.d.ts +12 -0
- package/dist/conductor/sensor.js +150 -0
- package/dist/conductor/snapshot.d.ts +13 -0
- package/dist/conductor/snapshot.js +60 -0
- package/dist/conductor/types.d.ts +248 -0
- package/dist/conductor/types.js +47 -0
- package/dist/conductor/urgency.d.ts +16 -0
- package/dist/conductor/urgency.js +70 -0
- package/dist/config/merge.js +21 -1
- package/dist/config/schema.js +45 -2
- package/dist/config/types.d.ts +22 -0
- package/dist/config/types.js +7 -0
- package/dist/extension/conductor-command.d.ts +23 -0
- package/dist/extension/conductor-command.js +93 -0
- package/dist/extension/factory.js +6 -1
- package/dist/routing/types.d.ts +2 -0
- package/dist/routing/types.js +2 -0
- package/dist/runtime.d.ts +45 -0
- package/dist/runtime.js +62 -0
- package/package.json +4 -2
- 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 +35 -5
- package/skills/init-workspace/references/BOOTSTRAP_DISCOVERY.md +5 -5
- package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +15 -8
- package/skills/init-workspace/references/PORTABILITY.md +1 -1
- package/skills/init-workspace/references/UPGRADE.md +17 -7
- 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/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,138 +1,229 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: execute-phase
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version:
|
|
5
|
-
argument-hint: <NN> [P<k
|
|
4
|
+
version: 5.0.0
|
|
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>"
|
|
8
8
|
license: MIT
|
|
9
9
|
description: >
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
Step executor for units whose triage (unit-lane) decided which steps the unit
|
|
11
|
+
needs. Implements one triaged step (or all remaining steps), with frozen
|
|
12
|
+
acceptance, step-local gates, commits, red-gate repair, and diff-size guard.
|
|
13
|
+
BREAKING: replaced PLAN.md/TASKS.md/progress.md/ACCEPTANCE.md with the unit
|
|
14
|
+
doc's Tasks section, Evidence rows, and Progress log; ACCEPTANCE.md is gone —
|
|
15
|
+
acceptance criteria live in the unit doc and Evidence rows are the receipts.
|
|
13
16
|
---
|
|
14
17
|
|
|
15
18
|
# Execute Phase
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
Step executor for units. The unit doc (created by `unit-lane`) owns `Tasks` P1…Pn,
|
|
21
|
+
`Evidence` rows, and a `Progress` log — these replace PLAN.md, TASKS.md,
|
|
22
|
+
progress.md, and ACCEPTANCE.md. Each step runs as an atomic gate/commit.
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
**Argument resolution (first match):**
|
|
25
|
+
- `<NN-slug> P<k>` — exactly the step named by the triage order (P1, P2, …)
|
|
26
|
+
- `<NN-slug>` (no step) — all remaining steps, one commit each
|
|
27
|
+
- `P<k>` alone — the step by position in the current unit (last-known NN-slug)
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|---|---|
|
|
25
|
-
| target + explicit `P<n>` | only the literal `P<n>` argument; ignore other unfinished phases |
|
|
26
|
-
| target, no phase | only the literal unfinished phase IDs found in the ledger, in order |
|
|
27
|
-
| legacy SPEC without phases | one legacy pass |
|
|
28
|
-
|
|
29
|
-
Never infer a phase ID absent from the invocation/ledger.
|
|
29
|
+
Never infer a step ID absent from the triage block in the unit doc.
|
|
30
30
|
|
|
31
31
|
## Turn contract
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
1.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
33
|
+
Tick every box before ending the turn; an unchecked box means the turn is not
|
|
34
|
+
done:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
✓ Triage verified — unit doc Evidence section header matches
|
|
38
|
+
`bun scripts/unit-route.mjs --triage <slug>` output block (PREFLIGHT.md)
|
|
39
|
+
✓ Unit doc read and step selected (explicit P<k> or first unfinished)
|
|
40
|
+
✓ Step executed and committed (one commit per step, conventional format)
|
|
41
|
+
✓ Evidence rows updated (command → exit/digest → output → verified-by)
|
|
42
|
+
✓ Progress log updated with a dated `YYYY-MM-DD HH:MM` entry (what, commit, next)
|
|
43
|
+
✓ Diff guard passed (on implement steps) — see `diff-guard` in PREFLIGHT.md
|
|
44
|
+
✓ → Next: block printed as the absolute last output
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## When to use
|
|
48
|
+
|
|
49
|
+
- A triaged unit from `unit-lane`: steps include `implement`/`tests`/`evidence`
|
|
50
|
+
→ invoke with `<NN-slug>` or `<NN-slug> P<k>`.
|
|
51
|
+
- Docs-only units (triage returns only `[docs, evidence]`) do **not** load this
|
|
52
|
+
skill — they are executed in-place by the unit-lane conductor.
|
|
53
|
+
- To execute all remaining steps: `<NN-slug>` with no step argument.
|
|
54
|
+
- To repair a failed step: `<NN-slug> P<k>` (retry the same step).
|
|
55
|
+
|
|
56
|
+
## Step 0 — Discover the project
|
|
57
|
+
|
|
58
|
+
Per the agent guide's **Workflow conventions** + **documentation map**, read the
|
|
59
|
+
unit doc at `docs/features/<NN-slug>/SPEC.md`. Verify it carries `## Tasks` (P1…Pn),
|
|
60
|
+
`## Evidence`, and `## Progress` sections. If absent, the unit is not ready —
|
|
61
|
+
stop and suggest `unit-lane` triage first.
|
|
62
|
+
|
|
63
|
+
## Process
|
|
64
|
+
|
|
65
|
+
### 1. Verify triage currency
|
|
66
|
+
|
|
67
|
+
Run `bun scripts/unit-route.mjs --triage <slug>` and compare its block to the
|
|
68
|
+
Evidence section header in the unit doc. **Mismatch → STOP and re-triage first.**
|
|
69
|
+
This is the gate that ensures the executor and unit-lane agree on steps.
|
|
70
|
+
|
|
71
|
+
### 2. Select the step
|
|
72
|
+
|
|
73
|
+
If a step argument is given (e.g. `P2`), use that step. Otherwise, the **first
|
|
74
|
+
unfinished step** — the first P<k> in `Tasks` whose checkbox is unticked.
|
|
75
|
+
Never execute a step the triage skipped.
|
|
76
|
+
|
|
77
|
+
### 3. Pre-step gates
|
|
78
|
+
|
|
79
|
+
Run gates in order; any fails → STOP (see [PREFLIGHT.md](references/PREFLIGHT.md)):
|
|
80
|
+
|
|
81
|
+
1. **Path-protection checkpoint** — read the committed range against protected
|
|
82
|
+
paths (e.g. `tests/`, `fixtures/`). Exit 1 → STOP with the gate rejection
|
|
83
|
+
block. No `--force` bypass (no flag can override).
|
|
84
|
+
2. **Phase-lint** — run `bun scripts/phase-lint.mjs <unit-doc>` **only** when the
|
|
85
|
+
step is `implement` and the unit has `Tasks` P1…Pn. Parse the `Tasks` section
|
|
86
|
+
(not PLAN.md/TASKS.md). Exit 1 → STOP. If the script is absent, apply the
|
|
87
|
+
eight `phase-contract` rules by hand, label weaker, and disclose.
|
|
88
|
+
3. **Pre-write mapper** — for `implement` steps, settle the pre-write mapper
|
|
89
|
+
contract before branch creation, planning commit, or source/test edit:
|
|
90
|
+
([implementation-discovery](../implementation-discovery/SKILL.md)): it closes
|
|
91
|
+
the seven evidence questions and routes `READY | REPLAN | NEEDS-DESIGN |
|
|
92
|
+
BLOCKED`; only `READY` authorizes the first write.
|
|
93
|
+
4. **Dependency/invariant checks** — per unit-lane's triage catalog rules:
|
|
94
|
+
ensure required dependencies are merged; architectural invariants preserved
|
|
95
|
+
or backed by an explicit recorded decision (block `violates`/`introduces`/
|
|
96
|
+
`changes` before edits).
|
|
97
|
+
|
|
98
|
+
### 4. Execute the step
|
|
99
|
+
|
|
100
|
+
Follow the unit-lane reference for this step (`references/STEPS.md` catalog):
|
|
101
|
+
one line — read the step's reference file, perform its checklist, commit the
|
|
102
|
+
work. For `implement` steps: write tests-first where they pay (core/domain,
|
|
103
|
+
orchestration — record the failing red run's command, exit, and failing test
|
|
104
|
+
names before implementation), then green. UI/adapter glue may test after.
|
|
105
|
+
|
|
106
|
+
### 5. Post-step
|
|
107
|
+
|
|
108
|
+
1. **Diff guard** (implement steps only): run `bun scripts/diff-guard.mjs --base
|
|
109
|
+
<last-step-commit> --unit <unit>` — paste the block verbatim. **BREACH → STOP**
|
|
110
|
+
(re-triage or record exception). Anti-gaming: **NEVER shrink a diff by deleting
|
|
111
|
+
comments, blank lines, docs or tests.**
|
|
112
|
+
2. **Evidence rows**: one row per AC satisfied — `| AC | command | exit/digest |
|
|
113
|
+
output (≤2 lines) | verified-by |`. Append to the Evidence section.
|
|
114
|
+
3. **Progress log**: append a dated entry —
|
|
115
|
+
`YYYY-MM-DD HH:MM — <what was done> → <commit sha> — next: <what is next>`.
|
|
116
|
+
4. **Commit**: `git add <changed files>` then `git commit -m "<type>(<scope>):
|
|
117
|
+
<step-summary>"` — run it, paste the SHA.
|
|
118
|
+
|
|
119
|
+
### 6. Red gate (repair loop)
|
|
120
|
+
|
|
121
|
+
After each step: run the project's verification gate (type-check + tests + build).
|
|
122
|
+
|
|
123
|
+
- **Gate green** → proceed.
|
|
124
|
+
- **Gate red** → record exit code + failing test names in the Progress log, repair
|
|
125
|
+
the same step, retry. Default `--max-attempts 3` (user value overrides).
|
|
126
|
+
- **Exhausted** → STOP with:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
UNIT LOOP — <unit> BLOCKED at <P<k>>
|
|
130
|
+
Reason: <NO-PROGRESS|ATTEMPT-BUDGET> · Attempts: <n>
|
|
131
|
+
Last validator: <command> → <exit/status + compact failure>
|
|
132
|
+
Preserved: no red commit; acceptance blob <sha> unchanged
|
|
133
|
+
|
|
134
|
+
→ Next: inspect the named blocker, then re-run /execute-phase <unit> <P<k>>
|
|
135
|
+
· architecture/product decision required → resolve it before resuming
|
|
136
|
+
· continue atomically → /execute-phase <unit> <P<k>>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 7. Whole-unit mode
|
|
140
|
+
|
|
141
|
+
When invoked as `<NN-slug>` with no step: loop all remaining steps, one commit
|
|
142
|
+
each. After each step: gates, execute, diff guard (if implement), evidence/
|
|
143
|
+
progress update, commit. Skip intermediate review checkpoints; the mandatory end
|
|
144
|
+
review covers the full accumulated diff. On gate red at any step: repair that
|
|
145
|
+
step (up to `--max-attempts`), then continue the loop. Terminal:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
UNIT LOOP — <unit> COMPLETE
|
|
149
|
+
Steps: <n> · Commits: <sha list> · Gate: PASS
|
|
150
|
+
PR: <url>
|
|
151
|
+
|
|
152
|
+
→ Next: /review-change on the changed HEAD — the mandatory end review
|
|
153
|
+
· findings (REVIEW-FAIL) → /fold-findings repairs them; a fresh /review-change follows the fold
|
|
154
|
+
· merge gate after REVIEW-PASS → /audit-pr
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 8. Descope guard
|
|
158
|
+
|
|
159
|
+
Before creating **any** issue while executing: classify with the descope test.
|
|
160
|
+
A descope (moving an acceptance criterion or task out of scope) requires
|
|
161
|
+
**explicit user approval first**, then record in the unit doc's
|
|
162
|
+
`## References` section (not a follow-up issue) as:
|
|
163
|
+
`- <YYYY-MM-DD> — descoped: "<criterion>" — approved by user`.
|
|
164
|
+
An issue may never be the first record of a descope.
|
|
165
|
+
|
|
166
|
+
## Required references
|
|
167
|
+
|
|
168
|
+
These files must be loaded when their topic is active:
|
|
169
|
+
- [PREFLIGHT.md](references/PREFLIGHT.md) — all gate blocks (dependency, status, pre-exec, evidence, lint, path-protection)
|
|
170
|
+
- [EXECUTION_CONTRACT.md](references/EXECUTION_CONTRACT.md) — step completion gate, architectural invariants
|
|
171
|
+
- [PRE_EXECUTION_GATE.md](references/PRE_EXECUTION_GATE.md) — pre-execution review gate, normalizer order
|
|
172
|
+
- [FOLDING.md](references/FOLDING.md) — review finding fold cycle
|
|
173
|
+
- [DESCOPE.md](references/DESCOPE.md) — descope test and amendment rule
|
|
174
|
+
- [FORGE_BODY.md](references/FORGE_BODY.md) — forge operations (gh body-file rule)
|
|
175
|
+
|
|
176
|
+
## Guardrails
|
|
177
|
+
|
|
178
|
+
**Allowed:**
|
|
179
|
+
- Only the triaged steps listed by the unit doc's Evidence header
|
|
180
|
+
- Changes scoped to the acceptance criteria and step tasks
|
|
181
|
+
- Documentation updates in the unit doc (Evidence, Progress, References)
|
|
182
|
+
- Conventional commit messages per the project's Workflow conventions
|
|
183
|
+
- The step's own reference file (read one-hop from the unit doc catalog)
|
|
184
|
+
|
|
185
|
+
**Forbidden:**
|
|
186
|
+
- Never commit red (test failure) — fix within the step's scope, or record the
|
|
187
|
+
blocker and stop.
|
|
188
|
+
- Never weaken a validator (loosen assertions, reduce coverage) — a repair must
|
|
189
|
+
keep assertions at least as strong.
|
|
190
|
+
- Never execute a step the triage skipped — the catalog is authoritative.
|
|
191
|
+
- Never edit the unit doc's Acceptance criteria (that is re-triage with user consent).
|
|
192
|
+
- Never expand scope beyond what Non-goals define — findings discovered during
|
|
193
|
+
implementation never widen the unit.
|
|
194
|
+
- Never invent an acceptance criterion — ask the user with concrete options.
|
|
117
195
|
|
|
118
196
|
## Relationship to other skills
|
|
119
197
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
198
|
+
`unit-lane` conducts (triage → steps → doc updates); this executes (one step at a
|
|
199
|
+
time or all remaining). `fold-findings` handles review finding repairs. The review
|
|
200
|
+
pack axes (`review-implementation`, `review-code`, `review-security`, `review-perf`,
|
|
201
|
+
`review-a11y`, `review-debt`) compose the review step; `workflow-status` routes
|
|
202
|
+
here. `triage-issue` feeds issues into the lane. This skill is the **step executor**
|
|
203
|
+
a turn invokes to perform one triaged step of a unit under the full gate machinery.
|
|
204
|
+
|
|
205
|
+
## Portability (agents other than Claude Code)
|
|
206
|
+
|
|
207
|
+
- **No slash menu** — open this `SKILL.md` and follow it literally in a fresh
|
|
208
|
+
conversation. Where it says `run`, execute the shell command directly.
|
|
209
|
+
- **No model tiers** — triage and review use the strongest model; execution
|
|
210
|
+
steps may use cheaper. Never review with a weaker model than the author.
|
|
211
|
+
- **No `/loop`/subagents** — invoke `<NN-slug>` for all remaining steps (the
|
|
212
|
+
built-in loop), or `<NN-slug> P<k>` for individual steps.
|
|
213
|
+
- **No fresh workers** — execute inline and reduce state to the unit doc after
|
|
214
|
+
each commit; never re-read prior files.
|
|
128
215
|
|
|
129
216
|
## Done when
|
|
130
217
|
|
|
131
|
-
- Requested scope is implemented (all remaining
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
218
|
+
- Requested scope is implemented (all remaining steps, one explicit step), gate
|
|
219
|
+
is green, unit doc Evidence/Progress are current, and the work is committed.
|
|
220
|
+
- **The closing `→ Next:` block is printed.**
|
|
221
|
+
|
|
222
|
+
## Closing recommendation
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
→ Next: /unit-lane <NN-slug> — the conductor continues with the next triaged step
|
|
226
|
+
· all steps done → /review-change — the mandatory end review
|
|
227
|
+
· findings (REVIEW-FAIL) → /fold-findings repairs them; a fresh /review-change follows the fold
|
|
228
|
+
· merge gate after REVIEW-PASS → /audit-pr — the merge gate
|
|
229
|
+
```
|
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
## Descope guard (run before creating any issue during this unit)
|
|
2
2
|
|
|
3
|
-
A cheap way to look finished is to quietly convert unfinished
|
|
3
|
+
A cheap way to look finished is to quietly convert unfinished unit scope into a
|
|
4
4
|
follow-up issue — the unit reads as done, the scope silently moved to the
|
|
5
5
|
backlog. Before creating **any** issue while executing this unit, classify it
|
|
6
6
|
with the fixed **descope test**:
|
|
7
7
|
|
|
8
|
-
- **Descope** — the issue's content overlaps
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
table) is scope of the unit exactly like a criterion: moving one to "later"
|
|
12
|
-
descope, needs the same dated user amendment, and flips the row to
|
|
13
|
-
as part of that amendment (`pre-execution-review` owns the
|
|
14
|
-
|
|
8
|
+
- **Descope** — the issue's content overlaps an acceptance criterion, a step
|
|
9
|
+
task, or an obligation row that is **not fully delivered** in this unit. A
|
|
10
|
+
`planning-obligations.md` row (or the unit doc's embedded `### Obligations`
|
|
11
|
+
table) is scope of the unit exactly like a criterion: moving one to "later"
|
|
12
|
+
is a descope, needs the same dated user amendment, and flips the row to
|
|
13
|
+
`deferred` only as part of that amendment (`pre-execution-review` owns the
|
|
14
|
+
lifecycle).
|
|
15
|
+
- **Discovered work** — everything else (genuinely new, outside the unit's
|
|
15
16
|
promises) — record it as a proposal; only explicit user triage may file it.
|
|
16
17
|
|
|
17
18
|
**On a descope → STOP before creating the issue.** An issue may never be the
|
|
18
19
|
first record of a descope. The descope must first be recorded as an explicit,
|
|
19
|
-
**user-approved, dated
|
|
20
|
+
**user-approved, dated** entry in the unit doc's `## References` section (not
|
|
21
|
+
the unit doc's `## Future cost` section, which captures future scope additions
|
|
22
|
+
from the triage catalog, not step descopes):
|
|
20
23
|
|
|
21
24
|
1. Get explicit user approval for the descope **first** (ask; never
|
|
22
|
-
self-authorize moving a criterion out of scope — the
|
|
25
|
+
self-authorize moving a criterion out of scope — the entry must
|
|
23
26
|
never be written before approval is in hand).
|
|
24
|
-
2. **Only then** move the criterion/task out of the active `## Acceptance`
|
|
25
|
-
`##
|
|
26
|
-
section (create the section if absent) with this
|
|
27
|
+
2. **Only then** move the criterion/task out of the active `## Acceptance`
|
|
28
|
+
(or `## Tasks` section), and record it in the unit doc's
|
|
29
|
+
`## References` section (create the section if absent) with this
|
|
30
|
+
canonical row format:
|
|
27
31
|
```
|
|
28
32
|
- <YYYY-MM-DD> — descoped: "<criterion/task>" — approved by user — follow-up: #<n>
|
|
29
33
|
```
|
|
30
34
|
3. **Only when the user explicitly requests backlog creation**, create the
|
|
31
35
|
follow-up issue and **link the amendment** in its
|
|
32
|
-
body. Immediately after, edit the `##
|
|
36
|
+
body. Immediately after, edit the `## References` row to replace the
|
|
33
37
|
`#<n>` placeholder with the real issue number, and commit that edit — a
|
|
34
38
|
row still reading the literal `#<n>` placeholder is unlinked and fails
|
|
35
39
|
`audit-pr`'s symmetric check.
|
|
36
40
|
|
|
37
41
|
`audit-pr`'s scope-bleed gate, `product-audit`'s recurrence signal and
|
|
38
|
-
`audit-pr`'s obligation-closure check all key off this same `##
|
|
39
|
-
it is the single authoritative record of every descope, defined once here.
|
|
40
|
-
else in the pre-execution route creates an issue: a missing or failed
|
|
41
|
-
`PLAN-REVIEW-PASS` is closed by `/review-plan`, never by a tracker item.
|
|
42
|
+
`audit-pr`'s obligation-closure check all key off this same `## References` log
|
|
43
|
+
— it is the single authoritative record of every descope, defined once here.
|
|
44
|
+
Nothing else in the pre-execution route creates an issue: a missing or failed
|
|
45
|
+
`PLAN-REVIEW-PASS` is closed by `/review-plan`, never by a tracker item.
|