{
  "acceptance_version": "0.1",
  "object_path": "examples/marcescence-decomposition",
  "manifest": "agent/tools.json",
  "published_results_path": "results.json",
  "notes": "The off-reference calls probe the choices a referee would push on: replicate aggregation, the normal approximation at n = 7, family structure (every grass is Poaceae), and pooling litter types in T3b. None overturns a confirmatory claim. One qualifies claim 4: the Cmic association is absent within shed litter and holds only within marcescent litter. Separately, results.json's T1 rank_biserial_r (0.77) is |z|/sqrt(n) as analysis.main computes it; the matched-pairs rank-biserial that claim 1 names is (T+ - T-)/(T+ + T-) = (35 - 560)/595 = -0.88, from the published W = 35 and n = 34.",
  "calls": [
    {
      "call_id": "dataset-published",
      "tool": "dataset_summary",
      "args": {},
      "expect": {
        "kind": "published_pointer",
        "result_path": "/dataset"
      },
      "recipe_id": "marcescence-decomp-dataset",
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true
    },
    {
      "call_id": "t1-published",
      "tool": "paired_decomposition_test",
      "args": {},
      "expect": {
        "kind": "published_pointer",
        "result_path": "/T1"
      },
      "recipe_id": "marcescence-decomp-t1",
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true
    },
    {
      "call_id": "t1-asteraceae-delimited-out-off-reference",
      "tool": "paired_decomposition_test",
      "args": {
        "exclude_families": [
          "Asteraceae"
        ],
        "exclude_species": [
          "Achillea.collina",
          "Achillea.pannonica"
        ]
      },
      "expect": {
        "kind": "literal",
        "value": {
          "test": "Wilcoxon signed-rank (species-level, marcescent vs shed)",
          "W": 31.0,
          "z": -3.538258896420604,
          "p": 0.00040277492946397866,
          "rank_biserial_r": 0.7076517792841208,
          "median_M": 35.80286234,
          "median_S": 48.227262870000004,
          "mean_M": 38.48357375064,
          "mean_S": 52.12267266886666,
          "median_paired_diff": -8.917624199999999,
          "median_paired_diff_ci95": [
            -25.633731475000005,
            -3.328825893333331
          ],
          "mean_paired_diff": -13.639098918226669,
          "mean_paired_diff_ci95": [
            -19.788476492071666,
            -7.764752042675009
          ],
          "n_species": 25,
          "n_marcescent_slower": 21,
          "n_marcescent_faster": 4,
          "note": "Species treated as independent; a phylogenetic comparative model (PGLS) would refine this across the 39-species/multi-family sample."
        }
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "Drops the nine Asteraceae species as botanically delimited: the seven the source labels Asteraceae plus Achillea collina and A. pannonica, which the source files under Rosaceae. Asteraceae carries the three largest marcescent slow-downs in the sample. Without it T1 still holds (n = 25, p = 4.0e-04, 21 of 25 species slower), but the mean paired difference shrinks by about a quarter, from -18.0 to -13.6 pp, and the median from -16.4 to -8.9 pp. Leaving out any single family as labelled in the source never pushes p above 1.6e-04."
    },
    {
      "call_id": "t1-replicate-median-off-reference",
      "tool": "paired_decomposition_test",
      "args": {
        "aggregate": "median"
      },
      "select": "/p",
      "expect": {
        "kind": "literal",
        "value": 9.895279614262948e-06
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "Species medians of the replicate bags instead of means: p = 9.9e-06 against the published 7.2e-06. T1 does not depend on how the up-to-three bags per species are summarised."
    },
    {
      "call_id": "t1-bootstrap-seed-off-reference",
      "tool": "paired_decomposition_test",
      "args": {
        "boot_seed": 1
      },
      "select": "/mean_paired_diff_ci95",
      "expect": {
        "kind": "literal",
        "value": [
          -24.176193418444118,
          -12.511755257876718
        ]
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "Seed 1 instead of 0 gives a mean-difference CI of [-24.2, -12.5] against the published [-23.9, -12.4]. The first decimal of the CI reported in claim 1 is within the Monte Carlo error of the 5,000-draw bootstrap. The median-difference CI is identical at seeds 0, 1 and 2."
    },
    {
      "call_id": "t2-published",
      "tool": "functional_group_contrast",
      "args": {},
      "expect": {
        "kind": "published_pointer",
        "result_path": "/T2"
      },
      "recipe_id": "marcescence-decomp-t2",
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true
    },
    {
      "call_id": "t2-legumes-as-forbs-off-reference",
      "tool": "functional_group_contrast",
      "args": {
        "legumes": "with_forbs"
      },
      "select": "/p",
      "expect": {
        "kind": "literal",
        "value": 0.0012703508949337648
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "Counting the two legumes as forbs, as a two-way growth-form split would, gives U = 23, p = 0.0013 with 27 forbs. The functional-group contrast does not depend on the legume exclusion."
    },
    {
      "call_id": "t2-asteraceae-delimited-out-off-reference",
      "tool": "functional_group_contrast",
      "args": {
        "exclude_families": [
          "Asteraceae"
        ],
        "exclude_species": [
          "Achillea.collina",
          "Achillea.pannonica"
        ]
      },
      "select": "/p",
      "expect": {
        "kind": "literal",
        "value": 0.00957753602793312
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "Every grass is Poaceae, so T2 is also a family contrast. Dropping the nine botanically delimited Asteraceae from the forbs (16 left) raises p about fourteen-fold, from 0.0007 to 0.0096, and moves the forb mean difference from -23.1 to -19.1 pp. The contrast survives, but part of it is Asteraceae against Poaceae rather than forb against grass."
    },
    {
      "call_id": "t3a-published",
      "tool": "within_group_tests",
      "args": {},
      "expect": {
        "kind": "published_pointer",
        "result_path": "/T3a"
      },
      "recipe_id": "marcescence-decomp-t3a",
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true
    },
    {
      "call_id": "t3a-grass-exact-off-reference",
      "tool": "within_group_tests",
      "args": {
        "fgroups": [
          "Grass"
        ],
        "method": "exact"
      },
      "select": "/Grass/p",
      "expect": {
        "kind": "literal",
        "value": 0.296875
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "With seven grass species the exact null distribution is the appropriate one: p = 0.297 (38/128) against the published normal-approximation 0.237. The grass result stays non-significant."
    },
    {
      "call_id": "t3a-grass-replicate-median-off-reference",
      "tool": "within_group_tests",
      "args": {
        "fgroups": [
          "Grass"
        ],
        "aggregate": "median"
      },
      "select": "/Grass",
      "expect": {
        "kind": "literal",
        "value": {
          "W": 4.0,
          "p": 0.09096894797535773,
          "n": 7,
          "median_M": 41.28442719,
          "median_S": 45.494320125
        }
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "Species medians instead of means move the grass test to W = 4, p = 0.091. The grass null is sensitive to how three replicate bags are summarised, which supports claim 3's own reading of it as under-powered rather than a demonstrated absence of effect."
    },
    {
      "call_id": "t3b-published",
      "tool": "microbial_correlation",
      "args": {},
      "expect": {
        "kind": "published_pointer",
        "result_path": "/T3b"
      },
      "recipe_id": "marcescence-decomp-t3b",
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true
    },
    {
      "call_id": "t3b-shed-only-off-reference",
      "tool": "microbial_correlation",
      "args": {
        "littertypes": [
          "S"
        ]
      },
      "expect": {
        "kind": "literal",
        "value": {
          "test": "Spearman: microbial biomass Cmic vs decomposition (LossMass %)",
          "rho": -0.0012217470983506415,
          "p": 0.9951744467971656,
          "n": 27
        }
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "The most important call in this file. Within shed litter the association is absent: rho = -0.001, p = 0.995, n = 27. Claim 4 reports a positive correlation across all litter, but it holds only within marcescent litter (next call). Shed bags have both higher Cmic and higher mass loss than marcescent bags, so the pooled rho partly reflects the litter-type contrast itself."
    },
    {
      "call_id": "t3b-marcescent-only-off-reference",
      "tool": "microbial_correlation",
      "args": {
        "littertypes": [
          "M"
        ]
      },
      "expect": {
        "kind": "literal",
        "value": {
          "test": "Spearman: microbial biomass Cmic vs decomposition (LossMass %)",
          "rho": 0.4508064516129033,
          "p": 0.010922337972892757,
          "n": 31
        }
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "Within marcescent litter rho = 0.45, p = 0.011, n = 31. The pooled association is carried by this litter type."
    },
    {
      "call_id": "t3b-unique-keys-off-reference",
      "tool": "microbial_correlation",
      "args": {
        "duplicate_keys": "drop"
      },
      "expect": {
        "kind": "literal",
        "value": {
          "test": "Spearman: microbial biomass Cmic vs decomposition (LossMass %)",
          "rho": 0.43853630646083475,
          "p": 0.0009101894112848718,
          "n": 54
        }
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "Plantago media shed replicate 3 appears twice in both sheets, so the published inner join crosses two bags with two PLFA samples into four rows. Dropping every non-unique key leaves n = 54 and rho = 0.439, p = 0.0009: the double-counting does not drive T3b."
    },
    {
      "call_id": "multiplicity-published",
      "tool": "multiplicity",
      "args": {},
      "expect": {
        "kind": "published_pointer",
        "result_path": "/multiplicity"
      },
      "recipe_id": "marcescence-decomp-multiplicity",
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true
    },
    {
      "call_id": "multiplicity-split-t3b-off-reference",
      "tool": "multiplicity",
      "args": {
        "p_values": [
          0.000699376325071542,
          5.7563283693966916e-05,
          0.23672357063785732,
          0.010922337972892757,
          0.9951744467971656
        ]
      },
      "select": "/p4/holm_p",
      "expect": {
        "kind": "literal",
        "value": 0.03276701391867827
      },
      "rel_tolerance": 1e-06,
      "abs_tolerance": 1e-09,
      "enabled": true,
      "notes": "The declared family with T3b split into its two within-litter-type tests: T2, T3a-Forb, T3a-Grass, T3b-marcescent, T3b-shed. The marcescent association survives Holm at 0.033 (BH 0.018), and the shed one is 0.995 under either correction."
    }
  ]
}
