You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Support schema selection in propose/new skills and commands #770
The opsx:propose command (and related openspec-propose skill) always creates a new change using the default schema from config.yaml, with no way for the user to select a different schema. The CLI supports this today via:
openspec new change <name> --schema <schema>
But there is no equivalent UX in the skills or commands.
Current Behavior
opsx:propose / openspec-propose skill: Always calls openspec new change "<name>" without --schema. No schema selection logic exists — the user cannot specify a different schema even if the project has multiple schemas available in openspec/schemas/.
opsx:new / openspec-new-change skill: Partially supported — will pass --schema if the user explicitly names one, or list schemas if the user asks, but does not proactively offer schema selection.
CLI: Full support via --schema flag.
Expected Behavior
When a project has multiple schemas available, the propose (and new) skills/commands should either:
Proactively ask which schema to use when multiple schemas are available, or
Accept a schema argument (e.g., /opsx-propose --schema hotfix) so users can specify it inline
The openspec schemas --json command is already available for agents to discover available schemas, so the building blocks are in place.
Why This Matters
Projects with multiple schemas (e.g., one for features, one for hotfixes, one for experiments) are forced to use the CLI instead of skills when they want to use a non-default schema. This breaks the agent-first workflow that OpenSpec is designed for.
The enrichment comment has been posted on issue #770. Here's a summary of what I found and included:
Key finding: The propose skill (src/core/templates/workflows/propose.ts) hardcodes openspec new change "<name>" with no schema flag and no schema selection step at all. Meanwhile, the new-change skill (src/core/templates/workflows/new-change.ts) already has a "Determine the workflow schema" step that handles --schema reactively — but doesn't proactively offer selection.
The comment covers:
Affected files with exact line numbers for the hardcoded invocations and the missing schema step
Existing building blocks — openspec schemas --json, listSchemasWithInfo(), validateSchemaExists(), and the full schema resolution chain are all already implemented
Suggested approach — mirror the new-change skill's existing Step 2 into the propose skill, and optionally add proactive schema selection using AskUserQuestion when multiple schemas are detected
Add a schema determination step between the current Step 1 (get user input) and Step 2 (create the change directory) in both getOpsxProposeSkillTemplate() and getOpsxProposeCommandTemplate(). The new-change skill's existing Step 2 (lines 28–36 of new-change.ts) can serve as a direct template for this.
Minimal change:
Insert a new step in the propose instructions that mirrors the "Determine the workflow schema" block from new-change.ts
Update the openspec new change "<name>" invocation at line 39/150 to conditionally include --schema <name>
For proactive schema selection (enhancement):
To address the "proactively ask" behavior when multiple schemas exist:
Add a step that runs openspec schemas --json early in the flow
If more than one schema is returned, use the AskUserQuestion tool to present the choices
This would apply to both propose and new-change skills
Skill template parity tests exist at test/core/templates/skill-templates-parity.test.ts — the content hashes for getOpsxProposeSkillTemplate (line 53) and getOpsxProposeCommandTemplate (line 54) will need to be updated after any instruction text changes.
Schema handling in the CLI is tested at test/commands/artifact-workflow.test.ts (lines 154-173 for --schema support, lines 659-698 for config/CLI schema precedence).
This appears to not be a duplicate of any existing issue. The closest is #666, but that's about schema format constraints rather than schema selection UX in skills.
Activity
21st-connector commentedon Feb 27, 2026
Task completed.
The enrichment comment has been posted on issue #770. Here's a summary of what I found and included:
Key finding: The
proposeskill (src/core/templates/workflows/propose.ts) hardcodesopenspec new change "<name>"with no schema flag and no schema selection step at all. Meanwhile, thenew-changeskill (src/core/templates/workflows/new-change.ts) already has a "Determine the workflow schema" step that handles--schemareactively — but doesn't proactively offer selection.The comment covers:
openspec schemas --json,listSchemasWithInfo(),validateSchemaExists(), and the full schema resolution chain are all already implementednew-changeskill's existing Step 2 into theproposeskill, and optionally add proactive schema selection usingAskUserQuestionwhen multiple schemas are detectedView full conversation
Powered by 1Code
21st-connector commentedon Feb 27, 2026
Issue Triage & Codebase Analysis
Thanks for the detailed write-up. Here's a breakdown of the relevant code and some notes to help get started on this.
Affected Files
opsx:propose/openspec-proposeskill —src/core/templates/workflows/propose.tsgetOpsxProposeSkillTemplate()(line 9) andgetOpsxProposeCommandTemplate()(line 118)openspec new change "<name>"at lines 39 and 150 respectively, with no--schemaflag and no schema selection step.new-changeskill.opsx:new/openspec-new-changeskill —src/core/templates/workflows/new-change.tsgetNewChangeSkillTemplate()(line 9) andgetOpsxNewCommandTemplate()(line 82)"show workflows"/"what workflows"by runningopenspec schemas --json--schema <name>when a non-default schema is requestedExisting Building Blocks
These utilities are already available and can be leveraged:
openspec schemas --jsonsrc/commands/workflow/schemas.ts:22-46listSchemasWithInfo()src/core/artifact-graph/resolver.ts:224-268SchemaInfo[])listSchemas()src/core/artifact-graph/resolver.ts:161-206validateSchemaExists()src/commands/workflow/shared.ts:152-161resolveSchemaForChange()src/utils/change-metadata.ts:162-196.openspec.yaml→config.yaml→'spec-driven'defaultDEFAULT_SCHEMAsrc/commands/workflow/shared.ts:44'spec-driven'The CLI already fully supports
--schemaviasrc/commands/workflow/new-change.ts:38-40andsrc/cli/index.ts:493-508.Suggested Implementation Approach
For
propose(the main gap):Add a schema determination step between the current Step 1 (get user input) and Step 2 (create the change directory) in both
getOpsxProposeSkillTemplate()andgetOpsxProposeCommandTemplate(). Thenew-changeskill's existing Step 2 (lines 28–36 ofnew-change.ts) can serve as a direct template for this.Minimal change:
new-change.tsopenspec new change "<name>"invocation at line 39/150 to conditionally include--schema <name>For proactive schema selection (enhancement):
To address the "proactively ask" behavior when multiple schemas exist:
openspec schemas --jsonearly in the flowAskUserQuestiontool to present the choicesproposeandnew-changeskillsRelated Issues & PRs
/opsx:proposeis missing after updating to v1.2.0, which may need to be resolved first or in tandemschema which,schema validate,schema fork,schema init)Test Considerations
test/core/templates/skill-templates-parity.test.ts— the content hashes forgetOpsxProposeSkillTemplate(line 53) andgetOpsxProposeCommandTemplate(line 54) will need to be updated after any instruction text changes.test/commands/artifact-workflow.test.ts(lines 154-173 for--schemasupport, lines 659-698 for config/CLI schema precedence).This appears to not be a duplicate of any existing issue. The closest is #666, but that's about schema format constraints rather than schema selection UX in skills.