sk-hierarchical-context
Skill4 starsChanged 6 months agoMITView on GitHub
Generates and maintains localized PIPELINE-CONTEXT.md files distributed across the project tree, producing token-efficient context maps that summarize directory purposes and architectural boundaries. Use when the `/superpipelines:init-deep` command runs, when the PREFLIGHT phase of a new pipeline creation requires context initialization, or when significant refactoring invalidates existing context maps.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- cutting-a-releaseSkill
- cutting-a-releaseSkill
- adding-a-pipeline-stepSkill
- brainstormingSkill
- change-modelsSkill
- creating-a-pipelineSkill
- deleting-a-pipeline-stepSkill
- finishing-a-development-branchSkill
- migrating-a-pipelineSkill
- optimizing-a-pipelineSkill
- pipeline-architect-protocolSkill
- pipeline-auditor-protocolSkill
- pipeline-failure-analyzer-protocolSkill
- pipeline-optimizer-protocolSkill
- pipeline-quality-reviewer-protocolSkill
- pipeline-spec-reviewer-protocolSkill
- pipeline-task-executor-protocolSkill
- running-a-pipelineSkill
- sk-4d-methodSkill
- sk-claude-code-conventionsSkill
- sk-dynamic-routingSkill
- sk-hashline-protocolSkill
- skill-architect-protocolSkill
- sk-model-migrationSkill
- sk-model-resolverSkill
- sk-pipeline-grillingSkill
- sk-pipeline-pathsSkill
- sk-pipeline-patternsSkill
- sk-pipeline-stateSkill
- sk-platform-dispatchSkill
- sk-rationalization-resistanceSkill
- sk-spec-driven-developmentSkill
- sk-worktree-safetySkill
- sk-write-review-isolationSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- updating-a-pipeline-stepSkill
- using-superpipelinesSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Cache-Stable Ordering: Place static context (purpose, constraints) before volatile elements.
- Very specific: line 43
When files are significantly refactored during pipeline execution, flag the relevant PIPELINE-CONTEXT.md for a required update.
- Distinctive: line 47
NEVER generate a single monolithic context file.
- Very specific: line 48
ALWAYS respect .gitignore when traversing the repository.
- Very specific: line 50
ALWAYS format PIPELINE-CONTEXT.md files according to Scribius standards (XML envelopes, H1-first, impersonal voice).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
<overview>
The Hierarchical Context system places localized `PIPELINE-CONTEXT.md` files throughout the project tree rather than centralizing knowledge in a single large file. An agent working in `src/api/` loads only the context relevant to that directory instead of an entire monolithic prompt.
</overview><glossary>
<term name="Context Map">A localized markdown file (`PIPELINE-CONTEXT.md`) describing the purpose and boundaries of its resident directory.</term>
<term name="Deep Initialization">The recursive process of generating context maps for all significant project directories.</term>
</glossary>Protocol Execution
<protocol>
### 1. DIRECTORY TRAVERSAL
- Identify all significant architectural boundaries (e.g., `src/`, `components/`, `api/`, `utils/`).
- Skip ignored directories (e.g., `node_modules/`, `.git/`, `dist/`).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.</protocol>
<invariants>
- NEVER generate a single monolithic context file; always distribute context hierarchically.
- ALWAYS respect `.gitignore` when traversing the repository.
- Context maps remain concise and free of redundant code snippets; summaries replace inline code.
- ALWAYS format `PIPELINE-CONTEXT.md` files according to Scribius standards (XML envelopes, H1-first, impersonal voice).
</invariants>Reference Files
${CLAUDE_PLUGIN_ROOT}/skills/sk-pipeline-paths/SKILL.md— Path resolution guidelines.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

