Skip to content

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 31 Jan 22:39
· 1811 commits to main since this release

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 hotspot

New 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 tokmd

Or 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-if JSON pointer rules
  • Interactive Wizard: tokmd init --interactive for guided configuration
  • Git-Ranked Context: --rank-by churn/hotspot in context command
  • Tools Schema: LLM tool definitions (OpenAI, Anthropic, JSON Schema)
  • New Crate: tokmd-gate for policy evaluation
  • Analysis Enrichers: Archetype, topics, entropy, predictive churn, corporate fingerprint, license radar
  • Context Output Options: --out, --force, --bundle-dir, --log flags
  • 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 Cow iterators

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

New Contributors

Full Changelog: https://github.com/EffortlessMetrics/tokmd/commits/v1.3.0