pulumi-neo-handoff
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePulumi Neo Handoff
Pulumi Neo 任务移交
Transfer the current in-progress work to a new Pulumi Neo task. This is a one-way handoff: control passes to Neo and does not return to the calling agent.
将当前进行中的工作移交至新的Pulumi Neo任务。这是单向移交:控制权将转移至Neo,不会返回至发起移交的Agent。
Calling agent behavior
发起Agent的行为规范
When this skill activates, act as a handoff coordinator, not the operator:
- Do not narrate the handoff turn-by-turn. The user has decided; carry it out quietly.
- Do not paste the assembled prompt body into chat. Show only the temp file path so the user can inspect on demand.
- Do not continue working on the task after launching. Exit cleanly once the task URL is returned.
当该技能激活时,需扮演移交协调者而非操作者的角色:
- 不要逐步骤描述移交过程。用户已做出决定,需静默执行。
- 不要将组装好的提示内容粘贴到聊天中。仅显示临时文件路径,供用户按需查看。
- 启动任务后不要继续处理原任务。返回任务URL后需干净退出。
What gets transferred
移交内容
The Neo task receives a single opening prompt with three sections:
- Goal — one sentence describing what Neo should do next.
- Repository pointers — repo root, branch, working directory, working-tree state, and 3 to 5 files most relevant to the in-progress work.
- Conversation summary — a compact account of what has been discussed, decided, and left open.
Do not include diffs, full file contents, or tool output. Neo sees the local working tree directly (including uncommitted changes); duplicating that content wastes Neo's opening context.
Neo任务将收到一个包含三部分内容的初始提示:
- 目标 — 用一句话描述Neo接下来应执行的操作。
- 仓库指针 — 仓库根目录、分支、工作目录、工作树状态,以及与当前工作最相关的3至5个文件。
- 对话摘要 — 简洁概括已讨论内容、已做出的决定以及未解决的问题。
请勿包含差异内容、完整文件内容或工具输出。Neo可直接访问本地工作树(包括未提交的更改);重复此类内容会浪费Neo的初始上下文。
Workflow
工作流程
0. Preflight
0. 预检
Verify the CLI is available before drafting anything:
bash
command -v pulumi >/dev/null || { echo "pulumi CLI not installed"; exit 1; }
pulumi neo --help >/dev/null 2>&1 || { echo "pulumi neo unavailable — run 'pulumi login' or upgrade the CLI"; exit 1; }If preflight fails, surface the error to the user and stop. Do not assemble the prompt only to fail at launch.
在起草任何内容前,先验证CLI是否可用:
bash
command -v pulumi >/dev/null || { echo "pulumi CLI not installed"; exit 1; }
pulumi neo --help >/dev/null 2>&1 || { echo "pulumi neo unavailable — run 'pulumi login' or upgrade the CLI"; exit 1; }如果预检失败,需向用户显示错误信息并停止操作。不要先组装提示内容再在启动时失败。
1. Determine the goal
1. 确定目标
The goal is one sentence describing what Neo should do next. If the user's handoff message contains it ("hand this off to Neo and apply the staging migration"), use it directly. Otherwise ask once: "What would you like Neo to do next?"
Do not restate the goal back for confirmation — the handoff should feel seamless, and if Neo receives a misread goal the user can redirect inside the Neo task.
目标是用一句话描述Neo接下来应执行的操作。如果用户的移交消息中已包含目标(例如“把这个移交给Neo并应用 staging 迁移”),则直接使用该内容。否则仅询问一次:“你希望Neo接下来做什么?”
无需重新陈述目标以确认——移交应无缝进行,如果Neo收到错误的目标,用户可在Neo任务中重新引导。
2. Gather repository context
2. 收集仓库上下文
Capture the canonical repo pointer and branch state:
bash
git rev-parse --show-toplevel # repo root (canonical pointer)
git rev-parse --abbrev-ref HEAD # branch; returns "HEAD" if detached
git status --short # working-tree summaryIf fails the directory is not a git repo — omit the Repository section and note the working directory only. Neo can still operate, but its repo context will be limited.
git rev-parse --show-toplevelIf the branch reads , record the commit SHA and label the entry "detached at ".
HEAD<sha>Identify 3 to 5 files most relevant to the in-progress work from the conversation (files read, edited, or repeatedly discussed). If the conversation does not clearly identify files, list none rather than guessing — wrong files mislead Neo more than missing files do.
捕获标准仓库指针和分支状态:
bash
git rev-parse --show-toplevel # repo root (canonical pointer)
git rev-parse --abbrev-ref HEAD # branch; returns "HEAD" if detached
git status --short # working-tree summary如果失败,说明当前目录不是git仓库——需省略仓库部分,仅记录工作目录。Neo仍可运行,但仓库上下文会受限。
git rev-parse --show-toplevel如果分支显示为,需记录提交SHA并标注为“detached at ”。
HEAD<sha>从对话中找出与当前工作最相关的3至5个文件(已读取、编辑或反复讨论的文件)。如果对话中未明确指出文件,则不要猜测列出——错误的文件比缺失文件更易误导Neo。
3. Draft the conversation summary
3. 起草对话摘要
Write a compact summary against the structure below. Sections with nothing useful to say should be omitted, not padded.
undefined按照以下结构撰写简洁的摘要。无有用内容的部分需省略,不要填充无关内容。
undefinedWhat's been done
已完成工作
<bullets: decisions made, code changed, dead ends ruled out>
<项目符号:已做出的决定、已修改的代码、已排除的无效方案>
Open questions
未解决问题
<bullets: things the user has not resolved>
<项目符号:用户尚未确定的事项>
Next step
下一步操作
<one or two sentences describing what Neo should do first>
```
Target ~400 words for the summary. Compress aggressively. The goal is to give Neo enough to pick up cleanly, not to replay the conversation.
<一两句话描述Neo应首先执行的操作>
摘要目标字数约为400字。需尽可能压缩内容。目的是让Neo能顺利接手工作,而非重放整个对话。4. Assemble the prompt and write to a temp file
4. 组装提示并写入临时文件
Combine the three sections into a single markdown document. Use for a portable temp path:
mktempbash
PROMPT_FILE="$(mktemp -t neo-handoff.XXXXXX.md)"Shape:
markdown
undefined将三部分内容合并为一个markdown文档。使用获取可移植的临时文件路径:
mktempbash
PROMPT_FILE="$(mktemp -t neo-handoff.XXXXXX.md)"格式如下:
markdown
undefinedGoal
Goal
<one-sentence goal>
<one-sentence goal>
Repository
Repository
- Root: <repo root>
- Branch: <branch or "detached at <sha>">
- Working directory: <cwd>
- Working tree: <clean | dirty>
- Files in play:
- <file 1>
- <file 2>
- Root: <repo root>
- Branch: <branch or "detached at <sha>">
- Working directory: <cwd>
- Working tree: <clean | dirty>
- Files in play:
- <file 1>
- <file 2>
Conversation summary
Conversation summary
<summary from step 3>
```
<summary from step 3>
```
5. Launch
5. 启动任务
Print the temp file path with a one-line size summary so the user can inspect on demand:
Prompt written to <PROMPT_FILE> (<line count> lines, <byte count> bytes).
Launching Neo task...Invoke the CLI:
bash
pulumi neo "$(cat "$PROMPT_FILE")"pulumi neo--file"$(cat ...)"$\pulumi neo --file ...pulumi neo < ...If the CLI exits non-zero, surface its stderr verbatim and leave the prompt file in place so the user can retry. Do not pretend the handoff succeeded.
打印临时文件路径及一行大小摘要,供用户按需查看:
Prompt written to <PROMPT_FILE> (<line count> lines, <byte count> bytes).
Launching Neo task...调用CLI:
bash
pulumi neo "$(cat "$PROMPT_FILE")"pulumi neo--file"$(cat ...)"$\pulumi neo --file ...pulumi neo < ...如果CLI非零退出,需原样显示其stderr内容,并保留提示文件以便用户重试。不要假装移交成功。
6. Surface the task URL
6. 显示任务URL
The CLI prints a task URL on success. Echo it verbatim. Then stop.
CLI成功运行后会打印任务URL。需原样回显该URL,然后停止操作。
What not to do
禁止操作
- Do not invoke this skill without explicit handoff intent. Detecting infrastructure-shaped work is not a trigger; capability questions like "can Neo do X" are not handoffs. Activating on those would make the skill noisy and incorrect.
- Do not include diffs, file contents, or command output in the prompt. Neo sees the local working tree directly, so duplicating that content wastes its opening context.
- Do not paste the assembled prompt into chat for confirmation. Summaries can be long; the file path is sufficient for the user to inspect when they care.
- Do not commit, push, or modify the working tree on the user's behalf. The user owns their git state — the skill is a context handoff, not a workflow controller.
- 请勿在无明确移交意图时启用该技能。检测到基础设施类工作并非触发条件;诸如“Neo能否做X”的功能询问不属于移交。在这些场景下激活技能会导致技能产生无效干扰。
- 请勿在提示中包含差异内容、文件内容或命令输出。Neo可直接访问本地工作树,重复此类内容会浪费其初始上下文。
- 请勿将组装好的提示粘贴到聊天中请求确认。摘要可能较长;文件路径已足够用户在需要时查看。
- 请勿代表用户提交、推送或修改工作树。用户拥有其git状态——该技能仅负责上下文移交,而非工作流控制。
Notes
注意事项
- One-way handoff. Control passes to the Neo task and does not return to the calling agent.
- Neo tasks are interruptible. If the summary turns out to be wrong, the user can redirect inside the Neo task; the skill does not need to guard against summary errors at launch time.
- Surfacing the task URL is the skill's success criterion, not successful completion of the underlying work. Neo may decline or redirect the request inside the task.
- 单向移交。控制权转移至Neo任务后不会返回至发起移交的Agent。
- Neo任务可中断。如果摘要内容有误,用户可在Neo任务中重新引导;技能无需在启动时防范摘要错误。
- 技能的成功标准是显示任务URL,而非底层工作的成功完成。Neo可能会在任务中拒绝或重新引导请求。