# A1 prompt cleanup repair ## Root causes - `NormalizeA1DescriptionTemplate` attempted to `json.Unmarshal("")` before verifying that the optional `description_template` existed. This produced `unexpected end of JSON input` for A1 categories with empty templates. - The previous A1-recognition threshold required at least four H2/paragraph pairs. The original A1 seed frequently had only one to three, and partially cleaned prompts mixed old instructions with a rewritten third benefit. - The original generic spec-list instruction sometimes used a Unicode en dash (`3–10`) and had line breaks, causing it to survive beside a new spec list. - One imported template generated an extra H1, although the product page already supplies its H1. ## Fix - Short-circuit null/empty JSON descriptions, including JSON objects without `sections`. - Recognize the known legacy Slovenian 100-word benefit boilerplate regardless of pair count, but don't rewrite unrelated custom descriptions. - Replace recognized obsolete description blocks with a semantically ordered `
`, optional `
` and optional `