openspec update --dry-run --json: say what an update would change, without changing it

Chiusa
#2,088 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@clay-good ci sta già lavorando.

Dal 16/10/2026.

  • #2109 di @clay-good — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cli, typescript
Ambito
cli, tooling

Direzione di ricerca

Start with the openspec update command, which the issue says has to report every file it would add, change or delete, including files outside the repo such as home-folder skills and the settings file. Find where the update step decides and writes those paths, and separate planning from writing. Done when openspec update --dry-run --json prints the planned list and writes nothing, and a test runs a dry run and a real update on the same fixture and checks that the lists match.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The ask

Add a way to ask openspec update what it would change, without changing anything:

openspec update --dry-run --json

It prints the list of files it would add, change or delete. It writes nothing.

Why

OpenSpec Desktop shows people what an update will change before they agree to it.

Today the CLI can't tell us that. So the app does a workaround:

  1. Copy the repository's agent folders (.claude, .cursor, …) into a temp folder
  2. Run openspec update on the copy
  3. Compare the copy before and after

This workaround keeps breaking:

  • It's slow and can fail. Claude Code keeps whole copies of the repo in .claude/worktrees (81 GB on one machine). The copy hit its size limit, and the update check failed for every repository. Fixed for now in Fission-AI/openspec-desktop#100 by skipping that folder.
  • It has to guess what to copy. If we copy too little, the preview is wrong and nobody notices. If we copy too much, it's slow or fails.

If the CLI tells us the plan itself, there's no copy, no size limit and no guessing.

What the output could look like

{
  "changes": [
    { "path": ".claude/skills/openspec-explore/SKILL.md", "action": "update", "tool": "claude" },
    { "path": ".claude/commands/opsx/old-name.md", "action": "delete", "tool": "claude" },
    { "path": "~/.codex/skills/openspec-propose/SKILL.md", "action": "add", "tool": "codex" }
  ]
}

It needs to:

  • Cover every file update would touch, including files outside the repository (home-folder skills, OpenSpec's settings file).
  • Write nothing.
  • Give the same answer the real update would act on.

Done when

  • openspec update --dry-run --json exists and writes nothing
  • Its list matches what a real openspec update then changes (a test runs both and compares)
  • OpenSpec Desktop can stop making scratch copies
Lingua principale
TypeScript
Stelle
73.6k
Fork
5k
Merge medio
3g 13h
PR unite (30g)
61

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Fission-AI/OpenSpec

Tutte le issue di Fission-AI/OpenSpec

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.