Communitygithub.com

递归决策账本

当用户需要重复回滚、标记决策过程、高维搜索、随机优化、局部最优探索、集成比较或带有可见证据链的递归推理时使用。

递归决策账本 是什么?

该技能旨在处理需要深层计算的迭代过程,例如重复回滚或“Prime Gauss”风格的递归提示。它提供了一个结构化的“账本合约”,用于记录每次迭代的关键信息,包括回滚ID、时间戳、先前的优胜者、新摄入的信息、搜索空间大小以及决策标记等。通过强制记录此类元数据,该技能确保了决策的可追溯性和可审计性。技能的核心是运行一个受约束的“回滚循环”,该循环加载先前的账本,捕获新信息,执行有界搜索,并根据一致性评分和风险规则标记每个候选方案。最终,系统会返回一个简洁且面向决策的摘要,明确指示当前状态(例如“观察”或“实时”),同时内置安全机制以防止在实时环境中盲目执行高风险操作(如交易或生产部署)。该技能适用于支持Markdown和JSONL格式的任何AI代理平台(如Claude Code、Cursor、Codex等),并且可以通过加载和附加JSONL文件轻松集成到现有的工作流程中。

兼容平台~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. 在总结前附加工作成果。

一致性标记

包含一个简洁的一致性标记:

集成与先前优胜者匹配:是
递归与先前优胜者匹配:否
最新回滚匹配:是
允许实时提升:否
原因:不满足重放和新鲜度门控条件

提升规则

对于交易、资本分配、生产部署、迁移或破坏性操作,递归置信度不被视为批准。

默认情况下,使用纸上作业、试运行、只读、预览或暂存模式,除非用户明确批准实时操作且仓库/服务门控支持该操作。

仅在以下条件下提升:

  • 候选方案在选定的指标上击败先前接受的优胜者;
  • 正确性和重放检查通过;
  • 风险限制明确;
  • 证据是持久的;
  • 必要时,用户已批准实时步骤。

摘要格式

以决策开头,而非戏剧性描述:

回滚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.

相关技能