展示HN:Quibbler – 一种用于你的编码代理的批评者,它能学习你想要什么。
Show HN: Quibbler – A critic for your coding agent that learns what you want

原始链接: https://github.com/fulcrumresearch/quibbler

## Quibbler:针对编码代理的自动化代码审查工具 Quibbler 是一款旨在自动评估和纠正编码代理的工具,可防止常见问题,例如捏造结果、跳过测试以及偏离编码风格或用户意图。它在后台运行,随着时间的推移学习项目模式并强制执行规则。 **两种集成模式:** * **MCP 模式:** 兼容所有代理,Quibbler 使用模型上下文协议。代理在更改后调用 `review_code` 工具,提供用户指令和修改计划。 * **Hook 模式:** 专为 Claude Code 设计,它利用通过钩子的事件驱动监控,被动观察操作并直接注入反馈。 **主要特点:** * **自动纠正:** 当代理重复犯错或忽略规范时进行干预。 * **上下文学习:** 维护项目上下文,建立理解并在 `.quibbler/rules.md` 中保存规则。 * **自定义:** 允许通过配置文件调整提示和模型。 * **持续审查:** 持续验证更改是否符合意图,检查幻觉并验证测试。 Quibbler 旨在通过自动化代码审查过程并确保一致遵守项目标准来提高代码质量和代理可靠性。它通过 pip 或 uv 提供,并为两种集成模式提供详细的设置说明。 [演示视频](demo.mp4)

## Quibbler:一个代码代理批评者 一个名为**Quibbler**的新工具(github.com/fulcrumresearch)已发布,旨在提高代码代理的可靠性。它充当这些代理的“批评者”,学习用户偏好,并在无需持续监督的情况下,帮助在较长任务中执行意图。 该工具旨在防止代理捏造结果或偏离预期目标。讨论强调需要 Anthropic API 密钥,这可能是在现有订阅之外的额外成本,但有人建议使用 Claude Code 子代理作为替代方案。 评论者们有趣地探讨了“Quibbler 堆栈”的概念——使用多个 Quibbler 来互相纠正,甚至设想了一个用于基于共识审查的“Quibbler 委员会”。对话还涉及管理代理及其批评者日益复杂的难题,从而引出关于需要“代理的代理”的幽默观察。创建者 etherio 可以在 Hacker News 上回答问题。
相关文章

原文

Quibbler is a critic for your coding agent. It runs in the background and critiques your coding agent's actions, either via hooks or an MCP. When your coding agent is once again failing in the same ways, or ignoring your spec, instead of having to prompt it, the Quibbler agent will automatically observe and correct it.

It will also learn rules from your usage, and then enforce them so you don't have to.

demo.mp4

We've found Quibbler useful in automatically preventing agents from:

  • Fabricating results without running commands
  • Not running tests or skipping verification steps
  • Not following your coding style and patterns
  • Hallucinating numbers, metrics, or functionality
  • Creating new patterns instead of following existing ones
  • Making changes that don't align with user intent

Quibbler maintains context across reviews, learning your project's patterns and rules over time.

Using uv:

Using pip:

Quibbler supports two integration modes:

Hook Mode (For Claude Code users)

  • Uses Claude Code's hook system for event-driven monitoring
  • Passively observes all agent actions (tool use, prompts, etc.)
  • Fire-and-forget feedback injection via file writes
  • More powerful affordances but Claude Code-specific

MCP Mode (For users of all other coding agents)

  • Uses the Model Context Protocol for universal compatibility
  • Agent calls review_code tool after making changes
  • Synchronous review with immediate feedback
  • Simple setup via MCP server configuration

Choose your mode and follow the appropriate setup instructions:

Add Quibbler to your agent's MCP server configuration.

For Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "quibbler": {
      "command": "quibbler mcp",
      "env": {
        "ANTHROPIC_API_KEY": "your-api-key-here"
      }
    }
  }
}

For other MCP-compatible agents: Refer to your agent's documentation for MCP server configuration.

Create or update AGENTS.md in your project root to instruct your agent to use Quibbler:

## Code Review Process

After making code changes, you MUST call the `review_code` tool from the Quibbler MCP server with:

- `user_instructions`: The exact instructions the user gave you
- `agent_plan`: **A summary of the specific changes you made** (include which files were modified, what was added/changed, and key implementation details)
- `project_path`: The absolute path to this project

Review Quibbler's feedback and address any issues or concerns raised.

### Example

User asks: "Add logging to the API endpoints"

After implementing, call:

review_code(
user_instructions="Add logging to the API endpoints",
agent_plan="""Changes made:

1. Added logger configuration in config/logging.py
2. Updated routes/api.py to log incoming requests and responses
3. Added request_id middleware for tracing
4. Created logs/ directory with .gitignore""",
   project_path="/absolute/path/to/project"
   )

Option B: Hook Mode Setup

1. Start Quibbler Hook Server

In a terminal, start the Quibbler hook server:

export ANTHROPIC_API_KEY="your-api-key-here"
quibbler hook server
# Or specify a custom port:
quibbler hook server 8081

Keep this server running in the background. It will receive hook events from Claude Code.

2. Configure Hooks in Your Project

In your project directory, run:

This creates or updates .claude/settings.json with the necessary hooks to forward events to the Quibbler server.

The .claude/settings.json should now contain hooks that:

  • Forward tool use events to Quibbler (quibbler hook forward)
  • Display Quibbler feedback to the agent (quibbler hook notify)

When Claude Code runs in this project, Quibbler will automatically observe and intervene when needed.

By default, Quibbler uses Claude Haiku 4.5 for speed. You can change this by creating or editing:

Global config (~/.quibbler/config.json):

{
  "model": "claude-sonnet-4-5"
}

Project-specific config (.quibbler/config.json in your project):

{
  "model": "claude-sonnet-4-5"
}

Project-specific config takes precedence over global config.

  1. Your agent makes code changes, then calls the review_code tool with user instructions and a summary of changes made
  2. Quibbler maintains a persistent review agent per project that:
    • Reviews the completed changes against user intent
    • Uses Read tool to examine the actual changed files and existing patterns in your codebase
    • Validates claims and checks for hallucinations
    • Verifies proper testing and verification steps were included
  3. Quibbler returns feedback or approval synchronously
  4. Your agent addresses any issues found in the review
  1. Claude Code triggers hooks on events (tool use, prompt submission, etc.)
  2. Hook events are forwarded to the Quibbler HTTP server
  3. Quibbler maintains a persistent observer agent per session that:
    • Passively watches all agent actions
    • Builds understanding of what the agent is doing
    • Intervenes when necessary by writing feedback to .quibbler/{session_id}.txt
  4. Feedback is automatically displayed to the agent via the notify hook
  5. The agent sees the feedback and can adjust its behavior

Both modes build understanding over time, learning your project's patterns and saving rules to .quibbler/rules.md.

You can customize Quibbler's system prompt by editing ~/.quibbler/prompt.md. The default prompt will be created on first run.

Project-specific rules in .quibbler/rules.md are automatically loaded and added to the prompt.

Note for Hook Mode: Quibbler writes feedback to a message file that is intended for the agent to read and act on (though users have oversight and can see it). Your agent's system prompt should include a {message_file} placeholder to tell Quibbler where to write its feedback. For example:

When you need to provide feedback to the agent, write it to {message_file}. This is agent-to-agent communication intended for the coding agent to read and act on.

If you notice an issue or bug, please open an issue. We welcome contributions - feel free to open a PR.

Join our community on Discord to discuss workflows and share experiences.

See LICENSE for details.

联系我们 contact @ memedata.com