claude-harness

claude-harness

claude-harness•byanotherben

A governance harness for Claude Code and Codex CLI that bundles four MCP servers with quality gate hooks and enterprise workflow skills.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Cortex Engine indexes a codebase into a SQLite store with AST parsing so agents query specific symbols instead of reading whole files.
  • •cortex-memory indexes Claude and Codex session transcripts into a searchable store for recalling prior decisions and implementation context.
  • •vault-index provides a query engine over an Obsidian vault with tools to list, search, claim, complete, and coordinate items.
  • •skills-index indexes skills and policy notes into typed markdown sections for section-level retrieval.

BEST FOR

  • •Agents that need to find and read specific code symbols without pulling entire files into context.
  • •Recovering context from prior agent sessions across Claude Code and Codex CLI.
  • •Teams managing tasks, bugs, and decisions in an Obsidian vault that agents query and coordinate against.

ABOUT CLAUDE-HARNESS

claude-harness is cataloged as an MCP server attributed to anotherben. A governance harness for Claude Code and Codex CLI that bundles four MCP servers with quality gate hooks and enterprise workflow skills. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for claude-harness are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does claude-harness install its MCP servers globally?

Yes, the global install sets up the four bundled MCP servers and registers them in both Claude and Codex configuration.

What languages does Cortex Engine support?

Cortex Engine supports eight tree-sitter languages: JavaScript, TypeScript, TSX, Python, Go, Rust, Java, and C#.

Upstream README

View this exact version on GitHub

README.md · 53058c3162e1 · Fetched 2026-11-13 10:24:06 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

claude-harness

Welcome to claude-harness.

Vibe prompt in, enterprise quality out.

A governance harness for Claude Code and Codex CLI that enforces planning, TDD, evidence-based verification, independent review, and institutional knowledge capture — through hooks that can't be bypassed.

This is the main entrypoint for the platform and the fastest way to get a project into enterprise mode is:

  • ./install.sh --global (recommended for most environments)
  • ./install.sh --project <path> for repo-specific MCP wiring
  • ./scripts/install-codex-overhead-savings.sh to install the portable Codex startup-overhead reduction bundle on another server

Current release: v2.2.2

v2.2.2 — welcome page refreshed and startup guidance clarified. The main README now includes clearer entrypoint onboarding, including the recommended global install path for getting projects into enterprise mode.

Four built-in MCP servers. An Obsidian vault as the shared brain. 71 MCP tools across code, memory, vault, and skill retrieval. 96 current skills. 47 quality gate hooks. 11 slash commands. Zero escape hatches.


What's New in v2.2.2

Welcome Flow Improvements

  • Main README onboarding now starts with an explicit welcome and quick-start guidance for common install paths.
  • Global install emphasis for new users to activate MCP and enterprise components with fewer steps.

What's New in v2.2.1

Global MCP Install That Just Works

  • Stable runtime home at ~/.claude-harness for bundled shared runtimes.
  • Global Claude registration now writes the harness MCP entries into ~/.claude.json.
  • Global Codex registration now reconciles codex mcp entries to the same runtime paths.
  • cortex-memory stays global at ~/.cortex-memory, with the installer ensuring both Claude and Codex point at it.

What's New in v2.2.0

Shared Memory, Not Single-Platform Memory

  • Bundled cortex-memory as a first-class MCP package in the harness distribution.
  • Cross-platform transcript recall with Claude and Codex session roots configured by default.
  • Installer + project wiring updated so .mcp.json, Codex MCP setup, and runtime checks all include the memory server.

Counts Updated

Componentv2.1.0v2.2.0
MCP servers34
MCP tools5771
Default transcript platforms12

What's New in v2.0.0

Global-First Architecture

  • Before (v1.x): Hooks and skills were copied into each project's .claude/ directory. They drifted out of sync, and agents exploited stale copies that lacked newer security gates.
  • After (v2.0): Everything installs to ~/.claude/ once. All projects share the same hooks and skills. Updates apply everywhere instantly. Per-project setup only creates .mcp.json and CLAUDE.md.

