@nklisch/pi-agile-workflow 0.15.3 → 0.16.3
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +8 -0
- package/docs/ARCHITECTURE.md +117 -65
- package/docs/PRINCIPLES.md +84 -18
- package/docs/SPEC.md +70 -2
- package/docs/VISION.md +33 -12
- package/hooks/scripts/prompt-context.py +7 -1
- package/hooks/scripts/test_prompt_context.py +16 -0
- package/package.json +1 -1
- package/scripts/tests/convert-content-integrity.test.sh +4 -4
- package/scripts/tests/convert-review-weight.test.sh +61 -0
- package/scripts/work-view.sh +1 -1
- package/skills/autopilot/SKILL.md +138 -91
- package/skills/convert/SKILL.md +55 -11
- package/skills/epic-design/SKILL.md +37 -70
- package/skills/feature-design/SKILL.md +52 -68
- package/skills/fix/SKILL.md +52 -34
- package/skills/gate-cruft/SKILL.md +69 -24
- package/skills/gate-docs/SKILL.md +12 -5
- package/skills/gate-patterns/SKILL.md +7 -3
- package/skills/gate-refactor/SKILL.md +18 -6
- package/skills/gate-security/SKILL.md +16 -7
- package/skills/gate-tests/SKILL.md +86 -71
- package/skills/implement/SKILL.md +79 -58
- package/skills/implement-orchestrator/SKILL.md +274 -587
- package/skills/perf-design/SKILL.md +11 -12
- package/skills/principles/SKILL.md +175 -379
- package/skills/principles/references/advisory-review.md +76 -0
- package/skills/principles/references/code-design.md +164 -0
- package/skills/principles/references/models.md +42 -63
- package/skills/prose-author/SKILL.md +9 -4
- package/skills/refactor-design/SKILL.md +26 -17
- package/skills/review/SKILL.md +169 -64
- package/skills/review/references/substrate-side-effects.md +17 -10
- package/skills/scope/SKILL.md +20 -7
- package/work-view/crates/cli/.work-view-version +1 -1
- package/work-view/dist/aarch64-apple-darwin/work-view +0 -0
- package/work-view/dist/aarch64-unknown-linux-musl/work-view +0 -0
- package/work-view/dist/x86_64-apple-darwin/work-view +0 -0
- package/work-view/dist/x86_64-unknown-linux-musl/work-view +0 -0
package/docs/VISION.md
CHANGED
|
@@ -36,16 +36,16 @@ The plugin enforces three execution principles:
|
|
|
36
36
|
- **Foundation docs roll forward.** `docs/VISION.md`, `docs/SPEC.md`,
|
|
37
37
|
`docs/ARCHITECTURE.md` describe current truth or intended future state.
|
|
38
38
|
When implementation changes what those docs assert, the docs update to
|
|
39
|
-
match the new truth. No
|
|
40
|
-
|
|
39
|
+
match the new truth. No retained descriptions of superseded behavior or
|
|
40
|
+
migration commentary. Git is the audit trail.
|
|
41
41
|
- **Late-bind everything.** No upfront roadmap. No pre-populated stages.
|
|
42
42
|
No pre-tagged release bindings. Items advance stages when work actually
|
|
43
43
|
completes. Releases bind items only when the user cuts a version.
|
|
44
44
|
|
|
45
|
-
The plugin's `principles` skill loads these alongside
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
The plugin's `principles` skill loads these alongside code-design principles
|
|
46
|
+
for clear boundaries, proportional rigor, code economy, useful tests, and
|
|
47
|
+
continuous simplification. The two paradigms—substrate execution and code
|
|
48
|
+
design—operate together during agile-workflow work.
|
|
49
49
|
|
|
50
50
|
## Who this is for
|
|
51
51
|
|
|
@@ -82,15 +82,36 @@ agile-workflow is complete enough to operate as the supported workflow engine:
|
|
|
82
82
|
- Three-channel plugin distribution metadata: Claude Code marketplace, OpenAI
|
|
83
83
|
Codex marketplace, and Pi packages share the same `skills/` source while
|
|
84
84
|
each channel carries native metadata and ergonomics.
|
|
85
|
+
- Operational skills finish their semantic promise: verified implementation
|
|
86
|
+
continues through a risk-appropriate review lane to `done` by default, while
|
|
87
|
+
an explicit `stop-at-review` request preserves a deliberate handoff boundary.
|
|
88
|
+
Review remains a real, independently evidenced state rather than an inline
|
|
89
|
+
self-approval ceremony.
|
|
90
|
+
- Implementation orchestration derives dependency waves, write ownership,
|
|
91
|
+
isolation, and worker capability from the work's graph, cohesion, repository
|
|
92
|
+
shape, uncertainty, and risk. It preserves dependency/cycle integrity,
|
|
93
|
+
per-wave verification, one commit per item, worker self-containment, and
|
|
94
|
+
conservative parent roll-up without fixed sizing or prompt recipes.
|
|
95
|
+
- Questions and advisory review are consequence-driven: routine reversible
|
|
96
|
+
choices use recorded judgment; strategic or difficult-to-reverse choices get
|
|
97
|
+
an explicit checkpoint; independent review scales through the project's
|
|
98
|
+
high-level review weight while preserving fresh-context deep review. Reviewer
|
|
99
|
+
findings remain proposals: the receiving orchestrator weighs actual repository
|
|
100
|
+
risk, blocks only on material current-cycle concerns, and parks valid
|
|
101
|
+
lower-priority work rather than forcing every suggestion into implementation.
|
|
85
102
|
- Real releases move through scope → design → implement → review →
|
|
86
|
-
release-deploy on the substrate; gates
|
|
87
|
-
|
|
103
|
+
release-deploy on the substrate; gates focus on bound work while following
|
|
104
|
+
relevant evidence into adjacent or system-wide code, distinguish release
|
|
105
|
+
findings from ambient backlog discoveries, and produce durable items. The
|
|
106
|
+
release ships only after every bound item is terminal. Foundation docs roll
|
|
107
|
+
forward, release binding stays late, and terminal retention keeps git as the
|
|
108
|
+
audit trail without leaking obsolete authority.
|
|
88
109
|
|
|
89
110
|
The pattern proves itself when a fresh session in a substrate-bootstrapped repo
|
|
90
|
-
picks up active work without re-feed
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
the present without legacy comments.
|
|
111
|
+
picks up active work without re-feed; when direct production work and autopilot
|
|
112
|
+
both finish decisively while respecting dependency, test-integrity, review, and
|
|
113
|
+
parent-roll-up invariants; and when foundation docs five features later still
|
|
114
|
+
describe the present without legacy comments.
|
|
94
115
|
|
|
95
116
|
## Relationship to workflow
|
|
96
117
|
|
|
@@ -78,7 +78,10 @@ CAPSULES = {
|
|
|
78
78
|
"Ports & Adapters: domain logic stays independent of DB/filesystem/HTTP/time/randomness.",
|
|
79
79
|
"Single Source of Truth: growing variant sets have one registry; types, validation, routing, and display derive from it.",
|
|
80
80
|
"Generated Contracts: boundary types come from schema/router/DB inference or generation instead of hand copies.",
|
|
81
|
-
"
|
|
81
|
+
"Proportional rigor: validate real boundaries; add invariants, edge handling, and determinism only when context warrants them.",
|
|
82
|
+
"Code economy: prefer the shortest clear solution and fewer concepts over speculative generality.",
|
|
83
|
+
"Useful tests: protect important interfaces, complex units, and bug regressions—not every line or surface.",
|
|
84
|
+
"Leave it simpler: when touching an area, eliminate unnecessary code, tests, checks, abstractions, and compatibility paths; ask before reducing guarantees.",
|
|
82
85
|
],
|
|
83
86
|
},
|
|
84
87
|
"dispatch_economy": {
|
|
@@ -92,6 +95,7 @@ CAPSULES = {
|
|
|
92
95
|
"Agents are for breadth, isolation, fresh judgment, or independent write ownership.",
|
|
93
96
|
"Parallelism follows ownership and dependency layers rather than item count.",
|
|
94
97
|
"Dispatch rationale belongs in run notes or the item body when it affects bundling or wave width.",
|
|
98
|
+
"Gate scope: release-bound work is the focus, not a hard boundary; follow concrete evidence and route ambient findings to the unbound backlog.",
|
|
95
99
|
],
|
|
96
100
|
},
|
|
97
101
|
"advisory_review": {
|
|
@@ -104,6 +108,8 @@ CAPSULES = {
|
|
|
104
108
|
"Cross-model peer review applies only when a different model class is available.",
|
|
105
109
|
"Same-model review uses a fresh-context sub-agent rather than inline self-review.",
|
|
106
110
|
"Stories fast-advance on verification; features and epics get deeper review.",
|
|
111
|
+
"Reviewer findings are proposals; the receiving orchestrator judges actual risk in repository context.",
|
|
112
|
+
"Only material current-cycle risk blocks completion; park valid lower-priority findings and continue.",
|
|
107
113
|
"Advisory review is non-blocking during design, but final autopilot completion needs a successful review path.",
|
|
108
114
|
],
|
|
109
115
|
},
|
|
@@ -372,6 +372,22 @@ class RulesLoaderTest(unittest.TestCase):
|
|
|
372
372
|
printed = out.getvalue()
|
|
373
373
|
self.assertIn("Agile Workflow Principles", printed)
|
|
374
374
|
self.assertIn("Code-design capsule", printed)
|
|
375
|
+
self.assertIn("Code economy", printed)
|
|
376
|
+
self.assertIn("Useful tests", printed)
|
|
377
|
+
self.assertIn("ask before reducing guarantees", printed)
|
|
378
|
+
|
|
379
|
+
def test_gate_prompt_emits_wider_scope_rule(self) -> None:
|
|
380
|
+
payload = self._payload(
|
|
381
|
+
session_id="gate-scope", cwd=str(self.root), prompt="gate the release items"
|
|
382
|
+
)
|
|
383
|
+
out = io.StringIO()
|
|
384
|
+
with mock.patch.object(
|
|
385
|
+
prompt_context.sys, "stdin", io.StringIO(json.dumps(payload))
|
|
386
|
+
), mock.patch.object(prompt_context.sys, "stdout", out):
|
|
387
|
+
rc = prompt_context.main()
|
|
388
|
+
self.assertEqual(rc, 0)
|
|
389
|
+
self.assertIn("release-bound work is the focus, not a hard boundary", out.getvalue())
|
|
390
|
+
self.assertIn("ambient findings", out.getvalue())
|
|
375
391
|
|
|
376
392
|
def test_main_sessionstart_emits_rules(self) -> None:
|
|
377
393
|
(self.rules_dir / "a.md").write_text("Rule A body", encoding="utf-8")
|
package/package.json
CHANGED
|
@@ -199,10 +199,10 @@ FAMILY_SKILLS=(
|
|
|
199
199
|
|
|
200
200
|
# grounds_on_rules <skill-md> — true iff the file references the
|
|
201
201
|
# `.agents/rules/*.md` path AND a "force-loaded" grounding descriptor appears
|
|
202
|
-
# within +/- GROUND_WINDOW lines of that path. Window-based so it tolerates
|
|
203
|
-
# line
|
|
204
|
-
#
|
|
205
|
-
GROUND_WINDOW=
|
|
202
|
+
# within +/- GROUND_WINDOW lines of that path. Window-based so it tolerates both
|
|
203
|
+
# line wrapping and compact grounding lists where the path and the re-read
|
|
204
|
+
# instruction are neighboring bullets, without weakening to a bare path match.
|
|
205
|
+
GROUND_WINDOW=5
|
|
206
206
|
grounds_on_rules() {
|
|
207
207
|
local md="$1"
|
|
208
208
|
local total; total="$(wc -l < "$md")"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Structural contract test for review_weight handling in convert/SKILL.md.
|
|
3
|
+
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
SKILL_MD="${SCRIPT_DIR}/../../skills/convert/SKILL.md"
|
|
8
|
+
PASS=0
|
|
9
|
+
FAIL=0
|
|
10
|
+
|
|
11
|
+
assert_contains() {
|
|
12
|
+
local label="$1" block="$2" pattern="$3"
|
|
13
|
+
if printf '%s' "$block" | grep -Fq -- "$pattern"; then
|
|
14
|
+
echo " PASS: $label"
|
|
15
|
+
((PASS++))
|
|
16
|
+
else
|
|
17
|
+
echo " FAIL: $label"
|
|
18
|
+
((FAIL++))
|
|
19
|
+
fi
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
extract_block() {
|
|
23
|
+
local start="$1" end="$2"
|
|
24
|
+
awk -v start="$start" -v end="$end" '
|
|
25
|
+
$0 == start { collecting = 1 }
|
|
26
|
+
collecting && $0 == end { collecting = 0 }
|
|
27
|
+
collecting { print }
|
|
28
|
+
' "$SKILL_MD"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if [ ! -f "$SKILL_MD" ]; then
|
|
32
|
+
echo "FAIL: convert/SKILL.md not found at $SKILL_MD" >&2
|
|
33
|
+
exit 1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
INTERVIEW_BLOCK="$(extract_block '### Phase 3: Conventions interview' '### Phase 4: Create substrate skeleton')"
|
|
37
|
+
WRITE_BLOCK="$(extract_block '### Phase 5: Write CONVENTIONS.md' '### Phase 6: Write the canonical AGENTS.md section')"
|
|
38
|
+
AUDIT_BLOCK="$(extract_block '### Phase S1: Audit substrate health' '### Phase S2: Plan the sync')"
|
|
39
|
+
PRESERVE_BLOCK="$(extract_block '### Phase S4: Preserve user state' '### Phase S5: Commit')"
|
|
40
|
+
|
|
41
|
+
assert_contains "bootstrap keeps the six-question interview" "$INTERVIEW_BLOCK" \
|
|
42
|
+
'Six questions, in order'
|
|
43
|
+
assert_contains "review weight adds no interview question" "$INTERVIEW_BLOCK" \
|
|
44
|
+
'not another interview question'
|
|
45
|
+
assert_contains "fresh bootstrap writes the standard default" "$WRITE_BLOCK" \
|
|
46
|
+
'review_weight: standard'
|
|
47
|
+
assert_contains "all five values are discoverable" "$WRITE_BLOCK" \
|
|
48
|
+
'none | light | standard | thorough | maximum'
|
|
49
|
+
assert_contains "missing setting resolves to standard" "$WRITE_BLOCK" \
|
|
50
|
+
'is absent, review and autopilot resolve it to `standard`'
|
|
51
|
+
assert_contains "convert points to canonical policy" "$WRITE_BLOCK" \
|
|
52
|
+
'principles/SKILL.md` Part IV and `review/SKILL.md'
|
|
53
|
+
assert_contains "sync accepts absence without migration" "$AUDIT_BLOCK" \
|
|
54
|
+
'sync neither inserts the default into older projects'
|
|
55
|
+
assert_contains "sync preserves existing values" "$PRESERVE_BLOCK" \
|
|
56
|
+
'preserve an existing value byte-for-byte'
|
|
57
|
+
assert_contains "sync never resets the setting" "$PRESERVE_BLOCK" \
|
|
58
|
+
'never added, reset, or rewritten by sync'
|
|
59
|
+
|
|
60
|
+
printf '\nResults: %d passed, %d failed\n' "$PASS" "$FAIL"
|
|
61
|
+
[ "$FAIL" -eq 0 ]
|
package/scripts/work-view.sh
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
24
24
|
# Kept in lockstep with plugin.json by scripts/bump-version.sh. Do not hand-edit.
|
|
25
|
-
WORK_VIEW_VERSION="0.
|
|
25
|
+
WORK_VIEW_VERSION="0.16.3"
|
|
26
26
|
|
|
27
27
|
# ============================================================================
|
|
28
28
|
# Version prelude (POSIX / bash 3.2 safe — runs BEFORE the Bash-4 guard)
|
|
@@ -6,9 +6,10 @@ description: >
|
|
|
6
6
|
make autonomous progress on the substrate. Reads .work/active/, picks ready items by depends_on and
|
|
7
7
|
stage, delegates to design, implement, and review skills, commits transitions, and repeats until the
|
|
8
8
|
scope is done or blocked. Before reporting complete, runs a final peer-review/fresh-context
|
|
9
|
-
completion pass
|
|
10
|
-
|
|
11
|
-
active work; free-text scope
|
|
9
|
+
completion pass, adjudicates reviewer proposals, fixes material blockers, and parks lower-risk
|
|
10
|
+
valid findings. No /loop or --resume mechanics; the harness goal/continuation feature owns
|
|
11
|
+
long-running persistence. Epic-scoped by default; --all drains all active work; free-text scope
|
|
12
|
+
directives are allowed.
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
# Autopilot
|
|
@@ -45,8 +46,9 @@ running inline, use the same categories in the final summary:
|
|
|
45
46
|
|
|
46
47
|
- **Complete** when no in-scope active item remains at `drafting`,
|
|
47
48
|
`implementing`, or `review`.
|
|
48
|
-
- **Blocked** when in-scope items remain but none are ready
|
|
49
|
-
blocker
|
|
49
|
+
- **Blocked** when in-scope items remain but none are ready or an item has a
|
|
50
|
+
genuine hard blocker that autonomous diagnosis and correction cannot resolve.
|
|
51
|
+
Review bounce count alone is never a blocker.
|
|
50
52
|
- **Interrupted** when the user stops the run. Finish the current safe
|
|
51
53
|
transition, commit if anything changed, summarize the remaining queue, and
|
|
52
54
|
let the harness/user decide whether to continue the goal later.
|
|
@@ -56,6 +58,9 @@ running inline, use the same categories in the final summary:
|
|
|
56
58
|
- `autopilot <epic-id>` - drain items under `<epic-id>` transitively via the
|
|
57
59
|
parent chain until the scoped queue is done or blocked.
|
|
58
60
|
- `autopilot --all` - drain all `.work/active/` items.
|
|
61
|
+
- `autopilot --review-weight <level> <scope>` - set review effort to `none`,
|
|
62
|
+
`light`, `standard`, `thorough`, or `maximum` for item reviews and final
|
|
63
|
+
completion review. An unambiguous natural-language equivalent is also valid.
|
|
59
64
|
- `autopilot <free-text>` - interpret as a scope directive, such as "finish the
|
|
60
65
|
dangling work", "wrap up phase 14", or "drain everything tagged refactor".
|
|
61
66
|
Log the interpretation in the run summary. When scope is ambiguous, prefer the
|
|
@@ -97,16 +102,23 @@ Build the scope from the argument:
|
|
|
97
102
|
Only active items are candidates. Backlog items must be promoted through
|
|
98
103
|
`scope` before autopilot can touch them.
|
|
99
104
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
Resolve worker capability and review weight at kickoff without a routine tier
|
|
106
|
+
question.
|
|
107
|
+
|
|
108
|
+
For worker capability, honor an explicit goal/argument/caller choice first, then
|
|
109
|
+
a stable `.work/CONVENTIONS.md` choice. Otherwise choose from scope and risk:
|
|
110
|
+
bounded familiar work can use baseline capability; cross-cutting, contract, or
|
|
111
|
+
uncertain work warrants raised capability; architectural, security-critical, or
|
|
112
|
+
high-consequence work warrants the highest available capability. This is
|
|
113
|
+
judgment, not a fixed item-kind mapping. Record the effective choice and reason
|
|
114
|
+
in the run summary and pass it in the Phase 4 caller note.
|
|
115
|
+
|
|
116
|
+
For `review_weight`, validate the five-level scale and resolve in this order:
|
|
117
|
+
explicit `--review-weight` or unambiguous natural-language selector,
|
|
118
|
+
`.work/CONVENTIONS.md`, then the default `standard`. Explicit caller selection
|
|
119
|
+
always wins. Record the effective weight and source in the run summary and pass
|
|
120
|
+
it in every Phase 4 caller note so production and review skills use one value
|
|
121
|
+
through parent roll-up and final completion review.
|
|
110
122
|
|
|
111
123
|
### Phase 2: Build The Queue
|
|
112
124
|
|
|
@@ -147,18 +159,22 @@ this caller note in every delegated prompt:
|
|
|
147
159
|
|
|
148
160
|
> Delegated by an active agile-workflow autopilot goal for `<scope>`. Resolve
|
|
149
161
|
> ambiguities with judgment, log rationale in the item body, and do not ask
|
|
150
|
-
> strategic questions unless a hard halt condition applies.
|
|
151
|
-
> for this run: `<
|
|
152
|
-
>
|
|
153
|
-
>
|
|
154
|
-
>
|
|
155
|
-
>
|
|
156
|
-
>
|
|
157
|
-
>
|
|
158
|
-
>
|
|
159
|
-
>
|
|
160
|
-
>
|
|
161
|
-
>
|
|
162
|
+
> strategic questions unless a hard halt condition applies. Worker capability
|
|
163
|
+
> for this run: `<effective capability>` — selected because `<risk/scope reason>`;
|
|
164
|
+
> use it for dispatch and do not re-ask. Review weight for this run:
|
|
165
|
+
> `<none|light|standard|thorough|maximum>` (source: `<explicit|project|default>`);
|
|
166
|
+
> pass it unchanged to review, including ancestor roll-up. Apply the risk-driven
|
|
167
|
+
> advisory policy from `principles/SKILL.md` Part IV in direct and autopilot
|
|
168
|
+
> modes: use independent review only when the risk and review weight warrant it,
|
|
169
|
+
> and label review cross-model only when a different model class is actually
|
|
170
|
+
> selected. Treat reviewer findings as proposals: independently adjudicate them
|
|
171
|
+
> against repository context, fix or activate only material current-cycle
|
|
172
|
+
> blockers, and park valid lower-risk work in the unbound backlog. Peer failures
|
|
173
|
+
> during design are non-blocking. Preserve complementary→adversarial order when
|
|
174
|
+
> both phases run. For reviewer posture and
|
|
175
|
+
> host-native roles, load `principles/references/subagents.md`; for capability
|
|
176
|
+
> mapping, load `principles/references/models.md`. A top-tier reasoning peer may
|
|
177
|
+
> take 10 to 30 minutes; quiet output after a few minutes is not a hang.
|
|
162
178
|
|
|
163
179
|
Routing:
|
|
164
180
|
|
|
@@ -185,40 +201,54 @@ Routing:
|
|
|
185
201
|
Requires the `agentic-research` plugin; without it, treat as a plain implementing item ->
|
|
186
202
|
`implement-orchestrator`, mirroring the drafting row's degrade.)
|
|
187
203
|
- `stage: implementing`, non-epic (and NOT `tags: [prose]` or `[research]`) -> `implement-orchestrator <scope>`
|
|
188
|
-
- `stage: review` -> `review
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
204
|
+
- `stage: review` -> `review --review-weight <effective weight> <id>`. Review
|
|
205
|
+
selects effort and lane from weight + risk + evidence + kind-as-heuristic:
|
|
206
|
+
low-risk stories can close on green verification, while features, epics, and
|
|
207
|
+
risk-escalated stories receive the fresh-context coverage permitted by the
|
|
208
|
+
weight. The review skill also rolls approved children through eligible
|
|
209
|
+
ancestors, but never skips an ancestor's own review.
|
|
210
|
+
|
|
211
|
+
Production skills now continue through review to `done` by default (unless an
|
|
212
|
+
explicit stop-at-review override applies), so autopilot may return to a queue
|
|
213
|
+
where the delegated item and eligible ancestors are already terminal. This is
|
|
214
|
+
expected, not a mandatory user handoff. The delegated skill owns its internal
|
|
215
|
+
workflow and transitions; after it returns, rebuild the queue from disk rather
|
|
216
|
+
than relying on cached state.
|
|
199
217
|
|
|
200
218
|
If a delegated skill reports a hard blocker without a stage transition, append
|
|
201
219
|
a `## Blocker` section to the item body, commit that note, and continue with
|
|
202
220
|
other ready items. The final goal outcome is blocked if unresolved blockers
|
|
203
221
|
remain in scope.
|
|
204
222
|
|
|
205
|
-
### Phase 5: Review
|
|
223
|
+
### Phase 5: Review Convergence Loop
|
|
206
224
|
|
|
207
|
-
Track per-item
|
|
225
|
+
A review bounce is corrective work, not a human handoff. Track per-item bounces
|
|
226
|
+
only as diagnostic history:
|
|
208
227
|
|
|
209
228
|
```text
|
|
210
229
|
bounces[<item-id>] = times this item has gone implementing -> review -> implementing
|
|
211
230
|
```
|
|
212
231
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
1.
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
232
|
+
After every bounce:
|
|
233
|
+
|
|
234
|
+
1. Confirm the receiving agent—not the reviewer alone—adjudicated the proposals
|
|
235
|
+
and left concrete, receiver-confirmed blockers in the item body.
|
|
236
|
+
2. Park valid findings below the material current-cycle bar in the unbound
|
|
237
|
+
backlog; they do not keep the item bounced or enter this run's queue.
|
|
238
|
+
3. Rebuild the queue so the item naturally re-enters implementation.
|
|
239
|
+
4. Implement the blockers, run the relevant verification, and send the item
|
|
240
|
+
through review again.
|
|
241
|
+
5. Continue until review approves the item or autonomous work reaches a genuine
|
|
242
|
+
hard blocker under `principles/SKILL.md` Part III.
|
|
243
|
+
|
|
244
|
+
There is no fixed bounce limit. If the same material finding survives more than
|
|
245
|
+
one correction pass, treat recurrence as evidence that the attempted fix or
|
|
246
|
+
design model may be wrong: re-read the item and foundation docs, diagnose the
|
|
247
|
+
root cause, revise the item design or implementation notes when needed, and use
|
|
248
|
+
a fresh implementation or review context when that would add independent
|
|
249
|
+
judgment. Recurrence alone never elevates a low-risk finding into a blocker. Do
|
|
250
|
+
not park the active item at `review`, label it stuck, or require human
|
|
251
|
+
intervention solely because a counter reached two (or any other number).
|
|
222
252
|
|
|
223
253
|
### Phase 6: Refactor Cadence (`--all` Only)
|
|
224
254
|
|
|
@@ -249,10 +279,11 @@ Do not stop because of elapsed time, context size, or "long run" concerns. The
|
|
|
249
279
|
harness owns continuation. Your job is to keep applying the queue policy until a
|
|
250
280
|
real stop rule fires.
|
|
251
281
|
|
|
252
|
-
### Phase 8: Final
|
|
282
|
+
### Phase 8: Final Completion Review Loop
|
|
253
283
|
|
|
254
284
|
This is the last step before reporting `complete`. It runs in addition to any
|
|
255
|
-
design-time
|
|
285
|
+
design-time advisory passes from delegated skills and is calibrated by the same
|
|
286
|
+
effective `review_weight`; the phase itself is never skipped.
|
|
256
287
|
|
|
257
288
|
When the scoped queue appears drained:
|
|
258
289
|
|
|
@@ -263,39 +294,49 @@ When the scoped queue appears drained:
|
|
|
263
294
|
- commits associated with advanced items
|
|
264
295
|
- notable design decisions, implementation deviations, blockers resolved,
|
|
265
296
|
and verification results reported by delegated skills
|
|
266
|
-
2.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
297
|
+
2. Calibrate the completion review from the weight without turning it into a
|
|
298
|
+
rigid dispatch recipe:
|
|
299
|
+
- `none`: run no independent reviewer; administratively verify the completion
|
|
300
|
+
bundle has green verification and acceptance evidence for every in-scope
|
|
301
|
+
item, plus internally consistent terminal substrate state.
|
|
302
|
+
- `light`: use at most one focused fresh-context pass over the bundle.
|
|
303
|
+
- `standard`: use balanced risk-based fresh-context review.
|
|
304
|
+
- `thorough`: increase complementary and adversarial fresh-context coverage.
|
|
305
|
+
- `maximum`: seek multi-model, multi-pass complementary → adversarial review.
|
|
306
|
+
Ask for bugs, missed acceptance criteria, unreviewed risks, foundation-doc
|
|
307
|
+
drift, and substrate-state inconsistencies that would make "complete"
|
|
308
|
+
premature. Exact reviewer count and pass depth remain model judgment within
|
|
309
|
+
the weight's ceiling/intent.
|
|
310
|
+
3. When independent review runs, use a different-class peer when reachable;
|
|
311
|
+
otherwise spawn a generic same-harness fresh-context reviewer from
|
|
312
|
+
`principles/references/subagents.md` with the strongest appropriate
|
|
313
|
+
capability. Label it cross-model only if the selected model class differs
|
|
314
|
+
from the host. A top-tier reviewer may take 10 to 30 minutes; quiet output
|
|
315
|
+
after a few minutes is not a hang.
|
|
316
|
+
4. If the effective weight requires fresh-context review and no such path is
|
|
317
|
+
available or the selected path fails, do not report completion; mark the run
|
|
318
|
+
blocked on final review and include the reason. `none` requires complete
|
|
319
|
+
administrative evidence instead of a fresh reviewer; missing evidence blocks
|
|
320
|
+
rather than becoming an invented pass.
|
|
321
|
+
5. The receiving autopilot agent adjudicates every proposed finding against the
|
|
322
|
+
repository's acceptance criteria, users and deployment shape, likelihood,
|
|
323
|
+
blast radius, recoverability, safeguards, and delay cost. Reviewer severity
|
|
324
|
+
is evidence, not the verdict:
|
|
325
|
+
- Receiver-confirmed material current-cycle blocker: fix it immediately when
|
|
326
|
+
small and safe, or create/update an active item at the right stage
|
|
327
|
+
(`drafting` for design gaps, `implementing` for concrete fixes); verify,
|
|
328
|
+
commit, and rebuild the queue.
|
|
329
|
+
- Valid but below the blocker bar: park an unbound backlog item with a brief
|
|
330
|
+
risk rationale, commit it, and continue. It does not reopen the drained
|
|
331
|
+
scope or prevent completion.
|
|
332
|
+
- Nit or unsupported/inapplicable claim: note or reject it with a one-line
|
|
333
|
+
rationale; do not create active work.
|
|
293
334
|
6. If rebuilding the queue finds new or regressed `drafting`, `implementing`, or
|
|
294
|
-
`review` items in scope, return to Phase 2 and drain them.
|
|
295
|
-
|
|
296
|
-
7. Once the final review path succeeds,
|
|
297
|
-
|
|
298
|
-
as complete.
|
|
335
|
+
`review` items in scope, return to Phase 2 and drain them. Parked review
|
|
336
|
+
follow-ups remain outside autopilot scope until separately promoted.
|
|
337
|
+
7. Once the final review path succeeds, every proposal is adjudicated, no
|
|
338
|
+
receiver-confirmed blocker remains, and the queue is still empty, report the
|
|
339
|
+
goal as complete.
|
|
299
340
|
|
|
300
341
|
Record the final review in the autopilot final summary. Do not paste the full
|
|
301
342
|
peer transcript into item bodies; summarize accepted/rejected points where they
|
|
@@ -308,23 +349,29 @@ Narrate briefly as items advance. Final summary:
|
|
|
308
349
|
- Goal scope and interpretation
|
|
309
350
|
- Items advanced to done
|
|
310
351
|
- Items reviewed and approved
|
|
311
|
-
- Items reviewed and bounced
|
|
312
|
-
-
|
|
352
|
+
- Items reviewed and bounced, including recurring findings and how they converged
|
|
353
|
+
- Genuinely blocked item ids and blocker reasons
|
|
313
354
|
- Refactor cadences run (`--all` only)
|
|
314
355
|
- Implement-orchestrator bundle summary, if reported
|
|
315
|
-
-
|
|
316
|
-
|
|
356
|
+
- Effective worker capability and selection rationale
|
|
357
|
+
- Effective review weight and source
|
|
358
|
+
- Final completion-review status: administrative, cross-model, same-harness
|
|
359
|
+
fresh-context, or failed; summarize blockers fixed/activated, lower-risk
|
|
360
|
+
findings parked, and proposals rejected
|
|
317
361
|
- Goal outcome: complete, blocked, or interrupted
|
|
318
362
|
|
|
319
363
|
## Guardrails
|
|
320
364
|
|
|
321
365
|
- Never use structured question tool while an autopilot goal is actively driving the
|
|
322
366
|
delegated work. Resolve with judgment and log rationale.
|
|
323
|
-
- Do not report `complete` until Phase 8 has run successfully
|
|
324
|
-
|
|
367
|
+
- Do not report `complete` until Phase 8 has run successfully at the effective
|
|
368
|
+
review weight, every proposal has been adjudicated, and all receiver-confirmed
|
|
369
|
+
material blockers have been fixed or filed into the active queue. Parked
|
|
370
|
+
lower-risk findings do not block completion.
|
|
325
371
|
- Commit after every item state change or blocker note.
|
|
326
372
|
- Do not push, force-push, or release; the user controls publication.
|
|
327
|
-
- Do not
|
|
328
|
-
|
|
373
|
+
- Do not drain or promote `.work/backlog/`; it is outside autopilot scope.
|
|
374
|
+
Review disposition may park valid lower-priority findings there without
|
|
375
|
+
reopening the run.
|
|
329
376
|
- The substrate is the resume point. No `PROGRESS.md`, no watchdog loops, no
|
|
330
377
|
`--resume`.
|