mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7830] [CLOSED] feat(mari): ship built-in skills for her authoring procedures #7955
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7955
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7830
Author: @ylli-selmani
Created: 10/19/2026
Status: ❌ Closed
Base:
staging← Head:feat/mari-builtin-skills📝 Commits (1)
43eba93feat(mari): ship read-only built-in skills, starting with onboarding📊 Changes
14 files changed (+607 additions, -75 deletions)
View changed files
📝
packages/client/src/components/chat/MariSkillsMenu.tsx(+57 -35)📝
packages/client/src/components/chat/mari/use-mari-skill-memory-actions.ts(+5 -2)📝
packages/client/src/localization/locales/en.json(+2 -0)➕
packages/server/src/assets/mari-skills/onboarding.md(+141 -0)📝
packages/server/src/routes/professor-mari-workspace.routes.ts(+9 -0)➕
packages/server/src/services/professor-mari/builtin-skills.ts(+103 -0)📝
packages/server/src/services/professor-mari/mari-skills-prompt.ts(+19 -4)➕
packages/server/src/services/professor-mari/skill-frontmatter.ts(+32 -0)📝
packages/server/src/services/professor-mari/workspace-agent.service.ts(+2 -5)📝
packages/server/src/services/professor-mari/workspace-skills.service.ts(+47 -24)📝
packages/shared/src/types/professor-mari-workspace.ts(+5 -0)📝
scripts/regressions/professor-mari-onboarding-guidance.regression.ts(+20 -5)➕
scripts/regressions/professor-mari/builtin-skills.regression.ts(+164 -0)📝
scripts/regressions/professor-mari/skills-prompt.regression.ts(+1 -0)📄 Description
Linked issue
Closes #7827
Closes #7907
#7827 proposed shipping this in slices, one PR per handbook. At Ylli's direction the whole set ships in
one PR: the nine handbooks share one router block and one prompt ratchet, and split PRs would leave the
prompt in a half-migrated state between them. #7907 is the one piece of engine behaviour the onboarding
handbook needs — a card's lorebooks readable through
character.get— so it lands here rather than as aseparate patch.
Why this change
Professor Mari's permanent prompt carried every authoring procedure inline, on every turn. Measured on
staging(51e6cace8):MARI_SYSTEM_PROMPT37,941 chars plusworkspaceCommandKnowledgePrompt()22,456 — about 60k chars (~15k tokens) before any history, and roughly 23k of that is procedure:
lorebook authoring, decision authoring, onboarding, reply repair, extensions, presets, themes and Home
widgets.
Two consequences, both visible in live runs:
and the policy that always matters competes with procedure that usually does not.
validation-error → fix table, no read-back verification. Onboarding was the clearest case: Mari
sometimes read
character.onboarding.*implementation code to get a write right, because theparagraph could not carry the procedure.
This PR moves procedure into nine shipped, read-only handbooks she fetches on demand with
skill.get,and leaves one router line per handbook in the prompt.
What changed
workspaceCommandKnowledgePromptShipped handbooks —
packages/server/src/assets/mari-skills/:onboarding.md,lorebook.md,presets.md,repair.md,extensions.md,decisions.md,characters.md,themes.md,home-widgets.md. Each has the field/argument shapes the caller cannot guess, its traps, a workedexample, and checkable completion criteria. They are protocol-neutral (
action, never a classicsay/stopenvelope), so the same text works under pi's native and textual modes and under classic.Prompt —
packages/server/src/services/professor-mari/workspace-agent.service.ts: the knowledgeblock is now the nine router lines plus policy (voice, read-only intent, the approval /
apply/change-card contract, delete safety, the command catalog, memory policy, the bare-create question
bound). Each router line names its skill id and that surface's one silent-failure trap. The duplicate
Personal Extensions block and the old
MARI_DECISION_AUTHORING_PROMPTare gone — their facts live inextensions.md/decisions.mdnow.piRuntimePrompt()interpolates the same shared block.Skills mechanism — built-ins are a shipped source merged into the existing index: ids are
builtin-*, they are always on and read-only (no edit, delete, toggle orPUT/DELETE), they cannever be shadowed by a user file (a collision is reported as a diagnostic), and an app update replaces
their text cleanly because
skills.jsonis never touched. The index is listed, never inlined; bodiesare read only on
skill.get.Client — the Skills panel separates shipped skills from the user's own (they are not part of the
"active / total" count), marks them read-only, and shows a "no custom skills yet" empty state for a
user who has not authored one.
Mari DB read (#7907) —
character.getreturnslorebooks: [{ id, name, description, attached: "linked" | "owned" }]: books linked to the card plus the one it owns, sorted by name, descriptiontruncated. Read-only and additive;
onboarding.mduses it to skim a card's lore before writing personaquestions.
Regressions —
professor-mari/builtin-skills.regression.ts(index, ids, read-on-demand contract,ratchet) and one per handbook (
mari/*-handbook.regression.ts, 8 of 9 execute their own worked exampleagainst a temporary database), plus
mari/character-lorebook-links.regression.tsfor #7907 and theupdated
mari-ask-latch/professor-mari-onboarding-guidanceassertions.Deferred, not in this PR
extensions.md:sourceis not adopted onupdate, andfull_page_accessis stored where the mapper strips it. They need their own change and tests.change card; the timeline labels
decision.recordas "Read"; an applied widget receipt reads "New appsetting" / "Changed value".
scripts/dev.mjsnever loads.env, sopnpm devon a non-default port health-checks the dailyinstall. Separate launcher branch.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run by the agent, on
8689e6bfe(after the CodeRabbit fixes; the boxes above are Ylli's to tick):pnpm check— exit 0 (TypeScript in all four projects, ESLint, localization, format, client build).node scripts/run-regressions.mjs --filter mari— 66/67. The one failure is pre-existing andWindows-only:
mari-appearance-pack.regression.mjsbuilds a/C:/…path fromimport.meta.urlinstead of
fileURLToPath; the asset it looks for is present and valid.coderabbit review --committed --base origin/staging --agent --fresh— 3 minor findings, all fixed in8689e6bfe(lorebookpositiontrap understated; dead "no custom skills yet" empty state; a lostpermanent-prompt assertion).
Still to do by Ylli, in the app:
shipped rows cannot be edited, toggled or deleted.
skill.getchip forbuiltin-onboarding, the cardpatched in the same pass, and
{{bond}}resolving.testScanwith the matched keys.asks against
stagingfor comparison.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No
docs/files change in this PR. The Skills panel is discoverable in-app; a short user-docs page("what the shipped skills are, and that they are read-only") would be worth a follow-up. The handbooks
themselves are agent procedure, not user documentation, so they are not translated.
UI evidence (if applicable)
Screenshots of the live runs (skills panel, a fetched handbook, the onboarding/character/theme/widget
flows) are kept privately and will be attached before this is marked ready.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.