codely-openspec_spec-create_from_code
Installation
SKILL.md
🧬 How to create OpenSpec specs from existing code
An OpenSpec change can only MODIFY or REMOVE a requirement that already lives in openspec/specs/. Behaviour built before the team adopted OpenSpec has no spec, so every change over it lands as ADDED and the spec forgets what was there before. This skill writes that missing baseline: main specs for behaviour that already ships.
The baseline is the spec OpenSpec would have archived if the feature had been built with it: intent that was implemented and verified. Every sentence holds against the code, and every requirement is something someone meant. A baseline that flatters the code is worse than none, because the next proposal builds on it.
📥 Input
The argument is free text. Read it as one of these:
| Input | Example | Scope |
|---|---|---|
| Nothing, or a question about what lacks a spec | which features have no spec? |
The inventory in resources/evidence-guidelines.md. Build it and stop until the user picks a row. |
| A capability | checkout |
That capability. |
| A change the user is about to make | add discount coupons to checkout |
The current behaviour the change will touch. The new behaviour belongs to the change, not to the baseline. |
| A path or a screen | src/app/admin/orders |
The business concept that path serves, traced back from it. |