skills/agentic-architect/SKILL.md
Five-layer architecture validation, agent topology analysis, orchestration pattern assessment, and framework detection for agentic systems. Use when: architecture review of an AI agent system, agent topology analysis, validating the five-layer model (cognition/context/interaction/runtime/ governance), assessing orchestration patterns, or as a parallel worker in a heavyweight wicked-garden-agentic review.
npx skillsauth add mikeparcewski/wicked-garden wicked-garden-agentic-architectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You validate and design agentic system architectures using the five-layer model and analyze agent topologies for soundness, scalability, and maintainability.
Before manual analysis, leverage available tools:
metadata={event_type, chain_id, source_agent, phase} to track architecture recommendations (see scripts/_event_schema.py).skills/agentic/frameworks/ knowledge skill)skills/agentic/agentic-patterns/ knowledge skill)Use the detection script to identify the framework in use:
sh "${CLAUDE_PLUGIN_ROOT}/scripts/_python.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/agentic/detect_framework.py" \
--path /path/to/codebase \
--threshold 0.6
Output includes:
Run the agent analyzer to map the agent landscape (it prints JSON to stdout;
redirect to a file — there is no --output flag):
sh "${CLAUDE_PLUGIN_ROOT}/scripts/_python.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/agentic/analyze_agents.py" \
--path /path/to/codebase > topology.json
Output includes:
Validate each layer systematically:
agent.yaml or adk.yaml for configuration@agent.tool decorator usageAgent(model=...) instantiationlanggraph.json configurationStateGraph constructioncompile() and checkpointingcrew.yaml configurationAgent and Task definitionsCrew compositionReview the topology output for:
Healthy Patterns:
Anti-Patterns:
Track architecture findings:
TaskUpdate( taskId="{task_id}", description="Append findings:
[architect] Architecture Analysis Complete
Framework: {detected_framework} v{version} (confidence: {score})
Five-Layer Status:
Topology Health: {GOOD/CONCERNS/CRITICAL}
Top Recommendations:
Next Steps: {action needed}" )
## Architecture Review: {Project Name}
**Review Date**: {date}
**Framework**: {framework} v{version} (confidence: {score})
**Codebase Path**: {path}
### Executive Summary
{2-3 sentence summary of architecture health and top concerns}
### Framework Detection
| Framework | Confidence | Version | Evidence |
|-----------|------------|---------|----------|
| {name} | {score}% | {version} | {evidence count} signals |
**Evidence Breakdown**:
- Imports: {list key imports}
- Config files: {list config files}
- Patterns: {count} framework-specific patterns detected
### Five-Layer Architecture Assessment
#### Layer 1: Agent Layer - {PASS/FAIL}
**Status**: {summary}
**Findings**:
- Agent count: {count}
- Role clarity: {GOOD/NEEDS_IMPROVEMENT}
- Responsibility overlap: {detected overlaps}
**Issues**:
- {issue with location and severity}
**Recommendations**:
- {recommendation}
#### Layer 2: Orchestration Layer - {PASS/FAIL}
**Status**: {summary}
**Pattern**: {sequential/parallel/dynamic/hybrid}
**Findings**:
- Orchestration strategy: {clear/unclear}
- Handoff protocols: {explicit/implicit}
- Error handling: {comprehensive/partial/missing}
**Issues**:
- {issue with location and severity}
**Recommendations**:
- {recommendation}
#### Layer 3: Memory Layer - {PASS/FAIL}
**Status**: {summary}
**Findings**:
- Memory strategy: {in-memory/database/hybrid}
- Context management: {good/needs improvement}
- Persistence: {transient/durable}
**Issues**:
- {issue with location and severity}
**Recommendations**:
- {recommendation}
#### Layer 4: Tool Layer - {PASS/FAIL}
**Status**: {summary}
**Findings**:
- Tool count: {count}
- Tool interfaces: {well-defined/inconsistent}
- Error handling: {robust/fragile}
**Issues**:
- {issue with location and severity}
**Recommendations**:
- {recommendation}
#### Layer 5: Safety Layer - {PASS/FAIL}
**Status**: {summary}
**Findings**:
- Guardrails: {present/missing}
- Validation: {input/output/both/none}
- Human-in-the-loop: {implemented/missing}
**Issues**:
- {issue with location and severity}
**Recommendations**:
- {recommendation} (defer to the safety-reviewer skill for details)
### Agent Topology Analysis
**Topology Health**: {GOOD/CONCERNS/CRITICAL}
**Metrics**:
- Total agents: {count}
- Max depth: {levels}
- Circular dependencies: {count}
- Orphaned agents: {count}
- Average fanout: {ratio}
**Agent Dependency Graph**:
```mermaid
graph TB
Orchestrator --> AgentA
Orchestrator --> AgentB
AgentB --> AgentC
AgentB --> AgentD
Issues Detected:
Recommendations:
Pattern: {identified pattern}
Alignment: {GOOD/PARTIAL/POOR}
Framework Best Practices:
Recommendations:
Implicit Decisions Detected:
Recommendations:
{If framework upgrade or migration is beneficial}
From: {current state} To: {recommended state} Effort: {LOW/MEDIUM/HIGH} Benefit: {description}
Defer to:
skills/agentic/frameworks/): For latest framework features and migration pathsskills/agentic/agentic-patterns/): For code-level pattern improvementsCollaborate with:
## Integration with agentic Knowledge Modules
- Use `skills/agentic/agentic-patterns/` for layer-specific guidance (five-layer model is included) and pattern recognition
- Use `skills/agentic/frameworks/` for framework-specific best practices
## Integration with Peer Skills
### Safety Reviewer (wicked-garden-agentic-safety-reviewer)
- Provide Layer 5 findings for detailed review
- Coordinate on guardrail placement and validation strategy
### Performance Analyst (wicked-garden-agentic-performance-analyst)
- Share orchestration pattern analysis
- Identify architecture-level performance bottlenecks
### Frameworks knowledge module (skills/agentic/frameworks/)
- Cross-check current framework detection results against curated profiles
- Consult for guidance on migration paths
### Agentic-patterns knowledge module (skills/agentic/agentic-patterns/)
- Check topology analysis against the pattern catalog for pattern-level improvements
- Source refactoring recommendations from the catalog
## Common Architecture Smells
| Smell | Indicator | Fix |
|-------|-----------|-----|
| God Agent | One agent handles many responsibilities | Split into specialized agents |
| Circular Deps | A → B → A pattern | Introduce mediator or event bus |
| Deep Nesting | Call chains > 4 levels deep | Flatten hierarchy, use pub/sub |
| Orphaned Agent | Agent defined but never used | Remove or document intent |
| Unclear Orchestration | No clear coordinator | Introduce explicit orchestrator |
| Missing Safety | No validation layer | Add Layer 5 guardrails |
| Context Leakage | Agents share mutable state | Use immutable context passing |
## Quick Reference: Detection Scripts
Verified flags: `detect_framework.py [--path --quick --threshold]`;
`analyze_agents.py [--path --framework]` (prints JSON to stdout — redirect it).
```bash
# Detect framework
sh "${CLAUDE_PLUGIN_ROOT}/scripts/_python.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/agentic/detect_framework.py" \
--path . --threshold 0.6
# Analyze agent topology (stdout → file)
sh "${CLAUDE_PLUGIN_ROOT}/scripts/_python.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/agentic/analyze_agents.py" \
--path . > topology.json
For the architecture diagram, draw the mermaid graph yourself from the
dependency graph in topology.json (see Output Format above) — the analyzer
has no diagram/format flag.
development
Pattern-conformance agent-half: evaluates a produced artifact or diff against a set of architectural/design pattern rules from the conformance-rule store (wicked_governance schema). Returns structured findings with rule ID, severity, and rationale — the deterministic half (mechanical rule recall) is done by the guard pipeline; this is the semantic evaluation step. Triggered by: the guard_pipeline `outgov_pattern` check (session-close), or explicitly by an engineering review when WICKED_OUTGOV_RULES_DIR is populated. NOT a replacement for the full `engineering` review skill — focuses only on conformance to stored Pattern rules; architecture and code-quality checks live in the `engineering` skill. Semantic evaluation reuses `wicked-garden-qe-semantic-reviewer` as the designated agent-half evaluator (per garden#983 spec). This skill is the orchestrating wrapper that loads applicable Pattern rules and delegates the per-rule semantic judgment to qe-semantic-reviewer.
tools
The FOUNDATIONAL domain-model capability: extract a codebase's domain — testable business rules (with confidence + provenance), entities, requirements — as a schema-conformant model on the estate graph. The workers annotate the store; wicked-core reads it and builds the requirements graph, coverage-gating fail-closed. Steers three fork workers. A shared substrate, not a modernization tool. The `modernize` archetype DERIVES from it; build / migrate / review / specify / explore consume the SAME domain model — none OWN it. Understanding a codebase's domain is upstream of almost everything else garden does. Use when: "extract the business rules / domain model from this codebase", "build a requirements graph from the code", "what does this system actually require", "reverse-engineer the domain before we build/port/migrate". Works on ANY codebase (modern or legacy) — the value is the domain model, not the porting. NOT the code transform itself (that is the archetype consuming this model). This skill produces the DOMAIN MODEL, not new code.
development
Domain-graph fork worker for the modernize archetype. Groups the estate's Louvain communities into business domains, attaches each requirement to its cluster (advisory cluster_id provenance), and invokes wicked-core's domain-graph build (which reads the annotated estate store, recomputes coverage fail-closed, and builds the requirements graph) — then validates core's output against the vendored schema. Use when: dispatched by wicked-garden-domain after rule extraction to turn a flat rule set into cluster-keyed domains; "group these into domains", "build the requirements graph", "translate clusters into a domain model". NOT for mining the rules themselves (that is domain-extractor) or threat-modeling (that is domain-coverage).
tools
Rule-extraction fork worker for the FOUNDATIONAL domain-model capability. Mines testable business rules from a codebase — each with a numeric confidence and a provenance{source, ref, source_kinds} — and annotates them into the estate store so wicked-core can build the domain-model requirements graph (coverage-gated). This is a substrate, not a modernization tool: the `modernize` archetype DERIVES from it, and build / migrate / review / specify / explore can consume the same domain model — none OWN it. Use when: dispatched by wicked-garden-domain to mine the business_rules of a codebase (or a module); "extract the domain rules", "what does this system require", building the requirements half of a domain model. NOT for grouping into domains (that is domain-modeler) or judging coverage (that is domain-coverage — a seat-distinct evaluator).