xiaohongshu
xiaohongshu
goap-agent
Invoke for complex multi-step tasks requiring intelligent planning and multi-agent coordination. Use when tasks need decomposition, dependency mapping, parallel/sequential/swarm/iterative execution strategies, or coordination of multiple specialized agents with quality gates and dynamic optimizat...
Full skill instructions
Enable intelligent planning and execution of complex multi-step tasks through systematic decomposition, dependency mapping, and coordinated multi-agent execution.
Always use the plans/ folder for all files.
See the GOAP Agent documentation (../agents/goap-agent.md) for detailed execution patterns and examples.
There are TWO different types of workers you can coordinate in GOAP planning:
Skill tool)Skills are instruction sets that guide Claude directly. They provide specialized knowledge and workflows.
How to invoke: Skill(command="skill-name")
When to use:
Task tool)Task Agents are autonomous sub-processes that execute tasks independently using tools.
How to invoke: Task(subagent_type="agent-name", prompt="...", description="...")
When to use:
WRONG: Task(subagent_type="rust-code-quality", ...) → ERROR! rust-code-quality is a Skill!
CORRECT: Skill(command="rust-code-quality") → SUCCESS
See the agent-coordination skill for the complete reference on Skills vs Agents.
Use this skill when facing:
1. ANALYZE → Understand goals, constraints, resources
2. DECOMPOSE → Break into atomic tasks with dependencies
3. STRATEGIZE → Choose execution pattern (parallel/sequential/swarm/hybrid/iterative)
4. COORDINATE → Assign tasks to specialized agents
5. EXECUTE → Run with monitoring and quality gates
6. SYNTHESIZE → Aggregate results and validate success
## Task Analysis
**Primary Goal**: [Clear statement of what success looks like]
**Constraints**:
- Time: [Urgent / Normal / Flexible]
- Resources: [Available agents, tools, data]
- Dependencies: [External systems, prerequisites]
**Complexity Level**:
- Simple: Single agent, <3 steps
- Medium: 2-3 agents, some dependencies
- Complex: 4+ agents, mixed execution modes
- Very Complex: Multiple phases, many dependencies
**Quality Requirements**:
- Testing: [Unit / Integration / E2E]
- Standards: [AGENTS.md compliance, formatting, linting]
- Documentation: [API docs, examples, guides]
- Performance: [Speed, memory, scalability]
Use the task-decomposition skill to break down the goal:
## Task Decomposition: [Task Name]
### Main Goal
[Clear statement of primary objective]
### Sub-Goals
1. [Component 1] - Priority: P0
- Success Criteria: [How to verify]
- Dependencies: [Prerequisites]
- Complexity: [Low/Medium/High]
2. [Component 2] - Priority: P1
- Success Criteria: [How to verify]
- Dependencies: [Component 1]
- Complexity: [Low/Medium/High]
### Atomic Tasks
**Component 1: [Name]**
- Task 1.1: [Action] (Agent: type, Deps: none)
- Task 1.2: [Action] (Agent: type, Deps: 1.1)
### Dependency Graph
Task 1.1 → Task 1.2 → Task 2.1 ↘ Task 1.3 (parallel) → Task 2.2
Choose execution strategy based on task characteristics. See the GOAP Agent documentation (../agents/goap-agent.md) for detailed execution patterns.
| Strategy | When to Use | Speed | Complexity |
|---|---|---|---|
| Parallel | Independent tasks, time-critical | Nx | High |
| Sequential | Dependent tasks, order matters | 1x | Low |
| Swarm | Many similar tasks | ~Nx | Medium |
| Hybrid | Mixed requirements | 2-4x | Very High |
| Iterative | Progressive refinement, convergence | Varies | Medium |
Needs iterative refinement?
├─ Yes (until criteria met or converged) → ITERATIVE
└─ No → Is time critical?
├─ Yes → Can tasks run in parallel?
│ ├─ Yes → PARALLEL
│ └─ No → SEQUENTIAL (prioritize critical path)
└─ No → Are tasks similar?
├─ Yes (many similar) → SWARM
├─ No (mixed) → HYBRID
└─ Simple linear → SEQUENTIAL
| Agent Type | Capabilities | Tools Available | Best For |
|---|---|---|---|
| feature-implementer | Design, implement, test, integrate features | Read, Write, Edit, Bash, Glob, Grep | New functionality, modules, APIs |
| debugger | Diagnose runtime issues, async problems | Read, Bash, Grep, Edit | Bug fixes, deadlocks, performance |
| test-runner | Execute tests, diagnose failures | Bash, Read, Grep, Edit | Test validation, debugging tests |
| refactorer | Improve structure, eliminate duplication | Read, Edit, Bash, Grep, Glob | Code quality, modernization |
| code-reviewer | Review quality, standards, security | Read, Glob, Grep, Bash | Quality assurance, pre-commit |
| loop-agent | Iterative refinement, convergence | Task, Read, TodoWrite, Glob, Grep | Progressive improvements, test-fix loops |
| agent-creator | Create new Task Agents | Write, Read, Glob, Grep, Edit | Building new autonomous capabilities |
| Explore | Fast codebase exploration | All tools | Finding files, understanding architecture |
| memory-cli | CLI development and testing | Read, Write, Edit, Bash, Glob, Grep | Memory CLI features and fixes |
Skills (Parallel):
web-search-researcher - Research best practices, modern solutionscontext-retrieval - Find similar past implementationscodebase-consolidation - Understand current architectureAgents (Parallel):
Explore - Fast codebase explorationcode-reviewer - Audit current code qualityUse when: Beginning new features, investigating issues, understanding requirements
Skills (Sequential):
task-decomposition - Break down complex goalsanalysis-swarm - Multi-perspective architectural decisions (RYAN, FLASH, SOCRATES)Use when: Multiple valid approaches, significant trade-offs, architectural decisions
Skills (Parallel):
rust-code-quality - Rust best practices reviewarchitecture-validation - Validate vs architectural plansplan-gap-analysis - Verify all requirements coveredUse when: Before major implementation, validating design decisions
Agents (Parallel or Sequential):
feature-implementer - Build new functionalityrefactorer - Improve existing codeSkills (Guidance):
feature-implement - Feature implementation workflowUse when: Executing planned work, building features
Skills (Sequential):
test-fix - Systematic test debuggingquality-unit-testing - High-quality test writingAgents (Parallel or Sequential):
test-runner - Execute test suitesdebugger - Diagnose runtime issuesUse when: Validating implementations, fixing test failures
Skills (Sequential):
build-compile - Build verification and optimizationgithub-workflows - CI/CD pipeline validationUse when: Preparing for deployment, troubleshooting CI failures
Skills (Parallel):
rust-code-quality - Final Rust reviewarchitecture-validation - Validate vs architectureplan-gap-analysis - Verify completenessAgents (Parallel):
code-reviewer - Final quality checktest-runner - Full test suite validationUse when: Pre-commit, pre-merge, release preparation
## Execution Plan: [Task Name]
### Overview
- Strategy: [Parallel/Sequential/Swarm/Hybrid/Iterative]
- Total Tasks: [N]
- Estimated Duration: [Time]
- Quality Gates: [N checkpoints]
### Phase 1: [Phase Name]
**Tasks**:
- Task 1: [Description] (Agent: type)
- Task 2: [Description] (Agent: type)
**Quality Gate**: [Validation criteria]
### Phase 2: [Phase Name]
**Tasks**:
- Task 3: [Description] (Agent: type)
**Quality Gate**: [Validation criteria]
### Overall Success Criteria
- [ ] All tasks complete
- [ ] Quality gates passed
- [ ] Tests passing
- [ ] Documentation updated
### Contingency Plans
- If Phase 1 fails → [Recovery plan]
- If tests fail → [Diagnostic approach]
**Launching parallel agents:**
- Agent 1 (feature-implementer) → Task A
- Agent 2 (feature-implementer) → Task B
- Agent 3 (test-runner) → Task C
**Coordination**:
- All agents work simultaneously
- Monitor progress independently
- Aggregate results when all complete
**Launching sequential agents:**
Phase 1: Agent 1 (debugger) → Diagnose issue
↓ Quality Gate: Root cause identified
Phase 2: Agent 2 (refactorer) → Apply fix
↓ Quality Gate: Tests pass
Phase 3: Agent 3 (code-reviewer) → Validate
After each successful todo completion, create an atomic git commit:
[module] description formatfeat(storage): add episode creation method## Execution Summary: [Task Name]
### ✓ Completed Tasks
- [Task 1]: Success
- [Task 2]: Success
### 📦 Deliverables
- [File/Feature 1]
- [File/Feature 2]
### ✅ Quality Validation
- Tests: [Pass/Fail] ([coverage]%)
- Linting: [Pass/Fail]
- Standards: [Compliant]
### 📊 Performance Metrics
- Duration: [actual vs estimated]
- Efficiency: [parallel speedup if applicable]
### 💡 Recommendations
- [Improvement 1]
- [Improvement 2]
### 🎓 Lessons Learned
- [What worked well]
- [What to improve]
GOAP coordination tasks can be tracked as learning episodes to improve future planning decisions.
**Use**: Skill(command="episode-start")
**TaskContext**:
- language: "coordination"
- domain: "goap"
- tags: ["multi-agent", "parallel", "sequential", etc.]
**Description**: "GOAP coordination for [task description]"
**Use**: Skill(command="episode-log-steps")
**Log during**:
- Decomposition decisions (how goals were broken down)
- Agent assignments (which agents chosen for which tasks)
- Strategy selection (why parallel vs sequential vs swarm)
- Quality gate results (pass/fail and why)
- Recovery actions (how failures were handled)
**Use**: Skill(command="episode-complete")
**Score based on**:
- Goal achievement (all tasks completed?)
- Efficiency (parallel speedup, resource utilization)
- Quality (all quality gates passed?)
- Adaptability (how well recovered from failures?)
**Patterns extracted**:
- Successful decomposition strategies
- Effective agent assignments
- Optimal execution patterns
- Quality gate effectiveness
**Use**: Skill(command="context-retrieval")
**Query for**:
- Similar coordination tasks
- Past parallel/sequential decisions
- Agent assignment patterns
- Quality gate strategies
**Apply learnings**:
- Reuse successful decompositions
- Avoid past mistakes
- Apply proven strategies
- Optimize based on history
Task: Implement authentication system
Phase 0: Retrieve Context
└─ Skill(command="context-retrieval")
Query: "authentication implementation coordination"
→ Found: 3 past auth implementations
→ Pattern: Parallel (model + middleware + endpoints) worked well
→ Lesson: Sequential integration after parallel build
Phase 1: Start Episode
└─ Skill(command="episode-start")
Context: {domain: "goap", tags: ["auth", "parallel"]}
Phase 2-N: Execute with logging
└─ Skill(command="episode-log-steps")
Log each: decomposition, assignment, quality gate
Phase Final: Complete Episode
└─ Skill(command="episode-complete")
Score: High (reused successful pattern)
Pattern: Confirmed parallel → sequential integration strategy
When existing Skills and Agents are insufficient, create new capabilities dynamically.
Create Skill when:
Examples:
How to create:
Use: Skill(command="skill-creator")
Provide:
- Skill name and description
- When to use this skill
- Step-by-step methodology
- Examples and patterns
- Integration points
Create Agent when:
Examples:
How to create:
Use: Task(subagent_type="agent-creator", ...)
Or use: Skill(command="skill-creator") for agent definition
Provide:
- Agent purpose and capabilities
- Tools the agent needs
- Input/output specification
- Success criteria
After creating new capabilities:
Document in GOAP:
Test the capability:
Share the pattern:
Problem: Need specialized security audit for authentication code
Step 1: Identify gap
→ No existing Skill covers auth security audit specifically
Step 2: Create Skill
└─ Skill(command="skill-creator")
Name: "auth-security-audit"
Purpose: "Audit authentication code for security vulnerabilities"
Methodology: [OWASP auth checklist, crypto review, token validation, ...]
Step 3: Integrate into GOAP
→ Add to Quality & Validation Skills
→ Add to Phase 3 and Phase 7 recommendations
→ Document in project CLAUDE.md
Step 4: Use in workflow
└─ Phase 3: Skill(command="auth-security-audit")
→ Validates auth design before implementation
Task: Implement complex feature with architectural impact
Phase 0: Retrieve Context [Skills]
├─ Skill(command="context-retrieval")
│ Query: "similar feature implementations"
│ → Apply past learnings
└─ Skill(command="episode-start")
→ Start tracking this coordination
Phase 1: Research [Parallel Skills + Agents]
├─ Skill(command="web-search-researcher")
│ → Research modern best practices
├─ Skill(command="codebase-consolidation")
│ → Understand current architecture
└─ Task(subagent_type="Explore")
→ Fast codebase exploration
Quality Gate: Architecture and requirements clear
Phase 2: Decision [Skill]
└─ Skill(command="analysis-swarm")
→ Multi-perspective architectural decision (RYAN, FLASH, SOCRATES)
→ Evaluate trade-offs, choose approach
Quality Gate: Architecture approved
Phase 3: Pre-Implementation Validation [Parallel Skills]
├─ Skill(command="architecture-validation")
│ → Validate design vs plans
├─ Skill(command="plan-gap-analysis")
│ → Ensure complete requirements coverage
└─ Skill(command="rust-code-quality")
→ Review design for Rust best practices
Quality Gate: Design validated
Phase 4: Implementation [Parallel Agents]
├─ Task(subagent_type="feature-implementer")
│ Prompt: "Implement Module A"
├─ Task(subagent_type="feature-implementer")
│ Prompt: "Implement Module B"
└─ Task(subagent_type="feature-implementer")
Prompt: "Implement Module C"
Quality Gate: All modules implemented
Phase 5: Testing [Skills + Agents]
├─ Task(subagent_type="test-runner")
│ → Execute all tests
├─ Skill(command="test-fix")
│ → Fix any failing tests systematically
└─ Skill(command="quality-unit-testing")
→ Ensure high-quality tests
Quality Gate: All tests passing
Phase 6: Quality Validation [Parallel Skills + Agents]
├─ Skill(command="rust-code-quality")
│ → Final Rust review
├─ Skill(command="architecture-validation")
│ → Validate vs architecture
├─ Skill(command="plan-gap-analysis")
│ → Verify completeness
└─ Task(subagent_type="code-reviewer")
→ Final quality check
Quality Gate: Quality standards met
Phase 7: Build & CI [Skills]
├─ Skill(command="build-compile")
│ → Build verification
└─ Skill(command="github-workflows")
→ CI validation
Quality Gate: Ready for merge
Phase 8: Learning [Skills]
└─ Skill(command="episode-complete")
Score: High (all phases successful)
Patterns: Document successful strategies
Phase 1: Investigate
- debugger → Reproduce issue
- Quality Gate: Issue reproduced
Phase 2: Diagnose
- debugger → Root cause analysis
- Quality Gate: Root cause identified
Phase 3: Fix
- refactorer → Apply fix
- Quality Gate: Fix implemented
Phase 4: Verify
- test-runner → Regression tests
- Quality Gate: Tests pass
Phase 1: Audit
- code-reviewer → Quality audit
- Quality Gate: Issues identified
Phase 2 (Swarm): Improve
- Multiple refactorer agents
- Work queue: [issue list]
- Quality Gate: All issues addressed
Phase 3: Validate
- test-runner → Full test suite
- code-reviewer → Final check
- Quality Gate: Quality targets met
**If agent fails:**
1. Log failure reason
2. Check quality gate status
3. Options:
- Retry same agent (transient error)
- Assign to different agent (agent issue)
- Modify task (requirements issue)
- Escalate to user (blocking issue)
**If quality gate fails:**
1. Identify failing criteria
2. Diagnose root cause
3. Options:
- Re-run previous phase with fixes
- Adjust quality criteria (if appropriate)
- Change strategy (e.g., parallel → sequential for debugging)
**If dependency blocks progress:**
1. Identify blocking task
2. Prioritize unblocking
3. Options:
- Execute dependency first (re-order)
- Remove dependency (refactor plan)
- Parallel work on independent tasks
✓ Break tasks into atomic, testable units ✓ Define clear quality gates between phases ✓ Match agent capabilities to task requirements ✓ Monitor progress and validate incrementally ✓ Document decisions and rationale ✓ Learn from execution for future planning ✓ Use parallel execution where safe ✓ Validate dependencies before execution ✓ Create plan to fix all pre-existing issues ✓ Never skip lint - always run and resolve ✓ Always implement changes and verify they work
✗ Create monolithic tasks (break them down) ✗ Skip quality gates (leads to cascading failures) ✗ Assume tasks are independent (verify carefully) ✗ Ignore agent failures (address immediately) ✗ Over-complicate simple tasks (use sequential) ✗ Under-estimate coordination overhead ✗ Forget to aggregate and synthesize results ✗ Leave pre-existing issues unfixed ✗ Skip lint checks or warnings
Task: Implement authentication system
## GOAP Plan
### Phase 1: Analysis (Sequential)
- goap-agent → Define requirements
- Quality Gate: Requirements clear
### Phase 2: Implementation (Parallel)
- Agent A → User model + database
- Agent B → Auth middleware
- Agent C → API endpoints
- Quality Gate: All components implemented
### Phase 3: Integration (Sequential)
- feature-implementer → Wire components together
- test-runner → Integration tests
- Quality Gate: Tests pass
### Phase 4: Validation (Sequential)
- code-reviewer → Security review
- Quality Gate: Approved for deployment
If during execution:
Then:
GOAP enables systematic planning and execution of complex tasks through:
Use GOAP when facing complex, multi-step challenges requiring coordination, optimization, and quality assurance.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience