Addressing specs, plans and changelogs

One name, the feature's, reaches every document a feature produces.

Addressing documents: the rules

Every feature gets one name when its workflow starts, such as 000059_normalise-artifact-addressing. That name, exactly as the workflow records it, is how you reach its spec, its plan documents and its changelog record.

Specs: spec file

A spec is one document per feature, addressed by the feature name alone.

Plans: plan file

A plan is a set of documents under one feature, so every plan document command takes two arguments: the feature, then the document.

Changelog records: changelog file

A changelog record is one document per feature, addressed by the bare feature name, in the project’s central store or in a registered repository’s own store.

Where documents are stored: name and path

Every list entry carries two separate facts: the name you address the document by, and the place the store keeps it.

Error codes

A refused address returns the standard JSON error envelope, and its next_action gives the command to run instead.

unexpected_extension error

The name carried a file extension or a path separator, or a plan document was written as one joined path such as <name>/plan.md. Nothing is read or written. next_action restates the same command correctly spelled. For spektacular spec file read x.md:

{
"error": true,
"code": "unexpected_extension",
"message": "\"x.md\" carries a file extension or path; spec documents are addressed by the bare feature name",
"resource": "x.md",
"next_action": "run `spektacular spec file read x`"
}
document_required error

A plan document command named a feature but no document. next_action reads: run spektacular plan file list <name> to see its documents, then name one, e.g. spektacular plan file read <name> plan.

not_found error

The name is well formed but the store holds no such document. next_action points at the matching list command, such as spektacular spec file list or spektacular plan file list <name>.

Upgrading from earlier spellings

Earlier releases addressed documents by file name. This is a breaking change with no deprecation window: the old spellings are refused with unexpected_extension, whose next_action gives the new form.

Where the stores live

The spec, plan and changelog stores, and the folder every path is relative to, are set in the project’s configuration.