# Architecture ## Overview The repository separates human guidance, machine-readable contracts, reusable AI behavior, deterministic validation, and examples. ```text README.md + AGENTS.md | v repository-variables.json ---> schemas/repository-variables.schema.json | v repository.json -------------> schemas/repository.schema.json | +----> content-index.json ---> schemas/content-index.schema.json | | | +----> individual authoritative documents | v skills/structure-ai-ready-repository/ | +----> references/repository-structure-standard.md +----> assets/repository-structure-plan-template.md +----> scripts/audit_repository.py | v target repository changes | v scripts/validate_repository.py + tests/ ``` ## Components ### Entry points `README.md` is the human entry point. `AUTHOR.md` is the canonical attribution record. `repository-variables.json` stores verified stable inputs for future repository-structure work. `AGENTS.md` is the AI operating entry point. `repository.json` provides authoritative structured metadata and retrieval order. For content-heavy repositories, `content-index.json` provides the file-level discovery layer between the repository manifest and the complete authoritative documents. ### Standard The detailed standard lives with the skill at `skills/structure-ai-ready-repository/references/repository-structure-standard.md`. The root README summarizes how to use it. ### Skill The skill inspects a target repository, selects a profile, creates a reviewable plan by default, applies only approved actions, and validates the result. ### Templates and examples Templates provide reusable starting artifacts with explicit placeholders. Examples are synthetic completed artifacts that demonstrate expected shape without carrying private or organization-specific data. ### Content indexing `repository.json` stays small by describing major collections. `content-index.json` contains one compact record per individual document. The Markdown files remain authoritative and do not require chunk IDs, knowledge IDs, or semantic QA artifacts merely because they are indexed. ### Validation The root validator checks this implemented template. The skill audit checks required structure for a selected profile in any target repository. Unit tests protect validator behavior and repository consistency. ## Boundaries - The standard defines recommended repository shape, not hosting-platform state. - The skill may edit repository files only within user authorization and platform permissions. - The validator is read-only. - `UPDATES.md` records possible future work but does not authorize changes. - `CHANGELOG.md` records completed, versioned changes. ## Design Decisions - Use one stateful skill instead of separate planning and implementation skills. - Keep detailed guidance in a skill reference to reduce default context usage. - Require explicit approval by default before structural changes. - Allow a user to explicitly authorize immediate implementation. - Prefer verified nulls or visible placeholders over invented metadata. - Use deterministic scripts for structural validation. - Use a separate content index only when individual-document volume would make the repository manifest cumbersome.