[PR #922] [MERGED] feat(ruleset-5e-2014): 5e (SRD 5.1) ruleset package and the ruleset kind #1194

Closed
opened 2026-10-21 05:05:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/922
Author: @kolacheee
Created: 9/18/2026
Status: ✅ Merged
Merged: 9/18/2026
Merged by: @kolacheee

Base: staging ← Head: feat/ruleset-5e-2014


📝 Commits (3)

  • 5f50c6f feat(ruleset-5e-2014): add package skeleton
  • 74a7357 feat(ruleset-5e-2014): publish the 5e ruleset to the staging tier and teach the tooling the ruleset kind
  • ff51cc3 fix(ruleset-5e-2014): make the ruleset kind exclusive in the catalog validator

📊 Changes

26 files changed (+1970 additions, -69 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+5 -0)
📝 CONTRIBUTING.md (+8 -2)
📝 README.md (+2 -0)
➕ artifacts/ruleset-5e-2014-0.1.0.zip (+0 -0)
➕ artwork/agent-covers/ruleset-5e-2014.png (+0 -0)
➕ catalog/preview/catalog.json (+55 -0)
➕ catalog/preview/notes.json (+15 -0)
➕ catalog/preview/v2/catalog.json (+55 -0)
➕ catalog/preview/v2/notes.json (+15 -0)
➕ catalog/preview/v3/catalog.json (+55 -0)
➕ catalog/preview/v3/notes.json (+15 -0)
📝 package.json (+1 -0)
➕ packages/ruleset-5e-2014/CHANGELOG.md (+5 -0)
➕ packages/ruleset-5e-2014/LICENSE-SRD.md (+3 -0)
➕ packages/ruleset-5e-2014/README.md (+47 -0)
➕ packages/ruleset-5e-2014/locales/en.json (+11 -0)
➕ packages/ruleset-5e-2014/manifest.json (+39 -0)
➕ packages/ruleset-5e-2014/ruleset.json (+1109 -0)
📝 schemas/package-manifest.schema.json (+5 -1)
➕ scripts/build-ruleset-packages.mjs (+128 -0)

...and 6 more files

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #921

Why this change

  • Engine staging can now run a game on a ruleset (Capability API 1.20, package kind ruleset), but it ships none, so there is nothing to pick until a package exists. This adds the first one, 5e from SRD 5.1.
  • This repository could not publish it: every tool here assumed a package ships an Agent.

What changed

  • Package ruleset-5e-2014 0.1.0: kind ruleset, Game Mode only, one data file (ruleset.json, byte-identical to the Engine's reference file), no Agent, no code, no permissions, no restart. It moves from the incomplete tier to the staging-only tier, so it is published in the preview overlay (catalog/preview/**) and the stable lanes are untouched (no entry, generatedAt unchanged).
  • schemas/package-manifest.schema.json: ruleset joins the kind enum, and contributions is now a known key (the schema refused every shipped manifest that declares contributions; nothing reads the schema, so this is documentation drift, fixed minimally).
  • scripts/ruleset-package-checks.mjs (new) and scripts/validate-catalog.mjs: a ruleset package is checked as what it is. The reserved asset and the kind go together in both directions; ruleset.json must be a declared file; no server, client or agents entrypoint; no permissions; restartRequired: false; manifest v2 with Capability API 1.20 or newer; the asset parses and carries id, an integer version and name. The Engine owns the full ruleset.json schema and validates it on install, so it is not copied here. The agent-definition block applies to every other package exactly as before. Counts gain a third bucket so a ruleset is never miscounted as an agent.
  • scripts/build-ruleset-packages.mjs (new): re-derives files[] from the declared asset, writes the manifest only when it changed, builds the ZIP with the shared deterministic zip helper, and writes through writeCatalogFamily, so both tiers are honoured.
  • Guidance, locale, docs: a guidance entry whose activation text is true for a ruleset ("choose it under Rules in the Game Mode setup wizard when you create a new game"), the manifest description and locales/en.json in sync, a README row, package README and changelog, and the CONTRIBUTING checklist now says a ruleset package ships ruleset.json instead of an Agent definition. buildEnglishPackageLocale omits the agents block when a package has no agents.
  • Cover: artwork/agent-covers/ruleset-5e-2014.png is a programmatic placeholder (a d20 on the house medallion). It does not follow the illustrated house style and the owner may want to replace it.
  • Regression: scripts/tests/ruleset-package.regression.mjs, wired into the PR checks.

Package and security impact

  • Affected package IDs: ruleset-5e-2014 (new, staging-only tier).
  • Engine compatibility impact: needs Capability API 1.20, which is on Engine staging today. engine.min 2.4.6. An older Engine refuses the install rather than installing something that does nothing.
  • New or changed permissions/entrypoints: none. The package declares no entrypoint and no permission, and the validator now enforces that for the kind.
  • Restart, storage, update, or uninstall impact: no restart. Uninstalling leaves saved games intact; a game created on the ruleset shows a notice and saves its checks unrolled until the package is installed again. It never falls back to other rules.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Commands run locally by the agent, all exit 0: npm run check, node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-package-locale-keys.mjs, node scripts/validate-catalog.mjs, node scripts/tests/catalog-generatedat-determinism.regression.mjs, node scripts/tests/catalog-release-notes.regression.mjs, node scripts/tests/ruleset-package.regression.mjs, git diff --check. The ZIP was built twice with the same sha256. The built artifact was also checked against the Engine's own code on Engine staging: its manifest parses with capabilityPackageManifestSchema, the declared hash and size match, ruleset.json parses with parseRulesetDefinition, the catalog entry parses, getCapabilityPackageInstallIssue returns nothing, and the artifact URL is the canonical one for the official staging catalog.

NOT done: a real install through the Engine. The Engine downloads packages over HTTPS only, so the artifact cannot be served to it from a local machine before it is hosted here.

Still to verify by hand, after this merges to staging:

  • On an Engine running from its staging branch, open the agent catalog, find 5e (SRD 5.1) (kind badge Rules), install it, and confirm no restart is asked for.
  • Create a new game, pick it under Rules, and confirm the game is created on it.
  • Uninstall it, open that game, and confirm the character sheet shows the "not installed" notice.
  • Confirm a stable (main) Engine does not list the package.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

None. The package has no UI of its own.

Summary by CodeRabbit

  • New Features

    • Added the 5e (SRD 5.1) ruleset package for Game Mode setup.
    • Supports ability and skill checks, saving throws, spellcasting, character resources, conditions, rests, and a full character sheet.
    • Available to Engine staging users with Capability API 1.20 or newer.
  • Documentation

    • Added installation, usage, licensing, and maintainer guidance for ruleset packages.
    • Clarified that battles continue using the default combat system in this release.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/922 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/18/2026 **Status:** ✅ Merged **Merged:** 9/18/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/ruleset-5e-2014` --- ### 📝 Commits (3) - [`5f50c6f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5f50c6fd2b40ec9cef5305e3a14a9032cfc8f4ff) feat(ruleset-5e-2014): add package skeleton - [`74a7357`](https://github.com/Pasta-Devs/Marinara-Agents/commit/74a735795d80608059f97810e8b45eee0caadfd4) feat(ruleset-5e-2014): publish the 5e ruleset to the staging tier and teach the tooling the ruleset kind - [`ff51cc3`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ff51cc360f2bac941348c7c941952b69c3596183) fix(ruleset-5e-2014): make the ruleset kind exclusive in the catalog validator ### 📊 Changes **26 files changed** (+1970 additions, -69 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+5 -0) 📝 `CONTRIBUTING.md` (+8 -2) 📝 `README.md` (+2 -0) ➕ `artifacts/ruleset-5e-2014-0.1.0.zip` (+0 -0) ➕ `artwork/agent-covers/ruleset-5e-2014.png` (+0 -0) ➕ `catalog/preview/catalog.json` (+55 -0) ➕ `catalog/preview/notes.json` (+15 -0) ➕ `catalog/preview/v2/catalog.json` (+55 -0) ➕ `catalog/preview/v2/notes.json` (+15 -0) ➕ `catalog/preview/v3/catalog.json` (+55 -0) ➕ `catalog/preview/v3/notes.json` (+15 -0) 📝 `package.json` (+1 -0) ➕ `packages/ruleset-5e-2014/CHANGELOG.md` (+5 -0) ➕ `packages/ruleset-5e-2014/LICENSE-SRD.md` (+3 -0) ➕ `packages/ruleset-5e-2014/README.md` (+47 -0) ➕ `packages/ruleset-5e-2014/locales/en.json` (+11 -0) ➕ `packages/ruleset-5e-2014/manifest.json` (+39 -0) ➕ `packages/ruleset-5e-2014/ruleset.json` (+1109 -0) 📝 `schemas/package-manifest.schema.json` (+5 -1) ➕ `scripts/build-ruleset-packages.mjs` (+128 -0) _...and 6 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- Open as a draft while implementation is in progress. Mark Ready for review only after validation and self-review. --> ## Linked issue Closes #921 ## Why this change - Engine `staging` can now run a game on a ruleset (Capability API 1.20, package kind `ruleset`), but it ships none, so there is nothing to pick until a package exists. This adds the first one, 5e from SRD 5.1. - This repository could not publish it: every tool here assumed a package ships an Agent. ## What changed - **Package `ruleset-5e-2014` 0.1.0**: kind `ruleset`, Game Mode only, one data file (`ruleset.json`, byte-identical to the Engine's reference file), no Agent, no code, no permissions, no restart. It moves from the incomplete tier to the **staging-only** tier, so it is published in the preview overlay (`catalog/preview/**`) and the stable lanes are untouched (no entry, `generatedAt` unchanged). - **`schemas/package-manifest.schema.json`**: `ruleset` joins the `kind` enum, and `contributions` is now a known key (the schema refused every shipped manifest that declares contributions; nothing reads the schema, so this is documentation drift, fixed minimally). - **`scripts/ruleset-package-checks.mjs` (new) and `scripts/validate-catalog.mjs`**: a ruleset package is checked as what it is. The reserved asset and the kind go together in both directions; `ruleset.json` must be a declared file; no `server`, `client` or `agents` entrypoint; no permissions; `restartRequired: false`; manifest v2 with Capability API 1.20 or newer; the asset parses and carries `id`, an integer `version` and `name`. The Engine owns the full `ruleset.json` schema and validates it on install, so it is not copied here. The agent-definition block applies to every other package exactly as before. Counts gain a third bucket so a ruleset is never miscounted as an agent. - **`scripts/build-ruleset-packages.mjs` (new)**: re-derives `files[]` from the declared asset, writes the manifest only when it changed, builds the ZIP with the shared deterministic zip helper, and writes through `writeCatalogFamily`, so both tiers are honoured. - **Guidance, locale, docs**: a guidance entry whose activation text is true for a ruleset ("choose it under Rules in the Game Mode setup wizard when you create a new game"), the manifest description and `locales/en.json` in sync, a README row, package README and changelog, and the CONTRIBUTING checklist now says a ruleset package ships `ruleset.json` instead of an Agent definition. `buildEnglishPackageLocale` omits the `agents` block when a package has no agents. - **Cover**: `artwork/agent-covers/ruleset-5e-2014.png` is a programmatic placeholder (a d20 on the house medallion). It does not follow the illustrated house style and the owner may want to replace it. - **Regression**: `scripts/tests/ruleset-package.regression.mjs`, wired into the PR checks. ## Package and security impact - Affected package IDs: `ruleset-5e-2014` (new, staging-only tier). - Engine compatibility impact: needs Capability API 1.20, which is on Engine `staging` today. `engine.min` 2.4.6. An older Engine refuses the install rather than installing something that does nothing. - New or changed permissions/entrypoints: none. The package declares no entrypoint and no permission, and the validator now enforces that for the kind. - Restart, storage, update, or uninstall impact: no restart. Uninstalling leaves saved games intact; a game created on the ruleset shows a notice and saves its checks unrolled until the package is installed again. It never falls back to other rules. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Commands run locally by the agent, all exit 0: `npm run check`, `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-package-locales.mjs`, `node scripts/validate-package-locale-keys.mjs`, `node scripts/validate-catalog.mjs`, `node scripts/tests/catalog-generatedat-determinism.regression.mjs`, `node scripts/tests/catalog-release-notes.regression.mjs`, `node scripts/tests/ruleset-package.regression.mjs`, `git diff --check`. The ZIP was built twice with the same sha256. The built artifact was also checked against the Engine's own code on Engine `staging`: its manifest parses with `capabilityPackageManifestSchema`, the declared hash and size match, `ruleset.json` parses with `parseRulesetDefinition`, the catalog entry parses, `getCapabilityPackageInstallIssue` returns nothing, and the artifact URL is the canonical one for the official staging catalog. NOT done: a real install through the Engine. The Engine downloads packages over HTTPS only, so the artifact cannot be served to it from a local machine before it is hosted here. Still to verify by hand, after this merges to `staging`: - On an Engine running from its `staging` branch, open the agent catalog, find **5e (SRD 5.1)** (kind badge **Rules**), install it, and confirm no restart is asked for. - Create a new game, pick it under **Rules**, and confirm the game is created on it. - Uninstall it, open that game, and confirm the character sheet shows the "not installed" notice. - Confirm a stable (`main`) Engine does not list the package. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) None. The package has no UI of its own. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added the 5e (SRD 5.1) ruleset package for Game Mode setup. * Supports ability and skill checks, saving throws, spellcasting, character resources, conditions, rests, and a full character sheet. * Available to Engine staging users with Capability API 1.20 or newer. * **Documentation** * Added installation, usage, licensing, and maintainer guidance for ruleset packages. * Clarified that battles continue using the default combat system in this release. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:05:09 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1194
No description provided.