Anti-Bypass Protections

Attack VectorProtection
Agent touches plan-approval markerHMAC-signed markers — unsigned markers rejected
Agent touches vault-context markerHMAC-signed markers — unsigned markers rejected
Agent writes source files via Bash scriptsaudit-bash-file-writes.sh detects and reverts
Agent echos fake test summary to inflate countsOutput parser strips non-ANSI lines, uses last match
Agent hand-writes evidence JSONHMAC integrity signature on evidence files
Agent cp/sed -i to modify hooksblock-bash-file-writes.sh blocks write verbs on protected paths
Agent uses Edit/Write on hooks or settingsprotect-files.sh blocks unless claude-unlock code provided
Agent reads hook source to find exploit patternsHMAC salts are in the hooks themselves — forging requires the agent to deliberately commit fraud visible in the session transcript

claude-unlock — 2FA for Infrastructure Edits

When the agent legitimately needs to modify protected files (hook updates, settings changes), the user provides a one-time elevation code:

$ claude-unlock

  Elevation code: 847291
  Expires: 10 minutes
  Single use — burned after one write operation

The agent includes ELEVATE=847291 in its command or edit. The hook verifies the code, allows the write, and burns the code. Marker forgery (/tmp/claude-plan-approved-*) is never elevatable — no code can unlock it.

Install: cp ~/claude-harness/hooks/claude-unlock.sh /usr/local/bin/claude-unlock

Updated Counts

Componentv1.9.0v2.0.0
Hooks3744
Skills4264
Commands011
Install modes1 (per-project)4 (full, global, project, update)

Why This Exists

AI coding tools are powerful but undisciplined. Left to defaults, they:

  • Write code without tests, skip planning, claim "tests pass" without running them
  • Review their own work and approve it, commit without tracking what changed
  • Read entire files when they need one function, burning tokens and money
  • Route around enforcement hooks by writing source files via Bash scripts instead of Edit/Write tools
  • Forge gate markers by touching files that hooks check for existence

claude-harness makes it physically impossible to cut corners.


The Five Pillars

1. Cortex Engine — Code Intelligence MCP

Your agent reads a 400-line file (3,300 tokens) to find one function (380 tokens). 89% waste.

Cortex Engine indexes your entire codebase into a real-time SQLite store with AST parsing, semantic tags, and token-savings telemetry. Agents query specific symbols instead of reading files.

cortex_outline("src/routes/orders.js")
→ [function] createOrderRoutes      L1-200
    [route] POST /orders             L45-80
    [route] GET /orders/:id          L82-95
    [route] DELETE /orders/:id       L97-120

cortex_read_symbol("src/routes/orders.js", "POST /orders")
→ 380 tokens (vs 3,300 for full file — 89% saved, $0.04 saved on Opus)

