Skip to content

t1k:playablelabs:base:engine-core

FieldValue
Modulebase
Version2.29.2
Effortlow
Tools—

Keywords: engine feature budget, engine feature manifest, feature.json sidecar, playable features decision record, validate feature manifests

/t1k:playablelabs:base:engine-core
[kitRoot] [--json] [--allow-unknown] [--playable <file>]

Engine Feature Schemas (scripts/validate-features.cjs)

Section titled “Engine Feature Schemas (scripts/validate-features.cjs)”

The data and checker for the modular engine redesign: the JSON Schemas that describe a feature manifest, the feature sets, the always-on core list and an optional game decision record, plus the one script that checks them. The skill holds no game logic and no packer code.

PathHolds
schemas/feature.schema.jsonfeature.json, one sidecar per kit module (never read by the packer)
schemas/core.schema.jsonthe always-on core list data/core.json; frozen in phase 1
schemas/playable-features.schema.jsonplayable.features.json, an optional game decision record at the game repo root
schemas/cocos-cc-config-keys.jsonthe top-level features keys of Cocos cc.config.json at the pinned engine tag
data/sets.jsonthe feature sets (manifestVersion: 1); phase 1 ships one set, core-only, with an unmeasured budget
scripts/validate-features.cjsthe checker
scripts/lib-schema-subset.cjsthe JSON Schema subset the schemas use; the checker imports it
scripts/validate-features.test.cjsthe conformance test: one broken fixture per rule, each asserting its rule name and exit code
Terminal window
bun <skill-dir>/scripts/validate-features.cjs <kitRoot> [--json] [--allow-unknown] [--playable <file>]
  • <skill-dir> is .claude/modules/base/skills/t1k-playablelabs-base-engine-core in the kit repo, and .claude/skills/t1k-playablelabs-base-engine-core in an installed project.
  • <kitRoot> defaults to the current directory. The checker reads <kitRoot>/.claude/modules/<id>/feature.json, data/sets.json, and data/core.json when present.
  • Exit codes, highest applicable wins (2 > 1 > 3 > 0): 0 every check passed; 1 a check failed (cross-reference, sentinel, ownership, option reference); 2 manifest, schema or usage error; 3 an unmeasured budget. Exit 3 is not a pass.
  • Phase 1 has one unmeasured budget (core-only), so a plain run exits 3 by design. Add --allow-unknown to pass while still listing it. Verified on the phase-1 tree: plain run exit 3, --allow-unknown exit 0.
  • --json prints one record per finding and one summary record. Without it, one line per finding.
Terminal window
bun test <skill-dir>/scripts/validate-features.test.cjs

Expect 25 pass, 0 fail. A change to the checker or a schema that drops one of those 25 cases is a regression.

Running scripts/validate-features.cjs, reading its report and running its conformance test are mechanical, so a cheap-tier agent may do them. Changing a schema, deciding whether an unmeasured budget may be waived, or judging whether a feature set is correct stays with the main session or a native agent. Routing SSOT: rules/orchestration-rules.md § “Task-Type → Agent Routing”.

  • The schemas are the SSOT. Edit them only together with a conformance case in validate-features.test.cjs; the checker reads the schema files, it never copies them.
  • core.schema.json is frozen in phase 1 and data/core.json does not exist yet. A missing core.json is not an error.
  • unmeasured is never a pass. Do not write a figure into sets.json to clear exit 3; the measurement belongs to the phase that owns the size tool.
  • The test builds its fixtures under the OS temp dir. It needs no network and no installed packages.