Skip to main content

Prompt Engineering Overview

Benchmarked against: Anthropic — Prompt Engineering Overview Architecture: CLAUDE.md + Rules + Hooks + Skills Scope: How SuperPortia configures agent behavior through prompts

In SuperPortia, "prompt engineering" is not about crafting individual prompts — it's about designing the entire behavioral configuration stack that shapes how agents think, decide, and act.


The configuration stack​


Progressive Disclosure (PD)​

The key principle: load the minimum at startup, expand on demand.

LayerWhatWhen loadedToken cost
L1: CLAUDE.mdIdentity, boot sequence, key pointersAlways~500
L2: RulesBehavioral standards, governanceAlways~2,000
L3: SkillsSpecific procedures, SOPsOn /command500-2,000 each

Why PD matters​

Without PD, loading everything at startup would cost:

  • CLAUDE.md: ~500 tokens
  • All rules: ~2,000 tokens
  • All skills: ~5,600 tokens
  • Total: ~8,100 tokens — wasted on procedures that may never be used

With PD:

  • Baseline: ~2,500 tokens (CLAUDE.md + rules)
  • Per skill invocation: +500-2,000 tokens
  • Typical session: ~3,500-4,500 tokens

Prompt engineering in SuperPortia vs traditional​

Traditional prompt engineeringSuperPortia prompt engineering
Craft one system promptDesign a layered configuration stack
Optimize for single taskOptimize for persistent agent behavior
Focus on output formatFocus on decision-making patterns
One-shot or few-shot examplesRules, skills, and precedent-based learning
StaticDynamic (hooks inject real-time context)

Core components​

CLAUDE.md (L1)​

The agent's identity card and boot instructions. Lean — just pointers, not procedures.

Contains:

  • Agent identity and role
  • Boot sequence (2 calls: heartbeat + mailbox)
  • Watch rule (timestamp every reply)
  • Pre-Flight Check reference
  • Knowledge retrieval flow
  • Key pointers to specs and rules

Does NOT contain:

  • Detailed procedures (those are in skills)
  • Full governance rules (those are in rules)
  • Historical decisions (those are in UB)

Rules (L2)​

Behavioral standards that shape every action. Always loaded, always active.

RulePurpose
company-constitution.mdCore behavioral standards
cost-awareness.mdToken and engine discipline
agent-intelligence-protocol.md8 mandatory protocols
tech-freshness.mdPerishable knowledge defense
ub-governance.mdKnowledge management standards
gsta-alignment.mdStrategic alignment
compaction-recovery-protocol.mdMemory cliff defense
glossary.mdTerm navigation

Skills (L3)​

On-demand SOPs loaded only when invoked with /command.

SkillCommandWhen to use
66s Review/66s-reviewMajor decisions, spec reviews
Create/createScaffolding new projects
Orchestrator/orchestratorMulti-agent scripts
Brain Lite/Mid/Pro/brain_lite etc.Engine mode switching
UI/uiFrontend component generation

Hooks​

Event-driven context injection that fires at specific triggers:

HookTriggerWhat it injects
SessionStartNew sessionTimestamp, strategic anchor, intelligence
PreToolUseBefore tool callsCan gate operations
PostToolUseAfter tool callsCan log results

Design principles​

PrincipleApplication
Lean over verboseCLAUDE.md has pointers, not content
Rules shape, skills guideRules define "always do this"; skills define "do this when asked"
Token-awareEvery token in the config stack costs money per conversation
Compaction-safeCritical facts must survive context compaction
Searchable knowledgeDetailed context lives in UB, not in prompts

PageRelationship
CLAUDE.md + Rules + HooksDetailed configuration guide
Prompt Caching (PD)Progressive Disclosure mechanics
Skills OverviewL3 skill reference
Context WindowsToken budget management