OpenSpec icon indicating copy to clipboard operation
OpenSpec copied to clipboard

Feature Request: Provide an `openspec diff` command to show differences between a spec and its modified version.

Open soc221b opened this issue 11 months ago • 4 comments

Provide an openspec diff command or a similar feature to show differences between a spec and its modified version.

Currently, we can manually copy /openspec/changes/*/specs/A.md and paste it into /openspec/specs/A/spec.md to compare it with the existing spec.

It would be very useful to have a built-in diff feature to automatically highlight these differences.

Thanks for this powerful tool! ❤️

soc221b avatar Jan 01 '26 01:01 soc221b

@soc221b We had this in a very early version, but removed since the diff wasn't very readable inside of the terminal.

We're currently planning to update the workflow a bit since agents usually struggle to produce and archive the spec deltas currently. We'll revisit this as part of that.

TabishB avatar Jan 02 '26 01:01 TabishB

Hello, is there any update on this topic? What is the recommended way to generate diff?

jakubtusan-mcf avatar Jun 13 '26 05:06 jakubtusan-mcf

Hope this helps: https://github.com/soc221b/openspec-diff/tree/main/packages/vscode-extension

soc221b avatar Jun 13 '26 15:06 soc221b

I created a TUI tool to do this. Still pretty early, but I used it to build it! https://github.com/yshavit/opsxexplorer

My workflow is pretty simple, because I've only used OpenSpec on my personal projects so far: so, single-dev, linear history, etc. I can't make any guarantees as to how well this will look with more complex scenarios, and in particular, it's not at all integrated with OpenSpec's beta store feature.

yshavit avatar Aug 10 '26 20:08 yshavit