[PR #949] [MERGED] feat(ruleset-5e-2014): class resources keep their own maximum (0.4.0) #1206

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

📋 Pull Request Information

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

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


📝 Commits (5)

  • 4f449c4 feat(catalog): check the scaled columns a ruleset catalog keeps
  • c31dafb feat(ruleset-5e-2014): class resources keep their own maximum
  • be029da build(ruleset-5e-2014): 0.4.0 against the Engine commit that merged scaled catalog values
  • 5f80d45 docs(ruleset-5e-2014): say which class resources the sheet keeps, and the one-level ceiling
  • 2fe1510 fix(ruleset-5e-2014): the counter maximum has room for Lay on Hands at level 20, and the build checks every kept counter fits

📊 Changes

20 files changed (+906 additions, -115 deletions)

View changed files

📝 CONTRIBUTING.md (+2 -0)
📝 README.md (+1 -1)
➕ artifacts/ruleset-5e-2014-0.4.0.zip (+0 -0)
📝 catalog/preview/catalog.json (+11 -11)
📝 catalog/preview/notes.json (+6 -0)
📝 catalog/preview/v2/catalog.json (+11 -11)
📝 catalog/preview/v2/notes.json (+6 -0)
📝 catalog/preview/v3/catalog.json (+11 -11)
📝 catalog/preview/v3/notes.json (+6 -0)
📝 packages/ruleset-5e-2014/CHANGELOG.md (+8 -0)
📝 packages/ruleset-5e-2014/README.md (+38 -16)
📝 packages/ruleset-5e-2014/catalogs/features.json (+142 -18)
📝 packages/ruleset-5e-2014/locales/en.json (+1 -1)
📝 packages/ruleset-5e-2014/manifest.json (+8 -8)
📝 packages/ruleset-5e-2014/ruleset.json (+23 -2)
📝 scripts/build-5e-srd-catalogs.mjs (+238 -28)
📝 scripts/build-ruleset-packages.mjs (+8 -8)
📝 scripts/ruleset-package-checks.mjs (+168 -0)
📝 scripts/tests/ruleset-package.regression.mjs (+215 -0)
📝 scripts/validate-catalog.mjs (+3 -0)

📄 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 #948

Why this change

  • The 5e package's class resources (Rage, Ki, Sorcery Points and the rest) came with the maximum they have at the level the feature is gained, and the player had to raise it by hand as they levelled. Marinara Engine can now keep such numbers itself (Capability API 1.23, Pasta-Devs/Marinara-Engine#6362, merged): a catalog entry row may say that a number column follows the sheet. This release uses it.

What changed

  • ruleset-5e-2014 0.4.0, Capability API 1.23, ruleset version 4, builtAgainst.engineCommit 1c160153fbe69f395ba940a0cf65d5e70e26cb9e.
  • Nine class resources keep their own maximum through scaled.max on their counter row, with values.max holding the starting number:
    • Rage, Ki and Sorcery Points: step tables built at build time from the Open5e class-table columns (srd_barbarian_rages, srd_monk_ki-points, srd_sorcerer_sorcery-points). The build fails when a column is missing or not numeric. Rage's "Unlimited" cell at 20th level is an explicit, checked opt-in: the counter stops at 6 and the row's notes say so.
    • Channel Divinity, Action Surge, Indomitable: the source has no numeric column, so the table is typed from the cited SRD sentence, and its thresholds are cross-checked against the levels the source marks the feature at.
    • Bardic Inspiration and Divine Sense follow Charisma through two new derived values (max(1, Charisma modifier) and 1 + Charisma modifier), and a new Lay on Hands counter follows a derived level x 5.
    • Second Wind, Wild Shape and Arcane Recovery stay as they were: their count does not change.
  • scripts/ruleset-package-checks.mjs gains assertRulesetScaled, wired into the builder and validate-catalog.mjs: the Engine's own rules restated (1 to 4 keys, each a number column of the row's list, a valid reference, the row is the entry's only row for its list, values still holds a starting number, a well-formed step table, 1.23 declared), with regression cases.
  • README, the package README and changelog, and CONTRIBUTING.md say which resources the sheet keeps and name the ceiling: the sheet has one Level field, so a multiclass character's resources follow the total level, and a player can delete the picked row and type their own.
  • Rebuilt: both asset catalogs, ruleset.json, the manifest hashes, the locale, artifacts/ruleset-5e-2014-0.4.0.zip and the preview overlay entries. The package stays staging-only.

Package and security impact

  • Affected package IDs: ruleset-5e-2014
  • Engine compatibility impact: needs Capability API 1.23 (Engine staging at or after 47985ac56). An older Engine refuses the update cleanly and keeps 0.3.0.
  • New or changed permissions/entrypoints: none. The package is pure data: no code, no permissions, no agent.
  • Restart, storage, update, or uninstall impact: none. A sheet that already holds a picked counter takes the kept maximum the next time it is edited; nothing is rewritten on read. Uninstall is unchanged.

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: node scripts/validate-catalog.mjs, node scripts/tests/ruleset-package.regression.mjs, node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locale-keys.mjs, the generatedAt determinism and release notes regressions, npm run check (0 errors), git diff --check, the converter run twice from the committed tree with byte-identical output, and npm run build:rulesets. Two complete local CodeRabbit reviews were run before opening. The first found one real bug, fixed: Lay on Hands is 100 at level 20 and the sheet's counter maximum column stopped at 99, so the Engine would have fitted it down. The column now has room (999), every counter that follows a derived value declares the highest it can reach, and the build fails when a kept counter cannot fit its column (mutation-tested). The second review made two suggestions, both declined for the same reason: they would make assertRulesetScaled stricter than the Engine it restates (refusing a step-table value outside the column's bounds, which the Engine fits to the column by design, and checking the values of an enum that abilityModFromField reads, which the Engine does not check). The 5e data's own fit is guarded by the new build check instead.

