Spec Project
Drive project work from accepted product intent to implementation and durable
testing evidence. Treat the artifacts as interfaces that keep intent,
implementation, and evidence aligned; do not treat document production itself as
the outcome.
Delegation Contract
Own the project lifecycle and keep artifact writers explicit. Do not claim
ownership of artifacts produced by a lower-level workflow.
| Artifact |
Writer and meaning |
docs/PRD.md |
spec-project: product outcomes, actors, requirements, and boundaries |
docs/feature-breakdown.md |
spec-project: numbered features, dependencies, and declared priorities |
specs/NNN-feature-name/spec.md |
Spec Kit in Spec Kit mode; portable coding agent otherwise: accepted product behavior |
specs/NNN-feature-name/plan.md |
Spec Kit in Spec Kit mode; portable coding agent otherwise: implementation approach |
specs/NNN-feature-name/tasks.md |
Spec Kit in Spec Kit mode; portable coding agent otherwise: executable work |
specs/NNN-feature-name/test-spec.md |
/shiplight cover: what must be verified and at what declared priority |
specs/NNN-feature-name/test-report.md |
/shiplight cover: tests, commands, and observed results |
| Tests and verification artifacts |
/shiplight cover and its producers |
Never author or directly edit test-spec.md, test-report.md, repo-root
TESTING.md, or tests. Orchestrate /shiplight cover to create or refresh its
artifacts.
Authority and Drift
- Treat
spec.md as the product-behavior authority in both operating modes.
- Treat code as an implementation of the product spec.
- Treat
test-spec.md, tests, reports, verification, and reviews as evidence
artifacts, not substitutes for product intent.
- Keep every
spec.md as the latest accepted product snapshot, never a
chronological change log. A reader must be able to determine all current
behavior without reconstructing it from amendments, tickets, release notes,
or git history.
- When accepted intent changes, rewrite the affected requirements, scenarios,
constraints, and non-goals in place. Remove superseded behavior instead of
appending dated updates or descriptions of what the feature used to do.
- Let git preserve the spec's history. Put migration history in plans or
release notes only when it is operationally necessary, not in the current
product spec.
When behavior changes, have the active feature-spec writer reconcile the whole
spec.md into that current snapshot and obtain acceptance before changing the
implementation. Do not satisfy this gate by appending the change request to the
old spec. Then delegate implementation through the active mode and ask
/shiplight cover to reconcile its testing contract and evidence. If product
intent is ambiguous or artifacts conflict materially, stop and ask the owner;
never silently choose product semantics.
Resolve the Operating Mode
Use one specification workflow for every project and vary only the mechanics:
- Portable mode (default): direct the coding agent through existing
repository conventions. When none exist, use the Markdown paths in the
Delegation Contract and the bundled portable template. Do not create
.specify/, a Spec Kit constitution, or Spec Kit pointers.
- Spec Kit mode: delegate feature specification, planning, task generation,
and implementation to Spec Kit. Use this mode only when a complete
.specify/ setup already exists or the user explicitly requests adoption.
Before invoking Spec Kit commands, read
references/spec-kit.md.
If .specify/ exists but required commands or templates are missing, report a
partial installation instead of guessing the mode or repairing it without a
request. Never make Spec Kit adoption a prerequisite for portable work.
Shiplight is optional during planning and implementation, but required to
produce test-spec.md, tests, and test-report.md. If /shiplight cover is not
installed when the evidence phase is requested, report that phase as
unavailable and provide the handoff; never take ownership of its files as a
fallback.
Default Invocation
When invoked without a specific operation, perform a read-only status pass:
- Read the current branch and working-tree state.
- Detect portable or Spec Kit mode.
- Read the PRD, feature breakdown, and relevant feature artifacts.
- Report the active or inferred feature, phase, artifacts found, drift, and
next gate. Treat chronological amendments or retained superseded behavior in
spec.md as specification drift.
Do not create files, change pointers or branches, or run long suites during a
status pass.
Reconcile Before Creating
Treat every incoming product change as an existing-feature change until the
repository evidence shows otherwise. Before assigning a feature ID, creating a feature
directory, or invoking a new-feature Spec Kit workflow:
- Read the PRD and feature breakdown. Inventory every existing
specs/*/spec.md and inspect each feature's name, outcome, actors, and
boundaries. Read every plausibly related spec in full.
- Compare the requested change with existing product capabilities by actor,
job, workflow outcome, data responsibility, and system boundary. Do not
classify from ticket wording, branch name, changed file count, or
implementation size.
- Classify as an existing-feature retrofit (default) when the change
modifies, extends, replaces, or adds a scenario within an existing
capability. Select that feature and reconcile its current spec. A missing
requirement is not by itself a new feature.
- If the change crosses existing capabilities, update every affected spec.
Cross-cutting scope does not justify a new umbrella feature.
- Classify as a new feature (exception) only when the change introduces a
durable capability with its own product outcome and boundary that can be
specified, delivered, and verified independently without distorting an
existing feature.
- Before creating it, report which existing features were checked and why none
can coherently own the capability. If that conclusion requires product
judgment, ask the owner.
Do not create a new feature ID, directory, or spec until this check is complete.
When uncertain, retrofit or ask; do not create.
Primary Operations
Initialize (init)
Create or refine docs/PRD.md from assets/prd-template.md, then create or
refine docs/feature-breakdown.md from
assets/feature-breakdown-template.md. Preserve accepted project conventions
and product terminology.
In portable mode, stop there. In Spec Kit mode, apply its constitution workflow
only as described in references/spec-kit.md.
Break Down (breakdown)
Split the PRD into independently specifiable and verifiable product slices.
Identify actors, jobs, workflows, data domains, integrations, and risk
boundaries. Assign stable three-digit IDs, dependencies, MVP/release placement,
and a declared P0-P3 priority. Never invent priority: preserve an accepted
source or ask the owner; otherwise record UNKNOWN.
Before adding a roadmap entry, run the reconciliation gate against the current
breakdown and specs. Extend an existing feature entry when it already owns the
capability.
Select (select)
Complete the reconciliation gate, then select an existing feature whenever it
can own the change. Resolve a new feature ID and target only after reporting why
the inspected existing features do not apply. In portable mode, let the coding
agent create the directory only after that evidence; do not create or update Spec
Kit pointers. In Spec Kit mode, invoke its new-feature workflow only after the
same gate, then let Spec Kit create the feature directory and maintain its
pointers.
Treat branch selection as separate from feature selection. Create or switch a
branch only when the user explicitly requests that branch operation, and never
strand uncommitted work.
Drive a Feature (lifecycle)
Run the reconciliation gate before this lifecycle. For a retrofit, keep the
existing feature ID and reconcile its snapshot; do not fork a replacement spec.
Then run the selected feature through these gates:
- Specify: in Spec Kit mode, invoke its specify workflow and let it create
or reconcile
spec.md. In portable mode, direct the coding agent to create
or reconcile spec.md from assets/portable-feature-spec-template.md. Keep
actors, behavior, acceptance scenarios, constraints, non-goals,
dependencies, and open questions in product language. For an existing
feature, rewrite these sections into one coherent current snapshot; never
append the requested change as a chronological update.
- Clarify and accept: use Spec Kit's clarification workflow in Spec Kit
mode; otherwise have the coding agent surface unresolved decisions. Obtain
owner acceptance of product intent. Treat that acceptance only as approval
of the product spec.
- Plan and task: in Spec Kit mode, delegate
plan.md and tasks.md to its
plan and tasks workflows. In portable mode, direct the coding agent through
existing project conventions. Keep tasks traceable to accepted requirements.
- Plan verification: hand the accepted spec and declared priorities to
/shiplight cover. Ask it to create test-spec.md and tests before
production changes when a regression-first or test-first sequence is
practical. If it is not practical, record why and invoke it after the
implementation exists.
- Implement: delegate to Spec Kit's implementation workflow in Spec Kit
mode and to the coding agent in portable mode. Produce the smallest complete
implementation of the accepted scope. Ask the relevant artifact writer to
keep spec, plan, and tasks current as implementation facts emerge; ask the
owner before changing product semantics.
- Verify: use
/shiplight verify for relevant live UI/API behavior.
- Complete verification: invoke
/shiplight cover to refresh the testing contract,
run the relevant verification methods, and write test-report.md. Optionally invoke
/shiplight review when the user requests review or the accepted plan calls
for it.
- Reconcile: confirm
spec.md states only the latest accepted behavior and
can be understood without its history. Ask the relevant lower-level writer
to resolve that and all other artifact drift before reporting completion;
do not bypass its edit contract.
Retrofit Existing Features (maintenance)
Use this operation for all existing-capability changes, not only bugs and
refactors. Identify the precise current behavior and every affected feature.
Update accepted specs as current snapshots when product intent changes; remove
replaced behavior rather than appending a history entry. For bugs, establish
the root cause from concrete evidence, add a regression test through the
appropriate producer when practical, and make the smallest fix. Run targeted
verification and /shiplight cover for the affected scope.
Do not create a feature ID or feature branch for routine maintenance.
Batch and Autonomous Work
Use batch only to orchestrate preparation of multiple feature specs and plans
with the owner available; do not implement multiple features concurrently. Use
autonomous only for accepted specs whose plans and tasks contain no unresolved
product decisions. Work in dependency order and stop on ambiguity, missing
prerequisite work, or a verification decision requiring owner judgment.
Completion States
Report each state separately:
- Specification complete: product intent is accepted;
spec.md is a
coherent latest product snapshot with no superseded behavior or chronological
amendments; and plan.md and tasks.md are reconciled to it.
- Implementation complete: code implements the accepted scope and relevant
implementation checks pass.
- Evidence complete:
/shiplight cover produced a reconciled
test-spec.md, relevant verification methods passed, and test-report.md
records the run.
For a full lifecycle request, do not report the feature done until all three
states are complete. Report unavailable tooling, blocked checks, and residual
risks explicitly rather than weakening the completion criteria.
Mutation Boundaries
- Keep status passes read-only.
- Let
init and breakdown edit only the PRD and feature breakdown.
- Require the reconciliation gate before
breakdown adds a feature or select
creates an ID, directory, pointer, or branch. Let select delegate authorized
changes to the active mode.
- Let
lifecycle and maintenance orchestrate the active feature workflow and
/shiplight cover; do not bypass their artifact edit contracts.
- Require explicit requests for branch, commit, release, PR, merge, and Spec Kit
installation operations.
- Preserve unrelated changes in a dirty working tree.
Route Narrow Requests
- Route test creation, coverage assessment, or
test-spec.md changes to
/shiplight cover.
- Route browser/live verification only to
/shiplight verify.
- Route code or product review only to
/shiplight review.
Output
Report mode, operation, active feature, branch, phase, artifacts changed,
verification performed, completion states, and the next gate.
1---2name: spec-project3description: Drive specification-led project development from product intent through implementation and durable testing evidence. Use when an agent needs to create or refine a PRD, break a product into features, maintain accepted feature specs as current product snapshots rather than chronological change logs, reconcile a product change into existing feature specs before considering a new feature, orchestrate specification, planning, and implementation, or orchestrate /shiplight cover so it produces test-spec.md, tests, and test-report.md. Use portable Markdown by default; delegate to GitHub Spec Kit only when the repository has adopted it or the user explicitly requests it.4---56# Spec Project78Drive project work from accepted product intent to implementation and durable9testing evidence. Treat the artifacts as interfaces that keep intent,10implementation, and evidence aligned; do not treat document production itself as11the outcome.1213## Delegation Contract1415Own the project lifecycle and keep artifact writers explicit. Do not claim16ownership of artifacts produced by a lower-level workflow.1718| Artifact | Writer and meaning |19| --- | --- |20| `docs/PRD.md` | `spec-project`: product outcomes, actors, requirements, and boundaries |21| `docs/feature-breakdown.md` | `spec-project`: numbered features, dependencies, and declared priorities |22| `specs/NNN-feature-name/spec.md` | Spec Kit in Spec Kit mode; portable coding agent otherwise: accepted product behavior |23| `specs/NNN-feature-name/plan.md` | Spec Kit in Spec Kit mode; portable coding agent otherwise: implementation approach |24| `specs/NNN-feature-name/tasks.md` | Spec Kit in Spec Kit mode; portable coding agent otherwise: executable work |25| `specs/NNN-feature-name/test-spec.md` | `/shiplight cover`: what must be verified and at what declared priority |26| `specs/NNN-feature-name/test-report.md` | `/shiplight cover`: tests, commands, and observed results |27| Tests and verification artifacts | `/shiplight cover` and its producers |2829Never author or directly edit `test-spec.md`, `test-report.md`, repo-root30`TESTING.md`, or tests. Orchestrate `/shiplight cover` to create or refresh its31artifacts.3233## Authority and Drift3435- Treat `spec.md` as the product-behavior authority in both operating modes.36- Treat code as an implementation of the product spec.37- Treat `test-spec.md`, tests, reports, verification, and reviews as evidence38 artifacts, not substitutes for product intent.39- Keep every `spec.md` as the latest accepted product snapshot, never a40 chronological change log. A reader must be able to determine all current41 behavior without reconstructing it from amendments, tickets, release notes,42 or git history.43- When accepted intent changes, rewrite the affected requirements, scenarios,44 constraints, and non-goals in place. Remove superseded behavior instead of45 appending dated updates or descriptions of what the feature used to do.46- Let git preserve the spec's history. Put migration history in plans or47 release notes only when it is operationally necessary, not in the current48 product spec.4950When behavior changes, have the active feature-spec writer reconcile the whole51`spec.md` into that current snapshot and obtain acceptance before changing the52implementation. Do not satisfy this gate by appending the change request to the53old spec. Then delegate implementation through the active mode and ask54`/shiplight cover` to reconcile its testing contract and evidence. If product55intent is ambiguous or artifacts conflict materially, stop and ask the owner;56never silently choose product semantics.5758## Resolve the Operating Mode5960Use one specification workflow for every project and vary only the mechanics:61621. **Portable mode (default):** direct the coding agent through existing63 repository conventions. When none exist, use the Markdown paths in the64 Delegation Contract and the bundled portable template. Do not create65 `.specify/`, a Spec Kit constitution, or Spec Kit pointers.662. **Spec Kit mode:** delegate feature specification, planning, task generation,67 and implementation to Spec Kit. Use this mode only when a complete68 `.specify/` setup already exists or the user explicitly requests adoption.69 Before invoking Spec Kit commands, read70 [references/spec-kit.md](references/spec-kit.md).7172If `.specify/` exists but required commands or templates are missing, report a73partial installation instead of guessing the mode or repairing it without a74request. Never make Spec Kit adoption a prerequisite for portable work.7576Shiplight is optional during planning and implementation, but required to77produce `test-spec.md`, tests, and `test-report.md`. If `/shiplight cover` is not78installed when the evidence phase is requested, report that phase as79unavailable and provide the handoff; never take ownership of its files as a80fallback.8182## Default Invocation8384When invoked without a specific operation, perform a read-only status pass:85861. Read the current branch and working-tree state.872. Detect portable or Spec Kit mode.883. Read the PRD, feature breakdown, and relevant feature artifacts.894. Report the active or inferred feature, phase, artifacts found, drift, and90 next gate. Treat chronological amendments or retained superseded behavior in91 `spec.md` as specification drift.9293Do not create files, change pointers or branches, or run long suites during a94status pass.9596## Reconcile Before Creating9798Treat every incoming product change as an existing-feature change until the99repository evidence shows otherwise. Before assigning a feature ID, creating a feature100directory, or invoking a new-feature Spec Kit workflow:1011021. Read the PRD and feature breakdown. Inventory every existing103 `specs/*/spec.md` and inspect each feature's name, outcome, actors, and104 boundaries. Read every plausibly related spec in full.1052. Compare the requested change with existing product capabilities by actor,106 job, workflow outcome, data responsibility, and system boundary. Do not107 classify from ticket wording, branch name, changed file count, or108 implementation size.1093. Classify as an **existing-feature retrofit (default)** when the change110 modifies, extends, replaces, or adds a scenario within an existing111 capability. Select that feature and reconcile its current spec. A missing112 requirement is not by itself a new feature.1134. If the change crosses existing capabilities, update every affected spec.114 Cross-cutting scope does not justify a new umbrella feature.1155. Classify as a **new feature (exception)** only when the change introduces a116 durable capability with its own product outcome and boundary that can be117 specified, delivered, and verified independently without distorting an118 existing feature.1196. Before creating it, report which existing features were checked and why none120 can coherently own the capability. If that conclusion requires product121 judgment, ask the owner.122123Do not create a new feature ID, directory, or spec until this check is complete.124When uncertain, retrofit or ask; do not create.125126## Primary Operations127128### Initialize (`init`)129130Create or refine `docs/PRD.md` from `assets/prd-template.md`, then create or131refine `docs/feature-breakdown.md` from132`assets/feature-breakdown-template.md`. Preserve accepted project conventions133and product terminology.134135In portable mode, stop there. In Spec Kit mode, apply its constitution workflow136only as described in `references/spec-kit.md`.137138### Break Down (`breakdown`)139140Split the PRD into independently specifiable and verifiable product slices.141Identify actors, jobs, workflows, data domains, integrations, and risk142boundaries. Assign stable three-digit IDs, dependencies, MVP/release placement,143and a declared P0-P3 priority. Never invent priority: preserve an accepted144source or ask the owner; otherwise record `UNKNOWN`.145146Before adding a roadmap entry, run the reconciliation gate against the current147breakdown and specs. Extend an existing feature entry when it already owns the148capability.149150### Select (`select`)151152Complete the reconciliation gate, then select an existing feature whenever it153can own the change. Resolve a new feature ID and target only after reporting why154the inspected existing features do not apply. In portable mode, let the coding155agent create the directory only after that evidence; do not create or update Spec156Kit pointers. In Spec Kit mode, invoke its new-feature workflow only after the157same gate, then let Spec Kit create the feature directory and maintain its158pointers.159160Treat branch selection as separate from feature selection. Create or switch a161branch only when the user explicitly requests that branch operation, and never162strand uncommitted work.163164### Drive a Feature (`lifecycle`)165166Run the reconciliation gate before this lifecycle. For a retrofit, keep the167existing feature ID and reconcile its snapshot; do not fork a replacement spec.168Then run the selected feature through these gates:1691701. **Specify:** in Spec Kit mode, invoke its specify workflow and let it create171 or reconcile `spec.md`. In portable mode, direct the coding agent to create172 or reconcile `spec.md` from `assets/portable-feature-spec-template.md`. Keep173 actors, behavior, acceptance scenarios, constraints, non-goals,174 dependencies, and open questions in product language. For an existing175 feature, rewrite these sections into one coherent current snapshot; never176 append the requested change as a chronological update.1772. **Clarify and accept:** use Spec Kit's clarification workflow in Spec Kit178 mode; otherwise have the coding agent surface unresolved decisions. Obtain179 owner acceptance of product intent. Treat that acceptance only as approval180 of the product spec.1813. **Plan and task:** in Spec Kit mode, delegate `plan.md` and `tasks.md` to its182 plan and tasks workflows. In portable mode, direct the coding agent through183 existing project conventions. Keep tasks traceable to accepted requirements.1844. **Plan verification:** hand the accepted spec and declared priorities to185 `/shiplight cover`. Ask it to create `test-spec.md` and tests before186 production changes when a regression-first or test-first sequence is187 practical. If it is not practical, record why and invoke it after the188 implementation exists.1895. **Implement:** delegate to Spec Kit's implementation workflow in Spec Kit190 mode and to the coding agent in portable mode. Produce the smallest complete191 implementation of the accepted scope. Ask the relevant artifact writer to192 keep spec, plan, and tasks current as implementation facts emerge; ask the193 owner before changing product semantics.1946. **Verify:** use `/shiplight verify` for relevant live UI/API behavior.1957. **Complete verification:** invoke `/shiplight cover` to refresh the testing contract,196 run the relevant verification methods, and write `test-report.md`. Optionally invoke197 `/shiplight review` when the user requests review or the accepted plan calls198 for it.1998. **Reconcile:** confirm `spec.md` states only the latest accepted behavior and200 can be understood without its history. Ask the relevant lower-level writer201 to resolve that and all other artifact drift before reporting completion;202 do not bypass its edit contract.203204### Retrofit Existing Features (`maintenance`)205206Use this operation for all existing-capability changes, not only bugs and207refactors. Identify the precise current behavior and every affected feature.208Update accepted specs as current snapshots when product intent changes; remove209replaced behavior rather than appending a history entry. For bugs, establish210the root cause from concrete evidence, add a regression test through the211appropriate producer when practical, and make the smallest fix. Run targeted212verification and `/shiplight cover` for the affected scope.213214Do not create a feature ID or feature branch for routine maintenance.215216### Batch and Autonomous Work217218Use `batch` only to orchestrate preparation of multiple feature specs and plans219with the owner available; do not implement multiple features concurrently. Use220`autonomous` only for accepted specs whose plans and tasks contain no unresolved221product decisions. Work in dependency order and stop on ambiguity, missing222prerequisite work, or a verification decision requiring owner judgment.223224## Completion States225226Report each state separately:227228- **Specification complete:** product intent is accepted; `spec.md` is a229 coherent latest product snapshot with no superseded behavior or chronological230 amendments; and `plan.md` and `tasks.md` are reconciled to it.231- **Implementation complete:** code implements the accepted scope and relevant232 implementation checks pass.233- **Evidence complete:** `/shiplight cover` produced a reconciled234 `test-spec.md`, relevant verification methods passed, and `test-report.md`235 records the run.236237For a full lifecycle request, do not report the feature done until all three238states are complete. Report unavailable tooling, blocked checks, and residual239risks explicitly rather than weakening the completion criteria.240241## Mutation Boundaries242243- Keep status passes read-only.244- Let `init` and `breakdown` edit only the PRD and feature breakdown.245- Require the reconciliation gate before `breakdown` adds a feature or `select`246 creates an ID, directory, pointer, or branch. Let `select` delegate authorized247 changes to the active mode.248- Let `lifecycle` and `maintenance` orchestrate the active feature workflow and249 `/shiplight cover`; do not bypass their artifact edit contracts.250- Require explicit requests for branch, commit, release, PR, merge, and Spec Kit251 installation operations.252- Preserve unrelated changes in a dirty working tree.253254## Route Narrow Requests255256- Route test creation, coverage assessment, or `test-spec.md` changes to257 `/shiplight cover`.258- Route browser/live verification only to `/shiplight verify`.259- Route code or product review only to `/shiplight review`.260261## Output262263Report mode, operation, active feature, branch, phase, artifacts changed,264verification performed, completion states, and the next gate.