AI Context Repository Skill
Purpose
Help the ai-context-writer subagent generate and maintain {context_docs_dir}/AI_CONTEXT_REPOSITORY.md (default: docs/AI_CONTEXT/AI_CONTEXT_REPOSITORY.md) as the single source of truth for:
- •Overall architecture
- •Directory and component layout
- •Data flow between components
- •High-level extension points
Other AI context documents (patterns, component-specific docs) should link back here for structure.
Sources to Read
Before updating the repository document, read (as appropriate):
- •
@README.md— project purpose and high-level goals - •Project layout — discover components from repo structure (e.g. top-level packages or directories; do not assume fixed names like
python_serviceorwebview-ui) - •
@tests/or project test layout — where tests live - •
@.cursor/rules/environment.mdc— structure and tooling expectations - •Existing
@{context_docs_dir}/AI_CONTEXT_REPOSITORY.md(if present)
Required Sections
At minimum, ensure the file contains:
- •Metadata — Version, Last Updated (ISO date), Tags (e.g.
architecture,repository), Cross-References to quick reference, patterns, and component-specific AI context docs - •High-Level Overview — Goal of the system in 1–2 paragraphs; summary of main components (discovered from layout)
- •Directory Structure — Annotated tree of important directories (source, tests, docs,
.cursor, feature/bug dirs per conventions) - •Component Responsibilities — For each major component discovered: what it does, key modules, main responsibilities
- •Data Flow — End-to-end flow where relevant; at least one mermaid diagram for the main happy path
- •Service/Module Boundaries & Dependencies — Boundaries between components; key external libraries per component
- •Entry Points & Extension Hooks — How to run the system; where to plug in new behavior (as appropriate to the project)
Style & Constraints
- •Keep the document architectural, not tutorial-style
- •Use semantic headings and short paragraphs
- •Prefer diagrams and structured lists over long prose
- •Avoid management or roadmap content; focus on how the system is structured today
- •Keep under the content length limit; if it grows, split into sub-documents per
content_lengthrules and provide an index
Update Strategy
When the project structure or flow changes: update the directory tree; adjust component responsibilities and data flow; refresh diagrams; bump version/last-updated metadata; ensure cross-references to component docs remain valid.