{
  "manifest_version": "0.1",
  "work_slug": "behavioural-ecology-seabird-foraging-facilitation",
  "protocol": "protocol:secondary-analysis 0.1",
  "module": "agent/tools.py",
  "analysis_unit": "analysis.py",
  "published_results": "results.json",
  "source_dataset_doi": "10.5061/dryad.5q04b32",
  "environment": {
    "language": "python",
    "tested_version": "3.13",
    "requirements": "requirements-reproduction.txt",
    "network": "deny-except-pinned-inputs"
  },
  "execution": {
    "boundary": "docs/72-reproduction-contract.md",
    "live_invocation": "not connected; the sandboxed runner gates execution over MCP"
  },
  "tools": [
    {
      "name": "dataset_summary",
      "summary": "Size and provenance of the analysis frame after the exposure filter.",
      "unit": "analysis.fetch plus the elapsed > 0 filter in analysis.main",
      "parameters": [],
      "returns": "zenodo id, md5, n_bouts, n_birds",
      "supports_claims": [1, 2],
      "deterministic": true
    },
    {
      "name": "mode_effect",
      "summary": "Catch-rate effect of foraging interaction mode (T1).",
      "unit": "analysis.main: Poisson GEE with a log(elapsed) offset, clustered by bird ID",
      "parameters": [
        {
          "name": "reference",
          "type": "string",
          "default": "surface",
          "range": "surface | flight",
          "published_values": ["surface"],
          "notes": "Inverting the baseline inverts the reported rate ratio, which checks the effect is a property of the data and not of the coding."
        }
      ],
      "returns": "log_rate_ratio, se, rate_ratio, ci95, p",
      "supports_claims": [1],
      "deterministic": true
    },
    {
      "name": "conspecific_effect",
      "summary": "Catch-rate effect per additional conspecific penguin present (T2).",
      "unit": "analysis.main: the conspmax term of the same Poisson GEE",
      "parameters": [],
      "returns": "log_rate_ratio, se, rate_ratio, ci95, p",
      "supports_claims": [2],
      "deterministic": true
    },
    {
      "name": "equivalence_mode",
      "summary": "TOST equivalence of the mode effect within a rate-ratio margin (T3a).",
      "unit": "analysis.tost",
      "parameters": [
        {
          "name": "margin_rate_ratio",
          "type": "number",
          "default": 1.5,
          "range": "> 1",
          "published_values": [1.5],
          "notes": "The margin is what turns a non-significant result into equivalence within a stated bound, so it is the interpretive knob."
        }
      ],
      "returns": "margin_rate_ratio, p_tost, equivalent_at_0.05",
      "supports_claims": [1, 3],
      "deterministic": true
    },
    {
      "name": "robustness",
      "summary": "Negative-binomial and per-bird aggregate refits of both effects (T3b).",
      "unit": "analysis.main: NB GLM plus the per-ID aggregate Poisson GLM",
      "parameters": [
        {
          "name": "nb_alpha",
          "type": "number",
          "default": 1.0,
          "range": "> 0 negative-binomial dispersion",
          "published_values": [1.0],
          "notes": "The published run fixes dispersion at 1.0; varying it shows how far the conclusions depend on that choice."
        }
      ],
      "returns": "nb_glm and per-ID p-values and rate ratios for the mode and conspecific terms",
      "supports_claims": [2, 3],
      "deterministic": true
    },
    {
      "name": "multiplicity",
      "summary": "Benjamini-Hochberg and Holm correction over a family of p-values.",
      "unit": "analysis.bh_holm",
      "parameters": [
        {
          "name": "p_values",
          "type": "array of number | null",
          "default": null,
          "range": "any non-empty list of p-values in [0, 1]; null uses the declared family {T1, T2}",
          "published_values": [null],
          "notes": "Accepting an arbitrary family lets a reader ask what the correction would be over a different set of tests."
        }
      ],
      "returns": "raw_p, bh_p and holm_p per member of the family",
      "supports_claims": [1, 2],
      "deterministic": true
    }
  ]
}
