Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By krus210
Validate and document microservice architecture against a YAML spec (SERVICE_MAP.yaml) — auto-discover endpoints from Go code, generate Mermaid diagrams, audit for inconsistencies, and enforce architecture rules before implementation.
npx claudepluginhub krus210/archspec --plugin archspecAudit a monorepo of SERVICE_MAP.yaml files against each other and (optionally) a top-level architecture spec. Reports graph mismatches, orphan events, TODO leaks, write_path/events inconsistencies. Read-only.
Bootstrap a service for archspec — auto-discover endpoints/dependencies/storage/topics from Go code, ask the user for SLA/idempotency/timeout fields, then create SERVICE_MAP.yaml, ARCHITECTURE.md, ADR dir, install pre-commit hook, append archspec block to CLAUDE.md.
Read SERVICE_MAP.yaml, draw a chat-only Mermaid for a proposed change, and propose YAML edits before writing code.
Regenerate Mermaid diagrams and ARCHITECTURE.md from docs/SERVICE_MAP.yaml.
Run the AI audit of code vs SERVICE_MAP.yaml. Produces a markdown report of BLOCK/WARN/INFO findings. Read-only.
Use before non-trivial feature or bugfix work — phrases like "let's add X", "investigate Y", "understand how Z works", or when the user runs /archspec:investigate. Read-only: consults SERVICE_MAP.yaml, asks clarifying questions about ambiguous requirements, then proposes a change plan + chat-only Mermaid.
Use when the user edits SERVICE_MAP.yaml, asks to "regenerate diagrams", "update mermaid", "service map drift", or runs /archspec:sync. Regenerates docs/diagrams/*.mmd and the managed region of docs/ARCHITECTURE.md.
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Comprehensive C4 architecture documentation workflow with bottom-up code analysis, component synthesis, container mapping, and context diagram generation
Enterprise Architecture Governance & Vendor Procurement Toolkit - 67 slash commands for generating architecture artifacts
Generate architecture diagrams and technical design documents
코드 리뷰, API 설계, 테스트 생성 등 개발 관련 스킬 모음
Analyzes a codebase and generates animated HTML architecture reports — diagrams, data flows, component directories, metrics, and insights.
Editorial "Architecture & Design" bundle for Claude Code from Antigravity Awesome Skills.
Spec-driven architecture validation for microservices.
archspec captures a microservice's architecture as a versioned, machine-readable
contract (SERVICE_MAP.yaml), generates Mermaid diagrams and ARCHITECTURE.md
deterministically from it, and validates code changes against it on two layers:
/archspec:validate (idempotency, race conditions, eventual consistency) ┌─────────────────────────┐
│ docs/SERVICE_MAP.yaml │ ← single source of truth
└────────────┬────────────┘
│
┌────────────────────────┼────────────────────────┐
▼ ▼ ▼
/archspec:sync pre-commit hook /archspec:validate
(Mermaid + ARCH.md) (DET-001..015) (AI-001..010)
| Pain | archspec answer |
|---|---|
ARCHITECTURE.md rots — written by hand, updated by goodwill | Generated from YAML; CI fails on drift |
| C4 diagrams in Lucidchart aren't version-controlled | Mermaid in repo, deterministic |
| Invariants like "endpoint must be idempotent" live in tribal knowledge | Encoded in SERVICE_MAP.yaml; AI rules check the code |
| Reviewers can't mechanically check contracts | Pre-commit + /archspec:validate reports |
| New contributors need weeks to understand the bounded context | Read one YAML, get diagrams + invariants |
/plugin marketplace add krus210/archspec
/plugin install archspec@archspec
After installation, run /reload-plugins (or restart Claude Code) so commands and skills become available.
git clone https://github.com/krus210/archspec
ln -s "$PWD/archspec/skills/architecture-sync" ~/.claude/skills/
ln -s "$PWD/archspec/skills/architecture-investigate" ~/.claude/skills/
cd path/to/your-service
/archspec:init
This creates docs/SERVICE_MAP.yaml, generates initial diagrams + ARCHITECTURE.md,
installs the pre-commit hook, and appends the archspec block to CLAUDE.md.
archspec is intentionally small: each command/skill has a concrete artifact at the end, and those artifacts stay in the repo.
| Flow | Output |
|---|---|
/archspec:init / architecture-sync bootstrap | docs/SERVICE_MAP.yaml, docs/diagrams/{context,container,sequence}.mmd, generated docs/ARCHITECTURE.md, .servicemap/schema.json, docs/adr/, installed git hooks, and the archspec block in CLAUDE.md |
/archspec:sync / architecture-sync | Regenerated Mermaid diagrams and the managed region of docs/ARCHITECTURE.md |
/archspec:investigate / architecture-investigate | Read-only contract summary, clarification questions, an optional cross-check against a reference/golden spec, chat-only Mermaid for the proposed change, a YAML diff to apply before coding — including an edge_cases[] risk register that turns every finding into a DET-003-enforced test path — and a definition-of-done + validation loop to run after implementation |
/archspec:validate | Markdown report grouped by BLOCK / WARN / INFO / SUPPRESSED, with file references and fix hints |
/archspec:check-architecture | Monorepo-wide architecture audit across all SERVICE_MAP.yaml files |
The generated diagrams are plain Mermaid, so a fresh /archspec:init produces
reviewable text artifacts rather than screenshots. Example output from a
task-service init is checked in under
examples/task-service-init-output/docs/diagrams.
Context diagram:
flowchart LR
subgraph this["task-service"]
svc[task-service]
end
upstream_api-gateway[api-gateway] --> svc
svc -.-> storage_task-store[("in-memory: task-store")]
svc ==>|publish| topic_task-created>task.created]
Container diagram:
flowchart LR
subgraph svc_box["task-service"]
svc[task-service]
end
up_api-gateway[api-gateway] -->|CreateTask, GetTask, ListTasks| svc
svc -.-> store_task-store[("in-memory: task-store")]
svc ==>|publish v1| pub_task-created>task.created]
Sequence diagram: