Skip to main content

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

LayerContentsWhen loadedToken cost
L1CLAUDE.md — identity, boot sequence, core referencesAlways~500
L2.claude/rules/ — behavioral rules that shape all actionsAlways~2,000
L3.claude/skills/ — detailed SOPs for specific tasksOn invocation~500-2,000 each

Layer 1: CLAUDE.md

The boot config file. Lean and focused:

SectionContent
Identity"You are 小克, SuperPortia's Chief Engineer"
Watch RuleEvery reply starts with Taipei timestamp
Boot SequenceRead hook output → Ask Captain what to do
Knowledge StalenessSearch UB first, never trust training data
Pre-Flight Check3D scoring reference
EGS referencePoints to full spec in UB
Information RetrievalMandatory flow: UB → delegate search → ingest
Version ControlCommit convention
TerminologyPoints to glossary
CommunicationPropose 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 fileWhat it enforces
agent-intelligence-protocol.md8 mandatory protocols (session start, correction capture, etc.)
company-constitution.md14 articles — highest behavioral standard
cost-awareness.mdEngine cost discipline
tech-freshness.mdPerishable knowledge defense
ub-governance.mdUB ingestion standards
gsta-alignment.mdStrategic alignment in reports
compaction-recovery-protocol.mdPost-compaction behavior
glossary.mdTerm 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:

SkillTriggerWhat it does
/66s-reviewMajor decisions, spec reviewsSix Hats + Six Shoes systematic analysis
/createNew project scaffoldingProject structure templates
/orchestratorMulti-agent communicationOrchestration script generation
/brain_liteEmergency quota limitForce model downshift protocol
/brain_midStandard operationsMedium model configuration
/brain_proFull capabilitiesPro model restoration
/uiFrontend componentsUI 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):

  1. User types /66s-review or system determines skill is needed
  2. Skill prompt is loaded from .claude/skills/66s-review/
  3. Detailed SOP injected into current context
  4. Agent executes following the skill's instructions
  5. Skill content persists in context until compaction

PD vs. traditional prompting

ApproachTokens at startupProblem
Everything upfront10,000+Wastes context, slower responses
Nothing — rely on training0Agent doesn't know company rules
Progressive Disclosure~2,500Right balance — rules always, details on demand

Creating new rules vs. skills

QuestionRule (L2)Skill (L3)
Does it affect every action?Yes → RuleNo
Is it a specific procedure?NoYes → Skill
Should agents always know this?Yes → RuleNot always
Is it invoked by /command?NoYes → 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)

PageRelationship
Context WindowsWhy PD matters
Compaction RecoveryWhat survives compaction
Token CountingMeasuring PD savings
Agent SkillsFull skills reference