{"record":{"id":"7fee92e4cbd3f2ad","repo":"zeroclaw-labs/zeroclaw","slug":"sop-not-found-n","errorCode":null,"errorMessage":"SOP not found: {n}","messagePattern":"SOP not found: (.+?)","errorType":"console","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/sop/mod.rs","lineNumber":63,"sourceCode":"                            .iter()\n                            .map(ToString::to_string)\n                            .collect::<Vec<_>>()\n                            .join(\", \"),\n                    );\n                }\n            }\n            println!();\n            Ok(())\n        }\n        crate::SopCommands::Validate { name } => {\n            let targets: Vec<_> = match &name {\n                Some(n) => sops.iter().filter(|s| s.name == *n).collect(),\n                None => sops.iter().collect(),\n            };\n\n            if targets.is_empty() {\n                if let Some(n) = &name {\n                    anyhow::bail!(\"SOP not found: {n}\");\n                }\n                println!(\"{}\", get_required_cli_string(\"cli-sop-none-to-validate\"));\n                return Ok(());\n            }\n\n            let mut any_warnings = false;\n            for sop in &targets {\n                let warnings = validate_sop(sop);\n                if warnings.is_empty() {\n                    println!(\n                        \"  {}\",\n                        get_required_cli_string_with_args(\"cli-sop-valid\", &[(\"name\", &sop.name)])\n                    );\n                } else {\n                    any_warnings = true;\n                    println!(\n                        \"  {}\",\n                        get_required_cli_string_with_args(","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/sop/mod.rs#L45-L81","documentation":"The sop validate command with --name filters loaded SOPs by exact, case-sensitive equality on s.name. If no loaded SOP matches the given name, targets is empty and validation aborts with this error. Without --name an empty set prints a friendly 'nothing to validate' message instead.","triggerScenarios":"Running sop validate --name X where X differs by typo, casing, or whitespace from the SOP's declared name field; the SOP file exists on disk but is not being loaded (wrong directory, disabled, parse skipped).","commonSituations":"Renaming an SOP file but not its name field; copy-pasting display names with different casing from docs; SOPs living outside the scanned SOP directory; trailing spaces in names.","solutions":["Run the sop list command and copy the exact name (bold white, first column) from its output","Correct typos, casing, and stray whitespace in the --name argument","Confirm the SOP file is in the location the CLI scans and loads successfully (check for load errors at startup)"],"exampleFix":"# before\nzeroclaw sop validate --name deploy-prod   # actual name is Deploy-Prod\n# after\nzeroclaw sop validate --name Deploy-Prod","handlingStrategy":"validation","validationCode":"# confirm the exact name exists before validating\nname=\"Deploy-Prod\"\nzeroclaw sop list | grep -Fqx \"  $name\" || { echo \"no SOP named '$name'\" >&2; exit 1; }\nzeroclaw sop validate --name \"$name\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy SOP names verbatim from sop list output rather than typing them","Keep SOP file names and their internal name field identical to avoid drift","Treat names as case-sensitive exact strings in scripts; quote them"],"tags":["cli","sop","not-found","exact-match","rust"],"backgroundTag":"resource-not-found","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}