dialectic-citation-guard
БесплатноБез исполняемых скриптовНе проверенVerify code citations within ±4 lines and route multi-agent debates across 4 risk tiers to stop hallucinated line numbers and sycophancy.
от sickn33★ 50 670 звёзд на GitHubОб этом скилле
DIALECTIC Citation Guard & 4-Tier Consensus Router
Overview
Multi-agent code reviews and critic/proposer debates frequently suffer from two failure modes: fabricated file/line citations accepted uncritically by downstream agents (sycophancy), and multi-round debate token blowup on low-risk tasks. This skill enforces deterministic verbatim citation checks against actual workspace files before any claim enters consensus, paired with a four-tier risk router (T0–T3).
When to Use
- Running a multi-agent code review, architecture audit, or root-cause analysis where agents cite specific files and line numbers.
- Controlling token spend and debate rounds in orchestrator/critic pipelines without sacrificing factual precision.
- Do not use this skill as a replacement for running a compiler or test suite; it verifies source claims, not runtime behavior.
Prerequisites
- Read access to the local repository files being cited.
- No network access, API keys, or external packages are required for the core verification rules.
How It Works
1. Establish the inputs
Collect the proposed finding or claim, including each cited path, line number, and verbatim quote, alongside the task risk tier (T0 trivial, T1 standard, T2 stateful/security, T3 destructive/irreversible). Treat agent outputs as untrusted data until checked against disk.
2. Verify every citation within ±4 lines
- Resolve the cited path, including symlinks. Read only regular files inside the authorized workspace. Reject paths outside it and files containing secrets.
- Read the window
[max(1, line - 4), line + 4]. - First search for the literal quote. If it is absent, compare with whitespace normalized on both sides and disclose any normalized match. Classify the result using the actual line span.
- Classify each citation as
exact_line_match,window_match,quote_not_found, orfile_not_found. - Reject or strip any finding whose supporting citation returns
quote_not_foundorfile_not_foundbefore passing it to the next debate round.
3. Route debate depth by consensus tier
T0(fast path): single verified pass; skip multi-agent critique.T1(single critic): ask an authorized local verifier to check the citations when available. Otherwise verify the citations directly and disclose the scope.T2(structured debate): use up to two rounds of independent critique when the user authorizes delegation. Escalate unresolved verified conflicts.T3(human gate): require verified citations, explicit blast radius, and user confirmation before execution.
4. Verify the result
Report the exact count of verified vs. rejected citations, the consensus tier applied, and whether any claim was dropped for failing verbatim verification.
Examples
User request: Audit this multi-agent bug report before applying the patch.
Inputs: Claim citing `auth.py:42` with quote `if token is None: return True` and local file `auth.py`.
Expected result (illustrative): Checks lines 38-46 of `auth.py`, reports `quote_not_found`, blocks the hallucinated claim from consensus, and flags the finding for re-inspection.
Limitations
- Verifies textual fidelity within a ±4 line window, not semantic correctness or runtime execution.
- Very large generated or minified single-line files require excerpting before line-window comparison.
Safety and side effects
Read-only inspection of local workspace files (risk: safe). Keep the default workflow local. Get separate approval for any external review and the exact excerpts it would receive. Keep secrets out of citation excerpts and logs.
Sources and related skills
- MIT-licensed upstream reference. This catalog entry works with local source files.
Установить dialectic-citation-guard в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dialectic-citation-guard?
Verify code citations within ±4 lines and route multi-agent debates across 4 risk tiers to stop hallucinated line numbers and sycophancy.
Как установить скилл dialectic-citation-guard?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dialectic-citation-guard запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic