tda-diagnosing-computational-defects

Diagnose computational defects in statistical results, null models, and result provenance.

1|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/ZK-Theory/TDL --skill tda-diagnosing-computational-defects-zk-theory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tda-diagnosing-computational-defects
Source: https://github.com/ZK-Theory/TDL/tree/main/.agents/skills/tda-diagnosing-computational-defects
Command: npx skills add https://github.com/ZK-Theory/TDL --skill tda-diagnosing-computational-defects-zk-theory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Computational defects in research pipelines often pass every software test while producing mathematically wrong, statistically invalid, or provenance-incomplete results. This Skill provides a disciplined procedure to reproduce, isolate, and fix such defects without closing them prematurely. ## Core Features & Use Cases - Structured defect diagnosis: A 10-step procedure covering symptom statement, lane classification, red-capable reproduction commands, minimal fixtures, falsifiable hypotheses, and post-mortems. - Known failure-class catalog: Checklists for Monte Carlo p-value denominator errors, label-shuffle null mistakes, PCA/scaler refit drift, silent truncation, and cross-version pickle label collapse. - Use Case: A permutation test returns suspicious p-values. Use this Skill to classify the defect lane, build a failing reproduction command, check the known failure classes (e.g., wrong p-value denominator), fix only after reproduction, and add a regression test with a contract binding. ## Quick Start Ask the assistant to diagnose why a result JSON changed unexpectedly or why a null model gives suspicious p-values, following the defect diagnosis procedure.

Frequently Asked Questions about tda-diagnosing-computational-defects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a computational defect that passes all tests?

State the exact symptom and file, classify the defect lane, then build one red-capable command that fails on the defect. Minimize to the smallest failing fixture, write 3-5 falsifiable hypotheses, and fix only after reproduction.

Why does my Monte Carlo p-value look wrong?

A common cause is using the diagnostic pair cap as the denominator instead of null draws. The correct formula is p = (r + 1) / (n + 1) with n = min(B, total_pairs).

Why does a label-shuffle null test show no effect?

Persistent homology is row-order invariant, so shuffling rows of an already-computed embedding tests nothing. Shuffle the labels before computing the embedding to create a valid null.

When should I not use this defect diagnosis procedure?

Do not use it for ordinary refactoring without a bug, for contract authoring (handled upstream by schema-contract-design), or for exploratory analysis with no current defect claim.

What should I do if the defect affects an archived result JSON?

Never silently correct an archived result. Record a new date-suffixed file plus a vault entry marking supersession, and escalate if the fix would change an estimand, null design, or headline claim.