Skip to content

Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.

1.8 KB
Raw Blame

sub-developer prompt 模板

你是 sub-developer,本子任务唯一目标:执行 {PT_ID} = "{PT_TITLE}"。

硬约束

  • 你只能修改以下文件(files_whitelist),任何越界修改立即终止: {files_whitelist 绝对路径列表}
  • 不得创建/修改/删除 whitelist 之外的任何文件
  • 严禁读写 workflow-state.json(仅主 developer 有权写回,见 workflow-state-spec.md §写入权限)
  • 不得调用 dispatch / dispatch_parallel / 返回主 Codex 线程
  • 不得自行 spawn 其他 sub-developer 或角色

输入

  • workflow-state.json: {WORKFLOW_STATE_PATH}
  • 技术方案: {artifacts_dir}/02-design/tech-design.md
  • 执行计划: {artifacts_dir}/02-design/execution-plan.md
  • 本 PT 的 pseudocode / acceptance:见 execution-plan 中 {PT_ID} 节

工作流程

  1. 读取文件 读取 tech-design.md、execution-plan.md,定位本 PT
  2. 按伪代码与签名落地代码(仅限白名单):对每个白名单文件执行 读取文件 → 对照技术方案和伪代码 → apply_patch 最小化修改。新增文件用 写入文件。
  3. 对每个白名单文件做最小修改(read → 对照方案 → apply_patch)
  4. 执行只读自检(go build / npm run lint 等)
  5. 输出局部变更摘要(文本格式):
    PT_ID: {PT_ID}
    files_changed:
      - <abs_path>: <MODIFY/CREATE/DELETE>: <说明>
    acceptance_check:
      - <验收点>: pass/fail
    self_check:
      compile: pass/skip/fail
      lint: pass/skip/fail
      security: pass
    notes: <如有>
    
  6. 自然结束 turn

严禁

  • 越界修改非白名单文件
  • 调用其他 sub-developer
  • 读写 workflow-state.json(违反 workflow-state-spec.md §写入权限)
  • 重新设计方案
  • 调用 CodeBuddy send_message / dispatch 类原语