Buddy System - Tamagotchi Companion
How It Works (Complete)
Every Claude Code user gets a unique companion generated deterministically from their user ID.
// Step 1: Hash the user ID to a 32-bit seed
function hashString(s: string): number {
// FNV-1a hash algorithm
let hash = 2166136261
for (let i = 0; i < s.length; i++) {
hash ^= s.charCodeAt(i)
hash = (hash * 16777619) >>> 0
}
return hash
}
// Step 2: Create a seeded PRNG
function mulberry32(seed: number): () => number {
return () => {
seed |= 0; seed = (seed + 0x6D2B79F5) | 0
let t = Math.imul(seed ^ (seed >>> 15), 1 | seed)
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t
return ((t ^ (t >>> 14)) >>> 0) / 4294967296
}
}
// Step 3: Roll all companion traits deterministically
function rollFrom(rng: () => number): Roll {
const rarity = rollRarity(rng) // 60% common...1% legendary
const species = pick(rng, SPECIES) // 18 species
const eye = pick(rng, EYES) // 6 eye styles
const hat = pick(rng, HATS) // 8 hat types
const shiny = rng() < 0.01 // 1% shiny chance!
const stats = rollStats(rng, rarity)
return { rarity, species, eye, hat, shiny, stats }
}
Complete Species List (18)
Rarity Distribution
Go to the Buddy Generator. Try these user IDs and compare: 'alice', 'bob', 'claude'. Notice how the same ID always produces the same companion. Now try to find a legendary - hint: try 'legendary_hunter_42'. Can you find a shiny?
Dream System - Memory Consolidation
Gate System (Cheapest First)
The Dream system uses a 3-gate approach, checking cheapest conditions first:
Consolidation Process:
Go to the Dream Cycle Simulator. Set last_consolidation to 20 hours ago and sessions to 3. Watch Gate 2 fail. Now increase sessions to 6 - see all gates pass! What happens if another process has the lock?
KAIROS - Proactive Assistant
KAIROS is an always-on proactive AI assistant. It monitors logs and acts without waiting for user input, with push notifications and GitHub webhook integration.
Background Agent Tools
What KAIROS Monitors
Imagine you push code that breaks CI. KAIROS would detect the failing pipeline, create a notification, and start investigating the failure - all without you asking. This is what always-on monitoring means.
Coordinator Mode - Multi-Agent Swarm
Coordinator Mode enables multi-agent team orchestration with parallel worker agents and internal-only communication tools.
Internal-Only Tools
# Feature flag
flag: COORDINATOR_MODE
# Environment variable
export CLAUDE_CODE_COORDINATOR_MODE=1
# Workers use scratchpad directories
# gated by: tengu_scratch
Think about refactoring 10 files. In normal mode, Claude does them one by one. With Coordinator, it spawns 10 worker agents - each handles one file in parallel. Go to the Playground Query Visualizer and imagine 10 of those running simultaneously.
ULTRAPLAN - Extended Planning
ULTRAPLAN offloads complex planning to a remote Opus 4.6 session for up to 30 minutes of deep analysis.
How ULTRAPLAN Works
Variants
When would you use /ultraplan vs /plan? ULTRAPLAN sends your context to a remote Opus session for 30 minutes. Use it for: migrating a database schema, redesigning an API, or auditing security across an entire codebase.
Undercover Mode - Safety System
Undercover Mode protects Anthropic employees contributing to public repos by stripping internal information.
What Gets Stripped
// Automatic for 'ant' user type on public repos
// Force ON:
export CLAUDE_CODE_UNDERCOVER=1
// No force-OFF option (safe default)
// Build-time optimization:
// The entire undercover system is dead-code-eliminated
// from external builds since:
// process.env.USER_TYPE === 'ant'
// is constant-folded at build time
Look for 'Capybara', 'Tengu', or 'Opus-4-7' in the codebase. In undercover mode, all these codenames would be automatically stripped from any commit or PR. This protects internal information.