{"record":{"id":"5e8800c1be9beb15","repo":"pbakaus/impeccable","slug":"build-phase-start-needs-comp-approved-comp-png","errorCode":null,"errorMessage":"build-phase: start needs --comp <approved comp png> (comp already approved) or --direction <seed key> (comp round still to run)\n","messagePattern":"build-phase: start needs --comp <approved comp png> \\(comp already approved\\) or --direction <seed key> \\(comp round still to run\\)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/comp-verbs/src/build_phase.rs","lineNumber":1819,"sourceCode":"    lines.push(format!(\"NEXT {}\", next_instruction(io, state)));\n    lines.join(\"\\n\")\n}\n\n// ---- CLI -------------------------------------------------------------------\n\n/// `impeccable build-phase <cmd> ...`\npub fn run(argv: &[String], io: &mut Io, organic_scan: OrganicScan) -> i32 {\n    let cmd = argv.first().map(String::as_str);\n    if cmd.is_none() || flag(argv, \"help\") {\n        io.err(\"usage: build-phase.mjs start --comp <png> [--breakpoint WxH] | status [--json] | advance [--force --reason \\\"...\\\"] | record hero --build <png> | scaffold | note \\\"<text>\\\" | finish --disposition <word>\\n\");\n        return 1;\n    }\n    let cmd = cmd.unwrap();\n    if cmd == \"start\" {\n        let comp = arg(argv, \"comp\");\n        let direction = arg(argv, \"direction\");\n        if comp.is_none() && direction.is_none() {\n            io.err(\"build-phase: start needs --comp <approved comp png> (comp already approved) or --direction <seed key> (comp round still to run)\\n\");\n            return 1;\n        }\n        if let Some(c) = comp {\n            if !abs(io, c).exists() {\n                io.err(&format!(\"build-phase: comp {c} does not exist\\n\"));\n                return 1;\n            }\n        }\n        if direction.is_some() && arg(argv, \"kind\").is_some() {\n            io.out(\"choice ping skipped\\n\");\n        }\n        let _ = std::fs::remove_file(abs(io, &format!(\"{BUILD_DIR}/pending.json\")));\n        let build_path = read_build_path(io);\n        if direction.is_some() && comp.is_none() && build_path.as_deref() == Some(\"code\") {\n            io.out(\"CODE-LED (from .impeccable config): no comp round and no phase gates. Write the direction contract (reference/new-work.md section 5), build, and finish per section 7. The chosen decision comp, if any, rides to the finish review as the critique reference.\\n\");\n            return 0;\n        }\n        let mut breakpoint = arg(argv, \"breakpoint\").map(String::from);","sourceCodeStart":1801,"sourceCodeEnd":1837,"githubUrl":"https://github.com/pbakaus/impeccable/blob/2bc2879276c1f321a53c4ca99d3371e411329b52/crates/comp-verbs/src/build_phase.rs#L1801-L1837","documentation":"The `build-phase start` subcommand requires exactly one of two inputs: an approved comp image (--comp <png>) when the comp is already approved, or a seed direction key (--direction <key>) when a comp round is still to run. Supplying neither prints this error and exits 1.","triggerScenarios":"`impeccable build-phase start` with neither --comp nor --direction flags; both arg() lookups return None and the guard fires.","commonSituations":"Omitting the flags because the usage string is long; passing the comp path positionally instead of via --comp; using a misspelled flag like --com or --seed.","solutions":["Add --comp <approved comp png> if the design comp is approved","Add --direction <seed key> if the comp round is still to run","Check flag spelling; paths must use --comp, not positional args"],"exampleFix":"// before\n$ impeccable build-phase start\n// after\n$ impeccable build-phase start --comp .impeccable/comps/hero-approved.png","handlingStrategy":"validation","validationCode":"[ -n \"$COMP\" ] || [ -n \"$DIRECTION\" ] || { echo 'need --comp <png> or --direction <key>'; exit 1; }","typeGuard":null,"tryCatchPattern":"impeccable build-phase start --comp \"$COMP\" || impeccable build-phase --help","preventionTips":["Decide up front whether the comp is approved (--comp) or a comp round is pending (--direction)","Pass the comp via --comp, never positionally","Double-check flag spellings against the usage line"],"tags":["cli","usage","missing-flag"],"backgroundTag":"missing-required-flag","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"}