---
name: folk-melody-palindromes-reproduce
description: Reproduce every number, table and figure of "Whole-phrase symmetry in folk melodies under a transition-preserving null" from the public MTCFeatures corpora.
allowed-tools: Bash(git *), Bash(curl *), Bash(python3 *), Bash(uv *), Bash(bash *)
---

# Reproduce the folk-melody symmetry paper

```bash
git clone https://github.com/tomo3141592653/folk-melody-palindromes
cd folk-melody-palindromes
./prepare_data.sh   # MTCFeatures 1.1 (Zenodo 3551003), md5-checked; builds five derived files, sha256-checked (about 4 minutes)
./run_all.sh        # about 36 minutes on a laptop CPU; needs uv (installs Python 3.13, numpy, scipy, matplotlib from uv.lock)
git diff --stat     # expected: no changes
```

## What to check

- `results/decompose_essen.json`, `results/decompose_mtc-ann-2.0.1.json`: the three-factor split of the mirror excess (reversible counts, palindrome chance, residual against the transition-preserving null).
- `results/two_pal_clean_*.json`: two-palindrome phrases against the transition-preserving null, by length band; the confirmation on MTC-FS-INST follows `analysis_plan.md`.
- `results/decomp_periodic_*.json`: the additive split into periodic and non-periodic phrases (Table 2).
- `check_two_pal_equivalence.py`: brute-force check of Appendix A.
- `paper_en.md`: every number between `<!--n:name-->` markers is filled from the ledgers; after the run it should be unchanged.
