{"record":{"id":"4ac662b26ffcfb87","repo":"pbakaus/impeccable","slug":"usage-build-phase-mjs-start-comp-png-break","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/comp-verbs/src/build_phase.rs","lineNumber":1811,"sourceCode":"        }\n        lines.push(line);\n    }\n    if let Some(finish) = state.get(\"finish\").filter(|v| !v.is_null()) {\n        let disp = finish.get(\"disposition\").and_then(Value::as_str).unwrap_or(\"\");\n        let at = finish.get(\"at\").and_then(Value::as_str).unwrap_or(\"\");\n        lines.push(format!(\"  finish      {disp} at {at}\"));\n    }\n    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\");","sourceCodeStart":1793,"sourceCodeEnd":1829,"githubUrl":"https://github.com/pbakaus/impeccable/blob/2bc2879276c1f321a53c4ca99d3371e411329b52/crates/comp-verbs/src/build_phase.rs#L1793-L1829","documentation":"build-phase's run() prints its full usage line to stderr and returns exit code 1 when invoked with no subcommand or with a --help flag. It is the command's built-in help/validation gate, not an unexpected failure.","triggerScenarios":"Running `impeccable build-phase` with no cmd (argv.first() is None), or with --help; any first token outside the known set (start/status/advance/record/scaffold/note/finish) would otherwise fall through differently, so bare/help invocations always land here.","commonSituations":"Exploring the command to see options; forgetting the subcommand entirely (e.g. `impeccable build-phase --comp hero.png`); intentionally requesting help.","solutions":["Include a subcommand: start, status, advance, record, scaffold, note, or finish","Pass --help deliberately if you want to see the usage text","Example: `impeccable build-phase start --comp design.png`"],"exampleFix":"// before\n$ impeccable build-phase --comp hero.png\n// after\n$ impeccable build-phase start --comp hero.png","handlingStrategy":"validation","validationCode":"[ -n \"$SUBCMD\" ] || { impeccable build-phase --help; exit 1; }","typeGuard":null,"tryCatchPattern":"impeccable build-phase \"$sub\" ... || impeccable build-phase --help","preventionTips":["Always include a subcommand; --comp/--direction belong to `start` only","Treat the usage line as documentation — it lists all valid subcommands","Alias `impeccable build-phase --help` for quick reference"],"tags":["cli","usage","help"],"backgroundTag":"missing-cli-argument","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"}