From dev-workflow
Use before /write-plan or when the session has settled significant design decisions. Extracts the decision history from the current conversation into a persistent crystal file that /write-plan and plan-verifier consume.
npx claudepluginhub n0rvyn/indie-toolkit --plugin dev-workflowThis skill uses the workspace's default tool permissions.
Extracts settled decisions from the current conversation into a persistent file (`docs/11-crystals/`). This creates a structured, machine-readable record of what was decided and why, consumed by plan writing and verification steps.
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 and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Extracts settled decisions from the current conversation into a persistent file (docs/11-crystals/). This creates a structured, machine-readable record of what was decided and why, consumed by plan writing and verification steps.
brainstorm or design-decision session that involved trade-offs, rejected alternatives, or changed assumptions/write-plan when the conversation contains decisions that the plan must respect/handoff when decisions from this session need to survive into the next sessionScan the current conversation context for decision signals.
High-signal sources (must process if present):
brainstorm output — design document paths, UX Assertions, approach selectionsdesign-decision output — comparison tables with user's selectionMedium-signal sources (extract but mark as inferred):
Also search for source context to populate the ## Source Context section:
docs/06-plans/*-design.md for the most relevant filedocs/06-plans/*-design-analysis.md for the most relevant fileIf no decision signals are found in the conversation, inform the user:
No significant decisions detected in this session. Crystallization is not needed. If you believe decisions were made, describe them and I'll record them.
Exit without creating a file.
Extract from identified signals and assemble into the following structure:
---
type: crystal
status: active
tags: [{topic keywords from Discussion Points}]
refs: [{design doc path, design analysis path from Source Context}]
---
# Decision Crystal: {topic}
Date: YYYY-MM-DD
## Initial Idea
{User's original statement with noise removed — preserve the original content and wording.
Only clean up: filler words, repetitions, off-topic tangents, speech-recognition typos.
Do NOT rewrite, do NOT summarize. If the user spoke in Chinese, keep Chinese.}
## Discussion Points
1. **{Point A}**: Initial assumption was {X}, discovered {Y} (code evidence / user feedback), decided {Z}
2. **{Point B}**: {same structure}
## Rejected Alternatives
- **{Alternative name}**: Rejected because — {specific reason}. Rejection scope: {what exactly was rejected}; does NOT reject {what remains valid}.
- **{Alternative name}**: Rejected because — {specific reason}. Rejection scope: {scope}.
## Decisions (machine-readable)
- [D-001] {clear conclusion in imperative form, traceable to user's words}
- [D-002] {clear conclusion} (linked: D-003 — {relationship description})
- [D-003] {clear conclusion}
### AI-supplemented
- [D-S01] ⚠️ AI 补充 {AI-inferred decision} — Reasoning: {why AI thinks this is needed}
## Constraints
- {Constraints that emerged from the discussion}
## Scope Boundaries
- IN: {item from user's explicit request — quote or paraphrase user's words}
- IN: {item}
- OUT: {item user explicitly excluded, or category that was reverted}
- OUT: {item}
## Source Context
- Design doc: {path or "none"}
- Design analysis: {path or "none"}
- Key files discussed: {path list}
Extraction rules:
[D-xxx] must be decidable (a plan can be checked against it) AND traceable to a specific user statement. For each D-xxx, the AI must be able to point to the user's words that led to it. If the AI cannot quote or closely paraphrase the user, it is an AI inference, not a user decision. AI-inferred decisions must be listed in a separate ### AI-supplemented sub-section under Decisions, each prefixed with ⚠️ AI 补充 and the reasoning that led to the inference. The user confirms or rejects these separately.[D-002] ... (linked: D-006 — permissionMode strictness determines whether Bash control is needed). Do not split linked decisions into independent items without preserving the linkage.**{Alternative name}**: Rejected because — {reason}. Rejection scope: {what exactly was rejected}; does NOT reject {what remains valid or open}. Example: "Method C hybrid (Application Gate + Bash Policy): Rejected because — over-designed. Rejection scope: the entire Method C design including readablePaths whitelist and bashPolicy enum; does NOT reject (a) Bash fine-grained management as a direction, (b) sandbox participating in read restriction." Record the rejected item at the actual granularity the user rejected — if the user rejected a whole approach, do not split it into component rejections; if the user rejected only a specific design within an approach, do not inflate to rejecting the approach.type is always crystal. status is always active. tags — derive 2-4 keywords from the Discussion Points topics and Decisions content. refs — list the design doc and design analysis paths from Source Context (omit entries that are "none").## Scope Boundaries section entirely.Present the extracted crystal to the user in markdown format. Ask:
The user can edit, add, or remove items. Apply their changes before saving.
Write to docs/11-crystals/YYYY-MM-DD-{topic}-crystal.md.
If the docs/11-crystals/ directory does not exist, create it.
{topic} source:
feature-sync-design.md → feature-sync)If the target filename already exists, insert a sequence number before the -crystal suffix: YYYY-MM-DD-{topic}-2-crystal.md, -3-crystal.md, etc. This keeps the -crystal.md suffix intact for consumer glob patterns (*-crystal.md).
After saving, inform the user:
Crystal saved to docs/11-crystals/{filename}.
This crystal file will be automatically consumed by:
- /write-plan — plan-writer reads D-xxx decisions and scope boundaries to stay within authorized scope
- /verify-plan — plan-verifier checks plan tasks against each D-xxx decision AND scope boundaries (CF-3)
Optional: Run `/generate-bases-views --target crystals` to update the Obsidian Bases decision dashboard.
Proceed with /write-plan when ready.
docs/11-crystals/