agentleFS
TrarothTraroth/claude-dev-framework/skills/architecture-drift-check/SKILL.md

architecture-drift-check

Skill1 starsChanged 7 months agoMITView on GitHub

Verify that the current implementation of a class still matches the design decisions documented in ARCHITECTURE.md and INVARIANTS.md.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user asks if the implementation still follows the design

    line 14
  2. Distinctive:

    When a new feature is added to an existing class

    line 15
  3. Distinctive:

    Read the following files in full:

    line 21
  4. Distinctive:

    If no drift is found in a category, skip it entirely.

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture Drift Check

When to run

  • After significant refactoring
  • Before a release
  • When the user asks if the implementation still follows the design
  • When a new feature is added to an existing class

Before running

Read the following files in full:

  1. .dev/design/ARCHITECTURE.md — design decisions and rationale
  2. .dev/design/INVARIANTS.md — structural invariants

Review checklist

Report only findings — skip items with no issues.

1. Data structure

  • The internal data structure matches the description in ARCHITECTURE.md
  • No new internal structures have been introduced without being documented
  • Complexity guarantees are still met

2. Invariants

  • All invariants documented in INVARIANTS.md still hold
  • Mutation methods restore invariants before returning
  • No new mutation method has been added without verifying invariant preservation

3. Thread safety

  • Locking strategy matches the documented design
  • No operation reads shared state without appropriate synchronization
  • No operation writes shared state without appropriate synchronization
  • Snapshot-based iterators still copy under read lock (if applicable)

4. Public API

  • Public API matches the documented design in ARCHITECTURE.md
  • No public method has been added or removed without updating ARCHITECTURE.md and BACKLOG.md

5. Design decisions

For each design decision documented in ARCHITECTURE.md, verify that the implementation still honours the stated rationale. Common drift patterns:

  • A method was added that bypasses a documented design constraint
  • An optimization was introduced that changes documented complexity guarantees
  • A workaround was added that contradicts a documented rejection rationale
  • A configuration option was added without updating the architecture document

6. Documentation consistency

  • ARCHITECTURE.md reflects the current implementation
  • INVARIANTS.md reflects the current invariants
  • Any design decision made during this session has been added to ARCHITECTURE.md

Output format

Report findings grouped by category. For each finding, state:

  • The class or method concerned
  • The drift detected (what the architecture says vs. what the code does)
  • The recommended action (update the code, or update the documentation)

If no drift is found in a category, skip it entirely.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.