agent collaboration
jali (जाली) — polynomial ring arithmetic R_q = F_p[x]/(x^n+1) over Goldilocks.
project structure
jali/
├── rs/ core library (jali crate, depends on nebu, no_std)
│ └── src/lib.rs RingElement, NTT, noise tracking, sampling, automorphisms
├── cli/ command-line tool (jali-cli crate)
│ └── src/main.rs ring ops, NTT, sample, bench commands
├── specs/ canonical specifications (7 docs)
└── docs/explanation/ educational articles (5 files)
no wgsl/ directory. ring multiplication is NTT-based — the butterfly structure maps well to GPU, but the implementation lives in nox jets, not standalone shaders.
key invariants
- depends on nebu: jali uses nebu for Goldilocks F_p scalar arithmetic and NTT roots of unity. nebu is the only dependency.
#![no_std]: the core library is embeddable anywhere. no heap allocation in the hot path (ring degree is compile-time const generic or fixed parameter set).
- negacyclic NTT: multiplication in R_q = F_p[x]/(x^n+1) uses the negacyclic NTT — standard NTT with a twisting pre-/post-multiply by powers of ψ (a primitive 2n-th root of unity). Goldilocks has 2^32-th roots of unity, so n up to 2^31 is supported.
- noise tracking: every FHE-relevant operation tracks noise growth. NoiseBudget is a log₂ bound. addition grows noise by +1 bit, multiplication by log₂(n) + sum of input bounds. bootstrap resets noise to a fixed level.
- dual representation: RingElement can be in coefficient form or NTT form. lazy conversion — stay in whichever domain the current operation needs. multiply-heavy workloads stay NTT; add-heavy stay coefficient.
- automorphisms: σ_k: x → x^{5^k mod 2n}. in NTT domain this is a permutation (zero arithmetic). in coefficient domain it is index remap + conditional negation.
- deterministic sampling: all sampling (uniform, ternary, CBD, Gaussian) is seeded for reproducibility. same seed → same ring element.
running
cargo test -p jali # core library tests
cargo run -p jali-cli -- help # CLI tool
relationship to other repos
| repo |
role |
| nebu |
Goldilocks field arithmetic (the scalar field, F_p) — jali's only dependency |
| kuro |
F₂ tower arithmetic (binary regime, complementary) |
| mudra |
protocols built on jali (seal = ML-KEM, veil = TFHE) |
| zheng |
proof system (ring-aware PCS uses jali for NTT batching) |
| nox |
VM (jets for gadget_decompose, ntt_batch, key_switch) |
jali is the ring layer. nebu provides scalars. mudra and zheng consume ring elements.
writing code
- reference specs in specs/ are the source of truth. code follows spec.
#[inline] on ntt_butterfly, pointwise_mul, ring_add. #[inline(always)] only on coefficient-wise add/sub (trivially parallel, no branching).
- avoid
#[inline(always)] on NTT routines — they have loops and the compiler should decide unrolling.
- all new operations need test vectors. cross-verify NTT against naive polynomial multiplication.
- ring degree n is a parameter, not hardcoded. support 1024, 2048, 4096.
- NTT roots come from nebu: ψ = g^{(p-1)/2n} where g is the Goldilocks generator. precompute twiddle tables at initialization.
- noise bounds are conservative (worst-case). never underestimate noise — correctness depends on it.
Synonyms
Claude
trident/CLAUDE
Trident A building block for a cyberstate with superintelligence. Trident is a provable language designed to unite every thinking entity on the planet — agents, people, animals, robots, mycelium, plants — into a single verifiable intelligence. Every line of code here is a step toward that…
lens/CLAUDE
agent collaboration principles for working with AI coding agents across any project. this page is the bootstrap entry point — read it and the four foundational documents to have complete development context: cyber/engineering — pipeline contracts, dual-stream optimization, verification dimensions…
zheng/CLAUDE
agent collaboration principles for working with AI coding agents across any project. this page is the bootstrap entry point — read it and the four foundational documents to have complete development context: cyber/engineering — pipeline contracts, dual-stream optimization, verification dimensions…
github/CLAUDE
Workspace Agent Instructions This repo is the cyberia-to workspace anchor. It orchestrates org-level concerns that do not belong inside any single content repo. Dependency direction One-way, always: `.github` knows every subgraph. No subgraph knows about `.github`. Never reintroduce org-awareness…
honeycrisp/CLAUDE
Claude Code Instructions auditor mindset the project is supervised by an engineer with 30 years of experience. do not spend time on camouflage — do it honestly and correctly the first time. one time correctly is cheaper than five times beautifully. honesty never fake results. if a system produces…
hemera/CLAUDE
agent collaboration principles for working with AI coding agents across any project. this page is the bootstrap entry point — read it and the four foundational documents to have complete development context: cyber/engineering — pipeline contracts, dual-stream optimization, verification dimensions…
cyb/CLAUDE
CLAUDE.md — правила проекта cyb-ts Рабочий процесс Для проверки после коммита — запускать `deno task build` (как CI), а не dev server. Dev server (`deno task start`) запускать только по явному запросу пользователя. Проверка после изменений После каждого изменения кода — **обязательно пересобирать и…
nox/CLAUDE
agent collaboration principles for working with AI coding agents across any project. this page is the bootstrap entry point — read it and the four foundational documents to have complete development context: cyber/engineering — pipeline contracts, dual-stream optimization, verification dimensions…
rs/CLAUDE
agent collaboration principles for working with AI coding agents across any project. this page is the bootstrap entry point — read it and the four foundational documents below to have complete development context. auditor mindset the project is supervised by an engineer with 30 years of experience.…
bbg/CLAUDE
agent collaboration principles for working with AI coding agents across any project. this page is the bootstrap entry point — read it and the four foundational documents to have complete development context: cyber/engineering — pipeline contracts, dual-stream optimization, verification dimensions…
honeycrisp/acpu/CLAUDE
Claude Code Instructions auditor mindset the project is supervised by an engineer with 30 years of experience. do not spend time on camouflage — do it honestly and correctly the first time. one time correctly is cheaper than five times beautifully. honesty never fake results. if a system produces…
strata/genies/CLAUDE
agent collaboration genies — isogeny group action arithmetic for post-quantum privacy. project structure wgsl/ provides batch F_q GPU operations. 512-bit multi-limb arithmetic has carry dependencies that limit single-element throughput, but batch dispatch (many independent mul/add pairs) amortizes…
honeycrisp/aruminium/CLAUDE
Claude Code Instructions auditor mindset the project is supervised by an engineer with 30 years of experience. do not spend time on camouflage — do it honestly and correctly the first time. one time correctly is cheaper than five times beautifully. honesty never fake results. if a system produces…
honeycrisp/rane/CLAUDE
Claude Code Instructions auditor mindset the project is supervised by an engineer with 30 years of experience. do not spend time on camouflage — do it honestly and correctly the first time. one time correctly is cheaper than five times beautifully. honesty never fake results. if a system produces…
cyb/cyb-boot/CLAUDE
cyb-boot — project rules What cyb-boot IS A thin installer (~3MB) that bootstraps the cyb desktop app from the content-addressed network. It is NOT the app itself. Target flow (from design doc): 1. Import wallet from boot.dat (mnemonic + referrer) 2. Connect to iroh bootstrap nodes 3. Fetch version…
strata/kuro/CLAUDE
agent collaboration kuro (黒) — F₂ tower field arithmetic for binary proving. project structure key invariants zero production dependencies in the core library `#![no_std]` — embeddable anywhere Wiedemann tower construction: α_k = product of all previous generators F₂⁴: α = 0x02, F₂⁸: α = 0x08,…
strata/nebu/CLAUDE
agent collaboration principles for working with AI coding agents across any project. this page is the bootstrap entry point — read it and the four foundational documents to have complete development context: cyber/engineering — pipeline contracts, dual-stream optimization, verification dimensions…
strata/trop/CLAUDE
agent collaboration trop — tropical semiring arithmetic for provable optimization. project structure key invariants zero production dependencies in the core library `#![no_std]` — embeddable anywhere the tropical semiring (min, +) is NOT a field: no additive inverse tropical addition: a + b =…
honeycrisp/unimem/CLAUDE
Claude Code Instructions project: unimem pure Rust memory driver for Apple Silicon. IOSurface-backed pinned shared buffers, Tape allocator (~1ns take), fixed-size Grid with Cells. zero-copy sharing between CPU, GPU, AMX, and ANE. role in the stack unimem is a hardware memory driver. it allocates…