haft Documentation
haft is a decision engineering tool for AI coding assistants. It helps you frame problems, compare options fairly, record decisions as contracts, and know when those decisions go stale.
In v8, haft runs as a MCP server
plus local CLI. Your coding agent connects to haft serve; the
installed skills and slash commands guide the reasoning loop. Claude Code and
Codex are the supported hosts. Cursor, Gemini CLI, and OpenCode are experimental
host configs.
v8 is the current track. The standalone agent, TUI, and desktop wrappers were removed. Haft is now a governance substrate: one artifact graph, one kernel, reached through MCP tools, CLI commands, and host-agent skills. New projects should start with the v8 overview and then run Install & init.
Start here. Use haft init, /h-status,
/h-frame, /h-explore, /h-compare,
/h-decide, and /h-verify. The execution harness is an
alpha Codex-only path for isolated WorkCommission runs; it is not the first
thing to learn.
The five modes
haft organizes decision-making into five cognitive modes. Each mode has a dedicated slash command,
or you can let /h-reason drive the cycle automatically.
| Mode | Command | What happens |
|---|---|---|
| Understand | /h-frame | Frame the problem — signal, constraints, acceptance criteria |
| Explore | /h-explore | Generate genuinely distinct alternatives with weakest link per variant |
| Choose | /h-compare | Fair comparison on declared dimensions — parity enforced |
| Execute | /h-decide | Record the decision as a contract with invariants, rollback plan, and claims |
| Verify | /h-verify | Check claims against reality — refresh, supersede, or reopen |
Plus a fast path: /h-note captures micro-decisions inline — no ceremony,
auto-expires in 90 days, conflicts with active decisions are flagged.
What it does
When you face a decision that's hard to reverse, affects the team, or has real consequences if
you get it wrong — migrating a database, picking an auth architecture, designing a public API,
restructuring a service boundary — you type /h-reason and describe the problem. The agent:
- Understands the problem (what's broken, what are the constraints, how do we know it's solved)
- Explores genuinely different alternatives (not three versions of the same idea)
- Chooses by comparing them on a Pareto front (no single-score collapse, parity enforced)
- Executes by recording the decision as a contract with invariants, rollback plan, and verifiable claims
- Verifies claims over time — when evidence expires or claims fail, the decision surfaces as stale
Every decision gets an R_eff score — a computed trust metric that degrades over time
as evidence expires. Each decision carries claims with verify_after dates —
concrete statements that can be checked against reality. When R_eff drops below 0.5, the decision
surfaces as stale. You review it, re-validate, or supersede it with a new decision. This is the
continuous loop of decide, measure, reframe.
Who is this for
Anyone who makes decisions with real consequences — and needs those decisions to be traceable, challengeable, and aware of their own expiry date. Software architects, engineering managers, systems engineers, tech leads. The problems aren't limited to code: technology selection, infrastructure strategy, process design, organizational trade-offs, vendor evaluation, migration planning.
The current interface is developer-focused (MCP server for AI coding tools), but the underlying methodology is domain-agnostic. haft aims to implement as much as possible of FPF (First Principles Framework) by Anatoly Levenchuk — a formal approach to structured reasoning that works wherever decisions need evidence, comparison, and lifecycle management. No prior knowledge of FPF is required; haft implements the practical parts and stays out of your way.
Supported tools
| Tool | Status |
|---|---|
| Claude Code | Supported host (default) |
| Codex CLI / Codex App | Supported host |
| Cursor | Experimental MCP config |
| Gemini CLI | Experimental MCP config |
| OpenCode (sst/opencode) | Experimental MCP config |
| JetBrains Air | Experimental / pending docs |
What's new in v8
- Governance substrate pivot — skills + CLI + MCP replace the standalone runtime.
- 15 installed skills —
h-reason,h-frame,h-diagnose,h-explore,h-compare,h-decide,h-verify, and the supporting workflow skills. - Fused code graph —
haft_querycan show callers, callees, impact, source, and the decisions governing each symbol. - Hybrid FPF search — exact pattern lookup plus keyword and local semantic recall over baked FPF section vectors.
- Spec-first governance kept — active TargetSystemSpec, EnablingSystemSpec, and TermMap sections still define what the project claims to be.
- Shared embedding sidecar — v8.1 shares one local
haft-embedmodel process across livehaft servesessions. - CI governance gate —
haft checkgives a deterministic pass/fail signal for stale, drifted, unassessed, and coverage-gap findings.
Next step
Install haft v8 and initialize one project.
Already on 5.x or 6.x? Read the older migration guide,
then re-run haft init to install the v8 skills.