Initial release: MCP server enforcing Worker-Reviewer loop

Diligence prevents AI agents from shipping quick fixes that break things
by enforcing a research-propose-verify loop before any code changes.

Key features:
- Worker sub-agent researches and proposes with file:line citations
- Reviewer sub-agent independently verifies claims by searching codebase
- Iterates until approved (max 5 rounds)
- Loads project-specific context from .claude/CODEBASE_CONTEXT.md
- State persisted across sessions

Validated on production codebase: caught architectural mistake (broker
subscriptions on client-side code) that naive agent would have shipped.
This commit is contained in:
2026-01-22 06:22:59 +01:00
commit bd178fcaf0
23 changed files with 4001 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
{
"id": "blocking-voice",
"name": "Blocking + Voice Bug",
"description": "Fix blocked users can answer DM voice calls",
"task": "Fix: blocked users can still answer DM voice calls. When user A blocks user B, user B should not be able to answer calls from user A.",
"naive_fix": {
"description": "Add blocking check to answerDmCall()",
"changes": [
{
"file": "src/services/voice-channel.service.ts",
"function": "answerDmCall",
"change": "Add isBlockingEitherWay check before answering"
}
],
"issues": [
"Doesn't handle block created DURING active call",
"Doesn't clean up existing calls when block is created",
"Blocked users still receive call notifications"
]
},
"correct_fix": {
"description": "Full blocking enforcement following chat.service.ts pattern",
"required_changes": [
{
"file": "src/services/voice-channel.service.ts",
"function": "answerDmCall",
"change": "Add isBlockingEitherWay check",
"line_reference": "line 75"
},
{
"file": "src/services/voice-channel.service.ts",
"function": "declineDmCall",
"change": "Add isBlockingEitherWay check (consistency)",
"line_reference": "line 93"
},
{
"file": "src/services/voice-channel.service.ts",
"function": "notifyDmCall",
"change": "Filter notifications for blocked users",
"line_reference": "line 138"
},
{
"file": "src/services/user-block.service.ts",
"function": "blockUser",
"change": "Add voice cleanup: endDmCallBetweenUsers()",
"line_reference": "line 33"
}
],
"required_broker_subscriptions": [
{
"service": "voice-channel.service.ts",
"event": "BusUserBlockChange",
"action": "Kick users from DM voice when block is created mid-call"
}
],
"pattern_references": [
"chat.service.ts:sendMessage - shows correct action check pattern",
"chat.service.ts:getChannelPermission - shows permission vs action separation"
]
},
"validation_criteria": {
"must_mention": [
"answerDmCall",
"BusUserBlockChange",
"user-block.service",
"notifyDmCall"
],
"must_not_change": [
"voiceListen permission values",
"voiceTalk permission values"
],
"should_reference_pattern": "chat.service.ts"
}
}