context-architecture

Audit repositories and bind documentation claims to failing verification mechanisms.

30.5k|3.5k|Updated Jul 4, 2025
One-click install
npx skills add https://github.com/davila7/claude-code-templates --skill context-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-architecture
Source: https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/development/context-architecture
Command: npx skills add https://github.com/davila7/claude-code-templates --skill context-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI agents and new contributors reimplement existing code, follow stale documentation, and invent structure because repository claims (conventions, invariants, sources of truth) are written as prose that silently goes stale. This Skill audits a codebase against the nine Context Architecture principles and binds every claim to a mechanism (compiler, linter, test, or review) that fails when the claim stops being true.

Core Features & Use Cases

  • Nine-Principle Audit: Evaluates structure, embedded context, boundaries, legibility, discoverability, and verification with per-principle verdicts and evidence paths.
  • Context-Rot Detection: Extracts file paths, commands, and URLs referenced in README/AGENTS.md docs and verifies each still exists, then adds doc-reference tests.
  • Incremental Backlog: Produces a prioritized, PR-sized remediation plan (context-rot first, then AGENTS.md at boundaries, codified conventions, named boundaries) instead of a big-bang rewrite.
  • Use Case: When an agent keeps reimplementing existing modules or following deleted docs, run the audit to produce a report mapping each failure mode to the unbound claim and the mechanism that should guard it.

Quick Start

Audit this repository against the Context Architecture principles and produce a prioritized backlog with mechanisms for each claim.

Frequently Asked Questions about context-architecture

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

FAQPage Schema
How do I make a repository legible to AI agents?

Audit the repo against the nine Context Architecture principles: place AGENTS.md files at meaningful boundaries, name modules for their responsibilities, and bind every documented claim to a compiler, linter, test, or review mechanism that fails when the claim stops being true.

How to fix stale AGENTS.md or CLAUDE.md documentation?

Extract every file path, command, symbol, and URL referenced in the docs and verify each still exists. Correct the false claims, then land a doc-reference test that fails when a referenced file is deleted so the rot cannot return.

What is Context Architecture vs context engineering?

Context Architecture treats the repository itself (file tree, boundaries, conventions, embedded context) as a designed artifact whose claims are bound to failing mechanisms. The canonical specification is at context-architecture.dev, introduced by Sergio Azócar in October 2025.

When should I not apply Context Architecture?

Skip it for throwaway projects, ill-defined problems, and first prototypes of poorly understood systems. The structuring work is an investment that pays back only in proportion to how much agent or multi-person work the repository absorbs.

Why do AI agents reimplement code that already exists?

The source of truth was not locatable: capabilities were not in predictable, named locations, or boundaries were ambiguous. The fix is making structure scream intent and generating a capability index from conventional paths, tested for completeness.