30 MCP tools | 8 tree-sitter languages (JS, TS, TSX, Python, Go, Rust, Java, C#) | 22 file types | 7 source categories | 11 semantic tags | 333 tests

Full Cortex Engine documentation →

2. Skills Index — Token-Optimized Skill Retrieval

skills-index indexes skills and policy notes into typed markdown sections so agents can:

  • search skills without injecting the full catalog
  • read only Workflow, Checklist, or Template sections
  • compile fast local policy bundles for hook decisions
  • track token savings from section reads and blocked full-file reads

14 MCP tools | section-level retrieval | compiled policy bundles | telemetry-aware

3. Cortex Memory — Cross-Platform Recall

cortex-memory indexes agent session transcripts into a searchable SQLite + vector store so agents can recover prior decisions, bug hunts, and implementation context across platforms.

Default sources:

  • Claude Code: ~/.claude/projects
  • Codex CLI: ~/.codex/archived_sessions

It stays a recall layer, not the source of truth. The vault still owns tasks and state; cortex-memory answers "what did we discuss before?"

4 MCP tools | semantic session search | full-session retrieval | recent/project/all indexing | multi-platform transcript normalization

4. Obsidian Vault — The Shared Brain

Every bug, task, idea, and decision lives in an Obsidian vault. Two MCP servers connect agents to this brain:

vault-index — Query engine (23 MCP tools): list, search, claim, complete, coordinate cortex-engine — Knowledge store: annotate, recall, sync to Obsidian

Human captures idea → vault-capture routes to correct queue
                                ↓
Agent claims item → vault-index locks it → enterprise pipeline executes
                                ↓
Agent annotates learnings → cortex knowledge store → syncs to Obsidian
                                ↓
Next agent reads vault + knowledge → starts with full context

5. Quality Gate Hooks — Can't Be Bypassed

47 shell hooks intercept every action. Exit code 2 = hard block. The agent cannot proceed until the requirement is met. Markers are HMAC-signed — agents cannot forge them.

You: "Just push the fix"

Hook chain:
  ✗ block-bash-file-writes.sh          → "Write detected — use Edit/Write tools"
  ✗ require-vault-for-edits.sh         → "No HMAC-signed vault context"
  ✗ require-plan-before-edits.sh       → "No HMAC-signed plan approval"
  ✗ require-tdd-before-source-edit.sh  → "No tests. Write tests first."
  ✗ require-test-evidence.sh           → "No fresh HMAC-signed evidence"
  ✗ require-lint-clean.sh              → "ESLint errors. Fix them first."
  ✗ require-vault-update.sh            → "Vault not updated. Log this work first."
  ✓ All gates pass                     → Commit allowed

Architecture

~/.claude/                              # GLOBAL — single source of truth
├── hooks/          47 shell scripts    # Quality gates (HMAC-signed markers)
├── skills/         96 skill dirs       # Enterprise workflows
├── commands/       11 slash commands   # Quick actions
└── settings.json                       # Hook wiring → $HOME/.claude/hooks/

~/.claude-harness/                      # GLOBAL MCP runtime
├── cortex-engine/  Code intelligence MCP (30 tools, 8 languages)
├── skills-index/   Skill retrieval MCP (14 tools, section-aware)
└── hooks/          Optional runtime copy source for bundled components

~/claude-harness/                       # SOURCE REPO
├── cortex-engine/  Code intelligence MCP (30 tools, 8 languages)
├── skills-index/   Skill retrieval MCP (14 tools, section-aware)
├── cortex-memory/  Cross-platform memory MCP (4 tools, transcript recall)
├── vault-index/    Vault query MCP (23 tools, claim coordination)
├── hooks/          Source of truth for hooks
├── skills/         Source of truth for skills
├── commands/       Source of truth for commands
├── conductor/      Fleet dispatch scripts
├── templates/      Review lenses
├── tiers/          Enforcement configs (lite/standard/full)
└── install.sh      Global + project installer

your-project/                           # PER-PROJECT — minimal footprint
├── .mcp.json       MCP server registration (cortex, vault, skills, memory)
├── CLAUDE.md       Enforcement chain docs
└── .claude/
    └── evidence/   Test evidence JSON (HMAC-signed)

Quick Start

1. Clone and install globally

git clone https://github.com/<your-org>/claude-harness.git ~/claude-harness
cd ~/claude-harness && ./install.sh --global

This installs hooks, skills, commands, and settings to ~/.claude/, and sets up the four bundled MCP servers. It also installs the reusable runtimes under ~/.claude-harness/, ~/.vault-index/, and ~/.cortex-memory/, then registers them globally in both ~/.claude.json and codex mcp.

2. Set up a project

cd your-project
~/claude-harness/install.sh --project .

This creates .mcp.json (MCP server registration) and appends the enforcement section to CLAUDE.md. No hooks or skills are copied — they're global.

3. Update everything

cd ~/claude-harness && git pull && ./install.sh --update

All projects pick up the update immediately.

4. Register MCP servers (manual alternative)

Claude Code — add to ~/.claude.json:

{
  "mcpServers": {
    "cortex-engine": {
      "type": "stdio",
      "command": "/Users/you/.codex/bin/cortex-engine-wrapper.sh",
      "args": []
    },
    "skills-index": {
      "type": "stdio",
      "command": "node",
      "args": ["/Users/you/.claude-harness/skills-index/src/server.js"]
    },
    "cortex-memory": {
      "type": "stdio",
      "command": "node",
      "args": ["/Users/you/.cortex-memory/src/server.js"]
    },
    "vault-index": {
      "type": "stdio",
      "command": "node",
      "args": ["/Users/you/.vault-index/src/server.js"]
    }
  }
}

Codex CLI:

codex mcp add cortex-engine -- /Users/you/.codex/bin/cortex-engine-wrapper.sh
codex mcp add skills-index -- node ~/.claude-harness/skills-index/src/server.js
codex mcp add cortex-memory -- node ~/.cortex-memory/src/server.js
codex mcp add vault-index -- node ~/.vault-index/src/server.js

5. Set up Obsidian vault

mkdir -p ~/Documents/YourVault/{00-Inbox,01-Bugs,02-Tasks,03-Ideas,04-In-Progress,05-Archive,_standards,Projects}
export OBSIDIAN_VAULT_PATH=~/Documents/YourVault

6. Start working

You: "Add retry logic to the payment webhook"
Claude: [enterprise pipeline activates → discover → plan → contract → TDD → review → verify]

Skills — 63 Enterprise Workflows

The Enterprise Pipeline (9 stages + auto-bootstrap)

/enterprise-discover  →  Learn codebase (stack profile, traps, best practices)
/enterprise-brainstorm → Design (Technical Design Document)
/enterprise-plan      →  Steps (exact file paths, exact code, exact test commands)
/enterprise-contract  →  Spec (every postcondition traceable to a test + code line)
/enterprise-build     →  TDD (write test, fail, write code, pass — for every postcondition)
/enterprise-review    →  Review (spec compliance → code quality, separate concerns)
/enterprise-forge     →  Adversarial (5 attack lenses, bugs recycle to contract)
/enterprise-verify    →  Evidence (7-check sequence, fresh test output or don't claim done)
/enterprise-compound  →  Capture (institutional knowledge → searchable, tagged, persistent)

Run /enterprise to orchestrate the full pipeline.

Full-Cycle Variants

SkillFocus
/full-cycleComplete structured workflow (Agent Harness + Superpowers + Compound)
/full-cycle-tddTDD-first — every task starts with a failing test
/full-cycle-researchResearch-heavy — 8+ parallel research agents before code
/full-cycle-fastLightweight — minimal ceremony for small changes

Vault Management

SkillWhat
/vault-contextPre-session briefing from vault
/vault-captureQuick-capture bugs, tasks, ideas
/vault-updateMove items through lifecycle
/vault-statusCross-project dashboard
/vault-triageWalk through inbox items
/vault-sweepWeekly accountability check
/vault-initBootstrap new project
/vault-processAutonomous queue processor

Code Quality

SkillWhat
/enterprise-debug4-phase systematic debugging with blast radius scan
/scope-checkVerify no scope creep before commit
/contract-managerMechanical spec before any implementation
/patch-or-fixRoot cause fix or just a patch?
/run-verificationFull verification pipeline
/plan-360-auditReview plans before passing a planning gate

Deep Debug Variants

SkillWhat
/b-deep-debug5 Whys root-cause analysis (read-only, never changes code)
/b-deep-debug-apiAPI endpoint crashes and frontend display bugs
/b-deep-debug-syncData sync bugs (REX SOAP, Shopify, pipeline)
/b-deep-debug-concurrencyRace conditions, duplicate processing, idempotency

Fleet & Multi-Agent

SkillWhat
/fleet-commanderMulti-orchestrator dispatch with model routing
/conductor-resumeResume interrupted fleet from checkpoint

Architecture & Analysis

SkillWhat
/senior-architectSystem design, tech decisions
/but-whyDrill to root causes before acting
/enterprise-harness10-check quality gate before merge

Session & Productivity

SkillWhat
/session-heartbeatProgress review, scope drift detection
/handover-writerSave state when context is getting full
/morning-briefingStart-of-day briefing across all life domains
/brain-dumpStream-of-consciousness capture for ADHD minds
/parkGuilt-free shelving with optional reminder date

Domain Guards

SkillWhat It Guards
/sql-guardMulti-tenant scoping, parameterized queries
/shopify-integrationHMAC verification, idempotency, rate limits
/rex-soap-protocolDual SOAP protocol detection
/integration-guardPre-code checklist for any external integration
/sync-workerAtomic queue claims, checkpoint persistence
/deploy-checklistMigrations, env vars, rollback plan
/create-migrationNumbered SQL migration following conventions

Setup & Maintenance

SkillWhat
/harness-initInstall harness into a new project
/harness-updatePull latest from harness repo
/cortex-indexIndex or reindex with cortex-engine
/worktree-cleanupClean stale git worktrees
/prompt-intelligenceLoad learned behaviors at session start

Hooks — 47 Quality Gates

Infrastructure Protection (v2.0 — new)

HookWhenEnforces
block-bash-file-writes.shBefore BashBlocks write verbs targeting hooks, settings, evidence, markers
audit-bash-file-writes.shAfter BashDetects + reverts source files modified via Bash (bypasses Edit hooks)
protect-files.shEdit/WriteBlocks .env, .git/hooks/, .claude/hooks/, settings.json, evidence

Source File Protection

HookWhenEnforces
require-tdd-before-source-edit.shEdit/Write sourceTests must exist or be staged
require-plan-before-edits.shEdit/Write sourceHMAC-signed plan approval required
require-vault-for-edits.shEdit/Write sourceHMAC-signed vault context required
suggest-cortex-engine.shRead source >50 linesUse cortex-engine, not raw Read

Git Commit Gates

HookWhenEnforces
require-test-evidence.shgit commitHMAC-signed evidence, fresh, matching HEAD
require-lint-clean.shgit commitLinter passes on staged files
pre-commit-gate.shgit commitTest files or evidence required
require-vault-update.shgit commit/pushVault updated for source changes

Pipeline Enforcement

HookWhenEnforces
enforce-enterprise-pipeline.shInvoke enterprise-*Stages cannot be skipped
enforce-vault-context.shInvoke enterprise-*Must load vault context first
require-independent-review.shInvoke enterprise-reviewBuilder cannot review own work

Marker & Evidence Integrity (v2.0 — new)

HookWhenWhat
mark-plan-approved.shExitPlanModeHMAC-signed plan marker (unsigned touch rejected)
record-test-evidence.shAfter testsHMAC-signed evidence, vitest + jest parsing, anti-echo-injection
invalidate-after-git-op.shAfter git opsAuto-marks evidence stale

Evidence System

The harness doesn't trust claims. It verifies them mechanically.

run tests
   │
   ▼
record-test-evidence.sh → .claude/evidence/last-test-run.json
   { HMAC-signed, suite_count, pass_count, git_head, mode, tier }
   │
   ▼
edit source file → evidence auto-staled
   │
   ▼
try to commit
   │
   ▼
require-test-evidence.sh reads JSON:
   HMAC invalid? → BLOCKED (tampered or hand-written)
   Stale? → BLOCKED
   Wrong HEAD? → BLOCKED
   Not enough suites? → BLOCKED
   Output missing framework markers? → BLOCKED
   ✓ All green → ALLOWED

Requirements

RequirementWhy
Claude Code or Codex CLIHost environment
Node.js 20+MCP servers
ObsidianShared brain
python3Hooks use it for JSON parsing
gitVersion control

Stats

ComponentCount
MCP servers4 (cortex-engine + skills-index + cortex-memory + vault-index)
MCP tools71 (30 + 14 + 4 + 23)
Skills63
Hooks47
Slash commands11
Tree-sitter languages8
Install modes4 (full, global, project, update)
Anti-bypass protections8

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for claude-harness from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/claude-harness)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools