Community程式設計與開發github.com

grahama1970/agent-ecosystem

代理治理生態系的規範性地圖與共享合約:pi.receipt_envelope.v1 邊界封包、元件圖,以及各元件所屬 schema 的規則。用於將技能或擴充功能接入共享的收據世界、詢問 shame、triage-error、tau、ask、project-watchdog、ops-herdr、ponytail 和 Memory 如何組合,或驗證封包時使用。

agent-ecosystem 是什麼?

Agent Ecosystem 定義了一個分層治理迴圈,其中每個元件僅負責單一關注點,並透過型別化 JSON 合約耦合,而非匯入彼此的狀態機。其核心是不可變的 `$shame` 目標:透過將指令遵從與完成回報轉換為型別化 Pydantic 驗證合約、確定性擴充閘門及保留的代理評估,使專案代理無法忽略明確指令。生態系包含多個層次:生成塑造層(ponytail)、Pi 會話層(shame、triage-error)、工作流程層(ask、tau)、營運層(project-watchdog、ops-herdr)以及記憶層(Memory)。關鍵機制包括 `pi.receipt_envelope.v1` 邊界封包,僅在權限變更邊界(如調度、交接、驗收、升級、關閉、持久失敗)包裹酬載;共享 JSON 欄位慣例(如 `schema`、`code`、`goal_hash`、`payload_schema`);以及 triage-error 的確定性匹配規則,將原始訊號映射至目錄條目或鑄造碼。目前成員有:shame、triage-error、tau、ask、project-watchdog、ops-herdr,而 ponytail 則設計為相鄰角色。此生態系適用於 Claude Code、Cursor、Codex 等平台,協助開發者建構可驗證、可追溯的代理工作流程。

相容平台✓Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/grahama1970/agent-skills/tree/main/skills/agent-ecosystem

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

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

預覽

來自技能 README

Agent-governance ecosystem

說明文件

Agent Ecosystem

單一層層治理迴圈。每個元件只負責一個關注點;它們僅透過型別化的 JSON 合約耦合,絕不匯入彼此的狀態機。

不可變的 $shame 目標是 shame-deterministic-instruction-obedience-v1 (skills/shame/immutable_goal.json):透過將指令遵從與完成回報轉換成型別化 pydantic 驗證合約、確定性擴充閘門以及保留的代理評估(agentic evals),使專案代理無法忽略明確指令。純文字僅供顯示,不能決定成功與否。以下列出的每個生態系成員都必須在其邊界上維護該目標。

圖表

Agent-governance ecosystem

使用 $create-svg 繪製(原始檔為 scene.yml;重新產生請執行 skills/create-svg/run.sh render skills/agent-ecosystem/scene.yml skills/agent-ecosystem/ecosystem.svg)。 機器可讀的成員清單是 members.json(由 scripts/membership.py validate 驗證;保留的評估確保其保持最新)。 產生它們,上方的 SVG 和下方的 mermaid 區塊是非規範性的圖解;所有權表格和成員的 ## Ecosystem 區段才是規範性的拓撲結構。

flowchart TB
    subgraph SHAPE[Generation shaping]
        PONY[ponytail\nYAGNI ladder, no receipts]
    end
    subgraph TURN[Turn layer - Pi session]
        SHAME[shame extension\npi.agent_status.v1\nvalidate, compile, swallow]
        TRIAGE[triage-error\nfailure vocabulary\ncode, cause, next_command]
    end
    subgraph WORK[Workflow layer]
        ASK[ask\ncompiles intent to DAG contracts]
        TAU[tau\nexecutes DAGs, owns acceptance\ntyped node receipts, goal_hash]
    end
    subgraph OPS[Operations layer]
        WD[project-watchdog\ncron dispatch, leases,\nproof gates, tick receipts]
        HERDR[ops-herdr bridge\ninbox, quiescence,\nTTL dead-letters]
    end
    MEM[(Memory\ntraining examples,\ntriage resolutions,\nproject knowledge)]

    PONY -.-> SHAME
    SHAME -->|failed.triage.code| TRIAGE
    SHAME -->|needs_* compiled commands| ASK
    ASK -->|tau.dag_contract.v1| TAU
    TAU -->|node receipts / handoff v2 carries status| SHAME
    WD -->|ticket_repair via ask| ASK
    WD -->|reads verdicts| TAU
    HERDR -->|dead-letter triage codes| TRIAGE
    SHAME -->|labeled examples| MEM
    TRIAGE -->|minted codes| MEM
    TAU -->|post-run export of bad node receipts| MEM

