{"record":{"id":"69b6e0eb19027aac","repo":"coleam00/Archon","slug":"workflow-slug-not-found","errorCode":null,"errorMessage":"Workflow '${slug}' not found","messagePattern":"Workflow '(.+?)' not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":5147,"sourceCode":"  }\n  if (!res.ok) {\n    throw new Error(`Source fetch failed: HTTP ${String(res.status)} from ${rawUrl}`);\n  }\n  return res.text();\n}\n\nexport async function workflowInstallCommand(\n  slug: string,\n  cwd: string,\n  force?: boolean\n): Promise<void> {\n  const entries = await fetchMarketplace();\n  const entry = entries.find(e => e.slug === slug);\n\n  if (!entry) {\n    console.error(`Error: Workflow '${slug}' not found in marketplace.`);\n    console.error(\"Run 'archon workflow search' to browse available workflows.\");\n    throw new Error(`Workflow '${slug}' not found`);\n  }\n\n  if (!entry.sourceUrl.startsWith('https://github.com/')) {\n    throw new Error(\n      `Untrusted source URL for '${slug}': ${entry.sourceUrl}\\nOnly github.com sources are permitted.`\n    );\n  }\n\n  if (!/^[a-z0-9-]+$/.test(slug)) {\n    throw new Error(`Invalid slug '${slug}': must be lowercase alphanumeric with hyphens only.`);\n  }\n\n  const { findRepoRoot } = await import('@archon/git');\n  const repoRoot = await findRepoRoot(cwd);\n  if (!repoRoot) {\n    throw new Error('Not in a git repository. Run archon workflow install from within a git repo.');\n  }\n","sourceCodeStart":5129,"sourceCodeEnd":5165,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L5129-L5165","documentation":"Thrown by `workflowInstallCommand` when the requested slug does not match any entry in the fetched marketplace listing. A friendlier message is printed first suggesting `archon workflow search`. This is the user-facing 'typo or stale marketplace' failure of the install command.","triggerScenarios":"`archon workflow install <slug>` where `entries.find(e => e.slug === slug)` from `fetchMarketplace()` returns undefined: slug typo, the workflow was removed/renamed in the marketplace index, or the marketplace index failed to load partially.","commonSituations":"Typos in the slug (`code-review` vs `code_review`); the workflow was unpublished upstream; cached/older CLI seeing a newer marketplace; misreading a workflow display name as its slug.","solutions":["Run `archon workflow search` and copy the exact slug from the listing","Check for character differences (hyphens vs underscores, casing)","Update the CLI / refresh the marketplace index if it is stale","If the workflow was removed upstream, pick an alternative workflow"],"exampleFix":"// before\narchon workflow install CodReview\n// after\narchon workflow install code-review","handlingStrategy":"validation","validationCode":"const known = await fetchMarketplace();\nif (!known.some(e => e.slug === slug)) {\n  console.error(`Unknown slug '${slug}'. Available: ${known.slice(0, 10).map(e => e.slug).join(', ')}...`);\n  process.exit(2);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await workflowInstallCommand(slug);\n} catch (e) {\n  if (e instanceof Error && e.message.endsWith(\"not found\")) {\n    // suggest: archon workflow search, or handle slug rename/removal\n  } else throw e;\n}","preventionTips":["Copy slugs directly from `archon workflow search` output instead of typing them","Watch for marketplace index changes if workflows were recently renamed","Script installs against a validated slug list","Distinguish display names from slugs — only slugs work with install"],"tags":["cli","marketplace","slug-lookup","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}