Repository navigation
教材を VS Code 前提に変更し、発展編「Claude Code と TDD」を追加 - #2
Merged
Merged
Conversation
- 教材のルートと samples/todo-cli に .vscode/(extensions.json、settings.json、tasks.json)を追加 - 練習用リポジトリにもコピーされるように、samples/todo-cli に .editorconfig と .gitattributes を追加 - .gitignore で、共有する .vscode/ のファイルだけをリポジトリに含める - Claude Code の個人用の設定(.claude/settings.local.json、CLAUDE.local.md)を除外する Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
- VS Code を必須にし、OS ごとのインストール、code コマンド、表示の日本語化、gh のエディタの設定を説明 - 画面の各部分と機能の名前を、公式ドキュメントへのリンク付きの表で説明 - この教材で使う拡張機能を、ID と Marketplace のリンク付きで紹介し、画面とコマンドの両方で入れ方を説明 - フォルダの信頼(制限モード)、自動保存、自動フェッチの扱いを追加 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
- ファイルの操作は、エクスプローラーとコマンドを並べて説明する - Git のエディタを code --wait にし、ステージ・コミット・差分・履歴・取り消しをソース管理ビューでも説明する - push / pull / fetch / clone を、変更の同期・Branch の発行・Git: クローンでも説明する - ブランチの操作とコンフリクトの解消を、ステータスバー・CodeLens・マージエディターでも説明する - nano を使っていた演習を、VS Code で編集する形に変更する Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
- Issue と Pull Request の作成・レビュー・マージを、GitHub Pull Requests 拡張機能でも説明する - テストを VS Code のタスクでも実行できるようにする - 困ったときはに VS Code の節(code が見つからない、--wait、WSL、制限モード、CRLF、スマートコミット)を追加 - チートシートに VS Code での操作の列を、用語集に VS Code の用語を追加 - 発展編の stats と重なる count の課題を外し、発展編への案内を追加 - 練習用環境のスクリプトの最後の案内に、VS Code で開くコマンドを追加 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
- AGENTS.md と、それを取り込む CLAUDE.md - .claude/settings.json(権限の allow / ask / deny と、PostToolUse のフック) - .sh を編集したら shellcheck を実行し、警告を Claude に返すフックのスクリプトと、そのテスト - TDD 用の skill(/tdd-todo、/tdd-go)と、テストをレビューする subagent(test-reviewer) - CI に、フックのテストと JSON ファイルの書式チェックを追加 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
- セットアップ、CLAUDE.md と AGENTS.md、モデルと effort、skill と subagent、ハーネス(権限モード・権限の設定・フック・/goal と /loop による検証ループ)の 5 章 - 追加課題として、t-wada 流 TDD(テストリスト、Red → Green → Refactor、仮実装、三角測量)で stats コマンドを作る章 - README に VS Code の前提、発展編の章、表記のルール、リポジトリの構成を追加 - CONTRIBUTING に VS Code のラベルとキー操作の表記、画面とコマンドの併記、Claude Code の説明のルール、ローカルのチェックを追加 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
- 強制 push の deny ルールを、--force / --force-with-lease / -f / +ブランチ名 の書き方に広げ、 ルールだけでは完全には防げないことと、ブランチの保護を組み合わせることを第 5 章に明記 - PostToolUse のフックを、args を使わないシェルの形に変更(古いバージョンでも動くように) - フックが受け取る JSON の値を、エスケープ(\\ や \")を戻して取り出す lib/json.sh を追加し、 見つからない .sh は黙って通さずに通知する - test-reviewer に、読み取りだけのコマンドしか実行させない PreToolUse フック(readonly-bash.sh)を追加 - /tdd-go で、最初から成功したテストは実装を壊して確かめ、test: でコミットするように変更 - README の所要時間の合計を、章の表と合わせる(本編 8〜13 時間、発展編 5.5〜9 時間) - test_hooks.sh に実行の権限を付け、両方のフックのテストを追加(30 件) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
- readonly-bash.sh で git diff --no-index を止め、リポジトリの外のファイル(.env など)を読めないようにする - lib/json.sh が見つからないときは、黙って通さずに通知する(読み取り専用のフックは安全のために止める) - JSON のエスケープの \r \b \f と ASCII の範囲の \uXXXX を戻すようにする - フックのテストを、実装を変えたら失敗する入力に直し、改行・バッククォート・&&・--ext-diff・ --textconv・--no-index・command がない場合・lib/json.sh がない場合を追加(42 件) - CI の JSON チェックから、コメントを書ける .vscode/ の JSON(JSONC)を外す - 練習用環境のスクリプトが表示する code / cd のパスを " で囲む(空白を含むパスでも動くように) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
- AGENTS.md: テストが最初から成功したときの進め方(実装を壊して確かめ、元に戻して test: でコミット)を書く (/goal のチャレンジでは、Claude は /tdd-go ではなく AGENTS.md の手順に従うため) - readonly-bash.sh: C:/ のような Windows のドライブ名で始まる語も止める - 第 5 章の解答例: .gitignore もコミットに含める - 第 6 章: /tdd-todo で gh issue view の確認が表示されることを書く Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
- settings.json の allow を Bash(shellcheck todo.sh tests/*.sh) に絞る (shellcheck は指定したファイルの行を警告と一緒に表示するので、Bash(shellcheck *) だと .env を確認なしで読めてしまうため) - 第 5 章の allow の注意に、shellcheck のことを書く - AGENTS.md: テストが最初から成功したときも、TODO.md の項目にチェックを付けてからコミットする Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
- settings.json の allow を、* を使わない Bash(shellcheck todo.sh tests/test_todo.sh) にする (ルールの * は空白も含めて何にでも当てはまり、shellcheck で .env を読めてしまうため) - AGENTS.md と /tdd-go の shellcheck のコマンドも、同じ形にそろえる - 第 5 章の説明を直す - readonly-bash.sh: C:x のようなドライブ名で始まる語も止める Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
- /tdd-go・AGENTS.md・第 6 章: 実装を元に戻したことの確認を git status --short -- todo.sh にする (git diff --stat は、ステージした変更とまだステージしていない変更のどちらかを見落とすため) - 用語集の auto モードの説明を、第 5 章(頼んだ範囲を超える操作や危険な操作を止める)に合わせる Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qUYj2EAYZDwCG822qQ3th
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
TamichiRyuto
commented
Oct 17, 2026
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.
概要
教材全体を VS Code での開発を前提にし、Git の操作を「VS Code の画面」と「コマンド」の同じ比重で説明する形に変えます。あわせて、Claude Code の設定(CLAUDE.md / AGENTS.md、モデルと effort、skill / subagent、権限モード・フック・検証ループ)と、t-wada 流 TDD で
statsコマンドを作る追加課題をまとめた発展編を追加します。関連する Issue
なし
変更の種類
docs/、README.md)の追加・修正変更内容
第 0 章: VS Code を必須にし、次の節を追加しました。
codeコマンド、表示の日本語化、ghのエディタの設定第 1〜8 章: 各操作に「VS Code で操作する」と「コマンドで操作する」を並べました。対象は次のとおりです。
あわせて、
core.editorをcode --waitにし、nano を使っていた演習を VS Code に置き換え、困ったときはに VS Code の節を追加しました。付録と演習一覧: チートシートに VS Code の操作の列を、用語集に VS Code・Claude Code・TDD の用語を追加し、演習一覧を更新しました。
発展編(
docs/claude-code/): 目次と 6 つの章を追加しました。サンプル
samples/claude-harness/: ハーネスの完成例を追加しました。AGENTS.md、CLAUDE.md、.claude/settings.json、フック(編集した.shを shellcheck でチェックするもの、test-reviewerに読み取りだけのコマンドを実行させるもの)、/tdd-todoと/tdd-goの skill、test-reviewerの subagent と、フックのテストを含みます。フックは、公式ドキュメントの例と同じく jq で JSON を読みます。samples/todo-cli/:.vscode/、.editorconfig、.gitattributesを追加しました。countの課題は発展編のstatsと重なるので外しました。CI: フックのテストと JSON の書式チェックを追加しました。
.gitignoreは、共有する.vscode/のファイルだけを含め、Claude Code の個人用ファイルを除外するように変えました。確認したこと
レビュアーへの補足
test_todo.sh(34 件)、test_sandboxes.sh(15 件)、test_hooks.sh(91 件。bash 3.2.57 でも成功)/tdd-todoと/tdd-goの skill が読み込まれるtest-reviewerの subagent がレビューする。読み取りだけのフックがgit logを通し、touchやgit show HEAD:.envを止める。フックのスクリプトがないときも止まるstatsの模範解答: 第 7 章までを終えた状態を再現し、実際に TDD のサイクルを回して作りました(テスト 43 件 → 55 件)。出力例はこのときのものです。/code-review high --commentを 21 回繰り返し、指摘に対応しました。最後の回は、新しく直すべき指摘がありませんでした。対応しなかった指摘(nit や、理由を返した指摘の繰り返し)には理由を返信し、すべてのスレッドを resolve しています。Generated by Claude Code