Communitygithub.com

遞迴決策分類帳

當使用者要求重複執行、標記決策過程、高維度搜尋、隨機最佳化、局部最佳探索、集成比較或帶有可見證據軌跡的遞迴推理時,使用此技能。

遞迴決策分類帳 是什麼?

此技能旨在引導AI代理在處理需要反覆迭代與深度計算的任務時,採用結構化且安全的決策記錄方法。它主要用於「Prime Gauss」風格的遞迴提示或多次模擬(rollout)場景。技能的核心是建立一個「分類帳契約」,要求每次迭代都記錄完整的元數據,包括迭代ID、時間戳、先前的決策、新資訊、搜尋空間大小、使用的模型家族、試驗次數以及決策標記(如接受、觀察、拒絕等)。更重要的是,它引入了「相干性標記」(Coherence Mark)和「晉升規則」(Promotion Rules),防止代理在沒有充分證據或用戶明確批准的情況下,將遞迴結果誤認為確定性結論而執行危險操作(如交易或生產部署)。該技能適用於需要可追溯、可驗證的逐步推理過程的場景,支援JSONL和Markdown兩種記錄格式,並強制以安全模式(如預覽、試運行)為預設,確保決策的可靠性與安全性。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/recursive-decision-ledger

在你喜歡的 AI 中提問

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

說明文件

遞迴決策分類帳 是做什麼的?

當使用者試圖透過多次模擬或「Prime Gauss」風格的遞迴提示來強迫進行更深入的計算時,請使用此技能。保留有用的部分:重複試驗、先前的記憶、新資訊和明確標記。移除不安全的部份:假裝循環能證明確定性。

分類帳契約

每次模擬都應記錄:

  • 模擬 ID 和時間戳;
  • 先前的公認贏家和先前的觀察清單;
  • 吸收的新資訊;
  • 搜尋空間大小;
  • 使用的模型系列或啟發式方法;
  • 試驗次數和有效試驗次數;
  • 頂尖候選方案;
  • 決策標記;
  • 與先前分類帳的相干性標記;
  • 晉升關卡結果。

對於僅追加記錄的分類帳,偏好使用JSONL;對於人類可讀摘要,則偏好使用Markdown。

模擬循環

  1. 載入先前的分類帳。
  2. 在時間步零捕獲新資訊。
  3. 執行有界搜尋。
  4. 標記每個候選方案:接受、觀察、拒絕、降級觀察或需要重播。
  5. 將贏家與先前的贏家及最新的標記模擬進行比較。
  6. 當漂移、尾部風險、過時數據或重播失敗使先前標記無效時,降級候選方案。
  7. 在總結之前附加工件。

相干性標記

包含一個緊湊的相干性標記:

集成匹配先前贏家:true
遞迴匹配先前贏家:false
最新模擬匹配:true
允許即時晉升:false
原因:未滿足重播和新鮮度關卡

晉升規則

對於交易、資金配置、生產部署、遷移或破壞性操作,遞迴信心不等於批准。

除非使用者明確批准即時操作且儲存庫/服務關卡支援,否則預設為紙上、試運行、唯讀、預覽或分段模式。

僅在以下情況下晉升:

  • 候選方案在所選指標上擊敗先前的公認贏家;
  • 正確性和重播檢查通過;
  • 風險限制明確;
  • 證據是持久的;
  • 使用者已在需要時批准即時步驟。

摘要格式

以決策為開頭,而非戲劇性:

模擬 15 完成。先前的贏家仍保持優勢,但邊際惡化了 17%。
狀態:觀察,非即時。下一個關卡:20 次重播填補,且新訂單簿年限低於閾值。

Individual skills in this repo

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

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

相關技能