[PR #433] [MERGED] feat(beholder): add a five-pass prompt template for local extractors #964

Closed
opened 2026-10-20 17:32:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/433
Author: @GetBeholder
Created: 8/19/2026
Status: ✅ Merged
Merged: 8/19/2026
Merged by: @GetBeholder

Base: staging ← Head: feat/beholder-local-five-pass-template


📝 Commits (1)

  • c2c7348 feat(beholder): add a five-pass prompt template for local extractors

📊 Changes

7 files changed (+44 additions, -28 deletions)

View changed files

➕ artifacts/beholder-1.2.0.zip (+0 -0)
📝 catalog/catalog.json (+7 -7)
📝 catalog/v2/catalog.json (+7 -7)
📝 catalog/v3/catalog.json (+7 -7)
📝 packages/beholder/agents.json (+12 -2)
📝 packages/beholder/locales/en.json (+7 -1)
📝 packages/beholder/manifest.json (+4 -4)

📄 Description

Linked issue

Closes #434

This is the package half of Marinara Engine PR #5251 (merged to Engine staging), which added multi-pass Beholder execution. That change is inert until a package offers a multi-pass template; this PR provides it.

Why this change

Beholder ships one prompt template: a single call covering every tracked field, which suits a strong general model (GPT-5.5+, Opus 4.8+, Kimi K3+).

A locally hosted Beholder extractor is trained per lane — it answers about worn items, wounds, held items, species, or bare/missing flags one at a time. Handing it the single whole-state prompt is off-distribution for it, so it returns partial or malformed JSON. There was no way to drive that model correctly from the Beholder agent.

What changed

Package beholder, 1.1.0 → 1.2.0:

  • Added a second selectable template, "Beholder local model — five passes", which marks each lane with a [worn], [wounds], [holding], [species], or [flags] heading. Engine 2.4.4 detects those headings, runs one call per lane, and unions the five deltas.
  • Named the existing default "SOTA model — one prompt" via defaultSettings.defaultPromptTemplateName / …Description.
  • defaultPromptTemplate is unchanged and remains the default, so existing installs behave exactly as before; the five-pass option is opt-in from the prompt-template selector.
  • English locale entries for the new template.
  • Regenerated manifest hashes, artifacts/beholder-1.2.0.zip, and the catalog entry in all lanes via scripts/build-agent-catalog.mjs beholder.

Package and security impact

  • Affected package IDs: beholder
  • Engine compatibility impact: engine.min 2.4.3 → 2.4.4. The five-pass template requires the lane-aware executor; on an older Engine the whole multi-lane template would be sent as a single system prompt. maxExclusive unchanged.
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none — payload-only change, restartRequired stays false

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

Leaving the boxes for a human, since the template asks for that. What I actually ran, and what I did not:

Ran and passing: scripts/build-agent-catalog.mjs beholder, validate-catalog.mjs (35 packages, lanes v2=35 v3=35), test-catalog-lanes.mjs, validate-package-locales.mjs (36 catalogs, 31 translations), catalog-generatedat-determinism.regression.mjs, npm run test:security, npm run check (exit 0), git diff --check.

Not done: I have not installed or updated the package through a running Engine, so the end-to-end path (select the template → five lane calls → merged state in the Beholder panel) is unverified in-app and should be checked before promotion.

Prompt fidelity: the five lane bodies are byte-identical to the prompts the local model was trained on, generated programmatically rather than transcribed, and re-verified against the source after the build. The default single prompt is byte-identical to the one already shipped in 1.1.0.

⚠️ One toolchain deviation to flag, since hashes are this repo's integrity mechanism. build-agent-catalog.mjs shells out to a system zip, which is not installed on my machine and which I cannot install without root. Rather than hand-build a bundle, I ran the builder unmodified with a zip shim that delegates to this repository's own scripts/deterministic-zip.mjs — the writer build-feature-packages.mjs and build-pixelforge-package.mjs already use, written precisely to avoid depending on a system zip.

Consequence: beholder-1.2.0.zip is store-only rather than deflated, so it is larger (11,269 bytes) than Info-ZIP would produce, and a maintainer re-running the builder with a real zip will get different bytes and a different artifact hash. Contents are correct and self-consistent — unzip-readable, exactly manifest.json + agents.json, no directory entries, and validate-catalog.mjs passes. If you would prefer the artifact regenerated with the standard toolchain, say so and I will drop the artifact commit for you to rebuild, or push a replacement.

Documentation impact

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

The package README/catalog description is unchanged; the new option is self-describing in the selector. Happy to add guidance if you want the local-model path documented.

Summary by CodeRabbit

  • New Features

    • Added a five-pass extraction prompt template for locally hosted models in Beholder.
  • Updates

    • Updated Beholder to version 1.2.0.
    • Requires engine version 2.4.4 or newer.
    • Refreshed package metadata, including download details, file sizes, and integrity information.

🔄 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/433 **Author:** [@GetBeholder](https://github.com/GetBeholder) **Created:** 8/19/2026 **Status:** ✅ Merged **Merged:** 8/19/2026 **Merged by:** [@GetBeholder](https://github.com/GetBeholder) **Base:** `staging` ← **Head:** `feat/beholder-local-five-pass-template` --- ### 📝 Commits (1) - [`c2c7348`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c2c734879b7d0c1fab3ae10001b2b88332ffdbfd) feat(beholder): add a five-pass prompt template for local extractors ### 📊 Changes **7 files changed** (+44 additions, -28 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/beholder-1.2.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+7 -7) 📝 `catalog/v2/catalog.json` (+7 -7) 📝 `catalog/v3/catalog.json` (+7 -7) 📝 `packages/beholder/agents.json` (+12 -2) 📝 `packages/beholder/locales/en.json` (+7 -1) 📝 `packages/beholder/manifest.json` (+4 -4) </details> ### 📄 Description ## Linked issue Closes #434 This is the package half of Marinara Engine PR #5251 (merged to Engine `staging`), which added multi-pass Beholder execution. That change is inert until a package offers a multi-pass template; this PR provides it. ## Why this change Beholder ships one prompt template: a single call covering every tracked field, which suits a strong general model (GPT-5.5+, Opus 4.8+, Kimi K3+). A **locally hosted Beholder extractor is trained per lane** — it answers about worn items, wounds, held items, species, or bare/missing flags one at a time. Handing it the single whole-state prompt is off-distribution for it, so it returns partial or malformed JSON. There was no way to drive that model correctly from the Beholder agent. ## What changed Package `beholder`, `1.1.0` → `1.2.0`: - Added a second selectable template, **"Beholder local model — five passes"**, which marks each lane with a `[worn]`, `[wounds]`, `[holding]`, `[species]`, or `[flags]` heading. Engine 2.4.4 detects those headings, runs one call per lane, and unions the five deltas. - Named the existing default **"SOTA model — one prompt"** via `defaultSettings.defaultPromptTemplateName` / `…Description`. - `defaultPromptTemplate` is **unchanged** and remains the default, so existing installs behave exactly as before; the five-pass option is opt-in from the prompt-template selector. - English locale entries for the new template. - Regenerated manifest hashes, `artifacts/beholder-1.2.0.zip`, and the catalog entry in all lanes via `scripts/build-agent-catalog.mjs beholder`. ## Package and security impact - Affected package IDs: `beholder` - Engine compatibility impact: `engine.min` `2.4.3` → **`2.4.4`**. The five-pass template requires the lane-aware executor; on an older Engine the whole multi-lane template would be sent as a single system prompt. `maxExclusive` unchanged. - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none — payload-only change, `restartRequired` stays false ## 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 Leaving the boxes for a human, since the template asks for that. What I actually ran, and what I did not: Ran and passing: `scripts/build-agent-catalog.mjs beholder`, `validate-catalog.mjs` (35 packages, lanes v2=35 v3=35), `test-catalog-lanes.mjs`, `validate-package-locales.mjs` (36 catalogs, 31 translations), `catalog-generatedat-determinism.regression.mjs`, `npm run test:security`, `npm run check` (exit 0), `git diff --check`. **Not done: I have not installed or updated the package through a running Engine**, so the end-to-end path (select the template → five lane calls → merged state in the Beholder panel) is unverified in-app and should be checked before promotion. Prompt fidelity: the five lane bodies are byte-identical to the prompts the local model was trained on, generated programmatically rather than transcribed, and re-verified against the source after the build. The default single prompt is byte-identical to the one already shipped in 1.1.0. > ⚠️ **One toolchain deviation to flag, since hashes are this repo's integrity mechanism.** `build-agent-catalog.mjs` shells out to a system `zip`, which is not installed on my machine and which I cannot install without root. Rather than hand-build a bundle, I ran the builder unmodified with a `zip` shim that delegates to this repository's own `scripts/deterministic-zip.mjs` — the writer `build-feature-packages.mjs` and `build-pixelforge-package.mjs` already use, written precisely to avoid depending on a system `zip`. > > Consequence: `beholder-1.2.0.zip` is **store-only rather than deflated**, so it is larger (11,269 bytes) than Info-ZIP would produce, and a maintainer re-running the builder with a real `zip` will get different bytes and a different artifact hash. Contents are correct and self-consistent — `unzip`-readable, exactly `manifest.json` + `agents.json`, no directory entries, and `validate-catalog.mjs` passes. **If you would prefer the artifact regenerated with the standard toolchain, say so and I will drop the artifact commit for you to rebuild, or push a replacement.** ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation The package README/catalog description is unchanged; the new option is self-describing in the selector. Happy to add guidance if you want the local-model path documented. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a five-pass extraction prompt template for locally hosted models in Beholder. * **Updates** * Updated Beholder to version 1.2.0. * Requires engine version 2.4.4 or newer. * Refreshed package metadata, including download details, file sizes, and integrity information. <!-- 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-20 17:32:44 +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#964
No description provided.