From be6bd5be267877c20023ebe129c1171ae9ce80c6 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Wed, 7 Jan 2026 18:32:04 +0900 Subject: [PATCH 1/4] refactor: reduce bold text and bullet points in tutorials --- manuals/1.0/en/getting-started.md | 2 +- manuals/1.0/en/tutorial.md | 21 ++++++++------------- manuals/1.0/ja/getting-started.md | 2 +- manuals/1.0/ja/tutorial.md | 21 ++++++++------------- 4 files changed, 18 insertions(+), 28 deletions(-) diff --git a/manuals/1.0/en/getting-started.md b/manuals/1.0/en/getting-started.md index 56668db..69cac60 100644 --- a/manuals/1.0/en/getting-started.md +++ b/manuals/1.0/en/getting-started.md @@ -48,7 +48,7 @@ src/ ├── Reason/ │ └── Greeting.php # Transcendent capability ├── Semantic/ -│ └── Name.php # Validation rules +│ └── Name.php # What can exist ├── Exception/ │ └── EmptyNameException.php └── Module/ diff --git a/manuals/1.0/en/tutorial.md b/manuals/1.0/en/tutorial.md index fc06316..50fbcdb 100644 --- a/manuals/1.0/en/tutorial.md +++ b/manuals/1.0/en/tutorial.md @@ -76,7 +76,7 @@ final class HeartRate } ``` -**Key insight:** These aren't just validation rules. They define your **domain ontology**—the vocabulary of what can exist. This declarative foundation serves as documentation that both humans and AI can read to understand your domain. (See [Semantic Variables](./06-semantic-variables.html) for how this enables AI-readable system design.) +These aren't just validation rules. They define your domain ontology—the vocabulary of what can exist. This declarative foundation serves as documentation that both humans and AI can read to understand your domain. (See [Semantic Variables](./06-semantic-variables.html) for details.) ## Step 2: Define Exceptions @@ -96,7 +96,7 @@ final class LethalVitalException extends DomainException ## Step 3: Define the Reason (Transcendence) -The **JTASProtocol** (Japan Triage and Acuity Scale) is not a programmer's arbitrary rule. It represents **transcendent medical wisdom**—objective knowledge that exists independently in the world. In Be Framework, such domain logic becomes a **first-class citizen**: injectable, testable, and explicitly visible. +The JTASProtocol (Japan Triage and Acuity Scale) is not a programmer's arbitrary rule. It represents transcendent medical wisdom—objective knowledge that exists independently in the world. In Be Framework, such domain logic becomes a **first-class citizen**: injectable, testable, and explicitly visible. ```php // src/Reason/JTASProtocol.php @@ -186,14 +186,11 @@ final readonly class TriageAssessment } ``` -**Key concepts:** -- `#[Inject]` brings in the JTASProtocol—transcendent wisdom from outside -- The `$being` property (Union type) determines which Final class receives the transformation -- We don't "set status"—the patient BECOMES their destiny +`#[Inject]` brings in the JTASProtocol—transcendent wisdom from outside. The `$being` property (Union type) determines which Final class receives the transformation. We don't "set status"—the patient BECOMES their destiny. ## Step 7: Create Final Classes -The final forms—each with their own **unique capabilities**: +The final forms—each with unique capabilities: ### EmergencyCase @@ -262,7 +259,7 @@ final readonly class ObservationCase } ``` -Notice: Each outcome has **different methods**. `EmergencyCase` can `assignER()`, while `ObservationCase` can `assignWaitingArea()`. The **type determines capability**—you cannot assign an ER room to an observation patient. +Each type has different methods. `EmergencyCase` can `assignER()`, while `ObservationCase` can `assignWaitingArea()`. Type determines capability—you cannot assign an ER room to an observation patient. ## Step 8: Execute the Metamorphosis @@ -376,11 +373,9 @@ src/ ## Key Insights -1. **Existence over Action**: The patient doesn't "get triaged"—they BECOME a triaged state -2. **Type IS Status**: `EmergencyCase` and `ObservationCase` are different types with different capabilities -3. **Semantic Boundaries**: Lethal vital signs are rejected before metamorphosis -4. **Transcendent Wisdom**: JTASProtocol exists independently—it's injected, not created -5. **Immutability**: Once transformed, a patient cannot change status without new metamorphosis +1. The patient doesn't "get triaged"—they BECOME a triaged state +2. `EmergencyCase` and `ObservationCase` are different types with different capabilities +3. Once transformed, status cannot change without new metamorphosis ## Metamorphosis in Other Domains diff --git a/manuals/1.0/ja/getting-started.md b/manuals/1.0/ja/getting-started.md index 3eb585f..4bcc822 100644 --- a/manuals/1.0/ja/getting-started.md +++ b/manuals/1.0/ja/getting-started.md @@ -48,7 +48,7 @@ src/ ├── Reason/ │ └── Greeting.php # 超越的な能力 ├── Semantic/ -│ └── Name.php # 検証ルール +│ └── Name.php # 何が存在できるか ├── Exception/ │ └── EmptyNameException.php └── Module/ diff --git a/manuals/1.0/ja/tutorial.md b/manuals/1.0/ja/tutorial.md index 973f6ea..405f515 100644 --- a/manuals/1.0/ja/tutorial.md +++ b/manuals/1.0/ja/tutorial.md @@ -76,7 +76,7 @@ final class HeartRate } ``` -**重要な洞察:** これらは単なる検証ルールではありません。**ドメインオントロジー**—何が存在できるかの語彙—を定義しています。この宣言的な基盤は、人間とAIの両方がドメインを理解するために読めるドキュメントとして機能します。([セマンティック変数](./06-semantic-variables.html) でAI可読なシステム設計の詳細をご覧ください。) +これらは単なる検証ルールではありません。ドメインオントロジー—何が存在できるかの語彙—を定義しています。この宣言的な基盤は、人間とAIの両方がドメインを理解するために読めるドキュメントとして機能します。(詳細は[セマンティック変数](./06-semantic-variables.html)を参照。) ## ステップ 2: 例外を定義する @@ -96,7 +96,7 @@ final class LethalVitalException extends DomainException ## ステップ 3: Reason(超越)を定義する -**JTASProtocol**(Japan Triage and Acuity Scale)はプログラマーの恣意的なルールではありません。**超越的な医学の知恵**—世界に独立して存在する客観的な知識—を表します。Be Framework では、このようなドメインロジックは**第一級市民**になります:注入可能、テスト可能、明示的に可視。 +JTASProtocol(Japan Triage and Acuity Scale)はプログラマーの恣意的なルールではありません。超越的な医学の知恵—世界に独立して存在する客観的な知識—を表します。Be Framework では、このようなドメインロジックは**第一級市民**になります:注入可能、テスト可能、明示的に可視。 ```php // src/Reason/JTASProtocol.php @@ -186,14 +186,11 @@ final readonly class TriageAssessment } ``` -**重要な概念:** -- `#[Inject]` が JTASProtocol を持ち込む—外部からの超越的な知恵 -- `$being` プロパティ(Union型)がどの Final クラスが変態を受け取るかを決定 -- 「ステータスを設定する」のではなく、患者がその運命に**なる** +`#[Inject]` が JTASProtocol を持ち込みます—外部からの超越的な知恵です。`$being` プロパティ(Union型)がどの Final クラスが変態を受け取るかを決定します。「ステータスを設定する」のではなく、患者がその運命になります。 ## ステップ 7: Final クラスを作成 -最終形態—それぞれ独自の**能力**を持つ: +最終形態—それぞれ独自の能力を持ちます: ### EmergencyCase @@ -262,7 +259,7 @@ final readonly class ObservationCase } ``` -注目:各 Final は**異なるメソッド**を持ちます。`EmergencyCase` は `assignER()` を、`ObservationCase` は `assignWaitingArea()` を持ちます。**型が能力を決定します**—経過観察の患者に救急室を割り当てることはできません。 +各型は異なるメソッドを持ちます。`EmergencyCase` は `assignER()` を、`ObservationCase` は `assignWaitingArea()` を持ちます。型が能力を決定します—経過観察の患者に救急室を割り当てることはできません。 ## ステップ 8: 変態を実行 @@ -376,11 +373,9 @@ src/ ## 重要な洞察 -1. **アクションより存在**: 患者は「トリアージされる」のではなく、トリアージされた状態に**なる** -2. **型がステータス**: `EmergencyCase` と `ObservationCase` は異なる能力を持つ異なる型 -3. **セマンティックな境界**: 致死的なバイタルサインは変態前に拒否される -4. **超越的な知恵**: JTASProtocol は独立して存在する—作成されるのではなく注入される -5. **不変性**: 一度変態すると、新たな変態なしにステータスは変更できない +1. 患者は「トリアージされる」のではなく、トリアージされた状態になる +2. `EmergencyCase` と `ObservationCase` は異なる能力を持つ異なる型 +3. 一度変態すると、新たな変態なしにステータスは変更できない ## 他のドメインでの変態 From b6340a955088901ddbb335beaee14f1badc0d81d Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Thu, 8 Jan 2026 00:14:57 +0900 Subject: [PATCH 2/4] docs: refine tutorials with philosophical depth and reduced formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tutorials: - Convert Key Insights to prose, add philosophical closing - Add "To be is to become" / 「在ることは、成ること。」 - Rename sections: Why This Matters → パラダイムの転換 - Rename: Key Insights → 哲学, Complete Flow → Temporal Existence - Change $result to $final for clarity - Remove excessive bold text from tables and inline text - Add Temporal Existence explanation Philosophy Behind: - Add Sartre reference: "Existence precedes action" - Add Sartre to philosophical connections table Getting Started: - Align terminology (Semantic variables) --- manuals/1.0/en/12-philosophy-behind.md | 3 + manuals/1.0/en/getting-started.md | 4 +- manuals/1.0/en/tutorial.md | 38 ++++++------ manuals/1.0/ja/12-philosophy-behind.md | 3 + manuals/1.0/ja/getting-started.md | 18 +++--- manuals/1.0/ja/tutorial.md | 83 ++++++++++++++------------ 6 files changed, 82 insertions(+), 67 deletions(-) diff --git a/manuals/1.0/en/12-philosophy-behind.md b/manuals/1.0/en/12-philosophy-behind.md index 99e3451..518bf58 100644 --- a/manuals/1.0/en/12-philosophy-behind.md +++ b/manuals/1.0/en/12-philosophy-behind.md @@ -112,6 +112,8 @@ function processUser(ValidatedUser $user) { The idea: rather than handling errors, make certain errors impossible to represent. +Sartre wrote "Existence precedes essence"—we exist first, then define ourselves. In Be Framework: Existence precedes action—what you ARE determines what you CAN DO. + --- ## 4. Heraclitus: Everything Flows @@ -350,6 +352,7 @@ These philosophical ideas share common themes: |------------|-------------------------|--------------------------| | Heraclitus | Flow | `Input → Being → Final` | | Aristotle | Potentiality | `Success|Failure $being` | +| Sartre | Existence precedes essence | Type determines capability | | Laozi | Non-forcing | `#[Be]` declaration | | Buddhism | Interdependence | `#[Input]` + `#[Inject]` | | Spinoza | Immanence/Transcendence | Input/Inject distinction | diff --git a/manuals/1.0/en/getting-started.md b/manuals/1.0/en/getting-started.md index 69cac60..c72a189 100644 --- a/manuals/1.0/en/getting-started.md +++ b/manuals/1.0/en/getting-started.md @@ -48,7 +48,7 @@ src/ ├── Reason/ │ └── Greeting.php # Transcendent capability ├── Semantic/ -│ └── Name.php # What can exist +│ └── Name.php # Semantic variables ├── Exception/ │ └── EmptyNameException.php └── Module/ @@ -156,4 +156,4 @@ Ready for a more complete example with Being classes and branching? Continue to Or revisit the concepts: - [Input Classes](./02-input-classes.html) - Starting points - [Final Objects](./04-final-objects.html) - Destinations -- [Semantic Variables](./06-semantic-variables.html) - Validation +- [Semantic Variables](./06-semantic-variables.html) - Domain constraints diff --git a/manuals/1.0/en/tutorial.md b/manuals/1.0/en/tutorial.md index 50fbcdb..b1501f7 100644 --- a/manuals/1.0/en/tutorial.md +++ b/manuals/1.0/en/tutorial.md @@ -276,14 +276,16 @@ $becoming = new Becoming($injector, 'Be\\App\\Semantic'); // High fever patient $patient = new PatientArrival(bodyTemperature: 39.5, heartRate: 90); -$result = $becoming($patient); +$final = $becoming($patient); -echo $result->priority; // "IMMEDIATE" -echo $result->color; // "RED" -echo $result->assignER(); // "Secure ER Room 1 immediately..." +echo $final->priority; // "IMMEDIATE" +echo $final->color; // "RED" +echo $final->assignER(); // "Secure ER Room 1 immediately..." ``` -## The Complete Flow +## Temporal Existence + +All existence flows through time—from Input through Being to Final. ``` PatientArrival(39.5°C, 90 bpm) @@ -335,11 +337,11 @@ Problems: ```php $patient = new PatientArrival($temp, $hr); -$result = $becoming($patient); +$final = $becoming($patient); -// $result IS an EmergencyCase or ObservationCase +// $final IS an EmergencyCase or ObservationCase // Only EmergencyCase has assignER() method -$result->assignER(); // Type-safe: only possible for EmergencyCase +$final->assignER(); // Type-safe: only possible for EmergencyCase ``` Benefits: @@ -347,6 +349,8 @@ Benefits: - Type IS the status (immutable) - Capabilities belong to existence +Type determines capability. Existence precedes action. + ## Project Structure ``` @@ -356,7 +360,7 @@ src/ ├── Exception/ │ └── LethalVitalException.php ├── Input/ -│ └── PatientArrival.php # Raw data +│ └── PatientArrival.php # Entry point ├── Module/ │ └── AppModule.php # DI configuration ├── Final/ @@ -373,9 +377,9 @@ src/ ## Key Insights -1. The patient doesn't "get triaged"—they BECOME a triaged state -2. `EmergencyCase` and `ObservationCase` are different types with different capabilities -3. Once transformed, status cannot change without new metamorphosis +The patient doesn't "get triaged"—they become a triaged state. `EmergencyCase` and `ObservationCase` are different types with different capabilities. Once transformed, status cannot change without new metamorphosis. + +All existence is relational, temporal, ever-becoming. Immanence meets transcendence. New being emerges. "To be is to become." ## Metamorphosis in Other Domains @@ -383,11 +387,11 @@ The same pattern applies everywhere: | Domain | Input | Being | Final | Reason | |--------|-------|-------|---------|--------| -| **Triage** | PatientArrival | TriageAssessment | Emergency/Observation | JTASProtocol | -| **Brewing** | RawMaterials | Fermentation | PremiumSake/Vinegar | YeastCulture | -| **Immigration** | VisaApplication | ConsularReview | Resident/Visitor | ImmigrationLaw | -| **Justice** | Evidence | Trial | Guilty/Acquitted | PenalCode | -| **Stellar** | GasCloud | Protostar | Star/BlackHole | PhysicsLaws | +| Triage | PatientArrival | TriageAssessment | Emergency/Observation | JTASProtocol | +| Brewing | RawMaterials | Fermentation | PremiumSake/Vinegar | YeastCulture | +| Immigration | VisaApplication | ConsularReview | Resident/Visitor | ImmigrationLaw | +| Justice | Evidence | Trial | Guilty/Acquitted | PenalCode | +| Stellar | GasCloud | Protostar | Star/BlackHole | PhysicsLaws | Every domain has its metamorphosis. Every existence has its reason. diff --git a/manuals/1.0/ja/12-philosophy-behind.md b/manuals/1.0/ja/12-philosophy-behind.md index 969be3d..3b42ab3 100644 --- a/manuals/1.0/ja/12-philosophy-behind.md +++ b/manuals/1.0/ja/12-philosophy-behind.md @@ -112,6 +112,8 @@ function processUser(ValidatedUser $user) { アイデア:エラーを処理するのではなく、特定のエラーを表現不可能にする。 +サルトルは「実存は本質に先立つ」と書きました—私たちはまず存在し、それから自分自身を定義します。Be Frameworkでは:存在は行動に先立つ—何であるかが何をできるかを決定します。 + --- ## 4. ヘラクレイトス:万物は流転する @@ -350,6 +352,7 @@ final readonly class PatientSymptoms |------|------|-------------| | ヘラクレイトス | 流転 | `Input → Being → Final` | | アリストテレス | 可能態 | `Success|Failure $being` | +| サルトル | 実存は本質に先立つ | 型が能力を決定する | | 老子 | 無為 | `#[Be]`宣言 | | 仏教 | 縁起 | `#[Input]` + `#[Inject]` | | スピノザ | 内在/超越 | Input/Injectの区別 | diff --git a/manuals/1.0/ja/getting-started.md b/manuals/1.0/ja/getting-started.md index 4bcc822..37c193b 100644 --- a/manuals/1.0/ja/getting-started.md +++ b/manuals/1.0/ja/getting-started.md @@ -48,7 +48,7 @@ src/ ├── Reason/ │ └── Greeting.php # 超越的な能力 ├── Semantic/ -│ └── Name.php # 何が存在できるか +│ └── Name.php # 意味的変数 ├── Exception/ │ └── EmptyNameException.php └── Module/ @@ -69,7 +69,7 @@ final readonly class HelloInput } ``` -`#[Be]` 属性は**運命**を宣言します—この入力が何になるかを。 +`#[Be]` 属性はこの入力が何になるか、自らの**運命**を宣言します。 ### Final クラス @@ -87,8 +87,8 @@ final readonly class Hello } ``` -- `#[Input]` は前の段階(HelloInput)からデータを受け取る -- `#[Inject]` は**超越**(外部からの能力)を受け取る +- `#[Input]` は前の段階(HelloInput)からデータを受け取ります。 +- `#[Inject]` は外部からの能力(トランセンデンス)を受け取ります。 ### Reason クラス @@ -99,9 +99,9 @@ final class Greeting } ``` -Greeting は**超越的な能力**—挨拶する力—を提供します。 +Greeting はトランセンデンス — 挨拶する力—を提供します。 -### 変態の実行 +### 変態(メタモルフォーシス)の実行 ```php $injector = new Injector(new AppModule()); @@ -122,7 +122,7 @@ Hello (Greeting が注入された状態) → "Hello World" ``` -入力は何も「しなかった」—変態を通じて Hello に**なった**のです。 +入力オブジェクトは何もしていません — 変態を通じて Hello になった(BEING)のです。 ## セマンティック検証を試す @@ -138,7 +138,7 @@ $input = new HelloInput(''); php bin/app.php ``` -`Semantic/Name.php` が名前が空であることを検証するため、エラーメッセージが表示されます。 +`Semantic/Name.php` が名前が空であることを検証するため、エラーメッセージが表示されます。空の名前では存在ができないのです。 ## 示された主要概念 @@ -156,4 +156,4 @@ Being クラスと分岐を含むより完全な例に進む準備ができま または概念を復習: - [Input Classes](./02-input-classes.html) - 出発点 - [Final Objects](./04-final-objects.html) - 目的地 -- [Semantic Variables](./06-semantic-variables.html) - 検証 +- [Semantic Variables](./06-semantic-variables.html) - 意味的変数 diff --git a/manuals/1.0/ja/tutorial.md b/manuals/1.0/ja/tutorial.md index 405f515..2cc6c10 100644 --- a/manuals/1.0/ja/tutorial.md +++ b/manuals/1.0/ja/tutorial.md @@ -17,9 +17,9 @@ permalink: /manuals/1.0/ja/tutorial.html ## はじめに -このチュートリアルでは、Be Framework の核心哲学を示す救急トリアージシステムを構築します:**オブジェクトは何かを「する」のではなく、何かに「なる」のです。** +このチュートリアルでは、Be Framework の核心哲学を示す救急トリアージシステムを構築します:オブジェクトは何かを「する」のではなく、何かに「なる」のです。 -患者は「トリアージされる」のではありません。医学プロトコルという超越的な知恵に基づいて、緊急症例または経過観察症例に**なる**のです。 +患者は「トリアージされる」のではありません。医学プロトコルという患者自身は持たない(=超越的な)知恵に基づいて、緊急症例または経過観察症例に**なる**のです。 ## 変態の流れ @@ -33,7 +33,7 @@ EmergencyCase または ObservationCase(最終的な存在) ## ステップ 1: オントロジーを定義する -ロジックを書く前に、**ドメインオントロジー**—このドメインで何が存在できるかの語彙—を定義します。 +ロジックを書く前に、**意味的変数**—このドメインで何が存在できるかの語彙—を定義します。 ### BodyTemperature @@ -50,7 +50,7 @@ final class BodyTemperature public function validate(float $bodyTemperature): void { if ($bodyTemperature < 30.0 || $bodyTemperature > 45.0) { - throw new LethalVitalException(); + throw new LethalVitalException($bodyTemperature); } } } @@ -70,7 +70,7 @@ final class HeartRate public function validate(int $heartRate): void { if ($heartRate < 20 || $heartRate > 250) { - throw new LethalVitalException(); + throw new LethalVitalException($heartRate); } } } @@ -96,7 +96,7 @@ final class LethalVitalException extends DomainException ## ステップ 3: Reason(超越)を定義する -JTASProtocol(Japan Triage and Acuity Scale)はプログラマーの恣意的なルールではありません。超越的な医学の知恵—世界に独立して存在する客観的な知識—を表します。Be Framework では、このようなドメインロジックは**第一級市民**になります:注入可能、テスト可能、明示的に可視。 +JTASProtocol(Japan Triage and Acuity Scale)は開発者の恣意的なルールではありません。超越的な医学の知恵—世界に独立して存在する客観的な知識—を表します。Be Framework では、このようなドメインロジックは第一級市民(first class citizen)になります:注入可能、テスト可能で明示的に表されます。 ```php // src/Reason/JTASProtocol.php @@ -104,10 +104,10 @@ JTASProtocol(Japan Triage and Acuity Scale)はプログラマーの恣意的 /** * JTAS (Japan Triage and Acuity Scale) プロトコル * - * 個々の患者やプログラマーから独立して存在する + * 個々の患者や開発者から独立して存在する * 超越的な医学の知恵。 * - * 注: 簡略化。実際のJTASは5レベル。 + * 注: 実際のJTASは5レベル存在します。 */ final readonly class JTASProtocol { @@ -149,13 +149,13 @@ final readonly class PatientArrival ```php // src/Reason/Emergency.php -final readonly class Emergency {} +final readonly class Emergency {} // 緊急 // src/Reason/Observation.php -final readonly class Observation {} +final readonly class Observation {} // 経過観察 ``` -これらは空のクラスではありません—それ自体が**区別**です。`Emergency` は `Observation` とは根本的に異なります。型自体が意味を持ちます。 +これらは空のクラスではありません—それ自体が**区別**です。`Emergency` は `Observation` とは根本的に異なり型自体が意味を持ちます。 ## ステップ 6: Being クラスを作成 @@ -198,9 +198,10 @@ final readonly class TriageAssessment // src/Final/EmergencyCase.php /** - * 最高優先度として存在する患者。 - * これは単なるステータスフラグではない。この患者は緊急である。 - * その型が他にはない能力を与える。 + * 最高優先度として存在する患者 + * + * これは単なるステータスフラグではなくこの患者は緊急です。 + * この型よって他にはない能力が与えられます。 */ final readonly class EmergencyCase { @@ -217,7 +218,7 @@ final readonly class EmergencyCase } /** - * EmergencyCase だけが ER 割り当てを要求できる + * EmergencyCase だけが ERを割り当てできます、 */ public function assignER(): string { @@ -259,7 +260,7 @@ final readonly class ObservationCase } ``` -各型は異なるメソッドを持ちます。`EmergencyCase` は `assignER()` を、`ObservationCase` は `assignWaitingArea()` を持ちます。型が能力を決定します—経過観察の患者に救急室を割り当てることはできません。 +各型は異なるメソッドを持ちます。`EmergencyCase` には `assignER()` が、`ObservationCase` には `assignWaitingArea()` メソッドが存在します。型によって能力が決定されます — 経過観察の患者に救急室を割り当てることはできません。 ## ステップ 8: 変態を実行 @@ -276,14 +277,16 @@ $becoming = new Becoming($injector, 'Be\\App\\Semantic'); // 高熱の患者 $patient = new PatientArrival(bodyTemperature: 39.5, heartRate: 90); -$result = $becoming($patient); +$final = $becoming($patient); -echo $result->priority; // "IMMEDIATE" -echo $result->color; // "RED" -echo $result->assignER(); // "直ちに救急室1を確保..." +echo $final->priority; // "IMMEDIATE" +echo $final->color; // "RED" +echo $final->assignER(); // "直ちに救急室1を確保..." ``` -## 完全なフロー +## 時間的存在 + +すべての存在は時間の中で変化し、Input から Being を経て Final へと変態します。 ``` PatientArrival(39.5°C, 90 bpm) @@ -298,7 +301,7 @@ EmergencyCase($being が Emergency なので) → assignER(): "直ちに救急室1を確保..." ``` -## 生存不可能な存在の処理 +## 生存不可能な存在 ```php // 生存可能範囲外の体温 @@ -312,9 +315,9 @@ try { } ``` -変態は**拒否されます**。致死的なバイタルサインを持つ患者は私たちのシステムに存在できません。 +変態は拒否されます。致死的なバイタルサインを持つ患者は私たちのシステムに存在できません。 -## なぜこれが重要か +## パラダイムの転換 ### 従来のアプローチ(Doing) @@ -335,11 +338,11 @@ if ($triageService->isEmergency($patient)) { ```php $patient = new PatientArrival($temp, $hr); -$result = $becoming($patient); +$final = $becoming($patient); -// $result は EmergencyCase または ObservationCase である +// $final は EmergencyCase または ObservationCase である // EmergencyCase だけが assignER() メソッドを持つ -$result->assignER(); // 型安全:EmergencyCase でのみ可能 +$final->assignER(); // 型安全:EmergencyCase でのみ可能 ``` 利点: @@ -347,6 +350,8 @@ $result->assignER(); // 型安全:EmergencyCase でのみ可能 - 型がステータスである(不変) - 能力は存在に属する +型が能力を決定する。存在は行動に先立つ。 + ## プロジェクト構造 ``` @@ -356,7 +361,7 @@ src/ ├── Exception/ │ └── LethalVitalException.php ├── Input/ -│ └── PatientArrival.php # 生データ +│ └── PatientArrival.php # 入力 ├── Module/ │ └── AppModule.php # DI設定 ├── Final/ @@ -371,25 +376,25 @@ src/ └── HeartRate.php ``` -## 重要な洞察 +## 哲学 + +患者は「トリアージされる」のではなく、トリアージされた状態になります。`EmergencyCase` と `ObservationCase` は異なる能力を持つ異なる型です。一度変態すると、新たな変態なしにステータスは変更できません。 -1. 患者は「トリアージされる」のではなく、トリアージされた状態になる -2. `EmergencyCase` と `ObservationCase` は異なる能力を持つ異なる型 -3. 一度変態すると、新たな変態なしにステータスは変更できない +すべての存在は時間の中に存在し、常に変化していて決して静止することはありません。絶えることなく自我を超越したものと出会い、影響を受け、自らを形作っていきます。「在ることは、成ること。」 ## 他のドメインでの変態 -同じパターンがあらゆる場所に適用されます: +同じパターンがあらゆる場所に適用されています: | ドメイン | Input | Being | Final | Reason | |---------|-------|-------|-------|--------| -| **トリアージ** | PatientArrival | TriageAssessment | Emergency/Observation | JTASProtocol | -| **醸造** | RawMaterials | Fermentation | PremiumSake/Vinegar | YeastCulture | -| **入国審査** | VisaApplication | ConsularReview | Resident/Visitor | ImmigrationLaw | -| **裁判** | Evidence | Trial | Guilty/Acquitted | PenalCode | -| **恒星進化** | GasCloud | Protostar | Star/BlackHole | PhysicsLaws | +| トリアージ | PatientArrival | TriageAssessment | Emergency/Observation | JTASProtocol | +| 醸造 | RawMaterials | Fermentation | PremiumSake/Vinegar | YeastCulture | +| 入国審査 | VisaApplication | ConsularReview | Resident/Visitor | ImmigrationLaw | +| 裁判 | Evidence | Trial | Guilty/Acquitted | PenalCode | +| 恒星進化 | GasCloud | Protostar | Star/BlackHole | PhysicsLaws | -すべてのドメインに変態があります。すべての存在に理由があります。 +このようにすべてのドメインに変態があります。すべての存在に理由があります。全ては時間的存在です。 ## 次のステップ From 70d9b00aa663d45ad04caba27cb823aa8e6b28e7 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Thu, 8 Jan 2026 00:30:56 +0900 Subject: [PATCH 3/4] fix: address review feedback - remove exception params, fix punctuation --- manuals/1.0/ja/tutorial.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manuals/1.0/ja/tutorial.md b/manuals/1.0/ja/tutorial.md index 2cc6c10..1406def 100644 --- a/manuals/1.0/ja/tutorial.md +++ b/manuals/1.0/ja/tutorial.md @@ -50,7 +50,7 @@ final class BodyTemperature public function validate(float $bodyTemperature): void { if ($bodyTemperature < 30.0 || $bodyTemperature > 45.0) { - throw new LethalVitalException($bodyTemperature); + throw new LethalVitalException(); } } } @@ -70,7 +70,7 @@ final class HeartRate public function validate(int $heartRate): void { if ($heartRate < 20 || $heartRate > 250) { - throw new LethalVitalException($heartRate); + throw new LethalVitalException(); } } } @@ -218,7 +218,7 @@ final readonly class EmergencyCase } /** - * EmergencyCase だけが ERを割り当てできます、 + * EmergencyCase だけが ERを割り当てできます。 */ public function assignER(): string { From e24053d88db1e319b386472a9776f06e283c99c3 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Thu, 8 Jan 2026 00:35:28 +0900 Subject: [PATCH 4/4] fix: align link descriptions - Domain ontology --- manuals/1.0/en/getting-started.md | 2 +- manuals/1.0/ja/getting-started.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manuals/1.0/en/getting-started.md b/manuals/1.0/en/getting-started.md index c72a189..40185ba 100644 --- a/manuals/1.0/en/getting-started.md +++ b/manuals/1.0/en/getting-started.md @@ -156,4 +156,4 @@ Ready for a more complete example with Being classes and branching? Continue to Or revisit the concepts: - [Input Classes](./02-input-classes.html) - Starting points - [Final Objects](./04-final-objects.html) - Destinations -- [Semantic Variables](./06-semantic-variables.html) - Domain constraints +- [Semantic Variables](./06-semantic-variables.html) - Domain ontology diff --git a/manuals/1.0/ja/getting-started.md b/manuals/1.0/ja/getting-started.md index 37c193b..6b09ace 100644 --- a/manuals/1.0/ja/getting-started.md +++ b/manuals/1.0/ja/getting-started.md @@ -156,4 +156,4 @@ Being クラスと分岐を含むより完全な例に進む準備ができま または概念を復習: - [Input Classes](./02-input-classes.html) - 出発点 - [Final Objects](./04-final-objects.html) - 目的地 -- [Semantic Variables](./06-semantic-variables.html) - 意味的変数 +- [Semantic Variables](./06-semantic-variables.html) - ドメインオントロジー