[PR #934] [MERGED] feat(ruleset-5e-2014): SRD 5.1 catalogs for spells, class features and weapons (0.2.0) #1200

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

📋 Pull Request Information

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

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


📝 Commits (3)

  • d7535e0 feat(ruleset-5e-2014): SRD 5.1 catalogs for spells, class features and weapons (0.2.0)
  • 1e917ab chore(ruleset-5e-2014): build 0.2.0 against the Engine commit that ships Capability API 1.21
  • 42b8860 fix(ruleset-5e-2014): correct weapon properties against the SRD table and harden the catalog tooling

📊 Changes

23 files changed (+12988 additions, -67 deletions)

View changed files

📝 CONTRIBUTING.md (+10 -0)
📝 README.md (+1 -1)
➕ artifacts/ruleset-5e-2014-0.2.0.zip (+0 -0)
📝 catalog/preview/catalog.json (+22 -10)
📝 catalog/preview/notes.json (+6 -0)
📝 catalog/preview/v2/catalog.json (+22 -10)
📝 catalog/preview/v2/notes.json (+6 -0)
📝 catalog/preview/v3/catalog.json (+22 -10)
📝 catalog/preview/v3/notes.json (+6 -0)
📝 package.json (+1 -0)
📝 packages/ruleset-5e-2014/CHANGELOG.md (+7 -0)
📝 packages/ruleset-5e-2014/LICENSE-SRD.md (+2 -0)
📝 packages/ruleset-5e-2014/README.md (+48 -11)
➕ packages/ruleset-5e-2014/catalogs/features.json (+3139 -0)
➕ packages/ruleset-5e-2014/catalogs/spells.json (+7501 -0)
📝 packages/ruleset-5e-2014/locales/en.json (+1 -1)
📝 packages/ruleset-5e-2014/manifest.json (+19 -7)
📝 packages/ruleset-5e-2014/ruleset.json (+979 -2)
➕ scripts/build-5e-srd-catalogs.mjs (+731 -0)
📝 scripts/build-ruleset-packages.mjs (+18 -1)

...and 3 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 #933

Why this change

  • The 5e (SRD 5.1) ruleset gives a game the full character sheet, but every spell, attack and class feature had to be typed in by hand. Marinara Engine staging now has catalogs for rulesets (Capability API 1.21, Pasta-Devs/Marinara-Engine#6345): a ruleset can ship ready-made entries and the sheet editor offers them in an Add from catalog picker. This release gives the 5e package its catalogs.

What changed

  • ruleset-5e-2014 0.2.0, ruleset.json version 2 (the sheet itself is unchanged, so sheet.version stays 1).
  • Spells: 319 SRD 5.1 spells in catalogs/spells.json, with level, school and class filters. The class filter starts on the character's own class. A picked spell fills a row of the Spells list (name, level, ritual, concentration, a short notes line) and is never marked prepared.
  • Class and subclass features: 208 in catalogs/features.json, filtered by class, subclass and the level a feature is gained at. Eleven features also add a Class resources row, only where the SRD states a plain count (Second Wind, Action Surge, Rage, Ki, Sorcery Points, Channel Divinity, Wild Shape, Bardic Inspiration, Arcane Recovery, Divine Sense, Indomitable). Maximums are starting values; scaling with level is a later Engine slice, and the README says so.
  • Weapons: 36, inline in ruleset.json, as ready rows for the Attacks list. The Net is left out because it has no damage dice.
  • Entries carry the optional mechanics block only where the source is unambiguous: range, area, damage dice and type, attack roll, slot cost, and a save effect on the 55 spells whose wording leaves no doubt. The Engine shows it in the picker and does not use it in battles yet.
  • Not included: armor (it sets the Armor Class field, and a catalog can only fill lists). Healing spells are marked utility because the source has no healing field. Paladin spells carry no class tag because the source leaves them untagged.
  • Source and license: generated by the new scripts/build-5e-srd-catalogs.mjs (npm run build:5e-srd-catalogs -- --source <dir>) from Open5e's srd-2014 data (open5e/open5e-api, data/v2/wizards-of-the-coast/srd-2014/, commit 0e594c370b4daa9c8d8690979a58eab615afd6d5), whose document record names System Reference Document 5.1 under CC-BY-4.0. The raw source files are not committed. The converter is deterministic and fails loudly on a record it cannot map. LICENSE-SRD.md and the README keep the CC-BY-4.0 attribution and record where the machine-readable form came from.
  • Tooling: scripts/ruleset-package-checks.mjs gains assertRulesetCatalogs, used by the converter, the builder and validate-catalog.mjs alike: catalogs/<id>.json is allowed only beside ruleset.json and only on Capability API 1.21 or newer, every named catalog file must be declared and hash-pinned, each file parses, names its catalog, stays under 1 MB and 2000 entries, entry ids are unique and well formed, and every row names a list the catalog feeds and real columns of that list. The builder zips catalogs/. The ruleset package regression covers the new checks.
  • Generated outputs: artifacts/ruleset-5e-2014-0.2.0.zip, catalog/preview/** (staging-only tier, like 0.1.0), packages/ruleset-5e-2014/locales/en.json.

Package and security impact

  • Affected package IDs: ruleset-5e-2014
  • Engine compatibility impact: needs Capability API 1.21, which only Engine staging has today (built against d091ad7d3209e41fc8ef3a72033446dd34268fe2). An older Engine refuses the install with a readable message. The package stays in the staging-only tier.
  • New or changed permissions/entrypoints: none. Still data only: no Agent, no code, no permissions.
  • Restart, storage, update, or uninstall impact: no restart. Picked rows are copies stored in the character's or the game's sheet, so updating or uninstalling the package does not change them.

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 passing: npm run check (0 errors), node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-catalog.mjs, node scripts/tests/ruleset-package.regression.mjs, node scripts/tests/catalog-path-safety.regression.mjs, node scripts/tests/catalog-generatedat-determinism.regression.mjs, node scripts/tests/catalog-release-notes.regression.mjs, git diff --check. A second converter and builder run left every generated file byte-identical. A local CodeRabbit sweep of the branch completed with no findings.

The Engine's real parser (parseRulesetDefinition, parseRulesetCatalogFile) accepted ruleset.json and both catalog files. The agent also sideloaded the package files into a fresh data folder of a scratch Engine built from the catalogs branch (port 7820, no model connected), because a catalog install needs the published artifact: the ruleset listed with its three catalogs, both hash-pinned catalog files verified and were served, and in a character's Stats tab the spell picker opened on Wizard for a sheet whose class was "wizard", level 3 showed 28 spells, and picking Fireball added its row. This was NOT an install through the Engine's catalog.

Still to verify by hand:

  • Manually install 0.2.0 from Download Agents on an Engine staging build (staging channel) once this is merged, and update from 0.1.0.
  • Manually pick spells, features and weapons in a character's Stats editor and in a game's Edit sheet, and confirm a feature with a counter adds both rows.
  • Manually confirm an Engine without Capability API 1.21 refuses the install with a readable message.
  • Manually uninstall and confirm picked rows stay on the sheet.

Documentation impact

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

Touched: root README.md, CONTRIBUTING.md (the converter and the catalog family), the package README.md, CHANGELOG.md and LICENSE-SRD.md.

UI evidence (if applicable)

No package UI. The picker is the Engine's (Pasta-Devs/Marinara-Engine#6345).

Summary by CodeRabbit

  • New Features

    • Added ready-made SRD 5.1 catalogs to the 5e ruleset: 319 spells, 208 class/subclass features, and 36 weapons.
    • Added picker-based entry selection with filters for relevant classes, levels, schools, and weapon properties.
    • Selected entries are copied into editable sheet rows; numeric-use features can automatically populate class resources.
  • Documentation

    • Added guidance on catalog contents, generation, licensing, and installation requirements.
    • Updated the package to version 0.2.0, requiring Capability API 1.21.
    • Catalog numbers are recorded but do not change the default combat behavior.

🔄 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/934 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/19/2026 **Status:** ✅ Merged **Merged:** 9/19/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/ruleset-5e-catalogs` --- ### 📝 Commits (3) - [`d7535e0`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d7535e09bfa601af5b5e4be475ebcc1991d2d5d7) feat(ruleset-5e-2014): SRD 5.1 catalogs for spells, class features and weapons (0.2.0) - [`1e917ab`](https://github.com/Pasta-Devs/Marinara-Agents/commit/1e917ab3988dd95504865655dacd09b205c42f8f) chore(ruleset-5e-2014): build 0.2.0 against the Engine commit that ships Capability API 1.21 - [`42b8860`](https://github.com/Pasta-Devs/Marinara-Agents/commit/42b886038be773cfa21bc48222b83bc4a820b670) fix(ruleset-5e-2014): correct weapon properties against the SRD table and harden the catalog tooling ### 📊 Changes **23 files changed** (+12988 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `CONTRIBUTING.md` (+10 -0) 📝 `README.md` (+1 -1) ➕ `artifacts/ruleset-5e-2014-0.2.0.zip` (+0 -0) 📝 `catalog/preview/catalog.json` (+22 -10) 📝 `catalog/preview/notes.json` (+6 -0) 📝 `catalog/preview/v2/catalog.json` (+22 -10) 📝 `catalog/preview/v2/notes.json` (+6 -0) 📝 `catalog/preview/v3/catalog.json` (+22 -10) 📝 `catalog/preview/v3/notes.json` (+6 -0) 📝 `package.json` (+1 -0) 📝 `packages/ruleset-5e-2014/CHANGELOG.md` (+7 -0) 📝 `packages/ruleset-5e-2014/LICENSE-SRD.md` (+2 -0) 📝 `packages/ruleset-5e-2014/README.md` (+48 -11) ➕ `packages/ruleset-5e-2014/catalogs/features.json` (+3139 -0) ➕ `packages/ruleset-5e-2014/catalogs/spells.json` (+7501 -0) 📝 `packages/ruleset-5e-2014/locales/en.json` (+1 -1) 📝 `packages/ruleset-5e-2014/manifest.json` (+19 -7) 📝 `packages/ruleset-5e-2014/ruleset.json` (+979 -2) ➕ `scripts/build-5e-srd-catalogs.mjs` (+731 -0) 📝 `scripts/build-ruleset-packages.mjs` (+18 -1) _...and 3 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 #933 ## Why this change - The 5e (SRD 5.1) ruleset gives a game the full character sheet, but every spell, attack and class feature had to be typed in by hand. Marinara Engine `staging` now has catalogs for rulesets (Capability API 1.21, Pasta-Devs/Marinara-Engine#6345): a ruleset can ship ready-made entries and the sheet editor offers them in an **Add from catalog** picker. This release gives the 5e package its catalogs. ## What changed - `ruleset-5e-2014` 0.2.0, `ruleset.json` version 2 (the sheet itself is unchanged, so `sheet.version` stays 1). - **Spells**: 319 SRD 5.1 spells in `catalogs/spells.json`, with level, school and class filters. The class filter starts on the character's own class. A picked spell fills a row of the Spells list (name, level, ritual, concentration, a short notes line) and is never marked prepared. - **Class and subclass features**: 208 in `catalogs/features.json`, filtered by class, subclass and the level a feature is gained at. Eleven features also add a **Class resources** row, only where the SRD states a plain count (Second Wind, Action Surge, Rage, Ki, Sorcery Points, Channel Divinity, Wild Shape, Bardic Inspiration, Arcane Recovery, Divine Sense, Indomitable). Maximums are starting values; scaling with level is a later Engine slice, and the README says so. - **Weapons**: 36, inline in `ruleset.json`, as ready rows for the Attacks list. The Net is left out because it has no damage dice. - Entries carry the optional `mechanics` block only where the source is unambiguous: range, area, damage dice and type, attack roll, slot cost, and a save effect on the 55 spells whose wording leaves no doubt. The Engine shows it in the picker and does not use it in battles yet. - **Not included**: armor (it sets the Armor Class field, and a catalog can only fill lists). Healing spells are marked `utility` because the source has no healing field. Paladin spells carry no class tag because the source leaves them untagged. - **Source and license**: generated by the new `scripts/build-5e-srd-catalogs.mjs` (`npm run build:5e-srd-catalogs -- --source <dir>`) from Open5e's `srd-2014` data (`open5e/open5e-api`, `data/v2/wizards-of-the-coast/srd-2014/`, commit `0e594c370b4daa9c8d8690979a58eab615afd6d5`), whose document record names System Reference Document 5.1 under CC-BY-4.0. The raw source files are not committed. The converter is deterministic and fails loudly on a record it cannot map. `LICENSE-SRD.md` and the README keep the CC-BY-4.0 attribution and record where the machine-readable form came from. - **Tooling**: `scripts/ruleset-package-checks.mjs` gains `assertRulesetCatalogs`, used by the converter, the builder and `validate-catalog.mjs` alike: `catalogs/<id>.json` is allowed only beside `ruleset.json` and only on Capability API 1.21 or newer, every named catalog file must be declared and hash-pinned, each file parses, names its catalog, stays under 1 MB and 2000 entries, entry ids are unique and well formed, and every row names a list the catalog feeds and real columns of that list. The builder zips `catalogs/`. The ruleset package regression covers the new checks. - Generated outputs: `artifacts/ruleset-5e-2014-0.2.0.zip`, `catalog/preview/**` (staging-only tier, like 0.1.0), `packages/ruleset-5e-2014/locales/en.json`. ## Package and security impact - Affected package IDs: `ruleset-5e-2014` - Engine compatibility impact: needs Capability API 1.21, which only Engine `staging` has today (built against `d091ad7d3209e41fc8ef3a72033446dd34268fe2`). An older Engine refuses the install with a readable message. The package stays in the staging-only tier. - New or changed permissions/entrypoints: none. Still data only: no Agent, no code, no permissions. - Restart, storage, update, or uninstall impact: no restart. Picked rows are copies stored in the character's or the game's sheet, so updating or uninstalling the package does not change them. ## 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 passing: `npm run check` (0 errors), `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-package-locales.mjs`, `node scripts/validate-catalog.mjs`, `node scripts/tests/ruleset-package.regression.mjs`, `node scripts/tests/catalog-path-safety.regression.mjs`, `node scripts/tests/catalog-generatedat-determinism.regression.mjs`, `node scripts/tests/catalog-release-notes.regression.mjs`, `git diff --check`. A second converter and builder run left every generated file byte-identical. A local CodeRabbit sweep of the branch completed with no findings. The Engine's real parser (`parseRulesetDefinition`, `parseRulesetCatalogFile`) accepted `ruleset.json` and both catalog files. The agent also sideloaded the package files into a fresh data folder of a scratch Engine built from the catalogs branch (port 7820, no model connected), because a catalog install needs the published artifact: the ruleset listed with its three catalogs, both hash-pinned catalog files verified and were served, and in a character's Stats tab the spell picker opened on Wizard for a sheet whose class was "wizard", level 3 showed 28 spells, and picking Fireball added its row. This was NOT an install through the Engine's catalog. Still to verify by hand: - Manually install 0.2.0 from **Download Agents** on an Engine `staging` build (staging channel) once this is merged, and update from 0.1.0. - Manually pick spells, features and weapons in a character's Stats editor and in a game's **Edit sheet**, and confirm a feature with a counter adds both rows. - Manually confirm an Engine without Capability API 1.21 refuses the install with a readable message. - Manually uninstall and confirm picked rows stay on the sheet. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation Touched: root `README.md`, `CONTRIBUTING.md` (the converter and the catalog family), the package `README.md`, `CHANGELOG.md` and `LICENSE-SRD.md`. ## UI evidence (if applicable) No package UI. The picker is the Engine's (Pasta-Devs/Marinara-Engine#6345). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added ready-made SRD 5.1 catalogs to the 5e ruleset: 319 spells, 208 class/subclass features, and 36 weapons. - Added picker-based entry selection with filters for relevant classes, levels, schools, and weapon properties. - Selected entries are copied into editable sheet rows; numeric-use features can automatically populate class resources. - **Documentation** - Added guidance on catalog contents, generation, licensing, and installation requirements. - Updated the package to version 0.2.0, requiring Capability API 1.21. - Catalog numbers are recorded but do not change the default combat behavior. <!-- 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:22 +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#1200
No description provided.