session-export
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSession Export
会话导出
Give the receiving agent enough context to resume the user's work from a fresh conversation. Preserve information that would otherwise be lost, point to accessible artifacts, and leave room for independent judgment. Deliver a complete prompt the user can paste and send as-is.
让接收 Agent 获得足够的上下文,以便从全新对话中恢复用户的工作。保留原本会丢失的信息,指向可访问的产物,并为独立判断留出空间。交付一份用户可以原样粘贴和发送的完整 Prompt。
Establish the Active Task
确定当前任务
Recover the current goal from the user's requests, incorporating later corrections and retaining relevant earlier requirements. Identify the desired outcome, completion criteria, and current activity state: active, paused, awaiting input or approval, or complete. Carry earlier work forward when it affects this task.
Use the conversation to recover intent, decisions, and non-persistent state. Make a few inexpensive, read-only checks when they materially improve the handover's accuracy. Label unchecked information by its source and last observed state. Keep the export focused on inspecting context and composing the prompt; task execution belongs to the continuation workflow.
从用户的请求中恢复当前目标,同时纳入后续修正,并保留相关的早期要求。确定预期结果、完成标准以及当前活动状态:进行中、已暂停、等待输入或审批,或已完成。当早期工作会影响当前任务时,将其延续下去。
使用对话恢复意图、决策和不会持久保存的状态。当少量低成本、只读检查能够实质提高交接内容的准确性时,可以执行这些检查。对于未检查的信息,标注其来源和最后观察到的状态。将导出内容限定为检查上下文和编写 Prompt;任务执行属于后续工作流。
Select the Context Needed to Resume
选择恢复工作所需的上下文
Retain information that changes what the next agent should do or how it should interpret the evidence:
- Outcome and scope: the user's goal, acceptance criteria, relevant constraints, explicitly chosen approaches, and the scope and conditions of approvals or pending decisions.
- Work location: the relevant host, workspace root, and a small set of paths, URLs, or identifiers for instructions, implementation, and evidence. Identify the branch or checkout when it is needed to locate the right work.
- Execution environment: hardware and software details that affect this task, such as the interpreter, runtime, toolchain, accelerator, or allocation. Describe required authentication through its configured mechanism or credential name while keeping secret values private.
- Progress and evidence: completed, in-progress, blocked, and unverified work; whether an implementation exists or is still being discussed; and relevant checks or failed attempts with their conditions and observed results.
- Continuity: user corrections that would otherwise be lost, the ownership or purpose of unfinished changes, actions already taken or pending, and ongoing jobs or external operations. Include usable job, process, run, or artifact identifiers together with their host and last known state.
For readable code, diffs, logs, documents, and existing plans, provide the entry point and the brief status needed to use it. Let the receiving agent inspect their contents. When essential information exists only in the conversation or an inaccessible source, preserve the minimum content needed to proceed. For a discussion or learning task, this may be the user's reported understanding, agreed definitions, and the question still being explored.
Make each path's host and workspace clear. Prefer stable artifact references that remain meaningful in a fresh conversation. Mark session-local handles according to their limited scope and provide a durable way to locate the work when available. Keep source-environment facts distinct from the destination's actual capabilities. Label old harness access limits as environment facts and user-imposed constraints as task requirements; the receiving agent determines access in its own environment.
保留会改变下一位 Agent 应执行什么工作,或应如何解读证据的信息:
- **结果与范围:**用户的目标、验收标准、相关约束、明确选择的方法,以及审批范围、审批条件和待决事项。
- **工作位置:**相关主机、工作区根目录,以及用于说明、实现和取证的一组精简路径、URL 或标识符。必要时确定对应的分支或检出版本。
- **执行环境:**会影响任务的硬件和软件详情,例如解释器、运行时、工具链、加速器或资源配额。通过已配置的机制或凭据名称说明所需的认证方式,同时对机密值进行保密。
- **进展与证据:**已完成、正在进行、已阻塞和未经验证的工作;是否已有可用实现,或仍处于讨论阶段;以及相关检查或失败尝试的条件和观察结果。
- **连续性:**原本可能丢失的用户修正、未完成变更的责任归属或用途、已执行或待执行的操作,以及持续运行的任务或外部操作。提供可用的任务、进程、运行或产物标识符,并附上对应主机和最后已知状态。
对于代码、diff、日志、文档和现有计划等可读内容,提供入口点和简要的当前状态,让接收 Agent 能够直接使用。让接收 Agent 检查这些内容的具体信息。当关键信息仅存在于对话中或无法访问的来源中时,保留继续工作所需的最少内容。对于讨论或学习任务,这些信息可以是用户描述的理解、已经达成的定义,以及仍在探索的问题。
明确每个路径所属的主机和所属工作区。优先使用在新对话中仍然有意义的稳定产物引用。根据会话本地句柄的有限作用域对其作出标记,并在可用时提供定位工作的持久方式。将源环境的既有事实与目标环境的实际能力区分开来。将旧运行环境(harness)的访问限制标记为环境事实,将用户施加的限制标记为任务要求;接收 Agent 应根据自身环境确定实际可访问性。
Preserve Evidence and Independent Judgment
保留证据与独立判断
Distinguish direct observations, supported findings, user decisions, and unresolved questions. Retain the conditions and evidence that make a finding usable. Express an uncertain cause as a question to investigate. Describe failed attempts through the action taken and the observed result, keeping causal claims proportional to their evidence.
Select prior assistant conclusions for their evidential support and relevance to the remaining task. Carry a tentative idea forward when the user specifically wants it investigated, identifying its status and any material counterevidence. Keep the user's settled choices explicit and leave open decisions available for reassessment.
Use assistant-written notes as guides to the underlying artifacts. Ask the receiving agent to reconstruct its understanding from the goal, constraints, and available evidence, applying first-principles reasoning to unresolved decisions. Ground the starting action in current state or a user-selected direction.
区分直接观察的证据、得到支持的结论、用户决策和未解决的问题。保留使结论仍然适用的条件和证据。将不确定的原因表述为需要调查的问题。描述失败尝试时,应说明采取的动作和观察到的结果,并使因果判断与证据强度相称。
根据证据支持力度和与剩余任务的相关性,选择需要延续的此前 Assistant 结论。当用户明确希望继续调查某个暂定想法时,将其传递给后续 Agent,同时说明其状态和重要的反证。明确保留用户已经确定的方案,同时保留仍可重新评估的开放决策。
将 Assistant 编写的笔记作为定位底层产物的指引。要求接收 Agent 根据目标、约束和可用证据重建对当前工作的理解,并运用第一性原理推理解决尚未确定的决策。让起始行动立足于当前状态或用户选定的方向。
Compose the Receiving Agent's Prompt
编写接收 Agent 的 Prompt
Return one fenced block as the complete deliverable. Choose a fence longer than any fence inside the prompt. Match the user's language unless they request another language, and preserve technical names and identifiers exactly.
markdownAddress the receiving agent directly, opening with the concrete task it is taking over. Use short paragraphs or useful sections to make the goal, context, state, and continuation easy to find. Fill task-specific references with actual known values. Express an essential missing fact as a concrete uncertainty the recipient can resolve through available context or a targeted question.
Place each fact and constraint once, alongside the work it affects. Scale the detail to the decisions needed for resumption. Keep code and document details in their referenced sources, and give the recipient the conversation-specific information needed to interpret them.
For an active task, end with a direct instruction to verify relevant current state and proceed within the stated scope toward the requested outcome. For work awaiting input or approval, identify the required decision and any preparation that can proceed. For a paused task, retain the user's condition for resuming. For a completed task, state completion and any explicit follow-up.
Read the block once from the receiving agent's perspective. It should be able to locate the work, distinguish observation from uncertainty, and identify the next justified action. Consolidate repeated information and ensure that every instruction is supported by the user's request, the task's state, or its evidence.
返回一个完整的 围栏代码块作为交付物。选择比 Prompt 内部所有围栏代码块都更长的围栏标记。除非用户要求使用其他语言,否则应采用用户的语言,并准确保留技术名称和标识符。
markdown直接对接收 Agent 称呼,并在开头说明其接手的具体任务。使用简短段落或实用章节,让目标、上下文、当前状态和后续行动易于定位。填写任务专属引用时,使用实际已知值。对于缺失的关键事实,将其表述为接收 Agent 可以通过可用上下文或针对性问题解决的具体不确定事项。
每项事实和约束只陈述一次,并将其放在对应工作旁边。根据恢复工作所需的决策范围调整细节密度。将代码和文档详情保留在其引用源中,同时向接收者提供解释这些内容所需的会话专属信息。
对于进行中的任务,结尾应直接指示接收 Agent 核验相关的当前状态,并在既定范围内继续推进,以实现用户要求的结果。对于等待输入或审批的任务,应明确需要作出的决定以及可以提前完成准备工作。对于已暂停的任务,应保留用户指定的恢复条件。对于已完成的任务,应说明完成情况以及任何明确要求的后续事项。
从接收 Agent 的视角通读整个代码块。它应当能够定位工作、区分观察事实与不确定信息,并确定下一步合理且有依据的行动。合并重复信息,并确保每项指令都得到用户请求、任务状态或相关证据的支持。