.opencode/command/opsx-continue.md
Continue working on a change by creating the next artifact.
Input: Optionally specify a change name after /opsx-continue (e.g., /opsx-continue add-auth). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
If no change name provided, prompt for selection
Run openspec list --json to get available changes sorted by most recently modified. Then use the AskUserQuestion tool to let the user select which change to work on.
Present the top 3-4 most recently modified changes as options, showing:
schema field if present, otherwise "spec-driven")lastModified field)Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.
IMPORTANT: Do NOT guess or auto-select a change. Always let the user choose.
Check current status
openspec status --change "<name>" --json
Parse the JSON to understand current state. The response includes:
schemaName: The workflow schema being used (e.g., "spec-driven")artifacts: Array of artifacts with their status ("done", "ready", "blocked")isComplete: Boolean indicating if all artifacts are completeAct based on status:
If all artifacts are complete (isComplete: true):
/opsx-apply or archive it with /opsx-archive."If artifacts are ready to create (status shows artifacts with status: "ready"):
status: "ready" from the status outputopenspec instructions <artifact-id> --change "<name>" --json
context: Project background (constraints for you - do NOT include in output)rules: Artifact-specific rules (constraints for you - do NOT include in output)template: The structure to use for your output fileinstruction: Schema-specific guidanceoutputPath: Where to write the artifactdependencies: Completed artifacts to read for contexttemplate as the structure - fill in its sectionscontext and rules as constraints when writing - but do NOT copy them into the fileIf no artifacts are ready (all blocked):
After creating an artifact, show progress
openspec status --change "<name>"
Output
After each invocation, show:
/opsx-continue to create the next artifact"Artifact Creation Guidelines
The artifact types and their purpose depend on the schema. Use the instruction field from the instructions output to understand what to create.
Common artifact patterns:
spec-driven schema (proposal → specs → design → tasks):
For other schemas, follow the instruction field from the CLI output.
Guardrails
context and rules are constraints for YOU, not content for the file
<context>, <rules>, <project_context> blocks into the artifact