# Subagent Output Contract: Receipt Discipline for Agent Dispatch — Research Notebook

## Question (pre-registered, dated)

[2026-08-21] What does output contract discipline add to subagent dispatch when every file-producing subagent prompt must include output path, naming convention, sibling context, verification step, claim discipline, and return format — and the parent independently verifies after return?

## Method (pre-declared, before any data/derivation)

Case study plus failure-mode analysis. Start from the three-faculty dispatch incident (path drift, unverifiable line count, naming inconsistency), extract the failure modes, map them to the MAST taxonomy (Cemri et al. 2025), and propose the six-section output contract as the receipt discipline. Compare against NabaOS (Basu 2026) as the cryptographic version of the same principle. Keep the scope bounded to file-producing subagent dispatch; do not claim generality beyond this without controlled experimentation.

## Predictions (timestamped BEFORE observations)

[2026-08-21] The strongest contribution will be the "self-contained gap" finding: existing dispatch literature says "self-contained" but never defines what self-contained MUST include when the subagent writes files. This is the novel observation that distinguishes this paper from a mere "add verification to your prompts" recommendation.

[2026-08-21] The most likely reviewer objection is that the contract is advisory, not enforced — a parent agent can ignore it. The paper should address this by comparing to NabaOS (cryptographic enforcement) and arguing that the advisory contract is the deployable layer when cryptographic enforcement is not available.

[2026-08-21] The line-count discrepancy (979 vs 535, 83% overcount) will be the most instructive single data point: it demonstrates that the failure is not in the work product but in the self-reporting of the work product. The subagent produced a high-quality 158KB document; it just couldn't accurately report how many lines it had.

[2026-08-21] The MAST mapping will be the strongest academic grounding. Path drift = MAST category (i) specification failure. Unverifiable claims = MAST category (iii) task verification failure. The MAST finding that "improved specification" alone is insufficient validates the two-layer approach (pre-dispatch + post-return).

## Observations (append-only, dated)

[2026-08-21] Three `subagent_general` dispatches launched to build faculty documents for ARCANA Academy. All three received detailed substantive prompts but no output contract.

[2026-08-21] File locations after dispatch:
- Kitchen & Table: `C:\Users\reuben\kitchen-table-faculty.md` (145,614 bytes, hyphens)
- Religion & Ritual: `C:\Users\reuben\project\religion_ritual_faculty.md` (101,248 bytes, underscores)
- Death & Mortality: `C:\Users\reuben\project\death_mortality_faculty.md` (158,633 bytes, underscores)

[2026-08-21] Line count discrepancy: Death & Mortality subagent reported 979 lines. `Measure-Object` returned 535 lines. 83% overcount (444 lines).

[2026-08-21] Section structure verified: `Select-String -Pattern "^## "` returned 18 headings (§0-§16 + Emergent Gaps). Subagent claimed "16 sections + Emergent Gaps" — accurate.

[2026-08-21] arXiv sweep completed across 6 topics: Campbell monomyth, agent verification, multi-agent failure, cognitive memory, pedagogical architecture, WEIRD bias. 7 key papers identified, 28 total references. Citation gate: 18 citations, 14 verified via arXiv direct fetch, 0 fabricated, 4 canonical-pass. Ledger entry `clp-1de570615a3d` posted.

[2026-08-21] Candidate rule `rules/subagent-output-contract.md` filed in apex-nexus repo. PR #62 created. Research doc `docs/research/2026-08-21_subagent-output-contract.md` committed.

[2026-08-21] Faculty files reconciled: all three copied to `PROJECTS/arcana/faculties/` with consistent `snake_case_faculty.md` naming. Originals retained pending operator confirmation.

## Interpretation (separated from Observations)

[2026-08-21] The failure is structural, not individual. The subagent behaved correctly given the specification it received — it produced a high-quality document. The specification was defective: it lacked the output contract. This maps cleanly to MAST category (i) specification failure.

[2026-08-21] The line-count overcount is the same pattern as the intel-surge batch-47 false self-attestation (dod_check reporting 15-30 sources when actual was 0) and the PR #498 unverified causal claim (AAR claimed a hook that didn't exist). Three incidents, one pattern: agents self-report without tool receipts when not explicitly required to produce them. The fix is structural — require receipts, verify after return.

[2026-08-21] The "self-contained gap" is the novel observation. Existing dispatch rules say "self-contained" but mean "include all task context." They never mean "include all output contract requirements." This is the gap that the six-section contract fills. It is not a new verification framework; it is the missing specification layer that existing frameworks assume but do not define.

[2026-08-21] NabaOS (Basu 2026) is the cryptographic version of what we propose as an advisory rule. The two are complementary: NabaOS provides runtime enforcement where the runtime is modifiable; the output contract provides prompt-level specification where the runtime is not modifiable (e.g., third-party agent frameworks). The epistemic classification (pratyakṣa/anumāna/śabda/abhāva/ungrounded) is a more rigorous version of our binary "tool receipt vs estimate" — a potential upgrade path for CLAIM_DISCIPLINE.

## Dead ends (failed attempts, also first-class)

- [2026-08-21] Considered proposing a pre-dispatch validator script that checks the prompt for all six sections before `run_subagent` is called. Deferred because the candidate rule is advisory first; the validator is future work once the rule is validated.

- [2026-08-21] Considered claiming that the contract generalizes to `subagent_explore` (read-only). Deferred because read-only subagents don't write files, so OUTPUT_PATH and NAMING_CONVENTION don't apply. A lighter version (CLAIM_DISCIPLINE + RETURN_FORMAT only) might work, but this is an open question, not a claim.

- [2026-08-21] Considered running a controlled experiment (3 dispatches with contract, 3 without) before drafting. Rejected because the incident is the case study; the controlled experiment is the evaluation plan, not the seeding artifact.

## Open questions

- Can the six-section contract be validated automatically?
- Does the contract generalize to read-only subagents?
- What is the distribution of line-count discrepancies across dispatches?
- Should CLAIM_DISCIPLINE adopt NabaOS's five-source epistemic classification?
- Should this be unified with the AAR causal-claim verification rule?
- What is the minimum sample size for a controlled experiment?

## Cross-references

- Sibling paper: Experiment Receipt Discipline for Small-Model Autoresearch (Bowlby 2026)
- Candidate rule: apex-nexus PR #62 (`rules/subagent-output-contract.md`)
- Incident report: apex-nexus `docs/research/2026-08-21_subagent-output-contract.md`
- arXiv sweep: apex-nexus `docs/research/2026-08-21_arxiv-sweep-arcana-subagent-contract.md`
- Cognitive ledger: `clp-1de570615a3d`
- Prior incident (same pattern): `loop-ledger/AAR_intel-surge-batch-47-validator_2026-07-31.md`
- MAST paper: arXiv:2503.13657
- NabaOS paper: arXiv:2603.10060
- Publication readiness gate: `docs/publication-gate/v0.1/PUBLICATION_READINESS_GATE.md`

## Evidence audit — 2026-10-10 (append-only correction)

**Method/provenance:** Inspected an author-accessible local copy of the incident report in an `agents` checkout, SHA-256 `2ae378b8be91455e1ab3eebf76b01574e6a25ed540acde4c539dd27395755cb9`. The copy is untracked; a historical log reference did not establish that its current bytes belonged to a resolvable source commit. The original prompts, return messages, and incident-time faculty files were not independently recovered. The earlier headings and outcome-aware "Predictions" do not establish preregistration.

**Observed corrections:** The source location table has two distinct directories, not three. Two files use underscores and one hyphens, but a compliance rate cannot be assigned without a prespecified naming rule. The source reports 979 lines claimed versus 535 from `Get-Content | Measure-Object -Line` and simultaneously lists a heading at physical line 869. These cannot establish 535 total physical lines for an unchanged file under the same counting definition. The previous 83% overcount claim is withdrawn as an established finding; 444/535 is only the arithmetic of two unresolved measurements.

**New synthetic observation:** On PowerShell 7.6.6, `@('a', '', 'b') | Measure-Object -Line` returned 2, although the input has three strings. Different treatment of empty lines is a plausible mechanism, not a demonstrated explanation of the historical discrepancy. Other possibilities include revision changes or transcription errors. The 979 claim has not been verified either.

**Section-count correction:** The listed sections 0–16 plus Emergent Gaps produce 18 headings. "16 sections + Emergent Gaps" is ambiguous if the prologue is excluded; it is not an exact all-heading count. The earlier statement of unqualified accuracy should be read with this correction. Content-quality praise in the incident report is an author judgment, not a blinded evaluation.

**Interpretation:** The case motivates a measurement contract and independent snapshot verification, but does not establish fabricated metrics or the proposed rule's effectiveness. Missing instructions are compatible with placement ambiguity; they do not prove a causal mechanism or a universal deficiency in dispatch literature. A cryptographically authenticated receipt can still measure the wrong quantity or file version.

**Changes and checks:** Revised the manuscript and added `measurement_protocol.md`, `measure_file.py`, and four synthetic semantic checks for empty files, LF/CRLF/BOM, empty/whitespace lines, and unsupported encoding/endings. All four checks passed in the author environment. They test measurement semantics, not subagent behavior. Verified MAST v3 and NabaOS v1 primary-source metadata; explicitly bound their findings to their own datasets and removed unused/unverified references. Added a factorial future-evaluation design that separates prompt specification from parent verification and records cost, false acceptance, claim coverage, and missing evidence. Existing PDF and deposit metadata remain unchanged historical artifacts.
