Haft for AI Coding Assistants — A Decision Engineering Runbook
Summary
Haft is a decision-engineering governor for AI coding assistants, designed to sit between user intent and agent execution, implementing a five-mode cognitive cycle. It addresses common failure modes like lost rationales and un-revisited assumptions by enforcing structured decision-making. Haft uses seven typed Model Context Protocol (MCP) tools, such as `haft_note` for micro-decisions and `haft_reason` for deeper analysis, which map to framing, exploration, commitment, execution, and lifecycle hygiene. The system installs via a one-liner `curl` command and `haft init`, supporting Claude Code and Codex, with experimental paths for Cursor and Gemini. Haft stores decisions locally in SQLite, projects them as Git-trackable markdown, and uses `haft sync` for team reconciliation. Its v7 architecture prioritizes a parseable `ProjectSpecificationSet` before broad harness execution, ensuring agents operate on well-defined systems.
Key takeaway
For AI Engineers and MLOps Engineers seeking to formalize decision-making with AI coding assistants, Haft provides a structured framework to prevent lost rationales and ensure verifiable outcomes. You should integrate Haft to enforce a cognitive cycle that demands explicit framing, alternative exploration, and recorded decision contracts, moving beyond ad-hoc chat interactions. This approach helps maintain architectural integrity and provides auditable evidence for future system changes, reducing technical debt from underspecified agent outputs.
Key insights
Haft governs AI agent execution by enforcing structured decision-making and preserving rationales through a five-mode cognitive cycle.
Principles
- Enforce distinct alternatives before commitment.
- Degrade trust scores when evidence ages.
- Prioritize system specification before broad execution.
Method
Haft employs a five-mode cognitive cycle (Understand, Explore, Choose, Execute, Verify) using MCP tools like `/h-frame`, `/h-explore`, `/h-compare`, `/h-decide`, and `/h-verify`, with `/h-note` for reversible micro-decisions and `/h-reason` for automated depth.
In practice
- Use `/h-reason` to force agents to surface distinct options.
- Track decisions in Git as markdown projections.
- Run `haft spec check` for local structural validation.
Topics
- Haft
- AI Coding Assistants
- Decision Engineering
- Model Context Protocol
- Cognitive Cycle
Code references
Best for: AI Engineer, Machine Learning Engineer, MLOps Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence in Plain English - Medium.