Build Intelligence Systems
Design guidance, decision trees, and code patterns for implementing the Cormorant Foraging framework.
How to Use the Framework
Step 1: Identify Your Primary Dimension
Ask yourself:
- Is time the enemy? (urgent decisions) → Sound
- Do relationships matter most? (structural complexity) → Space
- Is continuity critical? (memory across sessions) → Time
Step 2: Choose a Natural Metaphor
Pick a metaphor from nature that embodies your dimension:
Sound examples:
Chirping, howling, echolocation, alarm bells
Space examples:
Perching, nesting, web-building, hive architecture
Time examples:
Wakes, footprints, growth rings, geological layers
Step 3: Define Observable Properties
List what you can measure:
Database row count (observable)
"Good design" (subjective - avoid)
User action timestamp (observable)
"User will quit" (speculation - avoid)
Step 4: Design Your Scoring Method
Match your formula to your dimension:
Sound → Additive:
Score = Factor1×W1 + Factor2×W2 + ...Space → Multiplicative:
Score = (Dim1 × Dim2 × Dim3) / 100Time → Exponential:
Score = Base × e^(-time/decay)Step 5: Close the Loop with DRIFT & Fetch
Once you have 3D sensing, complete the intelligence cycle:
DRIFT (Layer 1 - Measurement)
DRIFT = Methodology − PerformanceExample: If target methodology is 8.0 and current performance is 6.5, DRIFT = 1.5
Learn more at drift.cormorantforaging.dev →Fetch (Layer 2 - Action)
Fetch = Chirp × |DRIFT| × Confidencewhere Confidence = min(Perch, Wake) / 100Thresholds:
- • >1000: Execute immediately
- • 500-1000: Confirm before action
- • 100-500: Queue for review
- • <100: Wait and monitor
Sense → Measure → Decide → Act → Loop
Which Dimension Do You Need?
"I need to make fast decisions under time pressure"
→ Sound Dimension
Examples: Trading, emergency response, waiver wire
Pattern: ChirpIQX (additive scoring, urgency tiers)
"I need to understand complex structure and relationships"
→ Space Dimension
Examples: Database schema, code architecture, network topology
Pattern: PerchIQX (ICE scoring, multiplicative)
"I need memory and continuity across time"
→ Time Dimension
Examples: Chatbots, version control, session management
Pattern: WakeIQX (causal chains, exponential decay)
Code Templates
TypeScript patterns for each dimension (adaptable to other languages):
Layer 0: Sound
interface SignalFactors {
recent: number // 0-10 scale
projected: number // 0-10 scale
opportunity: number // 0-10 scale
risk: number // 0-10 scale
}
class SoundIntelligence {
calculateUrgencyScore(factors: SignalFactors): number {
return (
factors.recent * 0.40 +
factors.projected * 0.30 +
factors.opportunity * 0.20 -
factors.risk * 0.10
)
}
categorize(score: number): string {
if (score >= 8.0) return 'CRITICAL'
if (score >= 6.0) return 'HIGH'
if (score >= 4.0) return 'MEDIUM'
return 'LOW'
}
}Layer 0: Space
interface DimensionalFactors {
insight: number // 0-10 scale
context: number // 0-10 scale
execution: number // 0-10 scale
}
class SpaceIntelligence {
calculateICEScore(factors: DimensionalFactors): number {
return (factors.insight * factors.context * factors.execution) / 100
}
prioritize(score: number): string {
if (score >= 4.0) return 'HIGH'
if (score >= 2.0) return 'MEDIUM'
return 'LOW'
}
}Layer 0: Time
interface ContextItem {
timestamp: Date
baseRelevance: number // 0-1 scale
halfLife: number // Hours until 50% decay
}
class TimeIntelligence {
calculateRelevance(item: ContextItem, currentTime: Date): number {
const ageInHours =
(currentTime.getTime() - item.timestamp.getTime()) / (1000 * 60 * 60)
const temporalDecay = Math.exp(-ageInHours / item.halfLife)
return item.baseRelevance * temporalDecay
}
}Layer 1: DRIFT (Measurement)
interface DRIFTMetrics {
methodology: number // Target score (0-10)
performance: number // Current score (0-10)
dimension: 'sound' | 'space' | 'time'
}
class DRIFTMeasurement {
calculateDrift(metrics: DRIFTMetrics): number {
// DRIFT = Methodology - Performance
return metrics.methodology - metrics.performance
}
assessGap(drift: number): string {
const absDrift = Math.abs(drift)
if (absDrift >= 3.0) return 'CRITICAL_GAP'
if (absDrift >= 2.0) return 'SIGNIFICANT_GAP'
if (absDrift >= 1.0) return 'MODERATE_GAP'
if (absDrift >= 0.5) return 'MINOR_GAP'
return 'ON_TARGET'
}
getDirection(drift: number): 'UNDERPERFORMING' | 'OVERPERFORMING' | 'ALIGNED' {
if (drift > 0.5) return 'UNDERPERFORMING'
if (drift < -0.5) return 'OVERPERFORMING'
return 'ALIGNED'
}
}Layer 2: Fetch (Action Decision)
interface FetchInputs {
chirp: number // Sound dimension score (0-10)
drift: number // DRIFT measurement (Layer 1)
perch: number // Space dimension score (0-10)
wake: number // Time dimension score (0-10)
}
class FetchAction {
calculateFetch(inputs: FetchInputs): number {
// Confidence = min(Perch, Wake) / 100
const confidence = Math.min(inputs.perch, inputs.wake) / 100
// Fetch = Chirp × |DRIFT| × Confidence
return inputs.chirp * Math.abs(inputs.drift) * confidence
}
decide(fetchScore: number): {
action: string
priority: string
reasoning: string
} {
if (fetchScore > 1000) {
return {
action: 'EXECUTE',
priority: 'IMMEDIATE',
reasoning: 'High urgency with strong confidence'
}
}
if (fetchScore >= 500) {
return {
action: 'CONFIRM',
priority: 'HIGH',
reasoning: 'Significant fetch requires validation'
}
}
if (fetchScore >= 100) {
return {
action: 'QUEUE',
priority: 'MEDIUM',
reasoning: 'Moderate fetch, queue for review'
}
}
return {
action: 'WAIT',
priority: 'LOW',
reasoning: 'Insufficient fetch signal'
}
}
}Common Pitfalls
❌ Forcing a Dimension
Don't shoehorn your problem into a dimension it doesn't fit:
Wrong: "I'll use Space (PerchIQX) because it's database-related"
Right: "I'll use Sound (ChirpIQX) because urgency is primary"
❌ Mixing Scoring Methods
Don't combine additive and multiplicative in same formula:
Wrong: Score = (A × B) + (C × 0.4)
Right: Pick one: A + B + C OR (A × B × C) / 100
❌ Speculating Beyond Observables
Don't include unmeasurable factors:
Wrong: talent_factor = assessIntangibles(player)
Right: performance_factor = player.stats.pointsPerGame
❌ Ignoring Confidence Gating
Don't act on high Fetch when confidence is low:
Wrong: if (fetch > 1000) execute() // Ignores confidence
Right: if (fetch > 1000 && confidence > 0.7) execute()