distill
Synthesizes related learnings into reusable knowledge base patterns.
- License 许可
- MIT
- 所属仓库
- goffity/dev-km
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- distill
- description
- Synthesizes related learnings into reusable knowledge base patterns.
- argument-hint
- [topic-name]
- user-invocable
- true
03 SKILL.md 正文
Distill - Extract Patterns & Lessons
สังเคราะห์ความรู้จาก /mem learnings เป็น patterns (Layer 2)
Usage
/distill [topic-name]
Input: kb/05-ai-reviewed/learnings/ (vault via symlink)
Output: kb/02-patterns/<domain>/<Name>.md
Note:
kb/is a symlink to the Obsidian second-brain vault. Legacy pathdocs/learnings/+docs/knowledge-base/is deprecated — scankb/only.
Instructions
Language Setting
Check
LANGUAGEindocs/current.md. Ifth, translate output perreferences/language-guide.md. Seereferences/bash-helpers.mdfor detection snippet.
- Scan learnings for related content (3+ files on same topic)
find $PROJECT_ROOT/kb/05-ai-reviewed/learnings -name "*.md" -type f - Analyze for patterns, anti-patterns, insights
- Pick domain folder under
kb/02-patterns/(grpc, observability, database, k8s, websocket, workflow, auth, architecture, testing). Create new domain folder if needed. - Create knowledge entry with template below — use Title Case filename (e.g.
Consumer Retry Pattern.md) - Add frontmatter per vault convention:
--- tags: [pattern, <domain>] type: pattern domain: <domain> services: [<services-using-this>] date: YYYY-MM-DD status: stable --- - Mark sources as "Distilled" (append
> **Distilled:** → [[<Pattern Name>]]) - Commit:
git commit -m "knowledge: [topic] - [summary]"
Template
# [Topic Name]
| Field | Value |
|-------|-------|
| **Created** | YYYY-MM-DD |
| **Sources** | learnings ที่ใช้ |
| **Tags** | `tag1` `tag2` |
---
## Key Insight
> One-sentence summary
---
## The Problem
| Attempt | Result |
|---------|--------|
| ทำแบบ X | เกิดปัญหา Y |
---
## The Solution
### Pattern: [Name]
```go
// Code example
Why this works:
- Reason 1
Anti-Patterns
| Don't Do This | Do This Instead |
|---|---|
| Bad | Good |
When to Apply
- ใช้เมื่อ...
- ไม่ใช้เมื่อ...
Decision Rationale (Optional)
ใช้เมื่อ knowledge นี้เกี่ยวข้องกับการตัดสินใจสำคัญ
Decision
[สรุปการตัดสินใจ]
Alternatives Considered
| Option | Pros | Cons |
|---|---|---|
| Option A | ... | ... |
| Chosen | ... | ... |
Why This Choice?
- เหตุผล 1
- เหตุผล 2
Trade-offs Accepted
- ยอมรับ X เพื่อได้ Y
Related
- Learnings: source files
- Code: relevant code paths
## After Distilling
Mark source learnings (use wiki-link for Obsidian graph):
```markdown
> **Distilled:** → [[<Pattern Name>]]
When to Distill
| Trigger | Action |
|---|---|
| 3+ learnings เรื่องเดียวกัน | รวมเป็น knowledge |
| พบ pattern ใช้ซ้ำได้ | สร้าง knowledge |
| Weekly review | Scan pending learnings |
04 同仓库更多 Skills
wait-what
Stop. That last message did not land: re-pitch it.
tdd
Test-driven development loop (red-green-refactor) with commit-based phase state and Jira traceability. Use when the user wants to build a feature or fix a bug test-first, mentions "tdd", "red-green-refactor", or "test-first". Replaces the tdg plugin — combines its commit/phase discipline with seam-based test quality rules from kb Testing Standards.
td
Creates post-task retrospectives with Before/After context and session documentation.
summary
Generates weekly or monthly session summaries from retrospectives and activity logs.
share
Shares knowledge across projects by copying to shared-knowledge directory with cross-project metadata.
session-analyzer
Analyzes git changes and creates retrospective drafts with Before/After context.