79 / 90

第79日: 境界付き要件、コンテキストパックと権限・予算

工学目標を実行可能な受入基準を持つ境界付き要件に変換し、最小限のコンテキストパックを準備し、エージェント実行前に権限と予算の境界を設定する。

Self-Directed Learning & Python 480 分(8時間)
01 120 分

境界付き要件の作成と実行可能な受入基準

Agent支援エンジニアリングチェック

前提条件

第73〜78日のエージェントループ、ツールプロトコル、状態と実行制限。Ticket 22 の境界付きエージェントプロジェクト(projects/agent_learning)。

学習目標

工学目標を、エージェントが実行できレビュアーが独立して検証できる、明示的な受入基準・スコープ境界・非目標を持つ境界付き要件へ変換する。

手順

1. 使い捨てフィクスチャ内の境界付き変更を選びます:projects/agent_learning(Ticket 22)の write_report がノートごとの単語数も出力するように拡張する、または projects/text_tools 内の同等の小規模差分。
2. 要件を「意図+制約+受入基準」として記述します。すべての基準は機械検証可能でなければなりません:『GIVEN summarize-notes フィクスチャ、WHEN evaluate を実行、THEN /tmp/agent-run.json にノートごとの word_counts が含まれる』。
3. スコープ境界を宣言します:エージェントが読み書きできる正確なファイル、禁止操作(push 禁止・依存変更禁止・ネットワーク禁止)、および明示的な非目標(対象モジュール外のリファクタリング禁止)。
4. レビュー可能な大きさに保ちます:変更行数60行未満・単一のアトミックコミットを目標にします。

演習と予測記録

requirement.md を作成し、意図段落1つ、Given/When/Then 形式の受入基準3つ、許可ファイル一覧、禁止操作一覧、非目標2つを含めてください。自己確認:すべての基準がコマンドまたはアサーションとして実行可能であること。

独立習得基準

第三者が質問なしに実行できる受入基準を持つ境界付き要件を作成できる。

公式ソースリソースと権利証跡

linking Open Access / CC BY 4.0

SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering

著者・提供機関: John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, Ofir Press | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 2 The Agent-Computer Interface and Section 3 SWE-agent: Designing an ACI for Software Engineering

検証バージョンと日付: NeurIPS 2024 / arXiv:2405.15793v2 (Verified: 2026-10-30)

選定理由:

Primary literature on agent-computer interfaces showing that bounded tool commands, trajectory inspection, and environment constraints determine whether an agent can carry an engineering task to verifiable completion.

ソース前提知識:

Agent loops, tool protocols, and basic software engineering workflow vocabulary.

安全フォールバック(オフライン回復性):

The permission/budget control profile, tool contract schema, and trace audit procedure are fully implemented in the local bounded agent fixture (projects/agent_learning).

比較対象候補リソースと選定評価 (2)

Broader generalist agent platform; SWE-agent isolates the agent-computer interface design principles most relevant to bounded task delivery.

AutoCodeRover: Autonomous Program Improvement ↗ compared_alternative [Open Access / CC BY 4.0]

Focuses on autonomous program repair via code search; SWE-agent better matches the curriculum's bounded-tool and human-verification emphasis.

linking Open Access / CC BY 4.0

SWE-bench: Can Language Models Resolve Real-World GitHub Issues?

著者・提供機関: Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik R. Narasimhan | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 2.1 Benchmark Construction and Section 2.2 Task Formulation (FAIL_TO_PASS tests)

検証バージョンと日付: ICLR 2024 / arXiv:2310.06770v3 (Verified: 2026-10-30)

選定理由:

Defines the standard pattern this block teaches: a bounded issue statement paired with executable fail-to-pass tests as verifiable acceptance criteria for agent-produced changes.

ソース前提知識:

Unit testing, issue descriptions, and repository evaluation vocabulary.

安全フォールバック(オフライン回復性):

The acceptance-criteria pattern is exercised locally through the Ticket 22 fixture scorer and the Ticket 24 regression exercise without external datasets.

比較対象候補リソースと選定評価 (2)
HumanEval: Evaluating Large Language Models Trained on Code ↗ compared_alternative [arXiv non-exclusive license / Open Access]

Function-level synthesis benchmark; SWE-bench models the repository-scoped issue-to-diff workflow that this delivery block rehearses.

Multi-SWE-bench: A Multilingual Benchmark for Issue Resolving ↗ compared_alternative [Open Access / CC BY 4.0]

Extends issue resolution to multiple programming languages; the original Python-centric SWE-bench provides a cleaner pedagogical anchor.

02 120 分

独立したタスク分解とコンテキストパックの組立

独立習得チェック(AI 支援なし)

前提条件

第79日 アクティビティ1。

学習目標

AI 支援なしで、境界付き要件を順序付き作業計画に分解し、エージェントに必要な最小限のコンテキストパック(ファイル一覧・インターフェース契約・環境情報・予算)を組み立てる。

手順

1. タスクが触れるすべてのファイルとその理由を列挙し、読み取り専用か書き込み可能かを記します。
2. 変更対象関数のインターフェース契約を記述します:シグネチャ・返却スキーマ・エラー動作。
3. 環境情報を記録します:Python バージョン、正確な実行コマンド、フィクスチャ場所、使い捨てワークスペース規則。
4. Ticket 22 の制御プロファイルから実行予算を見積もります:max_steps=6、max_retries=2、tool_payload_bytes=4096。
5. このアクティビティはエージェントを使わず行います。試されるのはエージェントではなくあなた自身の仕様化能力です。

演習と予測記録

第79日要件に対し keys files[], contracts[], environment{}, budgets{} を持つ context_pack.json を作成し、python3 -c 'import json;json.load(open("context_pack.json"))' で解析できることを証明してください。

独立習得基準

記憶とドキュメントだけで最小限の解析可能なコンテキストパックを組み立てられる。これはエージェント支援成果ではなく独立したエンジニアリング技能である。

公式ソースリソースと権利証跡

linking Open Access / CC BY 4.0

SWE-bench: Can Language Models Resolve Real-World GitHub Issues?

著者・提供機関: Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik R. Narasimhan | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 2.1 Benchmark Construction and Section 2.2 Task Formulation (FAIL_TO_PASS tests)

検証バージョンと日付: ICLR 2024 / arXiv:2310.06770v3 (Verified: 2026-10-30)

選定理由:

Defines the standard pattern this block teaches: a bounded issue statement paired with executable fail-to-pass tests as verifiable acceptance criteria for agent-produced changes.

ソース前提知識:

Unit testing, issue descriptions, and repository evaluation vocabulary.

安全フォールバック(オフライン回復性):

The acceptance-criteria pattern is exercised locally through the Ticket 22 fixture scorer and the Ticket 24 regression exercise without external datasets.

比較対象候補リソースと選定評価 (2)
HumanEval: Evaluating Large Language Models Trained on Code ↗ compared_alternative [arXiv non-exclusive license / Open Access]

Function-level synthesis benchmark; SWE-bench models the repository-scoped issue-to-diff workflow that this delivery block rehearses.

Multi-SWE-bench: A Multilingual Benchmark for Issue Resolving ↗ compared_alternative [Open Access / CC BY 4.0]

Extends issue resolution to multiple programming languages; the original Python-centric SWE-bench provides a cleaner pedagogical anchor.

linking CC BY-NC-SA 3.0 noncommercial share-alike

Pro Git, Second Edition

著者・提供機関: Scott Chacon and Ben Straub | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Chapter 3 (Git Branching), Section 7.7 (Reset Demystified), Sections 5.2/6.2 (Contributing to a Project)

検証バージョンと日付: Second edition (Apress, 2014) (Verified: 2026-10-30)

選定理由:

Freely licensed reference for branching, merging, conflict resolution, and safe recovery vocabulary used through the delivery workflow.

ソース前提知識:

Basic git status/log/diff vocabulary from earlier study days

安全フォールバック(オフライン回復性):

git help <command> and the Git manual pages ship with Git and cover the same commands offline; every required workflow is stated locally in the lesson.

