WeClone Twin Reply
Assemble an isolated prompt package that lets a separate model imitate one user's messaging style, personality, values, and worldview from markdown persona files and persona examples. Draft first, review second, send last.
Expected Inputs
- - A prepared persona directory. Default to
ai_twin/ at the repo root, containing profile.md, persona_examples.md, guardrails.md, and optional state.md. - Runtime context: one short scene summary and one dialogue window.
- Explicit approval from the user before any outbound send.
If the persona directory does not exist yet, use $weclone-init-twin first to scaffold the default ai_twin/ directory, then ask the user to fill the generated templates before drafting.
Core Workflow
- 1. Confirm that the persona pack already exists.
If
profile.md,
persona_examples.md, or
guardrails.md are missing, stop and hand off to
$weclone-init-twin. Confirm that the persona files are filled with real content rather than placeholders.
- 2. Gather the minimum high-signal context.
Include who the other person is, what the current situation is, and the recent messages that the reply must answer.
Before drafting, determine whether the available context is sufficient to answer faithfully and safely.
If key facts are missing or the likely reply would change materially depending on missing context, stop and ask the user whether to collect more information before proceeding.
Write that context into two runtime files:
-
scene.md: a short summary of background facts that are necessary for the reply but may not be obvious from the raw chat. Include who the other person is, the relationship, the current situation, the platform or app where the reply will be sent, the user's likely goal or constraint, and any reply-specific caution such as "do not commit yet".
-
dialogue.md: the active message window, usually the recent turns that the candidate reply is directly answering. Keep the original wording and speaker attribution when possible.
Use
scene.md for distilled context and
dialogue.md for raw conversation. Do not dump the entire chat history into
scene.md.
- 3. Render the prompt package.
Run
python3 skills/weclone-twin-reply/scripts/render_clone_prompt.py --scene <scene.md> --dialogue <dialogue.md> [--extra-context <file>]. By default it reads persona files from
ai_twin/; pass
--persona-dir <dir> only when overriding that location.
The script injects
scene.md into the
Runtime Scene section of the final prompt and
dialogue.md into
Active Dialogue.
Treat the rendered prompt as the entire allowed context for that generation.
- 5. Return a reviewable draft.
Show the user the candidate reply plus risk flags. Do not send on the user's behalf yet.
- 6. Send only after explicit approval.
If the user edits or rejects the draft, revise it and repeat the review step.
Execution Rules
- - Keep the clone run isolated.
Use a separate model call or isolated agent run that receives only the rendered clone prompt. Do not mix in unrelated notes, hidden scratchpad, or other task memory from the current thread.
- - Load persona files intentionally.
Use
profile.md for stable identity, personality, values, worldview, and decision logic;
state.md for recent status and goals;
persona_examples.md for style imitation plus behavioral evidence; and
guardrails.md for hard limits. Load extra
*.md files in the persona directory only when they materially improve the reply.
Guardrails
- - Treat
guardrails.md as the persona pack's source of truth for hard limits. - The renderer template adds runtime guardrails for promises, privacy, reputation, ambiguity, and reviewer handoff.
- If the request is close to the boundary, bias toward a shorter, safer draft and stop at draft stage unless a human review step is guaranteed.
- If the available context is not enough for a defensible draft, do not fill the gaps by guesswork. Ask whether to gather more information first.
Files And Resources
- -
assets/clone_prompt_template.md: single source of truth for the isolated clone prompt seen by the downstream model. - INLINECODE30 : compile persona files and runtime context into the template, reading
ai_twin/ by default.
Runtime Context Format
Use a short scene.md like:
CODEBLOCK0
Use a short dialogue.md like:
CODEBLOCK1
If some fact materially changes the likely reply but does not belong in either file, pass it as --extra-context <file> instead of bloating scene.md.
Output Contract
Use this skill to produce a candidate reply for review, not a silent auto-send. The exact handoff structure is defined in assets/clone_prompt_template.md.
If the user asks to automate sending, keep the approval gate in place and make the send step conditional on explicit confirmation.
技能名称: weclone-twin-reply
详细描述:
WeClone 数字孪生回复
组装一个隔离的提示包,让独立的模型根据Markdown角色文件及角色示例,模仿某位用户的聊天风格、个性、价值观和世界观。先起草,再审核,最后发送。
预期输入
- - 一个准备好的角色目录。默认位于仓库根目录下的 aitwin/,包含 profile.md、personaexamples.md、guardrails.md 以及可选的 state.md。
- 运行时上下文:一个简短的场景摘要和一个对话窗口。
- 在向外发送前获得用户的明确批准。
如果角色目录尚不存在,请先使用 $weclone-init-twin 搭建默认的 ai_twin/ 目录,然后在起草前要求用户填写生成的模板。
核心工作流程
- 1. 确认角色包已存在。
如果缺少 profile.md、persona_examples.md 或 guardrails.md,则停止并转交给 $weclone-init-twin。确认角色文件中填写的是真实内容而非占位符。
- 2. 收集最小的高信号上下文。
包括对方是谁、当前情况如何,以及回复必须回应的最近消息。
在起草前,判断现有上下文是否足以忠实且安全地做出回复。
如果关键事实缺失,或者可能因缺失上下文而显著改变回复内容,则停止并询问用户是否要先收集更多信息再继续。
将该上下文写入两个运行时文件:
- scene.md:对回复所必需但可能从原始聊天记录中不明显的背景事实的简短摘要。包括对方是谁、双方关系、当前情况、回复将发送的平台或应用、用户可能的目标或限制,以及任何针对回复的注意事项,例如“暂不承诺”。
- dialogue.md:活跃的消息窗口,通常是候选回复直接回应的最近几轮对话。尽可能保留原始措辞和说话人归属。
使用 scene.md 存放提炼后的上下文,使用 dialogue.md 存放原始对话。不要将整个聊天历史转储到 scene.md 中。
- 3. 渲染提示包。
运行 python3 skills/weclone-twin-reply/scripts/render
cloneprompt.py --scene
--dialogue [--extra-context ]。默认情况下,它会从 ai_twin/ 读取角色文件;仅在需要覆盖该位置时传递 --persona-dir 。
该脚本将 scene.md 注入最终提示的“运行时场景”部分,将 dialogue.md 注入“活跃对话”部分。
将渲染后的提示视为该次生成的全部允许上下文。
- 5. 返回可审核的草稿。
向用户展示候选回复及风险标记。请勿代表用户发送。
- 6. 仅在获得明确批准后发送。
如果用户编辑或拒绝草稿,则修改并重复审核步骤。
执行规则
使用独立的模型调用或隔离的代理运行,仅接收渲染后的克隆提示。不要混入当前线程中无关的笔记、隐藏草稿或其他任务记忆。
使用 profile.md 获取稳定的身份、个性、价值观、世界观和决策逻辑;使用 state.md 获取近期状态和目标;使用 persona_examples.md 进行风格模仿及行为证据;使用 guardrails.md 获取硬性限制。仅当角色目录中的额外 *.md 文件能实质性改善回复时才加载它们。
防护栏
- - 将 guardrails.md 视为角色包中硬性限制的权威来源。
- 渲染器模板为承诺、隐私、声誉、模糊性和审核者交接添加运行时防护栏。
- 如果请求接近边界,则偏向于更短、更安全的草稿,并在草稿阶段停止,除非确保有人工审核步骤。
- 如果可用上下文不足以形成可辩护的草稿,不要通过猜测来填补空白。先询问是否要收集更多信息。
文件与资源
- - assets/cloneprompttemplate.md:下游模型看到的隔离克隆提示的唯一权威来源。
- scripts/rendercloneprompt.py:将角色文件和运行时上下文编译到模板中,默认读取 ai_twin/。
运行时上下文格式
使用简短的 scene.md,例如:
md
场景
对方:前同事,熟悉但近期不亲近。
情况:他们今早询问用户本周能否推荐他们。
平台:微信私聊。
用户目标:保持礼貌并留有余地,不做承诺。
回复注意事项:不要承诺推荐或时间表。
使用简短的 dialogue.md,例如:
md
对话
他们:嘿,你能推荐我申请我们之前聊过的那个职位吗?
用户:我刚看到你的消息。
他们:不着急,但他们这周进展很快。
如果某个事实会实质性改变可能的回复,但不属于上述任何一个文件,则将其作为 --extra-context 传递,而不是扩充 scene.md。
输出约定
使用此技能生成供审核的候选回复,而非静默自动发送。确切的交接结构在 assets/cloneprompttemplate.md 中定义。
如果用户要求自动化发送,请保留批准关卡,并使发送步骤以明确确认为条件。