collaborative-knowledge-compounding

collaborative-knowledge-compounding is a command for Claude Code from glassBead-tc/widescreen-research. It costs 0 tokens per session (6,220 once invoked), scanned A, original, MIT.

A multi-agent research workflow where several agents investigate a question and record findings, evidence, hypotheses, and summaries in one shared notebook.

In plain words
What is it for?
Use it to investigate a research topic, find academic papers and implementation examples, test hypotheses, and combine results across repeated research rounds.
Why use it?
It keeps research knowledge in one place so later rounds can build on earlier work instead of repeating it.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/glassbead-tc/widescreen-research/collaborative-knowledge-compounding
Clone the repo
git clone --depth 1 https://github.com/glassBead-tc/widescreen-research

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for collaborative-knowledge-compounding

README.md
[![agentmods](https://agentmods.dev/badge/commands/glassbead-tc/widescreen-research/collaborative-knowledge-compounding.svg)](https://agentmods.dev/commands/glassbead-tc/widescreen-research/collaborative-knowledge-compounding)
Your own site
<a href="https://agentmods.dev/commands/glassbead-tc/widescreen-research/collaborative-knowledge-compounding"><img src="https://agentmods.dev/badge/commands/glassbead-tc/widescreen-research/collaborative-knowledge-compounding.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,220 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.06220
Opus 5 $0.00000 $0.03110
Sonnet 5 $0.00000 $0.01244
Haiku 4.5 $0.00000 $0.00622

Measured 4d ago against content hash aeaf38d058b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

collaborative-knowledge-compounding scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/research/collaborative-knowledge-compounding.md · 895 lines

How it starts

The opening of the file, as written. The whole thing — 895 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Collaborative Knowledge Compounding

Pattern: Multi-agent iterative research with shared notebook workspace Based on: AgentRxiv (arXiv:2503.18102) - "Collaborative Autonomous Research" Key Finding: Agents with shared research repository achieve 11-14% better results through compounding knowledge


Usage

/collaborative-knowledge-compounding "Research topic" [num_agents] [num_iterations]

Arguments:

  • $ARGUMENTS (required): Research topic or question
  • num_agents (optional): Number of research agents (default: 3, max: 5)
  • num_iterations (optional): Research rounds (default: 3, max: 7)

Architecture

Shared Workspace: Srcbook Notebook

All agents collaborate through a shared .src.md notebook that tracks:

  • Research findings from each agent
  • Hypotheses generated and tested
  • Evidence collected
  • Synthesis across iterations
  • State tracker (deterministic)

Agent Specializations

Agent 1: Literature Scout

  • Role: Find and retrieve academic papers
  • Tools: arxiv-paper-mcp, exa (discovery), firecrawl (known URLs)
  • Output: Raw paper data + metadata

Agent 2: Technical Analyst

  • Role: Find implementation examples and code
  • Tools: exa__get_code_context_exa, context7, firecrawl
  • Output: Code examples + technical specs

Agent 3: Synthesis Specialist

  • Role: Read other agents' findings, identify patterns
  • Tools: Read notebook cells, compare findings
  • Output: Cross-agent insights + research gaps

Agent 4: Hypothesis Generator (if num_agents > 3)

  • Role: Propose testable claims based on synthesis
  • Tools: Reads all prior work
  • Output: Novel hypotheses to explore

Agent 5: Validation Specialist (if num_agents = 5)

  • Role: Cross-check claims across agents
  • Tools: Targeted searches to verify/refute
  • Output: Confidence scores + contradictions

Workflow

Phase 0: Initialize Shared Notebook

Creates: .collaborative-research/research-notebook.src.md

<!-- srcbook:{"language":"typescript"} -->

# Collaborative Research: [Topic]
**Started**: [Timestamp]
**Agents**: [num_agents]
**Iterations**: 0 / [num_iterations]

---

###### package.json
\`\`\`json
{
  "type": "module",
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.17.1"
  }
}
\`\`\`

---

## Research State Tracker

###### state-tracker.ts
\`\`\`typescript
// DETERMINISTIC STATE ONLY - No intelligence
export interface ResearchState {
  iteration: number;
  maxIterations: number;
  agents: AgentState[];
  evidenceCollected: number;
  hypothesesGenerated: number;
  hypothesesValidated: number;
  synthesisComplete: boolean;
}

export const state: ResearchState = {
  iteration: 0,
  maxIterations: 3,
  agents: [
    { id: 'agent-1', role: 'literature-scout', status: 'pending', evidenceCount: 0 },
    { id: 'agent-2', role: 'technical-analyst', status: 'pending', evidenceCount: 0 },
    { id: 'agent-3', role: 'synthesis-specialist', status: 'pending', evidenceCount: 0 }
  ],
  evidenceCollected: 0,
  hypothesesGenerated: 0,
  hypothesesValidated: 0,
  synthesisComplete: false
};

// State tracker functions (deterministic only)
export function recordEvidence(agentId: string, count: number): void {
  const agent = state.agents.find(a => a.id === agentId);
  if (agent) {
    agent.evidenceCount += count;
    state.evidenceCollected += count;
  }
}

export function getAgentStatus(agentId: string): string {
  return state.agents.find(a => a.id === agentId)?.status || 'unknown';
}

export function canProceedToIteration(): boolean {
  // Deterministic gate check
  return state.evidenceCollected >= 20 &&
         state.agents.every(a => a.status === 'complete');
}

console.log('State tracker initialized:', state);
\`\`\`

---

## Iteration 0: Initial Exploration

### Agent 1: Literature Scout

###### agent1-iteration0-search.ts
\`\`\`typescript
import { state, recordEvidence } from './state-tracker.js';

// LLM provides search queries (intelligence)
const queries = [
  "[LLM will fill this in]",
  "[LLM will fill this in]"
];

// Agent executes deterministically
const results = {
  phase: 'literature-search',
  agent: 'agent-1',
  iteration: 0,
  queries_executed: queries.length,
  papers_found: 0,  // Will be updated by actual MCP calls
  raw_data: []
};

// State update (deterministic)
recordEvidence('agent-1', results.papers_found);

console.log('Agent 1 status:', results);
\`\`\`

###### agent1-iteration0-findings.ts
\`\`\`typescript
// AGENT 1 FINDINGS (Raw data only, no interpretation)
export const findings = {
  papers: [
    // Will be populated by arxiv-paper-mcp results
  ],
  metadata: {
    count: 0,
    date_range: "",
    categories: []
  }
};
\`\`\`

### Agent 2: Technical Analyst

###### agent2-iteration0-search.ts
\`\`\`typescript
import { state, recordEvidence } from './state-tracker.js';

// LLM provides search queries (intelligence)
const codeQueries = [
  "[LLM will fill this in]"
];

// Agent executes
const results = {
  phase: 'technical-search',
  agent: 'agent-2',
  iteration: 0,
  code_examples_found: 0,
  libraries_found: 0
};

recordEvidence('agent-2', results.code_examples_found);
console.log('Agent 2 status:', results);
\`\`\`

### Agent 3: Synthesis Specialist

###### agent3-iteration0-synthesis.ts
\`\`\`typescript
import { findings as agent1Findings } from './agent1-iteration0-findings.js';
import { findings as agent2Findings } from './agent2-iteration0-findings.js';

// LLM provides synthesis questions (intelligence)
// Agent reads data (deterministic)
const crossAgentPatterns = {
  common_themes: [],  // LLM identifies
  contradictions: [], // LLM identifies
  gaps: []           // LLM identifies
};

console.log('Synthesis complete for iteration 0');
\`\`\`

---

## Iteration 1: Building on Prior Work

[Repeat structure with agents building on iteration 0 findings]

---

## Final Synthesis

###### final-report.ts
\`\`\`typescript
// Aggregates all iterations
import { state } from './state-tracker.js';

const report = {
  research_topic: "[Topic]",
  iterations_completed: state.iteration,
  total_evidence: state.evidenceCollected,
  validated_findings: [],  // LLM provides
  novel_insights: [],      // LLM provides
  recommendations: []       // LLM provides
};

console.log('Research complete:', report);
\`\`\`
\`\`\`

---

## Execution Flow with Sub-Agents

### Iteration 0: Parallel Agent Deployment

**Claude Code spawns 3 sub-agents**:

```bash

Read the full file on GitHub · 895 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 895 lines · 0 tokens per session scan A aeaf38d058b4

Subscribe to this mod's changes

collaborative-knowledge-compounding is a command published in the GitHub repository glassBead-tc/widescreen-research (6 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,220 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.