比較対象候補リソースと選定評価 (2)
GitHub Skills interactive courses ↗ compared_alternative [MIT (varies by course)]

Interactive but requires a GitHub account and an external service; disposable local repositories keep the exercise self-contained.

Atlassian Git Tutorials ↗ compared_alternative [All Rights Reserved]

Vendor-owned prose with no permissive license; Pro Git covers the same ground under CC BY-NC-SA.

03 120 分

権限境界・実行予算と境界付きエージェント実行

Agent支援エンジニアリングチェック

前提条件

第79日 アクティビティ2。

学習目標

エージェントの権限ポリシーとリソース予算を明示的に宣言し、準備したコンテキストで境界付きエージェントを実行し、完全な action/observation トレースを記録する。

手順

1. 実行前に権限付与を文書化します:許可ツール(使い捨てワークスペース内の読み書きのみ)と禁止操作(git push・ネットワーク・支払い・使い捨てディレクトリ外の削除)。push・本番デプロイ・有償実行・破壊的コマンドは常に個別の承認が必要です。
2. 予算を設定します:max_steps=6、max_retries=2、tool_payload_bytes=4096(Ticket 22 の制御プロファイル)。
3. 参照ワークフローを実行します:python -m projects.agent_learning.cli evaluate --fixture summarize-notes --output /tmp/agent-run.json
4. 公開 API で障害経路を試します:DeterministicModelAdapter(fault="invalid_arguments") で run_task を実行し、observation が構造化({'ok': False, 'error': 'invalid_arguments'})され、ループせず予算内で終了することを確認します。

演習と予測記録

実行成果物を取得し各 action イベントに注釈を付けてください:消費した予算、使用した権限クラス、宣言済みファイルスコープ内に収まったか。result.steps <= 6 かつ result.retries <= 2 を確認してください。

独立習得基準

明示的な権限と予算の下でエージェントを指揮し、監査可能な完全な実行トレースを生成できる。

公式ソースリソースと権利証跡

linking Open Access / CC BY 4.0

SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering

著者・提供機関: John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, Ofir Press | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 2 The Agent-Computer Interface and Section 3 SWE-agent: Designing an ACI for Software Engineering

検証バージョンと日付: NeurIPS 2024 / arXiv:2405.15793v2 (Verified: 2026-10-30)

選定理由:

Primary literature on agent-computer interfaces showing that bounded tool commands, trajectory inspection, and environment constraints determine whether an agent can carry an engineering task to verifiable completion.

ソース前提知識:

Agent loops, tool protocols, and basic software engineering workflow vocabulary.

安全フォールバック(オフライン回復性):

The permission/budget control profile, tool contract schema, and trace audit procedure are fully implemented in the local bounded agent fixture (projects/agent_learning).

比較対象候補リソースと選定評価 (2)

Broader generalist agent platform; SWE-agent isolates the agent-computer interface design principles most relevant to bounded task delivery.

AutoCodeRover: Autonomous Program Improvement ↗ compared_alternative [Open Access / CC BY 4.0]

Focuses on autonomous program repair via code search; SWE-agent better matches the curriculum's bounded-tool and human-verification emphasis.

linking CC BY-NC-SA 3.0 noncommercial share-alike

Pro Git, Second Edition

著者・提供機関: Scott Chacon and Ben Straub | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Chapter 3 (Git Branching), Section 7.7 (Reset Demystified), Sections 5.2/6.2 (Contributing to a Project)

検証バージョンと日付: Second edition (Apress, 2014) (Verified: 2026-10-30)

選定理由:

Freely licensed reference for branching, merging, conflict resolution, and safe recovery vocabulary used through the delivery workflow.

ソース前提知識:

Basic git status/log/diff vocabulary from earlier study days

安全フォールバック(オフライン回復性):

git help <command> and the Git manual pages ship with Git and cover the same commands offline; every required workflow is stated locally in the lesson.

比較対象候補リソースと選定評価 (2)
GitHub Skills interactive courses ↗ compared_alternative [MIT (varies by course)]

Interactive but requires a GitHub account and an external service; disposable local repositories keep the exercise self-contained.

Atlassian Git Tutorials ↗ compared_alternative [All Rights Reserved]

Vendor-owned prose with no permissive license; Pro Git covers the same ground under CC BY-NC-SA.

04 120 分

評価: トレース監査と証拠に基づく受入判定

独立習得チェック(AI 支援なし)

前提条件

第79日 アクティビティ1〜3。

学習目標

エージェント実行を独立して監査する:すべての受入基準を観測可能な証拠と照合し、予算・権限の遵守を確認し、エージェント自身の主張を信用しない合否判定を記述する。

手順

1. /tmp/agent-run.json を再読込し、アクティビティ1の各受入基準を具体的なアサーションまたはコマンド出力で検証します。
2. 記録された全アクションを権限一覧と照合します:スコープ外ファイルアクセスや未登録ツール呼出しを検出したら報告します。
3. 終了安全性を確認します:ステップ・リトライが予算内、タイムアウト強制終了なし、障害注入箇所では構造化された失敗 observation があること。
4. verdict.md を作成します:基準ごとの表に証拠コマンドと観測結果を引用し、制限事項を1段落添えます — deterministic-v1 アダプタはフィクスチャであり、実モデル能力の証拠ではありません。

演習と予測記録

verdict.md を表形式で作成してください:criterion | 証拠コマンド | 観測結果 | 判定。少なくとも1行は自分で再実行した障害経路(invalid_arguments または missing_note)を引用してください。

独立習得基準

あなたの独立した検証とエージェント支援成果を分離した、証拠に基づく受入判定を発行できる。

公式ソースリソースと権利証跡

linking Open Access / CC BY 4.0

SWE-bench: Can Language Models Resolve Real-World GitHub Issues?

著者・提供機関: Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik R. Narasimhan | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Appendix A.4 Evaluation Procedure

検証バージョンと日付: ICLR 2024 / arXiv:2310.06770v3 (Verified: 2026-10-30)

選定理由:

Defines the standard pattern this block teaches: a bounded issue statement paired with executable fail-to-pass tests as verifiable acceptance criteria for agent-produced changes.

ソース前提知識:

Unit testing, issue descriptions, and repository evaluation vocabulary.

安全フォールバック(オフライン回復性):

The acceptance-criteria pattern is exercised locally through the Ticket 22 fixture scorer and the Ticket 24 regression exercise without external datasets.

比較対象候補リソースと選定評価 (2)
HumanEval: Evaluating Large Language Models Trained on Code ↗ compared_alternative [arXiv non-exclusive license / Open Access]

Function-level synthesis benchmark; SWE-bench models the repository-scoped issue-to-diff workflow that this delivery block rehearses.

Multi-SWE-bench: A Multilingual Benchmark for Issue Resolving ↗ compared_alternative [Open Access / CC BY 4.0]

Extends issue resolution to multiple programming languages; the original Python-centric SWE-bench provides a cleaner pedagogical anchor.

linking Open Access / CC BY 4.0

SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering

著者・提供機関: John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, Ofir Press | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Appendix B.3 Trajectory Analysis and B.4 Failure Modes

検証バージョンと日付: NeurIPS 2024 / arXiv:2405.15793v2 (Verified: 2026-10-30)

選定理由:

Primary literature on agent-computer interfaces showing that bounded tool commands, trajectory inspection, and environment constraints determine whether an agent can carry an engineering task to verifiable completion.

ソース前提知識:

Agent loops, tool protocols, and basic software engineering workflow vocabulary.

安全フォールバック(オフライン回復性):

The permission/budget control profile, tool contract schema, and trace audit procedure are fully implemented in the local bounded agent fixture (projects/agent_learning).

比較対象候補リソースと選定評価 (2)

Broader generalist agent platform; SWE-agent isolates the agent-computer interface design principles most relevant to bounded task delivery.

AutoCodeRover: Autonomous Program Improvement ↗ compared_alternative [Open Access / CC BY 4.0]

Focuses on autonomous program repair via code search; SWE-agent better matches the curriculum's bounded-tool and human-verification emphasis.