SKILL.md 2.57 KB
name: product-rag-maintainer
description: Use when maintaining this 产品研发 RAG repository, updating Dify knowledge bases, adding new versions, ingesting high-priority reference docs, or handing off work to a future AI with minimal lost context.

Product RAG Maintainer

Use this skill when the task is to continue maintaining the repository at 产品RAG体系建设, refresh knowledge outputs, or update Dify after new materials arrive.

Workflow

  1. Read docs/产品研发RAG_总体方案与实施手册.md.
  2. Read docs/产品研发RAG_增量更新与Dify维护手册.md.
  3. If you need quick project state and Dify layout, read docs/产品研发RAG_接手说明.md.
  4. Decide whether the change is:
    • new version data
    • new high-priority reference
    • backend repo update
    • full rebuild
  5. Run the matching script:
    • version rebuild: bash scripts/rebuild_version_kb.sh <version> [backend_repo]
    • full rebuild: bash scripts/rebuild_all_kb.sh [backend_repo]
    • Dify import pack only: python3 scripts/build_dify_import_pack.py

File placement rules

  • Training PDFs: pdf/
  • Test case XML: testCase/
  • Figma links: inputs/figma/<app_version>/links.txt
  • High-priority special references: inputs/priority_refs/
  • Backend repo stays external and is passed via --repo

Dify layout

Keep three knowledge bases:

  1. Product main knowledge base
  2. Version and pre-review knowledge base
  3. Backend implementation supplement knowledge base

Read references/dify-layout.md before telling someone which files to upload.

High-priority references

When a manually curated special document arrives:

  1. Save the original into inputs/priority_refs/.
  2. Create a clean Markdown version in the same directory.
  3. Rebuild dist/dify_import/.
  4. Upload the new high-priority Markdown to the product main knowledge base.

Do not upload the raw PDF directly unless no better option exists.

Dify parameters

Use the validated settings from references/dify-settings.md.

Validation

After any update:

  1. Check dist/dify_import/, dist/backend_code/, dist/final_kb/.
  2. Check dist/quality/atom_quality_summary.md.
  3. Run Dify retrieval tests using the examples in references/validation-queries.md.

Notes

  • The underlying knowledge base is one asset system, but Dify should expose multiple retrieval views.
  • Training docs remain the primary product fact source.
  • Backend code supplements implementation only.
  • High-priority reference docs can outrank ordinary test supplements when they cover narrow, well-curated rules not clearly present in training docs.