goap-agent

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GOAP Agent Skill

GOAP Agent Skill

Goal-Oriented Action Planning for complex multi-step tasks with intelligent planning and multi-agent coordination.
面向目标的行动规划(GOAP),用于需要智能规划和多Agent协调的复杂多步骤任务。

Quick Reference

快速参考

  • Methodology - Core GOAP planning cycle and phases
  • Execution Strategies - Parallel, Sequential, Swarm, Hybrid patterns
  • Skills Reference - Available skills by category
  • Agents Reference - Available task agents and capabilities
  • Patterns - Common GOAP execution patterns
  • Examples - Complete GOAP workflow examples
  • ADR-022 - Architecture Decision Record
  • 方法论 - GOAP核心规划周期与阶段
  • 执行策略 - 并行、串行、集群、混合模式
  • 技能参考 - 按类别划分的可用技能
  • Agent参考 - 可用任务Agent及其能力
  • 模式 - 常见GOAP执行模式
  • 示例 - 完整GOAP工作流示例
  • ADR-022 - 架构决策记录

When to Use

适用场景

  • Complex multi-step tasks (5+ distinct steps)
  • Cross-domain problems (storage, API, testing, documentation)
  • Tasks requiring parallel/sequential execution
  • Quality-critical work with validation checkpoints
  • Large refactors or architectural changes
  • 复杂多步骤任务(5个以上不同步骤)
  • 跨领域问题(存储、API、测试、文档)
  • 需要并行/串行执行的任务
  • 带有验证检查点的质量关键型工作
  • 大型重构或架构变更

CRITICAL: Skills vs Task Agents

重要提示:技能 vs 任务Agent

Skills (via
Skill
tool): Instruction sets that guide Claude directly Agents (via
Task
tool): Autonomous sub-processes that execute tasks
Example:
  • WRONG:
    Task(subagent_type="rust-code-quality", ...)
    → ERROR!
  • CORRECT:
    Skill(command="rust-code-quality")
    → SUCCESS
See skills.md for complete skills list and agents.md for agent capabilities.
技能(通过
Skill
工具):直接指导Claude的指令集 Agent(通过
Task
工具):执行任务的自主子流程
示例:
  • 错误用法:
    Task(subagent_type="rust-code-quality", ...)
    → 报错!
  • 正确用法:
    Skill(command="rust-code-quality")
    → 成功
查看**skills.md获取完整技能列表,查看agents.md**了解Agent能力。

Core Process

核心流程

  1. ANALYZE → Understand goals, constraints, resources
    • Check ADRs: Read relevant ADRs from
      plans/adr/
      before planning
  2. DECOMPOSE → Break into atomic tasks with dependencies
  3. STRATEGIZE → Choose execution pattern
  4. COORDINATE → Assign to specialized agents
  5. EXECUTE → Run with monitoring and quality gates
  6. SYNTHESIZE → Aggregate results and validate success
See methodology.md for detailed phase-by-phase guidance and patterns.md for common execution patterns.
  1. 分析 → 理解目标、约束条件、资源
    • 检查ADR:规划前先阅读
      plans/adr/
      中的相关ADR
  2. 分解 → 将任务拆分为带有依赖关系的原子任务
  3. 制定策略 → 选择执行模式
  4. 协调 → 分配给专业Agent
  5. 执行 → 运行任务并进行监控与质量管控
  6. 合成 → 汇总结果并验证任务成功
查看**methodology.md获取详细的分阶段指导,查看patterns.md**了解常见执行模式。

ADR Integration Workflow

ADR集成工作流

MANDATORY: Always check ADRs in
plans/adr/
before creating execution plans:
强制要求:在创建执行计划前,务必检查
plans/adr/
中的ADR:

Step 1: ADR Discovery

步骤1:ADR发现

bash
undefined
bash
undefined

List all ADRs to identify relevant ones

列出所有ADR以识别相关内容

ls plans/adr/ADR-*.md
undefined
ls plans/adr/ADR-*.md
undefined

Step 2: Read Relevant ADRs

步骤2:阅读相关ADR

  • Search for ADRs related to your task domain
  • Note architectural decisions and constraints
  • Check ADR status (Accepted/Implemented vs Deprecated)
  • 搜索与任务领域相关的ADR
  • 记录架构决策与约束条件
  • 检查ADR状态(已接受/已实现 vs 已弃用)

Step 3: Incorporate into Planning

步骤3:融入规划过程

  • Use ADR constraints when decomposing tasks
  • Reference ADRs in execution plans
  • Ensure compliance with architectural decisions
  • 分解任务时遵循ADR约束
  • 在执行计划中引用ADR
  • 确保符合架构决策

Step 4: Update Progress in plans/

步骤4:更新plans/中的进度

  • Create/update execution plan files in
    plans/
  • Document progress, blockers, and decisions
  • Link to relevant ADRs in plan files
  • plans/
    中创建/更新执行计划文件
  • 记录进度、障碍与决策
  • 在计划文件中链接到相关ADR