{"record":{"id":"cde1e74e2a99ec60","repo":"pbakaus/impeccable","slug":"build-phase-no-spec-at-spec-path-run-comp-spec","errorCode":null,"errorMessage":"build-phase: no spec at {SPEC_PATH}; run comp-spec.mjs first\n","messagePattern":"build-phase: no spec at (.+?); run comp-spec\\.mjs first\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/comp-verbs/src/build_phase.rs","lineNumber":1876,"sourceCode":"    let mut state = match load_state(io) {\n        Some(s) => s,\n        None => {\n            io.err(&format!(\"build-phase: no state at {}; run build-phase.mjs start --comp <approved comp>\\n\", state_path()));\n            return 1;\n        }\n    };\n    match cmd {\n        \"status\" => {\n            if flag(argv, \"json\") {\n                io.out(&format!(\"{}\\n\", util::json_pretty(&state)));\n            } else {\n                io.out(&format!(\"{}\\n\", render_status(io, &state)));\n            }\n            0\n        }\n        \"scaffold\" => {\n            let Some(spec) = load_spec(&abs(io, SPEC_PATH)) else {\n                io.err(&format!(\"build-phase: no spec at {SPEC_PATH}; run comp-spec.mjs first\\n\"));\n                return 1;\n            };\n            let out = write_scaffold(io, &spec);\n            let bp = state.get(\"breakpoint\").and_then(Value::as_str).map(String::from).unwrap_or_else(|| {\n                let w = spec.pointer(\"/compSize/width\").and_then(Value::as_i64).unwrap_or(0);\n                let h = spec.pointer(\"/compSize/height\").and_then(Value::as_i64).unwrap_or(0);\n                format!(\"{w}x{h}\")\n            });\n            io.out(&format!(\"SCAFFOLD {}\\n\", out.dir));\n            io.out(&format!(\"  {}   one custom property set per region (--r-<id>-x/y/w/h in % of the comp; --r-<id>-cap, --r-<id>-font, --r-<id>-weight where measured); bind these to your own markup\\n\", out.css));\n            io.out(&format!(\"  {}  a reference page: every region positioned at its box inside a {bp} frame, plates placed with object-fit: contain, text slots at the measured cap height in the ranked face\\n\", out.html));\n            io.out(\"  The reference is a check, not the page: keep your own semantic structure and bind the numbers to it (an element per region, its box from the properties). Overlapping boxes are overlapping boxes. What the gate reads is pixels; a page that lands each region at its box passes whatever markup it uses.\\n\");\n            0\n        }\n        \"note\" => {\n            let text = argv[1..].iter().filter(|a| !a.starts_with(\"--\")).cloned().collect::<Vec<_>>().join(\" \");\n            let phase = state.get(\"phase\").and_then(Value::as_str).unwrap_or(\"\").to_string();\n            if let Some(notes) = state.pointer_mut(&format!(\"/phases/{phase}/notes\")).and_then(|v| v.as_array_mut()) {","sourceCodeStart":1858,"sourceCodeEnd":1894,"githubUrl":"https://github.com/pbakaus/impeccable/blob/2bc2879276c1f321a53c4ca99d3371e411329b52/crates/comp-verbs/src/build_phase.rs#L1858-L1894","documentation":"The `build-phase scaffold` subcommand reads a comp spec file (SPEC_PATH) produced by comp-spec.mjs. If load_spec() cannot load/parse the spec, it prints 'build-phase: no spec at {SPEC_PATH}; run comp-spec.mjs first' and exits 1.","triggerScenarios":"Running `impeccable build-phase scaffold` before the comp-spec step was run, or when the spec file at SPEC_PATH is missing or not valid loadable spec JSON.","commonSituations":"Skipping the comp-spec step of the workflow; running scaffold in a directory where comp-spec output was never generated; a corrupted or hand-edited spec file that fails to load.","solutions":["Run the comp-spec step (comp-spec.mjs) first to generate the spec at SPEC_PATH","Verify the spec file exists at the path named in the message and is valid JSON","Re-generate the spec if it was hand-edited or corrupted"],"exampleFix":"// before\n$ impeccable build-phase scaffold\n// after\n$ npx comp-spec.mjs   # generate the spec first\n$ impeccable build-phase scaffold","handlingStrategy":"validation","validationCode":"[ -f \"$SPEC_PATH\" ] || { echo 'run comp-spec.mjs first'; exit 1; }\nimpeccable build-phase scaffold","typeGuard":null,"tryCatchPattern":"impeccable build-phase scaffold || { echo 'missing spec; generating...'; npx comp-spec.mjs && impeccable build-phase scaffold; }","preventionTips":["Follow the workflow order: comp-spec -> build-phase start -> scaffold","Never hand-edit the generated spec file","Keep comp-spec outputs in the same working directory as build-phase state"],"tags":["cli","spec","missing-file","workflow-order"],"backgroundTag":"config-file-not-found","analyzedSha":"2bc2879276c1f321a53c4ca99d3371e411329b52","analyzedAt":"2026-09-08T04:51:14.109Z","contentChangedAt":"2026-09-08T04:51:14.109Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}