Summary
specd graph index should check for stale/missing spec metadata before indexing and prompt the user to regenerate it.
Motivation
Since commit 13597ee, the indexer no longer falls back to parsing spec.md for title and dependsOn — it uses .specd-metadata.yaml exclusively (defaulting to title = specId, description = '', dependsOn = [] when metadata is absent). This is correct, but means specs without up-to-date metadata will be indexed with degraded information.
A pre-flight check would catch this and give the user the chance to fix it before indexing.
Proposed behavior
- Before opening the provider, run the equivalent of
spec list --metadata-status stale,missing,invalid
- If any specs are found:
- In interactive TTY mode: display the list and ask "Regenerate metadata before indexing? [Y/n]"
- If yes: run
spec generate-metadata for each, then proceed with indexing
- If no: proceed with indexing (specs will use default title/empty dependsOn)
- In non-interactive mode (CI, piped): print a warning to stderr and proceed
Notes
- This is a CLI-layer concern only —
@specd/code-graph should not depend on metadata generation
- The check uses
Kernel.specs which is already available via resolveCliContext()
- Could also support
--regenerate-metadata flag to skip the prompt
Summary
specd graph indexshould check for stale/missing spec metadata before indexing and prompt the user to regenerate it.Motivation
Since commit 13597ee, the indexer no longer falls back to parsing
spec.mdfor title anddependsOn— it uses.specd-metadata.yamlexclusively (defaulting totitle = specId,description = '',dependsOn = []when metadata is absent). This is correct, but means specs without up-to-date metadata will be indexed with degraded information.A pre-flight check would catch this and give the user the chance to fix it before indexing.
Proposed behavior
spec list --metadata-status stale,missing,invalidspec generate-metadatafor each, then proceed with indexingNotes
@specd/code-graphshould not depend on metadata generationKernel.specswhich is already available viaresolveCliContext()--regenerate-metadataflag to skip the prompt