sync-architecture

Detect architecture drift and update the Mermaid diagram in docs/ai/architecture.md.

25|4|Updated Sep 5, 2010
One-click install
npx skills add https://github.com/divad12/dotfiles --skill sync-architecture-divad12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-architecture
Source: https://github.com/divad12/dotfiles/tree/main/.claude/skills/sync-architecture
Command: npx skills add https://github.com/divad12/dotfiles --skill sync-architecture-divad12

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Update docs/ai/architecture.md when the codebase has drifted. Detects structural changes (new/deleted/renamed modules) under the paths the diagram covers and updates the mermaid block directly - no approval gate. Use when the user says 'sync architecture', 'update the architecture diagram', 'check the arch diagram', 'refresh architecture', 'audit the diagram'. Also auto-invoked by /save and /deep-review when drift is detected. Also use after adding, removing, or renaming a top-level component (new API route module, new shared-function module, schema restructure).

Core Features & Use Cases

  • Detect architecture drift and apply the fix directly to docs/ai/architecture.md. No approval prompt - just edit the file and leave it unstaged so the user sees the diff in git status before the next commit.
  • The diagram must contain a This diagram covers section listing the paths it represents. Without that, the skill can't scope the check.
  • The steps outline how to identify changes and apply updates to the mermaid diagram and the coverage list.

Quick Start

Run the sync-architecture skill to update docs/ai/architecture.md whenever the codebase drifts.

Frequently Asked Questions about sync-architecture

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

FAQPage Schema
How do I keep architecture diagrams in sync with my codebase?

To keep architecture diagrams in sync, this skill detects structural drift from top-level module changes and directly updates the Mermaid diagram in docs/ai/architecture.md without requiring manual edits.

When should I update my Mermaid architecture diagram?

You should update your Mermaid architecture diagram after adding, removing, or renaming top-level components like API route modules or shared functions, or simply run the skill when structural drift is detected.

How do I detect architecture drift in my documentation?

Architecture drift is detected by comparing top-level module changes against the paths listed in the diagram's coverage section, automatically applying edits to the Mermaid block and coverage list.

Does the architecture sync skill require approval before editing files?

No, the architecture sync skill requires no approval gate; it directly edits the Mermaid diagram and leaves the file unstaged so you can review the diff in git status before committing.

What does the architecture diagram need to include for automatic updates to work?

The architecture diagram needs to include a 'This diagram covers' section listing the paths it represents, which allows the skill to scope the drift check and apply updates accurately.

Can I auto-run architecture documentation updates on save?

Yes, you can auto-run architecture documentation updates on save and during deep-reviews, or invoke the skill manually using commands like 'sync architecture' or 'refresh architecture'.