architecture

Creates and converges a root DESIGN.md documenting boundaries, invariants, flows, and decisions.

5|1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/ai-hero/hero-skills --skill architecture-ai-hero
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture
Source: https://github.com/ai-hero/hero-skills/tree/main/skills/architecture
Command: npx skills add https://github.com/ai-hero/hero-skills --skill architecture-ai-hero

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate architectural knowledge that the code itself cannot express: dependency direction, cross-cutting invariants, user flows, and the reasoning behind irreversible decisions. This Skill maintains a single root DESIGN.md holding exactly that information, keeping it converged with the codebase as it evolves. ## Core Features & Use Cases - Sync mode: Bootstraps a new DESIGN.md from a top-down investigation of entry points, manifests, and module roots, or updates an existing one by diffing against its recorded source commit and reporting stale, uncovered, obsolete, or defective sections. - Review mode: Reports drift between DESIGN.md and the code without writing anything, including detecting a missing file as a finding. - Hard Rule enforcement: Rejects content that restates what reading the code answers (route tables, schemas, signatures), keeping only boundaries, invariants, users, flows, and dated append-only decisions. - Use Case: As a stage of the wayfare workflow, run review to check whether DESIGN.md has drifted from the current HEAD, then run sync to converge confirmed findings and re-anchor the source reference. ## Quick Start Ask the AI to run the architecture skill in review mode to check whether the repository's DESIGN.md has drifted from the current code.

Frequently Asked Questions about architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create architecture documentation for an existing codebase?

Run the sync verb with no DESIGN.md present to bootstrap one. The skill investigates entry points, manifests, and module roots top-down, proposes an outline of layers, boundaries, and invariants, and writes the file only after your confirmation.

How do I detect drift between architecture docs and code?

Run the review verb, which diffs the file's recorded source commit against HEAD and reports stale, uncovered, obsolete, or defective sections in a findings table. Review writes nothing; run sync afterward to apply confirmed fixes.

What should a DESIGN.md file contain?

It holds only what code cannot answer: overview, tech stack rationale, codemap of layers, dependency boundaries, cross-cutting invariants, users, flows, interaction standards, and dated append-only decisions. Route tables, schemas, and signatures are explicitly forbidden.

Can I migrate an existing ARCHITECTURE.md to DESIGN.md?

Yes. When sync detects a legacy ARCHITECTURE.md, it proposes a git mv rename, retitles the H1, and preserves the Decisions section byte-for-byte before running a normal update pass. It never bootstraps a second file over the old one.

Why does sync refuse to write DESIGN.md in some repos?

Sync stops when no git commit exists to anchor the Source ref, when git fails for reasons other than a missing repo, or when DESIGN.md exists but is unreadable. These guards prevent writing an unanchored file or overwriting content at a wrong path.