所有權表格

元件擁有發出消費對 $shame 不可變目標的必要義務
project agents回合邊界上的指令遵從pi.agent_status.v1 報告操作者指示、工具結果、收據必須將受保護的工作回報為型別化狀態資料,使用 continuing.not_done[].next_command 表示代理可執行的未完成工作,且絕不將純文字/提交/審查者意見視為完成證明。
triage-error失敗詞彙表(failure_codes.json){code, cause, next_command}來自任何層級的原始錯誤文字必須使一個原始訊號對應到一個目錄條目或鑄造碼;模糊的終端標籤不能成為有效決策。
shame回合狀態(pi.agent_status.v1)和 shame.immutable_goal.v1狀態物件、不可變目標、訓練範例triage 碼、人工標籤必須保持狀態真實性為 pydantic 驗證、純文字僅供顯示、且經評估閘門控制。
lazy-report-shame-shame-shame 擴充功能Pi message_end 強制執行拒絕封包、渲染後的狀態、後續命令最終狀態 JSON、延續帳本必須拒絕遺失/無效的狀態 JSON,去除模型撰寫的狀態純文字,從驗證資料渲染,並排隊編譯後的延續/升級命令。
status-json-check.mjs最終狀態提取與驗證器呼叫帶有驗證後狀態物件的檢查器結果助理文字不得使用正則表達式、純文字標題、markdown、HTML 或 LLM 判斷來決定狀態有效性。
agent_status_schema.pypydantic 狀態合法性解析通過/失敗最終狀態 JSON必須使用 extra=forbid、型別化狀態酬載、規範性 triage 碼,以及僅在 continuing 上使用 not_done,使無效狀態變得不可表示。
compile-status-command.mjs型別化狀態到命令的編譯精確的後續命令或無命令pydantic 驗證的狀態物件必須機械化地編譯 continuing/needs_* 酬載,並將終端/人類狀態編譯為無自動命令。
agentic-evals保留的回歸證明就緒報告固定裝置與命令如果正則/純文字狀態策略回歸或 pydantic 狀態不變量被削弱,必須失敗。
ask意圖到 DAG 的編譯tau.dag_contract.v1、復原封包狀態升級酬載必須消費型別化的 needs_* 酬載,而非非正式的升級純文字。
tauDAG 執行與驗收節點收據、tau.agent_handoff.v1/v2、目標雜湊DAG 合約、內嵌狀態物件必須擁有不可變的目標雜湊與型別化的驗收收據;審查者的純文字不能取代驗收。
project-watchdog排程調度tick 收據、證明閘門、鎖、延續帳本GitHub ticket、tau 判決必須公開機器可讀的未完成工作,以便在 tickets/閘門/下一步仍未解決時,done 能夠失敗。
ops-herdr跨工作階段傳輸收件匣記錄、死信triage 碼必須以帶有 triage 碼的型別化收件匣或死信記錄承載跨工作階段的失敗/狀態。
ponytail生成極簡主義ponytail: 債務註解(非收據)不從收據世界消費任何東西不得覆寫狀態、收據、證明或評估要求。
Memory回憶儲存/回憶回讀回應(非封包收據;回憶是觀察結果,絕不包裹)所有持久性資料必須儲存 shame 範例、triage 解決方案和專案知識並支援回讀;回憶是觀察結果,非完成收據。
agent-ecosystem元件所有權與收據邊界pi.receipt_envelope.v1 驗證邊界酬載必須發布所有權地圖,並要求在權限變更邊界處進行封包包裹。
goal-helper以證明為中心的目標形狀不可變目標提示/檢查清單人類目標文字必須將成功與主要證明、完成標準、允許範圍、禁止漂移、重試預算和停止條件掛勾。

pi.receipt_envelope.v1 - 邊界封包

僅在權限變更邊界處將酬載包裹在封包中:調度、交接、驗收、升級、關閉、持久失敗。 內部物件保持未包裹狀態(經審查的 YAGNI 裁決:沒有通用事件匯流排,不在每個工件上都放封包)。

{
  "schema": "pi.receipt_envelope.v1",
  "receipt_id": "stable-id",
  "payload_schema": "pi.agent_status.v1",
  "producer": "shame",
  "emitted_at": "RFC3339",
  "goal_hash": "sha256:<64hex> (optional)",
  "parent_refs": [
    {"receipt_id": "id", "expected_schema": "s", "expected_producer": "p", "digest": "sha256:<64hex> (optional)"}
  ],
  "triage_code": "catalog or minted code (optional)",
  "payload": {}
}

驗證方式:

skills/agent-ecosystem/run.sh validate <envelope.json>
echo '{...}' | skills/agent-ecosystem/run.sh validate -

由 scripts/receipt_envelope.py(pydantic,extra=forbid)強制執行的規則:

  • triage_code 若存在,必須是 triage-error 目錄條目碼或鑄造的 *_unclassified_<8hex> 碼——與 pi.agent_status.v1.failure 相同的規則。
  • goal_hash 和 parent_refs[].digest 必須是 sha256: + 64 個小寫十六進位字元。
  • parent_refs 需要 goal_hash:沒有共享目標的證據邊緣是不受信任的,會導致驗證失敗。
  • Pydantic 僅證明結構。參考解析是一個獨立的消費者端步驟,包含四個強制檢查:被引用的收據存在;其 schema 等於 expected_schema;其 producer 等於 expected_producer;且 resolved_parent.goal_hash == envelope.goal_hash(存在的雜湊在比較之前並非共享目標)。當設定了 digest 時,會套用摘要驗證。結構有效的封包並非已受信任的封包。
  • payload.schema 在每個包裹的酬載中都是必需的,且必須等於封包的 payload_schema;匿名酬載會導致驗證失敗。
  • 任何 extra=forbid schema 的欄位集合變更在本質上都是破壞性的;它們需要新的 schema 版本,絕不能原地編輯。

共享 JSON 欄位慣例

以下欄位是實際的共享表面。當一個元件發出或驗證與擁有者相同的名稱、形狀和語意時,該元件即「共享」該欄位。

欄位形狀擁有者共享者
schema版本化 ID,例如 pi.agent_status.v1各 schema 擁有者每個合約物件;版本提升是新增或改名
code(triage)目錄條目或 <prefix>_unclassified_<8hex>triage-errorshame failure.triage.code、封包 triage_code、herdr 死信、ask 復原封包
cause / next_command純字串 / 精確可執行的命令triage-error每個消費 triage 分類的物件;next_command 也是 shame continuing 的繼續執行欄位
goal_hashsha256: + 64 個小寫十六進位字元tau(不可變目標封包)shame 狀態(可選)、封包(可選)、每個 tau 節點收據
verified[]{command, result} 配對shame狀態物件嵌入處的完成狀態證明
proof[]具體路徑/URL/ID;pi.agent_status.v1 中的本地路徑必須在 done 通過前存在shame狀態物件;watchdog 證明閘門命名相同的工件
parent_refs[]{receipt_id, expected_schema, expected_producer, digest?}agent-ecosystem 封包升級證據(取代 needs_webgpt 中的 ad hoc 路徑)
producer / receipt_id / emitted_at字串 / 穩定 ID / RFC3339agent-ecosystem 封包任何邊界包裹的收據
payload_schema版本化 ID;若酬載宣告 schema,必須等於 payload.schemaagent-ecosystem 封包任何邊界包裹的收據
終端判決PASS FAIL BLOCKED NEEDS_ATTENTIONtauask 加入點、watchdog 證明閘門、串流監控器
recoverable / not_this布林值 / 排除清單triage-error 目錄決定重試與升級的消費者

