{"record":{"id":"1649c811cd0d53a1","repo":"bmad-code-org/BMAD-METHOD","slug":"llms-txt-must-describe-build-as-canonical-for-both","errorCode":null,"errorMessage":"llms.txt must describe Build as canonical for both direct intent and fully planned work","messagePattern":"llms\\.txt must describe Build as canonical for both direct intent and fully planned work","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"tools/validate-published-implementation-model.mjs","lineNumber":32,"sourceCode":"  /\\b(?:createStory|devStory|create_story|dev_story)\\b/g,\n  /\\bquick[ -]?flow\\b/gi,\n  /flux rapide|parcours parallèle/gi,\n  /paralelní cesta/gi,\n  /luồng nhanh|nhánh nhanh/gi,\n  /快速流程|并行快线/g,\n];\n\nexport function validatePublishedImplementationModel(siteDir) {\n  const findings = findObsoleteImplementationTerms(siteDir);\n  if (findings.length > 0) {\n    const details = findings.map(({ file, line, match }) => `${file}:${line}: ${match}`).join('\\n  ');\n    throw new Error(`Obsolete implementation terminology found in deployable documentation:\\n  ${details}`);\n  }\n\n  const llmsPath = path.join(siteDir, 'llms.txt');\n  const llmsContent = fs.readFileSync(llmsPath, 'utf-8');\n  if (!llmsContent.includes(CANONICAL_LLMS_ENTRY) || !llmsContent.includes(CANONICAL_LLMS_DESCRIPTION)) {\n    throw new Error('llms.txt must describe Build as canonical for both direct intent and fully planned work');\n  }\n}\n\nexport function findObsoleteImplementationTerms(siteDir) {\n  const findings = [];\n\n  for (const filePath of getPublishedTextFiles(siteDir)) {\n    const content = fs.readFileSync(filePath, 'utf-8');\n    for (const pattern of FORBIDDEN_TERMS) {\n      for (const match of content.matchAll(pattern)) {\n        findings.push({\n          file: path.relative(siteDir, filePath),\n          line: content.slice(0, match.index).split('\\n').length,\n          match: match[0],\n        });\n      }\n    }\n  }","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/bmad-code-org/BMAD-METHOD/blob/b70486b9bdcb0a404d329e2a763b57964e7f1360/tools/validate-published-implementation-model.mjs#L14-L50","documentation":"Thrown by validatePublishedImplementationModel when <siteDir>/llms.txt exists but lacks either the canonical entry marker ('**[Build]') or the canonical description string. The validator enforces that the LLM-discovery file advertises Build as canonical for both direct intent and fully planned work, so LLM agents reading llms.txt pick the right workflow.","triggerScenarios":"Running validatePublishedImplementationModel after build; llms.txt was generated or hand-edited without both required canonical phrases.","commonSituations":"A llms.txt generator/template dropped the canonical markers; the workflow was renamed without updating the generator; partial build that wrote llms.txt from stale content.","solutions":["Ensure the llms.txt source/generator emits both '**[Build]' and the canonical description string verbatim.","Re-run the build step that produces llms.txt from its source.","If hand-editing, add the two required phrases exactly as defined by CANONICAL_LLMS_ENTRY and CANONICAL_LLMS_DESCRIPTION."],"exampleFix":"# before: _site/llms.txt\n#   ## Build\n#   Implementation workflow.\n#\n# after\n#   **[Build]: Canonical implementation workflow for direct intent and fully planned work**","handlingStrategy":"validation","validationCode":"const llms = fs.readFileSync(path.join(siteDir, 'llms.txt'), 'utf8');\nif (!llms.includes('**[Build]') || !llms.includes('Canonical implementation workflow for direct intent and fully planned work')) {\n  console.error('llms.txt missing canonical Build markers; regenerate before validating.');\n  process.exit(1);\n}\nvalidatePublishedImplementationModel(siteDir);","typeGuard":null,"tryCatchPattern":"try {\n  validatePublishedImplementationModel(siteDir);\n} catch (e) {\n  if (/llms.txt must describe Build as canonical/.test(e.message)) {\n    // regenerate llms.txt from the canonical template, then re-run\n  } else { throw e; }\n}","preventionTips":["Generate llms.txt from a single template that hard-codes both canonical phrases.","Rebuild llms.txt whenever the workflow vocabulary changes.","Test the generator output includes both markers in CI."],"tags":["website","llms-txt","validation","build","seo"],"backgroundTag":null,"analyzedSha":"b70486b9bdcb0a404d329e2a763b57964e7f1360","analyzedAt":"2026-08-13T01:21:12.247Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}