tokmd-analysis
Analysis logic and enrichers for tokmd receipts.
Overview
This is a Tier 3 orchestration crate that computes derived metrics and optional enrichments from code inventories. It coordinates multiple analysis modules based on preset configuration.
Installation
[]
= "1.4"
# Enable optional features
[]
= "1.4"
= ["git", "walk", "content", "fun", "topics", "archetype"]
Usage
use ;
let request = AnalysisRequest ;
let receipt = analyze?;
Analysis Presets
| Preset | Includes |
|---|---|
Receipt |
Core derived metrics (density, distribution, COCOMO) |
Health |
+ TODO density |
Risk |
+ Git hotspots, coupling, freshness |
Supply |
+ Assets, dependency lockfiles |
Architecture |
+ Import graph |
Topics |
Semantic topic clouds (TF-IDF) |
Security |
License radar, entropy profiling |
Identity |
Archetype detection, corporate fingerprint |
Git |
Predictive churn, advanced git metrics |
Deep |
Everything (except fun) |
Fun |
Eco-label, novelty outputs |
Analysis Modules
| Module | Feature | Purpose |
|---|---|---|
archetype |
archetype | Project kind detection |
derived |
- | Core metrics |
topics |
topics | Semantic keyword extraction |
entropy |
content+walk | High-entropy file detection |
license |
content+walk | License radar scanning |
fingerprint |
git | Corporate domain analysis |
churn |
git | Git-based change prediction |
assets |
walk | Asset categorization |
git |
git | Hotspots, bus factor, freshness |
content |
content | TODOs, duplicates, imports |
Feature Flags
[]
= ["tokmd-git"] # Git history analysis
= ["tokmd-walk"] # Asset discovery
= ["tokmd-content"] # Content scanning
= ["tokmd-analysis-topics"] # Topic-cloud extraction
= ["tokmd-analysis-archetype"] # Archetype detection
= ["tokmd-analysis-fun"] # Fun/novelty report enrichers
Key Types
License
MIT OR Apache-2.0