アーキテクチャ決定記録
このディレクトリにはRigorのアーキテクチャ決定記録(Architecture Decision Records、ADR)が含まれています。各ドキュメントは、重要な設計上の決定、その背景、検討された選択肢、そして結果を記録しています。
- ADR-0は基礎ドキュメントです — プロジェクトの中核的な原則とアーキテクチャを知るには、ここから始めてください。
- ADR-1からADR-3は型モデル、拡張API、型表現を定義します — アナライザーの概念的な中核です。
- 番号の大きいADRは基礎の上に構築されており、必要に応じて読むことができます。
- 各ADRにはStatusフィールドがあります:
Accepted、Proposed、Supersededのいずれかです。実装がまだ進行中のAcceptedなADRは、括弧書きの注記(例: partially implemented、slice N deferred)を持ちます。
| # | Title | Status |
|---|---|---|
| ADR-0 | Foundation and Core Architecture of Rigor | Accepted |
| ADR-1 | Type Model and RBS Superset Strategy | Accepted |
| ADR-2 | Extension API Strategy | Accepted |
| ADR-3 | Type Representation | Accepted |
| ADR-4 | Type Inference Engine | Accepted |
| ADR-5 | Robustness Principle | Accepted |
| ADR-6 | Cache Persistence Backend | Accepted |
| ADR-7 | v0.1.0 Slice Decisions | Accepted |
| ADR-8 | Steep-Inspired Improvements | Accepted |
| ADR-9 | Cross-Plugin API | Accepted (implemented in v0.1.1) |
| ADR-10 | Dependency Source Inference | Accepted |
| ADR-11 | Sorbet Input Adapter | Accepted |
| ADR-12 | dry-rb Packaging | Accepted |
| ADR-13 | TypeNode Resolver Plugin | Accepted |
| ADR-14 | RBS Sig Generation | Accepted |
| ADR-15 | Ractor Concurrency | Accepted (fork backend active; Ractor pool deferred) |
| ADR-16 | Macro Expansion | Accepted |
| ADR-17 | Monkey Patch Pre-Evaluation | Accepted (implemented in v0.1.13) |
| ADR-18 | Substrate Per-Call-Site Return Type | Accepted (implemented in v0.1.6) |
| ADR-19 | Language Server Packaging | Accepted |
| ADR-20 | Lightweight HKT | Accepted (partial implementation) |
| ADR-21 | Rubydex Evaluation | Proposed |
| ADR-22 | Baseline and Project Onboarding | Accepted |
| ADR-23 | Diagnostic Triage Command | Accepted (slices 1+2+3+4 implemented) |
| ADR-24 | Self Method Call Resolution | Accepted (slice 4 gated) |
| ADR-25 | Plugin Contributed RBS | Accepted |
| ADR-26 | ActiveRecord Relation Typing | Accepted |
| ADR-27 | Tool Distribution and Installation Model | Accepted (partially implemented; CI template + single binary deferred) |
| ADR-28 | Path-scoped Method-Protocol Contracts | Accepted |
| ADR-29 | Browser Playground | Accepted (implemented in v0.1.10–0.1.11; cloud deploy + ruby.wasm deferred) |
| ADR-30 | rigor-ffi Plugin Shape | Proposed (not implemented) |
| ADR-31 | Contribution and Supply-chain Policy | Accepted (in force) |
| ADR-32 | Inline-RBS Comment Ingestion | Accepted (implemented in v0.1.10) |
| ADR-33 | MCP Server Packaging | Accepted (implemented in v0.1.10) |
| ADR-34 | Toplevel Unresolved Implicit-self Calls Warn by Default | Accepted (implemented in v0.1.13; Playground severity wiring deferred) |
| ADR-35 | Override Signature Compatibility (Liskov signature rule) | Accepted (slices 1–4 done; slice 5 deferred) |
| ADR-36 | Macro-substrate Nested-class Emission Tier (Mangrove Enum) | Accepted (Slice A implemented; is_a? exhaustiveness deferred) |
| ADR-37 | Plugin Interface Segregation (narrow extension protocols) | Accepted (Slices 1–3 implemented; all bundled walker plugins migrated) |
| ADR-38 | Plugin-declared Additional Initializers | Accepted (def-form implemented; block-form deferred) |
| ADR-39 | Plugins may invoke their target library’s safe methods directly | Accepted (Plugin::Inflector + 3 consumers migrated; slice 3 deferred) |
| ADR-40 | config_schema declared defaults ({kind:, default:}) | Accepted (mechanism + 13 plugins migrated off the DEFAULT_* idiom) |
| ADR-41 | Inference budget design (wiring, on-hit policy, measurement-gated defaults) | Proposed (spec table unwired; Layer 1 doc hygiene + Layer 2 measurement-gated wiring queued) |
| ADR-42 | Plugin-contributed binary-operator return types (coerce-direction) | Proposed, low priority (self/left-operand case already works via dynamic_return, spec-confirmed; coerce direction is a narrow false positive — cheapest fix is the WD-D engine mitigation, precision via the ADR-20 HKT route; demand-gated) |
| ADR-43 | RBS-complete ancestor resolution (allow-list inherited-method dispatch) | Accepted — fully landed (WD1–WD6; rigor check resolves a Ruby subclass’s inherited calls against an allow-listed RBS-complete ancestor (seed Plugin::Base) so contract misuse warns standalone, without Steep’s own-helper FP wall; zero net FP on the plugin lib tree; blanket resolution rejected on Rails-controller FP grounds; make check-plugins gate in verify + CI, teeth verified) |
新しいADRの追加
Section titled “新しいADRの追加”重要なアーキテクチャ上の決定を行うとき:
- このディレクトリで次に空いている番号を見つけます。
- 既存のADRからテンプレートをコピーするか、同じ構造(Status、Context、Decisions、Consequences)に従って新しいファイルを作成します。
- 上記の索引テーブルにエントリーを追加します。
- 適切なコードコメント、他のADR、または
AGENTS.mdからそのADRを参照します。
他のドキュメントとの関係
Section titled “他のドキュメントとの関係”docs/types.md— 型仕様のクイックガイド。ADR-1とdocs/types.mdが同じ領域を論じているとき、アナライザーが何をするかについてはdocs/types.mdが権威を持ち、なぜそうするかについてはADR-1が権威を持ちます。docs/type-specification/— 規範的な型仕様。トピックごとのドキュメントに分割されています。docs/internal-spec/— アナライザー内部の契約(contract)(エンジンサーフェス(surface)、型オブジェクトの公開API)。docs/handbook/— エンドユーザー向けハンドブック。静的型付けの予備知識を持たないRubyプログラマー向けに書かれています。AGENTS.md— このリポジトリで作業するエージェント向けの開発契約。
© 2026 TypedDuck. Licensed under CC BY-SA 4.0.