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.
| Layer | What | When loaded | Token cost |
|---|---|---|---|
| L1: CLAUDE.md | Identity, boot sequence, key pointers | Always | ~500 |
| L2: Rules | Behavioral standards, governance | Always | ~2,000 |
| L3: Skills | Specific procedures, SOPs | On /command | 500-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 engineering | SuperPortia prompt engineering |
|---|---|
| Craft one system prompt | Design a layered configuration stack |
| Optimize for single task | Optimize for persistent agent behavior |
| Focus on output format | Focus on decision-making patterns |
| One-shot or few-shot examples | Rules, skills, and precedent-based learning |
| Static | Dynamic (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.
| Rule | Purpose |
|---|---|
company-constitution.md | Core behavioral standards |
cost-awareness.md | Token and engine discipline |
agent-intelligence-protocol.md | 8 mandatory protocols |
tech-freshness.md | Perishable knowledge defense |
ub-governance.md | Knowledge management standards |
gsta-alignment.md | Strategic alignment |
compaction-recovery-protocol.md | Memory cliff defense |
glossary.md | Term navigation |
Skills (L3)
On-demand SOPs loaded only when invoked with /command.
| Skill | Command | When to use |
|---|---|---|
| 66s Review | /66s-review | Major decisions, spec reviews |
| Create | /create | Scaffolding new projects |
| Orchestrator | /orchestrator | Multi-agent scripts |
| Brain Lite/Mid/Pro | /brain_lite etc. | Engine mode switching |
| UI | /ui | Frontend component generation |
Hooks
Event-driven context injection that fires at specific triggers:
| Hook | Trigger | What it injects |
|---|---|---|
SessionStart | New session | Timestamp, strategic anchor, intelligence |
PreToolUse | Before tool calls | Can gate operations |
PostToolUse | After tool calls | Can log results |
Design principles
| Principle | Application |
|---|---|
| Lean over verbose | CLAUDE.md has pointers, not content |
| Rules shape, skills guide | Rules define "always do this"; skills define "do this when asked" |
| Token-aware | Every token in the config stack costs money per conversation |
| Compaction-safe | Critical facts must survive context compaction |
| Searchable knowledge | Detailed context lives in UB, not in prompts |
Related pages
| Page | Relationship |
|---|---|
| CLAUDE.md + Rules + Hooks | Detailed configuration guide |
| Prompt Caching (PD) | Progressive Disclosure mechanics |
| Skills Overview | L3 skill reference |
| Context Windows | Token budget management |