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:
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.