Repository navigation
fix(skills): handle in-attempt scope amendments without user approval - #87
Conversation
Keep an in-scope finding discovered during the active attempt's required validation inside the same reservation through a verified scope-amendment record. Escalate only genuine product, design, security, high-risk, or accounting decisions. Compress the main skill with progressive disclosure: move repair thresholds and amendment conditions to references/policy.md, and the setup checklist to references/prepare.md. Keep the stage workflow inline and extend the gate tests to cover the new references. Signed-off-by: Pat Losoponkul <[email protected]>
PR review/repair — repair start
|
- Add security/custody policy to human-decision and escalation boundaries. - Restore threshold clauses dropped when extracting references/policy.md. - Make scope amendments reachable on validation discovery and restore the blocked-recovery escalation catch-all. - Remove the unannounced retry of the reserved attempt. - Replace the vacuous gate assertion with real boundary assertions. Tests: node tests/run.mjs (411 passed, 1 skipped).
Repairs delivered — final review pendingResolved
Findings: 0 open blockers · 0 unresolved investigations · 8 report-only (recorded in the audit). Validation: Scope: The requirement source is self-referential — there is no linked issue, and the PR edits its own capability spec. No runtime adherence test exists, so impacts are contract-reading findings. Full Reviewed: Full review reports, ledger, and audit detailsStandards reportStandards axis — PR review/repair scope-amendment change (base Verified: HARD (documented standard / internal contradiction)
JUDGEMENT CALLS (baseline smells)
No misdirected links found: Spec reportSpec review — base Verdict: core requirement implemented and coherent, but with one wrong cross-reference, one missing requirement clause, and two real spec/skill contradictions. Gate tests pass ( ** (a) Missing / partial requirements**
** (b) Scope creep**
** (c) Implemented but wrong / contradictory**
** (d) Reference agreement** Count preservation is consistent across spec ("without incrementing the count"), Gate coverage
Coverage limitation No issue and no OpenSpec change directory exist; requirements are self-referential (PR body + post-change capability spec authored alongside the code), so this review cannot distinguish an unmet intent from an intent never recorded. Judge ledger
Prior-ID reconciliation: none — first review/judgment for this run; no prior comments, reviews, or repair starts on PR 87. Audit recordRun identity: PR #87 · run Repair evidence. Five files changed: Validation. Delivery receipts. Signed commit Coverage limitation. Requirements are self-referential: no linked issue and no |
PR review/repair — repair start
|
Align the scope-amendment and escalation boundaries with the unchanged material-repair threshold so consequential architecture changes still require human input. Restore new-requirements/product-behavior and security/custody wording in the spec scenarios and harden the gate. Tests: node tests/run.mjs (411 passed, 1 skipped).
Repairs delivered — final review pendingResolved
Findings: 0 open blockers · 0 unresolved investigations · 10 report-only (recorded in the audit; Validation: Scope: Requirements remain self-referential — no linked issue and no OpenSpec change; the PR edits its own capability spec. No runtime adherence test exists. Reviewed: Round-2 reports, full ledger, and audit detailsRound-1 complete reports, ledger, and delivery receipts: summary comment 6332039771. Round-1 findings Round-2 Standards reportStandards-axis review (read-only; HEAD verified = e53caa8).
Tally: 2 hard violations, 5 judgement calls. Round-2 Spec reportCoverage limitation (stated, not a defect). Requirement source is circular: the PR body and the spec delta in the same diff both describe the behaviour, and there is no issue or
README, PR body, and SKILL agree on the amendment rule (d); the spec is the outlier per 2, 4, 5. Round-2 judge ledger
Prior-ID reconciliation: every round-1 actionable ID ( Audit recordRun identity: PR #87 · run Repair evidence. Six files changed: Validation. Delivery receipts. Signed commit Coverage limitation. Requirements remain self-referential: no linked issue and no |
PR review/repair — repair start
|
Apply biome formatting to the gate assertion and add a catch-all escalation for corrections that fail the in-attempt amendment conditions, so non-consequential public-contract changes cannot slip past both the amendment boundary and the human-input list. Tests: nix flake check -L; node tests/run.mjs (411 passed, 1 skipped).
Repairs delivered — final review pendingResolved
Findings: 0 open blockers · 0 unresolved investigations · 16 report-only (recorded in the audit; no report-only item was edited). Validation: at the repaired source, Scope: Requirements remain self-referential — no linked issue and no OpenSpec change; the PR edits its own capability spec. No runtime adherence test exists. The full Nix gate was run locally; live-model semantic suites were not run. Reviewed: Round-3 reports, full ledger, and audit detailsPrior complete records:
Round-3 Standards reportHard violations:
Contract consistency:
Round-3 Spec report(a) Missing or partial
(b) Not asked for All four PR-body bullets are implemented. Beyond them: the spec's completion clause generalizes to "Mechanical in-scope scope amendments and other orchestrator-owned accounting actions SHALL be recorded and continued rather than escalated" — "other orchestrator-owned accounting actions" is an unnamed, unbounded exemption class absent from the PR body. Also unsourced: policy.md's "is not high-risk (gate-blocking alone does not make it high-risk)". (c) Implemented but wrong / self-contradictory
(d) Spec ↔ skill agreement Escalation boundaries, attempt counting ("keeps the same attempt count" / "KEEPS repairs used unchanged"), the ten-attempt cap, resume identity, and record-before-edits ordering ("posts and verifies an append-only scope amendment" / "POST and VERIFY ... before editing") agree. README ("may be added by a verified scope amendment without consuming another attempt") agrees but drops the pre-edit ordering. Divergences are the three above. Round-3 judge ledger
Prior-ID reconciliation: every round-1 actionable ID ( Audit recordRun identity: PR #87 · run Repair evidence. Four files changed: Validation. Delivery receipts. Signed commit Coverage limitation. Requirements remain self-referential: no linked issue and no |
Review complete — verifiedNo repair-worthy findings remain. Both axes reviewed the full PR diff at Findings: 0 blockers · 0 unresolved investigations · 23 report-only (recorded in the audit; Repairs: 3/10 attempts used — Validation: Scope: Requirements are self-referential — no linked issue and no OpenSpec change; the PR edits its own capability spec. Review coverage is complete over the diff, but intent cannot be independently validated, and no live orchestrator adherence run was performed. The Reviewed: Round-4 reports, full ledger, and audit detailsPrior complete records:
Round-4 Standards reportStandards axis sub-agent report (fresh, read-only; verified HEAD Documented-standard issues
Baseline smells (judgement calls)
The second subsumes the first, and "recovery" never says whether an in-attempt amendment counts as recovery, so line 2 can contradict
Positives: all new links resolve ( Round-4 Spec reportSpec axis sub-agent report (fresh, read-only; verified HEAD (a) Missing or partial
(b) Not asked for
(c) Implemented but questionable
Coverage limitation Requirement source is self-referential: PR body and spec were authored by this diff; no issue/OpenSpec change exists, so "missing requirement" judgment is bounded by the PR body's Summary. Gate tests assert phrase presence, not cross-file symmetry — commits Round-4 judge ledger
Prior-ID reconciliation: every prior actionable ID — Audit recordRun identity: PR #87 · run Final-round evidence. Round 4 performed a fresh two-axis review over the full diff Validation. Required Delivery state. Round 4 adds no commit or push. This comment is the final PR decision record. The PR is open and ready for the user's merge decision; merging remains with the user. Coverage limitation. Requirements are self-referential: no linked issue and no |
Summary
pr-review-repairwith progressive disclosure:references/policy.md;references/prepare.md;Why
A test-only finding discovered during validation should not freeze the repair loop for a decision the orchestrator already owns. The skill now records an append-only amendment, keeps the active reservation and attempt count, and continues.
Verification
npm run lintnpm run typechecknpm test— 411 passed, 1 skipped