skills/normative-bdi-agents/SKILL.md
A framework for building rational agents that can recognize, evaluate, and selectively adopt norms while resolving conflicts through consequence-based reasoning. Enables agents to make principled decisions when rules, obligations, and goals are mutually incompatible.
npx skillsauth add curiositech/windags-skills normative-bdi-agentsInstall 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.
Description: A framework for building rational agents that can recognize, evaluate, and selectively adopt norms while resolving conflicts through consequence-based reasoning. Enables agents to make principled decisions when rules, obligations, and goals are mutually incompatible.
Activation triggers: norm conflicts, ethical dilemmas, rule prioritization, obligation conflicts, multi-stakeholder requirements, policy compliance, autonomous agent design, moral reasoning systems
WHEN agent detects norm in environment:
├─ Check consistency with current beliefs/desires/intentions
│ ├─ IF strongly inconsistent (no possible plan satisfies both):
│ │ ├─ Must choose: adopt new norm OR keep existing commitment
│ │ └─ Use consequence ranking to decide which to drop
│ │
│ ├─ IF weakly consistent (some plans work, but constrains options):
│ │ ├─ Evaluate flexibility cost vs. normative compliance benefit
│ │ └─ IF flexibility loss acceptable → adopt
│ │
│ └─ IF strongly consistent (all plans compatible):
│ └─ Adopt automatically (low cost, no conflicts)
WHEN facing norm/goal conflicts:
├─ IF conflicts are between 2-3 items with clear precedence:
│ └─ Use lexicographic ordering (safety > legality > efficiency)
│
├─ IF conflicts involve complex interdependencies:
│ └─ Use maximal subset generation + consequence ranking
│
├─ IF need to satisfy minimum thresholds rather than optimize:
│ └─ Use satisficing with floor constraints
│
└─ IF consequences are uncertain but some outcomes unacceptable:
└─ Use minimax reasoning (minimize worst-case outcome)
WHEN abstract norm exists in ANB:
├─ Check activation conditions against current beliefs
│ ├─ IF conditions met AND variables can be bound:
│ │ └─ Create concrete instance in NIB
│ │
│ ├─ IF conditions met BUT variables cannot be bound:
│ │ └─ Queue for future instantiation when knowledge available
│ │
│ └─ IF conditions not met:
│ └─ Keep monitoring belief updates
WHEN adopting norm into agent architecture:
├─ IF obligation:
│ └─ Add as hypothetical desire with appropriate strength
│
├─ IF prohibition:
│ └─ Add as negative desire (desire NOT to perform action)
│
├─ IF permission:
│ └─ Record capability without creating desire
│
└─ All adopted norms compete through normal BDI deliberation
Symptoms: Agent accepts every detected norm, system becomes increasingly constrained, eventually reaches deadlock where no action satisfies all norms. Detection Rule: If norm adoption rate > norm resolution rate AND available action space shrinking over time. Recovery: Implement consistency checking before adoption; audit existing norms for conflicts; use consequence ranking to drop least-critical norms.
Symptoms: Agent always picks same norm in conflicts (e.g., safety always beats efficiency), ignoring context-specific consequences. Detection Rule: If conflict resolution decisions show no variation across different situational contexts. Recovery: Implement forward simulation to evaluate actual consequences rather than using fixed priority ordering.
Symptoms: Agent acts on norms without proper instantiation, applies abstract rules directly to concrete situations, misses variable binding. Detection Rule: If agent behavior references undefined variables or fails condition checks that should prevent norm activation. Recovery: Enforce Abstract Norm Base → Norm Instance Base pipeline; validate all variable bindings before action.
Symptoms: Agent evaluates only immediate effects of norm violations, misses cascading consequences that make "safe" choice actually worse. Detection Rule: If chosen actions consistently produce unexpected negative downstream effects that weren't considered. Recovery: Extend consequence evaluation depth; use explicit causal chain analysis; implement worst-case scenario planning.
Symptoms: Norm reasoning and goal reasoning operate independently, creating internal conflicts and unpredictable behavior switching. Detection Rule: If agent explanations reference competing "modules" or show inconsistent reasoning across similar situations. Recovery: Integrate norms as desires within unified BDI framework; eliminate separate norm-following pathways.
Setup: Robot caring for baby has:
Step 1 - Recognition: Both norms detected and stored in Abstract Norm Base
Step 2 - Instantiation: Ground variables using current beliefs
Step 3 - Consistency Check: Strong inconsistency detected
Step 4 - Subset Generation:
Step 5 - Consequence Evaluation:
Step 6 - Minimax Decision: Death worse than spec violation
Step 7 - Integration: Add "keep_alive(baby_charlie)" as high-strength desire in BDI system
Novice Miss: Would treat design spec as inviolable rule rather than competing consideration Expert Catch: Recognizes both norms remain in ANB; robot can explain its deliberate violation
Task completion checklist:
This skill should NOT be used for:
Delegate instead:
expected-utility-maximization skillconstraint-satisfaction-planning skillbehavior-tree-execution skillbdi-practical-reasoning skillpolicy-engine-design skillWarning signs you're in the wrong domain:
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.