agentleFS
mikeparcewskimikeparcewski/wicked-garden/skills/agentic/agentic-patterns/SKILL.md

wicked-garden-agentic-agentic-patterns

Skill9 starsChanged 7 months agoMITView on GitHub

Use when designing or analyzing multi-agent architectures — covers core patterns (sequential, hierarchical, parallel, event-driven), anti-patterns, and the five-layer model (Cognition → Context → Interaction → Runtime → Governance) for separating concerns in production-grade agentic systems. NOT for reviewing existing agentic code (use review-methodology) or framework selection (use the frameworks skill).

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Missing Guardrails: No constraints on agent actions.

    line 37
  2. Distinctive:

    Add Human-in-the-Loop gates for any high-stakes decisions.

    line 62
  3. Distinctive:

    Add Reflection layer when quality is critical.

    line 63
  4. Distinctive:

    Check anti-patterns list against current design

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agentic Patterns

Reference guide for proven agentic architecture patterns and common anti-patterns to avoid.

Core Patterns

PatternUse whenExampleTradeoffs
SequentialLinear workflow, clear dependencies, predictable stagesResearch → Analyze → Draft → ReviewSimple coordination; bottlenecks if any agent is slow
HierarchicalComplex task decomposable into subtasks; central coordinationPM agent delegates to designer / dev / QAClear accountability, scales; single point of failure at parent
CollaborativeDiverse perspectives matter; no clear leadMultiple reviewers collaborating on code reviewRich outputs; needs conflict resolution + consensus
AutonomousTasks are fully independent; parallel executionMultiple monitoring agents checking different servicesMax parallelism; no shared learning or coordination
Human-in-the-LoopHigh-stakes decisions, regulatory gates, human feedbackAgent drafts report; human approves before sendingAdds latency; ensures safety and quality
ReActDynamic environments; need adaptive behavior on feedbackDebug agent: try fix → observe tests → adaptFlexible; high token/latency cost for reasoning
Plan-ExecutePredictable environment; planning overhead justifiedMulti-step pipeline with known transformationsEfficient; brittle if environment changes
ReflectionQuality > speed; self-improvement valuableWriter drafts → critiques → refinesHigher quality; more tokens and latency

See refs/pattern-catalog.md for full descriptions and implementation notes per pattern.

Anti-Patterns Quick Reference

  1. God Agent: Single agent doing everything. Split responsibilities.
  2. Tight Coupling: Agents depend on internal implementation details. Use interfaces.
  3. Missing Guardrails: No constraints on agent actions. Add validation and limits.
  4. Deep Nesting: Agents calling agents calling agents. Flatten hierarchy.
  5. No Observability: Can't see what agents are doing. Add logging and tracing.
  6. Sequential Bottleneck: Everything waits for slowest agent. Add parallelism.
  7. Context Bloat: Passing entire history to every agent. Compress and filter.
  8. Redundant Agents: Multiple agents doing same thing. Consolidate.
  9. Hardcoded Prompts: Prompts baked into code. Externalize and version.
  10. Missing Timeouts: Agents can run forever. Add time and resource limits.

Pattern Selection Decision Tree

Is task decomposable into subtasks?
├─ YES: Is there a clear lead/coordinator role?
│   ├─ YES: Use Hierarchical
│   └─ NO: Use Collaborative
└─ NO: Does task require adaptation based on results?
    ├─ YES: Can you plan all steps upfront?
    │   ├─ YES: Use Plan-Execute
    │   └─ NO: Use ReAct
    └─ NO: Do you have multiple independent tasks?
        ├─ YES: Use Autonomous
        └─ NO: Use Sequential

Add Human-in-the-Loop gates for any high-stakes decisions. Add Reflection layer when quality is critical.

Combining Patterns

Patterns are composable:

  • Hierarchical + ReAct: Parent plans, children adapt execution
  • Sequential + Reflection: Each stage includes self-review
  • Collaborative + Human-in-Loop: Peer review with human arbitration
  • Autonomous + Hierarchical: Independent teams with team leads

Pattern Anti-Affinities

Avoid these combinations:

  • Plan-Execute + ReAct: Contradictory - either plan upfront or adapt dynamically
  • Autonomous + Tight Coordination: Defeats the purpose of autonomy
  • Deep Hierarchies + Reflection: Exponential token cost

Quick Start

  1. Identify if task is decomposable (subtasks?) or atomic
  2. Identify if execution is predictable (plan?) or dynamic (adapt?)
  3. Identify if agents should coordinate (hierarchy/collaboration) or work independently
  4. Check anti-patterns list against current design
  5. See refs/pattern-catalog.md for detailed examples

References

  • refs/pattern-catalog.md - Detailed pattern descriptions with implementation examples
  • refs/anti-patterns-design.md - Design anti-patterns (God Agent, Tight Coupling, Missing Guardrails, Deep Nesting, No Observability)
  • refs/anti-patterns-operational.md - Operational anti-patterns (Sequential Bottleneck, Context Bloat, Redundant Agents, Hardcoded Prompts, Missing Timeouts)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.