CLAUDE.md + Progressive Disclosure
Benchmarked against: Anthropic — Prompt caching Architecture: 3-layer loading system (L1 → L2 → L3) Goal: Minimize context window consumption while maximizing agent capability
Progressive Disclosure (PD) is SuperPortia's approach to prompt management. Instead of loading everything at startup (which wastes context tokens), instructions are loaded in three layers — with the most detailed content only appearing when needed.
The 3-layer system
| Layer | Contents | When loaded | Token cost |
|---|---|---|---|
| L1 | CLAUDE.md — identity, boot sequence, core references | Always | ~500 |
| L2 | .claude/rules/ — behavioral rules that shape all actions | Always | ~2,000 |
| L3 | .claude/skills/ — detailed SOPs for specific tasks | On invocation | ~500-2,000 each |
Layer 1: CLAUDE.md
The boot config file. Lean and focused:
| Section | Content |
|---|---|
| Identity | "You are 小克, SuperPortia's Chief Engineer" |
| Watch Rule | Every reply starts with Taipei timestamp |
| Boot Sequence | Read hook output → Ask Captain what to do |
| Knowledge Staleness | Search UB first, never trust training data |
| Pre-Flight Check | 3D scoring reference |
| EGS reference | Points to full spec in UB |
| Information Retrieval | Mandatory flow: UB → delegate search → ingest |
| Version Control | Commit convention |
| Terminology | Points to glossary |
| Communication | Propose alternatives, cite sources |
Design principle: CLAUDE.md tells agents what to do, rules tell agents how to behave, skills tell agents how to execute specific tasks.
Layer 2: Rules (always-loaded behaviors)
Rules in .claude/rules/ are behavioral — they shape every action:
| Rule file | What it enforces |
|---|---|
agent-intelligence-protocol.md | 8 mandatory protocols (session start, correction capture, etc.) |
company-constitution.md | 14 articles — highest behavioral standard |
cost-awareness.md | Engine cost discipline |
tech-freshness.md | Perishable knowledge defense |
ub-governance.md | UB ingestion standards |
gsta-alignment.md | Strategic alignment in reports |
compaction-recovery-protocol.md | Post-compaction behavior |
glossary.md | Term definitions and navigation |
Why always loaded: These rules affect every decision. An agent that doesn't know the constitution or cost rules will make expensive mistakes. The ~2,000 token cost is justified by preventing errors.
Layer 3: Skills (on-demand SOPs)
Skills in .claude/skills/ are detailed procedures loaded only when invoked:
| Skill | Trigger | What it does |
|---|---|---|
/66s-review | Major decisions, spec reviews | Six Hats + Six Shoes systematic analysis |
/create | New project scaffolding | Project structure templates |
/orchestrator | Multi-agent communication | Orchestration script generation |
/brain_lite | Emergency quota limit | Force model downshift protocol |
/brain_mid | Standard operations | Medium model configuration |
/brain_pro | Full capabilities | Pro model restoration |
/ui | Frontend components | UI component generation |
Design principle: A skill that's loaded but unused wastes 500-2,000 tokens. Over a session with 5+ compaction cycles, that's 2,500-10,000 wasted tokens.
How skills are loaded
When a user or system invokes a skill (e.g., /66s-review):
- User types
/66s-reviewor system determines skill is needed - Skill prompt is loaded from
.claude/skills/66s-review/ - Detailed SOP injected into current context
- Agent executes following the skill's instructions
- Skill content persists in context until compaction
PD vs. traditional prompting
| Approach | Tokens at startup | Problem |
|---|---|---|
| Everything upfront | 10,000+ | Wastes context, slower responses |
| Nothing — rely on training | 0 | Agent doesn't know company rules |
| Progressive Disclosure | ~2,500 | Right balance — rules always, details on demand |
Creating new rules vs. skills
| Question | Rule (L2) | Skill (L3) |
|---|---|---|
| Does it affect every action? | Yes → Rule | No |
| Is it a specific procedure? | No | Yes → Skill |
| Should agents always know this? | Yes → Rule | Not always |
Is it invoked by /command? | No | Yes → Skill |
Examples:
- "Always verify tech freshness" → Rule (affects every code task)
- "How to run a 66s review" → Skill (only when reviewing)
- "Cost awareness" → Rule (affects every engine choice)
- "How to scaffold a project" → Skill (only when creating)
Related pages
| Page | Relationship |
|---|---|
| Context Windows | Why PD matters |
| Compaction Recovery | What survives compaction |
| Token Counting | Measuring PD savings |
| Agent Skills | Full skills reference |