AI实现验证工具

SlopWatch是一款用于验证AI实现是否与其声明相符的工具,适用于代码审查、配对编程和质量保证等场景。

  • by JoodasCode
  • JavaScript
  • 本地部署
  • 9 星标
  • 更新于
在 GitHub 查看 JoodasCode/SlopWatch

使用说明

🎯 SlopWatch-人工智能责任MCP服务器

阻止AI对其实现的内容撒谎! 追踪人工智能声称的与实际做的。

🚀 v2.7.0的新增功能

✨ 超低响应 -冗余输出减少90%
🔄 组合工具 -单个调用,而不是两个单独的工具
⚡ 无缝工作流程 -非常适合AI配对编程
🎯 光标MCP兼容 -与Cursor IDE无缝协作

🤔 为什么选择SlopWatch?

有没有AI说过 “我已将错误处理添加到您的函数中” 但事实并非如此?或者声称 “已实现用户身份验证” 当它刚刚添加评论时?

SlopWatch实时捕捉AI谎言。

⚡ 快速开始

🎯 选项1:Smithery(最简单-点击安装)

  1. 访问 smithery.ai/server/@JoodasCode/slopwatch
  2. 点击“安装到游标”或“安装到Claude”
  3. 完成! ✨

Smithery自动处理托管、身份验证和更新

🔧 选项2:NPM直接(手动设置)

对于游标IDE:

{
  "mcpServers": {
    "slopwatch": {
      "command": "npx",
      "args": ["slopwatch-mcp-server"]
    }
  }
}

手动光标设置:

  1. 打开光标设置(Cmd+Shift+J 在Mac上, Ctrl+Shift+J 在Windows上)
  2. 转到功能→ 模型上下文协议
  3. 点击“添加新MCP服务器”
  4. 配置:
    • 名字:斜坡观察
    • 类型:stdio
    • 命令: npx slopwatch-mcp-server

对于Claude Desktop: 添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "slopwatch": {
      "command": "npx",
      "args": ["slopwatch-mcp-server"]
    }
  }
}

全球NPM安装:

npm install -g slopwatch-mcp-server

🎮 如何使用

方法1:组合工具(推荐⭐)

非常适合AI实现某些东西并且您想要验证它的情况:

// AI implements code, then verifies in ONE call:
slopwatch_claim_and_verify({
  claim: "Add input validation to calculateSum function",
  originalFileContents: {
    "utils/math.js": "function calculateSum(a, b) { return a + b; }"
  },
  updatedFileContents: {
    "utils/math.js": "function calculateSum(a, b) {\n  if (typeof a !== 'number' || typeof b !== 'number') {\n    throw new Error('Invalid input');\n  }\n  return a + b;\n}"
  }
});

// Response: "✅ PASSED (87%)"

方法2:传统的两步流程

当您想在实施之前进行索赔时:

// Step 1: Register claim
slopwatch_claim({
  claim: "Add error handling to user login",
  fileContents: {
    "auth.js": "function login(user) { return authenticate(user); }"
  }
});
// Response: "Claim ID: abc123"

// Step 2: Verify after implementation
slopwatch_verify({
  claimId: "abc123",
  updatedFileContents: {
    "auth.js": "function login(user) {\n  try {\n    return authenticate(user);\n  } catch (error) {\n    throw new Error('Login failed');\n  }\n}"
  }
});
// Response: "✅ PASSED (92%)"

🛠️ 可用工具

工具 描述 响应
slopwatch_claim_and_verify ⭐ 推荐 -在一次通话中进行索赔和验证 ✅ PASSED (87%)
slopwatch_status 获取您的责任统计数据 Accuracy: 95% (19/20)
slopwatch_setup_rules 生成.cursorules以自动执行 规则内容最少

🎯 游标IDE集成

SlopWatch是专门为 光标IDE 以及AI配对编程:

自动检测

  • 检测AI何时声称实现功能
  • 自动建议验证
  • 与Cursor的Composer无缝集成

智能工作流

1. AI: "I'll add error handling to your function"
2. SlopWatch: Automatically tracks the claim
3. AI: Implements the code
4. SlopWatch: Verifies implementation matches claim
5. Result: ✅ PASSED (92%) or ❌ FAILED (23%)

非常适合:

  • 代码审查 -验证AI是否真正实现了它所声称的
  • 结对编程 -开发过程中的实时问责制
  • 学习 -了解AI实际做了什么与它说了什么
  • 质量保证 -在实现差距变成bug之前抓住它们

💡 真实世界的例子

示例1:API端点增强

// AI says: "I'll add rate limiting to your API endpoint"

slopwatch_claim_and_verify({
  claim: "Add rate limiting middleware to /api/users endpoint",
  originalFileContents: {
    "routes/users.js": "app.get('/api/users', (req, res) => { ... })"
  },
  updatedFileContents: {
    "routes/users.js": "const rateLimit = require('express-rate-limit');\nconst limiter = rateLimit({ windowMs: 15*60*1000, max: 100 });\napp.get('/api/users', limiter, (req, res) => { ... })"
  }
});
// Result: ✅ PASSED (94%)

示例2:React组件更新

// AI claims: "Added responsive design with CSS Grid"

slopwatch_claim_and_verify({
  claim: "Make UserCard component responsive using CSS Grid",
  originalFileContents: {
    "components/UserCard.jsx": "const UserCard = () => <div className=\"user-card\">...</div>"
  },
  updatedFileContents: {
    "components/UserCard.jsx": "const UserCard = () => <div className=\"user-card grid-responsive\">...</div>",
    "styles/UserCard.css": ".grid-responsive { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }"
  }
});
// Result: ✅ PASSED (89%)

📊 责任统计

随着时间的推移,跟踪你的人工智能的诚实度:

slopwatch_status();
// Returns: "Accuracy: 95% (19/20)"
  • 准确度分数实际执行的索赔百分比
  • 索赔计数:跟踪的执行索赔总数
  • 成功率:人工智能兑现承诺的频率

🔧 高级配置

使用.cursorules自动执行

生成自动责任规则:

slopwatch_setup_rules();

这创建了一个 .cursorrules 该文件自动对所有AI实现强制执行SlopWatch验证。

自定义验证

SlopWatch分析:

  • 文件更改 -这些文件真的被修改了吗?
  • 代码内容 -新代码是否与声明相符?
  • 实现模式 -是否使用了正确的模式/库?
  • 关键字匹配 -代码中是否包含相关关键字?

🚀 为什么选择SlopeWatch?

对于开发者:

  • 捕捉AI的谎言 在它们变成虫子之前
  • 学得更快 通过观察AI的实际功能
  • 提高代码质量 通过自动验证
  • 节省时间 精简问责制

对于团队:

  • 规范人工智能交互 跨团队成员
  • 跟踪AI可靠性 随着时间的推移
  • 减少调试 人工智能实施差距
  • 培养信任 人工智能辅助开发

对于游标用户:

  • 本机集成 使用Cursor的编辑器
  • 无缝工作流程 -无上下文切换
  • 实时反馈 在开发过程中
  • 超低响应 -无详细输出

🎯 Cursor入门

  1. 安装斜坡监视器 使用上述方法之一
  2. 打开的游标 并与Composer开始新的聊天
  3. 让AI实现一些东西:“向我的函数添加输入验证”
  4. 观察斜坡观察工作:它自动跟踪和验证索赔
  5. 获得即时反馈: ✅ 通过(87%)或❌ 失败(23%)

🔍 故障排除

常见问题:

  • 工具未显示:安装后重新启动Cursor
  • 验证失败:检查文件是否实际被修改
  • NPM错误:试试 npm cache clean --force 并重新安装

调试模式:

通过设置启用详细日志记录 DEBUG=true 在您的环境中。

📈 路线图

  • [ ] 可视化仪表板 用于问责制指标
  • [ ] 与Git集成 用于提交验证
  • [ ] 团队分析 适用于多开发者项目
  • [ ] 自定义验证规则 针对特定框架
  • [ ] IDE扩展 其他编辑

🤝 贡献

我们欢迎捐款!请查看我们的 贡献指南 了解详情。

📝 许可证

MIT许可证-请参阅 许可证 了解详情。

🌟 支持


由以下材料制成❤️ Cursor社区

阻止人工智能对其实现的内容撒谎。立即开始使用SlopWatch!