h-spec

Manages typed specification lifecycle, semantic repair, and human-gated spec changes in Haft projects.

1.4k|102|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/m0n0x41d/haft --skill h-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: h-spec
Source: https://github.com/m0n0x41d/haft/tree/main/internal/cli/skill/h-spec
Command: npx skills add https://github.com/m0n0x41d/haft --skill h-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeping project specifications current, consistent, and trustworthy is hard when specs live in markdown carriers, cite an evolving FPF source, and require explicit human approval for lifecycle changes. This Skill manages Haft's typed SpecSection lifecycle so drafts, clarifications, cross-carrier semantic repairs, and approve/rebaseline/reopen gates happen through the kernel projection rather than ad-hoc markdown edits.

Core Features & Use Cases

  • Lifecycle inspection and drafting: Reads the project-level spec lifecycle via MCP or CLI fallback, then drafts or clarifies SpecSections grounded in repository evidence with at most 1-3 targeted questions.
  • Semantic fanout and source-currentness repair: Classifies occurrences of changed terms or claims across carriers (definition, use, alias, citation, generated projection) and repairs drift against the current FPF source revision without blind text replacement.
  • Human-gated mutations: Produces a self-contained Human Gate Brief before any approve, triage, rebaseline, reopen, rollback, deprecate, or supersede act, ensuring only explicit operator authorization crosses lifecycle gates.
  • Use Case: An operator says "update the spec" after an FPF source revision lands. The Skill recovers the current source pattern, classifies every affected occurrence, prepares explicit before/after changes per active section, runs spec validation, and presents a gate brief for approval.

Quick Start

Ask the agent to show the current spec lifecycle status and draft or repair the SpecSection you name, for example by saying "check spec status and update the software system spec for the new interface contract".

Frequently Asked Questions about h-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a Haft SpecSection when the operator asks to record a change?

An operator phrase like "update the spec" authorizes editing the fenced yaml spec-section block in the carrier, grounded in repository evidence. It does not authorize approve, rebaseline, reopen, or a binding DecisionRecord, which require explicit human gates.

How do I check spec lifecycle status in a Haft project?

Call the haft_spec_section MCP action with action="lifecycle" for the project-level workflow projection. If MCP is unavailable, use haft spec next --json or haft spec status --json as a read-only fallback and report that fallback.

Can h-spec approve or rebaseline a spec section automatically?

No. Approve, triage, rebaseline, reopen, rollback, deprecate, and supersede are human gates. The Skill must first present a self-contained Human Gate Brief naming affected sections, changed fields, options, and consequences, then act only after explicit operator selection.

What happens when the FPF source revision changes under existing specs?

The Skill recovers the current source pattern body via FPF Query, compares each citing claim, classifies occurrences as current meaning, local vocabulary, legacy compatibility spelling, or citation, and prepares explicit before/after repairs. Blind token replacement is prohibited.

Why does a spec request return profile_underdetermined?

It means the canonical profile for the scope is missing. The Skill reads haft_onboard status, prepares at most a non-binding review, and applies a profile only after the operator directly selects the exact reviewed profile and scope.

When should I use h-status instead of h-spec?

Use h-status for read-only decision coverage of modules or files. h-spec is for specification lifecycle work: drafting, clarifying, semantic repair, validation, and gated lifecycle mutations of SpecSections.