agentleFS
shynlee04shynlee04/hivemind-plugin/skills/parallel-debugging-hivemind/SKILL.md

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…

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
  1. Distinctive:

    If none confirmed → return to Phase 1 with new information

    line 104
  2. Distinctive:

    Verify with test suite

    line 108
  3. Distinctive:

    Run same test across different environments:

    line 114
  4. Distinctive:

    Test with different dependency versions:

    line 126
  5. Distinctive:

    Test from different session states:

    line 137
  6. Distinctive:

    Run multiple agents trying to trigger the same bug:

    line 149

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 PARALLEL

This 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 findings

Method 3: First-Winner Stops Others

// If any agent confirms hypothesis first
// Other agents stop and report status

Pre-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 testing
  • debug-orchestration: For orchestrating complex debug sessions
  • hivemind-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/

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.