convez.ai
SkillDados & AnalyticsAvançado
GuitarAlchemist

ix — Workspace Rust para Algoritmos ML/Matemáticos Compostos

GuitarAlchemist/ix

80+ skills ML/math puros em Rust, compostos e governados para Claude Code

Ver no GitHub
InicialPluginScore · de 0 a 100

Workspace Rust com 65 crates que implementam algoritmos de otimização, busca, teoria dos jogos, aprendizado de máquina adversarial e processamento GPU — tudo expostos como Claude Code skills via MCP server. Construído sem dependências de frameworks ML externos, oferecendo 80+ skills compostos para análise, otimização e computação matemática de alto desempenho.

Instalação

$npx convez-ai GuitarAlchemist/ix

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
37%
Último commit
há 1 dia
Versão
v0.5.0
Issues abertas
100
Contribuidores
3

Casos de uso

  • Otimização de funções complexas (PSO, Adam, simulated annealing)
  • Busca inteligente (A*, MCTS, minimax) em espaços de problema
  • Análise de séries temporais e processamento de sinais (FFT, Kalman)
  • Aprendizado por reforço e bandit problems
  • Teoria dos jogos, mecanismo de design e leilões
  • Modelos probabilísticos (HMM, Viterbi, grafos de Markov)

Veredito

Projeto maduro e bem-governado: tier de estabilidade explícito, CI que valida API pública, documentação de maturidade clara. Ideal para quem precisa de algoritmos ML customizados em Rust sem overhead de frameworks genéricos. Consumo via MCP garante integração fluida com Claude Code.

README

A tradução para o português deste README ainda está na fila.

ix

CI

Read this first: docs/MANUAL.md — the canonical user manual. Install, tool inventory, pipeline format, governance integration, extension guide, troubleshooting. Start there.

A Rust workspace of composable ML/math algorithms and AI governance, designed to be exposed as Claude Code skills via an MCP server and CLI. Part of the GuitarAlchemist ecosystem (ix + tars + ga + Demerzel).

65 crates. 68 MCP tools. 80+ Claude Code skills. Pure Rust. No external ML frameworks.

Quick Start

# Build everything
cargo build --workspace

# Run tests
cargo test --workspace

# Run the CLI
cargo run -p ix-skill -- optimize --algo pso --function sphere --dim 10

# Start the MCP server (for Claude Code integration)
cargo run -p ix-agent

Crate Maturity & Stability

Maturity Tiers

TierMeaningDownstream-Safe?
StableAPI commitments, well-tested, used in production MCP toolsYes
BetaFeature-complete, actively used, API may change between minor versionsWith caution
ExperimentalResearch-grade, novel math, no stability guaranteesNo
InternalTooling/infra, not intended for direct external useNo

Stable Subset (safe for ga, tars, Demerzel consumption via MCP)

CrateTierNotes
ix-mathStableCore linear algebra, statistics, activations — everything depends on this
ix-optimizeStableSGD, Adam, PSO, simulated annealing
ix-supervisedStableRegression, trees, KNN, SVM, metrics
ix-ensembleStableRandom forest, gradient boosted trees
ix-unsupervisedStableKMeans, DBSCAN, PCA, t-SNE, GMM
ix-searchStableA*, MCTS, minimax, BFS/DFS
ix-graphStableMarkov chains, HMM/Viterbi, agent routing
ix-signalStableFFT, wavelets, Kalman, spectral analysis
ix-cacheStableEmbedded in-process cache (TTL, LRU, pub/sub) — promoted 2026-05-02
ix-probabilisticStableBloom, HLL, Count-Min, Cuckoo — promoted 2026-05-02
ix-gameStableNash, Shapley, auctions, mechanism design — promoted 2026-05-02
ix-rlStableBandits (EpsilonGreedy, UCB1, Thompson), Q-learning — promoted 2026-05-02

Stability contract

"Stable" is not just documentation — CI prevents silent breakage. The stable-surface.yml workflow runs on every PR: it hashes the public-API surface of each Stable-tier crate on main, then again on the PR branch, and fails the check if any hash changed. Non-stable crates produce a warning only.

Source of truth: crate-maturity.toml at the workspace root. The CLI subcommand ix stable-surface is the reference implementation used by CI and is runnable locally:

cargo run -p ix-skill -- stable-surface --format=json

The hash is a BLAKE3 over the sorted, deduplicated set of pub declarations discovered in each crate's src/**.rs. It catches added / removed / renamed exported symbols — enough to stop accidental breaks. It does NOT catch finer-grained changes (function signature edits, trait-bound additions, variance shifts). Those are out of scope for v1; revisit with cargo public-api integration when a real break slips through.

To intentionally break a Stable API, do one of the following in the SAME PR that introduces the change:

  1. Demote the crate to beta in crate-maturity.toml. The guard then downgrades the diff to a warning. Document the demotion in the PR body.
  2. Bump the crate's major version in its Cargo.toml. (v1 of this guard still flags the hash change — bumping the major version is the semver-correct signal to downstream consumers, but the guard does not yet auto-detect it. Use the demotion path for the CI to go green, then restore the tier in a follow-up release PR.)

The current 12 Stable crates (see table above) cover the safe-to-consume subset for ga, tars, Demerzel, and agent-blackbox.

Beta Crates

CrateTierNotes
ix-nnBetaTransformers, backprop — complex but actively developed
ix-pipelineBetaDAG executor — critical infrastructure, API stabilizing
ix-agentBetaMCP server (68 tools) — production-facing integration point
ix-governanceBetaDemerzel governance bridge — consumed by ga/tars
ix-ioBetaI/O utilities (CSV, JSON, TCP, WebSocket)
ix-grammarBetaEarley, CYK parsers, EBNF/ABNF parsers, ~30-entry grammar catalog
ix-catalog-coreBetaShared Catalog trait substrate used by ix-code, ix-grammar, ix-net catalogs
ix-netBetaCurated catalog of ~70 IETF RFCs with obsolescence-graph queries

Experimental Crates

CrateTierNotes
ix-evolutionExperimentalGenetic algorithms, differential evolution
ix-chaosExperimentalLyapunov, bifurcation, strange attractors
ix-adversarialExperimentalFGSM, PGD, differential privacy
ix-dynamicsExperimentalLie groups/algebras, neural ODEs
ix-topoExperimentalPersistent homology, simplicial complexes
ix-ktheoryExperimentalGraph K-theory, Grothendieck K0/K1
ix-categoryExperimentalFunctors, monads, category theory
ix-rotationExperimentalQuaternions, SLERP, Plücker coordinates
ix-sedenionExperimentalHypercomplex algebra, Cayley-Dickson
ix-fractalExperimentalTakagi curves, IFS, L-systems
ix-number-theoryExperimentalPrime sieving, elliptic curves
ix-gpuExperimentalWGPU compute shaders (Vulkan/DX12/Metal)
memristive-markovExperimentalResearch prototype

Internal Crates

CrateTierNotes
ix-skillInternalCLI binary for direct command-line access
ix-skill-macrosInternalProc macros for skill registration
ix-demoInternalegui desktop app with interactive tabs
ix-dashboardInternalDashboard utilities
ix-registryInternalCrate registry metadata
ix-codeInternalCode analysis (cyclomatic, Halstead, catalog of external tools)
ix-typesInternalShared type definitions

Infrastructure & Harness Crates

The 16 crates below were added during the agent-harness and pipeline work. They are internal-tier: consumed by ix-agent and the session runtime, not intended as direct deps for downstream repos.

CrateTierNotes
ix-agent-coreInternalShared agent substrate: SessionEvent, middleware chain, action dispatcher
ix-approvalInternalApproval / blast-radius middleware for agent actions
ix-autogradInternalR7 reverse-mode autograd tape over ndarray with DifferentiableTool trait
ix-contextInternalContext DAG — AST + call + import + git-trajectory graph for agents
ix-fuzzyInternalFuzzy-enum evaluation (hexavalent confidence distributions)
ix-harness-cargoInternalHarness adapter: cargo build / test / clippy / audit
ix-harness-clippyInternalHarness adapter: clippy warning parser + remediation
ix-harness-gaInternalHarness adapter: ga music-theory MCP bridge
ix-harness-github-actionsInternalHarness adapter: GitHub Actions workflow inspector
ix-harness-signingInternalHarness adapter: cosign / SLSA signing integration
ix-harness-tarsInternalHarness adapter: tars F# cognition MCP bridge
ix-loop-detectInternalSession-level loop detection middleware
ix-memoryInternalAgent memory system (belief persistence, context window management)
ix-registry-checkInternalR3 Buf-style breaking-change detector for capability-registry.json
ix-sentinelInternalGoverned reactive reasoner — autonomous session-level monitor
ix-sessionInternalSession log, event stream, trace flywheel export

MCP Tool Surface

ix-agent exposes 68 MCP tools covering core math, supervised / unsupervised ML, neural networks + autograd, signal + chaos, graph + topology, adversarial + evolution, game theory, probabilistic data structures, grammar, governance, federation, source adapters (ix_git_log, ix_cargo_deps, ix_code_analyze, ix_code_catalog, ix_ast_query, ix_code_smells), OPTIC-K voicing search, and pipeline orchestration (ix_pipeline_run, ix_pipeline_compile, ix_pipeline_list).

See docs/MANUAL.md §4 for the full categorized inventory and crates/ix-agent/src/tools.rs for the authoritative schemas.

Pipelines, compiler, and canonical showcases

  • Pipelines — Submit a DAG of tool calls in one request via ix_pipeline_run. Content-addressed cache hits on replay (R2 Phase 1). Every run emits a lineage DAG consumable by ix_governance_check (R2 Phase 2).
  • Natural-language compiler — ix_pipeline_compile turns a sentence into a validated pipeline.json DAG via MCP sampling + registry validation.
  • Canonical showcases at examples/canonical-showcase/:
    • 01-cost-anomaly-hunter (3 tools, FinOps)
    • 02-chaos-detective (4 tools, signal + chaos + topology)
    • 03-governance-gauntlet (5 tools, constitutional audit)
    • 04-sprint-oracle (4 tools, forecasting)
    • 05-adversarial-refactor-oracle (14 tools, self-referential live-data audit of ix's own workspace — see its FINDINGS.md)

Crates

Core Math & Optimization

CrateDescription
ix-mathLinear algebra, statistics, distances, activations, calculus, random, hyperbolic geometry
ix-optimizeSGD, Adam, simulated annealing, particle swarm optimization

Supervised Learning

CrateDescription
ix-supervisedLinear/logistic regression, decision trees, KNN, Naive Bayes, SVM, metrics (confusion matrix, ROC/AUC), cross-validation, SMOTE, TF-IDF
ix-ensembleRandom forest, gradient boosted trees

Unsupervised Learning

CrateDescription
ix-unsupervisedK-Means, DBSCAN, PCA, t-SNE (Barnes-Hut), GMM (EM algorithm)

Deep Learning & RL

CrateDescription
ix-nnNeural network layers (Dense, LayerNorm, BatchNorm, Dropout), loss functions, backprop, transformers
ix-rlMulti-armed bandits (epsilon-greedy, UCB1, Thompson), Q-learning, GridWorld
ix-evolutionGenetic algorithms, differential evolution

Search & Graphs

CrateDescription
ix-searchA*, Q* (learned heuristic), MCTS, minimax/alpha-beta, BFS/DFS, hill climbing, tabu search
ix-graphGraph algorithms, Markov chains, HMM/Viterbi/Baum-Welch, state spaces, agent routing
ix-gameNash equilibria, Shapley value, auctions, evolutionary dynamics, mean field games

Signal & Chaos

CrateDescription
ix-signalFFT, wavelets, FIR/IIR filters, Kalman filter, spectral analysis, DCT
ix-chaosLyapunov exponents, bifurcation diagrams, strange attractors, fractal dimensions, delay embedding, chaos control

Security & Privacy

CrateDescription
ix-adversarialFGSM, PGD, C&W attacks, adversarial training, poisoning detection, differential privacy, robustness evaluation

Advanced Math

CrateDescription
ix-dynamicsInverse kinematics chains, Lie groups/algebras (SO(3), SE(3)), neural ODEs
ix-topoPersistent homology, simplicial complexes, Betti numbers, topological data analysis
ix-ktheoryGraph K-theory, Grothendieck K0/K1, Mayer-Vietoris sequences
ix-categoryFunctors, natural transformations, monads, category theory primitives
ix-grammarFormal grammars: context-free grammars, Earley parser, CYK, Chomsky normal form
ix-rotationQuaternions, SLERP, Euler angles, axis-angle, rotation matrices, Plücker coordinates
ix-sedenionHypercomplex algebra: sedenions, octonions, Cayley-Dickson construction, BSP trees
ix-fractalTakagi curves, IFS (Sierpinski, fern), L-systems, Hilbert/Peano/Morton space-filling curves
ix-number-theoryPrime sieving, Miller-Rabin, modular arithmetic, CRT, elliptic curves

Infrastructure

CrateDescription
ix-gpuWGPU compute shaders for cosine similarity, matrix multiply, batch vector search (Vulkan/DX12/Metal)
ix-cacheEmbedded Redis-like cache with sharded concurrency, TTL, LRU eviction, pub/sub, RESP protocol server
ix-pipelineDAG executor with topological sort, parallel branch execution, memoization, critical path analysis
ix-probabilisticBloom filter, Count-Min sketch, HyperLogLog, Cuckoo filter
ix-ioCSV, JSON, file watcher, named pipes, TCP, HTTP, WebSocket, trace bridge
ix-catalog-coreShared Catalog trait + helpers — substrate for ix-code / ix-grammar / ix-net catalogs, exposed via ix_catalog_list meta-tool
ix-netCurated IETF RFC catalog (~70 entries) with obsolescence graph, queryable by number / topic / status via ix_rfc_catalog

Governance

CrateDescription
ix-governanceDemerzel governance: tetravalent logic (T/F/U/C), constitution parser, 12 persona loader, policy engine

Integration

CrateDescription
ix-agentMCP server: 68 tools via JSON-RPC over stdio (algorithms + governance + federation + pipeline orchestration)
ix-skillCLI binary for direct command-line access to all algorithms
ix-demoegui desktop app with 22+ interactive demo tabs including governance explorer

Claude Code Integration

MCP Server

Register ix as a Claude Code MCP server in .mcp.json:

{
  "mcpServers": {
    "ix": {
      "command": "cargo",
      "args": ["run", "-p", "ix-agent"]
    }
  }
}

Claude can then call tools like ix_kmeans, ix_viterbi, ix_optimize, etc. directly during conversations.

Skills

80+ Claude Code skills organized by domain:

Algorithm skills (26): ix-optimize, ix-cluster, ix-search, ix-chaos, ix-hmm, ix-adversarial, ix-game, ix-pipeline, ix-signal, ix-benchmark, ix-nn, ix-bandit, ix-evolution, ix-random-forest, ix-supervised, ix-topo, ix-category, ix-dynamics, ix-ktheory, ix-gpu, ix-cache, ix-grammar, ix-rotation, ix-sedenion, ix-fractal, ix-number-theory

Governance skills (3): ix-governance-check, ix-governance-persona, ix-governance-belief

Federation skills (4): federation-discover, federation-grammar, federation-music, federation-traces

Ecosystem skills (4): governed-execute, ecosystem-audit, roadblock-resolver, delegate-cli

MCP Federation

ix connects to tars (F# reasoning) and ga (music theory) via MCP:

{
  "mcpServers": {
    "ix": { "command": "cargo", "args": ["run", "--release", "-p", "ix-agent"] },
    "tars": { "command": "dotnet", "args": ["run", "--project", "path/to/Tars.Interface.Cli", "--", "mcp", "server"] },
    "ga": { "command": "dotnet", "args": ["run", "--project", "path/to/GaMcpServer"] }
  }
}

Demerzel Governance

Agents operate under the Demerzel constitution (11 articles, 12 personas, tetravalent logic). Named after R. Daneel Olivaw — consistent with Asimov's Zeroth Law.

Examples

16 runnable examples organized by domain:

#ExampleDomainSource
1PSO Rosenbrock — Minimize a 10D cost functionOptimizationexamples/optimization/pso_rosenbrock.rs
2Decision Tree — CART classification with probabilitiesSupervisedexamples/supervised/decision_tree.rs
3K-Means Clustering — Segment data into k groupsUnsupervisedexamples/unsupervised/kmeans_clustering.rs
4DBSCAN Anomaly — Density-based clustering + noise detectionUnsupervisedexamples/unsupervised/dbscan_anomaly.rs
5Viterbi HMM — Decode hidden states, Baum-Welch trainingSequenceexamples/sequence/viterbi_hmm.rs
6Nash Equilibrium — Prisoner's Dilemma analysisGame Theoryexamples/game-theory/nash_equilibrium.rs
7A* & Q* Search — Hand-crafted vs learned heuristicsSearchexamples/search/astar_qstar.rs
8Logistic Map — Lyapunov exponents and chaos detectionChaosexamples/chaos/logistic_map.rs
9DAG Pipeline — Parallel data flow with memoizationPipelineexamples/pipeline/dag_pipeline.rs
10Robustness Test — FGSM/PGD attacks and defensesAdversarialexamples/adversarial/robustness_test.rs
11FFT Analysis — Frequency decomposition of signalsSignalexamples/signal/fft_analysis.rs
12Auctions — First-price, second-price, English, DutchGame Theoryexamples/game-theory/auctions.rs
13Bandits — Thompson sampling for A/B testingRLexamples/reinforcement-learning/bandits.rs
14Bloom Filter — Probabilistic membership + HyperLogLogProbabilisticexamples/probabilistic/bloom_filter.rs
15GPU Similarity — WGPU cosine similarity searchGPUexamples/gpu/similarity_search.rs
16Embedded Cache — TTL, LRU, pub/sub, Redis-style opsCacheexamples/cache/embedded_cache.rs

Run any example:

cargo run --example pso_rosenbrock
cargo run --example viterbi_hmm
cargo run --example bloom_filter
# etc.

Documentation

Learning Path — 60+ tutorials from foundations to advanced topics, with runnable Rust examples.

🇫🇷 Parcours d'apprentissage en français — 11 tutoriels d'algorithmes + 4 cas pratiques traduits en français.

Topics: linear algebra, optimization, supervised/unsupervised learning, neural networks, reinforcement learning, game theory, signal processing, chaos theory, adversarial ML, GPU computing, and more.

Architecture

ix is a Rust workspace of 65 crates organised into six rough layers, plus a governance submodule. The top-level shape:

ix/
├── Cargo.toml             # Workspace root
├── CLAUDE.md              # Project conventions (load-bearing for Claude Code sessions)
├── README.md              # This file
├── docs/
│   ├── MANUAL.md          # ← canonical user manual (start here)
│   ├── INDEX.md           # 60+ tutorial learning path
│   ├── FEDERATION.md      # Cross-repo (ix + tars + ga) federation
│   └── guides/            # graph-theory-in-ix, code-analysis-tools, ...
├── examples/
│   └── canonical-showcase/# 5 reproducible demo pipelines + roadmap + findings
├── governance/
│   └── demerzel/          # Git submodule: constitution + personas + policies
└── crates/                # 65 crates — see maturity tables above

For the per-crate inventory grouped by concern, see docs/MANUAL.md §4. The source of truth for crate dependencies is each crate's Cargo.toml; for a live workspace dep graph, run the ix_cargo_deps MCP tool against this repo.

Key Dependencies

  • ndarray 0.17 — Matrix operations (f64)
  • rand 0.9 + rand_distr 0.5 — Random number generation
  • wgpu 28 — Cross-platform GPU compute
  • parking_lot 0.12 — Fast concurrent locks
  • tokio 1 — Async runtime (I/O, cache server)
  • thiserror 2 — Error types
  • clap 4 — CLI parsing

Testing

# Unit + integration tests
cargo test --workspace

# Clippy (zero warnings policy)
cargo clippy --workspace -- -D warnings

# Property-based tests (proptest)
cargo test --workspace -- --include-ignored

# Benchmarks (criterion)
cargo bench -p ix-math
  • proptest for math invariants (commutativity, associativity, norm preservation)
  • criterion for performance-critical paths (FFT, matrix ops, GPU kernels)

Conventions

  • Pure Rust (except WGPU for GPU compute)
  • CPU algorithms use f64; GPU uses f32 via WGSL shaders
  • Builder pattern for algorithm configuration
  • Seeded RNG for reproducibility
  • Each crate defines domain traits (Regressor, Classifier, Clusterer, Optimizer, etc.)
  • MSRV: Rust 1.80+ (due to wgpu 28)

License

MIT

Ver o original no GitHub

Bom para

Relacionados