← ClaudeAtlas

kintsugi-data-mllisted

Focused data-ml anti-patterns and verified code templates compiled by Kintsugi Harness.
tunguyen1993/kintsugi-harness · ★ 0 · AI & Automation · score 73
Install: claude install-skill tunguyen1993/kintsugi-harness
# kintsugi-data-ml (`@KML/1` Machine-Native AST-IR) ```bash kintsugi scan --staged --fail-on HIGH ``` ## `@KML/1` Symbolic Guardrail Specifications (`NEG_AST => POS_AST`) ### `KL-ML-003` · `Causal Light-Cone Non-Lookahead, 2nd Law Entropy & Compensated Floating-Point Guard` - `@WIRE`: `@KML/1|id=KL-ML-003|sev=C|cat=data-ml|lang=py|op=CAUSAL_LIGHT-CONE_NON-LOOKAHEAD_2ND_|guard=RX#10d16b55|neg=«pred_t = 0.5 * signal_series[idx_t] + 0.5 * signal_series[idx_t + 1] # CAUSAL_ARROW_LOOKA»|pos=«pred_t = 0.5 * signal_series[max(0, idx_t - 1)] + 0.5 * signal_series[idx_t] ; total_energ»|fp=aa1cc4d93e2a0829` - `@TRAP`: `[Cognitive Trap] Accessed future time index `signal_series[idx_t + 1]` at step `idx_t` (violating relativistic causal arrow `t_cause <= t_effect`), decreased isolated entropy, or evaluated `gamma ** 2 - 1.0` at `v << c`.` - `@LAW`: `[Mental Model] Enforce strict past-only causal masks (`indices <= idx_t`), non-negative isolated entropy production (`dS >= 0`), algebraic factorization (`v_sq / (1.0 - v_sq)`), and Kahan `math.fsum()`.` `@NEG_AST` (`❌ FORBIDDEN`): ```python pred_t = 0.5 * signal_series[idx_t] + 0.5 * signal_series[idx_t + 1] # CAUSAL_ARROW_LOOKAHEAD_LEAK ``` `@POS_AST` (`✅ REQUIRED`): ```python pred_t = 0.5 * signal_series[max(0, idx_t - 1)] + 0.5 * signal_series[idx_t] total_energy = math.fsum([rest_energy_j] + list(micro_fluxes)) ``` ### `KL-SEC-001` · `Require weights_only=True in PyTorch torch.load() to block pickle RCE` - `@WIRE`: `@KML/1|id=KL-