Files
descrybe/docs/seo-prompts-v7.md
2026-10-14 20:28:38 +02:00

42 lines
2.7 KiB
Markdown

# SEO prompt defaults hotfix v7
## Deploy
Deploy this whole project together: **API, worker, and frontend**. From the project root:
```bash
npm run migrate
npm run seed:category-prompts:i18n -- -dry-run
npm run seed:category-prompts:i18n
```
The migration must run after deployment of the new source. The seed operates on all companies by default. It uses **only bundled translations** and requires `DATABASE_URL` but not `OPENAI_API_KEY`. It rewrites stale *system-owned* shared cached translations, even if a previous seed filled them, and upgrades proven old built-in values in company categories. It does not override custom company-written descriptions, titles, or meta rules.
For an explicit A1 cleanup (the main seed also performs it):
```bash
npm run cleanup:a1:prompts
npm run cleanup:a1:prompts -- -apply
```
A1's obsolete boilerplate descriptions and 140-character placeholder meta instructions are replaced with current Slovenian SEO rules; custom content remains intact. The bundled A1 category seed and WordPress SQL import path use the same cleanup, so a later import will not restore them. A1 meta output is now enabled in API/worker and catalog/V1 endpoints; Platform Demo remains excluded.
### Language consistency
All **25 languages**, including English, Croatian, and Slovenian, use exactly:
- Title: `{...}` (verified brand, type, model, optional color; no invented attributes)
- HTML description: `<p>{...}</p><h2>{...}</h2><p>{...}</p><h2>{...}</h2><ul><li>{...}</li></ul>` (with line breaks for readability); feature and specification sections are omitted when unsupported
- Meta prompt: `{meta_title: ...}` then `{meta_description: ...}` (plain output fields, no HTML)
The product page renders the H1 from the product title. The generated description must **not** add another H1. The meta title and meta description are separate plain-text outputs. Empty/unsupported claims and invented specifications are forbidden; fixed 100-word paragraphs and repetitive five-benefit boilerplate were removed.
Changing prompts only affects **new processing**. Reprocess previously generated products to update existing descriptions and metadata.
### Validation / known constraints
- Local isolated Go tests of bundled language defaults, HTML parsing, A1 cleanup, and meta wrapper formats passed.
- Frontend localized-example and language-variant tests passed.
- All Go source parses syntactically, and the reported `undefined: language` reference is fixed.
- Full Go 1.25 API/worker compilation and PostgreSQL migration integration could not be executed in this environment because Go 1.25 and a live test database aren't available. **Run your normal deploy build and dry run before applying the seed to production.**