speq-skill / Docs / CLI Reference
The speq CLI provides spec discovery, semantic search, and validation for spec-driven development.
speq <command> [subcommand] [options]| Command | Purpose |
|---|---|
domain |
List and explore spec domains |
feature |
List, get, and validate feature specs |
plan |
List and validate implementation plans |
decision-log |
Validate the permanent decision log |
record |
Merge plan deltas into permanent specs |
search |
Semantic search across scenarios |
List all domains in the spec library.
speq domain listOutput:
cli
validation
search
Display all features in a tree view.
# All features
speq feature list
# Features in a specific domain
speq feature list <domain>Output:
specs/
├── cli/
│ ├── validate/
│ └── record/
├── validation/
│ └── keyword-casing/
└── search/
└── semantic/
Get full feature spec or a single scenario.
# Full feature spec
speq feature get <domain>/<feature>
# Single scenario (quote if name has spaces)
speq feature get "<domain>/<feature>/<scenario-name>"Examples:
speq feature get cli/validate
speq feature get "cli/validate/Validation fails on missing field"Validate spec structure and syntax.
# Validate all specs
speq feature validate
# Validate a domain
speq feature validate <domain>
# Validate a single feature
speq feature validate <domain>/<feature>Validation checks:
- Required sections (Feature, Background, Scenarios)
- RFC 2119 keyword usage
- Scenario step formatting
- DELTA marker syntax
List all active plans in specs/_plans/.
speq plan listOutput:
add-auth
fix-validation
Plans are listed alphabetically, one per line. Prints "No active plans." if none exist.
Validate a plan directory structure and contents.
speq plan validate <plan-name>Validates:
- Plan directory exists (
specs/_plans/<plan-name>/) plan.mdis present- Delta markers properly formatted
- Spec syntax is valid
decision-log.mdstructure, if the file is present (absence is not an error)
Validate the permanent decision log at specs/decision-log.md.
speq decision-log validateValidates:
- File exists (exits non-zero with an error message if absent)
- H1 is
# Architecture Decision Records - ADR headings follow
## ADR-NNN: <Title>— sequential, no gaps, starting atADR-001 - Each ADR contains all required fields:
**Date:**,**Plan:**,**Status:**,### Context,### Decision **Status:**is one of:Accepted,Superseded by ADR-NNN,Deprecated
### Options Considered and ### Consequences are optional and do not trigger errors when absent.
See Decision Log for the full format reference.
Merge approved plan deltas into permanent specs.
speq record <plan-name>This command:
- Reads delta specs from
specs/_plans/<plan-name>/ - Merges deltas into permanent specs in
specs/<domain>/<feature>/ - Strips DELTA markers
- Archives plan to
specs/_recorded/YYYY-MM-DD-<plan-name>/
Build or rebuild the semantic search index.
speq search indexThe index is built automatically on first search. Use this command to manually rebuild after spec changes.
Semantic search across all scenarios.
speq search query "<query>"
speq search query "<query>" --limit <n>Examples:
speq search query "error handling"
speq search query "validation" --limit 5Output includes:
- Feature path
- Scenario name
- Relevance score
- Matching context
See Spec Library for the full spec format reference, including BDD/Gherkin structure, RFC 2119 keywords, and step formatting rules.