{"record":{"id":"1e0278203139b05a","repo":"garrytan/gstack","slug":"hostconfig-displayname-description-for-name","errorCode":null,"errorMessage":"${hostConfig.displayName} description for \"${name}\" is ${description.length} chars (max ${fm.descriptionLimit}). Compress the description in the .tmpl file.","messagePattern":"(.+?) description for \"(.+?)\" is (.+?) chars \\(max (.+?)\\)\\. Compress the description in the \\.tmpl file\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/gen-skill-docs.ts","lineNumber":546,"sourceCode":"    }\n    return content;\n  }\n\n  // Allowlist mode: reconstruct frontmatter with only allowed fields\n  const fmStart = content.indexOf('---\\n');\n  if (fmStart !== 0) return content;\n  const fmEnd = content.indexOf('\\n---', fmStart + 4);\n  if (fmEnd === -1) return content;\n  const frontmatter = content.slice(fmStart + 4, fmEnd);\n  const body = content.slice(fmEnd + 4);\n  const { name, description } = extractNameAndDescription(content);\n\n  // Description limit enforcement\n  if (fm.descriptionLimit) {\n    const behavior = fm.descriptionLimitBehavior || 'error';\n    if (description.length > fm.descriptionLimit) {\n      if (behavior === 'error') {\n        throw new Error(\n          `${hostConfig.displayName} description for \"${name}\" is ${description.length} chars (max ${fm.descriptionLimit}). ` +\n          `Compress the description in the .tmpl file.`\n        );\n      } else if (behavior === 'warn') {\n        console.warn(`WARNING: ${hostConfig.displayName} description for \"${name}\" exceeds ${fm.descriptionLimit} chars`);\n      }\n      // 'truncate' — silently proceed\n    }\n  }\n\n  // Build frontmatter with allowed fields\n  const indentedDesc = description.split('\\n').map(l => `  ${l}`).join('\\n');\n  let newFm = `---\\nname: ${name}\\ndescription: |\\n${indentedDesc}\\n`;\n\n  // Add extra fields (host-wide)\n  if (fm.extraFields) {\n    for (const [key, value] of Object.entries(fm.extraFields)) {\n      if (key !== 'name' && key !== 'description') {","sourceCodeStart":528,"sourceCodeEnd":564,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/scripts/gen-skill-docs.ts#L528-L564","documentation":"Host-specific frontmatter description length limit exceeded. When frontmatter.descriptionLimit is set and descriptionLimitBehavior === 'error' (the default), the generator throws rather than producing oversized frontmatter. The limit comes from the host config (fm.descriptionLimit) and the offending skill name + lengths are included.","triggerScenarios":"Adding prose to a .tmpl description that pushes over the host's limit (e.g. Codex caps at 1024). Generating for a host with a tighter limit than tested locally. descriptionLimitBehavior set to 'error' on a verbose skill.","commonSituations":"Editing a .tmpl description to add a use case. Multi-host build where one host's limit is stricter. Accumulating description bloat across versions.","solutions":["Compress the description in the .tmpl file to one lead sentence","Move routing/voice detail into a body `## When to invoke` section (catalog-mode=trim does this automatically)","If the longer description is intentional and supported, set descriptionLimitBehavior: 'warn' for that host","Split the skill into smaller, focused skills"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { readFileSync } from 'fs';\nconst content = readFileSync(tmplPath, 'utf-8');\nconst desc = extractNameAndDescription(content).description;\nif (fm.descriptionLimit && desc.length > fm.descriptionLimit && (fm.descriptionLimitBehavior || 'error') === 'error') {\n  console.error(`Description for ${tmplPath} is ${desc.length} chars (max ${fm.descriptionLimit}); trim before building`);\n  process.exit(2);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep .tmpl descriptions to a single lead sentence","Run `bun run gen:skill-docs` locally before committing description edits","Use catalog-mode=trim so routing detail moves to the body","Watch multi-host builds: the strictest host's limit wins"],"tags":["build","frontmatter","template","validation"],"backgroundTag":null,"analyzedSha":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}