Help us improve
Share bugs, ideas, or general feedback.
From afc
Analyzes codebase architecture, traces dependencies, verifies module boundaries, and generates design reviews with dependency maps, findings, and ADRs without modifying code.
npx claudepluginhub jhlee0409/all-for-claudecode --plugin afcHow this skill is triggered — by the user, by Claude, or both
Slash command
/afc:architectsonnetThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Analyzes the codebase architecture and records design decisions.
Sweeps codebase architecture periodically by reading ADRs, mapping module/dependency graphs, surfacing 5-10 smells with severity, and generating refactor proposals for /refactor. Triggered by '/architecture-review'.
Advises on architectural decisions by asking questions, surfacing trade-offs, and presenting options without executing. Use when designing features, choosing approaches, or refactoring.
Assesses architecture decisions for ADR compliance, analyzes coupling and cohesion, and evaluates design principles like layering and evolution. Use for refactoring reviews, system changes, and new modules.
Share bugs, ideas, or general feedback.
Analyzes the codebase architecture and records design decisions. Ensures design quality through convergence-based Critic Loop. Does not modify source code. May write ADR files to
.claude/afc/memory/decisions/.
$ARGUMENTS — (required) analysis target or design question (e.g., "review state management strategy", "where to add new entity")Read .claude/afc.config.md if CI commands are needed.
Architecture, Code Style, and Project Context are auto-loaded via .claude/rules/afc-project.md.
If neither rules file nor config exists: read CLAUDE.md for architecture info. Assume "Layered Architecture" if no source has it.
Analyze $ARGUMENTS to identify the task type:
| Type | Example | Output |
|---|---|---|
| Structure Analysis | "timeline module structure" | Dependency map + improvement suggestions |
| Design Question | "where to put new feature?" | Placement suggestion + rationale |
| ADR Recording | "Redis vs In-memory decision" | Architecture Decision Record |
| Refactoring Evaluation | "need to split store?" | Current issues + refactoring plan |
Use Agent Teams for wide analysis scope (3+ modules) with parallel exploration:
Task("analyze features/timeline", subagent_type: "Explore")
Task("analyze widgets/timeline", subagent_type: "Explore")
Cross-Module Import Chain Verification (after Explore agents return):
When parallel Explore agents are used, the orchestrator must verify cross-module boundaries that no single agent can see:
Do not trust agent-summarized import relationships for cross-boundary chains — re-read the boundary files directly.
Structure analysis results and print to console:
## Architecture Analysis: {topic}
### Current Structure
{dependency map, module relationships, data flow}
### Findings
| # | Area | Current | Suggested | Impact |
|---|------|---------|-----------|--------|
| 1 | {area} | {current approach} | {suggestion} | H/M/L |
### Design Decision (ADR)
**Decision**: {chosen approach}
**Status**: Proposed / Accepted / Deprecated
**Context**: {background}
**Options**:
1. {option1} — Pros: / Cons:
2. {option2} — Pros: / Cons:
**Rationale**: {why this choice}
**Consequences**: {expected impact}
### Architecture Consistency
{config.architecture} rule violations, import direction validation
Read ${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md and follow it. Safety cap: 5 passes.
| Criterion | Validation |
|---|---|
| FEASIBILITY | Is the suggestion achievable in the current codebase? |
| INCREMENTALITY | Can it be applied incrementally? (avoid big-bang refactoring) |
| COMPATIBILITY | Is it compatible with existing code? Are there breaking changes? |
| ARCHITECTURE | Does it comply with {config.architecture} rules? |
If ADR type, save to .claude/afc/memory/decisions/{YYYY-MM-DD}-{topic}.md:
# ADR: {title}
- **Date**: {YYYY-MM-DD}
- **Status**: Proposed
- **Context**: {background}
- **Decision**: {choice}
- **Rationale**: {reason}
- **Consequences**: {impact}
Architecture analysis complete
├─ Type: {structure analysis | design question | ADR | refactoring evaluation}
├─ Findings: {count}
├─ Critic: converged ({N} passes, {M} fixes, {E} escalations)
├─ ADR: {saved | n/a}
└─ Suggestion: {key suggestion in one line}
.claude/afc/memory/decisions/.