mempalace-task
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMemPalace Task
MemPalace 任务
A quick-start workflow for active work moving between agents. Tasks belong in
the logstream, not in memory drawers. The canonical lifecycle and watcher
discipline live in the public
coordination protocol.
这是一个用于Agent间流转工作的快速入门工作流。任务应存放在日志流中,而非内存抽屉。标准生命周期和监控规则可查看公开的协同协议。
Verify the coordination seam
验证协同衔接
- Confirm succeeds.
mempalace --version - Confirm the MemPalace MCP tools are connected and the active palace is the intended shared brain.
- Establish the current agent's stable identity. Never impersonate another agent.
- Check the destination agent's monitoring status when possible. A pasted handoff can wake a turn-based agent; a logstream event alone cannot.
If setup is incomplete, stop and use the setup skill.
mempalace- 确认 执行成功。
mempalace --version - 确认MemPalace MCP工具已连接,且当前激活的palace是预期的共享核心。
- 确认当前Agent的稳定身份,切勿冒充其他Agent。
- 尽可能检查目标Agent的监控状态:粘贴移交操作可唤醒轮询模式的Agent,但仅日志流事件无法做到。
若设置未完成,请停止操作并使用设置技能。
mempalaceCreate a task
创建任务
Gather these fields from the user or current repository state:
- project routing name;
- requesting and destination agent identities;
- exact goal;
- target branch;
- exact hexadecimal base commit id (never a branch or tag);
- definition of done.
Resolve the branch and hexadecimal base commit id from the intended worker
checkout, not from an unrelated repository. Never pass a mutable branch or tag
as the base commit. Before appending anything, show the user the exact normalized task:
the identities, project, goal, branch, base commit, definition of done, and the
fact that delivery must close through MemPalace. Logstream events are immutable,
so obtain approval of that exact content unless the user already explicitly
approved it in the current turn.
Create the task through the high-level interface rather than assembling a raw
. When MCP is connected—especially for a client joining a remote
shared-brain hub—call with the approved fields. It
returns the stored and and writes on the hub, not to an
unintended local palace.
task.requestmempalace_task_createtaskhandoffOn the palace-owning machine, or when intentionally operating a local palace
through the shell, the equivalent CLI is:
bash
mempalace task create \
--project <project> \
--from-agent <requester> \
--to-agent <worker> \
--goal <exact-goal> \
--branch <branch> \
--base-commit <commit> \
--done <exact-definition-of-done>Use or for multiline CLI content; never flatten or
paraphrase the user's wording. The CLI prints a Ready to paste line; the MCP
tool returns the same line as . Return it unchanged so the user can
wake the destination agent without copying the whole task body. Never use the
local CLI fallback merely because the remote MCP call failed—surface and fix
the connection instead.
--goal-file--done-filehandoff从用户或当前仓库状态中收集以下字段:
- 项目路由名称;
- 请求方与目标Agent的身份;
- 明确的目标;
- 目标分支;
- 精确的十六进制基准提交ID(绝不能是分支或标签);
- 完成定义。
从目标工作者的检出版本中解析分支和十六进制基准提交ID,而非无关仓库。绝不能将可变的分支或标签作为基准提交。在添加任何内容前,向用户展示标准化后的精确任务:身份信息、项目、目标、分支、基准提交、完成定义,以及必须通过MemPalace完成交付的说明。日志流事件不可变,因此需获得用户对该精确内容的批准,除非用户在当前会话中已明确批准。
通过高级接口创建任务,而非组装原始的。当MCP已连接时——尤其是客户端加入远程共享核心枢纽时——调用并传入已批准的字段。该接口会返回存储的和,并写入枢纽,而非意外的本地palace。
task.requestmempalace_task_createtaskhandoff在palace所属机器上,或有意通过shell操作本地palace时,对应的CLI命令为:
bash
mempalace task create \
--project <project> \
--from-agent <requester> \
--to-agent <worker> \
--goal <exact-goal> \
--branch <branch> \
--base-commit <commit> \
--done <exact-definition-of-done>对于多行CLI内容,使用或;切勿简化或改写用户的表述。CLI会打印一条Ready to paste(可直接粘贴)的行;MCP工具会返回相同内容作为。原样返回该内容,以便用户无需复制整个任务主体即可唤醒目标Agent。切勿仅因远程MCP调用失败就使用本地CLI回退方案——应先暴露并修复连接问题。
--goal-file--done-filehandoffReceive and execute a pasted task
接收并执行粘贴的任务
When given :
Open MemPalace task <id> as <agent>...- Fetch the exact by
task.requestwithcorrelation_id=<id>; do not work from the short pasted line alone.mempalace_event_list - Verify it is addressed to this agent (or is a broadcast explicitly being accepted), and verify the workspace, branch, and base commit before edits.
- Claim the request with .
mempalace_event_ack(status=claimed) - Do the work and run the stated verification.
- Deliver a patch with . If blocked or failed, send a verbatim
mempalace_patch_submitinstead. Silence is not a valid outcome.task.reply - The requester fetches and verifies the artifact, applies it with explicit
user-visible intent, runs verification, then acknowledges or
applied.failed
For a remote-only shared-brain client, inbox monitoring is MCP-backed: use
with the stable destination identity and carry the last
event id forward as . Use for the wake-up
sweep. Do not run the local SQLite command unless
this machine owns the palace or a deliberately synchronized replica.
mempalace_event_waitsince_event_idmempalace_event_listmempalace logstream watch当收到指令时:
Open MemPalace task <id> as <agent>...- 使用通过
mempalace_event_list获取精确的correlation_id=<id>;切勿仅根据简短的粘贴行开展工作。task.request - 验证任务是否指向当前Agent(或是否是可接受的广播任务),并在编辑前验证工作区、分支和基准提交。
- 使用认领请求。
mempalace_event_ack(status=claimed) - 开展工作并执行指定的验证。
- 使用提交补丁。若操作受阻或失败,发送逐字的
mempalace_patch_submit替代。沉默并非有效结果。task.reply - 请求方获取并验证工件,以用户可见的明确意图应用它,执行验证,然后确认(已应用)或
applied(失败)。failed
对于仅远程连接的共享核心客户端,收件箱监控由MCP支持:使用并传入稳定的目标身份,将最后一个事件ID作为传递。使用执行唤醒扫描。除非当前机器拥有palace或同步副本,否则请勿运行本地SQLite的命令。
mempalace_event_waitsince_event_idmempalace_event_listmempalace logstream watchControlled headless mode
受控无头模式
Only when the user explicitly asks to launch an agent, first prepare a trusted,
clean Git checkout on the task's exact branch and base commit. Then run:
bash
mempalace task launch <task-id> --runner codex --workspace <path>
mempalace task launch <task-id> --runner claude --workspace <path>Those commands resolve a task from a local palace. On a remote-only MCP client,
fetch the single full with , save that exact
event object as JSON on the destination machine, and launch without consulting
an unrelated local palace:
task.requestmempalace_event_listbash
mempalace task launch --task-file <task-request.json> --runner codex --workspace <path>The task file is a transport snapshot, not a replacement task: do not edit or
reconstruct it. Headless launch always occurs on the destination machine that
owns the trusted checkout; the requester cannot remotely spawn a process merely
by appending to the hub.
This resolves the stored request, proves the workspace is a clean Git checkout
on the stored branch with equal to the stored base commit, validates the
addressed identity and its conventional or harness suffix,
and starts the selected runner without a shell. Use only
to accept a broadcast; it must never override a task addressed to somebody
else. The launcher does not bypass sandboxing, approvals, or harness
permissions. Do not add dangerous permission flags on the user's behalf.
HEAD*-codex*-claude--agent <identity>Task creation and process launch are separate actions. The pasteable handoff is
the portable default; headless launch is an explicit controlled-mode adapter.
仅当用户明确要求启动Agent时,先在任务指定的分支和基准提交上准备一个可信的、干净的Git检出版本。然后运行:
bash
mempalace task launch <task-id> --runner codex --workspace <path>
mempalace task launch <task-id> --runner claude --workspace <path>这些命令从本地palace解析任务。在仅远程连接的MCP客户端上,使用获取完整的单个,将该精确事件对象保存为JSON到目标机器,然后无需参考无关的本地palace即可启动:
mempalace_event_listtask.requestbash
mempalace task launch --task-file <task-request.json> --runner codex --workspace <path>任务文件是传输快照,而非替代任务:请勿编辑或重构它。无头启动始终在拥有可信检出版本的目标机器上进行;请求方仅通过向枢纽追加内容无法远程生成进程。
该操作会解析存储的请求,验证工作区是否为存储分支上的干净Git检出版本,且与存储的基准提交一致,验证目标身份及其常规的或 harness后缀,并在无shell的情况下启动所选运行器。仅接受广播任务时使用;绝不能用它覆盖指向其他Agent的任务。启动器不会绕过沙箱、审批或harness权限。切勿代表用户添加危险的权限标志。
HEAD*-codex*-claude--agent <identity>任务创建与进程启动是独立操作。可粘贴的移交是便携默认方案;无头启动是显式的受控模式适配。
Unhappy paths
异常场景
- Task missing or duplicated: stop rather than guessing which request to execute.
- Wrong identity: refuse it and tell the user who the task addresses.
- Base commit mismatch: do not edit; ask the requester to supersede the task with a corrected request.
- Destination not monitoring: give the user the Ready to paste line and explain that a human wake-up is required.
- MCP/logstream unavailable: run and return to setup; never silently replace coordination with a memory drawer.
mempalace status
- 任务缺失或重复: 停止操作,切勿猜测应执行哪个请求。
- 身份错误: 拒绝任务,并告知用户任务指向的对象。
- 基准提交不匹配: 请勿编辑;请请求方用修正后的请求替换原任务。
- 目标未监控: 向用户提供“可直接粘贴”的行,并说明需要人工唤醒。
- MCP/日志流不可用: 运行并返回设置环节;切勿用内存抽屉悄悄替代协同机制。
mempalace status