Repository navigation
How to keep specs consistent and up-to-date with spec-kit? #5241
Replies: 17 comments 1 reply
|
Following up on my own question: I think the up-to-date centralized documentation could be considered an integral part of the spec constitution, not just a supporting tool. |
|
I have a similar concern. I think it's essential that specs are maintained/curated/refactored to maintain a single, logically organized source of truth that both humans and AI can refer to. An implementation path could be to do a git commit on the spec update(s), and then use that commit to kick-off planning of a migration plan to implement the spec change. Doing that, your example might be extended as:
|
|
What if SpecKit could compact multiple implemented features into a single “milestone” spec — kind of like how LLMs summarize long conversations? After several /specify → /plan → /tasks → implement cycles, we could run /speckit.compact to: Synthesize all completed specs into a concise milestone summary Capture shared patterns, architecture, and lessons Detect drift between intent and implementation Optionally trigger a light refactor phase to align the codebase with the consolidated spec Basically: milestones not as planning containers, but as post-implementation compaction points — compressing implementation history into reusable context and keeping both specs and code coherent as the system evolves. |
|
This is indeed a key point! |
|
I agree, it would be great if there was a centralised/consolidated spec that keeps track of the entire current definition |
|
That is exactly the killer feature of Openspec. |
|
I also ran into this very early in my testing of this tool. The generated output after the spec is implmented quickly becomes out of date due the the fine tuning changes applied to get the feature ready for actual use. In a perfect world there would be some background job that can detect when feature deviate from the original spec and suggests changes to bring it up to date. I envision this could also be used to create specs for existing features that are missing specs within your project. |
|
I once considered not merging the specs directory into the main branch each time a branch is merged, so as to ensure that the development branch retains its own archival information from the development process. |
|
This issue has been automatically marked as stale because it has not had any activity for 150 days. It will be closed in 30 days if no further activity occurs. |
|
just came across this FR while investigating the same problems, wonder if there is an extension available that would solve this |
|
I have the same concern. There's also a discussion about this here: #152 |
|
The 001-login / 009-2FA example is exactly the case I hit, and I ended up splitting it into two problems that turned out to need different tools. "What did we already decide?" — context from earlier specs never reaching the current one. I published spec-kit-memory for that (community catalog id "Which earlier promise did this new spec just invalidate?" — the sharper half of your question, and the one that actually bit me. A merged spec in my project made a closed per-intent allowlist its central safety control. A later spec made that intent set page-derived and unbounded. The first spec was not wrong — an assumption underneath it moved, and nobody wrote the amendment. Both merged separately, each passing its own gate. So I wrote spec-kit-coherence. It hooks Two halves on purpose:
On your example it would surface 001's "log in with email + password" as a closed-world promise sitting against 009's added step, and say plainly that the artefact to amend is 001 — and that this is a governance change to 001's promises, not a code edit. Answering @dan-s-github's June question directly: this is that extension, such as it is. Fair warning that it is new — source is public, but no release is cut yet and it is not in the community catalog, so it is a |
|
As indicated above you can deliver an extension and/or preset to deliver this above and beyond the core SDD process |
|
This issue has been automatically marked as stale because it has had no activity for 60 days. It will be closed in 30 days unless there is a substantive update. If the problem still applies, please provide updated context such as whether it is still reproducible, the affected version or environment, its current impact, and any new reproduction details. A comment that only states that the issue is "still relevant" does not give maintainers enough information to reconsider it. |
|
We measured how big this problem is on a real repo. We took frank-fs/frank: 17 features in specs/, one Spec Kit template. Then we folded all 17 into one backlog, oldest first. At each feature we asked: is this story new, does it revise an earlier one, or is it a duplicate? 70 user stories as written became 45. 10 were rewritten by later features, 14 were the same story written again, 1 was dropped. Five features added no new stories at all, they only changed old ones. One story was touched by four features: 001 → 010 → 014 → 015, all about API compatibility. To know what it says today, you read four spec.md files in order. And 20 times a later requirement looked like it replaces an earlier one, but no spec says so. One requirement, "all HTML through Hox h()", was put in doubt three times. So per-feature specs work like a change log, not a spec of the system. The 001-login / 009-2FA case is the normal case, not an edge case. |
|
I'd keep both, in different places. Don't rewrite merged feature specs, because 001 is the record of why login was built that way. Instead, have 009 open with the lines it changes ("Changes 001 FR-002: login now requires a second factor"). In the same PR, update one current-state page per area, so an agent learns how login works today from The "how do we remember what was decided" part is a separate problem, and for us it was the harder one. Requirements land in spec.md, but the reasons (why no SMS codes, why email stays the login id) end up scattered across plan files and chat, and the next agent re-derives the opposite. What has worked for us: write each of those calls down as a short decision with its own id, its reason and the features it affects. Record a reversal as a new decision that points at the one it replaces, rather than editing the old one. Have the agent read the decisions for that area before it writes a new spec. A Disclosure: I build WorkLedger, which keeps each decision on the work it affects and links it to any later decision that replaces it. AI disclosure: drafted by Claude Code (Claude Opus 5.5, autonomous agent mode) on my behalf; the whole text is AI-written. |
|
To me, it would make even more sense if while the code is updated/generated (e.g from a new prompt while I am testing it), there was a tool that verifies that there are no inconsistencies between what has been implemented and the existing spec (if possible with concrete examples) - that can be integrated as a harness and update the spec or the code accordingly. I also feel that I loose control when the code is updated to modify any other spec without noticing. Anybody in the same boat? |
Uh oh!
There was an error while loading. Please reload this page.
With
spec-kit, each feature defines its own spec. This works well at first, but over time and with the multiplication of features, some descriptions become outdated or are enriched by new features.Example
In this case, the original spec of feature 001 becomes partially outdated or needs to be complemented by feature 009.
Discussion
/closecommand (or equivalent) to mark a feature as deprecated and automatically update a centralized project documentation?All reactions