Prisma

📚 Research Output Rules

Quy tắc phân loại, lưu trữ, và đăng ký output dạng markdown nghiên cứu.


Step 1: Route — Lưu vào knowledge/

Mọi research/brainstorm/analysis output → knowledge/{kebab-case-name}.md

text
knowledge/
├── README.md              ← Hub (auto-update by Step 2)
├── {topic}.md             ← Knowledge docs (flat, kebab-case)
├── *.json                 ← Index files (structured data)
└── _template.md           ← Template cho DS research

KHÔNG phải knowledge

Loại Lưu tại
Conversation summary / walkthrough Artifact directory
Scratch scripts, temp files /tmp/
Component mapping design-system/components md/ATOMIC-MAPPING.md
Component docs design-system/components md/

Step 2: Register — Thêm vào Hub (BẮT BUỘC)

Sau khi tạo/sửa file trong knowledge/, PHẢI cập nhật knowledge/README.md:

2a. Thêm entry vào bảng inventory

Thêm 1 row vào bảng "WHAT Exists":

markdown
| `{filename}.md` | {type: methodology/rules/analysis/plan/audit/reference/guide} | {1-line topic} | {enforceable rules nếu có} |

2b. Thêm trigger mapping (nếu applicable)

Nếu doc mới có enforceable rules hoặc agent cần đọc trước khi làm gì → thêm row vào bảng "WHEN to Read":

2c. Thêm cross-refs (nếu applicable)

Cross-ref 2 chiều:

  1. Doc mới: thêm > Cross-ref: knowledge/{related}.md
  2. Doc liên quan: thêm cross-ref ngược
  3. Hub README: cập nhật cột Cross-refs

Step 3: Validate

text
☐ File nằm trong knowledge/ (flat, kebab-case)
☐ Entry có trong knowledge/README.md inventory table
☐ Trigger map updated (nếu có enforceable rules)
☐ Cross-refs 2 chiều (nếu liên quan doc khác)
☐ Filename kebab-case: {topic-name}.md

🧠 Knowledge Index System

5 JSON index files sống tại knowledge/ root. Đây là structured data, không phải research docs — KHÔNG áp dụng routing rules ở trên.

File Layer Purpose Khi nào update
problem-taxonomy.json 1 Problem Router — classify questions Khi thêm problem type mới
decision-trees.json 2 Decision Engine — X vs Y Khi thêm component/pattern mới
page-patterns.json 3 Blueprint Registry — page recipes Khi thêm page pattern mới
token-recommender.json 4 Token Oracle — exact token lookup Khi tokens thay đổi
slot-manifest.json Slot contracts for all components Khi thêm/sửa component slots

Relationship Model

text
ux-research/ (SKILL.md + references/)     ← SOURCE OF TRUTH: 100+ rules
         ↓ reference by rule IDs
knowledge/*.json (5 index files)          ← FAST-PATH: routing + lookup
         ↓ indexed by
knowledge/README.md (hub)                 ← DISCOVERY: trigger map + inventory
         ↓ produced via
research.md (this workflow)               ← ROUTING + REGISTRATION

Convention

  • Location: knowledge/ (flat — no subdirectories for docs)
  • Filename: kebab-case — {topic-name}.md
  • Template: New DS research → use knowledge/_template.md
  • Status: Include PROPOSED / ✅ IMPLEMENTED in doc header
  • KHÔNG lưu vào artifact directory — trực tiếp vào knowledge/
  • LUÔN chạy Step 2 (Register) — hub phải reflect mọi file mới