コマンドラインからGitHub issueの本文やコメントを読み取り専用で確認し、URLや番号から対象リポジトリを指定する手順を案内します。
- issueの本文とコメントを読みたいとき
- URLからissueの内容を確認したいとき
- 別リポジトリのissueを参照したいとき
Carbonのコンパイラ基盤を調べ、ビルドやテスト、デバッグを進めるための構成・実装パターン・診断やエラー処理の指針を確認できます。
Instructions for checking, building, debugging, and understanding the Carbon toolchain.
実行スコア 未検証
インストール方法を見るCarbonのコンパイラ基盤であるtoolchainの構成や処理の流れを把握し、変更を加える際の基本方針を確認できます。字句解析、構文解析、意味解析、LLVM IRへの変換という各段階の役割、関連するディレクトリや定義ファイル、処理ハンドラーの配置を案内します。bazeliskを使ったビルドやテスト、失敗時のデバッグ方法、診断メッセージやエラー処理の考え方も含まれます。コンパイラの動作を変えたときに期待出力を更新する手順も示され、専用スクリプトの利用を促します。
Carbonのtoolchainに初めて手を入れるときや、既存実装の場所と処理段階を知りたいときに役立ちます。テストの実行方法やクラッシュの調査、LLVM APIや既存のデータ構造を活用する際の方針も確認できます。言語サーバーや組み込み関数など別のスキルが対象とする領域との境界も案内されています。
Carbonのtoolchain向けの指針です。ビルドやテストにはbazeliskを使い、テスト出力の更新には./toolchain/autoupdate_testdata.pyを利用します。言語サーバー、診断、組み込み関数などには別のスキルを参照するよう案内されています。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。
点数には入れていません。 2026年10月26日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
toolchain/:
toolchain/docs for detailed
architecture design and patterns.
ValueStore, formatting
.def files, struct reflection) used throughout the implementation."int.convert_float").toolchain/language_server/ or utils/vscode/. Neither follows the
patterns described here..def files and expanded by way of macros.Handle<StateName> in parse/handle_*.cpp.HandleParseNode in check/handle_*.cpp.HandleInst in lower/handle_*.cpp.bazelisk test //...bazelisk test //toolchain/testing:file_testbazelisk test //toolchain/testing:file_test --test_arg=--file_tests=<path_to_carbon_file>bazelisk build //toolchain/...Carbon tests often use file_test (for example,
//toolchain/testing/file_test). For detailed guidelines on authoring tests,
including file splits, naming conventions (fail_, todo_), and generating
minimal output with SemIR dumps, please refer to the Toolchain tests skill.
If you change compiler behavior, you likely need to update expected test outputs. Do not manually edit thousands of lines of expected output. Use the script:
./toolchain/autoupdate_testdata.py
# Or for a specific file:
./toolchain/autoupdate_testdata.py toolchain/check/testdata/my_test.carbon
llvm::errs() << "debug info\n";.
std::cout (it may interfere with tool output).Print method or operator<<.inst.Print(llvm::errs())--sandbox_debug if needed,
but often running the binary directly from bazel-bin/ is easier for
debugging.ErrorOr<T>: Return ErrorOr<T> for fallible operations.
if (auto result = Function(); result) { Use(*result); }llvm::Expected<T>: Similar to ErrorOr, used when interfacing with
LLVM.When declaring and emitting errors, ensure semantic wording matches the exact context:
IntLiteral or FloatLiteral. For example, use
RealLiteralTooLargeForUnsizedInt instead of a diagnostic referencing an
"integer type".MaxIntWidth) to align message structures and parameter expectations.llvm::cast<T>(obj) (checked, asserts on failure).llvm::dyn_cast<T>(obj) (returns null on failure).llvm::isa<T>(obj) (boolean check).dynamic_cast and standard RTTI.Before implementing custom algorithms for mathematical, logical, or bitwise operations, inspect target LLVM ADT class APIs:
APInt, APFloat, or
APSInt) already offer native equivalents (for example, .pow(),
ilogb(), .changeSign(), convertFromAPInt()). Avoid duplicate, naive,
or inefficient custom loops.common/ and toolchain/base/ over LLVM ADTs. For example,
use Map instead of llvm::DenseMap.llvm::SmallVector, llvm::StringRef).StringRef is a view; be careful with lifetimes.explorer references: The explorer prototype has been moved.
Ignore references to it in proposals or old docs; focus on toolchain.autoupdate_testdata.py
can do it for you.std::string unnecessarily: Prefer llvm::StringRef for
arguments.clang-format).clangd diagnostics: In-editor diagnostics are only as
good as compile_commands.json. If it predates a newly added file, clangd
falls back to a default command and reports nonsense, such as missing
standard headers or "no member named None". Regenerate it with
./scripts/create_compdb.py, which only takes a few seconds.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
コマンドラインからGitHub issueの本文やコメントを読み取り専用で確認し、URLや番号から対象リポジトリを指定する手順を案内します。
AIアシスタントがCarbonのコードベースを扱う際に、専用ツールでファイルを閲覧・検索・編集し、一時ファイルを管理するためのルールを示します。
Bazeliskを使ったCarbonプロジェクトのビルド、テスト、実行、デバッグの基本手順を確認し、対象を絞った検証やASanの利用方法も把握できます。
Carbonコンパイラに組み込み関数を追加する際の登録、型シグネチャ検証、定数評価、LLVMコード生成、テスト方法を案内します。
Carbonツールチェーンのコードを書く際に、言語ごとの整形方法やコメント、命名、ドキュメント、コミットメッセージの基準を確認できます。
Carbonコンパイラのエラーや警告を定義し、書式やソース位置のラベルを整え、テストで網羅性を確かめる方法を案内します。