协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
cross-review-project【开发与工程】Conduct a structured cross-project code review between two Claude Code instances via the cross-review-mcp broker. Each agent reads its own codebase, reviews the peer's code, and engages in evidence-backed dialogue — with QSG scaling laws enforcing review quality through minimum bandwidth constraints and phase-gated progression.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
cross-review-mcp broker running and configured as MCP server in both instancesConfirm broker running. Both instances can reach it.
claude mcp list | grep cross-review
get_status to verify broker responsive. No stale agents registered.cross-review://protocol — markdown document describing review dimensions and QSG constraintsGot: 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.
Register this agent with broker.
register with:
agentId: short, unique identifier (e.g., project directory name)project: project namecapabilities: ["review", "suggest"]get_status — your agent should show with phase "registered"wait_for_phase with 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.
Read own codebase. Send structured briefing to peer.
Briefing artifact — structured summary peer can use to navigate your codebasesend_task with:
from: your agent IDto: peer agent IDtype: "briefing"payload: JSON-encoded briefingsignal_phase with 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.
Wait for peer's briefing. Review their code. Send findings.
wait_for_phase with peer's ID and phase "briefing"poll_tasks to retrieve peer's briefingack_tasks with received task IDs — required (peek-then-ack pattern)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 documentationid: 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-pollinationsend_task with type "review_bundle" and JSON-encoded findings arraysignal_phase with 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.
Receive findings about own project. Respond with evidence-backed verdicts.
wait_for_phase with peer's ID and phase "review"poll_tasks to retrieve findings about your projectack_tasks with received task IDsFindingResponse:
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 findingsend_task with type "response"signal_phase with 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.
Produce synthesis artifact summarizing accepted findings and planned actions.
wait_for_phase with peer's ID and phase "dialogue"Synthesis artifact:
send_task with type "synthesis" and JSON-encoded synthesissignal_phase with phase "synthesis"signal_phase with phase "complete"deregister to clean upGot: 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.
"complete" phaseack_tasks called after every poll_tasksack_tasks: Broker uses peek-then-ack delivery. Tasks stay in queue until acknowledged. Forgetting to ack → duplicate processing on next poll.from parameter: send_task requires explicit from field matching your agent ID. Self-sends rejected.sourceAnalog: sourceAnalog field optional but single mechanism for genuine cross-pollination — shows your implementation of pattern you're recommending. Always populate it when source analog exists.discuss as blocking: Nothing in protocol gates complete on pending discussions being resolved. Treat discuss verdicts as flags for manual follow-up after session.α ≈ 1 - reject_rate) and check per-category accept rates.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)