Cfn coordination

From masharratt/claude-flow-novice · View interactive version

Cfn coordination is an AI agent skill from the GitHub repository masharratt/claude-flow-novice. Agent coordination patterns for task-mode multi-agent workflows (no Redis): chain, broadcast, mesh, consensus collection. Use when planning how to spawn agents, sequence dependencies, or aggregate results in a single message.

How to use this skill

Skill file

Skill: cfn-coordination

Purpose

Patterns for coordinating multiple Task-mode agents within a single main-chat message. Replaces the deprecated Redis pub/sub coordination model.

Architecture Principle

Task-mode agents return output directly. No Redis signaling. Main chat (or a coordinator agent) reads each agent's return value and routes data to dependents. Agents never block on external coordination channels.

Anti-patterns (do not use):

Core Patterns

1. Chain (sequential dependency: A → B → C)

Each step waits for the prior step's return value. Main chat (or coordinator) feeds output forward.

2. Broadcast (1:N: A → B, C, D)

One agent produces output; multiple agents receive the same input.

3. Mesh (N:1 or N:N: A, B, C → D)

Multiple agents produce output in parallel; one or more downstream agents consume the aggregate.

4. Consensus Collection (validators voting)

Multiple validator agents review the same artifact and return confidence scores. Used in Loop 2.

Topology Selection

| Agent count | Topology | Pattern |

|-------------|----------|---------|

| 2-7 | Mesh | Direct spawn, main chat aggregates |

| 8+ | Hierarchical | Coordinator agent orchestrates sub-batches |

| Validators only | Consensus | Parallel spawn, score aggregation |

| Sequential pipeline | Chain | Multi-message, output forwarded |

Task-Type Cookbook

| Task type | Topology | Typical agents | Dependency shape |

|-----------|----------|----------------|------------------|

| Research | Hierarchical | researcher, code-analyzer, architect | (researcher + analyzer) → architect |

| Security fix | Hierarchical | analyzer, coder, reviewer, validator | analyzer → coder → reviewer → validator |

| Feature | Mesh | analyst, architect, backend, frontend, tester | analyst → architect → (backend \|\| frontend) → tester |

| Optimization | Hierarchical | perf-analyzer, code-analyzer, coder, tester | (perf + code) → coder → tester |

Agent Prompt Template

Task("<agent-role>", `
  <task description>

  Inputs:
  - <data piped in from prior agents, inlined into prompt>

  Deliverables:
  - <files / artifacts / decisions to produce>

  Return format:
  - Final message must include confidence score (0.0-1.0) and list of deliverable paths
`, "<agent-type>")

Notes:

Responsibilities Split

Main chat / coordinator

Individual agents

Related Skills

History

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.