distill-session-knowledge
Offline-mine this project's pi session JSONL logs into reusable, verified knowledge: extracts faults, decisions, corrections, procedures and docs, promotes only recurring patterns, and routes artifacts into skill_manage, memory and docs. Use on "mine my sessions", "distill session knowledge", "extract lessons from logs", "turn my pi history into skills/memory".
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 348
- Forks
- 56
01 前言 Front Matter
- name
- distill-session-knowledge
- description
- Offline-mine this project's pi session JSONL logs into reusable, verified knowledge: extracts faults, decisions, corrections, procedures and docs, promotes only recurring patterns, and routes artifacts into skill_manage, memory and docs. Use on "mine my sessions", "distill session knowledge", "extract lessons from logs", "turn my pi history into skills/memory".
03 SKILL.md 正文
distill-session-knowledge
Offline miner. Turns past pi session traces into durable artifacts. No new
infrastructure — routes into skill_manage, the memory tool, and docs/
(indexed by context-mode FTS5). Dry-run by default; nothing is written until you
review the plan and explicitly apply.
Engine: the published @blackbelt-technology/pi-dashboard-session-distiller
package, invoked through its distill-session-knowledge bin (this skill package
declares it as a runtime dependency).
When to use
- "Mine / distill my pi sessions", "what recurring mistakes do I keep making", "extract reusable procedures from my history", "turn session logs into skills".
- After a stretch of work, to harvest verified lessons before they decay.
Procedure
-
Dry-run the miner (no writes) for this project:
npx --no distill-session-knowledge --cwd "$(git rev-parse --show-toplevel)"Add
--n <k>to change the recurrence threshold (default 3). Add--jsonto emit the full routing plan as JSON for programmatic review. -
Review the routing plan. Each entry shows
signal -> sink [action] conf=…:procedure -> skill_manage— candidate reusable SKILL.md.fault -> memory(failure/tool-quirk)— a wrong-way→right-way tool fix.user_correction -> memory(failure/correction)—+AGENTS.mdflag means it establishes a rule and should also patch the relevant AGENTS.md row.ask_user_decision -> memory(project/convention)— a recorded human decision.documentation -> docs— a recurring how-to summary.STALEflag = confidence below floor; skip or prune, do not write.
-
Apply once the plan looks right — persists the watermark + below-threshold candidates store and prints the final plan:
npx --no distill-session-knowledge --cwd "$(git rev-parse --show-toplevel)" --apply --json -
Execute the routed writes from the plan, using your tools (this is the haiku-class subagent distillation step). For each non-stale entry:
skill_manage→mcp__pi__skill_managecreate/patch (query existing first).memory→mcp__pi__memoryadd with the entry's target + category (memory_searchfirst to dedup; merge into a match instead of duplicating).docs→ delegate the write to a docs subagent in caveman style per the Documentation Update Protocol, thenctx_indexthe new doc so it is FTS5-searchable (task 5.2).+AGENTS.mdentries → patch the relevant AGENTS.md rule via the docs subagent (≤200 chars/row, caveman style) in addition to the memory write.
Guardrails
- Dedup before every write — re-running over the same corpus must create zero
duplicates (the planner marks
mergewhen a sink already holds the artifact; still query the live sink, the planner'sexistsis conservative). - Never write a
STALEartifact. - Stay within this project's sessions (the miner already scopes to the cwd dir).
- Respect the doc protocol: main agent orchestrates, a subagent writes under
docs/.
Verification
npx --no distill-session-knowledge --cwd "$(pwd)"prints a routing plan and mutates nothing (dry-run default; no watermark advance).- Re-running the dry-run over the same corpus yields the same plan (idempotent).
- After apply + routed writes,
ctx_searchreturns a freshly distilled doc.
04 同仓库更多 Skills
youtube-srt
Download YouTube subtitles (SRT + timestamped TXT) for a channel, playlist or video via yt-dlp, no media download; optionally mine them into a categorized catalog (e.g. AI models by function, open weights, local runnability, hardware tier). Use on "download the srt of this video", "transcripts of channel X for the last N months", "catalog the models AI Search talked about", "update docs/models".
video-transcription
Transcribe video and audio files to SRT subtitles with speaker diarization using the Soniox (default) or AssemblyAI API. Use when the user wants to transcribe meetings, videos, or audio files. Supports MKV, MP4, MOV, M4A, MP3. Triggers on "/transcribe", "transcribe my meetings", "transcribe videos in ~/Movies", or any request to convert audio/video to text.
speaker-id
Name anonymous diarized SRT speakers from a persistent local voiceprint library and repair speaker drift; local, CPU-only, no API key. Triggers "who is speaker 2", "put names on the transcript", "label the meeting SRT", "the diarization split one person into three", "enroll my voice". Backed by the pi-voiceid CLI.
veo-showreel-production-kit
Turn a video timeline + voiceover into a reproducible, sliceable Veo 3.1 prompt package with a consistency anchor and AI storyboard sketches.
veo-generator
Render a scripted video project into mp4 clips with the Google Veo 3.1 API. Reads a project's shot package (shots/*.md), one clip per camera cut, reusing each shot's prompt and sketch — world anchor only with `--with-reference`, seed unless `--no-seed`. Use on "render the Veo video for <project>", "generate the videos from the shot scripts", "make the clips with Veo".
hyperframes-showreel
Turn real screen and site footage into a rhythmic showreel rendered with HyperFrames: sampling, edit script, redacted clips, a generated composition, Veo only as additive FX, music edit + camera punches, delivery render and export QA. Use on "make a showreel from these recordings", "build the HyperFrames video", "assemble the footage edit", "render and QA the showreel".