x
This commit is contained in:
1 parent
ae3799d8ce
commit
0341b30b6d
9 files changed
+947
-51
No files matched your search
@@ -34,6 +34,86 @@ bun run dev
|
||||
- `update_store_settings_translation` อัปเดตข้อความแปลของ store settings
|
||||
- `update_footer_content` อัปเดตเนื้อหา footer และลิงก์ที่เกี่ยวข้อง
|
||||
|
||||
## Mega Menu LLM Workflow
|
||||
|
||||
Header Mega Menu uses the `main` menu payload tree. The website renders this structure:
|
||||
|
||||
```text
|
||||
Root -> Column -> Link -> Child Link
|
||||
```
|
||||
|
||||
Supported localized text keys are:
|
||||
|
||||
```text
|
||||
th, en, ja, zh, vi, ko, lo, it
|
||||
```
|
||||
|
||||
LLM agents should use this workflow for every menu edit:
|
||||
|
||||
1. `capture_menu_snapshot` for `main`
|
||||
2. `get_mega_menu_tree`
|
||||
3. `validate_mega_menu_tree`
|
||||
4. Plan operations from diagnostics and current `nodeId` values
|
||||
5. `bulk_menu_operations` with `dryRun: true`
|
||||
6. Review `preview.diff`, `preview.before`, `preview.after`, `issues`, and `warnings`
|
||||
7. Apply only after approval
|
||||
8. Run `validate_mega_menu_tree` again
|
||||
9. Use `restore_menu_snapshot` if the applied result is wrong
|
||||
|
||||
Do not add a Link directly under root. Add a Column under Root first, then add Links under that Column.
|
||||
|
||||
Dry-run responses are expected to include path-based diffs such as:
|
||||
|
||||
```json
|
||||
{
|
||||
"path": "payload[0].columns[0].links[0].label.it",
|
||||
"before": null,
|
||||
"after": "Candele"
|
||||
}
|
||||
```
|
||||
|
||||
`validate_mega_menu_tree` reports:
|
||||
|
||||
- missing locale keys, especially `lo` and `it`
|
||||
- unsupported translation keys
|
||||
- duplicate or missing `nodeId`
|
||||
- invalid URL shape
|
||||
- placeholder text
|
||||
- empty columns
|
||||
- featured card issues
|
||||
- desktop render limits such as hidden columns or links
|
||||
|
||||
## Category Management LLM Workflow
|
||||
|
||||
Product categories are managed by backend `/categories` APIs through MCP. Supported localized text keys are:
|
||||
|
||||
```text
|
||||
th, en, ja, zh, vi, ko, lo, it
|
||||
```
|
||||
|
||||
LLM agents should use this workflow for category edits:
|
||||
|
||||
1. `list_categories` with `lang: "all"` to discover category IDs and current translations
|
||||
2. `create_category`, `update_category`, `update_category_translations`, or `delete_category` with `dryRun: true`
|
||||
3. Review the preview and product counts
|
||||
4. Apply only after the intended change is clear
|
||||
5. Run `list_categories` again to verify
|
||||
|
||||
Backend category support currently covers:
|
||||
|
||||
- base `name`
|
||||
- `imageUrl`
|
||||
- localized names
|
||||
- product-count guarded soft delete (`deletedAt`)
|
||||
|
||||
Backend category support does not currently cover:
|
||||
|
||||
- slug
|
||||
- nested parent/child hierarchy
|
||||
- sort order
|
||||
- active/inactive state
|
||||
- restore/undelete workflow
|
||||
|
||||
## Scripts
|
||||
|
||||
- `bun run dev`
|
||||
|
||||
Reference in new issue
Block a user