Bug Description
scripts/bash/check-prerequisites.sh validates FEATURE_DIR, plan.md, and — under --require-tasks — tasks.md, each with an actionable error naming the command to run:
echo "ERROR: plan.md not found in $FEATURE_DIR" >&2
echo "Run /speckit-plan first to create the implementation plan." >&2
FEATURE_SPEC is resolved, exported in the JSON payload and printed in text mode (5 occurrences in the file), but its existence is never checked.
Both /speckit-analyze and /speckit-converge invoke the script as check-prerequisites.sh --json --require-tasks --include-tasks and then read the spec directly — SPEC = FEATURE_DIR/spec.md, followed by a "From spec.md" extraction section. When spec.md is missing, the prerequisite check passes and the failure surfaces later, without the "Run /speckit-specify first" guidance the script provides for every other artifact.
For accuracy: /speckit-implement does not read spec.md, so this affects analyze and converge.
Steps to Reproduce
- Create a feature, then generate
plan.md and tasks.md.
- Delete or rename
specs/<feature>/spec.md.
- Run
.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks.
Expected Behavior
The same treatment as plan.md and tasks.md: an explicit error pointing at /speckit-specify. If spec.md is legitimately optional for some callers, gating it behind a --require-spec flag would keep the check opt-in while still making it available to analyze and converge.
Actual Behavior
Exit 0, with FEATURE_SPEC reported as a path that does not exist. analyze and converge then fail further downstream with a less actionable error, which is precisely what this script exists to prevent.
Specify CLI Version
1.0.1 — and still present on main at the time of writing.
AI Agent
Claude (not agent-specific: the script is shared by all integrations).
Operating System
macOS — not OS-specific.
Bug Description
scripts/bash/check-prerequisites.shvalidatesFEATURE_DIR,plan.md, and — under--require-tasks—tasks.md, each with an actionable error naming the command to run:FEATURE_SPECis resolved, exported in the JSON payload and printed in text mode (5 occurrences in the file), but its existence is never checked.Both
/speckit-analyzeand/speckit-convergeinvoke the script ascheck-prerequisites.sh --json --require-tasks --include-tasksand then read the spec directly —SPEC = FEATURE_DIR/spec.md, followed by a "From spec.md" extraction section. Whenspec.mdis missing, the prerequisite check passes and the failure surfaces later, without the "Run /speckit-specify first" guidance the script provides for every other artifact.For accuracy:
/speckit-implementdoes not readspec.md, so this affectsanalyzeandconverge.Steps to Reproduce
plan.mdandtasks.md.specs/<feature>/spec.md..specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks.Expected Behavior
The same treatment as
plan.mdandtasks.md: an explicit error pointing at/speckit-specify. Ifspec.mdis legitimately optional for some callers, gating it behind a--require-specflag would keep the check opt-in while still making it available toanalyzeandconverge.Actual Behavior
Exit 0, with
FEATURE_SPECreported as a path that does not exist.analyzeandconvergethen fail further downstream with a less actionable error, which is precisely what this script exists to prevent.Specify CLI Version
1.0.1 — and still present on
mainat the time of writing.AI Agent
Claude (not agent-specific: the script is shared by all integrations).
Operating System
macOS — not OS-specific.