Skip to content

OpenSpec and Spec Kit Import-First Requirement Evidence #350

Description

@djm81

Synchronized scope (2026-07-13, rescoped)

OpenSpec and Spec Kit are the accountable authoring systems of record. SpecFact imports their native artifacts read-only into the requirements evidence schema and emits deterministic pass/fail gates. The previous ## Intent Trace YAML-authoring scope (schema block, intent-trace.schema.json, --import-intent flag) is retired before implementation — SpecFact defines no authoring schema for upstream tools.

Core-owned scope (this issue)

  • Deterministic import of OpenSpec change folders (proposal.md, specs/*/spec.md, tasks.md) and Spec Kit feature folders (spec.md, plan.md, tasks.md) into normalized RequirementInput records; scenarios become given/when/then business rules.
  • Stable derived requirement IDs (openspec:<change>:<capability>:<slug>, speckit:<feature>:<slug>); idempotent re-import.
  • Source references carry sha256: content-hash revisions for staleness detection.
  • Deterministic gate categories in requirement context validation: scenario-unverified, stale-import, source-missing, ambiguous-mapping; profile-driven severity, non-zero exit, JSON evidence.
  • Shipped-gap fix folded in: requirements validate resolves the effective profile from profile-01-config-layering layered configuration when --profile is omitted (explicit flag wins) and honors requirements_schema.required_fields in completeness findings, instead of the current hardcoded startup default.
  • Evidence-compatible profile fields map as id → requirement_id, title → title, acceptance → business_rules, and trace_links → evidence_links. Other profile fields emit unsupported-profile-field advisories; this core change does not invent upstream metadata or extend the native import record model.
  • Fail-closed compatibility boundary: accept only fixture-backed default OpenSpec spec-driven Markdown and default Spec Kit Markdown profiles. Custom OpenSpec schemas, Spec Kit template override/preset/extension roots, and unknown required headings return unsupported-source-schema with no partial records. Tool versions are not inferred from Markdown; support for a newer format requires an explicit core profile and pinned fixture.
  • Read-only guarantee: never create or mutate upstream OpenSpec/Spec Kit artifacts.

Out of scope

  • Any upstream authoring schema or metadata convention.
  • Removing/deprecating SpecFact plan-authoring commands (docs reposition them as secondary only).
  • Backlog import/drift (requirements-03-backlog-sync, parked 2026-07-13).
  • LLM-assisted mapping in the gate path.

OpenSpec change: openspec-01-intent-trace
Track: C — Upstream Context Adapters, order 3 (pulled forward 2026-07-13)
Paired modules runtime issue: nold-ai/specfact-cli-modules#168
Depends on: requirements-01-data-model, requirements-02-module-commands (both shipped)

Metadata

Metadata

Assignees

Labels

Fields

No fields configured for User Story.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions