v1.3.0
tokmd v1.3.0
Evidence-driven code review meets AI-native workflows. This release introduces the cockpit command for PR metrics, gate command for policy enforcement, and comprehensive documentation across all 17 crates.
Highlights
🎛️ Cockpit Command
Generate comprehensive PR metrics with evidence gates for code review:
tokmd cockpit --base main --format sections- Change surface: commits, files, insertions/deletions, churn velocity
- Composition breakdown: production vs test vs docs vs config
- Risk assessment: hotspots touched, bus factor warnings, coupling
- Evidence gates: mutation testing, contract verification, supply chain audit
- Review plan: prioritized file list for efficient review
🚦 Gate Command
Policy-based quality gates with JSON pointer rules:
tokmd gate receipt.json --fail-if '/derived/doc_density/total/ratio < 0.1'
tokmd gate receipt.json --warn-if '/derived/totals/code > 50000'🧙 Interactive Wizard
Guided project configuration with tokmd init --interactive:
- Language detection and framework suggestions
- Smart .tokeignore template generation
- Profile configuration
🤖 LLM Tool Definitions
Generate tool schemas for AI agents:
tokmd tools --format openai # OpenAI function calling
tokmd tools --format anthropic # Claude tool use
tokmd tools --format jsonschema📊 Git-Ranked Context
Prioritize files by git history when packing LLM context:
tokmd context --budget 128k --rank-by churn
tokmd context --budget 128k --rank-by hotspotNew Analysis Enrichers
- Archetype Detection: CLI, library, web app, monorepo classification
- Topic Clouds: TF-IDF semantic analysis of path segments
- Entropy Profiling: High-entropy file detection (potential secrets)
- Predictive Churn: Linear regression on commit history
- Corporate Fingerprint: Author domain statistics
- License Radar: SPDX detection from LICENSE files
Breaking Changes
| Change | Before | After | Migration |
|---|---|---|---|
| Analysis schema | schema_version: 1 |
schema_version: 2 |
Update JSON consumers |
| Cockpit schema | N/A | schema_version: 3 |
New command |
scan_workflow() |
scan_workflow(...) |
scan_workflow(..., redact) |
Add None parameter |
| Non-existent paths | Silent success | Error exit | Fix invalid paths |
Quality Gates
| Metric | Value |
|---|---|
| Mutants killed | 76 |
| Survivors | 0 |
| Kill rate | 100% |
| Property tests | 8 crates |
| Fuzz targets | 2 |
Installation
cargo install tokmdOr download binaries from the assets below.
Documentation
Full Changelog
Added
- Cockpit Command: PR metrics with evidence gates, change surface, composition, risk assessment
- Gate Command: Policy evaluation with
--fail-if,--warn-ifJSON pointer rules - Interactive Wizard:
tokmd init --interactivefor guided configuration - Git-Ranked Context:
--rank-by churn/hotspotin context command - Tools Schema: LLM tool definitions (OpenAI, Anthropic, JSON Schema)
- New Crate:
tokmd-gatefor policy evaluation - Analysis Enrichers: Archetype, topics, entropy, predictive churn, corporate fingerprint, license radar
- Context Output Options:
--out,--force,--bundle-dir,--logflags - Crate Documentation: README.md for all 17 crates
Changed
- Schema versions bumped (analysis: 2, cockpit: 3)
scan_workflow()API extended with redact parameter- Non-existent paths now error instead of silent success
- Feature flags exposed in CLI crate
Fixed
- Git init default branch → main
- Redaction test collection
- Scan test error handling
Performance
- Reduced allocations in export streaming with
Cowiterators
Internal
- Property-based tests for 8 crates
- Fuzz targets for redaction and JSON parsing
- Mutation testing CI gate (100% kill rate)
- Enhanced publish workflow with
--plan,--dry-run,--from
Full Changelog: v1.2.0...v1.3.0
What's Changed
- Refactor code structure for improved readability and maintainability by @EffortlessSteven in #1
- feat: v1.0.0 Release Candidate (Receipts, Export, Schema) by @EffortlessSteven in #2
- feat: Refactor into microcrates and harden tests by @EffortlessSteven in #3
- feat: v1.0.0 Polish (Run, Diff, Config Profiles & Release Hardening) by @EffortlessSteven in #4
- chore: configure ecosystem publishing (option A) by @EffortlessSteven in #5
- feat: add tokmd-core and architectural docs by @EffortlessSteven in #6
- docs: finalize positioning and descriptions for release by @EffortlessSteven in #7
- feat: Analysis framework, enrichers, and language bindings by @EffortlessSteven in #11
- feat: Analysis framework, enrichers, and comprehensive improvements by @EffortlessSteven in #20
- Add tests, schema validation, and workspace improvements by @EffortlessSteven in #21
- chore: improve test assertions and address clippy warnings by @EffortlessSteven in #23
- docs: clarify children CLI arg help text 🎨 Palette by @EffortlessSteven in #8
- perf: consolidated rendering and module key optimizations by @EffortlessSteven in #24
- fix: center text in SVG badges by @EffortlessSteven in #25
- feat: tests, schema validation, workspace improvements (capture current state) by @EffortlessSteven in #26
- feat: comprehensive improvements, tests, and documentation by @EffortlessSteven in #33
- chore(deps): bump actions/cache from 4 to 5 by @dependabot[bot] in #27
- chore(deps): bump softprops/action-gh-release from 1 to 2 by @dependabot[bot] in #28
- chore(deps): bump thollander/actions-comment-pull-request from 2 to 3 by @dependabot[bot] in #30
- test: lock deterministic ordering for config 🧪 Gatekeeper by @EffortlessSteven in #34
- ux: error on non-existent input paths 🎨 Palette by @EffortlessSteven in #37
- refactor: replace unwrap/expect with Result in tests 🛡️ Sentinel by @EffortlessSteven in #38
- perf: reduce allocations in export streaming ⚡ Bolt by @EffortlessSteven in #39
- compat: expose git/walk/content features in tokmd CLI 🧷 Compat by @EffortlessSteven in #32
- docs: modernize LLM context planning in README with
tokmd context📚 Librarian by @EffortlessSteven in #35 - deps: decouple tokmd-types from tokmd-config 🧾 Auditor by @EffortlessSteven in #36
- chore(deps): bump actions/upload-artifact from 4 to 6 by @dependabot[bot] in #31
- chore(deps): bump actions/download-artifact from 4 to 7 by @dependabot[bot] in #29
- fix(tests): update redaction tests and improve scan error handling by @EffortlessSteven in #40
- compat: fix unused fields warning in no-default-features 🧷 Compat by @EffortlessSteven in #41
- test: lock deterministic ordering for analysis reports 🧪 Gatekeeper by @EffortlessSteven in #42
- docs: document configuration and profiles, remove misleading scan config 📚 Librarian by @EffortlessSteven in #43
- deps: synchronize proptest to 1.9.0 🧾 Auditor by @EffortlessSteven in #44
- fix: prevent double-open in read_head_tail 🛡️ Sentinel by @EffortlessSteven in #45
- perf: reduce allocations in path normalization ⚡ Bolt by @EffortlessSteven in #46
- docs: clarify implicit CLI defaults in help text 🎨 Palette by @EffortlessSteven in #47
New Contributors
- @EffortlessSteven made their first contribution in #1
- @dependabot[bot] made their first contribution in #27
Full Changelog: https://github.com/EffortlessMetrics/tokmd/commits/v1.3.0