"Compile a human-oriented ARCHITECTURE.md into a compact, machine-readable CODEBASE.yml that preserves architectural constraints, boundaries, relationships, generation guidance, and validation commands."
Install
npx skillscat add githubnext/gh-aw-cao/codebase-model Install via the SkillsCat registry.
SKILL.md
Codebase Model
Create or refresh the experimental CODEBASE.yml Codebase Model from an existingARCHITECTURE.md. Codebase Model is an open, machine-readable model of what a
codebase is: its architecture, constraints, relationships, and operational
context. It is not another agent-instruction format.
ARCHITECTURE.md remains the human-oriented source for v0.1. AGENTS.md,CLAUDE.md, and vendor-specific instructions are future output targets, not the
canonical model.
Procedure
- Read
ARCHITECTURE.md, relevant repository structure, existingCODEBASE.yml, and any normative specifications it names. - Extract architectural concepts into
spec: cbm/v0.1with the applicable
categories:project,structure,architecture,components,dependencies,boundaries,invariants,flows,generation,commands, andvalidation. - Preserve dependency direction, prohibited relationships, source-of-truth
locations, generated-artifact rules, operational flows, validation commands,
and implementation-affecting decisions. When uncertain whether material is a
constraint, preserve it. - Compress history, motivation, diagrams, repeated examples, conversational
prose, README duplication, and leaf-file inventories. Do not remove a
constraint merely because it is verbose. - Use meaningful directories and components rather than indexing every file.
Do not invent architecture, paths, commands, relationships, or constraints
unsupported by the repository. - Encode allowed and prohibited dependencies explicitly. Use
invariantsfor
mandatory rules and execution-location constraints, not punctuation intended
to influence model behavior. - Include
provenancestating that the model is experimental and naming its
source. Document intentionally compressed material. - Include a
benchmarkhypothesis comparing no architecture context, fullARCHITECTURE.md, andCODEBASE.yml. Measure task completion, architectural
and dependency violations, incorrect placement, test failures, token usage,
tool calls, and time. Treat the result as a hypothesis, not an adoption or
model-obedience claim. - Validate that YAML parses, required applicable categories are present,
command references resolve, declared paths exist or are clearly templates,
and relationships reference known concepts. Compare the model's size withARCHITECTURE.md, favoring semantic fidelity over minimum size.
Required Constraints
- Keep
CODEBASE.ymlat the repository root unless existing architecture
requires another location. - Preserve
ARCHITECTURE.md; never overwrite it from the model. - Keep the model canonical and vendor-neutral. Do not make
AGENTS.mdits
specification or claim universal agent compatibility before adapters exist. - Do not build a full static architecture analyzer, universal understanding
system, new language, or campaign-management system for v0.1. - Do not claim that special punctuation improves AI compliance without evidence.