Proof against the Engine's own code (its shared package built from staging 1c160153f): parseRulesetDefinition accepts ruleset.json, parseRulesetCatalogFile accepts all three catalogs (spells 319, features 208 with 9 scaled rows, weapons 36), and recomputeScaledRows gives Rage 4 at level 6 and 6 at level 20, Ki 5 at level 5, Sorcery Points 12 at level 12, Channel Divinity 2 at 6 and 3 at 18, Action Surge 2 at 17, Indomitable 3 at 17, Bardic Inspiration 3 at Charisma 16 and 1 at Charisma 8, Divine Sense 4 at Charisma 16, Lay on Hands 25 at level 5 and 100 at level 20. A hand-typed Rage row is left alone, and a settled sheet comes back as the same object. The converter's guards were mutation-tested: a drifted typed threshold, a misplaced "Unlimited" level, a wrong starting value and a scaled text column each fail the build with a readable message.

Still to verify by hand:

  • The agent will install 0.4.0 through a scratch Engine on the staging channel once this PR is merged, and post the result here.
  • Manually pick Rage on a level 6 sheet in the app: the Max cell is locked and reads 4, and raising the level to 12 changes it to 5.
  • Manually confirm the three new derived values sit sensibly on the sheet for a character who has none of those classes.

Documentation impact

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

The root README row, the package README and changelog, and CONTRIBUTING.md are updated. The Engine side is documented in Pasta-Devs/Marinara-Engine#6362 (the authoring guide's scaled values).

UI evidence (if applicable)

None: the package ships no UI.

