Knowledge Base Authoring
Overview
Use this skill to create retrievable ecommerce knowledge cards for backend/knowledge/**/*.md. The output must be useful to customer-service replies and friendly to the OpenViking-lite retriever.
Workflow
- Identify the knowledge type: product, policy, promotion, after_sales, logistics, billing, account, compatibility, service, or order.
- Choose a stable file path under
backend/knowledge/<category>/.
- Write one focused card per topic. Do not combine unrelated policies or multiple products in one card unless the user explicitly asks for a comparison card.
- Add frontmatter with
title, category, keywords, updated_at, and when useful product_ids, tags, priority.
- Put the most answerable facts in the body: concrete parameters, applicability, exceptions, required user inputs, and escalation conditions.
- Keep operational claims conservative. For refunds, compensation, exceptions, and account security, say what can be checked or applied for, not guaranteed outcomes.
- After editing cards, run backend knowledge tests or at least probe
LocalKnowledgeSearch with likely user queries.
Card Shape
Read references/card-schema.md before creating new card families or when unsure about fields.
Minimum card:
---
title: Aurora Phone X1 参数
category: product
keywords:
- Aurora Phone X1
- 快充
- 参数
updated_at: 2026-06-03
product_ids:
- aurora phone x1
priority: 0.8
---
Aurora Phone X1 支持最高 80W 有线快充,并支持 30W 无线充电。
Writing Rules
- Put exact product names, aliases, model names, policy names, and common user wording in
keywords.
- Use
product_ids to connect parameter, price, compatibility, warranty, and promotion cards for the same product.
- Prefer concrete values: wattage, storage, price, warranty duration, price-protection window, delivery window, required proof.
- Include exceptions and limits in the body. This helps the agent avoid over-promising.
- Do not store personal user data, real credentials, private addresses, full phone numbers, or real order details in static knowledge cards.
- Do not write chatbot role prompts here. That belongs to
customer_service_core.
Validation
After adding cards, prefer:
cd backend
.venv\Scripts\python.exe -m pytest tests/test_knowledge_search.py
If a card should answer a known query, manually probe LocalKnowledgeSearch and confirm the expected card appears in the top results.
1---2name: knowledge-base-authoring3description: Generate, review, and maintain structured Markdown knowledge cards for the intelligent customer-service project. Use when Codex needs to add product parameters, pricing, warranty, price-protection, promotion, logistics, billing, after-sales, compatibility, or FAQ content under backend/knowledge so knowledge.search can retrieve it reliably.4---56# Knowledge Base Authoring78## Overview910Use this skill to create retrievable ecommerce knowledge cards for `backend/knowledge/**/*.md`. The output must be useful to customer-service replies and friendly to the OpenViking-lite retriever.1112## Workflow13141. Identify the knowledge type: product, policy, promotion, after_sales, logistics, billing, account, compatibility, service, or order.152. Choose a stable file path under `backend/knowledge/<category>/`.163. Write one focused card per topic. Do not combine unrelated policies or multiple products in one card unless the user explicitly asks for a comparison card.174. Add frontmatter with `title`, `category`, `keywords`, `updated_at`, and when useful `product_ids`, `tags`, `priority`.185. Put the most answerable facts in the body: concrete parameters, applicability, exceptions, required user inputs, and escalation conditions.196. Keep operational claims conservative. For refunds, compensation, exceptions, and account security, say what can be checked or applied for, not guaranteed outcomes.207. After editing cards, run backend knowledge tests or at least probe `LocalKnowledgeSearch` with likely user queries.2122## Card Shape2324Read `references/card-schema.md` before creating new card families or when unsure about fields.2526Minimum card:2728```markdown29---30title: Aurora Phone X1 参数31category: product32keywords:33 - Aurora Phone X134 - 快充35 - 参数36updated_at: 2026-06-0337product_ids:38 - aurora phone x139priority: 0.840---4142Aurora Phone X1 支持最高 80W 有线快充,并支持 30W 无线充电。43```4445## Writing Rules4647- Put exact product names, aliases, model names, policy names, and common user wording in `keywords`.48- Use `product_ids` to connect parameter, price, compatibility, warranty, and promotion cards for the same product.49- Prefer concrete values: wattage, storage, price, warranty duration, price-protection window, delivery window, required proof.50- Include exceptions and limits in the body. This helps the agent avoid over-promising.51- Do not store personal user data, real credentials, private addresses, full phone numbers, or real order details in static knowledge cards.52- Do not write chatbot role prompts here. That belongs to `customer_service_core`.5354## Validation5556After adding cards, prefer:5758```bash59cd backend60.venv\Scripts\python.exe -m pytest tests/test_knowledge_search.py61```6263If a card should answer a known query, manually probe `LocalKnowledgeSearch` and confirm the expected card appears in the top results.