Openspec update change

From Brain-up/brn · View interactive version

Openspec update change is an AI agent skill from the GitHub repository Brain-up/brn. Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Never edits code.

How to use this skill

Skill file

Revise a change's existing planning artifacts and keep them coherent. Never edit code.

Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list --json to discover registered store ids, then pass --store <id> on the commands that read or write specs and changes (new change, status, instructions, list, show, validate, archive, doctor, context, schemas, view). Once selected, treat --store <id> as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run openspec status --change "<name>" --json --store "<id>", not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local openspec/ root.

Input: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.

/opsx:continue is an optional workflow and may not be installed. Before suggesting it anywhere below, verify that it is available. If it is unavailable, openspec status --change "<name>" --json shows the next artifact and openspec instructions "<artifact-id>" --change "<name>" --json explains how to create it.

Steps

  1. Select the change

If a name is provided, use it. Otherwise:

When prompting, present the top 3-4 most recently modified changes as options, showing:

Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to update.

Always announce: "Using change: <name>" and how to override (e.g., /opsx:update <other>).

  1. Get the change's artifacts

```bash

openspec status --change "<name>" --json

```

Parse the JSON to understand current state. The response includes:

The artifact ids and paths come from the active schema - do NOT assume them, and do NOT branch on hardcoded artifact names. Custom schemas must work unchanged.

The files to edit are artifactPaths.<id>.existingOutputPaths - the concrete files that exist on disk, already glob-expanded for glob artifacts (e.g. specs/**/*.md). Do NOT write to resolvedOutputPath: for a glob artifact it is still the glob pattern, not a real file.

  1. Understand the request
  1. Read and reconcile
  1. Confirm and apply, one artifact at a time

```bash

openspec instructions "<artifact-id>" --change "<name>" --json

```

  1. Point to the next step (guidance only - NEVER act on it)

Output

After each invocation, show:

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.