cross-review-project
О программе
Этот навык позволяет двум экземплярам Claude Code проводить взаимные структурированные ревью кода через выделенного MCP-брокера. Он обеспечивает качество проверки с помощью законов масштабирования QSG, которые предписывают минимальный уровень детализации в обратной связи и контролируют прогресс через поэтапные стадии. Используйте его для автоматизированного, основанного на факторах взаимного ревью между отдельными кодовыми базами в рамках мультиагентного рабочего процесса.
Быстрая установка
Claude Code
Рекомендуетсяnpx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/cross-review-projectСкопируйте и вставьте эту команду в Claude Code для установки этого навыка
Документация
Cross-Review Project
Two Claude Code instances review each other's projects through structured artifact exchange via cross-review-mcp broker. Broker enforces Quantized Simplex Gossip (QSG) scaling laws — review bundles must have at least 5 findings to stay in selection regime (Γ_h ≈ 1.67). Stops shallow consensus from passing as agreement.
When Use
- Two projects share architectural concerns, could learn from each other
- Want independent code review going beyond what single reviewer sees
- Cross-pollination is goal: finding patterns in one project missing in other
- Need structured, evidence-backed review with accept/reject/discuss verdicts
Inputs
- Required: Two project paths accessible to two Claude Code instances
- Required:
cross-review-mcpbroker running and configured as MCP server in both instances - Optional: Focus areas — specific directories, patterns, or concerns to prioritize
- Optional: Agent IDs — identifiers for each instance (default: project directory name)
Steps
Step 1: Verify Prerequisites
Confirm broker running. Both instances can reach it.
- Check broker configured as MCP server:
claude mcp list | grep cross-review - Call
get_statusto verify broker responsive. No stale agents registered. - Read protocol resource at
cross-review://protocol— markdown document describing review dimensions and QSG constraints
Got: Broker responds to get_status with empty agent list. Protocol resource readable as markdown.
If fail: Broker not configured? Add it: claude mcp add cross-review-mcp -- npx cross-review-mcp. Stale agents from prior session? Call deregister for each before proceeding.
Step 2: Register
Register this agent with broker.
- Call
registerwith:agentId: short, unique identifier (e.g., project directory name)project: project namecapabilities:["review", "suggest"]
- Verify registration by calling
get_status— your agent should show with phase"registered" - Wait for peer agent to register: call
wait_for_phasewith peer's agent ID and phase"registered"
Got: Both agents registered with broker. get_status shows 2 agents at phase "registered".
If fail: register fails with "already registered"? Agent ID taken from prior session. Call deregister first, then re-register.
Step 3: Briefing Phase
Read own codebase. Send structured briefing to peer.
- Read systematically:
- Entry points (main files, index, CLI commands)
- Dependency graph (package.json, DESCRIPTION, go.mod)
- Architectural patterns (directory structure, module boundaries)
- Known issues (TODO comments, open issues, tech debt)
- Test coverage (test directories, CI configuration)
- Compose
Briefingartifact — structured summary peer can use to navigate your codebase - Call
send_taskwith:from: your agent IDto: peer agent IDtype:"briefing"payload: JSON-encoded briefing
- Call
signal_phasewith phase"briefing"
Got: Briefing sent and phase signaled. Broker enforces you must send briefing before advancing to review.
If fail: send_task rejects briefing? Check from field matches your registered agent ID. Self-sends rejected.
Step 4: Review Phase
Wait for peer's briefing. Review their code. Send findings.
- Call
wait_for_phasewith peer's ID and phase"briefing" - Call
poll_tasksto retrieve peer's briefing - Call
ack_taskswith received task IDs — required (peek-then-ack pattern) - Read peer's actual source code, informed by their briefing
- Produce findings across 6 categories:
pattern_transfer— pattern in your project peer could adoptmissing_practice— practice peer lacks (testing, validation, error handling)inconsistency— internal contradiction within peer's codebasesimplification— unnecessary complexity that could be reducedbug_risk— potential runtime failure or edge casedocumentation_gap— missing or misleading documentation
- Each finding must include:
id: unique identifier (e.g.,"F-001")category: one of 6 categories abovetargetFile: path in peer's projectdescription: what you foundevidence: why this is valid finding (code references, patterns)sourceAnalog(recommended): equivalent in your own project showing pattern — single mechanism for genuine cross-pollination
- Bundle at least 5 findings (QSG constraint: m ≥ 5 keeps Γ_h ≈ 1.67 in selection regime)
- Call
send_taskwith type"review_bundle"and JSON-encoded findings array - Call
signal_phasewith phase"review"
Got: Review bundle accepted by broker. Fewer than 5 findings rejected.
If fail: Bundle rejected for insufficient findings? Review more deeply. Constraint exists to stop shallow reviews from dominating. Cannot find 5 issues? Reconsider whether cross-review is right tool for this project pair.
Step 5: Dialogue Phase
Receive findings about own project. Respond with evidence-backed verdicts.
- Call
wait_for_phasewith peer's ID and phase"review" - Call
poll_tasksto retrieve findings about your project - Call
ack_taskswith received task IDs - For each finding, produce
FindingResponse:findingId: matches finding's IDverdict:"accept"(valid, will act on it),"reject"(invalid, with counter-evidence), or"discuss"(needs clarification)evidence: why you accept or reject — must be non-emptycounterEvidence(optional): specific code references that contradict finding
- Send all responses via
send_taskwith type"response" - Call
signal_phasewith phase"dialogue"
Note: "discuss" verdict not gated by protocol — treat as flag for manual follow-up, not automated sub-exchange.
Got: All findings responded to with verdicts. Empty responses rejected by broker.
If fail: Cannot form opinion on finding? Default to "discuss" with evidence explaining what extra context you need.
Step 6: Synthesis Phase
Produce synthesis artifact summarizing accepted findings and planned actions.
- Call
wait_for_phasewith peer's ID and phase"dialogue" - Poll any remaining tasks and ack them
- Compile
Synthesisartifact:- Accepted findings with planned actions (what you will change and why)
- Rejected findings with reasons (preserves reasoning for future review)
- Call
send_taskwith type"synthesis"and JSON-encoded synthesis - Call
signal_phasewith phase"synthesis" - Optionally create GitHub issues for accepted findings
- Call
signal_phasewith phase"complete" - Call
deregisterto clean up
Got: Both agents reach "complete". Broker requires at least 2 registered agents to advance to complete.
If fail: Peer already deregistered? Can still complete locally. Compile synthesis from findings received.
Checks
- Both agents registered and reached
"complete"phase - Briefings exchanged before reviews began (phase enforcement)
- Review bundles had at least 5 findings each
- All findings received verdict (accept/reject/discuss) with evidence
-
ack_taskscalled after everypoll_tasks - Synthesis produced with accepted findings mapped to actions
- Agents deregistered after completion
Pitfalls
- Fewer than 5 findings: Broker rejects bundles with m < 5. Not arbitrary — with N=2 agents and 6 categories, m < 5 puts Γ_h at or below critical boundary where consensus indistinguishable from noise. Review more deeply. 5 findings genuinely cannot be found? Projects may not benefit from cross-review.
- Forgetting
ack_tasks: Broker uses peek-then-ack delivery. Tasks stay in queue until acknowledged. Forgetting to ack → duplicate processing on next poll. - Forgetting the
fromparameter:send_taskrequires explicitfromfield matching your agent ID. Self-sends rejected. - Same-model epistemic correlation: Two Claude instances share training biases. Temporal ordering ensures they don't read each other's output during review, but priors correlated. For genuine epistemic independence, use different model families across instances.
- Skipping
sourceAnalog:sourceAnalogfield optional but single mechanism for genuine cross-pollination — shows your implementation of pattern you're recommending. Always populate it when source analog exists. - Treating
discussas blocking: Nothing in protocol gatescompleteon pending discussions being resolved. Treatdiscussverdicts as flags for manual follow-up after session. - Not reviewing telemetry: Broker logs all events to JSONL. After session, review log to validate QSG assumptions — estimate α empirically (
α ≈ 1 - reject_rate) and check per-category accept rates.
See Also
scaffold-mcp-server— for building or extending broker itselfimplement-a2a-server— A2A protocol patterns broker draws fromreview-codebase— single-agent review (this skill extends it to cross-agent structured exchange)build-consensus— swarm consensus patterns (QSG is theoretical foundation)configure-mcp-server— configuring broker as MCP server in Claude Codeunleash-the-agents— can analyze broker itself (battle-tested: 40 agents, 10 hypothesis families)
GitHub репозиторий
Похожие навыки
qmd
Разработкаqmd — это локальный инструмент командной строки для поиска и индексирования, который позволяет разработчикам индексировать и осуществлять поиск по локальным файлам с использованием гибридного поиска, сочетающего BM25, векторные эмбеддинги и реранкинг. Он поддерживает как использование через командную строку, так и режим MCP (Model Context Protocol) для интеграции с Claude. Инструмент использует Ollama для создания эмбеддингов и хранит индексы локально, что делает его идеальным для поиска по документации или кодовой базе прямо из терминала.
subagent-driven-development
РазработкаЭтот навык выполняет планы реализации, создавая нового суб-агента для каждой независимой задачи, проводя проверку кода между задачами. Он позволяет быстро итерировать, сохраняя контроль качества через этот процесс ревью. Используйте его при работе в основном с независимыми задачами в рамках одной сессии, чтобы обеспечить непрерывный прогресс со встроенными проверками качества.
mcporter
РазработкаНавык mcporter позволяет разработчикам управлять и вызывать серверы Model Context Protocol (MCP) напрямую из Claude. Он предоставляет команды для вывода списка доступных серверов, вызова их инструментов с аргументами, а также для обработки аутентификации и управления жизненным циклом демона. Используйте этот навык для интеграции и тестирования функциональности серверов MCP в вашем рабочем процессе разработки.
adk-deployment-specialist
РазработкаЭтот навык развертывает и оркестрирует агентов Vertex AI ADK с использованием протокола A2A, управляя обнаружением AgentCard, отправкой задач и поддерживая инструменты, такие как песочница для выполнения кода и Memory Bank. Он позволяет создавать мультиагентные системы с последовательными, параллельными или циклическими схемами оркестрации на Python, Java или Go. Используйте его, когда требуется развернуть агентов ADK или оркестрировать рабочие процессы агентов в Google Cloud.
