This commit is contained in:
greeneclipse committed 2026-10-14 19:23:16 +02:00
1 parent ff6c2df618
commit 43cfaa0411
18 files changed
+683 -299

No files matched your search

+40
View File
@@ -230,3 +230,43 @@ rewrites repeated benefit instructions in existing A1 Slovenija prompts
and structured descriptions without dropping sections. Optional standalone A1 command:
`npm run cleanup:a1:prompts -- -apply`. Future A1 seed/WordPress imports now
normalize duplicates on ingest. See `docs/category-prompt-translations.md`.
## SEO product formulas v4 (25 content languages)
All supported languages now use the same **semantic product-page HTML skeleton** with
localized instructions in `{...}`: one verified introductory `<p>`, an optional
feature `<h2>` and `<p>` when product facts justify them, then an optional technical
specification `<h2>` and `<ul><li>` list. Never generate an `<h1>` inside the
body, an empty list, fabricated product claims, or repeat a fixed number of
100-word sales sections. Product `name`, `meta_title`, and `meta_description` are
separate **plain-text JSON fields**, not HTML in the body. Keep structured data,
product-page H1, and the real page heading in the storefront template.
`apps/api/internal/aiprompts/defaults/prompt-rules-25.json` is the canonical
**offline** set of 25 language versions; the category editor examples carry the
same instructions. The API now parses the `<ul><li>` formula as one list section,
keeps optional sections optional during validation, and prefers the category
formula over generic short-copy system instructions. Translations do not require
an OpenAI key (product *generation* still uses the configured AI integration).
After deploying the API, worker, web frontend, and running migration scripts:
```bash
npm run migrate
npm run seed:category-prompts:i18n -- -dry-run
npm run seed:category-prompts:i18n
```
Only prompts identifiable as unchanged built-in defaults are upgraded; custom
company formulas are preserved. A1's recognizable historical repeated boilerplate
is repaired by the seed, and can also be repaired independently with:
```bash
npm run cleanup:a1:prompts -- -apply
```
**Existing processed products are not rewritten by a prompt seed**. Reprocess
those products to regenerate descriptions, where the company has AI processing
configured. A1 and the Platform Demo currently have a separate deliberate
backend rule that omits SEO meta from their processed product fields: updating
prompt instructions alone does not change that store-level policy.