feat: issue-level implement_issue reasoner — use SWE-AF as a sub-harness#99
Merged
Conversation
Sub-harness surface: a main coding harness (Claude Code/Codex/OpenCode) delegates one fully-scoped issue; no planning agents run. Deterministic git setup creates an isolated worktree + issue/<build_id>-<slug> branch, the existing coding loop implements it (reduced iteration budget), an optional single verifier pass checks the acceptance criteria, and the branch is returned as the deliverable. PR/CI stay off by default — the caller owns merge and CI. Concurrent calls on one repo are safe (worktree-per-call). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both node apps include the shared issue_router, exposing swe-planner.implement_issue and swe-fast.implement_issue. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1:1 behavioural port of swe_af/issue/*: spec parsing + slug, deterministic git ops (worktree/branch/checkpoint-commit/local-excludes), the implement_issue orchestrator driving coding.RunCodingLoop, and IssueBuildConfig in internal/config. Registered on BOTH Go nodes with the same reasoner name and input schema; node surface tests updated to 31/30. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
README section for main-harness authors (Claude Code/Codex/OpenCode): when to use implement_issue vs build, async curl + webhook/poll recipes, result shape, config table, fan-out guidance. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ships a ready-made skill for a main Claude Code harness: preflight, issue composition, async delegation with a fan-out cap, progress tracking, and branch collection/merge. Narrows the .claude/ gitignore so versioned skills ship while local Claude Code state stays ignored. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Found in live testing: the coder runs pytest in the worktree, and both a sloppy model commit and the checkpoint's git add -A swept __pycache__/*.pyc onto the issue branch (which then blocks branch switching for the caller). The checkpoint commit now excludes junk pathspecs, and a deterministic scrub commit untracks any junk the agent itself committed. Mirrored in Go. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AbirAbbas
force-pushed
the
feat/implement-issue-reasoner
branch
from
July 21, 2026 03:38
3e6e024 to
7d542ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an issue-level entry point,
implement_issue, so a main coding harness (Claude Code / Codex / OpenCode) can delegate one fully-scoped issue to SWE-AF as a cheap sub-harness. The feature-levelbuildpipeline is unchanged — this is the fast path for the second prompt shape ("change this code in this file, like this"), where the caller has already done the planning.No planning agents run. Deterministic (non-LLM) git setup creates an isolated worktree +
issue/<build_id>-<slug>branch offbase_branch, the existing coding loop implements the issue (reduced budget: 3 iterations, reviewer-gated; QA + synthesizer whenneeds_deeper_qa), an optional single verifier pass checks the acceptance criteria, and the branch is returned as the deliverable. Nothing is pushed and no PR is opened by default — the caller owns merge and CI. Typical cost is 4–8 LLM calls instead of hundreds, targeting ~10–30 min on cheap models instead of hours.Registered on both nodes (
swe-planner.implement_issue,swe-fast.implement_issue) and mirrored 1:1 in the Go port (swe-planner-go/swe-fast-go).Changes
swe_af/issue/— new package:IssueSpec/IssueBuildConfig/IssueBuildResultschemas, deterministic git ops (worktree/branch/checkpoint-commit, repo-local.git/info/excludemasking so the caller'sgit statusstays clean), and theimplement_issueorchestrator drivingrun_coding_loopswe_af/app.py,swe_af/fast/app.py— include the sharedissue_routeron both nodesgo/internal/issue/,go/internal/config/issueconfig.go,go/internal/node/register.go— Go port with identical reasoner name, input schema, and behavior; node surface tests updated to 31/30README.md— "Use SWE-AF as a Sub-Harness" section: when to useimplement_issuevsbuild, async curl + webhook/poll recipes, result shape, config table, fan-out guidance.claude/skills/delegate-issue/— ready-made Claude Code skill for the delegation flow (.gitignorenarrowed from.claude/to.claude/*+!.claude/skills/so versioned skills ship while local state stays ignored)Validation contract (tests derive from these)
git statusare untouchedrepo_pathyield N independent branches (worktree-per-call, retry on repo-lock contention)success: falsekeeps a salvageable branch; zero-commit builds delete their branch)Test plan
tests/issue/(real temp repos + real coding loop; only the agent dispatch is scripted).env): 1084 passed, 1 skipped +compileallcleaninternal/issue+internal/config; full CI gate green —gofmtclean,go build,go vet,go test -race -count=1 ./...withGOWORK=offNote for reviewers:
origin/feat/pipeline-optimizationcontains related skip-worktree/direct-git commits; this PR deliberately implements its own minimal git ops inswe_af/issue/git_ops.pyrather than cherry-picking, since the issue-level path only ever owns a single worktree/branch.🤖 Generated with Claude Code