Repolode
m0n0x41d

m0n0x41d/haft

Local governance layer giving AI coding agents a durable project memory of problems, compared options, human decisions, evidence and staleness.

Stars
1,395
Forks
103
Open issues
14
Last commit
last month

What is it?

Haft is a local governance layer for AI coding agents such as Claude Code and Codex. It stores what problem a project is solving, which options were compared, which decisions a human made, and what evidence supports them. Small, reversible reasoning can stay in the chat, while results that later work depends on become typed project records in a local .haft/ artifact graph.

Haft is built on the First Principles Framework (FPF). It brings the versioned FPF source into the agent's working context and adds project-local skills, MCP gates and a SQLite-backed memory. Its kernel validates required fields and parity gaps server-side, and evidence decays over time so stale claims and code drift are surfaced for review. Agents can frame, compare and prepare records, but binding decisions and execution commissions require the human operator.

The tool is consumed through skills, a CLI (haft artifact, haft decision, haft spec, and others) and an MCP server (haft serve). It provides init integrations for Claude Code and Codex as stable hosts, with Cursor, Gemini CLI and several others listed as experimental or legacy adapters.

Key features

  • 01Stores problems, compared options, decisions and evidence as typed project records
  • 02Kernel-side MCP validation of required fields, parity gaps and missing evidence
  • 03Evidence freshness decay that flags stale claims and drift for review
  • 04Code graph queries that show decisions governing a file or symbol
  • 05Source-native FPF query, lookup and inspect commands
  • 06Init integrations for Claude Code and Codex with managed instruction sections

Use cases

  • Recording why an architectural choice was made so later work can rely on it
  • Diagnosing a failure with several parallel hypotheses and keeping the result for handoff
  • Checking whether a past technical decision still holds against current measurements
  • Keeping AI-assisted changes to a shared codebase tied to explicit human authority

Quick start

  1. 1

    Run the official install script from the README

  2. 2

    Initialize the project for your agent (Claude Code shown; see README for other hosts)

    haft init --claude
  3. 3

    Restart or reconnect your coding agent, then use it normally and call /h-reason when needed

Things to know

  • The license is not clearly identified (metadata reports NOASSERTION), so check the repository's license before using it.
  • Only Claude Code and Codex are stable hosts; other agent integrations are experimental or legacy.
  • The optional embedding sidecar can use around 1-2 GB of RAM when warm.

In collections

Topics

FAQ

What is haft?
Local governance layer giving AI coding agents a durable project memory of problems, compared options, human decisions, evidence and staleness. Haft is a local governance layer for AI coding agents such as Claude Code and Codex. It stores what problem a project is solving, which options were compared, which decisions a human made, and what evidence supports them. Small, reversible reasoning can stay in the chat, while results that later work depends on become typed project records in a local .haft/ artifact graph.
Is haft free to use? What license does it have?
haft is open source under the Other license. Check the license terms before using it in commercial products.
Is haft still maintained?
Updated within 6 months. The last commit to haft was on Sep 28, 2026.
What can I use haft for?
Recording why an architectural choice was made so later work can rely on it Diagnosing a failure with several parallel hypotheses and keeping the result for handoff Checking whether a past technical decision still holds against current measurements Keeping AI-assisted changes to a shared codebase tied to explicit human authority
How do I install haft?
Run the official install script from the README Initialize the project for your agent (Claude Code shown; see README for other hosts): haft init --claude Restart or reconnect your coding agent, then use it normally and call /h-reason when needed
Where can I get haft?
The source code and installation instructions are on GitHub: https://github.com/m0n0x41d/haft

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects