[GH-ISSUE #3915] [Feature]: Simplify shared agent, prompt, and lorebook contracts #2115

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

Originally created by @Xelvanis on GitHub (Jul 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3915

What problem does this solve?

Shared agent, prompt, and lorebook contracts currently duplicate validation definitions and retain unused parameters, fields, mirrors, and pass-through wrappers. This increases public API surface and creates opportunities for create/update validation rules to drift apart without providing runtime behavior.

Proposed solution

  • Derive prompt and lorebook update schemas from their corresponding create schemas with explicit immutable-field omissions.
  • Remove shared agent contract fields and parameters that have no readers or runtime effect.
  • Use the canonical built-in prompt resolver instead of a duplicate manifest lookup.
  • Call the canonical runtime-phase normalizer directly instead of routing through wrappers that ignore their agent-type argument.
  • Preserve existing prompt selection, agent execution, lorebook, and preset behavior.

Implementation owner: @Xelvanis.

Alternatives considered

  • Keep the duplicated schemas and manually synchronize future validation changes. This retains unnecessary maintenance risk.
  • Add new abstraction layers around the existing wrappers. This would increase indirection without adding behavior.
  • Rewrite prompt-template fallback resolution through the UI option projection. This was rejected because it adds unnecessary normalization and allocation on the default runtime path.

Additional context

The proposed work is based on the current staging branch. It has been exercised through prompt/lorebook CRUD flows in the browser and the repository lint, type-check, and production-build baseline.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jul 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3915 ## What problem does this solve? Shared agent, prompt, and lorebook contracts currently duplicate validation definitions and retain unused parameters, fields, mirrors, and pass-through wrappers. This increases public API surface and creates opportunities for create/update validation rules to drift apart without providing runtime behavior. ## Proposed solution - Derive prompt and lorebook update schemas from their corresponding create schemas with explicit immutable-field omissions. - Remove shared agent contract fields and parameters that have no readers or runtime effect. - Use the canonical built-in prompt resolver instead of a duplicate manifest lookup. - Call the canonical runtime-phase normalizer directly instead of routing through wrappers that ignore their agent-type argument. - Preserve existing prompt selection, agent execution, lorebook, and preset behavior. Implementation owner: @Xelvanis. ## Alternatives considered - Keep the duplicated schemas and manually synchronize future validation changes. This retains unnecessary maintenance risk. - Add new abstraction layers around the existing wrappers. This would increase indirection without adding behavior. - Rewrite prompt-template fallback resolution through the UI option projection. This was rejected because it adds unnecessary normalization and allocation on the default runtime path. ## Additional context The proposed work is based on the current `staging` branch. It has been exercised through prompt/lorebook CRUD flows in the browser and the repository lint, type-check, and production-build baseline. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:45: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-Engine#2115
No description provided.