agentleFS
tanbopptanbopp/ai-development-framework/.agents/skills/architecture-guard/SKILL.md

architecture-guard

Skill1 starsChanged 19 days agoMITView on GitHub

Verifies during Phase 7 audit that actual repository directory structure, dependencies, and module imports conform to docs/project/ARCHITECTURE.md, flagging Architectural Drift and requiring refactoring.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read docs/project/ARCHITECTURE.md and docs/specs/*.md to load the approved directory layout, architectural boundaries, layer rules, and …

    line 14
  2. Distinctive:

    If any Architectural Drift is detected:

    line 20

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 Guard

Trigger

Mandatory during Phase 7 (Audit), prior to meta-judge sign-off and Phase 8 delivery.

Process

  1. Read docs/project/ARCHITECTURE.md and docs/specs/*.md to load the approved directory layout, architectural boundaries, layer rules, and allowed dependency graph.
  2. Inspect the actual codebase structure and cross-module imports (import, require, package references) across implemented files.
  3. Detect Architectural Drift, including:
    • Layer boundary violations (for example, a UI component importing directly from the database or ORM layer instead of going through approved service/API boundaries).
    • Unapproved folders, orphaned modules, or circular dependencies between bounded contexts not defined in ARCHITECTURE.md.
    • Unauthorized third-party dependencies not recorded in docs/project/STACK.md or docs/project/DECISIONS.md.
  4. If any Architectural Drift is detected:
    • Flag each violation with exact file:line and the violated architectural rule.
    • Classify code boundary violations under Axis 1: Agent Fix List (and any structural spec conflicts under Axis 2: Human Decision List if spec intent is unclear), blocking Phase 8 delivery until refactored cleanly.

Output Contract

An architectural compliance verdict confirming zero Architectural Drift against docs/project/ARCHITECTURE.md, or a file-level refactor list blocking Phase 8.

Checklist

  • Actual directory layout matches docs/project/ARCHITECTURE.md
  • Module imports obey layer boundaries (no UI-to-database shortcuts or forbidden cross-layer coupling)
  • Zero unapproved packages or unrequested structural deviations
  • Any Architectural Drift blocks Phase 8 until refactored

Prohibitions

  • Approving Phase 7 when UI or presentation layers bypass API/service boundaries into persistence internals.
  • Silently modifying ARCHITECTURE.md to match accidental implementation drift without ADR review.

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.