assign

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Assign

任务分配

/assign "Fix the null check in auth.ts" --agent opencode --model opencode-go/kimi-k2.6
/assign "Fix the null check in auth.ts" --agent claude
/assign "Fix the null check in auth.ts" --agent opencode --model opencode-go/kimi-k2.6
/assign "Fix the null check in auth.ts" --agent claude

Flags

选项

FlagEffect
--agent <name>
Agent to delegate to. Default:
opencode
.
--model <model>
Model to use. Agent default applies if omitted.
--dir <path>
Agent working directory. Default: current directory.
assign-prompt.tmp
is always written to the current directory, not
--dir
.
If
--agent
names an unsupported agent, stop: "Unknown agent
<name>
. Supported agents: opencode, codex, claude. See
./REFERENCE.md
."
选项作用
--agent <name>
指定要委托的Agent。默认值:
opencode
--model <model>
指定要使用的模型。若省略则使用Agent的默认模型。
--dir <path>
Agent的工作目录。默认值:当前目录
assign-prompt.tmp
始终写入当前目录,而非
--dir
指定的路径。
--agent
指定的Agent不被支持,则终止操作并提示:"Unknown agent
<name>
. Supported agents: opencode, codex, claude. See
./REFERENCE.md
."

Step 1: Write the prompt file

步骤1:写入提示词文件

Write the full task prompt to
./assign-prompt.tmp
in the current working directory (not
--dir
). Never pass the prompt as a shell argument, quoting breaks on multi-line or special-character prompts. Overwrite silently.
将完整的任务提示词写入当前工作目录(而非
--dir
指定的目录)下的
./assign-prompt.tmp
文件。切勿将提示词作为shell参数传递,因为多行或含特殊字符的提示词会导致引号解析失败。覆盖文件时无需提示。

Step 2: Invoke the agent

步骤2:调用Agent

Look up the agent's invocation template and required non-interactive flags in
./REFERENCE.md
. Those flags are not optional: without them the agent blocks on an invisible permission prompt and hangs silently. Substitute
<model>
and
<dir>
, then pipe the prompt:
bash
cat ./assign-prompt.tmp | <agent-command>
./REFERENCE.md
中查找Agent的调用模板和所需的非交互选项。这些选项是必填的:缺少它们会导致Agent因隐形权限提示而阻塞并静默挂起。替换
<model>
<dir>
后,通过管道传递提示词:
bash
cat ./assign-prompt.tmp | <agent-command>

Step 3: Monitor output

步骤3:监控输出

Watch for progress (tool calls, file writes, step completions). If there is no output for >60s after startup, the agent is hung on a permission prompt. Kill it and check the agent's troubleshooting notes in
./REFERENCE.md
.
监控任务进度(工具调用、文件写入、步骤完成情况)。若启动后超过60秒无输出,说明Agent因权限提示而挂起。此时需终止Agent并查看
./REFERENCE.md
中的Agent故障排除说明。

Step 4: Verify and clean up

步骤4:验证与清理

  1. Report the exit code and a brief summary of what the agent did.
  2. Delete
    ./assign-prompt.tmp
    .
  3. If the task was a code change, prompt the user to verify results.
  1. 报告Agent的退出代码及任务执行简要总结。
  2. 删除
    ./assign-prompt.tmp
    文件。
  3. 若任务涉及代码修改,提示用户验证结果。

Constraints

约束条件

  • Never infer or expand the task. Delegate exactly the prompt provided.
  • Never commit, push, or build unless the prompt explicitly asked for it.
  • 切勿推断或扩展任务内容,严格按照提供的提示词进行委托。
  • 除非提示词明确要求,否则切勿执行提交(commit)、推送(push)或构建操作。