feat: harness mode を Claude Code / Codex 両対応に (#28)#29
Open
k-buchi4696 wants to merge 4 commits into
Open
Conversation
- README の "Harness mode" セクションを書き換え、Claude Code / Codex CLI / Codex app の三系統を明示。サブスクで動く前提(API key 不要)を維持 - solve.py の "Next steps for Claude Code:" を "Next steps for your agent:" に変更し、docstring も特定 agent への依存を解消 - AGENTS.md に Codex app(chatgpt.com/codex)でそのまま貼れる起動 プロンプトテンプレを追加 - setup.sh で claude / codex CLI の PATH 検出ブロックを新設し、 ANTHROPIC_API_KEY 未設定時の WARNING を「API モード時のみ必須」に弱める - docs/codex-quickstart.md を新設し、Codex CLI 単発実行と Codex app チャット運用の双方を walkthrough issue #28 の A 系(ドキュメント / UX 中立化)スコープ。 B 系(agent_loop.py 新規 + --backend フラグ + --mode goals 新規)は 本 PR スコープ外(現コードに対象構造が存在しないため別 issue 化推奨)。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
subparsers(dest="command") と run-cmd の位置引数 add_argument("command") が
同一 args.command に書き込み、ユーザー入力で dispatch キーが上書きされた
結果、 elif args.command == "run-cmd" が常に false になり、CLI は exit 0 で
何も実行しないまま終わっていた。
- run-cmd の位置引数を "cmd" にリネームし、衝突理由をコメント化
- ディスパッチ参照を args.cmd に変更
- TestRunCmdTool に回帰テスト 2 件を追加
- run-cmd の stdout が伝搬すること
- --timeout フラグと位置引数が両方パースされること
Codex 対応 (#28) のローカル検証中に発見。本 PR に同梱。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
他リポジトリから autoforge ハーネスを呼ぶ前提が抜けていたため、各 ドキュメントに `autoforge-tools <subcommand>` 形式を追加。namaeno など 別プロジェクトから Codex で autoforge を駆動する実ユースケースで 必要になる情報を補完する。 - README.md: "Two invocation forms" 節を追加し、グローバル形式と dev モード (`PYTHONPATH=. python3 -m ...`) の使い分けを明示 - AGENTS.md: Available Tools セクションを `autoforge-tools` 形式中心に 再構成。load-task / save-patch も載せて Codex starter prompt との 整合を取る。starter prompt も同じ形式に統一 - docs/codex-quickstart.md: 検証スニペットと Codex app starter prompt を `autoforge-tools` 形式に変更、"Driving another repo" 節を新設し 別リポジトリから cd して使うフローを記述 550 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
他リポジトリで autoforge ハーネスを使う際の「自分の AGENTS.md / CLAUDE.md に何を書けばよいか」「動いていることをどう確認するか」 「よくある詰まりどころ」が docs に欠けていたため、これらを 1 枚に まとめた agent-neutral なガイドを新設する。 新規: docs/integration-guide.md - §1 インストールと PATH 確認 - §2 AGENTS.md / CLAUDE.md の最小テンプレと two-file pattern - §3 4 ステップの動作確認チェックリスト - §4 トラブルシューティング 5 件 - autoforge-tools: command not found - run-cmd の ACI allowlist 弾き - search の .venv / node_modules ノイズ - エージェントが動いてるように見えるが何も変わらない - briefing 更新後にエージェントが古いまま動く - §5 関連ドキュメントへのリンク 導線: - README の Harness mode セクションから integration-guide へのリンクを 最優先候補として並べ、codex-quickstart は Codex 固有の話に位置付け - codex-quickstart の Related docs にも integration-guide を追加 550 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 29, 2026
Open
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
ANTHROPIC_API_KEY不要は維持)autoforge-tools run-cmdが argparse dest 衝突で silent no-op) を同梱修正autoforge-tools list-dir / view / searchが動作することを実機検証済み変更内容(4 コミット)
c2a369b— feat: 三系統対応(docs + UX 中立化)README.md: "Harness mode" セクションを Claude Code / Codex CLI / Codex app の三系統表記に書き換えautoforge/harness/solve.py:"Next steps for Claude Code:"→"Next steps for your agent:"、docstring も agent 中立化AGENTS.md: Codex app チャット用の起動プロンプトテンプレを追加setup.sh:claude/codexの PATH 検出ブロックを新設、ANTHROPIC_API_KEY警告を「API モード時のみ必須」に弱化docs/codex-quickstart.md(新規): Codex CLI / Codex app 双方の walkthroughea78cca— fix:run-cmdの argparse dest 衝突を修正subparsers(dest="command")と run-cmd の位置引数commandが衝突し、ディスパッチが silent no-op だったのを修正command→cmdにリネームし、参照側も更新TestRunCmdTool)21b4b01— docs: グローバルautoforge-tools形式を併記autoforge-tools <subcommand>形式を README / AGENTS.md / docs/codex-quickstart.md に追記load-task/save-patchも列挙して整合e212e4c— docs: 統合ガイドintegration-guide.mdを新設AGENTS.mdCLAUDE.mdテンプレ / 4 ステップ動作確認チェックリスト / トラブルシューティング 5 件Test Plan
pytest tests/— 550 passed(既存 + 新規回帰テスト 2 件)bash -n setup.sh— 構文 OKautoforge-tools run-cmd "echo hello"がローカルで stdout を返すことを確認autoforge-tools list-dir / view / searchがすべて期待通り動作することを実機検証autoforge-solve経由で SWE-bench 1 タスクを通す等)docs/integration-guide.mdのテンプレを実際に空 repo にコピーして手順通り動くことを確認非ゴール / 後続 issue 候補
agent_loop.py新規 /--backendフラグ /--mode goals新規)— 現コードに対象構造が存在しないため別 issue 化推奨autoforge-tools searchのデフォルト除外パス改善(.venv/node_modules/.claude/worktrees等)— 本検証で副次発見run-cmdの ACI allowlist 拡張(printf/awk等)Closes #28
🤖 Generated with Claude Code