{"record":{"id":"246bfe79a9f591e9","repo":"garrytan/gstack","slug":"codex-description-for-name-is-description-l","errorCode":null,"errorMessage":"Codex description for \"${name}\" is ${description.length} chars (max ${MAX_DESC}). Compress the description in the .tmpl file.","messagePattern":"Codex description for \"(.+?)\" is (.+?) chars \\(max (.+?)\\)\\. Compress the description in the \\.tmpl file\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/resolvers/codex-helpers.ts","lineNumber":92,"sourceCode":" * Strips allowed-tools, hooks, version, and all other fields.\n * Handles multiline block scalar descriptions (YAML | syntax).\n */\nexport function transformFrontmatter(content: string, host: Host): string {\n  if (host === 'claude') return content;\n\n  // Find frontmatter boundaries\n  const fmStart = content.indexOf('---\\n');\n  if (fmStart !== 0) return content; // frontmatter must be at the start\n  const fmEnd = content.indexOf('\\n---', fmStart + 4);\n  if (fmEnd === -1) return content;\n\n  const body = content.slice(fmEnd + 4); // includes the leading \\n after ---\n  const { name, description } = extractNameAndDescription(content);\n\n  // Codex 1024-char description limit — fail build, don't ship broken skills\n  const MAX_DESC = 1024;\n  if (description.length > MAX_DESC) {\n    throw new Error(\n      `Codex description for \"${name}\" is ${description.length} chars (max ${MAX_DESC}). ` +\n      `Compress the description in the .tmpl file.`\n    );\n  }\n\n  // Re-emit Codex frontmatter (name + description only)\n  const indentedDesc = description.split('\\n').map(l => `  ${l}`).join('\\n');\n  const codexFm = `---\\nname: ${name}\\ndescription: |\\n${indentedDesc}\\n---`;\n  return codexFm + body;\n}\n\n/**\n * Extract hook descriptions from frontmatter for inline safety prose.\n * Returns a description of what the hooks do, or null if no hooks.\n */\nexport function extractHookSafetyProse(tmplContent: string): string | null {\n  if (!tmplContent.match(/^hooks:/m)) return null;\n","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/garrytan/gstack/blob/94993f74012782fd94416dd44b8314f6363a13a4/scripts/resolvers/codex-helpers.ts#L74-L110","documentation":"The Codex-specific frontmatter emitter in scripts/resolvers/codex-helpers.ts:92 enforces a 1024-char description limit (Codex's hard cap). When a .tmpl description exceeds MAX_DESC the build throws rather than shipping a broken skill.","triggerScenarios":"Building for the Codex host with a verbose .tmpl description. Adding examples or routing detail into the description field.","commonSituations":"Multi-host build where Claude tolerates the length but Codex rejects it. Description bloat accumulating across versions. Single-host skill later promoted to multi-host.","solutions":["Compress the description in the .tmpl to a single lead sentence","Move detail into body sections (use catalog-mode=trim to auto-shorten)","Run a Codex build locally before committing description changes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const MAX_DESC = 1024;\nconst desc = extractNameAndDescription(content).description;\nif (desc.length > MAX_DESC) {\n  console.error(`Codex description is ${desc.length} chars (max ${MAX_DESC}); trim the .tmpl`);\n  process.exit(2);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep descriptions under 1024 chars even for Claude-only skills (future-proof for multi-host)","Run a Codex build in CI to catch overlength descriptions","Move detail into body sections, not the description field"],"tags":["build","codex","frontmatter","template"],"backgroundTag":null,"analyzedSha":"94993f74012782fd94416dd44b8314f6363a13a4","analyzedAt":"2026-08-12T04:06:23.140Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}