Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ the site homepage. Process command references and authentication remain under
- `how-to/contract-driven-development.md` - Defining and evolving component contracts
- `how-to/complex-features.md` - Implementing complex features in bounded runs
- `how-to/spec-of-specs.md` - Breaking large features into smaller specifications
- `how-to/spec-persistence.md` - Choosing a specification persistence model
- `how-to/evolving-specs.md` - Maintaining specifications after delivery
- `how-to/persisting-specs.md` - Persisting specifications after delivery
- `how-to/evolving-specs.md` - Evolving specifications for subsequent changes
- `how-to/customization.md` - Adapting Spec Kit to your process
- `overview/catalogs.md` - Catalog discovery, trust, private sources, and precedence
- `extensions/overview.md` - Extension user guide
Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,4 +755,4 @@ artifact resolution priority.
- [Developing extensions](developing.md)
- [Extension API reference](api.md)
- [Publishing extensions](publishing.md)
- [Spec persistence models](../how-to/spec-persistence.md)
- [Persisting specifications](../how-to/persisting-specs.md)
189 changes: 65 additions & 124 deletions docs/how-to/evolving-specs.md
Original file line number Diff line number Diff line change
@@ -1,136 +1,77 @@
# How to maintain specifications after delivery
# How to evolve specifications in an existing project

If the repository has not been initialized with Spec Kit yet, start with
[Adopting Spec Kit in an Existing Project](existing-projects.md). This page
covers how to maintain feature artifacts after delivery and deliver subsequent
changes.

Existing projects need two separate maintenance loops:
Use this guide when requirements change or implementation discoveries call for
a revision to an existing feature. It covers making the next intended contract
explicit and delivering against it, not choosing which artifacts to retain
afterward.

- **Spec Kit project-file updates** refresh managed commands, scripts,
templates, and shared memory files.
- **Feature artifact evolution** maintains repository-specific `specs/`
artifacts according to the team's post-delivery persistence convention.
If the repository has not been initialized with Spec Kit yet, start with
[Adopting Spec Kit in an Existing Project](existing-projects.md).

Use the [upgrade workflow](../upgrade.md) when you need newer Spec Kit project
files. Use one of the artifact persistence models below to decide how completed
feature artifacts are maintained when requirements or implementation insights
change an existing project. None is required or the default.
## Assess the Change

For the conceptual model definitions, see
[Spec Persistence Models](spec-persistence.md).
Identify the affected behavior and review the available feature artifacts,
implementation, tests, and maintained design or product documentation.
Distinguish a defect against agreed intent from a proposed change to that intent.
The implementation is evidence for the discussion, not a replacement source of
requirements.

## Shared Feature Delivery Loop
Decide whether the discovery changes intended behavior, implementation strategy,
task breakdown, or only code. A discovery may originate in a spec, plan, task
list, or the implementation, including during delivery. Its origin does not
determine which artifact is authoritative.

All three persistence models use the same delivery/completeness process:
specify -> plan -> tasks -> implement -> converge. Repeat implementation and
convergence until the agreed feature is complete.
## Make the Revised Intent Explicit

For a new feature or a later change requiring implementation:
Start from a clean working tree or a dedicated branch so every artifact change
is reviewable. Follow the team's chosen persistence convention when deciding
whether to create a new feature directory or revise retained artifacts.
If previous feature artifacts were retired, use the maintained requirements and
decision records to establish context rather than assuming the constitution
alone specifies the feature.

1. Make the intended contract explicit in `spec.md`. Use `/speckit.specify` to
create a new feature directory under `specs/`, or revise an existing spec
according to your team's persistence convention.
1. Write the intended contract in `spec.md`. Use `/speckit.specify` to create a
new feature directory under `specs/`, or revise an existing spec.
2. Run `/speckit.plan` or revise `plan.md` to define the implementation approach.
3. Run `/speckit.tasks` or revise `tasks.md` to derive the work breakdown.
Run `/speckit.analyze` before implementation to catch cross-artifact gaps.
4. Run `/speckit.implement` and review the resulting code and artifact diffs.
5. Run `/speckit.converge` to assess implementation against the spec, plan, and
tasks, governed by the constitution. If it appends tasks for remaining gaps,
repeat `/speckit.implement` and `/speckit.converge` until the agreed feature
is complete.

Converge is append-only: its only possible write is adding tasks to `tasks.md`.
It does not choose a persistence strategy or rewrite the artifacts to accept
code as a replacement for documented intent.
4. Run `/speckit.analyze` to report cross-artifact inconsistencies before
implementation.

Core has no dedicated command that automatically reconciles differences among
`spec.md`, `plan.md`, and `tasks.md`. `/speckit.analyze` reports inconsistencies
without changing the artifacts. A team can reconcile them directly, or an
extension can provide commands or hooks that do so during or after delivery
according to that extension's documented behavior. Those actions do not change
the responsibilities of the core commands.

Discoveries may arise during delivery under any model. If they lead to an
agreed change of intent, make the revised contract explicit in the artifacts
and deliver against it. Reconciliation may occur during delivery, but the
maintenance choices below describe what the team persists after delivery; they
do not replace this loop.

## Flow-Forward Spec

Use flow-forward when each completed feature directory should remain a
historical record.

After delivery, retain the completed artifacts without changing them. For
another feature or a follow-up change requiring implementation, create a new
feature directory and use the shared delivery loop above.

The previous feature directory remains intact for audit, comparison, or
explaining how the project reached its current state. Use clear feature names or
cross-links when a new directory supersedes or extends earlier work.

## Living Spec

Use living spec when `spec.md` is the contract and `plan.md` and `tasks.md` are
derived from it.

After delivery, maintain `spec.md` as the contract. When intended behavior
changes, revise the existing `spec.md` first. Then reconcile downstream
artifacts so they match the updated spec:

