AI Context Repository Skill
Purpose
Help the ai-context-writer subagent generate and maintain docs/AI_CONTEXT/AI_CONTEXT_REPOSITORY.md as the single source of truth for:
- •Overall architecture
- •Directory and component layout
- •Data flow between services
- •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 - •
@python_service/— parser, models, server entry point - •
@src/— extension host, commands, integration logic - •
@webview-ui/— React + Rete webview implementation - •
@tests/— to see where tests live - •
@.cursor/rules/environment.mdc— structure and tooling expectations - •Existing
@docs/AI_CONTEXT/AI_CONTEXT_REPOSITORY.md(if present)
Required Sections in AI_CONTEXT_REPOSITORY.md
At minimum, ensure the file contains:
- •
Metadata
- •Version
- •Last Updated (ISO date)
- •Tags (include
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 the sidecar architecture (Python service, extension host, webview UI)
- •
Directory Structure
- •An annotated tree of the most important directories:
- •
python_service/ - •
src/ - •
webview-ui/ - •
tests/ - •
.cursor/ - •
_features/(and others if relevant)
- •
- •An annotated tree of the most important directories:
- •
Component Responsibilities
- •Subsections for each major component:
- •Python service
- •Extension host
- •Webview UI
- •For each: what it does, key modules, and main responsibilities.
- •Subsections for each major component:
- •
Data Flow
- •End-to-end flow from VS Code editor → extension → Python service → webview → back to editor.
- •Auto-refresh flow on save.
- •Error and retry flow.
- •At least one mermaid diagram illustrating the main happy path.
- •
Service Boundaries & Dependencies
- •Clarify the boundaries between:
- •Python process
- •Node/extension host
- •Webview/browser runtime
- •List key external libraries and frameworks per component.
- •Clarify the boundaries between:
- •
Entry Points & Extension Hooks
- •Python service entry (
python_service.__main__,ASTParseServer). - •Extension activation (
extension.ts, command registration). - •Webview bootstrap (
webview-ui/src/index.tsxandApp.tsx). - •Guidance on where to plug in:
- •New AST node visitors
- •New webview messages
- •New VS Code commands
- •Python service entry (
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 purely on how the system is structured today.
- •Keep under the content length limit; if it grows too large:
- •Split into sub-documents (e.g.
AI_CONTEXT_REPOSITORY/) percontent_lengthrules. - •Provide an index with links and one-line descriptions.
- •Split into sub-documents (e.g.
Update Strategy
When the project structure or flow changes:
- •Update the directory tree to match the real repository.
- •Adjust component responsibilities and data flow descriptions.
- •Refresh diagrams to reflect new paths or services.
- •Bump version/last-updated metadata.
- •Ensure cross-references to component-specific docs remain valid.