Summary by CodeRabbit

  • New Features
    • Class resources now automatically maintain maximum uses based on class level, Charisma, or other derived values.
    • Added Lay on Hands with a maximum pool equal to five times character level.
    • Multiclass resources use total character level, with kept maximums shown as read-only.
    • Rage is capped at six uses.
  • Compatibility
    • Version 0.4.0 now requires Engine Capability API 1.23.
  • Documentation
    • Updated package descriptions, installation guidance, and release notes to explain resource scaling and catalog 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/949 **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-scaled` --- ### 📝 Commits (5) - [`4f449c4`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4f449c44c36ae9bc59527012db71a5db70c23dda) feat(catalog): check the scaled columns a ruleset catalog keeps - [`c31dafb`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c31dafbe9efd0af11405b6199b6577ca70c17b2d) feat(ruleset-5e-2014): class resources keep their own maximum - [`be029da`](https://github.com/Pasta-Devs/Marinara-Agents/commit/be029daa688652ac4358e8126c48a39663af67e0) build(ruleset-5e-2014): 0.4.0 against the Engine commit that merged scaled catalog values - [`5f80d45`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5f80d4514f3f99f6892f46ffcb6061a184f549b3) docs(ruleset-5e-2014): say which class resources the sheet keeps, and the one-level ceiling - [`2fe1510`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2fe1510bc7502f728215b324098782e51521c864) fix(ruleset-5e-2014): the counter maximum has room for Lay on Hands at level 20, and the build checks every kept counter fits ### 📊 Changes **20 files changed** (+906 additions, -115 deletions) <details> <summary>View changed files</summary> 📝 `CONTRIBUTING.md` (+2 -0) 📝 `README.md` (+1 -1) ➕ `artifacts/ruleset-5e-2014-0.4.0.zip` (+0 -0) 📝 `catalog/preview/catalog.json` (+11 -11) 📝 `catalog/preview/notes.json` (+6 -0) 📝 `catalog/preview/v2/catalog.json` (+11 -11) 📝 `catalog/preview/v2/notes.json` (+6 -0) 📝 `catalog/preview/v3/catalog.json` (+11 -11) 📝 `catalog/preview/v3/notes.json` (+6 -0) 📝 `packages/ruleset-5e-2014/CHANGELOG.md` (+8 -0) 📝 `packages/ruleset-5e-2014/README.md` (+38 -16) 📝 `packages/ruleset-5e-2014/catalogs/features.json` (+142 -18) 📝 `packages/ruleset-5e-2014/locales/en.json` (+1 -1) 📝 `packages/ruleset-5e-2014/manifest.json` (+8 -8) 📝 `packages/ruleset-5e-2014/ruleset.json` (+23 -2) 📝 `scripts/build-5e-srd-catalogs.mjs` (+238 -28) 📝 `scripts/build-ruleset-packages.mjs` (+8 -8) 📝 `scripts/ruleset-package-checks.mjs` (+168 -0) 📝 `scripts/tests/ruleset-package.regression.mjs` (+215 -0) 📝 `scripts/validate-catalog.mjs` (+3 -0) </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 #948 ## Why this change - The 5e package's class resources (Rage, Ki, Sorcery Points and the rest) came with the maximum they have at the level the feature is gained, and the player had to raise it by hand as they levelled. Marinara Engine can now keep such numbers itself (Capability API 1.23, Pasta-Devs/Marinara-Engine#6362, merged): a catalog entry row may say that a number column follows the sheet. This release uses it. ## What changed - `ruleset-5e-2014` **0.4.0**, Capability API 1.23, ruleset `version` 4, `builtAgainst.engineCommit` 1c160153fbe69f395ba940a0cf65d5e70e26cb9e. - Nine class resources keep their own maximum through `scaled.max` on their counter row, with `values.max` holding the starting number: - Rage, Ki and Sorcery Points: step tables **built at build time from the Open5e class-table columns** (`srd_barbarian_rages`, `srd_monk_ki-points`, `srd_sorcerer_sorcery-points`). The build fails when a column is missing or not numeric. Rage's "Unlimited" cell at 20th level is an explicit, checked opt-in: the counter stops at 6 and the row's notes say so. - Channel Divinity, Action Surge, Indomitable: the source has no numeric column, so the table is typed from the cited SRD sentence, and its thresholds are cross-checked against the levels the source marks the feature at. - Bardic Inspiration and Divine Sense follow Charisma through two new derived values (`max(1, Charisma modifier)` and `1 + Charisma modifier`), and a new **Lay on Hands** counter follows a derived `level x 5`. - Second Wind, Wild Shape and Arcane Recovery stay as they were: their count does not change. - `scripts/ruleset-package-checks.mjs` gains `assertRulesetScaled`, wired into the builder and `validate-catalog.mjs`: the Engine's own rules restated (1 to 4 keys, each a number column of the row's list, a valid reference, the row is the entry's only row for its list, `values` still holds a starting number, a well-formed step table, 1.23 declared), with regression cases. - README, the package README and changelog, and `CONTRIBUTING.md` say which resources the sheet keeps and name the ceiling: the sheet has one Level field, so a multiclass character's resources follow the total level, and a player can delete the picked row and type their own. - Rebuilt: both asset catalogs, `ruleset.json`, the manifest hashes, the locale, `artifacts/ruleset-5e-2014-0.4.0.zip` and the preview overlay entries. The package stays staging-only. ## Package and security impact - Affected package IDs: `ruleset-5e-2014` - Engine compatibility impact: needs Capability API 1.23 (Engine `staging` at or after 47985ac56). An older Engine refuses the update cleanly and keeps 0.3.0. - New or changed permissions/entrypoints: none. The package is pure data: no code, no permissions, no agent. - Restart, storage, update, or uninstall impact: none. A sheet that already holds a picked counter takes the kept maximum the next time it is edited; nothing is rewritten on read. Uninstall is unchanged. ## 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: `node scripts/validate-catalog.mjs`, `node scripts/tests/ruleset-package.regression.mjs`, `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-package-locale-keys.mjs`, the generatedAt determinism and release notes regressions, `npm run check` (0 errors), `git diff --check`, the converter run twice from the committed tree with byte-identical output, and `npm run build:rulesets`. Two complete local CodeRabbit reviews were run before opening. The first found one real bug, fixed: Lay on Hands is 100 at level 20 and the sheet's counter maximum column stopped at 99, so the Engine would have fitted it down. The column now has room (999), every counter that follows a derived value declares the highest it can reach, and the build fails when a kept counter cannot fit its column (mutation-tested). The second review made two suggestions, both declined for the same reason: they would make `assertRulesetScaled` stricter than the Engine it restates (refusing a step-table value outside the column's bounds, which the Engine fits to the column by design, and checking the values of an enum that `abilityModFromField` reads, which the Engine does not check). The 5e data's own fit is guarded by the new build check instead. Proof against the Engine's own code (its shared package built from staging 1c160153f): `parseRulesetDefinition` accepts `ruleset.json`, `parseRulesetCatalogFile` accepts all three catalogs (spells 319, features 208 with 9 scaled rows, weapons 36), and `recomputeScaledRows` gives Rage 4 at level 6 and 6 at level 20, Ki 5 at level 5, Sorcery Points 12 at level 12, Channel Divinity 2 at 6 and 3 at 18, Action Surge 2 at 17, Indomitable 3 at 17, Bardic Inspiration 3 at Charisma 16 and 1 at Charisma 8, Divine Sense 4 at Charisma 16, Lay on Hands 25 at level 5 and 100 at level 20. A hand-typed Rage row is left alone, and a settled sheet comes back as the same object. The converter's guards were mutation-tested: a drifted typed threshold, a misplaced "Unlimited" level, a wrong starting value and a scaled text column each fail the build with a readable message. Still to verify by hand: - The agent will install 0.4.0 through a scratch Engine on the staging channel once this PR is merged, and post the result here. - Manually pick Rage on a level 6 sheet in the app: the Max cell is locked and reads 4, and raising the level to 12 changes it to 5. - Manually confirm the three new derived values sit sensibly on the sheet for a character who has none of those classes. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation The root README row, the package README and changelog, and `CONTRIBUTING.md` are updated. The Engine side is documented in Pasta-Devs/Marinara-Engine#6362 (the authoring guide's scaled values). ## UI evidence (if applicable) None: the package ships no UI. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Class resources now automatically maintain maximum uses based on class level, Charisma, or other derived values. - Added Lay on Hands with a maximum pool equal to five times character level. - Multiclass resources use total character level, with kept maximums shown as read-only. - Rage is capped at six uses. - **Compatibility** - Version 0.4.0 now requires Engine Capability API 1.23. - **Documentation** - Updated package descriptions, installation guidance, and release notes to explain resource scaling and catalog 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:31 +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#1206
No description provided.