Reasoning & FPF

Haft is built on the First Principles Framework (FPF) by Anatoly Levenchuk — a rigorous, transdisciplinary architecture for thinking. The skill set gives your coding agent an FPF-native operating system for engineering decisions: framing before solutions, characterization before comparison, parity enforcement, evidence with congruence penalties, weakest-link assurance, and a cycle that reopens itself when evidence ages or a measurement fails.

Seven MCP tools

ToolWhat it does
haft_noteMicro-decisions — atomic facts with typed anchors, validation, auto-expiry
haft_problemFrame problems, declare comparison dimensions with indicator roles
haft_solutionExplore variants with diversity check, compare under parity
haft_decisionDecision contracts: invariants, claims, evidence, baseline lifecycle
haft_commissionWorkCommission lifecycle for optional execution harnesses
haft_refreshLifecycle management for every artifact kind
haft_querySearch, status dashboard, code graph (callers / callees / impact / explore, each reached symbol fused with the decisions governing it), FPF spec search

Fifteen skills installed by haft init

SkillModeWhat it does
h-reasonauto (umbrella)Full FPF reasoning palette — framing, exploration, comparison, verification, notes, plus slideument patterns (Goldilocks, NQD, BLP, Scaling-Law Lens). Manual /h-reason always works.
h-frameautoFrame a problem with stabilize + problem typing + umbrella-word repair
h-diagnoseautoDiagnose a failure with parallel hypothesis testing (one subagent per hypothesis to prevent anchoring)
h-exploreautoGenerate distinct candidate variants with NQD diversity discipline
h-compareautoFair comparison with dim-wise parallel scoring + Pareto front (not a scalar winner)
h-decidemanualRecord a binding DecisionRecord with full DRR — Transformer Mandate
h-verifyautoBaseline → measure → evidence loop with drift detection
h-statusautoRead-only project FPF state dashboard
h-onboardautoFirst-frame ceremony for projects new to haft
h-spec-coverautoSpec-coverage check with blind/stale module triage
h-noteautoLightweight micro-decision recording
h-commissionmanualWorkCommission lifecycle — manual per Transformer Mandate
h-abductsubroutinePure B.5.2 abductive four-step (frame → ≥3 rivals → filters → prime)
h-boundary-unpacksubroutineA.6.B decomposition of boundary statements
h-semio-reviewsubroutineConcept-rename / spec-consistency audit (X-FANOUT-AUDIT)

Auto-triggering skills fire when their description matches operator context. Manual-only skills (h-decide, h-commission) require explicit invocation per the Transformer Mandate — binding artifacts come from the human principal, not the agent. Subroutines are called from other skills or invoked explicitly when working a specific FPF sub-discipline.

Routing reliability is testable: haft check routing runs 40 golden prompts (current pass rate 82.5%).

Semantic FPF spec search

haft fpf search (and haft_query(action="fpf") from MCP) searches the indexed FPF specification. Retrieval is hybrid: exact pattern id first, then keyword (FTS5) fused with semantic recall over baked section vectors. A reworded "how do I think about X" finds the pattern that answers it, even when it shares no keywords with the pattern's own heading.

The vectors are baked into the binary at build time, so end users never embed the spec themselves. Query embedding runs through the optional local haft-embed sidecar; when the sidecar is absent, semantic recall degrades cleanly to keyword search — it never hard-fails.

haft fpf search "how do I find the part of a design that breaks first"
# → X-WLNK (Weakest-Link analysis), by meaning, not keyword

Evidence workflow

Attach evidence with haft_decision(action="evidence", ...). Evidence carries formality levels (F0–F3), congruence levels (CL0–CL3), and expiry dates. Trust scores (R_eff) degrade as evidence ages; stale evidence triggers refresh. Use haft_decision(action="measure", ...) for post-implementation verification, or the /h-verify skill from the host agent.

See also Enforcement check for how drift, staleness, and evidence decay roll into one CI gate.