Skip to content

Requirements Input Runtime Commands Follow-Up #165

Description

@djm81

User Story

As a SpecFact user who already manages requirements in an upstream system, I want a module-owned specfact requirements runtime so that I can import, normalize, validate, list, and inspect requirement context as bounded validation evidence without moving requirement authoring into SpecFact.

Scope

This is the modules-side counterpart to nold-ai/specfact-cli#239 and OpenSpec change requirements-02-module-commands.

In Scope

  • Add the nold-ai/specfact-requirements module package.
  • Expose grouped runtime commands:
    • specfact requirements import
    • specfact requirements validate
    • specfact requirements list
    • specfact requirements coverage
  • Consume the core requirements input model and helper APIs supplied by core issue chore(modules): auto-sign module manifests #239.
  • Persist imported requirement context for module runtime use and rehydrate it before validation/coverage helpers run.
  • Preserve bounded diagnostics, validation reports, and coverage summaries for JSON/AI handoff.
  • Update module docs, generated command overview, import-boundary wiring, tests, and manifest checksum.

Out of Scope

  • Requirement authoring templates or interactive authoring flows.
  • Bidirectional backlog write-back.
  • Requirement lifecycle or ceremony automation.
  • Replacing OpenSpec, Spec Kit, Jira, GitHub Issues, Azure DevOps, Linear, or document-based planning systems.

Acceptance Criteria

  • specfact requirements import --from-file <json-or-yaml> --bundle <bundle> imports source-attributed requirement records and reports bounded diagnostics.
  • specfact requirements validate --bundle <bundle> --profile <profile> delegates to the core profile-aware validation helper and exits non-zero when validation fails.
  • specfact requirements list --bundle <bundle> --show-coverage --format json emits machine-readable requirement and coverage data.
  • specfact requirements coverage --bundle <bundle> --format json emits the core coverage summary.
  • specfact requirements --help exposes import/validate/list/coverage and does not expose an authoring command.
  • OpenSpec strict validation, targeted TDD evidence, full tests, signature verification, and SpecFact code review are captured before PR finalization.

Validation Plan

  • Failing-first targeted pytest for the missing module package.
  • Passing targeted pytest for runtime and command behavior.
  • openspec validate requirements-02-module-commands --strict.
  • hatch run format, type-check, lint, yaml-lint, check-bundle-imports, check-command-overview.
  • Module signature verification with filesystem payload and version-bump enforcement.
  • hatch run contract-test, hatch run smart-test, hatch run test.
  • hatch run specfact code review run --enforcement changed --bug-hunt --json --out .specfact/code-review.json.

Current Status

Local implementation and validation are complete on branch feature/requirements-02-module-commands; PR creation is the remaining delivery step after wiki mirror sync and commit/push.

Metadata

Metadata

Assignees

No one assigned

    Labels

    change-proposalProposal for a new changeenhancementNew feature or requestopenspecopenspec changeprojectSpecfact project related topic

    Fields

    No fields configured for User Story.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions