Skip to content

Add revise-planning.sh with a recorded decision per finding - #50

Merged
taspinar merged 2 commits into
mainfrom
feature/46-revise-planning
Oct 2, 2026
Merged

taspinar merged 2 commits into
mainfrom
feature/46-revise-planning

Conversation

@taspinar

@taspinar taspinar commented Oct 2, 2026

Copy link
Copy Markdown
Owner

What changed

  • New ./scripts/revise-planning.sh --review <planning-review-json>, run in the planning worktree with role project-planner, in two phases mirroring triage and apply-triage:
    1. Decide (read-only, structured output): one decision per finding, ADOPT, REJECT, DEFER, or ESCALATE, with a rationale. Validated with the shared library; Critical and Major may only be adopted or escalated; invalid results are retried once. Shown to the human and recorded only after approval as <review>-revision.json with a generated report.
    2. Revise (write session): resolves exactly the adopted findings. Only docs/architecture.md, docs/roadmap.md, and direct Markdown ADRs may change; any other change (requirements, description, review artifacts, ignored files), a commit, or no change at all fails the run and preserves the worktree.
  • Escalated findings are listed with the next step. A stale review is refused. When the write session fails, the recorded decisions are reused on a re-run while the review is still current. After a revision the review is stale, so the next step is a new planning review round.
  • New contract .agents/prompts/planning-reviser.md and schema .agents/schemas/revision.schema.json.
  • Scope snapshots moved from start-planning.sh into scripts/lib/scope.sh (its test suite still passes). The read-only runner in scripts/lib/review-run.sh takes a validator.
  • review-planning.sh and triage-review.sh now point to revise-planning.sh. docs/development.md describes the review ↔ revision loop.

Issue / acceptance criteria

Closes #46

Risk

  • Low
  • Medium
  • High

Verification evidence

  • ./scripts/verify.sh passed (13 checks)
  • Tests added/updated where appropriate (tests/revise-planning-test.sh, also passing under macOS system bash 3.2)
  • Independent review completed when required
  • Architecture/docs/ADR updated when required

Tested with fake agents only; not yet run against a real planner session.

Independent review: Codex (gpt-6-astra), read-only. CHANGES REQUIRED:

  • M1 (a write session that changed nothing was reported as a completed revision): fixed; the planning fingerprint must change, otherwise the decisions are kept for a retry. Tested.
  • MIN1 (a stale review without findings skipped the freshness check): fixed, with a test.
  • MIN2 (not every decision rule was tested): added cases for each rule and a valid deferral.

Not re-reviewed after the fixes.

Agent involvement

Planner: —
Implementer: Claude (Opus 5.5)
Reviewer: Codex (gpt-6-astra)

Production impact

None.

🤖 Generated with Claude Code

taspinar and others added 2 commits October 2, 2026 21:10
revise-planning.sh lets the project planner handle a current planning
review in two phases: read-only, it decides ADOPT, REJECT, DEFER, or
ESCALATE per finding with a rationale, validated like review results;
after approval, the decisions are recorded and a write session resolves
exactly the adopted findings, limited to the architecture, roadmap, and
ADRs. Critical and major findings may only be adopted or escalated.

Scope snapshots move from start-planning.sh into scripts/lib/scope.sh,
and the read-only runner accepts a validator for other result types.

Closes #46

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The review-planning test committed in a cloned repository without a Git
identity, which passed locally through the global configuration and
failed on CI. The clone now sets its identity, and every test suite runs
with GIT_CONFIG_GLOBAL=/dev/null and GIT_CONFIG_NOSYSTEM=1, as on CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@taspinar
taspinar merged commit 3708e92 into main Oct 2, 2026
1 check passed
@taspinar
taspinar deleted the feature/46-revise-planning branch October 2, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add revise-planning.sh with a recorded decision per finding

1 participant