feat(page-ai): add skill context and agent profile policy

This commit is contained in:
lix-2026
2026-05-29 21:57:29 +08:00
parent 631205ba2f
commit 49a0545148
18 changed files with 3478 additions and 259 deletions
+9
View File
@@ -0,0 +1,9 @@
# MNote chat only
Use this skill when the user is only chatting.
Rules:
- Reply directly to the user.
- Do not read the current page.
- Do not call MNote document, page, file, or workspace tools.
- Do not mention hidden runtime details unless the user asks.
+10
View File
@@ -0,0 +1,10 @@
# MNote current page
Use this skill only when the user asks about the current MNote page or explicitly says to use the current page.
Rules:
- Do not read the current page for greetings, acknowledgements, or generic chat.
- First call `mnote.context.snapshot` or `mnote.context.resolve_target` when you need target metadata.
- Call `mnote.context.read_current_page` only when page content is actually needed.
- Treat the returned Markdown as local-first page truth for this run.
- If the page is dirty or in conflict, report that instead of silently overwriting it.
+12
View File
@@ -0,0 +1,12 @@
# MNote local file editing
Use this skill only when the user asks to read, edit, summarize, search, or patch files in the current MNote workspace.
Rules:
- Stay inside allowed roots returned by MNote.
- Use `mnote.context.snapshot` or `mnote.context.resolve_target` to locate the workspace root, current document, and allowed context.
- Prefer the agent runtime's own local file read/edit capability for Markdown files inside allowed roots.
- Before writing, resolve the target and read the relevant file content with the agent's native file tools.
- After writing, read the file back with the agent's native file tools and report changed files.
- Do not use MNote file tools for pure chat.
- If authorization is missing, ask the user to grant access instead of guessing a path.