wire-doc

Wire unconnected JSON Doc files into Flix game engine loaders with fail-open defaults and watchFile hot-reload.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/ababup1192/flix_ge_studio --skill wire-doc-ababup1192
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wire-doc
Source: https://github.com/ababup1192/flix_ge_studio/tree/main/.agents/skills/wire-doc
Command: npx skills add https://github.com/ababup1192/flix_ge_studio --skill wire-doc-ababup1192

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? You created a Doc (JSON) file for game data but nothing in the code reads it yet, so edits in the editor have no effect. This Skill connects that orphaned Doc to the game by following the existing loader conventions, so saving the file immediately reflects in the running game. ## Core Features & Use Cases - Pattern-consistent loader creation: Reads an existing Doc loader and replicates its fromJson conversion, code-side defaults, and fail-open behavior (broken input falls back to defaults instead of crashing). - Schema and registration: Writes a <kind>.schema.json in the Studio sections dialect if missing, declares the Doc in project.json under editor.resources[], and ensures the Doc has a version field. - Hot-reload wiring: Adds an App.watchFile hookup in the Main startup code so saving the Doc updates the running game instantly. - Bridge tests: Writes up to three tests covering broken JSON falling back to defaults, single-field override, and rows-length tracking, deriving expectations from code-side defaults rather than hardcoded literals. - Use Case: You hand-wrote assets/theme.kind.json for a new color theme but the game ignores it. Invoke this Skill to generate the loader, schema, watchFile wiring, and verification tests, then confirm with make check and make test. ## Quick Start Connect the unwired Doc at assets/theme.kind.json to the game code following the existing loader pattern and make it hot-reload on save.

Frequently Asked Questions about wire-doc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a JSON Doc file to Flix game engine code?

Create a loader that mirrors an existing Doc loader: a fromJson conversion, code-side defaults, and fail-open handling so broken input falls back to defaults. Then register the schema in project.json under editor.resources and wire App.watchFile in Main for hot reload.

How do I make game data changes reflect without restarting the game?

Add an App.watchFile wiring in the Main startup code for the Doc file, copying an existing watchFile hookup as the model. Once wired, saving the JSON file is picked up by the running game immediately.

What schema format does the Flix GE Studio editor require?

Schemas must be written in the Studio sections dialect described in the engine repository's docs/doc-conventions.md. The vocabulary-reference format is not supported, and the Doc itself must include a version field or the Studio health check warns.

What happens when a Doc JSON file is malformed or broken?

Loaders follow a fail-open pattern: broken input does not crash the game but falls back to the code-side default values. One of the bridge tests verifies this behavior explicitly.

How many tests should I write when wiring a new Doc?

Write at most three bridge tests: broken JSON falls back to defaults, a single-field override changes only that value, and rows length tracking if rows exist. Derive expected values from the code-side defaults instead of pasting numeric literals.