Hierarchical Context Maps — Distributed Architecture Context
Distributes architectural knowledge across the repository by placing a
PIPELINE-CONTEXT.mdin each significant subdirectory. Agents operating within a directory acquire scope-relevant context automatically, conserving tokens and improving reasoning focus.
Protocol Execution
2. CONTEXT GENERATION
For each significant directory, create a PIPELINE-CONTEXT.md adhering to LLM-readability standards (Scribius format):
- H1-First & Summary: Begin with an H1 header (
# Directory Name) followed immediately by a blockquote summary (>). - Cache-Stable Ordering: Place static context (purpose, constraints) before volatile elements.
- XML-Anchored Content: Wrap structured information in semantic XML envelopes:
<directory_purpose>: A concise summary of what the directory does.<architectural_constraints>: Specific rules (e.g., "no database access in components").<key_exports>: Bulleted list of primary modules and their responsibilities.<pipeline_relationship>: How the directory interacts with the broader system.
- Voice & Tone: Third-person impersonal voice, positive scoping, and unambiguous noun anchors (never "this" or "it" without a preceding noun). Preambles omitted.
3. ROOT CONTEXT INJECTION
- Generate a root-level
PIPELINE-CONTEXT.mdthat serves as the entry point, detailing the overall system architecture and linking to subdirectory context maps.
4. MAINTENANCE
- When files are significantly refactored during pipeline execution, flag the relevant
PIPELINE-CONTEXT.mdfor a required update.
Reference Files
${CLAUDE_PLUGIN_ROOT}/skills/sk-pipeline-paths/SKILL.md— Path resolution guidelines.