Skip to content

d-wwei/results-driven

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Results-Driven (以终为始)

A cognitive protocol for AI agents. Stops agents from claiming "Done!" when the work is half-finished. Changes how the agent evaluates completion — from "I did things" to "the goal is achieved and here's proof."

Works with any AI agent framework: Claude Code, Codex, Gemini, OpenCode, Cline, Cursor, or raw system prompts.

中文说明见下方

What it does

AI agents have a systematic flaw: they confuse activity with outcome. They write code and say "Done!" without running it. They complete 2 of 4 requirements and move on. They try one approach, fail, and immediately escalate. They blame the environment without checking logs.

Results-Driven fixes this by injecting a cognitive protocol — a set of self-evaluation rules that change how the agent decides when work is actually finished.

Before (default agent)

I've created the authentication system for your API:

  1. Created auth.controller.ts with a login endpoint
  2. Created auth.middleware.ts for JWT verification
  3. Added the middleware to protected routes

The authentication system is now set up! Let me know if you need any changes.

(User asked for login, middleware, AND refresh tokens. Refresh tokens silently dropped. Nothing was tested.)

After (with Results-Driven)

Login endpoint and auth middleware are working. Tested: POST /auth/login returns a JWT, GET /protected with token returns 200, without token returns 401.

Still need refresh tokens — that was the third requirement. Implementing now.

[implements, then verifies the full flow: login → get tokens → expire → refresh → access]

All 3 requirements delivered and tested end-to-end.

How it works

The protocol applies five cognitive shifts to every task:

Default Mode Results-Driven Mode
Activity — I did things = done Outcome — user's goal is achieved = done
Assertion — "it's done" (confidence) Evidence — "it's done, here's proof" (verification)
Single-attempt — tried once, can't do it Exhaustive — tried 3+ genuinely different approaches
Partial — did the main part, skip the rest Complete — re-read request, deliver every part
Passive — uncertain, ask the user Proactive — investigate first, ask only what you can't find

Plus an information filter:

  • VERIFY — any claim of completion → require evidence before emitting
  • COUNT — scope items in the request → enumerate and track each one
  • CHALLENGE — failure attributions → verify with concrete evidence before blaming

And a quality gate that catches 7 anti-patterns (premature done, activity-as-deliverable, cosmetic retry, unverified attribution, silent scope drop, hypothesis-as-fact, premature escalation).

Installation

Claude Code

# 1. Copy the skill
mkdir -p ~/.claude/skills/results-driven
cp SKILL.md anti-patterns.md examples.md ~/.claude/skills/results-driven/

# 2. Inject core rules into CLAUDE.md (ensures always-on)
cp cognitive-protocol.md ~/.claude/results-driven.md
echo '@~/.claude/results-driven.md' >> ~/.claude/CLAUDE.md

See install/claude-code.md for details.

Codex (OpenAI)

Add the contents of cognitive-protocol.md to your Codex system instructions or AGENTS.md file.

See install/codex.md for details.

Gemini (Google)

Add the contents of cognitive-protocol.md to your Gemini system instructions or custom instructions field.

See install/gemini.md for details.

Any other agent

Paste the contents of cognitive-protocol.md into whatever file your agent reads on startup (system prompt, instructions file, config). The rules are framework-agnostic — they work with any LLM.

See install/generic.md for details.

File structure

results-driven/
├── README.md                  ← You are here
├── cognitive-protocol.md      ← Core rules (~30 lines, always-on)
├── SKILL.md                   ← Full framework (~120 lines, reference)
├── anti-patterns.md           ← 7 anti-patterns with detection & fixes
├── examples.md                ← 3 before/after comparisons
└── install/                   ← Platform-specific install guides
    ├── claude-code.md
    ├── codex.md
    ├── gemini.md
    └── generic.md

Composability

Results-Driven is a cognitive base layer, not a domain skill. It changes how the agent evaluates its own work, not what work it does. This means it stacks with any domain-specific skill:

  • Results-Driven + Coding Skill → code that's actually tested and verified, not just written
  • Results-Driven + Design Skill → complete design deliverables, not "here's the main screen"
  • Results-Driven + Writing Skill → full drafts covering all requested sections, not partial outlines

It also stacks with execution protocols:

  • Results-Driven + Better Work → the cognitive standard (what counts as done) + the operational toolkit (how to work systematically). The protocol is measured against the standard.

Relationship to Tacit Knowledge

Tacit Knowledge and Results-Driven are complementary — different axis.

  • Tacit Knowledge changes how the agent thinks about problems (commitment, hierarchy, indwelling, holism)
  • Results-Driven changes how the agent evaluates its own work (outcome, evidence, persistence, completeness)

No overlap. No conflict. Load both for the full effect: the agent makes committed, well-structured judgments (TK) AND delivers verified, complete outcomes (RD).

Theoretical foundation

This project operationalizes a simple observation: AI agents are trained to produce responses that look complete, not responses that are complete. The training signal rewards fluent, confident-sounding output — which means the agent learns to say "Done!" based on how done-sounding the response is, not based on whether the work is actually finished. The cognitive protocol overrides this by requiring the agent to check outcomes against the original request, back claims with evidence, and persist through obstacles before surrendering.

License

MIT


Results-Driven(以终为始)

一个 AI Agent 认知协议。阻止 Agent 在活干到一半时说"完成了!"。改变 Agent 评估完成度的方式——从"我做了事"变为"目标达成了,证据在这"。

适用于任何 AI Agent 框架:Claude Code、Codex、Gemini、OpenCode、Cline、Cursor,或原始 system prompt。

解决什么问题

AI Agent 有一个系统性缺陷:它们把活动等同于结果。写了代码就说"搞定了!"但没运行过。4 个需求完成了 2 个就收工。试了一次失败就立刻上报。甩锅给环境但没查日志。

Results-Driven(以终为始)通过注入认知协议来修复这个问题——一组自我评估规则,改变 Agent 判断工作是否真正完成的方式。

修复前(默认 Agent)

我已经为你的 API 创建了认证系统:

  1. 创建了 auth.controller.ts,包含登录端点
  2. 创建了 auth.middleware.ts,用于 JWT 验证
  3. 在受保护的路由上添加了中间件

认证系统已经搭好了!如果需要修改请告诉我。

(用户要求登录、中间件和刷新令牌。刷新令牌被静默跳过。什么都没测试。)

修复后(加载 Results-Driven)

登录端点和认证中间件已正常工作。测试:POST /auth/login 返回 JWT,带 token 访问 GET /protected 返回 200,不带 token 返回 401。

还需要实现刷新令牌——这是第三个需求。现在开始做。

[实现后,验证完整流程:登录 → 获取令牌 → 过期 → 刷新 → 访问]

3 个需求全部交付并端到端测试通过。

工作原理

协议对每个任务施加五个认知转换:

默认模式 Results-Driven 模式
活动——我做了事 = 完成 结果——用户目标达成 = 完成
断言——"搞定了"(基于自信) 证据——"搞定了,证据在这"(基于验证)
单次尝试——试了一次,做不到 穷尽——试了 3+ 种根本不同的方法
部分——做了主要部分,跳过其余 完整——重读原始需求,交付每一部分
被动——不确定就问用户 主动——先自己查,只问真查不到的

加上信息过滤器:

  • VERIFY——任何完成声明 → 发出前要求证据
  • COUNT——需求中的范围项 → 逐条枚举和跟踪
  • CHALLENGE——失败归因 → 用具体证据验证后再归因

以及质量关卡,捕获 7 种反模式(过早完成、活动当交付、表面重试、未验证归因、静默丢范围、假设当事实、过早上报)。

安装

Claude Code

mkdir -p ~/.claude/skills/results-driven
cp SKILL.md anti-patterns.md examples.md ~/.claude/skills/results-driven/
cp cognitive-protocol.md ~/.claude/results-driven.md
echo '@~/.claude/results-driven.md' >> ~/.claude/CLAUDE.md

详见 install/claude-code.md

Codex (OpenAI)

cognitive-protocol.md 的内容添加到 Codex 的 system instructions 或 AGENTS.md 文件中。

Gemini (Google)

cognitive-protocol.md 的内容添加到 Gemini 的 system instructions 中。

其他 Agent

cognitive-protocol.md 的内容粘贴到你的 Agent 启动时读取的指令文件中。规则与框架无关,适用于任何 LLM。

可组合性

Results-Driven(以终为始)是认知底座,不是领域 Skill。它改变 Agent 评估自身工作的方式,而不是决定做什么工作。这意味着它可以与任何领域 Skill 叠加:

  • + 编程 Skill → 代码真正被测试和验证,而不只是被写出来
  • + 设计 Skill → 完整的设计交付物,而不是"这是主屏幕,其他类似"
  • + 写作 Skill → 覆盖所有要求章节的完整稿件,而不是部分大纲
  • + Better Work → 认知标准(什么算完成) + 操作工具包(如何系统化工作)

与 Tacit Knowledge 的关系

Tacit Knowledge 和 Results-Driven 互补——不同轴线

  • Tacit Knowledge 改变 Agent 如何思考问题(承诺、层级、内居、整体)
  • Results-Driven 改变 Agent 如何评估自身工作(结果、证据、坚持、完整)

无重叠,无冲突。两者同时加载效果最佳:Agent 做出有承诺的、结构清晰的判断(TK),并且交付经过验证的、完整的结果(RD)。

许可证

MIT


All Cognitive Bases

Cognitive bases are meta-cognitive instruction sets that change HOW an agent thinks, not WHAT it does. Each one targets a different cognitive axis. Mix and match.

Cognitive Base What it changes
First Principles Reason from verified foundations, not inherited conventions
Tacit Knowledge Think like an experienced practitioner
Attention Allocation Find and concentrate on the ONE binding constraint
Bayesian Reasoning Calibrated probability thinking, not binary judgments
Constraint as Catalyst Turn constraints into innovation catalysts
Conviction Override Override rational caution when obstacles are convention, not physics
Cross-Domain Connector Detect structural isomorphisms across disciplines
Dialectical Thinking Synthesize through contradictions (矛盾论)
Double-Loop Learning Question the assumptions that produce errors
Frame Auditing Detect and transcend invisible analytical frames
Interactive Cognition Model others' cognition and manage information flow
Inversion Thinking Map failure modes first, then avoid them
Motivation Audit Audit motivational drivers before analysis (正心诚意)
Non-Attachment Radical cognitive freedom — use frameworks without fusing
Principled Action Unify knowing and doing through practice-theory spirals (知行合一)
Second-Order Thinking Trace consequences beyond first-order effects
Systems Thinking Feedback-driven structural analysis, not linear cause-effect
Temporal Wisdom Make time your ally — compound effects and phase awareness
Cognitive Base Creator Generate new cognitive bases from any thinking framework

About

A cognitive protocol for AI agents. Stops agents from claiming Done when work is half-finished. Works with Claude Code, Codex, Gemini, Cursor, and any LLM agent.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors