parallel-debugging-hivemind
Skill51 starsChanged 7 months agoMITView on GitHub
This skill provides the parallel debugging methodology for HiveMind v3.0. It instructs agents on how to run multiple debugging hypotheses simultaneously using headless swarm agents. This skill DOES NOT execute code. It instructs the Agent on HOW to orchestrate parallel debugging using HiveMind swarm capabilities. Activate this skill when: - Multiple plausible root causes exist - Single-threaded debugging is too slow - You need to test different environmental configurations - The bug is non-deterministic or timing-dependent Step 1.1: List All…
In this repository17 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- .github/get-shit-done/templates/copilot-instructions.mdCopilot instructions
- context-first-gatekeepingSkill
- debug-orchestrationSkill
- delegation-intelligenceSkill
- hivefiver-bilingual-tutorSkill
- hivefiver-domain-pack-routerSkill
- hivefiver-gsd-compatSkill
- hivefiver-mcp-research-loopSkill
- hivefiver-persona-routingSkill
- hivefiver-ralph-taskingSkill
- hivefiver-skill-auditorSkill
- hivefiver-spec-distillationSkill
- hivemind-architect-strategistSkill
- hivemind-governanceSkill
- sequential-orchestrationSkill
- systematic-debugging-hivemindSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 104
If none confirmed → return to Phase 1 with new information
- Distinctive: line 108
Verify with test suite
- Distinctive: line 114
Run same test across different environments:
- Distinctive: line 126
Test with different dependency versions:
- Distinctive: line 137
Test from different session states:
- Distinctive: line 149
Run multiple agents trying to trigger the same bug:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: parallel-debugging-hivemind
Overview
This skill provides the parallel debugging methodology for HiveMind v3.0. It instructs agents on how to run multiple debugging hypotheses simultaneously using headless swarm agents.
Core Principle
WHEN ONE HYPOTHESIS IS UNCERTAIN, TEST MULTIPLE IN PARALLELThis skill DOES NOT execute code. It instructs the Agent on HOW to orchestrate parallel debugging using HiveMind swarm capabilities.
When to Use
Activate this skill when:
- Multiple plausible root causes exist
- Single-threaded debugging is too slow
- You need to test different environmental configurations
- The bug is non-deterministic or timing-dependent
The Parallel Debugging Workflow
Phase 1: Enumerate Hypotheses
Step 1.1: List All Possible Causes
Based on evidence gathered:
1. Hypothesis A: [cause] - because [evidence]
2. Hypothesis B: [cause] - because [evidence]
3. Hypothesis C: [cause] - because [evidence]Step 1.2: Prioritize
- Rank by likelihood
- Rank by ease of testing
- Identify which can run in parallel
Phase 2: Prepare Swarm Agents
Step 2.1: Create Swarm Configuration
// Each swarm agent gets:
// - Unique focus (one hypothesis)
// - systematic-debugging-hivemind skill injected
// - Limited scope (test just this hypothesis)
const swarmConfig = {
agents: [
{ id: "debug-A", focus: "Test hypothesis A: [specific cause]" },
{ id: "debug-B", focus: "Test hypothesis B: [specific cause]" },
{ id: "debug-C", focus: "Test hypothesis C: [specific cause]" }
],
coordination: "parallel"
}Step 2.2: Prepare Each Agent Each swarm agent should:
- Receive the systematic-debugging-hivemind skill
- Have clear success/failure criteria
- Report back via hivemind_cycle
Phase 3: Execute Parallel Testing
Step 3.1: Spawn Headless Researchers
// Use session-swarm.ts to spawn
import { spawnHeadlessResearcher } from "src/lib/session-swarm"
await spawnHeadlessResearcher({
taskId: "debug-A",
focus: "Verify hypothesis A",
context: {
hypothesis: "...",
testMethod: "...",
successCriteria: "..."
}
})Step 3.2: Monitor Progress
// Check swarm status
hivemind_inspect({ action: "scan" })Step 3.3: Collect Results
// Each agent calls export_cycle when done
hivemind_cycle({ action: "export" })Phase 4: Synthesize Results
Step 4.1: Analyze All Findings
- Which hypotheses were confirmed?
- Which were disproven?
- Any unexpected findings?
Step 4.2: Determine Winner
- Choose the confirmed hypothesis
- If none confirmed → return to Phase 1 with new information
Step 4.3: Implement Fix
- Apply fix for confirmed root cause
- Verify with test suite
HiveMind-Specific Parallel Patterns
Pattern 1: Environment Variation Testing
Run same test across different environments:
const envSwarm = [
{ id: "env-node18", env: { node: "18" }, focus: "Test with Node 18" },
{ id: "env-node20", env: { node: "20" }, focus: "Test with Node 20" },
{ id: "env-node22", env: { node: "22" }, focus: "Test with Node 22" }
]Pattern 2: Dependency Version Testing
Test with different dependency versions:
const depSwarm = [
{ id: "dep-v1", focus: "Test with dependency v1" },
{ id: "dep-v2", focus: "Test with dependency v2" }
]Pattern 3: State Variation Testing
Test from different session states:
const stateSwarm = [
{ id: "state-clean", setup: "clean state", focus: "Test from clean state" },
{ id: "state-loaded", setup: "loaded state", focus: "Test from loaded state" },
{ id: "state-compacted", setup: "compacted state", focus: "Test from compacted state" }
]Pattern 4: Race Condition Detection
Run multiple agents trying to trigger the same bug:
const raceSwarm = [
{ id: "race-1", focus: "Attempt to trigger race condition - try 1" },
{ id: "race-2", focus: "Attempt to trigger race condition - try 2" },
{ id: "race-3", focus: "Attempt to trigger race condition - try 3" }
]Coordination Mechanisms
Method 1: Broadcast Channel
// All agents share findings via graph/mems.json
hivemind_memory({ action: "save", shelf: "debug-results", content: "..." })Method 2: Aggregation Agent
// One agent collects all results
// Analyzes and synthesizes findingsMethod 3: First-Winner Stops Others
// If any agent confirms hypothesis first
// Other agents stop and report statusPre-Flight Checklist (BEFORE Output)
- Did I enumerate at least 2-3 hypotheses?
- Did I assign each hypothesis to a separate agent?
- Did I define clear success/failure criteria?
- Did I set up communication mechanism between agents?
- Did I prepare aggregation/synthesis step?
Constraints
- MAX 5 parallel agents (to prevent resource exhaustion)
- Each agent must report back via
hivemind_cycle({ action: "export" }) - If no hypothesis confirmed after 3 cycles, STOP and question the architecture
Related Skills
systematic-debugging-hivemind: For single-hypothesis testingdebug-orchestration: For orchestrating complex debug sessionshivemind-governance: For session management during parallel debugging
File References
- Swarm spawning:
src/lib/session-swarm.ts - Memory sharing:
graph/mems.json - State coordination:
.hivemind/state/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

