graph-world
GraphOS向けのワールドロジック設計ツールとして、ゲームやアプリのドメインロジック、ライフサイクルシステム、イベント駆動型のコンテキスト初期化などのグラフモデルを設計するSkill。
📜 元の英語説明(参考)
World logic design tool for GraphOS. Design World/Context/Variant/System/Event/EventSystem graph models for any game or app, focusing on domain logic, lifecycle systems, bootstrap events, and event-driven context initialization. Depends on graph-management skill for graph read/apply APIs.
🇯🇵 日本人クリエイター向け解説
GraphOS向けのワールドロジック設計ツールとして、ゲームやアプリのドメインロジック、ライフサイクルシステム、イベント駆動型のコンテキスト初期化などのグラフモデルを設計するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o graph-world.zip https://jpskill.com/download/8882.zip && unzip -o graph-world.zip && rm graph-world.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/8882.zip -OutFile "$d\graph-world.zip"; Expand-Archive "$d\graph-world.zip" -DestinationPath $d -Force; ri "$d\graph-world.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
graph-world.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
graph-worldフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
GraphOS Skill: graph-world
あらゆるゲームやアプリケーションのために、GraphOS でノードファーストのアーキテクチャを用いてワールドロジックを設計します。
この Skill は、グラフの検査とトランザクション適用 API のために graph-management に依存します。
ノードのセマンティクス
- World: モデル全体の単一のルートコンテキスト。World ノードの名前は
Worldに固定されています。 - Context: World または Context の下にある階層的なドメイン/データモデルノード。Context はプレゼンテーションレイヤーではなく、論理/データレイヤーに属しますが、View レイヤーが監視する必要がある状態を公開する必要があります。Context は組み込みのストレージセマンティクスも持っているため、ロジックは新しい Context インスタンス/状態を作成する前に、既存のものを再利用することを優先する必要があります。
- Variant: World または Context の下にある型付き変数定義。Variant は、永続的/格納されたランタイムデータのデフォルトの設計面です。
- System: World または Context の下にあるライフサイクルロジックノード。一時的なキャッシュまたは一時的な作業状態は、格納されたグラフデータとしてモデル化するのではなく、所有する System 内で処理する必要があります。
- Event: World レベルのイベント定義。
- EventSystem: Event の下にあるイベント駆動型のハンドラー。
どのような時に使うか
- 新しいゲーム/アプリのワールドモデルをゼロから設計している場合。
- ビジネスドメインをネストされた Context ツリーに変換する必要がある場合。
- ライフサイクルロジックを記述する前に、型付きデータ変数 (Variant) が必要な場合。
- イベント駆動型の初期化またはランタイムフロー (ゲームの起動など) が必要な場合。
前提条件
- 最初に
graph-managementskill をロードして使用します。 - 変更を行う前に、利用可能なノードタイプと現在のグラフの状態を読み取ります。
- 可能な場合は、設計ステップごとに一貫したトランザクションを 1 つ使用します。
変更ルール (必須の順序)
これらのルールは、変更ワークフローに対する厳格な制約です。
- データモデルとデータロジックの変更は、最初に Graph に適用する必要があります。
- ダウンストリームのコード/ドキュメント/タスクを記述する前に、Graph で必要な Context/Variant/System/Event/EventSystem の更新を完了します。
- Graph の変更後、すぐに Graph ロジックがクローズドループであることを検証します。
- ステップ 4 のクロージャチェックを実行し、すべてのクロージャディメンションが合格することを確認します。
- クローズドループの検証が合格した場合にのみ、他のタスクに進みます。
- クロージャが失敗した場合は、最初に Graph のパッチに戻ります。Graph 以外の作業を続行しないでください。
- グラフの変更が成功するたびに、
gen/README.mdを変更記録で更新します。- 何が追加/変更/削除されたか、およびその理由を記録します。
- 変更ログセクションに追加します。以前の記録を上書きしないでください。
- グラフの変更が成功するたびに、
gen/GRAPH.mdを現在のプロセス図とクロージャチェックポイントで更新します。- 図を実際のステップ 0-6 のワークフローと同期させます。
- 図がクローズドループのままであることを検証します (失敗したチェックはパッチステップに戻ります)。
手順
ステップ 0: 現在の状態を読み取る
get_available_node_typesを呼び出して、ノードスキーマを検証します。get_graph_descriptionを呼び出して、現在のルート、コンテキスト、およびギャップを特定します。- 既存の領域を拡張する場合は、フォーカスノードで
get_graph_nodeを呼び出します。
完了チェック:
- World ノードが既に存在するかどうかを知っている。
- 新しい Context/Variant/System/Event ノードをどこにアタッチする必要があるかを知っている。
ステップ 1: データモデルとバリアントを構築する
目標: 最初に構造モデルを作成し、次にそのデータを型付けします。
- 正確に 1 つの
Worldルートが存在することを確認します。- ルートノード名は正確に
Worldでなければなりません。名前を変更したり、代替ルート名を作成したりしないでください。
- ルートノード名は正確に
- ドメイン境界ごとに
Contextツリーを作成します。- 広範囲から特定: 例:
Gameplay->Player->Inventory。 - 兄弟コンテキストの一貫性と低結合性を維持します。
- 広範囲から特定: 例:
- 関連する
World/Contextの下に、Variantノードを追加します。- 安定したセマンティックネーミングで
nameを設定します。 typeをstring|float|integer|boolean|JSONSchemaから設定します。type=JSONSchemaの場合、必要なフィールドを含むjsonSchemaを提供します。- 実際に必須のランタイムデータに対してのみ
requiredをマークします。
- 安定したセマンティックネーミングで
- トランザクションを適用し、グラフを再度読み取ります。
意思決定ポイント:
- ドメイン境界または所有権スコープをモデル化する場合は
Contextを使用します。 - スコープ内で型付きデータをモデル化する場合は
Variantを使用します。特に、要件にストレージ/永続性が含まれる場合。 - 構造化オブジェクトに対してのみ
JSONSchemaを優先します。それ以外の場合は、プリミティブ型を使用します。 - データがグラフで定義された状態の一部として存続する必要がある場合は、
Variantとして設計します。 - データが一時的なキャッシュ、中間計算結果、またはフレームローカルのワーキングセットにすぎない場合は、
Variantを追加する代わりに、関連するSystem内に保持します。 - グラフ設計には、論理/ドメインの状態のみを含める必要があり、プレゼンテーションレイヤーのウィジェット、スタイル、アニメーション、またはレンダリングに関する考慮事項は含めないでください。
- View レイヤーが監視/バインディングを通じてデータ変更に反応できるように、
ContextとそのVariantを設計します。 - View が、ロード中、選択済み、アクティブ、無効、表示、フェーズ、またはモードなどの明示的なランタイム状態に依存している場合は、それらをプレゼンテーションレイヤーで暗黙的に残すのではなく、
Context/Variantの論理状態としてモデル化します。
完了チェック:
- すべてのコアドメインに Context オーナーがいる。
- すべてのランタイムクリティカルなデータに、明示的な型を持つ Variant がある。
- 明確な World/Context 親を持たない孤立した Variant がない。
ステップ 2: データモデルに基づいてシステムを定義する
目標: ライフサイクル動作を既存のデータモデルスコープにバインドします。
- 動作ユニットごとに、所有する
World/Contextの下にSystemを作成します。 - 実装コントラクトによって、必要なライフサイクルエントリポイントを定義します。
spawn、despawn、update、change。
- 実装された各ライフサイクルメソッドを、明確な意図、トリガー、およびターゲットデータスコープで文書化します。
- システムの責任が、近くの Context/Variant の所有権と一致することを確認します。
- トポロジを適用して検証します。
意思決定ポイント:
- 変更するデータを所有する最も近いスコープに System を配置します。
- 初期化には
Spawn、定期的なロジックにはUpdate、リアクティブ同期にはChange、クリーンアップにはDespawnを使用します。 - 単一のノードが関連のない責任にまたがる場合は、System を分割します。
Systemの実装には、プレゼンテーションレイヤーのロジック (レンダリング、スタイリング、アニメーション、UI オーケストレーション) を含めるべきではありません。Systemロジックは、Context/`Va
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
GraphOS Skill: graph-world
Design world logic in GraphOS with a node-first architecture for any game or application.
This skill depends on graph-management for graph inspection and transaction apply APIs.
Node Semantics
- World: Single root context of the whole model. The World node name is fixed to
World. - Context: Hierarchical domain/data model node under World or Context. Context belongs to the logical/data layer, not the presentation layer, but should expose the state that the View layer needs to observe. Context also has built-in storage semantics, so logic should prefer reusing existing Context instances/state before creating new ones.
- Variant: Typed variable definition under World or Context. Variant is the default design surface for persistent/stored runtime data.
- System: Lifecycle logic node under World or Context. Temporary cache or ephemeral working state should be handled inside the owning System rather than modeled as stored graph data.
- Event: World-level event definition.
- EventSystem: Event-driven handler under Event.
When to Use
- You are designing a new game/app world model from scratch.
- You need to convert business domains into nested Context trees.
- You need typed data variables (Variant) before writing lifecycle logic.
- You need event-driven initialization or runtime flows (for example game startup).
Preconditions
- Load and use
graph-managementskill first. - Read available node types and current graph state before mutation.
- Use one coherent transaction per design step when possible.
Modification Rules (Mandatory Order)
These rules are hard constraints for any change workflow:
- Data model and data logic changes must be applied to Graph first.
- Complete required Context/Variant/System/Event/EventSystem updates in Graph before writing downstream code/docs/tasks.
- Validate Graph logic is closed-loop immediately after Graph changes.
- Run the Step 4 closure checks and ensure all closure dimensions pass.
- Only after closed-loop validation passes, proceed to any other tasks.
- If closure fails, return to Graph patching first; do not continue with non-Graph work.
- After every successful graph change, update
gen/README.mdwith a change record.- Record what was added/modified/removed and why.
- Append to the change log section; do not overwrite previous records.
- After every successful graph change, update
gen/GRAPH.mdwith the complete current process diagram and closure checkpoints.- Keep the diagram in sync with the actual Step 0-6 workflow.
- Validate that the diagram remains closed-loop (failed checks route back to patch steps).
Procedure
Step 0: Read Current State
- Call
get_available_node_typesto validate node schemas. - Call
get_graph_descriptionto identify current root, contexts, and gaps. - If extending an existing area, call
get_graph_nodeon the focus node.
Completion check:
- You know whether a World node already exists.
- You know where new Context/Variant/System/Event nodes should be attached.
Step 1: Build Data Model and Variants
Goal: create the structural model first, then type its data.
- Ensure exactly one
Worldroot exists.- The root node name must be exactly
World; do not rename it or create alternative root names.
- The root node name must be exactly
- Create
Contexttree by domain boundaries:- Broad to specific: e.g.
Gameplay->Player->Inventory. - Keep sibling contexts cohesive and low-coupling.
- Broad to specific: e.g.
- Under each relevant
World/Context, addVariantnodes:- Set
namewith stable semantic naming. - Set
typefromstring|float|integer|boolean|JSONSchema. - If
type=JSONSchema, providejsonSchemawith required fields. - Mark
requiredonly for truly mandatory runtime data.
- Set
- Apply the transaction and re-read graph.
Decision points:
- Use
Contextwhen modeling a domain boundary or ownership scope. - Use
Variantwhen modeling typed data inside a scope, especially when the requirement includes storage/persistence. - Prefer
JSONSchemaonly for structured objects; otherwise use primitive types. - If data must survive as part of the graph-defined state, design it as a
Variant. - If data is only a temporary cache, intermediate computation result, or frame-local working set, keep it inside the relevant
Systeminstead of adding aVariant. - Graph design should contain logical/domain state only, not presentation-layer widgets, styles, animations, or rendering concerns.
- Design
Contextand itsVariants so the View layer can react to data changes through observation/binding. - If the View depends on explicit runtime states such as loading, selected, active, disabled, visible, phase, or mode, model those as logical state in
Context/Variantrather than leaving them implicit in the presentation layer.
Completion check:
- Every core domain has a Context owner.
- Every runtime-critical datum has a Variant with explicit type.
- No orphan Variants without a clear World/Context parent.
Step 2: Define Systems Based on the Data Model
Goal: bind lifecycle behavior to existing data model scopes.
- For each behavior unit, create a
Systemunder its owningWorld/Context. - Define required lifecycle entry points by implementation contract:
spawn,despawn,update,change.
- Document each implemented lifecycle method with clear intent, trigger, and target data scope.
- Ensure system responsibilities align with nearby Context/Variant ownership.
- Apply and verify topology.
Decision points:
- Place System at the nearest scope that owns the data it mutates.
- Use
Spawnfor initialization,Updatefor recurring logic,Changefor reactive sync,Despawnfor cleanup. - Split a System when a single node spans unrelated responsibilities.
Systemimplementation should contain no presentation-layer logic (rendering, styling, animation, UI orchestration).Systemlogic should be driven byContext/Variantstate and domain rules only.- Keep temporary cache data internal to the owning
System; do not promote cache-only state into graphVariants unless it must be stored as part of the domain model.
Completion check:
- Each implemented lifecycle method has a matching description.
- Systems are attached to the correct World/Context scope.
- No lifecycle method exists without a clear trigger and data target.
TypeScript example (implement System after Graph is validated):
import type { GameplayContext } from './gen/World.js'; // graph auto-generated TypeScript types
import type { ISystem } from 'graphos-world-plugin';
export function createGameBootstrapSystem(): ISystem<GameplayContext> {
// optional internal cache for the System; not exposed to presentation layer
return {
spawn(ctx: GameplayContext): void {
// TODO
},
despawn(ctx: GameplayContext): void {
// TODO
},
update(ctx: GameplayContext, deltaTime: number): void {
// TODO
},
change(ctx: GameplayContext): void {
// TODO
},
};
}
Implementation guidance:
- Keep method behavior aligned with the closure checks in Step 4.
- Do not implement business logic before Graph data model and ownership are finalized.
- If Graph changes update generated context types, regenerate types first, then update this System implementation.
- Keep presentation behavior outside
System; the View layer should react by observingContextdata changes. - Intermediate cache should be handled privately inside each
Systemand should not leak into presentation concerns. - When generating
Systemcode files, use PascalCase file names and keep them exactly aligned with the graphSystemnodename. - Example: graph node
GameBootstrapSystem-> fileGameBootstrapSystem.ts. - Since
Contextprovides storage capability, implement a get-or-create pattern inSystemlogic: fetch existing Context/state first, and create/initialize only when missing. - For singleton
Contextaccess inSystemimplementations, use a fixed id withget...ById('id'). - Do not fetch singleton
Contextinstances through positional access such asget...Children()[0], because order-based lookup is unstable and obscures identity. - After implementing a
System, register it insrc/app.tswithapp.addSystem(...); generated code is not complete until runtime registration is wired.
Step 3: Define Events and EventSystems
Goal: model event-driven flows after data and lifecycle foundations are stable.
- Under
World, createEventnodes for key domain events:- Examples:
GameStarted,UserRegistered,SessionRestored.
- Examples:
- If event payload is needed, attach
Variantnodes under eachEvent. - Under each
Event, createEventSystemhandlers:- Describe how handlers create/init/update Context instances.
- Apply transaction and verify event-to-handler completeness.
Decision points:
- Create an
Eventfor cross-context or explicit trigger boundaries. - Use
EventSystemwhen handling should be decoupled from per-frame System logic. - For bootstrap flows, prefer an explicit startup/boot event plus handler.
- For UI-facing events, keep the Event data model as small as possible and prefer defining no payload fields unless data is strictly required.
Completion check:
- Every critical trigger has an Event.
- Every Event has at least one intended EventSystem handler (or explicitly documented as future work).
- Event payload Variants match handler input expectations.
TypeScript example (implement EventSystem after Graph trigger chain is validated):
import type { ChickenMergeLiteWorldContext, IChickenShootEvent } from './gen/World.js'; // graph auto-generated TypeScript types
import type { ISystem } from 'graphos-world-plugin';
export type SpawnBulletOnShootEventSystem = ISystem<ChickenMergeLiteWorldContext, IChickenShootEvent>;
export function createSpawnBulletOnShootEventSystem(): SpawnBulletOnShootEventSystem {
// optional internal cache for the System; not exposed to presentation layer
return {
handle(event: IChickenShootEvent): void {
// TODO
},
};
}
Implementation guidance:
- Ensure Event payload fields are defined in Graph and match
IChickenShootEvent. - For events consumed mainly by the presentation/UI layer, prefer signal-style Events with no payload; add fields only when the UI cannot derive the required state from
Context. - Keep
handleside effects scoped to the owning Context and verified by Step 4 trigger closure. - If Event or payload schema changes in Graph, regenerate
./gen/World.jstypes before updating EventSystem code. - When generating
EventSystemcode files, use PascalCase file names and keep them exactly aligned with the graphEventSystemnodename. - Example: graph node
SpawnBulletOnShootEventSystem-> fileSpawnBulletOnShootEventSystem.ts. - Since
Contextprovides storage capability,EventSystemhandlers should fetch target Context/state first and create/initialize only when it does not exist. - For singleton
Contextaccess inEventSystemimplementations, use a fixed id withget...ById('id'). - Do not resolve singleton
Contextinstances throughget...Children()[0]or any other position-based child lookup. - After implementing an
EventSystem, register it insrc/app.tswithapp.addEventSystem(...); event handlers are incomplete until the app entry wires them.
Application registration example (src/app.ts):
import { App } from 'graphos-world-plugin';
import { MatchLoopContext, WorldContext } from '../gen/World';
import { createMatchLifecycleSystem } from './MatchLifecycleSystem';
import { createApplyConfigHotReloadEventSystem } from './ApplyConfigHotReloadEventSystem';
export default function (app: App): WorldContext {
app.addSystem(MatchLoopContext.Table, createMatchLifecycleSystem());
app.addEventSystem('ConfigHotReloadRequested', createApplyConfigHotReloadEventSystem());
return WorldContext.default(app.ctx, app.cache)!;
}
Registration guidance:
- Register every generated
SystemandEventSysteminsrc/app.ts. - Keep imported symbol names aligned with the generated PascalCase file names and graph node names.
- Use the owning Context table when calling
app.addSystem(...). - Use the exact graph
Eventname when callingapp.addEventSystem(...).
Step 4: Closed-Loop Validation and Completion
Goal: verify the model is end-to-end closed-loop; if not, patch missing links and re-validate.
- Run full validation after Step 1-3:
- Re-run
get_graph_descriptionand compare expected topology with actual graph. - Optionally inspect key nodes with
get_graph_node(World, core Contexts, bootstrap Event).
- Re-run
- Validate closure dimensions:
- Structural closure: single World root, no orphan Context/Variant/System/Event/EventSystem.
- Data closure: each critical runtime datum exists as typed Variant and has owner scope.
- Behavior closure: each implemented lifecycle method has a concrete description and target data.
- Trigger closure: bootstrap and key domain triggers map to Event -> EventSystem -> target Context updates.
- Transaction closure: all apply results are successful, or retries resolved partial failures.
- If any closure check fails, classify and patch gaps in one focused transaction batch:
- Missing structure/data -> go back to Step 1.
- Missing lifecycle method coverage -> go back to Step 2.
- Missing event trigger/handler chain -> go back to Step 3.
- Re-run closure validation until all dimensions pass.
- Produce final verification summary:
- Added nodes/edges.
- Remaining deferred items (if any) with explicit reason.
- Confirmation that the model is closed-loop and ready for next iteration.
Completion check:
- All five closure dimensions pass.
- No unresolved critical gap remains.
- Final graph description matches intended domain design.
Step 5: Update gen/README.md Change Log
Goal: persist a human-readable record of every graph mutation session.
- Open (or create)
gen/README.md. - Append a new change record under a
## Change Logsection using the format below:
### YYYY-MM-DD — <short summary>
**Added**
- <node type> `<node name>` under `<parent>`: <reason>
**Modified**
- <node type> `<node name>`: <what changed and why>
**Removed**
- <node type> `<node name>`: <reason>
**Notes**
- <any closure gaps deferred, design decisions, or follow-up items>
- Do not overwrite previous records — always append.
- Keep each entry concise (one line per node change is sufficient).
Completion check:
gen/README.mdexists and contains an up-to-date change record for this session.- All added/modified/removed nodes are listed.
- Deferred items or known gaps are noted.
Step 6: Update gen/GRAPH.md Full Flow Diagram
Goal: keep an executable process diagram artifact that reflects the current workflow and closure loop.
- Open (or create)
gen/GRAPH.md. - Maintain one complete Mermaid flowchart for the end-to-end process:
- Include Step 0 to Step 6.
- Include closure dimensions and retry loops for failed checks.
- After each graph mutation session, update the diagram if any step, gate, or retry path changed.
- Validate closed-loop correctness in the diagram:
- Any failed closure/gate must route back to the correct patch step.
- Success path must end at final verification summary.
Completion check:
gen/GRAPH.mdexists and contains the latest complete flowchart.- The flowchart includes all active steps (0-6) and retry branches.
- Diagram closure is verified: no broken success/failure path and no missing back-edge.
Quality Gates (Final Review)
- Structure gate: exactly one World root and coherent Context tree.
- Type gate: Variants are typed correctly; JSONSchema nodes contain valid schema text.
- Ownership gate: Systems and Variants are attached to the scope that owns their data.
- Event gate: Event/EventSystem pairs cover bootstrap and key domain triggers.
- Verification gate: re-run
get_graph_descriptionafter each apply and confirm expected node/edge deltas. - Diagram gate:
gen/GRAPH.mdis updated and reflects the current closed-loop workflow.
Suggested Prompt Inputs
- "Design a roguelike game world with player, map, combat, and bootstrap event flow."
- "Build an e-commerce world model with catalog/order/payment contexts and event-driven order creation."
- "Create a smart-home app model with device contexts, lifecycle systems, and device-connected event handling."
Execution Notes
- Prefer atomic mutation batches with
apply_graph_transaction. - If partial success occurs, inspect
errorsand retry only failed intent. - Keep node ids stable for iterative evolution.
Complete Process Diagram
flowchart TD
A[Start: load graph-world skill] --> B[Preconditions\nload graph-management\nread node types + graph state]
B --> C[Step 0\nRead Current State]
C --> D[Step 1\nBuild Context tree + Variants]
D --> E{Step 1 complete?\nno orphan data\nall key variants typed}
E -- No --> D
E -- Yes --> F[Step 2\nDefine Systems]
F --> G{Step 2 complete?\nlifecycle methods + intent docs\nownership aligned}
G -- No --> F
G -- Yes --> H[Step 3\nDefine Events + EventSystems]
H --> I{Step 3 complete?\ncritical events covered\nhandler chain defined}
I -- No --> H
I -- Yes --> J[Step 4\nClosed-Loop Validation]
J --> K{Structure closure?\n(single World, no orphans)}
K -- No --> D
K -- Yes --> L{Data closure?\n(typed variants + owner scope)}
L -- No --> D
L -- Yes --> M{Behavior closure?\n(system timing -> descriptions -> data target)}
M -- No --> F
M -- Yes --> N{Trigger closure?\n(Event -> EventSystem -> Context update)}
N -- No --> H
N -- Yes --> O{Transaction closure?\n(apply success/retry resolved)}
O -- No --> P[Inspect errors\nretry failed intent only]
P --> J
O -- Yes --> Q[Quality Gates Final Review]
Q --> R{All gates passed?}
R -- No --> J
R -- Yes --> T[Step 5\nUpdate gen/README.md change log]
T --> U[Step 6\nUpdate gen/GRAPH.md full flowchart\nand verify diagram closed-loop]
U --> S[Output final verification summary\nClosed-loop model complete]