Parent: batuta-spec.md Sources: batuta-stack-spec, stack-quality-matrix-spec, stack-tree-view, batuta-stack-0.1-100-point-qa-checklist, score-a-plus-spec, book-score-spec
Batuta Stack Orchestration manages dependencies, coordinates releases, and enforces quality across all PAIML Rust ecosystem crates. It was motivated by the December 2025 incident where entrenar v0.2.2 shipped with broken path dependencies to crates.io.
- Broken published crates from path dependencies
- Arrow version conflicts across crates (53.x vs 54.x)
- Manual coordination failures with no automated checks
- No unified quality enforcement across 20+ components
| Layer | Crate | Latest | Purpose |
|---|---|---|---|
| Compute | trueno | 0.14.x | SIMD/GPU primitives |
| Compute | trueno-db | 0.3.x | GPU-first analytics DB |
| Compute | trueno-graph | 0.1.x | Graph database |
| Compute | trueno-rag | 0.1.x | RAG pipeline (BM25+vector) |
| Compression | trueno-zram-core | 0.3.x | SIMD compression |
| Distribution | repartir | 2.0.x | Distributed compute |
| ML | aprender | 0.24.x | ML algorithms, APR v2 |
| Training | entrenar | 0.5.x | Autograd, LoRA/QLoRA |
| Inference | realizar | 0.5.x | GGUF/APR inference |
| Speech | whisper-apr | 0.1.x | Whisper ASR |
| Data | alimentar | 0.2.x | Parquet/Arrow loading |
| Registry | pacha | 0.1.x | Model registry (Ed25519) |
| Tracing | renacer | 0.7.x | Syscall tracer |
whisper-apr --> trueno, aprender, realizar
realizar ----> trueno, aprender, alimentar, pacha
aprender ----> trueno, alimentar, entrenar
entrenar ----> trueno, aprender, trueno-db, trueno-rag
repartir ----> trueno, trueno-db (checkpoint), wgpu (gpu)
Analyzes dependency graphs across all PAIML projects:
- Detects path dependencies that should be crates.io versions
- Identifies version conflicts before build failures
- Validates dependency alignment across the stack
batuta stack check
# Output: dependency health matrix with warnings/errorsCoordinates releases in topological order:
- Validates quality gates (lint, coverage) before each release
- Automates Cargo.toml updates for downstream dependencies
- Publishes crates in correct dependency order
TUI dashboard showing health of all stack components.
batuta stack versions # Check latest crates.io versions
batuta stack versions --format json # JSON output for toolingbatuta stack quality --verify
# Output:
# Component Rust Repo README Hero Status
# trueno 107/114 98/110 20/20 ok A+
# aprender 109/114 96/110 19/20 ok A+
# entrenar 89/114 82/110 15/20 -- B+O(1) cached check for which crates need publishing:
batuta stack publish-status # Warm cache: <100ms
batuta stack publish-status --force # Cold cache: ~7sCache invalidation triggers: Cargo.toml change, git HEAD move, crates.io TTL (15 min).
Enforces quality thresholds before merge:
- TDG grade >= B
- Test coverage >= 90%
- Zero clippy warnings
- No prohibited dependencies (e.g., cargo-tarpaulin)
| Dimension | Tool | A+ Threshold |
|---|---|---|
| Rust Project Score | pmat rust-project-score |
105-114/114 |
| Repository Score | pmat repo-score |
95-110/110 |
| README Score | pmat repo-score (Category A) |
18-20/20 |
| Hero Image | batuta stack quality |
Present & Valid |
| Gate | Enforcement Point | Threshold |
|---|---|---|
| Formatting | Pre-commit | cargo fmt --check passes |
| Linting | Pre-commit | cargo clippy -- -D warnings |
| Unit tests | Pre-commit | All pass in < 5s |
| Full tests | Pre-push | All pass in < 5 min |
| Coverage | CI | >= 90% (95% preferred) |
| Mutation score | CI | >= 80% |
| TDG Score | Release gate | >= A grade (85/100) |
Visual hierarchical display of stack components:
batuta stack tree [OPTIONS]
Options:
--format <FORMAT> ascii | json | dot [default: ascii]
--depth <N> Max depth [default: unlimited]
--filter <LAYER> core | ml | inference | orchestration | distributed
--health Include health status indicatorspub struct StackTree {
pub layers: Vec<StackLayer>,
}
pub struct StackLayer {
pub name: String,
pub components: Vec<StackComponent>,
}
pub struct StackComponent {
pub name: String,
pub version: String,
pub health: HealthStatus,
pub dependencies: Vec<String>,
}| Tier | Command | Scope | Points |
|---|---|---|---|
make qa-local |
batuta internal quality | 50 | |
make qa-stack |
Full stack validation (CI) | 50 |
| Section | Domain | Points | Key Checks |
|---|---|---|---|
| I | Foundation (Trueno) | 20 | SIMD detection, GPU fallback, matrix accuracy, Miri, WASM, thread safety |
| II | ML/Inference (Aprender/Realizar) | 20 | Regression exactness, GGUF loading, tokenization parity, inference latency, quantization |
| III | Transpilation (Decy/Depyler/Bashrs) | 20 | Ownership inference, type conversion, shell safety, semantic equivalence |
| IV | Orchestration (Batuta) | 20 | Pipeline phases, PMAT integration, stack health, error handling |
| V | Stack Integration | 20 | Cross-crate data flow, version compatibility, CI health, deployment |
| Principle | Application |
|---|---|
| Genchi Genbutsu | Every check requires specific command execution and verifiable result |
| Jidoka | Pipeline halts on first failed check |
| Poka-Yoke | Automated checks prevent human error in release process |
| Kaizen | Checklist refined after each release cycle |
Crates must be released bottom-up through the dependency graph:
- trueno (no PAIML deps)
- trueno-db, trueno-graph, trueno-rag (depend on trueno)
- aprender, alimentar (depend on trueno)
- entrenar (depends on trueno, aprender)
- realizar (depends on trueno, aprender, alimentar)
- repartir (depends on trueno)
- whisper-apr (depends on trueno, aprender, realizar)
- batuta (depends on all)
# For each crate in topological order:
cargo fmt --check
cargo clippy -- -D warnings
cargo test
cargo publish --dry-run
# If all pass: cargo publish| Principle | Application |
|---|---|
| Muda | Eliminate wasted releases (broken crates, version conflicts) |
| Jidoka | Stop release pipeline on first quality failure |
| Just-in-Time | Publish only when downstream crate needs the update |
| Kaizen | Post-release retrospective improves next cycle |
| Heijunka | Level the release cadence (no big-bang multi-crate releases) |