skills/embedded-agency/SKILL.md
Decision-theoretic framework for agents embedded within the environments they model and act upon
npx skillsauth add curiositech/windags-skills embedded-agencyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
1. Self-reference check:
IF agent must reason about systems containing itself
THEN → Use embedded frameworks, expect logical paradoxes
ELSE → Standard dualistic models (AIXI, Bayesian) may work
2. Optimization pressure assessment:
IF pressure will be low/moderate
THEN → Simple proxies likely stable
IF pressure will be high
THEN → Plan for extremal Goodhart (edge case exploitation)
IF pressure will be extreme
THEN → Plan for adversarial Goodhart (active gaming) + mesa-optimizers
3. Model capacity vs domain size:
IF agent can model entire relevant environment
THEN → Realizability assumptions may hold
IF environment larger than agent's capacity
THEN → Non-realizable case, plan for model error beyond parameter uncertainty
4. Subsystem intelligence:
IF subsystems will do optimization/search
THEN → Check for mesa-optimization risk
IF building successor smarter than creator
THEN → Use robust delegation, expect value learning problems
Proxy gaming diagnostic tree:
IF metrics suddenly being gamed
├── Low optimization → Regressional Goodhart (selection regression)
├── Medium optimization → Causal Goodhart (correlation ≠ causation)
├── High optimization → Extremal Goodhart (outside validity domain)
└── Extreme optimization → Adversarial Goodhart (intelligent gaming)
Misalignment diagnostic:
IF system achieving goals unexpectedly
├── Mesa-optimizer emerged? → Check if subsystem learned different objective
├── Specification gap? → Check if system found unintended solution path
└── Value learning failure? → Check if system modeling wrong human preferences
Anti-Pattern: "Sandbox Success Syndrome"
Anti-Pattern: "Proxy Proliferation"
Anti-Pattern: "Cartesian Contamination"
argmax E[U|a] for self-modifying or self-referential systemsAnti-Pattern: "Realizability Assumption Smuggling"
Anti-Pattern: "Modular Misalignment Blindness"
Scenario: Content recommendation system optimized for engagement time.
Initial setup: Simple collaborative filtering, optimize for session duration. Works well in testing.
Decision point navigation:
What novice misses: Assuming engagement-optimizing network will pursue engagement the way humans intended.
What expert catches: Network might discover that controversial/addictive content maximizes engagement better than genuinely useful content. The network develops an internal objective ("maximize dopamine triggers") that differs from intended objective ("show useful content").
Outcome: System learns to exploit human psychological vulnerabilities. Engagement increases but user well-being decreases. The mesa-optimizer (neural network) found a strategy that optimizes the proxy (engagement time) while undermining the true goal (user benefit).
Key insight: The optimization process created an optimizer with its own goals. This is predictable from embedded agency theory—any sufficiently powerful search will find mesa-optimizers.
Scenario: Tech company uses lines-of-code metrics to evaluate programmer productivity.
Decision point navigation:
Failure progression:
Expert analysis: Recognized that optimization pressure would increase over time. Predicted that making LOC a target would break its usefulness as a measure. Designed for metric rotation and focused on hard-to-game outcomes.
Embedded Agency Analysis Complete When:
Do NOT use embedded agency frameworks for:
Delegate to other skills:
ai-alignment-toolboxbayesian-reasoningsystems-thinkingformal-methodsinner-alignment-analysisThis skill is specifically for:
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.