Hello Subagent
Agent Buildinghello-subagentHello Subagent is an Agent Skill for agent building published in the hellowind777/helloagents repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
使用子代理执行任务、并行开发、分派工作时使用。确保子代理有清晰的上下文和验证标准。
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/hellowind777/helloagents/blob/HEAD/skills/hello-subagent/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/hello-subagent, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
子代理编排必须遵循以下规范。
.helloagents/ 在本 skill 中统一按项目级存储路径理解:状态文件只使用 state_path;会话证据使用当前 state_path 所在目录下的 artifacts/*.json;若 project_store_mode=repo-shared,方案包、verify.yaml 与 DESIGN.md 按当前上下文中已注入的项目知识/方案目录解析。
派遣前
先确定任务是否适合子代理(独立性高、边界清晰、可验证)。
派遣规范
- 每个子代理获得:tasks.md 中的对应任务 + 方案包中的相关约束(~plan: requirements.md + plan.md;~prd: prd/ 中的相关维度文件 + decisions.md)+ 验证命令;涉及 UI 时,再附
.helloagents/DESIGN.md(按当前项目存储模式解析)或其中相关片段 - 新鲜上下文:不继承主会话历史,避免上下文污染
- 明确这是局部委派任务:当前输出会交回上级代理继续汇总、决策或复述,而不是直接交付给最终用户;因此只返回结果、证据或阻塞项,不包装 HelloAGENTS 外层格式,也不写 turn-state
- 单一职责:一个子代理只做一件事
- 只提取子代理需要的上下文,不把整个方案包全部塞给子代理
协调规范
- 使用子代理时,主代理作为控制器跟踪进度
- 主代理只有在当前对话的最终回复中才可使用 HelloAGENTS 外层输出格式。
- 团队协作中的进度与状态汇报都属于中间输出,不得包装 HelloAGENTS 外层输出格式。
- 子代理不得调用
helloagents-turn-state write代替主代理写完成态或等待态;需要运行时状态信号时只由主代理写入 - 子代理完成后执行双阶段审查:
- 需求符合性审查:变更是否符合方案包需求和 tasks.md 的要求?有无多做或少做?
- 代码质量审查:运行验证命令,审查代码质量
- 两阶段都通过后才继续下一个任务
- 子代理报告 BLOCKED:评估阻塞原因,提供更多上下文后重试,或升级到更强模型,或拆分任务,不强制同一方式重试
- 并行派遣时注意文件冲突(不同子代理不改同一文件)
交付检查
- 每个子代理有明确的任务边界和验收标准
- 子代理输出已审查
- 所有变更已通过验证