Ramanujan Periodicity Residual
Instead of asking “does this look different?”, we ask “does this still repeat the way it should?” — and because the detector knows which period broke, an agent can trace the defect to the machine component that caused it.
“Does this look different?”
Embedding-based detectors compare a patch to known-good patches in feature space. A thin scratch across a regular grid barely moves an embedding — the pattern is broken, and the detector shrugs.
“Does this still repeat the way it should?” ✳
Ramanujan sums give filters with a rare property: the period-q filter responds only to genuinely period-q structure — not its harmonics, not its neighbors. Break the repeat, and the right channel drops.
This is the same computation the detector runs: build FIR filters from the Ramanujan sums cq(n) (normalized for equal per-harmonic gain), convolve, square. Change the signal’s true period and watch the correct channel — and only that one — light up. The candidate set {1,2,3,4,6,8,12,24} is the divisor closure of the highly composite numbers ≤ 32: 8 periods instead of 32, 2× faster.



The synthetic gate had to pass before anything else was written: defect scores spike ≈100× above clean regions, and the reported disrupted period is q = 8 — the texture’s true pitch — on the top patch and 9 of the top-10.
Recommended action: replace drive gear, re-tension belt.
Claude (claude-opus-4-8) runs a tool loop over four plant-data tools with a schema-constrained JSON answer. Every hypothesis must cite a parameter reading, a matched incident with its % deviation, or explicitly say no strong match. Without an API key, a deterministic matcher runs the same tools — the demo never breaks.
RPR is scoped to grid / mesh / weave-like material. An embedding baseline ships alongside it as the second channel for everything else. We don’t claim wins on non-periodic objects.
26/27 correct verdicts on the demo set. The two misses: thin scratches on the coarse weave, just under the calibrated threshold. It’s in the README, not hidden.
Process logs, incidents and maintenance records are mock data crafted for a self-consistent story. The agent tooling is real — swap backend/tools.py for live sources.