Why I write the spec first with OpenSpec
Writing down the intended behavior before an agent starts makes the idea easier to review and the change easier to check.
I get better results from coding agents when I write down what a change should do before asking for the implementation. Otherwise, a short prompt can leave a lot of room for the agent to guess.
OpenSpec gives that work a place in the repository. I can review the proposal, make changes to it, and keep the agreed behavior alongside the code.
Make the behavior explicit
The useful part is deciding what counts as done. For a change, I want to record:
- what someone should be able to do;
- which existing behavior needs to stay;
- the cases the implementation must handle;
- how I will check the result.
For LinkStreaks, I’d specify: “A signed-out visitor can follow a public link without logging in.” The implementation can determine which component handles the click.
Change the idea while it is cheap to change
It is easier to spot a misunderstanding in a short proposal than halfway through a large diff. I can correct the scope before the agent has built around the wrong assumption.
The proposal also helps when the work resumes in a later session. The next agent can read the intended behavior instead of trying to reconstruct it from chat history.
Keep checking the implementation
An agreed spec is a reference for review. I still need to compare it with the finished behavior, run the relevant checks, and look for cases we missed.
The habit I want to keep is simple: write down the decision, build against it, and check that the result matches. That is why OpenSpec has stayed in my workflow.