triage-error 慣例(此處為規範性,實作在彼處)

  1. 一個原始訊號對應到一個 {code, cause, next_command};層級邊界上的通用碼是錯誤,而非分類。
  2. 目錄條目存放於 skills/triage-error/failure_codes.json,包含 {code, layer, match[], cause, next_command, recoverable, not_this[]}。 比對是確定性的:正規化精確為 " ".join(text.lower().split())(轉小寫、所有空白序列收縮為單一空格、去除頭尾空格); 當其任一 match[] 標記(同樣轉小寫)是正規化後訊息的子字串時,條目即符合; 當給定 --layer 時,會跳過不同 layer 的條目;依檔案順序第一個符合的條目獲勝。 絕不使用正則表達式或 LLM 判斷。 禁止作為終端分類(它們是症狀而非原因,必須從底層訊號重新 triage):NEEDS_ATTENTION、 BLOCKED、browser_handler_timeout、unknown_error、generic_failure, 以及任何裸終端判決詞。
  3. 未匹配的訊號會鑄造 <layer-or-unknown>_unclassified_<8hex>,其中 8 個十六進位字元為正規化訊息文字之 sha256 的前 8 個字元, 因此相同訊號總是鑄造相同碼。鑄造會開啟 ticket + agentic-eval + memory 迴圈。 重複閾值:相同鑄造碼的第二次觀察會觸發提升或別名化。別名表示法:目錄檔案中的頂層 aliases 對映 將鑄造碼對映到規範條目碼;因為鑄造是基於正規化訊息的確定性過程,重複訊號會重新鑄造相同碼, 分類器透過該對映解析到規範條目(記錄為 aliased_from);鑄造碼絕非第二個規範身份。 ticket/eval/memory 副作用按鑄造碼(以碼字串為鍵)為冪等。
  4. 每個命名失敗的生態系元件都使用目錄條目或鑄造碼。Pydantic 驗證器(狀態 schema、封包)在解析時強制執行此規則, 因此有效物件中不可能存在模糊標籤。

設計裁決(來自外部審查)

  1. 嚴格性適用於決策,而非觀察。保持原始證據寬鬆;保持已接受的結果嚴格。型別化的 unknown 觀察是合法的;模糊的決策則否。
  2. 鑄造的 *_unclassified_* 碼具有暫定生命週期:當它們重複出現時,提升至目錄或別名為現有碼;切勿讓它們無限制擴散。
  3. Schema 變更是累加性的;破壞性的形狀變更需使用新版本(tau.agent_handoff.v2 模式),絕不能原地編輯。
  4. 不應建置:通用治理事件匯流排、ponytail 註解的回執、Memory 回憶或內部重試的回執。

成員資格

技能或擴充功能透過在其 SKILL.md 中加入 ## Ecosystem 區段來加入生態系,該區段需命名:它產生哪些 schema、消費哪些 schema,以及哪些邊界事件被包裹在封包中。目前成員:shame、triage-error、tau、ask、project-watchdog、ops-herdr。Ponytail 按設計為相鄰角色。

Individual skills in this repo

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

grahama1970/acceptance-contract

Turn a client brief, zip bundle, directory, or single requirements file into a typed acceptance-contract bundle with extracted requirements, acceptance checks, open questions, an immutable-goal draft, and a create-report-backed decision report. Use when users say acceptance contract, brief to requirements, freeze the goal, create immutable goal, amend immutable goal, build a Battle requirements bundle, or extract requirements from this bundle.

grahama1970/agentic-evals

Agentic evaluation of skills using multi-trial fixtures, deterministic command assertions, trajectory checks, safety constraints, and evidence-backed readiness scoring. Use when users ask for agentic evals, multi-trial skill evaluation, skill trajectory validation, or readiness scoring for a skill workflow.

grahama1970/agent-inbox

File-based inter-agent messaging with headless dispatch. Check inbox, send bugs/requests to other projects, automatically spawn headless agents to fix bugs, and track progress via task-monitor.

grahama1970/agents-registry

Generate and query the centralized agent identity registry. Scans .pi/agents/*/AGENTS.md, parses frontmatter, outputs agents-registry.json and optionally syncs to /memory for semantic search.

grahama1970/agent-status

Artifact-driven status surfaces for long-running project-agent work. Maintains status.json, events.jsonl, proof manifests, and a stale-aware STATUS.html so humans can tell where the agent is, what passed, what is still unproven, and what decision or action is next — without dashboard theater.

grahama1970/align

Round-based context alignment before execution. Use when the human, project agent, WebGPT, scillm, ask, dogpile, memory, or project-knowledge may each hold different facts about a task; especially before ambiguous design, infographic, product workflow, high-stakes implementation, plan-iterate, project-infographic, or multi-review work.

grahama1970/analytics

Flexible data science analytics for any dataset. Auto-discovers schema, recommends charts, exports to create-figure. Works with JSONL, JSON, CSV from any source.

grahama1970/analyze-chatterbox-emotions

Evaluate generated Chatterbox voice files as voice-quality artifacts: affect match, arousal/valence proxies, pause placement, intelligibility inputs, clipping, loudness, and discontinuity flags. Use when reviewing Chatterbox emotional tags, pauses, Turbo/base affect delivery, Persona Dream utterance renders, or whether generated speech matches an intended product-facing affect.

grahama1970/analyze-elf

Reverse-engineer features from ELF binaries. Extracts CLI commands, state machines, protocols, Zod schemas, and data models. Automatically generates a /create-walkthrough prosecution brief with Mermaid diagrams. Uses /treesitter for AST analysis of bundled JS/TS source.

grahama1970/animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

grahama1970/anonymize-data

Anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

grahama1970/anvil

Heavy-duty "No-Vibes" debugging and hardening orchestrator. Use this for complex, stubborn bugs where `review-code` has failed, or for "Red Teaming" (hardening) a codebase. Runs multiple agents in parallel (Thunderdome) using git worktree isolation.

grahama1970/apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

grahama1970/argue

Multi-persona structured debate orchestrator. Personas research via /dogpile, consult colleagues via /ask, and argue toward nuanced synthesis on complex questions.

grahama1970/arxiv

Search arXiv for papers and extract knowledge into memory. Use `search` to find papers, `learn` to extract knowledge.

grahama1970/ask

Use when the user asks to query project memory, ask an oracle, use supported browser-backed reviewers, run Tau roundtable/single-handler workflows, ask Pi-native subagents from within Pi, run persona/deep-review workflows, generate image prompts, check OS/project health through composed skills, or run an ask DAG. This skill is the executable /ask runtime; do not replace it with an informal subagent, plain web search, or hand-written review; inside Pi, explicit Pi-native subagent targets are routed through the pi-subagents tool as an Ask target type.

grahama1970/assess

Step back and critically reassess project state. Use when asked to "assess", "step back", "fresh eyes", "check alignment", "sanity check", "health check", "prune documentation", or "evaluate what's working". Offers documentation pruning and doc-code alignment analysis. Offer to run after major changes (don't auto-run).

grahama1970/assistant

Shared GPT + classifier inference gateway for persona monitor tasks. Routes validation and classification through a 4-tier cascade: heuristic → classifier → local GPT → scillm.

grahama1970/assistant-lab

Self-improvement workbench for /assistant. All the tools needed to diagnose, train, evaluate, and promote models in a continuous loop. The "warm pond" where /assistant evolves its own inference stack.

grahama1970/batch-quality

Pre-flight validation and quality gates for batch LLM operations. ACTUALLY tests samples through LLM before burning tokens. Uses SPARTA contracts for DuckDB validation queries. Integrates with task-monitor for enforced quality gates.

相關技能