Communitygithub.com

規範性BDI代理架構

為具備規範偵測能力的代理應用BDI推理,選擇內化哪些承諾,並透過比較後果來解決衝突。適用於自動化系統中義務、禁止或政策衝突時,不適用於簡單固定優先級規則、純約束滿足或無真正規範衝突的領域。

規範性BDI代理架構 是什麼?

這項技能為AI代理導入一套基於BDI(信念-願望-意圖)的規範推理架構,讓代理能夠感知、評估並選擇性地內化規範,同時在衝突發生時透過比較後果來做出可解釋的違規決策。其核心在於區分「規範辨識」與「規範內化」:代理可以知道某個規範存在,但不必自動遵循,從而實現有意識的、可解釋的選擇性違規。架構內建三種一致性狀態(強烈不一致、弱一致、強一致),並使用「弱一致性」來處理多數真實世界的設計權衡;當規範衝突時,它會產生最大無衝突子集、建立計畫、比較各未來的最壞後果,然後選擇最不壞的方案。此技能支援Claude Code、Cursor、Codex等主流開發工具,主要透過流程圖(decision-points.md)、設計文件(references/)和程式碼範例來指導實作,特別適合需要考慮多重規則、義務與政策衝突的自主系統,例如服務代理、機器人等BDI架構。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/a-normative-extension-for-the-bdi-agent

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

規範性BDI代理架構 是做什麼的?

當代理需要感知多個規範、決定採用哪些規範付諸行動,並解釋為何刻意違反某規範比替代方案更好時,請使用這項技能。

使用時機

  • 多個規則、義務、禁止事項或利益相關者的要求無法同時滿足。
  • 代理必須區分「知道某規範存在」與「實際上選擇遵循它」。
  • 系統需要證明為何它為了滿足另一個更高風險的承諾而違反了一個規則。
  • 你需要一種基於後果的替代方案,來取代僵硬的硬編碼優先級列表。
  • BDI架構需要一個有原則的方式來整合規範推理,而不將規範轉變為絕對的否決。

不屬於此技能的邊界

此技能非主要用於:

  • 固定優先級層級,其正確的優先順序永遠不會隨情境改變。
  • 純約束滿足,任何滿足條件的解決方案都夠好,且規範違規超出範圍。
  • 要求無論後果如何都不得違規的監管或道德環境。
  • 玩具級規則引擎,不維護信念、承諾或對刻意違規的解釋。

核心心智模型

辨識不等於內化

將抽象規範庫與規範實例庫分開。代理可以在不採納規範的情況下偵測到它。這種分離允許刻意、可解釋的不遵守,而非偶然的忽略。

三種一致性狀態

  • 強烈不一致:沒有計畫能同時滿足兩個承諾。
  • 弱一致:某些計畫可行,但未來的靈活性會縮小。
  • 強一致:所有相關計畫都保持相容。

弱一致情況是多數真實設計判斷所在的領域。

後果排名

當規範衝突時,比較承諾的連貫組合,依據其最糟糕的後續後果。重點不是最大化平均優良度,而是在不相容的未來中,選擇最不壞的最壞情況。

規範作為假設性願望

已採納的義務和禁止事項會成為BDI機制內的可推翻壓力,而非獨立的覆寫系統。這讓規範推理與一般目標追求處於相同的深思熟慮循環中。

決策點

查看diagrams/01_flowchart_decision-points.md中的採用與衝突流程。

flowchart TD
  A[Norm detected] --> B{Groundable in current beliefs?}
  B -->|No| C[Keep abstract and monitor]
  B -->|Yes| D[Check consistency]
  D -->|Strongly inconsistent| E[Compare conflict bundles by worst consequence]
  D -->|Weakly consistent| F[Evaluate flexibility cost]
  D -->|Strongly consistent| G[Adopt norm]
  E --> H[Choose least-bad worst case]
  F --> I{Adoption still worth it?}
  I -->|Yes| G
  I -->|No| J[Reject or defer]
  H --> G

1. 決定是否採納規範

  • 如果新規範與當前承諾強烈不一致,採納需要放棄或修改其他事物。
  • 如果弱一致,在採納前明確陳述靈活性成本。
  • 如果強一致,採納風險低,通常應自動進行。

