{"record":{"id":"f3f1cd5560ddd240","repo":"nexu-io/open-design","slug":"automation-template-delete-proposals-are-not-suppo","errorCode":null,"errorMessage":"automation-template delete proposals are not supported yet","messagePattern":"automation-template delete proposals are not supported yet","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/daemon/src/automation-proposals.ts","lineNumber":267,"sourceCode":"async function applySkillProposal(dataDir: string, proposal: AutomationEvolutionProposal) {\n  const slug = targetSlugFor(proposal, 'skill');\n  const dir = path.join(dataDir, 'skills', slug);\n  const file = path.join(dir, 'SKILL.md');\n  if (proposal.action === 'delete') {\n    await fsp.rm(dir, { recursive: true, force: true });\n    return { skillSlug: slug, action: 'delete', path: `skills/${slug}/SKILL.md` };\n  }\n  await fsp.mkdir(dir, { recursive: true });\n  await fsp.writeFile(file, proposalAfterMarkdown(proposal), 'utf8');\n  return { skillSlug: slug, action: proposal.action, path: `skills/${slug}/SKILL.md` };\n}\n\nasync function applyAutomationTemplateProposal(\n  dataDir: string,\n  proposal: AutomationEvolutionProposal,\n) {\n  if (proposal.action === 'delete') {\n    throw new Error('automation-template delete proposals are not supported yet');\n  }\n  const patch = parseJsonPatchAfter(proposal);\n  const template = await upsertUserAutomationTemplate(dataDir, patch);\n  return {\n    automationTemplateId: template.id,\n    action: proposal.action,\n    path: `automation-templates/${template.id}.json`,\n  };\n}\n\nasync function updateProposalStatus(\n  dataDir: string,\n  id: string,\n  status: AutomationProposalStatus,\n  metadataPatch: Record<string, unknown> = {},\n): Promise<AutomationEvolutionProposal> {\n  const proposals = await listAutomationProposals(dataDir, { status: 'all' });\n  const index = proposals.findIndex((proposal) => proposal.id === id);","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/automation-proposals.ts#L249-L285","documentation":"Thrown by applyAutomationTemplateProposal() when proposal.action === 'delete'. Automation-template delete support is intentionally unimplemented — the applier can upsert templates but cannot remove them. This is a deliberate capability gap, not a bug.","triggerScenarios":"Applying an automation-template proposal with action 'delete'. The other actions (create/update via upsertUserAutomationTemplate) are supported and call parseJsonPatchAfter to build the template payload.","commonSituations":"Agent proposed removing an obsolete template; UI offered a delete action for templates before the backend supported it; migration script tried to clean up templates via the proposal flow.","solutions":["Do not route automation-template removals through the proposal applier — delete the template file directly under the daemon data root if you have a legitimate removal need.","Reject the proposal with a note that template deletion is not yet supported.","Track the request as a feature gap until delete is implemented in applyAutomationTemplateProposal."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (proposal.targetKind === 'automation-template' && proposal.action === 'delete') {\n  throw new Error('automation-template delete proposals are not supported yet');\n}","typeGuard":"function isSupportedTemplateAction(p: { targetKind: string; action: string }): boolean {\n  return !(p.targetKind === 'automation-template' && p.action === 'delete');\n}","tryCatchPattern":null,"preventionTips":["Do not offer a delete action for automation-template proposals in the UI.","Route template removal through direct file management, not the proposal applier.","Reject template-delete proposals with a clear note to the user."],"tags":["automation","proposals","automation-template","not-implemented","daemon"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}