Distill learnings from autopsy report into an improvement specification for the next cycle or production implementation. Extracts constraints, architecture decisions, interface contracts, and rejected options. Part of H-DGM cycle. Use after disposable-autopsy completes.
Install
npx skillscat add caphtech/claude-marketplace/disposable-distill Install via the SkillsCat registry.
Disposable Distill — Phase 3: Synthesize
Transform autopsy findings into a structured improvement specification that guides the next iteration or production implementation.
Prerequisites
- Completed autopsy:
.disposable/cycles/cycle_{N}/autopsy-report.jsonmust exist - Template: references/distill-template.md in disposable-cycle skill
Procedure
Step 1: Load Autopsy Context
- Determine cycle: use
$ARGUMENTSif provided, otherwise read latest from.disposable/history.json - Load autopsy report from
.disposable/cycles/cycle_{N}/autopsy-report.json - Load spike metrics from
.disposable/cycles/cycle_{N}/spike-complete.json - If
parentCycleIdexists in metrics, load previous cycle's distill spec for delta analysis
Step 2: Extract Constraints
From autopsy findings, extract discovered constraints:
- Hard constraints (priority: must): From
criticalandmajorfindings- Security violations → security constraints
- Correctness failures → behavioral constraints
- Architecture issues → structural constraints
- Soft constraints (priority: should/could): From
minorandinfofindings- Performance patterns → optimization targets
- Readability issues → style guidelines
- Documentation gaps → documentation requirements
Format each constraint with:
- ID:
C-{NNN} - Description
- Source: axis name and finding ID
- Severity: must / should / could
Step 3: Identify Architecture Decisions
From autopsy architecture, maintainability, and dependency-hygiene axes:
- Extract decisions that emerged naturally in the prototype
- For each decision:
- Context: Why this decision was forced or emerged
- Decision: What the prototype chose
- Rationale: Evidence from autopsy scores and findings
- Trade-offs: What was sacrificed
- Compare with previous cycle's decisions (if any) to detect:
- Confirmed decisions (same choice, improved score)
- Reversed decisions (different choice this cycle)
- New decisions (not present in previous cycle)
Step 4: Extract Interface Contracts
From the spike code and autopsy correctness / testability axes:
- Extract type signatures, API shapes, protocol definitions
- Mark contracts as:
- Validated: Tests exist and pass
- Assumed: No test coverage, derived from code
- Disputed: Test failures or autopsy findings suggest issues
Step 5: Document Rejected Options
From autopsy findings and prototype exploration:
- List approaches that were tried or considered but rejected
- For each:
- What the option was
- Why it was rejected (evidence from findings)
- Under what conditions it might be reconsidered
Step 6: Compile Implementation Notes
Insights that must carry forward:
- Non-obvious behaviors discovered during spike
- Gotchas and edge cases
- Environment-specific requirements
- Performance characteristics observed
Step 7: Identify Open Questions
Unresolved items that need investigation:
- Assumptions that need validation
- Trade-offs that need user input
- Dependencies on external factors
Step 8: Generate Distill Specification
Using references/distill-template.md, produce the specification:
- Fill all template sections
- Include cycle metadata (ID, timestamp, parent cycle)
- Cross-reference finding IDs from autopsy report
- Ensure every constraint has an evidence trail
Step 9: Save & Report
- Write specification to
.disposable/cycles/cycle_{N}/distill-spec.md - Mask sensitive data:
node {plugin_root}/scripts/dist/mask-sensitive.mjs \ .disposable/cycles/cycle_{N}/distill-spec.md --in-place - Present to user:
- Constraint count by severity
- Architecture decisions (new / confirmed / reversed)
- Interface contracts status
- Open questions requiring input
- Recommendation: iterate (another spike) or graduate (to production)
Output
.disposable/cycles/cycle_{N}/distill-spec.md— improvement specification- Ready for next
/disposable-spikecycle or production implementation
Graduation Criteria
Recommend graduating to production when:
- Previous autopsy verdict was PASS
- No
mustconstraints remain unaddressed from prior cycles - Architecture decisions are stable (no reversals in last 2 cycles)
- Interface contracts are all
validated - Open questions are resolved or deferred by user decision
Otherwise recommend iterating with another disposable spike.