1. Start from a clean working tree or a dedicated branch so every artifact
change is reviewable.
2. Update `spec.md` with the intended contract.
3. Reconcile `plan.md` and `tasks.md` directly or through an extension according
to the team's documented convention.
4. Run `/speckit.analyze` to report any remaining gaps between the spec, plan,
and tasks.

These steps maintain the artifact set; they do not deliver changed behavior.
If the revised contract requires implementation, use the shared delivery loop
above against those explicit intended artifacts.

Preserve important implementation rationale before replacing derived artifacts.
If a plan or task list contains decisions that still matter, carry them forward
explicitly.

## Flow-Back Spec

Use flow-back when accepted discoveries inform maintenance across the artifact
set after delivery.

A discovery may have originated in `spec.md`, `plan.md`, `tasks.md`, or the
implementation, including during delivery. For post-delivery maintenance,
the team decides which discoveries to accept and brings the artifacts into
alignment with that agreed direction:

1. Capture the discovery in the artifact closest to the work.
2. Decide whether it changes intended behavior, implementation strategy, task
breakdown, or only code.
3. Update any other artifacts that now disagree with the accepted direction.
4. Run `/speckit.analyze` to check for gaps across `spec.md`, `plan.md`, and
`tasks.md`.

The implementation provides evidence for the team's decision; accepting code
does not automatically make it the intended contract. Reconcile the artifacts
directly or through an extension. Analyze and converge do not provide automatic
all-artifact reconciliation, and no core amendment command is required. If the
agreed direction requires implementation, use the shared delivery loop above
against explicit intended artifacts.

Flow-back is flexible, but it requires discipline. Do not leave a lower-level
change in `tasks.md` or code if `spec.md` still says something different and the
spec is meant to remain trustworthy.

## Before Updating Spec Kit Project Files

Before refreshing Spec Kit project files with the terminal command
`specify init --here --force --integration <your-agent>`, protect any
project-specific material that lives outside `specs/`, especially
`.specify/memory/constitution.md` and customized files under
`.specify/templates/` or `.specify/scripts/`. Use `<your-agent>` for the AI
coding agent integration used by the target project.

Your `specs/` directory is not part of the template package, but shared project
files can be overwritten by a forced refresh.
`spec.md`, `plan.md`, and `tasks.md`. Analyze reports inconsistencies without
editing artifacts. Reconcile them directly, or use an extension according to
its documented behavior. Preserve important implementation rationale before
replacing derived artifacts.

If the team accepts a discovery that changes intent, reflect that agreement in
the affected artifacts. Do not leave a lower-level change in tasks or code
contradicting a spec that is meant to remain trustworthy.

## Deliver and Assess the Change

All persistence models use the same delivery/completeness process:
specify -> plan -> tasks -> implement -> converge.

1. Run `/speckit.implement` against the explicit intended artifacts.
2. Review the resulting implementation and artifact diffs.
3. Run `/speckit.converge` to assess implementation against the spec, plan, and
tasks, governed by the constitution.
4. If converge appends tasks for remaining gaps, repeat implementation and
convergence until the agreed feature is complete.

Converge is append-only: its only possible write is adding remaining work to
`tasks.md`. It does not rewrite artifacts to accept code as a replacement for
documented intent. Neither analyze nor converge selects a persistence strategy,
and extension-provided reconciliation does not change these core command
responsibilities.

Revising artifacts does not by itself deliver changed behavior. When a revision
requires implementation, complete this delivery loop. After delivery, apply the
team's retention and maintenance policy separately.

## See also

- [Persisting specifications](persisting-specs.md) - Choose what survives
delivery and how retained artifacts are maintained.
- [Upgrade Spec Kit](../upgrade.md) - Refresh managed project files rather than
changing feature requirements.
16 changes: 5 additions & 11 deletions docs/how-to/existing-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,11 @@ For command details and optional quality gates, see the

## 5. Decide How Specs Will Age

After the first change, agree on how the team will maintain completed feature
artifacts:

- Keep each feature directory as an immutable historical record.
- Maintain `spec.md` as a living contract and regenerate downstream artifacts.
- Allow discoveries to flow back from code, tasks, or plans, then reconcile the
full artifact set.

The [Spec Persistence Models](spec-persistence.md) page compares
these choices. The [Evolving Specs guide](evolving-specs.md) provides the
maintenance loop for each model.
After the first change, agree on what feature artifacts the team will retain
and how retained artifacts will be maintained. The
[Persisting Specifications](persisting-specs.md) page compares those choices, including
retiring completed feature artifacts under the constitution-only model. Use the
[Evolving Specs guide](evolving-specs.md) when delivering a subsequent change.

## Existing-Project Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ and specification maintenance, plus authentication and developing Spec Kit itsel
| Agree on interfaces between components | [Define and evolve contracts](contract-driven-development.md) |
| Keep implementation within manageable context limits | [Implement complex features](complex-features.md) |
| Decompose work into independently specified slices | [Break down large features](spec-of-specs.md) |
| Decide how completed specifications should live | [Choose a persistence model](spec-persistence.md) |
| Keep feature artifacts aligned after delivery | [Maintain specifications after delivery](evolving-specs.md) |
| Decide how completed specifications should live | [Persist specifications](persisting-specs.md) |
| Deliver a change to an existing feature | [Evolve specifications](evolving-specs.md) |
| Adapt practices to your team's needs | [Adapt Spec Kit to your process](customization.md) |
| Access private catalogs, downloads, and release checks | [Configure authentication](../reference/authentication.md) |
| Contribute changes to Spec Kit itself | [Develop Spec Kit locally](local-development.md) |
Expand Down
Loading
Loading