onboard-agent

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

MANDATORY PREPARATION

必选准备工作

Invoke {{command_prefix}}agent-workflow — it contains workflow principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding — if no workflow context exists yet, you MUST run {{command_prefix}}teach-maestro first.

Bootstrap a new agent workflow from scratch, or add a new agent to an existing system.
调用 {{command_prefix}}agent-workflow —— 它包含工作流原则、反模式以及上下文收集协议。在继续操作前请遵循该协议——如果还不存在工作流上下文,你必须先运行 {{command_prefix}}teach-maestro。

从零启动一个新的Agent工作流,或者向现有系统添加新的Agent。

Step 1: Establish Conventions

步骤1:建立约定规范

markdown
undefined
markdown
undefined

Workflow Conventions

Workflow Conventions

Prompt Format

Prompt Format

  • Delimiter style: [XML tags / markdown headers / triple-dash]
  • Section order: [System → Context → Instructions → Input]
  • Output format: [JSON with schema / markdown template]
  • Delimiter style: [XML tags / markdown headers / triple-dash]
  • Section order: [System → Context → Instructions → Input]
  • Output format: [JSON with schema / markdown template]

Tool Conventions

Tool Conventions

  • Naming: [verb_noun / noun.verb / camelCase]
  • Description template: [What → When → When Not → Returns]
  • Error format: [{ code, message, details }]
  • Naming: [verb_noun / noun.verb / camelCase]
  • Description template: [What → When → When Not → Returns]
  • Error format: [{ code, message, details }]

Logging

Logging

  • Format: [JSON structured]
  • Required fields: [workflow_id, step, timestamp, level]
  • Format: [JSON structured]
  • Required fields: [workflow_id, step, timestamp, level]

File Structure

File Structure

  • Prompts: [prompts/workflow-name/v1.md]
  • Tools: [tools/tool-name.{ext}]
  • Config: [config/environment.yaml]
  • Tests: [tests/workflow-name/]
undefined
  • Prompts: [prompts/workflow-name/v1.md]
  • Tools: [tools/tool-name.{ext}]
  • Config: [config/environment.yaml]
  • Tests: [tests/workflow-name/]
undefined

Step 2: Create Initial Structure

步骤2:创建初始结构

text
project/
├── prompts/          # System prompts, versioned
├── tools/            # Tool definitions
├── config/           # Environment-specific configuration
├── tests/            # Golden test sets and evaluation suites
├── logs/             # Runtime logs (gitignored)
└── .maestro.md       # Workflow context
text
project/
├── prompts/          # System prompts, versioned
├── tools/            # Tool definitions
├── config/           # Environment-specific configuration
├── tests/            # Golden test sets and evaluation suites
├── logs/             # Runtime logs (gitignored)
└── .maestro.md       # Workflow context

Step 3: Create the First Agent

步骤3:创建第一个Agent

  1. System prompt: Role definition with constraints
  2. 2-3 essential tools: Start with the minimum viable tool set
  3. Output schema: Define expected output format
  4. One golden test: At least one test case with known-good output
  5. Basic error handling: Structured error responses
  6. Logging: Structured log output for each run
  1. 系统提示词:包含约束条件的角色定义
  2. 2-3个核心工具:从最小可行工具集开始
  3. 输出Schema:定义预期的输出格式
  4. 一个金标准测试用例:至少一个已知正确输出的测试用例
  5. 基础错误处理:结构化的错误响应
  6. 日志记录:每次运行都输出结构化日志

Step 4: Verify

步骤4:验证

  • Run the agent with the golden test case
  • Verify error handling works (send bad input)
  • Verify logging captures useful context
  • 使用金标准测试用例运行Agent
  • 验证错误处理正常生效(传入错误输入)
  • 验证日志能够捕获有用的上下文

Recommended Next Step

推荐后续步骤

After onboarding, run
{{command_prefix}}diagnose
for a baseline health check, then
{{command_prefix}}fortify
to add production-grade error handling.
NEVER:
  • Start building without establishing conventions
  • Create tools without descriptions
  • Skip the golden test case
  • Over-scope the initial agent (start minimal, amplify later)
完成接入后,运行
{{command_prefix}}diagnose
执行基线健康检查,然后运行
{{command_prefix}}fortify
添加生产级别的错误处理。
禁止操作
  • 未建立约定规范就开始开发
  • 创建工具却不添加描述
  • 跳过金标准测试用例
  • 初始Agent的范围过大(从最小可行版本开始,后续再扩展)