Skip to content

Require a human-approved plan before implementing an issue - #3

Merged
ableinc merged 2 commits into
mainfrom
feature/plan-approve-implement
Aug 21, 2026
Merged

Require a human-approved plan before implementing an issue#3
ableinc merged 2 commits into
mainfrom
feature/plan-approve-implement

Conversation

@ableinc

@ableinc ableinc commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Every labelled issue now gets a plan posted as a comment before any code is written; the daemon only implements once a human replies exactly implement on that comment. Any other reply is treated as feedback and triggers a revised plan.
  • models.json gains a plan role alongside implement and triage, each with its own model ladder (internal/models/registry.go).
  • New internal/orchestrator/phase.go reads an issue's comment history — tagging the harness's own comments with an invisible marker — to decide plan / wait / implement before anything is claimed.
  • The plan run is read-only (claude.plan_permission_mode, default plan) and never commits, verifies, pushes, or opens a PR; it just saves the plan and comments it back.
  • New agent-planned label and a plans table in SQLite track the latest pending/approved plan per issue.
  • Retry ladder demotion now keys off failure count rather than attempt count, since a successful plan run no longer demotes the implement run that follows it.
  • README updated to describe the new plan → approve → implement lifecycle and config fields.

Test plan

  • go build ./...
  • go vet ./...
  • go test ./... (all packages pass, including new phase_test.go / prompt_test.go / store plan tests)
  • go run ./cmd -config config.example.json -check — boot log shows both plan_ladder and implement_ladder
  • Live end-to-end against a real labelled issue (plan comment appears → feedback triggers a revision → implement reply runs the change and opens the draft PR)

🤖 Generated with Claude Code

ableinc and others added 2 commits August 21, 2026 19:41
Every issue now gets a plan posted as a comment before any code is
written; work only starts once a human replies exactly "implement".
Any other reply is treated as feedback and triggers a revised plan.

- models.json gains a "plan" role alongside "implement" and "triage",
  with its own model ladder
- decidePhase reads an issue's comment history (tagging the harness's
  own comments with a marker) to choose plan / wait / implement
- the plan run is read-only (claude.plan_permission_mode) and never
  commits, verifies, pushes, or opens a PR
- new agent-planned label and a plans table in the store track the
  latest approved/pending plan
- retry ladder demotion now keys off failure count rather than
  attempt count, since a successful plan run no longer demotes the
  implement run that follows it

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ableinc
ableinc merged commit 110c9c4 into main Aug 21, 2026
6 checks passed
@ableinc
ableinc deleted the feature/plan-approve-implement branch August 21, 2026 23:47
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.

1 participant