Files
wangcanranandCursor e2d5fa61f9 feat: implement ExperienceStore for shop experience accumulation
Core Features
- New ExperienceStore module (ecommerce_agent/memory/experience_store.py)
  - Structured storage: title/narrative + search_keys + evidence
  - Search keys derived from system-collectable fields only (season/category/price_tier/channel/return_signal/inventory_signal/conversion_signal/tags/trend_keywords)
  - Key-overlap scoring for retrieval, no embedding dependency
  - State machine: draft -> active -> archived

- Auto-draft generator (ecommerce_agent/memory/experience_draft_generator.py)
  - High-return SKUs -> draft
  - Slow-moving/overstocked SKUs -> draft
  - New product planning approve_new -> draft
  - Large pricing deviations -> draft
  - System captures numeric facts, narrative left for human refinement

- Orchestrator integration (orchestrator.py)
  - Retrieve relevant experiences at run() start, inject into memory_snapshot
  - Auto-generate drafts at run() end, persist to store
  - Support experience_store_path via env var or parameter

- REST API (api/main.py)
  - GET /api/experiences - list experiences (filter by status)
  - POST /api/experiences/search - search by system fields
  - POST /api/experiences - manual entry (active directly)
  - POST /api/experiences/{id}/approve - promote draft to active
  - POST /api/experiences/{id}/archive - archive experience
  - GET /api/experiences/{id} - get single experience

Design Principles
- Experience = reference, not hard constraint; default advisory
- Search only uses system-collectable fields; narrative excluded from hard filtering
- Auto-drafts require human or rule promotion before becoming active
- Coexists with existing FeedbackMemoryStore

Next Steps
- Add embedding semantic layer for rerank (currently pure key-overlap)
- Bidirectional sync with LightRAG (ingest high-confidence experiences into graph)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 18:07:31 +08:00
..
2026-05-18 11:17:18 +08:00
2026-05-18 11:17:18 +08:00
2026-05-18 11:17:18 +08:00
2026-05-18 11:17:18 +08:00