Skip to content
Conduit

mcp server

ThreadForge

Local-first agent memory, task continuity, calibrated typed decisions, and regularized harness evolution across 25+ AI coding harnesses (Go + SQLite + MCP + OTLP + Python + TypeScript).

Rangow4562/ThreadForgecommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 27, 2026

Threadforge

Local-first memory, task continuity, calibrated typed decisions, and procedural learning for AI coding agents.

Release License Go Python Node Posture M8ven Score

Architecture • Feature Parity • Source Matrix • MCP Setup • Quick Start • Harness Matrix • Contributing • Commit Guide


Overview

Threadforge is the local-first successor architecture unifying and advancing the capabilities of Beacon, Mancode, AnyJev, and RRSI. Its core objective is to prevent repeated failure modes across disparate AI coding agent harnesses by enforcing strict source-freshness checking, cryptographic procedure provenance, revision-controlled task state, calibrated typed decisions, and verifiable evolution loops.

[!NOTE] Threadforge operates strictly local-first and loopback-only (127.0.0.1). It never transmits telemetry traces, private session stores, or raw credentials over external networks, and requires human-in-the-loop review for all memory promotions.

                      ┌──────────────────────────────────────────────┐
                      │    AI Coding Agents & IDE Harnesses          │
                      │ (Claude Code, Cursor, Codex, OpenCode, etc.) │
                      └──────────────────────┬───────────────────────┘
                                             │ Local MCP / Hooks / OTLP
                                             ▼
                      ┌──────────────────────────────────────────────┐
                      │            THREADFORGE CORE ENGINE           │
                      ├──────────────────────────────────────────────┤
                      │  • Loopback OTLP Ingest (:4318 / :4317)      │
                      │  • Local Memory & Procedure Graph Engine     │
                      │  • Revision-Checked CAS Task Store (SQLite)  │
                      │  • Deny-Only Plan Guards & Source Hashing    │
                      │  • AnyJev Calibration & Distillation Heads   │
                      │  • RRSI Screen, Critic & Repair Evaluator    │
                      └──────────────────────┬───────────────────────┘
                                             │ Loopback API / Web UI
                                             ▼
                      ┌──────────────────────────────────────────────┐
                      │       Local Developer Dashboard (:4318)      │
                      │  (Security Scanner, Context Graph, Telemetry)│
                      └──────────────────────────────────────────────┘

Core Pillars & Lineage

PillarLegacy OriginCore CapabilitiesPrimary CLI Commands
Telemetry, Security & MemoryBeaconLoopback OTLP/HTTP & gRPC intake, 25+ host adapter slices, CEL threat-rule scanner, 11 metadata-only SIEM sanitizer packs, and SHA-256 source-freshness-checked memory graphs.threadforge servethreadforge memorythreadforge procedurethreadforge securitythreadforge endpoint
Task & Session ContinuityMancodeCAS revision-controlled tasks, append-only requirements Q&A, repository-scoped task plans, 14 native session-store handoff readers, and Ed25519-signed team procedure sync.threadforge taskthreadforge sessionthreadforge handoffthreadforge teamthreadforge bootstrap
Calibrated Typed DecisionsAnyJevL0 cyclic-shift debiasing, L1 temperature scaling, L2 closed-form hidden-state heads, model block truncation, distillation pipeline, and fingerprint-pinned vLLM inference.threadforge decision calibratethreadforge decision artifactthreadforge decision distillthreadforge decision benchmark
Harness Self-ImprovementRRSILeakage critic screening (v3), bounded local repair, score/noise/token-cost candidate selection, pinned benchmark task derivation, and paired bootstrap evaluation.threadforge evolution screenthreadforge evolution criticthreadforge evolution repairthreadforge evolution select

Visual Architecture & Governance Lifecycle

System Architecture

Governed Memory & Continuity Lifecycle


Agent Harness Integrations

Threadforge integrates with over 20 AI coding agent harnesses and runtimes, providing modular adapters, MCP servers, prompt-time memory retrieval, and defense-in-depth task-plan guards.

Harness / RuntimeIntegration TypeApproved Memory RetrievalTask Continuity / Plan GuardLocal History PollerStatus & Documentation
AiderPortable approved procedure fileExplicit read-only --read argumentNoneNoneManual retrieval path (docs/aider.md)
Claude CodeNative Hooks + MCPUserPromptSubmit (local)Deny-only PreToolUse file guardJSONL Transcript PollerVerified Local Smoke (docs/claude-history.md)
Codex CLIHooks + OTLP + MCPUserPromptSubmit (local)Advisory continuity contextNative Session ReaderVerified Loopback OTLP (docs/codex-cli-telemetry.md)
CursorExtension + MCPsessionStart BootstrapDeny-only Write plan gateComposer DB & TranscriptsVerified Composer Sync (docs/cursor-history.md)
Gemini CLIProject Hooks + MCPBeforeAgent HookDeny-only BeforeTool guardLoopback OTLP IntakeVerified Tool Guard (docs/gemini-cli.md)
AntigravityPreInvocation HookInvocation 0 BootstrapScoped project-task contextLocal Telemetry SlicesVerified Hook Transport (docs/antigravity-cli.md)
OpenCodePlugin + TransformOpt-in prompt-time project memory (docs/opencode-memory.md)Project-scoped planning profileSession CLI PollerVerified Prompt-Memory Transport (docs/opencode-history.md)
ClinePlugin + Global MCP.cline/skills/ + advisory project ruleTask/Session/Kanban storesBounded History PollerVerified Package Build (docs/cline.md)
Qwen CodeProject Hooks + MCPUserPromptExpansionBest-effort deny-only file guardLoopback OTLP IntakeVerified Settings Lock (docs/qwen-code.md)
GitHub Copilot CLIPrompts + Skills + MCPOpt-in prompt-time approved memory (docs/copilot-cli-memory.md)Deny-only command hookEvents JSONL PollerVerified Prompt Installer (docs/copilot-prompts.md)
Command CodeProject Skills + MCP.commandcode/skills/Advisory continuity contextStdio ConfigurationVerified Skill Discovery (docs/command-code.md)
Windsurf / CascadeProject Skills.agents/skills/Advisory procedure guidanceLocal Project ScopeVerified Skill Placement (docs/windsurf-skills.md)
GooseAdvisory Instruction.goosehints TargetNon-blocking advisory contextSchema-v17 Session ReaderVerified Advisory Target (docs/goose-history.md)
Devin (CLI/Desktop/Cloud)Observation SliceProject Skills ExportLocal-only telemetry syncObservation HooksPartial / Observation-Only (docs/devin-cli.md)
DeepSeek HarnessHooks + Skills.dsh/skills/Advisory continuity contextJSONL/Zstandard PollerVerified History Sync (docs/deepseek-harness.md)
Hermes AgentPrint-only HooksYAML ConfigurationAdvisory continuity contextRead-only SQLite PollerRead-Only Inspection (docs/hermes.md)
OpenHandsProject Hooks.agents/skills/Async non-authorizing telemetryHook DispatcherVerified Hook Placement (docs/openhands.md)
OpenClawGateway PluginLoopback IntakeBounded fail-open pluginOTLP Event ValidatorVerified Gateway Plugin (docs/openclaw-gateway.md)
Browser ExtensionChrome / ChromiumLoopback ReceiverWeb session observationLocal Replay SuiteVerified Privacy Suite (docs/browser-extension.md)

Quick Start

1. Prerequisites

  • Go: 1.25 or newer
  • Python: 3.12 or newer (managed via python/pyproject.toml)
  • Node.js: 22.19 or newer (for @threadforge/adapter-contracts)

2. Launch Local Loopback Service & Web Dashboard

Start the local Threadforge daemon with loopback OTLP collectors and the developer dashboard:

# Starts OTLP/HTTP on 127.0.0.1:4318 and OTLP/gRPC on 127.0.0.1:4317
threadforge serve --project-root .

Open your browser to:

  • Developer Dashboard: http://127.0.0.1:4318/dashboard/
  • Context API v2: http://127.0.0.1:4318/v2/context
  • Liveness & Health: http://127.0.0.1:4318/healthz

3. Task Continuity & Checkpoint Tracking

Maintain cross-session task state, requirements, and progress without leaking private tokens:

# 1. Create a CAS-tracked task
threadforge task create \
  --id fix-parser \
  --project-id my-repo \
  --title "Fix parser nested quote regression" \
  --objective "Restore nested quote tokenization in AST parser" \
  --criterion "Nested quote fixture tests pass without regressions"

# 2. Advance task progress (CAS expected-revision check)
threadforge task update \
  --id fix-parser \
  --expected-revision 1 \
  --status in_progress \
  --next-action "Add regression reproduction unit test"

# 3. Associate an active harness session and record a handoff
threadforge session start --id parser-session-1 --task-id fix-parser --harness codex-cli
threadforge task record \
  --id parser-handoff-1 \
  --project-id my-repo \
  --task-id fix-parser \
  --session-id parser-session-1 \
  --kind handoff \
  --summary "Reproduction isolated in test fixture; implement parser state reset next"

# 4. Close session with structured summary
threadforge session update \
  --id parser-session-1 \
  --expected-revision 1 \
  --close \
  --summary "Reproduced the issue and confirmed fixture failure"

4. Source-Bound Project Memory & Procedures

Publish human-approved, tamper-evident facts, decisions, and procedures bound to exact source file digests:

# 1. Calculate source fingerprints for referenced files
threadforge memory fingerprint --project-root . --path src/parser.go --path src/tokens.go

# 2. Publish an approved, privacy-reviewed memory candidate
threadforge memory publish \
  --project-root . \
  --file examples/project-memory-candidate.json \
  --expected-revision 0 \
  --reviewer "Lead Architect" \
  --reason "Reviewed parser quote escape requirements" \
  --privacy-reviewed

# 3. Verify exact scope and source freshness on retrieval
threadforge memory read \
  --project-root . \
  --project-id my-repo \
  --kind decision \
  --id parser-quote-handling

5. AI Harness MCP Integration

Generate or automatically configure Model Context Protocol (MCP) tool bindings for your agent harnesses:

# Print generic stdio MCP configuration JSON or TOML
threadforge mcp print-config --project-root . --command threadforge --format json

# Or plan and install directly for supported hosts (Claude Code, Cursor, Codex, OpenCode, etc.)
threadforge bootstrap mcp install --host claude-code --project-root .

Technical Deep Dives

1. Governed Task Plans & Deny-Only Plan Gating

  • Requirements Q&A: Tasks begin with formal, append-only requirements. Operators record clarifications using task requirements ask|answer and finalize them before plan confirmation.
  • Deterministic Scaffolding: Generate plan scaffolds with threadforge task plan template --id <task-id>, edit repository-scoped file inclusion/exclusion rules, and store via threadforge task plan revise.
  • Deny-Only Guardrails: For Claude Code, Qwen Code, Gemini CLI, and GitHub Copilot CLI, Threadforge installs optional local hooks that deny unauthorized direct file modifications outside confirmed plan scopes. These hooks never grant execution permissions and operate purely as defense-in-depth safety checks.

2. Cryptographic Provenance & Team Sync

  • Ed25519 Signatures: Shared procedure records require signing keys pinned out-of-band by team administrators. Unsigned, altered, or stale records are withheld during retrieval.
  • Git-Ref Sync: threadforge team sync pull|push synchronizes only signed, sanitized JSON records through a dedicated Git ref. Raw traces, session transcripts, local SQLite state, credentials, and worktrees are never transferred.
  • Audited Decommissioning: Team scopes can be frozen via threadforge team scope decommission, halting continuity writes while permanently preserving append-only audit logs.

3. Calibrated Decisions & Distillation (AnyJev)

  • Calibration Engine: Implements L0 cyclic-shift debiasing, L1 temperature scaling, and L2 closed-form hidden-state classification heads to calibrate model confidence before tool execution.
  • Distillation Pipeline: Composes case generation, synthetic extraction, gold feature extraction (H/y/K/layers), model fitting, and same-state soft-target replay (threadforge decision distill pipeline).
  • Benchmarking: Validates model depth, ECE (Expected Calibration Error), and inference latency over loopback vLLM endpoints (threadforge decision benchmark pipeline).

4. Self-Improving Harness Evolution (RRSI)

  • Task Screening & Leakage Critics: Automatically verifies test tasks against benchmark contamination using v3 leakage critics.
  • Bounded Local Repair: Executes iterative repair attempts within bounded cost, token, and noise budgets (threadforge evolution repair).
  • Paired Bootstrap Evaluation: Conducts rigorous non-parametric bootstrap resampling (v1 and v2) across baseline and candidate runs (Terminal-Bench 2.1, SWE-bench Verified, Harvey LAB, JobBench, EngDesign).

5. Enterprise SIEM & Telemetry Sanitizer Packs

Threadforge includes 11 local metadata-only sanitizer packs that format runtime telemetry for enterprise security pipelines without exposing sensitive code, prompts, or credentials:

  • Cloud Object Stores: Amazon S3 (endpoint s3), Google Cloud Storage (endpoint gcs).
  • Logging & SIEM: AWS CloudWatch (endpoint cloudwatch), Splunk HEC (endpoint splunk-hec), CrowdStrike Falcon (endpoint falcon-hec), Datadog Agent (endpoint datadog), Sumo Logic (endpoint sumo), Rapid7 InsightIDR (endpoint rapid7), Wazuh SIEM (endpoint wazuh), Microsoft Sentinel (endpoint sentinel), Elasticsearch (endpoint elasticsearch).

Privacy & Security Posture

[!IMPORTANT] Core Architectural Guarantees:

  1. Zero Autonomous Model Invocations: Neither hooks nor telemetry pollers ever invoke an external LLM autonomously. memory learn and decision commands must be explicitly invoked by human operators.
  2. Loopback-Only Network Binding: All internal daemon listeners (:4318, :4317) enforce loopback IP addresses (127.0.0.1), blocking unauthorized LAN or WAN ingress.
  3. Automatic Stale-Data Withholding: Whenever source code files drift from their recorded SHA-256 fingerprints, associated project memory records are immediately marked unverified and withheld from agent prompts.
  4. No Raw Trace Forwarding: SIEM packs export strictly allowlisted, metadata-only projections (timestamps, severity, error codes); prompt bodies, tool outputs, and environment variables stay local.
  5. Read-Only Cutover Gating: Legacy system replacement is governed by threadforge cutover assess, a fail-closed verification evaluator requiring full feature parity, held-out outcome evidence, and cryptographic human sign-offs.

Development & Verification

Running the Comprehensive Test Suite

Execute all cross-ecosystem test suites (Go core, Python modules, TypeScript adapters, browser extension, and host smokes) via the automated test harness:

# Run full verification suite on Windows
./test.ps1
# Run Go unit and integration tests
go test ./...

# Verify CLI compilation and version output
go run ./cmd/threadforge version

# Validate procedure graph schemas
go run ./cmd/threadforge procedure validate --file examples/procedure-graph.json

# Run TypeScript adapter contracts test suite
cd adapters
npm test
npm run test:package

Documentation Index


License

Threadforge is licensed under the Apache License, Version 2.0.

↑↓ navigate openesc close