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.
It works as an MCP server and as a
standalone agent runtime (haft agent).
Your AI tool (Claude Code, Cursor, Gemini CLI, Codex) connects to haft's MCP backend.
You interact through slash commands in your AI tool's chat interface. The agent does the
heavy lifting; you make the calls.
v7 is now the latest release. v7 promotes specifications to authoritative
artifacts: a repository becomes harnessable only after it carries a parseable
ProjectSpecificationSet (TargetSystemSpec, EnablingSystemSpec, TermMap), and decisions /
commissions / runtime runs / evidence flow downstream as consequences. The harness blocks
broad work on a project that is not ready, except behind an explicit
--force-skip-specs "<reason>" audit-only escape.
New users on v7 should start with the v7 overview and walk through
spec onboarding first; the older pages below
describe the legacy v6.2 decision-only flow.
Surface status. The two production surfaces in v7 are the MCP plugin
(haft serve for Claude Code and Codex) and the CLI Harness (haft init,
haft spec ..., haft harness ..., haft check). The
desktop app exists as an alpha track outside the v7 production envelope —
useful for exploration, not load-bearing for any v7 acceptance criteria.
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 | Full support (default) |
| Cursor | Full support |
| Gemini CLI | Supported |
| Codex CLI / Codex App | Supported |
| OpenCode (sst/opencode) | Experimental |
| JetBrains Air | Supported |
What's new in 6.0
- Renamed to haft — quint-code is now haft. All
/q-*commands become/h-*. The.quint/directory becomes.haft/. Migration is automatic —haft inithandles it. - 5-mode model — Understand, Explore, Choose, Execute, Verify. Maps directly to
/h-frame,/h-explore,/h-compare,/h-decide,/h-verify. - Claim-aware decisions — decisions now carry verifiable claims with
verify_afterdates. Not just "evidence expires" — specific statements that can be checked against reality. /h-verifyreplaces/h-refresh— actively checks claims, not just evidence age. Verify mode is the fifth cognitive mode.- Team sync —
haft synclets each engineer sync git-tracked markdown projections into their local database. No shared database, no merge conflicts on binary files. - CI governance gate —
haft checkgives a deterministic pass/fail signal for stale, drifted, unassessed, and coverage-gap findings. - Desktop app (pre-alpha) — visual dashboard for decision health, module coverage, and knowledge graph. Early access.
- Standalone runtime —
haft agentruns as a TUI without requiring an external AI tool. Bring your own model. - Knowledge graph — file-to-decision mapping with invariant injection. When you touch files covered by a decision, the agent knows.
Next step
Install haft — takes about 30 seconds. Already on 5.x? Migration guide.