Fission-AI/OpenSpec · error · Error
Missing required argument <spec-id>
Error message
Missing required argument <spec-id>
What it means
Error "Missing required argument <spec-id>" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/commands/spec.ts:115
// rootPath is set only by root-aware callers (top-level `show`); the
// deprecated noun-form commands stay cwd-based.
constructor(rootPath?: string) {
this.rootPath = rootPath;
this.specsDir = rootPath ? join(rootPath, 'openspec', 'specs') : SPECS_DIR;
}
async show(specId?: string, options: ShowOptions = {}): Promise<void> {
if (!specId) {
const canPrompt = isInteractive(options);
const specIds = await getSpecIds(this.rootPath ?? process.cwd());
if (canPrompt && specIds.length > 0) {
const { select } = await import('@inquirer/prompts');
specId = await select({
message: 'Select a spec to show',
choices: specIds.map(id => ({ name: id, value: id })),
});
} else {
throw new Error('Missing required argument <spec-id>');
}
}
const specPath = join(this.specsDir, specId, 'spec.md');
assertSpecPath(this.specsDir, specPath);
if (!existsSync(specPath)) {
// Root-aware callers get the absolute path; the cwd-based noun form
// keeps its historical forward-slash relative message on all platforms.
const displayPath = this.rootPath ? specPath : `openspec/specs/${specId}/spec.md`;
throw new Error(`Spec '${specId}' not found at ${displayPath}`);
}
if (options.json) {
if (options.requirements && options.requirement) {
throw new Error('Options --requirements and --requirement cannot be used together');
}
const parsed = parseSpecFromFile(this.specsDir, specPath, specId);
const filtered = filterSpec(parsed, options);View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/commands/spec.ts:115 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/e20b8f9787bf26bb.
Report an issue: GitHub.