2. 決定如何解決衝突

  • 生成最大無衝突子集,而非孤立地逐個比較規範。
  • 為每個子集制定計畫,並辨識每個未來中的最壞後果。
  • 選擇最壞情況最不壞的子集,然後記錄選擇此違規的理由。

3. 決定何時將抽象規範實例化

  • 僅在當前信念能綁定變數並滿足激活條件時才實例化。
  • 當知識不完整時,保持未解決的規範可見,而非假裝它們不適用。
  • 在意義的信念更新後,重新評估待處理的抽象規範。

失敗模式

1. 過度採納死鎖

症狀: 代理不斷內化規範,直到沒有可行行動為止。 檢測規則: 活躍行動空間縮小的速度比衝突解決的速度快。 恢復: 在任何新規範進入規範實例庫之前,強制進行一致性審查。

2. 隱藏違規

症狀: 代理違反了規範,但無法說明它選擇這麼做。 檢測規則: 事後解釋省略了被拒絕的規範,或將違規視為從未發生。 恢復: 保留已拒絕但已辨識的規範,並記錄勝出的後果比較。

3. 二元一致性崩潰

症狀: 採用邏輯將每個規範視為要麼完全相容,要麼不可能。 檢測規則: 架構或日誌中從未出現弱一致性。 恢復: 添加明確的弱一致性分支,並直接建模靈活性損失。

4. 固定優先級僵硬

症狀: 相同的全域優先級堆疊在邊緣案例中產生明顯錯誤的選擇。 檢測規則: 衝突結果僅在優先級表改變時才會改變,絕不因後果改變而改變。 恢復: 從剛性優先級轉向子集生成與後果排名。

5. 規範側通道架構

症狀: 規範處理存在於獨立的執行模組中,後期覆蓋BDI的深思熟慮。 檢測規則: 規範邏輯無法使用信念、願望和意圖來解釋。 恢復: 將已採納的規範轉化為內部的深思熟慮壓力,並透過主要架構路由。

工作範例

範例 1:隱私 vs. 個人化

服務代理知道一個禁止直接使用客戶級數據的規範,以及一個改善使用者體驗的義務。系統發現弱一致:匯總的行為摘要能在限制隱私傷害的同時保留大部分個人化。此技能保持兩個規範可見,僅實例化匯總安全的義務,並記錄為何拒絕直接數據使用。

範例 2:機器人與嬰兒

照護機器人面臨保持嬰兒存活的義務,以及禁止對人類產生愛意的規範。沒有計畫能同時滿足兩者。此技能生成兩個連貫子集,比較最壞後果,並刻意違反設計禁止,因為死亡比被禁止的情感依附更糟糕。此違規是明確且可報告的。

品管關卡

  • 架構區分偵測到的規範與採納的規範。
  • 一致性檢查包括強烈不一致、弱一致和強一致。
  • 衝突解決比較連貫子集,而非僅孤立規範。
  • 選擇的違規行為會附帶明確的後果比較進行記錄。
  • 當信念基礎不完整時,抽象規範可以保持待處理狀態。

參考檔案

檔案載入時機
references/separation-of-norm-recognition-and-norm-internalization.md設計ANB vs. NIB邊界
references/three-types-of-consistency-for-norm-adoption.md實作採用檢查與靈活性成本邏輯
references/normative-conflict-resolution-through-consequence-ranking.md建立或審查基於後果的衝突解決
references/norm-instantiation-through-belief-grounding.md將抽象規範實例化為情境特定實例
references/maximal-non-conflicting-subsets-for-action-selection.md計算衝突下的連貫選項組合
references/desire-internalization-as-norm-adoption-mechanism.md將規範整合至BDI的願望與意圖處理

反模式

  • 硬編碼單一優先順序,並稱之為「倫理」。
  • 自動採納每個偵測到的規範,只在執行時才發現矛盾。
  • 將弱一致性視為與強一致性相同。
  • 透過平均效用比較違規,而忽略災難性的最壞情況。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

相關技能