Skip to content

Validate upstream readiness before requirement evidence import #346

Description

@djm81

Problem

The import-first runtime shipped by #168 accepts a pristine native Spec Kit feature template as requirement evidence. With the official specify 0.12.15 scaffold, placeholder Functional Requirements create six bogus speckit: records. OpenSpec changes also need a deterministic upstream-readiness check before imported records are treated as evidence.

Proposed scope

  • Surface a shared core source-readiness result before the Requirements module persists imported OpenSpec or Spec Kit records.
  • Reject incomplete native sources with zero persisted records and machine-readable diagnostics:
    • OpenSpec source fails openspec validate --strict --json when upstream validation is required.
    • Spec Kit source retains known official template placeholders, NEEDS CLARIFICATION markers, no substantive functional requirement, or no meaningful acceptance scenario where user stories are present.
  • Preserve read-only behavior toward upstream source directories.
  • Keep standard completed native OpenSpec and Spec Kit imports, stable IDs, content-hash provenance, and idempotency unchanged.
  • Keep basic import portable: require the OpenSpec CLI only under an explicit or strict/enterprise upstream-validation policy; report upstream-validator-unavailable rather than silently claiming validation.

Ownership and dependency

This modules change only exposes the resulting core diagnostics and command behavior. Deterministic native parsing, placeholder detection, and upstream-validation policy belong to paired core issue nold-ai/specfact-cli#648 (follow-up to #350). The modules implementation is blocked until that core contract is released.

Acceptance evidence

  • A pristine specify 0.12.15 generated feature imports zero records and returns a non-zero result with an incomplete-source diagnostic.
  • A completed native Spec Kit feature imports normalized evidence without diagnostics.
  • An invalid OpenSpec source imports zero records when upstream validation is required.
  • Existing valid OpenSpec and Spec Kit imports remain read-only and idempotent.

OpenSpec change: requirements-04-upstream-source-readiness
Parent feature: #161
Follow-up to: #168
Core blocker: nold-ai/specfact-cli#648

Metadata

Metadata

Assignees

Labels

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

Fields

No fields configured for User Story.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions