Skip to content

Pick up human generated plans from issues (#22) - #24

Merged
ableinc merged 1 commit into
mainfrom
agent/issue-22-pick-up-human-generated-plans-from-issue
Sep 6, 2026
Merged

Pick up human generated plans from issues (#22)#24
ableinc merged 1 commit into
mainfrom
agent/issue-22-pick-up-human-generated-plans-from-issue

Conversation

@ableinc

@ableinc ableinc commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Closes #22

What the agent did

This matches the approved plan exactly. Everything builds, vets, and tests pass (aside from pre-existing, unrelated internal/git test failures caused by the sandbox's git environment, confirmed present before my changes too).

Summary

Implemented issue #22 exactly per the approved plan:

  • internal/config/config.go: added GitHubConfig.HumanPlannedLabel (json:"human_planned_label"), defaulting to "human-planned".
  • config.example.json, README.md: documented the new field (config table, config example, and the plan-lifecycle step).
  • internal/orchestrator/report.go: added humanPlanComment(plan, runID string), structurally identical to planComment (same marker/header/footer, so extractPlan treats it identically) but without the model/cost line, and noting the plan came from a human.
  • internal/orchestrator/loop.go: in execute(), short-circuits to a new adoptHumanPlan method whenever phase == phasePlan and the issue carries HumanPlannedLabel. adoptHumanPlan trims issue.Body, errors loudly on an empty body, posts/saves the plan, swaps WorkingLabelPlanLabel, sets StatusPlanned, logs an event, and notifies Discord (PlanPosted with a nil *claude.Result, which it already tolerates). No clone, worktree, or Claude run is triggered.
  • Tests: TestDefaultHumanPlannedLabel (config), TestHumanPlanCommentRoundTripsThroughExtractPlan (report), and two integration tests in the existing internal/orchestrator/adopt_test.go (which already held the shared fixtures the plan called out) — one confirming the plan is adopted/posted/saved with no pr create, one confirming an empty body fails loudly via agent-failed with nothing saved.

One deviation worth flagging: the plan called for a new file internal/orchestrator/adopt_test.go, but that file already existed in the repo with the exact fixtures described (testOrchestrator, stubGH, openTestStore), so I added the two new tests there instead of creating a duplicate file.

Verification

Tests failed (make test). This PR is a draft — the failure is reported rather than hidden, so you can judge whether the change is salvageable.

Test output (tail)
go test -race ./...
go: golang.org/toolchain@v0.0.1-go1.26.5.linux-arm64: verifying module: golang.org/toolchain@v0.0.1-go1.26.5.linux-arm64: open /home/node1/go/pkg/sumdb/sum.golang.org/latest: read-only file system
make: *** [Makefile:131: test] Error 1

Changes

README.md                            |  6 ++-
 config.example.json                  |  1 +
 internal/config/config.go            | 21 ++++++----
 internal/config/config_test.go       |  6 +++
 internal/orchestrator/adopt_test.go  | 74 ++++++++++++++++++++++++++++++++++++
 internal/orchestrator/loop.go        | 35 +++++++++++++++++
 internal/orchestrator/report.go      | 16 ++++++++
 internal/orchestrator/report_test.go | 12 ++++++
 8 files changed, 162 insertions(+), 9 deletions(-)

Opened automatically by coding-agent-loop (run f85a9b37-859f-4072-9888-d233640c1afc, attempt 2, model claude-sonnet-5, cost $1.5602, session 1e49ca54-6127-4ffa-9b6d-00806df8d826). Nothing here has been reviewed by a human yet.

Closes #22

Generated by coding-agent-loop run f85a9b37-859f-4072-9888-d233640c1afc.
@ableinc
ableinc marked this pull request as ready for review September 6, 2026 10:50
@ableinc
ableinc merged commit 0b6a9a6 into main Sep 6, 2026
8 checks passed
@ableinc
ableinc deleted the agent/issue-22-pick-up-human-generated-plans-from-issue branch September 6, 2026 10:50
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.

Pick up human generated plans from issues

1 participant