Framework Context
Overview
Provide a consistent, source-anchored model of this framework so agents can reason about system-level behavior without guessing.
When to Use
- System-level reflection or metacognitive assessment
- Planning tasks that depend on routing/memory/workflow architecture
- Capability-gap analysis before recommending ecosystem evolution
Iron Laws
- ALWAYS load framework context before any system-level reflection, planning, or capability-gap analysis — reasoning about architecture without grounding produces hallucinated paths and phantom agents.
- NEVER fabricate file paths or agent names that are not confirmed by reading canonical sources — invented paths break downstream agents that try to use them.
- ALWAYS scope the context load to only what the consuming task needs (
memory, agents, workflows, hooks, or all) — loading all sources for a narrow task wastes tokens and buries relevant signals.
- NEVER write or modify framework files from within this skill — framework-context is read-only; mutations require the appropriate creator/updater skill.
- ALWAYS report missing sources explicitly as
missing source: <path> rather than silently omitting a section — silent omissions cause downstream agents to make decisions on incomplete context.
Anti-Patterns
| Anti-Pattern |
Why It Fails |
Correct Approach |
| Skipping context load before reflection |
Reflection uses stale or hallucinated routing/memory assumptions |
Always invoke framework-context first; never reflect from memory alone |
Loading full all scope for a narrow task |
Token budget consumed by irrelevant sections; key signal buried |
Pass --scope memory or --scope agents to limit output to what's needed |
| Inferring file paths from naming conventions |
Paths change; inferred paths break agent pipelines |
Always read canonical sources and report actual paths found |
| Writing to framework files inside this skill |
Bypasses creator workflow and post-creation integration steps |
Use appropriate creator/updater skill for any write operations |
| Silently omitting sections when source is missing |
Consumer assumes context is complete; makes decisions on gaps |
Report missing source: <path> explicitly for every unresolvable section |
Step 0: Resolve Scope
- Accept
scope argument: memory | agents | workflows | hooks | all
- Default to
all
Step 1: Load Canonical Sources
Read only what is required by scope:
- Memory:
.claude/docs/MEMORY_SYSTEM.md
- Agent registry/routing:
.claude/context/agent-registry.json, .claude/lib/routing/routing-table.cjs
- Reflection flow hooks:
.claude/hooks/reflection/reflection-queue-processor.cjs, .claude/hooks/reflection/reflection-step0-guard.cjs
- Workflow catalog:
.claude/docs/@ENTERPRISE_WORKFLOWS.md
- Global framework references:
.claude/CLAUDE.md
Step 2: Emit Structured Context
Output sections in this exact order:
- Memory System
- Agents and Routing
- Workflows
- Hooks
- Directory Layout
Each section must include:
- 2-6 concise bullets
- At least one concrete path reference
- Behavior notes (what triggers what)
Step 3: Scope Filter
- If
scope != all, return only relevant section(s)
- Never fabricate unknown paths or flows
- If a source is missing, state
missing source: <path>
Step 3: Output
Return markdown only; do not write framework files from this skill.
// Full framework model
Skill({ skill: 'framework-context' });
// Memory-only context for reflection prep
Skill({ skill: 'framework-context', args: '--scope memory' });
// Workflow/hook-only context for integration analysis
Skill({ skill: 'framework-context', args: '--scope workflows' });
Memory Protocol (MANDATORY)
Before starting:
Get-Content .claude/context/memory/learnings.md -TotalCount 120
After completing:
- New framework-context pattern ->
.claude/context/memory/learnings.md
- Broken/ambiguous framework mapping ->
.claude/context/memory/issues.md
- Architectural interpretation decision ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
1---2name: framework-context3description: Load and synthesize framework architecture context for reflection and planning tasks.4---56# Framework Context78## Overview910Provide a consistent, source-anchored model of this framework so agents can reason about system-level behavior without guessing.1112## When to Use1314- System-level reflection or metacognitive assessment15- Planning tasks that depend on routing/memory/workflow architecture16- Capability-gap analysis before recommending ecosystem evolution1718## Iron Laws19201. **ALWAYS** load framework context before any system-level reflection, planning, or capability-gap analysis — reasoning about architecture without grounding produces hallucinated paths and phantom agents.212. **NEVER** fabricate file paths or agent names that are not confirmed by reading canonical sources — invented paths break downstream agents that try to use them.223. **ALWAYS** scope the context load to only what the consuming task needs (`memory`, `agents`, `workflows`, `hooks`, or `all`) — loading all sources for a narrow task wastes tokens and buries relevant signals.234. **NEVER** write or modify framework files from within this skill — framework-context is read-only; mutations require the appropriate creator/updater skill.245. **ALWAYS** report missing sources explicitly as `missing source: <path>` rather than silently omitting a section — silent omissions cause downstream agents to make decisions on incomplete context.2526## Anti-Patterns2728| Anti-Pattern | Why It Fails | Correct Approach |29| ------------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------- |30| Skipping context load before reflection | Reflection uses stale or hallucinated routing/memory assumptions | Always invoke framework-context first; never reflect from memory alone |31| Loading full `all` scope for a narrow task | Token budget consumed by irrelevant sections; key signal buried | Pass `--scope memory` or `--scope agents` to limit output to what's needed |32| Inferring file paths from naming conventions | Paths change; inferred paths break agent pipelines | Always read canonical sources and report actual paths found |33| Writing to framework files inside this skill | Bypasses creator workflow and post-creation integration steps | Use appropriate creator/updater skill for any write operations |34| Silently omitting sections when source is missing | Consumer assumes context is complete; makes decisions on gaps | Report `missing source: <path>` explicitly for every unresolvable section |3536<identity>37Framework grounding skill for memory architecture, routing, workflows, hooks, and directory layout.38</identity>3940<capabilities>41- Produce scoped context summaries (`memory`, `agents`, `workflows`, `hooks`, `all`)42- Anchor every section to concrete repository paths43- Standardize framework context output for reflection/planning consumers44</capabilities>4546<instructions>47<execution_process>4849### Step 0: Resolve Scope5051- Accept `scope` argument: `memory | agents | workflows | hooks | all`52- Default to `all`5354### Step 1: Load Canonical Sources5556Read only what is required by scope:5758- Memory: `.claude/docs/MEMORY_SYSTEM.md`59- Agent registry/routing: `.claude/context/agent-registry.json`, `.claude/lib/routing/routing-table.cjs`60- Reflection flow hooks: `.claude/hooks/reflection/reflection-queue-processor.cjs`, `.claude/hooks/reflection/reflection-step0-guard.cjs`61- Workflow catalog: `.claude/docs/@ENTERPRISE_WORKFLOWS.md`62- Global framework references: `.claude/CLAUDE.md`6364### Step 2: Emit Structured Context6566Output sections in this exact order:67681. **Memory System**692. **Agents and Routing**703. **Workflows**714. **Hooks**725. **Directory Layout**7374Each section must include:7576- 2-6 concise bullets77- At least one concrete path reference78- Behavior notes (what triggers what)7980### Step 3: Scope Filter8182- If `scope != all`, return only relevant section(s)83- Never fabricate unknown paths or flows84- If a source is missing, state `missing source: <path>`8586### Step 3: Output8788Return markdown only; do not write framework files from this skill.8990</execution_process>91</instructions>9293<examples>94<usage_example>95**Example Invocations**:9697```javascript98// Full framework model99Skill({ skill: 'framework-context' });100101// Memory-only context for reflection prep102Skill({ skill: 'framework-context', args: '--scope memory' });103104// Workflow/hook-only context for integration analysis105Skill({ skill: 'framework-context', args: '--scope workflows' });106```107108</usage_example>109</examples>110111## Memory Protocol (MANDATORY)112113**Before starting:**114115```powershell116Get-Content .claude/context/memory/learnings.md -TotalCount 120117```118119**After completing:**120121- New framework-context pattern -> `.claude/context/memory/learnings.md`122- Broken/ambiguous framework mapping -> `.claude/context/memory/issues.md`123- Architectural interpretation decision -> `.claude/context/memory/decisions.md`124125> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.