← all repositories
m0n0x41d/haft

A Governance Layer for Coding Agents That Doubts Itself

It forces AI coding agents to frame problems, compare options under parity, and record decisions as contracts that know when their own evidence has gone stale.

1.4k stars Go Coding AssistantsAgents
haft
Not currently ranked — collecting fresh signals.
star history

What it does

Haft is an engineering governor that sits between your intent and an AI agent’s execution. It exposes an MCP surface to Claude Code and Codex and a CLI harness for operators, both compiling into the same core artifact graph. The system enforces structured reasoning—framing problems, exploring variants under diversity checks, comparing options with parity enforcement, and recording decisions as contracts that carry invariants, evidence, and expiry dates. When a decision is ready, the harness can commission an agent to implement it inside an isolated workspace, leaving the operator to decide when to apply the resulting patch.

The interesting bit

The unusual part is the epistemic humility baked into the system: trust scores degrade as evidence ages, stale assumptions trigger refreshes, and failed post-implementation measurements automatically reopen the governing decision. It is essentially an attempt to stop coding agents from Goodharting their way through a codebase by treating every decision as a live, falsifiable contract tied to the dependency graph.

Key highlights

  • Enforces a structured reasoning loop (/h-reason or manual frame/char/explore/compare/decide) before any code is generated.
  • Records decisions as contracts with invariants, claims, rollback plans, and valid-until dates; evidence carries formality and congruence levels.
  • Integrates as an MCP plugin with Claude Code and Codex (v7 production support), while Cursor and Gemini CLI remain experimental.
  • Uses an isolated-workspace harness (Open-Sleigh) with scope guards and locksets to run commissioned work; patches stay separate until an operator applies them.
  • Maintains a knowledge graph linking decisions to code modules so that drift detection and stale evidence can surface across sessions.

Caveats

  • The TUI and Desktop app are alpha-quality and sit outside the v7 production envelope.
  • Batch drain mode and automatic patch application are flagged as Beta, having been validated only on documentation commissions so far.
  • First-class support is limited to Claude Code and Codex; Cursor, Gemini CLI, and JetBrains Air integrations are experimental or legacy.

Verdict

Teams using Claude Code or Codex who want their agents to write code with falsifiable reasoning and reversible commits should look here; solo developers looking for a lightweight prompt wrapper will likely find the spec-checking and commission lifecycle heavy.

Frequently asked

What is m0n0x41d/haft?
It forces AI coding agents to frame problems, compare options under parity, and record decisions as contracts that know when their own evidence has gone stale.
Is haft open source?
Yes — m0n0x41d/haft is an open-source project tracked on heatdrop.
What language is haft written in?
m0n0x41d/haft is primarily written in Go.
How popular is haft?
m0n0x41d/haft has 1.4k stars on GitHub.
Where can I find haft?
m0n0x41d/haft is on GitHub at https://github.com/m0n0x41d/haft.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.