02 / 90

第 02: 概念分解と最小再現

概念分解と最小再現。各活動で予測・観察・振り返り・回復の証拠を残します。

自律学習手法と Python エンジニアリング基礎 480 分(8 時間の集中学習)
01 120 分

概念分解と最小再現

独立習得チェック — 評価対象の作業中に AI の支援は受けられません。支援を受けた場合は誠実に申告することが必須ですが、支援を受けた作業はあくまで復習扱いです。習得を主張する前に、新しい無支援チェックを完了してください。

前提条件

デイ 01 の修了(オブジェクト変更トレーサーと予測・実験・振り返りルーチン)。高度な Python 知識は不要です。

学習目標

混乱を招く依頼を、観察可能な概念・入力・出力・制約・最小再現に分解する。デイ 01 のコードを複写するのではなく、そのトレーサー思考を再利用する。

手順

デイ 01 の予測・実験・振り返りサイクルを新しい問題に適用します。デイ 01 のトレーサーを貼り付けたり、自分で課題を新たに考案したりしないでください。閉巻で進めます。(1) 実行前にすべての予測出力を書く。(2) 提示されたスニペットを実行し、観測された出力を記録する。(3) 結果を入力・期待出力・制約・名前/オブジェクト/ミューテーション/アロケーションに分解する。(4) 最小再現を抽出する。(5) 新しい無支援チェックを1件予定する。120 分の時間内に収めてください。

演習と予測記録

ある学習者の報告:「クリーンアップ用ヘルパーで空白を取り除くはずが、実行後も変数に空白が残ったままです。なぜ s.strip() は s を直してくれないのでしょう?」

実行前に全行の出力を予測してください:

s = '  data  '
print(repr(s.strip()))
print(repr(s))
s = s.strip()
print(repr(s))

次にこの依頼を、入力・学習者が期待した出力・観測された出力・破られた制約・どの要素が名前/オブジェクト/ミューテーション/アロケーションか、に分解してください。最後に、同じ効果を再現する最小のスニペット(MRE)を書いてください。

独立習得基準

無支援・閉巻で以下を満たした場合に合格:(a) 実行前に3行すべての出力を正しく予測した。(b) 分解が「ミューテーションではなくアロケーション」と「代入のみが名前を再束縛する」を正しく特定した。(c) MRE が3行以内で変数が変わらない効果を再現した。支援を受けた場合は復習扱いであり、習得を主張する前に新しい無支援のバリエーション(例:`name.upper()`)を正しく予測・検証する必要があります。

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

linking PSF License Version 2

Python Data Model & Mutability Reference

著者・提供機関: Python Software Foundation | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 3.1 & 3.2 (Objects, values, types)

検証バージョンと日付: Python 3.12 (Verified: 2026-10-30)

選定理由:

Normative reference on Python identity vs value semantics and mutable vs immutable types without tutorial inaccuracies.

ソース前提知識:

Basic command line and high school reading comprehension

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

Official documentation is mirrored locally via standard library pydoc and embedded offline lesson explanations if internet access is interrupted.

比較対象候補リソースと選定評価 (4)
MIT OCW 6.0001 (Prof. Eric Grimson) ↗ compared_alternative [CC BY-NC-SA 4.0]

High pedagogical clarity for Python fundamentals, but structures mutability around academic lecture pacing rather than immediate hands-on minimal reproductions (MRE).

Stanford CS336: Language Modeling from Scratch (Spring 2024) ↗ compared_deferred [No license declared (the repository has no LICENSE file, so all rights are reserved by default)]

Strong systems engineering and PyTorch tensor rigor, but assumes advanced Python mastery and PyTorch installed; deferred to Days 30-60 model pretraining.

3Blue1Brown: Essence of Linear Algebra ↗ compared_deferred [3Blue1Brown copyright (all rights reserved); site FAQ permits only short clips under stated conditions]

Strong visual intuition for linear transformations and vector spaces; selected for Days 10-18 mathematics foundations, but not relevant for Day 01 Python object references.

Andrej Karpathy: Neural Networks: Zero to Hero (micrograd) ↗ compared_deferred [MIT (Repository) / Standard YouTube License (Video)]

Clear, executable autograd intuition; code is MIT license, but video subtitles have unknown/proprietary distribution rights (prohibiting full-text transcript import). Selected for Days 19-25 autograd implementation with linking-only reuse.

linking Journal publisher copyright (all rights reserved) - lawful external linking only

Improving Students' Learning With Effective Learning Techniques: Promising Directions From Cognitive and Educational Psychology

著者・提供機関: John Dunlosky, Katherine A. Rawson, Elizabeth J. Marsh, Mitchell J. Nathan, Daniel T. Willingham | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Psychological Science in the Public Interest 14(1): 4-58; practice testing and distributed practice sections

検証バージョンと日付: Psychological Science in the Public Interest, 2013 (Verified: 2026-10-30)

選定理由:

Detailed comparative review rating practice testing and distributed practice as high-utility techniques while rating highlighting and rereading low-utility; anchors the retrieval, correction, and spaced-review design of Days 88-90.

ソース前提知識:

None beyond general academic reading.

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

Curriculum restates the utility ratings and application conditions in original prose; every task remains runnable offline.

比較対象候補リソースと選定評価 (2)
Pashler et al. Learning Styles: Concepts and Evidence ↗ compared_alternative [Publisher copyright (originally Wiley; now SAGE Publications)]

Important negative result on learning-styles matching but narrower scope; Dunlosky et al. rates a broader set of techniques directly usable for this curriculum.

Brown, Roediger & McDaniel: Make It Stick: The Science of Successful Learning ↗ compared_alternative [Publisher copyright (Harvard University Press)]

Strong trade-book synthesis of the same evidence base; the peer-reviewed review is preferred for citation precision and technique-by-technique utility ratings.

02 120 分

選択エージェントによる範囲限定タスクと権限レビュー

エージェント支援エンジニアリングチェック — 選択トラック・権限・レビュー境界を宣言します。エージェントの出力は独立した証拠ではありません。認可されたツールが使えない場合、実演部分は「ブロック済み・未実行」と記録してください。下記の例示トランスクリプトはレビュー手順の学習用であり、実際のエージェント実行の証拠にはなりません。

前提条件

day-02-act-01 の修了。コースプロファイルで選択済みのエージェントツールトラックが1つあること。

学習目標

宣言した権限・予算・コンテキスト・レビュー・再試行上限を設けて、選択した1つのエージェントで範囲限定の演習を行う。

手順

新しい空のディレクトリ agent-task-sandbox を作成し、前後で find . -type f を記録します(宣言した権限は契約であって OS サンドボックスではありません。範囲は自分で検証してください)。選択したエージェントに下記のプロンプトをそのまま与えます。許可する操作:agent-task-sandbox 内でのファイル作成のみ、作成したファイルを1回だけ実行。禁止事項:サンドボックス外への書き込み、git コミット、ネットワークアクセス、インストール、ホーム内ファイルの閲覧。すべての書き込み前に人間の承認を必須とします。予算:エージェントのターンまたは再試行は最大3回。停止条件:成果物を検証済み、予算枯渇、または範囲外操作の発生(その場合は中止して違反を記録)。完了後にレビューチェックリストを記入し、証拠と共に保管してください。

演習と予測記録

選択したエージェントに与える正確なプロンプト:

「ディレクトリ agent-task-sandbox(絶対パス:<サンドボックスのパスを貼り付け>)に、python3 hello.py で実行すると day 02 と表示する hello.py を作成してください。それ以外は作成・変更しないでください。ネットワークやパッケージのインストールは使わないでください。ファイルを作成して1回実行したら停止してください。」

期待される成果物:agent-task-sandbox/hello.py と自分で書く review.md。

レビューチェックリスト(review.md に各項目へ回答):
- サンドボックス内の find . -type f が hello.py のみを示す(余分なファイルなし)
- ファイル内容が依頼されたことだけを行っている
- python3 hello.py が day 02 と表示する
- すべての書き込みがサンドボックス内で、かつ自分の承認後に行われた
- トランスクリプトがエージェントの3ターン以内の停止を示している

独立習得基準

以下を満たした場合に合格:(a) エージェント実行前に範囲限定プロンプト・権限リスト・3ターン予算・停止条件を宣言した。(b) エージェント自身の主張ではなく、学習者が独立に行った `find`/`cat`/実行チェックで成果物と範囲を検証した。(c) チェックリストの判定を記録した。実演を上記どおり検証したか、実演部分を誠実にブロック済み・未実行と記録してラベル付き例示でチェックリスト手順を実施したかの、いずれかであること。例示やエージェントの主張を実際の証拠として提示した場合は不合格です。

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

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 All Rights Reserved (personal research blog) Prose is linked, not copied; the curriculum uses its own bounded-agent implementation

LLM Powered Autonomous Agents

著者・提供機関: Lilian Weng | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Sections: planning, memory, tool use, challenges

検証バージョンと日付: Blog post June 23, 2023 (Verified: 2026-10-30)

選定理由:

Widely used survey mapping agent architecture components (planning, memory, tools) and their failure modes; supports the capstone integration architecture review.

ソース前提知識:

Agent loops, tool use, and planning vocabulary.

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

The capstone architecture lesson specifies the adapter boundary, budgets, and tool contracts directly; no blog content is required offline.

比較対象候補リソースと選定評価 (2)
Significant Gravitas: AutoGPT repository ↗ compared_alternative [MIT License (outside autogpt_platform/); Polyform Shield License (autogpt_platform/)]

Open-ended autonomous loop; deliberately excluded as the capstone must remain a bounded, evaluable system.

Yohei Nakajima: BabyAGI repository ↗ compared_alternative [MIT License]

Task-list autonomy demo; the survey article gives vocabulary while the capstone keeps fixed tasks and budgets.

03 120 分

独立した端末/ファイルシステムチェック

独立習得チェック — 評価対象の作業中に AI の支援は受けられません。支援を受けた場合は誠実に申告することが必須ですが、支援を受けた作業はあくまで復習扱いです。習得を主張する前に、新しい無支援チェックを完了してください。

前提条件

day-02-act-02 の修了。評価対象の経路には Bash が必要です。検証済みの実行範囲は Linux Bash です。

学習目標

AI の支援なしに、ディレクトリとファイルを独立して作成・確認し、端末コマンドで成果物を検証する。

手順

各チェックを実行する前に出力を予測し、その後に観測出力を記録してください。作業はすべて新しい使い捨ての fs-sandbox ディレクトリ内で行います。ホームディレクトリや既存プロジェクトには何も作らず、実際のユーザーファイルは読まず、既存のリポジトリ状態を前提にしません。評価対象の手順は Bash で実行してください。ブロックと表示される rm -r -- 行は Bash の %q クォートを使い、検証済みの範囲は Linux Bash です。zsh、dash、Windows PowerShell/cmd 相当は未実行の参考情報です。 手順はフェイルストップのサブシェル内で実行します。mktemp で新しい専用ルートを作成して検証し、mkdir や cd が失敗したら書き込みの前に中断します。セットアップの失敗が現在のディレクトリに書き込むことはありません。ブロック末尾には、作成した専用ルートだけを正確に指すリテラルな rm -r -- <private-root> 後片付けコマンド(Bash %q クォート)が表示されます。そのディレクトリを削除したい場合のみ実行してください。 ブロックは Bash で実行してください。検証済みの範囲は Linux Bash で、zsh/dash/Windows は未検証です。

演習と予測記録

下のブロック全体を新しい Bash シェルに(1ブロックとして)貼り付けて実行し、各 pwd、find、cat、ls、wc の前に予測を書き留めてください。セットアップに失敗した場合、サブシェルが中断し、現在のディレクトリには何も書き込まれません。末尾には、作成したルートだけを指すリテラルな rm -r -- <private-root> 後片付けコマンドが表示されます。削除したい場合のみ実行してください:

(
set -e
SBX_ROOT=$(mktemp -d "${TMPDIR:-/tmp}/d02sbx.XXXXXX")
[ -n "$SBX_ROOT" ]
[ -d "$SBX_ROOT" ]
[ -w "$SBX_ROOT" ]
[ -x "$SBX_ROOT" ]
mkdir "$SBX_ROOT/fs-sandbox"
cd "$SBX_ROOT/fs-sandbox"
pwd
mkdir -p notes/drafts
printf 'first note\n' > notes/todo.txt
printf 'idea one\nidea two\n' > notes/drafts/ideas.txt
find . -type f | sort
cat notes/todo.txt
cd notes && pwd && ls && cd ..
wc -l notes/drafts/ideas.txt
printf 'rm -r -- %q\n' "$SBX_ROOT"
)

各チェックについて、予測出力・観測出力・ファイルシステムの状態(パス、ファイル内容、カレントディレクトリ)が自分のメンタルモデルと一致したかを記録してください。

独立習得基準

無支援で以下を満たした場合に合格:(a) すべての `pwd`/`find`/`cat`/`ls`/`wc` の予測を実行前に書き、すべての観測出力を記録した。(b) すべての成果物が `fs-sandbox` 内のみに作成され、指定コマンドで検証された。(c) 予測ミスは修正した前提とともに記録された。支援は復習扱いのみであり、習得を主張する前に新しい無支援チェックが必要です。

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

linking PSF License Version 2

Python Standard Library: pathlib

著者・提供機関: Python Software Foundation | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Path.exists, Path.cwd, and anchoring paths to __file__

検証バージョンと日付: Python 3.12 (Verified: 2026-10-30)

選定理由:

Normative reference for the exists()/cwd() evidence that separates an absent file from a wrong working directory.

ソース前提知識:

Basic Python syntax from Study Days 01-09

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

Path.exists() and Path.cwd() are exercised directly in the local drill, so no online page is required.

比較対象候補リソースと選定評価 (2)
os.path documentation ↗ compared_alternative [PSF License Version 2]

Functionally equivalent for exists() checks; pathlib keeps the beginner syntax object-oriented and consistent across the block.

shutil — High-level file operations ↗ compared_alternative [PSF License Version 2]

Covers copying and moving whole trees rather than path modeling; pathlib remains the right reference for the filesystem checks these days rehearse.

linking PSF License Version 2

Python Standard Library: tempfile

著者・提供機関: Python Software Foundation | オリジナル出所URL ↗

該当セクション・タイムスタンプ: TemporaryDirectory for disposable on-disk fixtures

検証バージョンと日付: Python 3.12 (Verified: 2026-10-30)

選定理由:

Normative reference for creating and auto-removing fixture files inside tests without touching real user files.

ソース前提知識:

Basic Python syntax from Study Days 01-09

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

TemporaryDirectory is part of the installed standard library and needs no page access.

比較対象候補リソースと選定評価 (2)
pytest tmp_path fixture ↗ compared_alternative [MIT]

Equivalent capability scoped to the pytest runner; deferred until the curriculum adopts pytest.

io — Core tools for working with streams ↗ compared_alternative [PSF License Version 2]

Lower-level file-object interface without automatic cleanup semantics; tempfile was selected for the safe scratch-file pattern the drills require.

04 120 分

予測・実験・振り返りと想起

独立習得チェック — 評価対象の作業中に AI の支援は受けられません。支援を受けた場合は誠実に申告することが必須ですが、支援を受けた作業はあくまで復習扱いです。習得を主張する前に、新しい無支援チェックを完了してください。

前提条件

day-02-act-03 の修了と、自分が記録したデイ 01–02 のログ。

学習目標

3日間のメソッドを想起し、証拠を習得基準と比較して、抜けた概念ごとに復習を予定する。

手順

区別できるフェーズで進めてください。(1) 閉巻での想起 — ノートを見ずに、覚えているデイ 01–02 の証拠(トレーサー出力、venv 不変条件、git 状態遷移、strip/MRE の結果)を書き出す。(2) 証拠との比較 — 自分の記録ログを開き、想起した値と記録された値を1行ずつ比較する。各概念を検証済みまたは抜けありとしてマークし、想起を上書きせずに訂正を注記する。(3) 新しい無支援の転移 — 新しいスニペットの出力を無支援で予測し、実行して結果を記録する。(4) 抜けた各項目について、日付入りの復習または次回チェックを予定する。

演習と予測記録

閉巻で、デイ 01–02 の概念と各概念について記憶している証拠の値を挙げてください(例:a is c の評価結果、sys.prefix != sys.base_prefix の意味、git の状態順序)。次に自分の記録と比較してください。古いコマンドは再実行しないでください。各概念について、実際の記録値を挙げて検証済みか抜けありかをマークしてください。抜けがなかった場合はその旨を明示し、ありがちな誤解を1つ、証拠を添えて棄却し(例:「代入はリストをコピーする」)、それでも次の新規転移チェックを行ってください。

d = {'a': 1}
e = d
e['b'] = 2
print(d, d is e)

の出力を無支援で予測し、実行して結果を記録し、日付入りの次回チェックを予定してください。

独立習得基準

ログが以下を示した場合に合格:(a) 想起がチェック前に書かれ、比較フェーズと明確に分離されている。(b) 少なくとも2つのデイ 01–02 の概念が、それぞれ実際の記録値と比較されている。(c) 実際の不一致とその訂正、または明示的な「抜けなし」と証拠付きで棄却したありがちな誤解のいずれかがある。(d) 新しい無支援転移の予測と観測結果がある。(e) 抜けた各項目について日付入りの次回チェックまたは復習ステップがある。支援は復習扱いのみであり、習得を主張する前に新しい無支援チェックが必要です。

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

linking Journal publisher copyright (all rights reserved) - lawful external linking only

Test-Enhanced Learning: Taking Memory Tests Improves Long-Term Retention

著者・提供機関: Henry L. Roediger III, Jeffrey D. Karpicke | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Psychological Science 17(3): 249-255, Experiments 1-2

検証バージョンと日付: Psychological Science, 2006 (Verified: 2026-10-30)

選定理由:

Foundational experimental evidence that retrieval practice (testing) outperforms repeated study for long-term retention; grounds the Day 88 AI-free retrieval checks in peer-reviewed learning science rather than folk advice.

ソース前提知識:

Basic understanding of study sessions, retention intervals, and experimental design vocabulary.

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

The curriculum restates the experimental design and effect sizes in original prose; every sealed task runs without the paper.

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

Strong meta-analytic coverage of spacing effects but addresses scheduling rather than the retrieval effect itself; retained as support for the Day 90 spaced-review schedule.

Equally foundational follow-up demonstrating repeated retrieval vs repeated study; the 2006 paper is cited as the standard first controlled demonstration.

linking Journal publisher copyright (all rights reserved) - lawful external linking only

Improving Students' Learning With Effective Learning Techniques: Promising Directions From Cognitive and Educational Psychology

著者・提供機関: John Dunlosky, Katherine A. Rawson, Elizabeth J. Marsh, Mitchell J. Nathan, Daniel T. Willingham | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Psychological Science in the Public Interest 14(1): 4-58; practice testing and distributed practice sections

検証バージョンと日付: Psychological Science in the Public Interest, 2013 (Verified: 2026-10-30)

選定理由:

Detailed comparative review rating practice testing and distributed practice as high-utility techniques while rating highlighting and rereading low-utility; anchors the retrieval, correction, and spaced-review design of Days 88-90.

ソース前提知識:

None beyond general academic reading.

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

Curriculum restates the utility ratings and application conditions in original prose; every task remains runnable offline.

比較対象候補リソースと選定評価 (2)
Pashler et al. Learning Styles: Concepts and Evidence ↗ compared_alternative [Publisher copyright (originally Wiley; now SAGE Publications)]

Important negative result on learning-styles matching but narrower scope; Dunlosky et al. rates a broader set of techniques directly usable for this curriculum.

Brown, Roediger & McDaniel: Make It Stick: The Science of Successful Learning ↗ compared_alternative [Publisher copyright (Harvard University Press)]

Strong trade-book synthesis of the same evidence base; the peer-reviewed review is preferred for citation precision and technique-by-technique utility ratings.