Skip to content

Feedback: new change should emit skip_specs when the schema declares no specs artifact #1638

Closed

Description

@codekaizen

Version: 1.8.0

A custom workflow schema that declares no specs artifact (only proposal and tasks, for example) produces changes that fail validation the moment they are scaffolded.

Repro:

  1. Use a schema whose artifacts list contains no artifact whose 'generates' path lives under specs/.
  2. openspec new change my-change
  3. openspec validate my-change --type change

Result: 'Change must have at least one delta. No deltas found.' The generated .openspec.yaml contains only 'schema:' and 'created:'.

Such a schema can never produce spec deltas, so every change created under it needs skip_specs: true added by hand before it will validate. In a repo using one of these schemas, that is every change, forever, and it is easy to forget - the failure appears later at validate time rather than at creation.

Suggestion: have 'openspec new change' emit skip_specs: true when the resolved schema declares no artifact whose 'generates' path is under specs/. That condition is already derivable from the schema the CLI parses, and the artifact-graph code already treats that path prefix as the contract custom schemas inherit.

Secondary issue that makes this harder to work around: SchemaYamlSchema is not .strict(), so adding 'skip_specs: true' to schema.yaml is silently accepted and silently ignored. It reads as configured while having no effect. Either honouring it there, or rejecting the unknown key, would be clearer than dropping it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions