From dev-workflow
Use when you have raw discussion files (AI conversation exports, exploratory notes) and want to extract structured outputs. Routes each file to: crystal (decisions), lesson (failures/pitfalls), or skip (no conclusion).
npx claudepluginhub n0rvyn/indie-toolkit --plugin dev-workflowThis skill uses the workspace's default tool permissions.
Reads one or more discussion files and extracts structured knowledge from them. This is the file-based complement to `/crystallize` (which reads live conversation history). Use this skill after saving a conversation export to `docs/_discussions/`.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Designs, implements, and audits WCAG 2.2 AA accessible UIs for Web (ARIA/HTML5), iOS (SwiftUI traits), and Android (Compose semantics). Audits code for compliance gaps.
Reads one or more discussion files and extracts structured knowledge from them. This is the file-based complement to /crystallize (which reads live conversation history). Use this skill after saving a conversation export to docs/_discussions/.
Key differences from /crystallize:
{directory}/*.md and present the list:
Found {N} discussion files in {directory}:
1. {path} ({size estimate: small <100KB / large >100KB})
2. {path}
...
Process all, or specify which ones?
Wait for user response. If "all": process all files. If user specifies: process only those.For each input file:
Check file size with Bash(wc -c < {path}). Do NOT read the file to check size.
If output > 102400 (100KB): dispatch a dev-workflow:distill-discussion-reader agent (see Step 2a).
If output <= 102400: classify inline (see Step 2b).
Use the Task tool to dispatch the dev-workflow:distill-discussion-reader agent:
Read and classify this discussion file:
File: {path}
Project root: {project root}
Determine the conclusion type:
- crystal: the file contains clear decisions (approach chosen, alternatives rejected, constraints established)
- lesson: the file captures a failure, pitfall, or "don't do X" finding
- both: contains both decision records AND failure/pitfall records
- skip: discussion is exploratory, unresolved, or still pending
For "crystal" or "both": extract decisions in this format:
Initial Idea: {user's original question/goal, denoised}
Discussion Points: {key pivots, numbered}
Rejected Alternatives: {what was tried and rejected, with reasons}
Decisions: [D-001] {decision in imperative form}, [D-002] ...
Constraints: {constraints that emerged}
Scope Boundaries: IN: {item}, OUT: {item}
For "lesson" or "both": extract lesson entries in this format:
Symptom: {what went wrong}
Root Cause: {why}
Prevention: {rule or check}
Keywords: {3-6 keywords}
Category: {category slug}
Source Type: error | lesson
Return: classification, extracted content (in the formats above), and a 1-sentence summary.
Collect the agent's return value as classification_result for this file.
Read the file directly. Apply the same classification criteria:
Produce classification_result with the same fields as the agent output above.
For all processed files, present a summary table:
Discussion Distillation Summary:
| File | Classification | Key Output | Action |
|------|---------------|-----------|--------|
| {filename} | crystal | {1-sentence decision summary} | Write crystal |
| {filename} | lesson | {1-sentence lesson summary} | Write lesson |
| {filename} | both | {summary} | Write crystal + lesson |
| {filename} | skip | {reason: pending/unresolved} | Skip |
Proceed with the above, or adjust any classification?
Wait for user confirmation. Apply any reclassifications the user requests.
For each file classified as crystal or both:
docs/11-crystals/*-crystal.md, look for filename keywords matching the discussion topic[D-xxx] entries (continuing existing numbering), merge constraints and scope boundariesdocs/11-crystals/YYYY-MM-DD-{topic}-crystal.md using the crystal format:---
type: crystal
status: active
tags: [{topic keywords}]
refs: [{source discussion file path}]
---
# Decision Crystal: {topic}
Date: YYYY-MM-DD
## Initial Idea
{from classification_result.Initial Idea}
## Discussion Points
{from classification_result.Discussion Points}
## Rejected Alternatives
{from classification_result.Rejected Alternatives, or "None."}
## Decisions (machine-readable)
{from classification_result.Decisions}
## Constraints
{from classification_result.Constraints, or "None."}
## Scope Boundaries
{from classification_result.Scope Boundaries, or omit section if none}
## Source Context
- Discussion file: {source file path}
- Design doc: none
- Design analysis: none
Note: Crystal outputs from distill-discussion follow the same format as /crystallize output so they are consumed identically by plan-writer and plan-verifier.
For each file classified as lesson or both:
If the add_entry tool is available (provided by rag-server MCP; check tool availability before calling):
add_entry with the extracted lesson fields (title, category, scope: "project", content: the markdown body, keywords, source_type)Saved as {id} at {path}If add_entry is unavailable:
docs/09-lessons-learned/E*.md, count files, incrementdocs/09-lessons-learned/E{NNN}-{slug}.md with the lesson bodyFor each processed file (crystal, lesson, or both -- not skip):
---
distilled: true
distilled-to:
- {crystal file path, if produced}
- {lesson file path, if produced}
---
For skipped files: add frontmatter distilled: false with a skip-reason field:
---
distilled: false
skip-reason: "pending -- discussion unresolved as of YYYY-MM-DD"
---
Present a completion summary:
Distillation complete:
Crystals written: {N} file(s)
- {path}
Lessons saved: {N} entry/entries
- {path or id}
Skipped: {N} file(s) (reason: pending/unresolved)
Source files updated with distilled: true frontmatter.
crystal / both classificationslesson / both classificationsdistilled: frontmatter