Skip to content

v0.2.0

@nshkrdotcom nshkrdotcom tagged this 26 Nov 20:28
This release introduces two major capabilities to the library: the ability to compare different reasoning chains (diffing) and the ability to export chains as Mermaid diagrams for documentation.

Chain Comparison features:
- Implemented CrucibleTrace.Diff module to compare two chains
- Added diff_chains/3 to detect added, removed, and modified events
- Added similarity scoring (0.0-1.0) and confidence delta tracking
- Added diff_to_text/1 for console output and logging
- Added diff_to_html/3 for visual side-by-side comparison
- Useful for A/B testing prompts and regression detection

Mermaid Export features:
- Implemented CrucibleTrace.Mermaid module
- Added export_mermaid/3 supporting flowchart, sequence, timeline, and graph formats
- Integrated into Storage.export/3 API
- Includes options for color-coding, confidence display, and label truncation
- Generated diagrams are compatible with GitHub, GitLab, and Obsidian

Documentation and Examples:
- Added comprehensive design and implementation docs in docs/20251125/
- Added examples/chain_comparison.exs demonstrating diff capabilities
- Added examples/mermaid_export.exs demonstrating diagram generation
- Added examples/run_examples.sh for batch execution
- Updated README.md and CHANGELOG.md

Technical:
- Bumped version to 0.2.0
- Added dialyxir for static analysis
- Added comprehensive tests for new modules
Assets 2
Loading