babysit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesebabysit
Babysit流程编排
Orchestrate through iterative execution. Use the SDK CLI to drive the orchestration loop.
.a5c/runs/<runId>/通过迭代执行来编排。使用SDK CLI驱动编排循环。
.a5c/runs/<runId>/Dependencies
依赖项
Babysitter SDK and CLI
Babysitter SDK与CLI
make sure you have the latest version of the cli:
bash
npm i -g @a5c-ai/babysitter@latest @a5c-ai/babysitter-sdk@latest @a5c-ai/babysitter-breakpoints@latestthen use the CLI alias: CLI="babysitter"
Alternatively, use the CLI alias:
CLI="npx -y @a5c-ai/babysitter-sdk@latest"确保你安装了最新版本的CLI:
bash
npm i -g @a5c-ai/babysitter@latest @a5c-ai/babysitter-sdk@latest @a5c-ai/babysitter-breakpoints@latest然后使用CLI别名:
CLI="babysitter"或者,使用以下CLI别名:
CLI="npx -y @a5c-ai/babysitter-sdk@latest"jq
jq
make sure you have jq installed and available in the path. if not, install it.
确保你已安装jq并可在路径中访问。如果未安装,请先安装。
Core Iteration Workflow
核心迭代工作流
The babysitter workflow has 4 steps:
- Run iteration - Execute one orchestration step
- Get effects - Check what tasks are requested
- Perform effects - Execute the requested tasks
- Post results - Tasks auto-record results to journal
Babysitter工作流包含4个步骤:
- 运行迭代 - 执行一个编排步骤
- 获取任务请求 - 检查需要执行的任务
- 执行任务 - 运行请求的任务
- 发布结果 - 任务自动将结果记录到日志中
1. Create or find the process for the run
1. 创建或查找运行对应的流程
Interview phase
需求沟通阶段
interview the user for the intent, requirements, goal, scope, etc.
using AskUserQuestion tool (or breakpoint if running in non-interactive mode) - (before setting the in-session loop).
a multi-step phase to understand the intent and perspecitve to approach the process building after researching the repo, short research online if needed, short research in the target repo, additional instructions, intent and library (processes, specializations, skills, subagents, methodologies, references, etc.) / guide for methodology building. (clarifications regarding the intent, requirements, goal, scope, etc.) - the library is at [skill-root]/process/specializations///** and [skill-root]/process/methodologies/
the first step should be the look at the state of the repo, then find the most relevant processes, specializations, skills, subagents, methodologies, references, etc. to use as a reference.
then this phase can have: research online, research the repo, user questions, and other steps one after the other until the intent, requirements, goal, scope, etc. are clear and the user is satisfied with the understanding. after each step, decide the type of next step to take. do not plan more than 1 step ahead in this phase. and the same step type can be used more than once in this phase.
与用户沟通意图、需求、目标、范围等信息。在设置会话内循环之前,使用AskUserQuestion工具(如果在非交互模式下运行则使用断点)。
这是一个多步骤阶段,用于理解用户意图和视角,以便在研究仓库、必要时进行简短的在线研究、目标仓库研究、额外说明、意图和库(流程、专项能力、Skill、子Agent、方法论、参考资料等)/方法论构建指南之后,构建流程。(澄清关于意图、需求、目标、范围等的问题) - 库位于[skill-root]/process/specializations///**和[skill-root]/process/methodologies/
第一步应该查看仓库的状态,然后找到最相关的流程、专项能力、Skill、子Agent、方法论、参考资料等作为参考。
此阶段可以包含:在线研究、仓库研究、用户提问等步骤,依次进行直到意图、需求、目标、范围等清晰明确,且用户对理解程度满意。每一步之后,决定下一步的类型。在此阶段不要规划超过1步的后续操作,且同一类型的步骤可以多次使用。
Process creation phase
流程创建阶段
after the interview phase, create the complete custom process files (js and jsons) for the run according to the Process Creation Guidelines and methodologies section. also install the babysitter-sdk inside .a5c if it is not already installed. (install it in .a5c/package.json if it is not already installed. make sure )
you must abide the syntax and structure of the process files from the process library.
需求沟通阶段完成后,根据《流程创建指南》和方法论部分,为运行创建完整的自定义流程文件(js和json格式)。同时,如果.a5c目录中尚未安装babysitter-sdk,请进行安装(将其安装到.a5c/package.json中,确保已正确安装)。
你必须遵循流程库中流程文件的语法和结构。
2. Setup session:
2. 设置会话:
For new runs:
- Setup in-session loop:
bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/babysit/scripts/setup-babysitter-run.sh" --claude-session-id "${CLAUDE_SESSION_ID}" $PROMPT- Create the run:
bash
$CLI run:create --process-id <id> --entry <path> --inputs <file> --json- Associate session with run:
bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/babysit/scripts/associate-session-with-run.sh" \
--run-id <runId-from-step-2> \
--claude-session-id "${CLAUDE_SESSION_ID}"For resuming existing runs:
bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/babysit/scripts/setup-babysitter-run-resume.sh" --claude-session-id "${CLAUDE_SESSION_ID}" --run-id RUN_ID"针对新运行:
- 设置会话内循环:
bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/babysit/scripts/setup-babysitter-run.sh" --claude-session-id "${CLAUDE_SESSION_ID}" $PROMPT- 创建运行:
bash
$CLI run:create --process-id <id> --entry <path> --inputs <file> --json- 将会话与运行关联:
bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/babysit/scripts/associate-session-with-run.sh" \
--run-id <runId-from-step-2> \
--claude-session-id "${CLAUDE_SESSION_ID}"针对恢复现有运行:
bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/babysit/scripts/setup-babysitter-run-resume.sh" --claude-session-id "${CLAUDE_SESSION_ID}" --run-id RUN_ID"3. Run Iteration
3. 运行迭代
bash
$CLI run:iterate .a5c/runs/<runId> --json --iteration <n>Output:
json
{
"iteration": 1,
"status": "executed|waiting|completed|failed|none",
"action": "executed-tasks|waiting|none",
"reason": "auto-runnable-tasks|breakpoint-waiting|terminal-state",
"count": 3,
"completionSecret": "only-present-when-completed",
"metadata": { "runId": "...", "processId": "..." }
}Status values:
- - Tasks executed, continue looping
"executed" - - Breakpoint/sleep, pause until released
"waiting" - - Run finished successfully
"completed" - - Run failed with error
"failed" - - No pending effects
"none"
bash
$CLI run:iterate .a5c/runs/<runId> --json --iteration <n>输出:
json
{
"iteration": 1,
"status": "executed|waiting|completed|failed|none",
"action": "executed-tasks|waiting|none",
"reason": "auto-runnable-tasks|breakpoint-waiting|terminal-state",
"count": 3,
"completionSecret": "only-present-when-completed",
"metadata": { "runId": "...", "processId": "..." }
}状态值说明:
- - 任务已执行,继续循环
"executed" - - 断点/等待,暂停直到被释放
"waiting" - - 运行已成功完成
"completed" - - 运行失败并报错
"failed" - - 无待处理任务
"none"
4. Get Effects
4. 获取任务请求
bash
$CLI task:list .a5c/runs/<runId> --pending --jsonOutput:
json
{
"tasks": [
{
"effectId": "effect-abc123",
"kind": "node|agent|skill|breakpoint",
"label": "auto",
"status": "requested"
}
]
}bash
$CLI task:list .a5c/runs/<runId> --pending --json输出:
json
{
"tasks": [
{
"effectId": "effect-abc123",
"kind": "node|agent|skill|breakpoint",
"label": "auto",
"status": "requested"
}
]
}5. Perform Effects
5. 执行任务
Run the effect externally to the SDK (by you, your hook, or another worker). After execution (by delegation to an agent or skill), post the outcome summary into the run by calling , which:
task:post- Writes the committed result to
tasks/<effectId>/result.json - Appends an event to the journal
EFFECT_RESOLVED - Updates the state cache
IMPORTANT:
- Delegate using the Task tool if possible.
- Make sure the change was actually performed and not described or implied. (for example, if code files were mentioned as created in the summary, make sure they were actually created.)
- Include in the instructions to the agent or skill to perform the task in full and return the only the summary result in the requested schema.
在SDK外部运行任务(由你、钩子或其他工作者执行)。执行完成后(委托给Agent或Skill),通过调用将结果摘要发布到运行中,该命令会:
task:post- 将提交的结果写入
tasks/<effectId>/result.json - 向日志中追加事件
EFFECT_RESOLVED - 更新状态缓存
重要提示:
- 尽可能使用Task工具进行委托。
- 确保任务已实际执行,而非仅描述或暗示。(例如,如果摘要中提到创建了代码文件,要确保文件确实已创建。)
- 在给Agent或Skill的指令中,要求其完整执行任务并仅返回符合要求格式的结果摘要。
5.1 Breakpoint Handling
5.1 断点处理
5.1.1 Interactive mode
5.1.1 交互模式
If running in interactive mode, use AskUserQuestion tool to ask the user the question and get the answer.
then post the result of the breakpoint to the run by calling .
task:postOtherwise:
如果在交互模式下运行,使用AskUserQuestion工具向用户提问并获取答案。
然后通过调用将断点结果发布到运行中。
task:post否则:
5.1.2 Non-interactive mode
5.1.2 非交互模式
if running in non-interactive mode, use the breakpoint create command to create the breakpoint and get the answer from the user:
bash
npx @a5c-ai/babysitter-breakpoints breakpoint create --tag <tag> --question "<question>" --title "<title>" --run-id <runId> --file <file,format,language,label> --file <file,format,language,label> --file <file,format,language,label> ...to create the breakpoint and get the answer from the user. breakpoint are meant for human approval through the breakpoint tool. NEVER prompt directly and never release or approve this breakpoint yourself. but you may need to post the result of the breakpoint to the run by calling when the breakpoint is resolved.
task:post如果在非交互模式下运行,使用断点创建命令创建断点并等待用户回复:
bash
npx @a5c-ai/babysitter-breakpoints breakpoint create --tag <tag> --question "<question>" --title "<title>" --run-id <runId> --file <file,format,language,label> --file <file,format,language,label> --file <file,format,language,label> ...创建断点并等待用户回复。断点用于通过断点工具获取人工确认。绝对不要直接提示用户,也不要自行释放或确认此断点。但当断点被解决后,你可能需要通过调用将结果发布到运行中。
task:post6. Results Posting
6. 结果发布
IMPORTANT: Do NOT write directly. The SDK owns that file.
result.jsonWorkflow:
- Write the result value to a separate file (e.g., or
output.json):value.json
json
{
"score": 85,
"details": { ... }
}- Post the result, passing the value file:
bash
$CLI task:post .a5c/runs/<runId> <effectId> \
--status ok \
--value tasks/<effectId>/output.json \
--jsonThe command will:
task:post- Read the value from your file
- Write the complete (including schema, metadata, and your value)
result.json - Append an event to the journal
EFFECT_RESOLVED - Update the state cache
Available flags:
- (required)
--status <ok|error> - - Result value (for status=ok)
--value <file> - - Error payload (for status=error)
--error <file> - - Capture stdout
--stdout-file <file> - - Capture stderr
--stderr-file <file> - - Task start time
--started-at <iso8601> - - Task end time
--finished-at <iso8601> - - Additional metadata JSON
--metadata <file>
Common mistake to avoid:
bash
undefined重要提示:不要直接写入。该文件由SDK管理。
result.json工作流:
- 将结果值写入单独的文件(例如或
output.json):value.json
json
{
"score": 85,
"details": { ... }
}- 发布结果,传入值文件:
bash
$CLI task:post .a5c/runs/<runId> <effectId> \
--status ok \
--value tasks/<effectId>/output.json \
--jsontask:post- 从你的文件中读取值
- 写入完整的(包括schema、元数据和你的值)
result.json - 向日志中追加事件
EFFECT_RESOLVED - 更新状态缓存
可用参数:
- (必填)
--status <ok|error> - - 结果值(当status=ok时使用)
--value <file> - - 错误负载(当status=error时使用)
--error <file> - - 捕获标准输出
--stdout-file <file> - - 捕获标准错误
--stderr-file <file> - - 任务开始时间
--started-at <iso8601> - - 任务结束时间
--finished-at <iso8601> - - 额外的元数据JSON
--metadata <file>
需要避免的常见错误:
bash
undefined❌ WRONG: Writing result.json directly
❌ 错误:直接写入result.json
echo '{"result": {...}}' > tasks/<effectId>/result.json
$CLI task:post <runId> <effectId> --status ok
echo '{"result": {...}}' > tasks/<effectId>/result.json
$CLI task:post <runId> <effectId> --status ok
✅ CORRECT: Write value to separate file, let SDK create result.json
✅ 正确:将值写入单独文件,让SDK创建result.json
echo '{"score": 85}' > tasks/<effectId>/output.json
$CLI task:post <runId> <effectId> --status ok --value tasks/<effectId>/output.json
---echo '{"score": 85}' > tasks/<effectId>/output.json
$CLI task:post <runId> <effectId> --status ok --value tasks/<effectId>/output.json
---7. repeat the orchestration loop as needed.
7. 根据需要重复编排循环
Repeat orchestration loop by calling run:iterate or doing the next right thing.
In case you don't follow this step, you will be called by the stop-hook and you will be asked to repeat the orchestration loop or exit the loop by posting the completion secret.
通过调用run:iterate或执行下一步操作来重复编排循环。
如果你未执行此步骤,stop-hook会调用你,并要求你重复编排循环或通过提交完成密钥退出循环。
Task Kinds
任务类型
| Kind | Description | Executor |
|---|---|---|
| Node.js script | Local node process |
| Shell script | Local shell process |
| LLM agent | Agent runtime |
| Claude Code skill | Skill system |
| Human approval | UI/CLI |
| Time gate | Scheduler |
| 类型 | 描述 | 执行器 |
|---|---|---|
| Node.js脚本 | 本地node进程 |
| Shell脚本 | 本地shell进程 |
| LLM Agent | Agent运行时 |
| Claude Code Skill | Skill系统 |
| 人工确认 | UI/CLI |
| 时间延迟 | 调度器 |
Agent Task Example
Agent任务示例
Important: Check which subagents and agents are actually available before assigning the name. if none, pass the general-purpose subagent.
when executing the agent task, use the Task tool. never use the Babysitter skill or agent to execute the task. if the subagent or agent is not installed for the project before running the process, install it first.
javascript
export const agentTask = defineTask('agent-scorer', (args, taskCtx) => ({
kind: 'agent', // ← Use "agent" not "node"
title: 'Agent scoring',
agent: {
name: 'quality-scorer',
prompt: {
role: 'QA engineer',
task: 'Score results 0-100',
context: { ...args },
instructions: ['Review', 'Score', 'Recommend'],
outputFormat: 'JSON'
},
outputSchema: {
type: 'object',
required: ['score']
}
},
io: {
inputJsonPath: `tasks/${taskCtx.effectId}/input.json`,
outputJsonPath: `tasks/${taskCtx.effectId}/result.json`
}
}));重要提示:分配任务前请确认实际可用的子Agent和Agent。如果没有可用的,使用通用子Agent。
执行Agent任务时,请使用Task工具。绝对不要使用Babysitter Skill或Agent来执行任务。如果项目在运行流程前未安装子Agent或Agent,请先进行安装。
javascript
export const agentTask = defineTask('agent-scorer', (args, taskCtx) => ({
kind: 'agent', // ← 使用"agent"而非"node"
title: 'Agent评分',
agent: {
name: 'quality-scorer',
prompt: {
role: 'QA工程师',
task: '对结果进行0-100分评分',
context: { ...args },
instructions: ['审核', '评分', '给出建议'],
outputFormat: 'JSON'
},
outputSchema: {
type: 'object',
required: ['score']
}
},
io: {
inputJsonPath: `tasks/${taskCtx.effectId}/input.json`,
outputJsonPath: `tasks/${taskCtx.effectId}/result.json`
}
}));Skill Task Example
Skill任务示例
Important: Check which skills are actually available before assigning the name.
Never use the Babysitter skill or agent to execute the task. if the skill or subagent is not installed for the project before running the process, install it first.
javascript
export const skillTask = defineTask('analyzer-skill', (args, taskCtx) => ({
kind: 'skill', // ← Use "skill" not "node"
title: 'Analyze codebase',
skill: {
name: 'codebase-analyzer',
context: {
scope: args.scope,
depth: args.depth,
analysisType: args.type,
criteria: ['Code consistency', 'Naming conventions', 'Error handling'],
instructions: [
'Scan specified paths for code patterns',
'Analyze consistency across the codebase',
'Check naming conventions',
'Review error handling patterns',
'Generate structured analysis report'
]
}
},
io: {
inputJsonPath: `tasks/${taskCtx.effectId}/input.json`,
outputJsonPath: `tasks/${taskCtx.effectId}/result.json`
}
}));重要提示:分配任务前请确认实际可用的Skill。
绝对不要使用Babysitter Skill或Agent来执行任务。如果项目在运行流程前未安装Skill或子Agent,请先进行安装。
javascript
export const skillTask = defineTask('analyzer-skill', (args, taskCtx) => ({
kind: 'skill', // ← 使用"skill"而非"node"
title: '代码库分析',
skill: {
name: 'codebase-analyzer',
context: {
scope: args.scope,
depth: args.depth,
analysisType: args.type,
criteria: ['代码一致性', '命名规范', '错误处理'],
instructions: [
'扫描指定路径的代码模式',
'分析代码库的一致性',
'检查命名规范',
'审核错误处理模式',
'生成结构化分析报告'
]
}
},
io: {
inputJsonPath: `tasks/${taskCtx.effectId}/input.json`,
outputJsonPath: `tasks/${taskCtx.effectId}/result.json`
}
}));Quick Commands Reference
快速命令参考
Create run:
bash
$CLI run:create --process-id <id> --entry <path>#<export> --inputs <path> --run-id <id>Check status:
bash
$CLI run:status <runId> --jsonWhen the run completes, and emit . Use that exact value in a tag to end the loop.
run:iteraterun:statuscompletionSecret<promise>...</promise>View events:
bash
$CLI run:events <runId> --limit 20 --reverseList tasks:
bash
$CLI task:list <runId> --pending --jsonPost task result:
bash
$CLI task:post <runId> <effectId> --status <ok|error> --jsonIterate:
bash
$CLI run:iterate <runId> --json --iteration <n>创建运行:
bash
$CLI run:create --process-id <id> --entry <path>#<export> --inputs <path> --run-id <id>检查状态:
bash
$CLI run:status <runId> --json运行完成时,和会输出。将该值放入标签中以结束循环。
run:iteraterun:statuscompletionSecret<promise>...</promise>查看事件:
bash
$CLI run:events <runId> --limit 20 --reverse列出任务:
bash
$CLI task:list <runId> --pending --json发布任务结果:
bash
$CLI task:post <runId> <effectId> --status <ok|error> --json运行迭代:
bash
$CLI run:iterate <runId> --json --iteration <n>Recovery from failure
故障恢复
If at any point the run fails due to SDK issues or corrupted state or journal. analyze the error and the journal events. recover the state to the state and journal to the last known good state and adapt and try to continue the run.
如果运行因SDK问题、状态损坏或日志错误而失败,请分析错误和日志事件。将状态和日志恢复到最后已知的良好状态,调整后尝试继续运行。
Process Creation Guidelines and methodologies
流程创建指南与方法论
-
When building ux and full stack applications, integrate/link the main pages of the frontend with functionality created for every phase of the development process (where relevant). so that is a way to test the functionality of the app as we go.
-
Unless otherwise specified, prefer quality gated iterative development loops in the process.
-
You can change the process after the run is created or during the run (and adapt the process accordingly and journal accordingly) in case you discovered new information or requirements that were not previously known that changes the approach or the process.
-
The process should be a comprehensive and complete solution to the user request. it should not be a partial solution or a work in progress. it should be a complete and working solution that can be used to test the functionality of the app as we go.
-
include verification and refinement steps (and loops) for planning phases and integration phases, debugging phases, refactoring phases, etc. as well.
-
Create the process with the available skills and subagents.
-
Unless otherwise specified, prefer processes that close the widest loop in the quality gates (for example e2e tests with a full browser or emulator/vm if it a mobile or desktop app) AND gates that make sure the work is accurate against the user request (all the specs is covered and no extra stuff was added unless permitted by the intent of the user).
-
Scan the methodologies and processes in the plugin and the sdk package to find relevant processes and methodologies to use as a reference. also search for process files bundled in active skills, processes in the repo (.a5c/processes/).
-
if you encounter a generic reusable part of a process that can be later reused and composed, build it in a modular way and organize it in the .a5c/processes directory. and import it to compose it to the specific process in the current user request. prefer architecting processes in such modular way for reusability and composition.
prefer processes that have the following characteristics unless otherwise specified:
- in case of a new project, plan the architecture, stack, parts, milestones, etc.
- in case of an existing project, analyze the architecture, stack, relevant parts, milestones, etc. and plan the changes to be made in: milestones, existing modules modification/preparation steps, new modules, integration steps, etc.
- integrate/link the main pages (or entry points) with functionality created for every phase of the development process (where relevant). so that there is a way to test and experiment with the new functionality of the work or app as we go.
- Quality gated iterative and convergent development/refinement/optimization loops for each part of the implementation, definition, ux design and definition, specs, etc.
- Test driven - where quality gates agents can use executable tools, scripts and tests to verify the accuracy and completeness of the implementation.
- Integration Phases for each new functionality in every milestone with integration tests and quality gates. - where quality gates agents can use executable tools, scripts and tests to verify the accuracy and completeness of the integration.
- Where relevant - Ensures beautiful and polished ux design and implementation. pixel perfect verification and refinement loops.
- Ensures accurate and complete implementation of the user request.
- Ensures closing quality feedback loops in the most complete and comprehensive way possible and practical.
- in case the scope includes work in an existing deployed application and the scope of the feedback loop requires validations at the deployed environment (or remote environment), analyze the deployment methods and understand how the existing delivery pipeline works. and how you can deliver changes to the sandbox/staging and verify the accuracy and completeness of the changes you are making on the remote environment. with observability on the ci pipelines, logs of the cluster/app/infra/etc. (for requests like: "fix this bug and make sure that it is fixed locally, then deploy to staging and verify that the bug is fixed there too")
- if the user is very explicit about the flow and process, create a process that follows it closely and strictly. (ad hoc requests like: "try this functionality and make sure it works as expected, repeat until it works as expected")
- search for processes (js files), skills and agents (SKILL.md and AGENT.md files) in during the interactive process building phase to compose a comprehensive process that may combine various parts from different sources:
- .a5c/processes/ (project level processes)
- plugins/babysitter/skills/babysit/process/specializations/[rnd-specialization-name-slugified]/ (rnd specializations)
- plugins/babysitter/skills/babysit/process/specializations/domains/[domain-name-slugified]/[specialization-name-slugified]/ (non rnd specializations)
- plugins/babysitter/skills/babysit/process/methodologies/ (methodologies)
-
构建UX和全栈应用时,将前端主页面与开发流程各阶段创建的功能集成/关联(如相关)。这样可以在开发过程中测试应用功能。
-
除非另有说明,流程中优先使用质量门控的迭代开发循环。
-
如果发现之前未知的新信息或需求,改变了方法或流程,可以在运行创建后或运行期间修改流程(并相应地更新日志)。
-
流程应是用户请求的全面完整解决方案,而非部分解决方案或进行中的工作。它应该是一个完整可用的解决方案,可用于在开发过程中测试应用功能。
-
为规划阶段、集成阶段、调试阶段、重构阶段等添加验证和优化步骤(及循环)。
-
使用可用的Skill和子Agent创建流程。
-
除非另有说明,优先使用能覆盖最完整质量门的流程(例如,如果是移动或桌面应用,使用全浏览器或模拟器/虚拟机进行端到端测试),并确保工作符合用户请求的准确性(覆盖所有需求,除非用户允许,否则不添加额外内容)。
-
扫描插件和SDK包中的方法论和流程,找到相关的流程和方法论作为参考。同时搜索活动Skill中捆绑的流程文件、仓库中的流程(.a5c/processes/)。
-
如果遇到可复用的通用流程部分,请以模块化方式构建,并将其组织在.a5c/processes目录中。然后将其导入以组成当前用户请求的特定流程。优先采用这种模块化架构以提高可复用性和组合性。
除非另有说明,优先选择具有以下特征的流程:
- 对于新项目,规划架构、技术栈、组件、里程碑等。
- 对于现有项目,分析架构、技术栈、相关组件、里程碑等,并规划需要进行的更改:里程碑、现有模块修改/准备步骤、新模块、集成步骤等。
- 将主页面(或入口点)与开发流程各阶段创建的功能集成/关联(如相关)。这样可以在开发过程中测试和试验新功能。
- 对实现、定义、UX设计和定义、需求规格等每个部分,使用质量门控的迭代收敛开发/优化循环。
- 测试驱动 - 质量门控Agent可以使用可执行工具、脚本和测试来验证实现的准确性和完整性。
- 每个里程碑中为每个新功能添加集成阶段,包含集成测试和质量门控。质量门控Agent可以使用可执行工具、脚本和测试来验证集成的准确性和完整性。
- 相关情况下 - 确保UX设计和实现美观且精致。包含像素级验证和优化循环。
- 确保准确完整地实现用户请求。
- 尽可能全面和实际地关闭质量反馈循环。
- 如果范围包括在现有已部署应用中工作,且反馈循环需要在部署环境(或远程环境)中进行验证,请分析部署方法,了解现有交付管道的工作方式,以及如何将更改交付到沙箱/预发布环境并验证所做更改的准确性和完整性。同时监控CI管道、集群/应用/基础设施等的日志(例如用户请求:"修复此bug,确保在本地修复,然后部署到预发布环境并验证bug已修复")。
- 如果用户明确指定了流程和步骤,请创建严格遵循该流程的方案。(例如临时请求:"测试此功能确保其正常工作,重复直到正常")
- 在交互式流程构建阶段,搜索可用的流程(js文件)、Skill和Agent(SKILL.md和AGENT.md文件),以组合可能来自不同来源的综合流程:
- .a5c/processes/(项目级流程)
- plugins/babysitter/skills/babysit/process/specializations/[rnd-specialization-name-slugified]/(研发专项能力)
- plugins/babysitter/skills/babysit/process/specializations/domains/[domain-name-slugified]/[specialization-name-slugified]/(非研发专项能力)
- plugins/babysitter/skills/babysit/process/methodologies/(方法论)
Critical Rules
重要规则
CRITICAL RULE: The completion secret is emitted only when the run is completed. You may ONLY output when the run is completely and unequivocally DONE (completed status from the orchestration CLI). Do not output false promises to escape the run, and do not mention the secret to the user.
<promise>SECRET</promise>CRITICAL RULE: in non-interactive mode, never approve breakpoints through the CLI by yourself. only create them and wait for them. they will always be resolved externally.
CRITICAL RULE: in non-interactive mode, if a breakpoint is still waiting. monitor it for approval until it is resolved. do not return prompt to the user. just wait for the breakpoint to be resolved.
CRITICAL RULE: if a run is broken/failed/at unknown state, when of the way to recover is to remove last bad entries in the journal and rebuild the state. in interactive mode, use the AskUserQuestion tool if you need to ask the user for a question about the recovery and you exhausted all other options.
CRITICAL RULE: when creating processes, search for available skills and subagents before thinking about the exact orchestration. prefer processes that close the widest loop in the quality gates (for example e2e tests with a full browser or emulator/vm if it a mobile or desktop app) AND gates that make sure the work is accurate against the user request (all the specs is covered and no extra stuff was added unless permitted by the intent of the user).
CRITICAL RULE: do not use the babysit skill inside the delegated tasks. if you are performing a delgated task as a subagent. you will get an error when trying to run the setup shell script. that means you have to actually perform the task yourself and not orchestrate, babysit or even use this skill.
CRITICAL RULE: Never build a wrapper, python or helper scripts to orchestrate the runs. Use the CLI to drive the orchestration loop and never loop programmatically.
CRITICAL RULE: Never fallback to simpler execution if the user activated this skill. persist in executing the orchestration itself rather than simplifying the execution by bypassing the process above - you must create a valid process js file, create a run and associate it with the session, then iterate the run until it is completed.
重要规则:仅当运行完成时才会生成完成密钥。只有当运行完全且明确完成时(编排CLI返回completed状态),你才能输出。不要输出虚假的密钥来退出运行,也不要向用户提及该密钥。
<promise>SECRET</promise>重要规则:在非交互模式下,绝对不要通过CLI自行确认断点。仅创建断点并等待,它们将始终由外部解决。
重要规则:在非交互模式下,如果断点仍处于等待状态,请监控其直到被解决。不要向用户返回提示,只需等待断点被解决。
重要规则:如果运行损坏/失败/处于未知状态,恢复方法之一是删除日志中的最后错误条目并重建状态。在交互模式下,如果需要询问用户有关恢复的问题且已用尽其他选项,请使用AskUserQuestion工具。
重要规则:创建流程时,在考虑具体编排之前,先搜索可用的Skill和子Agent。优先使用能覆盖最完整质量门的流程(例如,如果是移动或桌面应用,使用全浏览器或模拟器/虚拟机进行端到端测试),并确保工作符合用户请求的准确性(覆盖所有需求,除非用户允许,否则不添加额外内容)。
重要规则:不要在委托任务中使用babysit Skill。如果你作为子Agent执行委托任务,尝试运行设置shell脚本时会出错。这意味着你必须自行完成任务,而不是编排、监控或使用此Skill。
重要规则:绝对不要构建包装器、Python或辅助脚本来编排运行。使用CLI驱动编排循环,绝对不要通过编程方式循环。
重要规则:如果用户激活了此Skill,绝对不要退化为更简单的执行方式。坚持执行编排本身,而不是通过绕过上述流程来简化执行 - 你必须创建有效的流程js文件,创建运行并将会话与其关联,然后迭代运行直到完成。
See Also
参考资料
- - TDD quality convergence example - read and look for relevant processes and methodolies before creating the code process for a new run (create the run using the CLI, then use these process as a reference)
process/tdd-quality-convergence.js - - Agent/skill patterns, iterative convergence
reference/ADVANCED_PATTERNS.md - - SDK API reference
packages/sdk/sdk.md
- - TDD质量收敛示例 - 在为新运行创建代码流程之前,请阅读并查找相关流程和方法论(使用CLI创建运行,然后将这些流程作为参考)
process/tdd-quality-convergence.js - - Agent/Skill模式、迭代收敛
reference/ADVANCED_PATTERNS.md - - SDK API参考
packages/sdk/sdk.md