Skip to content

Ship agent docs with the packages, and check simulation lint coverage - #54

Merged
SandroMaglione merged 6 commits into
mainfrom
docs/agent-docs-and-simulation-coverage
Oct 19, 2026
Merged

SandroMaglione merged 6 commits into
mainfrom
docs/agent-docs-and-simulation-coverage

Conversation

@SandroMaglione

@SandroMaglione SandroMaglione commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

A game's coding agent only sees what npm installs. This PR makes that its complete source of truth, makes the root README the only doc for humans, and closes the fail-open gap in the simulation lint rules.

For game agents (all shipped in the packages)

  • SETUP.md (in @typeonce/ritmo): one-time setup. Base packages and checks for every game (ritmo, ritmo-math, ritmo-devtools, oxlint-plugin-ritmo, oxlint), add-ons only when needed (ritmo-browser, ritmo-render, ritmo-pixi), linking the skill, .oxlintrc.json, a ritmo-devtools lint entry, and one check script.
  • skills/ritmo/SKILL.md: for every change. Where the docs are (source JSDoc, READMEs, changelogs), principles for where code and state belong, and a self-check. It doesn't repeat anything JSDoc, READMEs or lint messages already say.
  • Changelogs: every package ships its CHANGELOG.md. The 0.8.0 and 0.9.0 upgrade notes moved into the core changelog. MIGRATION.md keeps only the bevy-ts rename, which the published npm deprecation messages link to.
  • JSDoc fixes:
    • the Command example compiles;
    • examples no longer provide Math.random or performance.now() as services;
    • inspector docs match the actual behaviour;
    • every example name is prefixed;
    • the remaining CONCEPTS.md and GAME_API.md guidance moved into JSDoc.
  • Package README links point at GitHub, so they work from npm.

ritmo-devtools lint: uncovered-simulation-module

  • What it reports: every module that importing the entry loads, inside the .oxlintrc.json directory and outside node_modules, where ritmo/keep-simulation-headless is not on. Overrides apply in order, last match wins, and ignorePatterns counts as uncovered. The command exits 1 when anything is reported.
  • What it skips: modules imported inside lintTarget, such as render schedules passed to describe, are host code and not checked.
  • When it doesn't run: with no config, a config using extends, or no simulation override, it prints why the check didn't run and does not fail.
  • Node: requires Node 22.15 or newer (engines.node).

For humans

  • Root README: pitch, quick start, packages, guarantees, and a starter prompt that links SETUP.md.
  • Deleted: CONCEPTS.md, GAME_API.md, PLATFORM.md (its rules are folded into AGENTS.md), the example READMEs, and the superseded recipes example.
  • AGENTS.md: a new Docs section records which reader gets which doc.

Verification

  • pnpm run check and pnpm pack:check pass. pack:check now asserts that CHANGELOG.md, SETUP.md and the skill are in the tarballs.
  • Pre-release trial:
    • Setup: tarballs packed from this branch and served through pnpm overrides; empty scratch projects outside the repo; only the README starter prompt plus one game sentence.
    • Agents: Opus 5.5 Medium and GPT-6.1-Sol Medium.
    • Result: both completed setup, linked the skill, built the game with Clock, seeded Random, InputCapture and FixedLoop, wrote headless tests including Determinism.check, and passed their own pnpm check.
    • Coverage check: on one generated project, importing an uncovered module was reported and the command exited 1.

Follow-up

Running the new check against examples/top-down finds modules the repo's own .oxlintrc.json doesn't cover.

🤖 Generated with Claude Code

SandroMaglione and others added 6 commits October 19, 2026 10:55
…ulation lint coverage

- Add the `ritmo` agent skill to @typeonce/ritmo (skills/ritmo/SKILL.md).
- `ritmo-devtools lint` reports every module the simulation loads that the
  .oxlintrc.json simulation override does not cover (exit 1); Node >= 22.15.
- Ship CHANGELOG.md in every package; move the 0.8/0.9 upgrade notes into
  the core changelog. MIGRATION.md keeps only the bevy-ts rename, which the
  published npm deprecation messages link to.
- Fix shipped JSDoc (Command example, Random/time as services, inspector
  semantics), move the remaining CONCEPTS/GAME_API guidance into JSDoc, and
  prefix every example name.
- Root README is the human doc, with agent setup; delete CONCEPTS.md,
  GAME_API.md, PLATFORM.md (folded into AGENTS.md), the example READMEs, and
  the superseded recipes example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SandroMaglione
SandroMaglione merged commit bec7622 into main Oct 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant