OpenSpec icon indicating copy to clipboard operation
OpenSpec copied to clipboard

Custom schemas without proposal are only partially supported

Open showms opened this issue 6 months ago • 1 comments

Summary

OpenSpec's schema layer does not explicitly require a proposal artifact.

However, several CLI and workflow surfaces still assume proposal-first behavior, which makes custom schemas without proposal feel only partially supported.

Why this seems inconsistent

At the schema level, proposal is not required:

  • ArtifactSchema requires id, generates, description, template, and optional requires
  • SchemaYamlSchema only requires artifacts to be non-empty

Relevant code:

  • src/core/artifact-graph/types.ts
  • src/core/artifact-graph/schema.ts

But other surfaces still depend on or assume proposal:

1. Change discovery still uses proposal.md

getActiveChangeIds() only returns a change if openspec/changes/<id>/proposal.md exists.

Relevant code:

  • src/utils/item-discovery.ts

2. Legacy change commands are proposal-centric

Examples:

  • change show reads proposal.md
  • change list filters by proposal.md
  • change validate relies on active change discovery when no explicit name is provided

Relevant code:

  • src/commands/change.ts

3. Workflow guidance still assumes proposal-first

explore prompts the user toward creating a proposal as the natural next step.

Relevant code:

  • src/core/templates/workflows/explore.ts

4. propose looks only partially schema-aware

Its execution flow uses status + instructions, so it appears capable of following a schema's artifact graph.

But it still:

  • presents a proposal-first mental model
  • does not seem to include the same schema-selection step that new-change has

Relevant code:

  • src/core/templates/workflows/propose.ts
  • src/core/templates/workflows/new-change.ts

Practical effect

This creates an unclear contract:

  • schemas appear allowed to omit proposal
  • but discovery, legacy CLI behavior, and workflow guidance still assume proposal-first behavior

So it is hard to tell whether:

  • proposal is truly optional
  • proposal is optional in schema theory but still required for CLI compatibility
  • or only some surfaces are currently schema-aware

Related issues

This seems related to, but not the same as:

  • #997
  • #666
  • #829

Those are more focused on validation/parsing behavior. This issue is about proposal assumptions across discovery and workflow surfaces.

Question

What is the intended compatibility contract for custom schemas without proposal?

Possible directions:

  • explicitly document that proposal is expected for compatibility
  • or make discovery / legacy CLI / workflow surfaces less proposal-dependent over time

I’m not assuming the current behavior is necessarily wrong. The main issue is that the support boundary is currently implicit rather than explicit.

showms avatar Jun 03 '26 01:06 showms

Cross-linking: #1433 fixes the first defect listed here — change discovery in src/utils/item-discovery.ts.

getActiveChangeIds/getArchivedChangeIds now resolve a change by its directory (the rule list/status/instructions/validate already use) instead of requiring proposal.md, so a change from a schema with no proposal artifact is resolvable by openspec show and shell completion.

Leaving this issue open: points 2–4 (legacy change commands, explore/propose workflow guidance) and the overall compatibility-contract question are unaddressed and need a maintainer call on direction.

clay-good avatar Jul 23 '26 16:07 clay-good