{
  "class_version": "nt-crossing-class:v0",
  "id": "finance.ledger-posting",
  "version": "0.1.0",
  "title": "Automated ledger posting",
  "domain": "finance operations",
  "evidence_status": "proposed",
  "summary": "An agent proposes a journal entry that moves the ledger from one balance to the next. The invariant is double-entry conservation. Synthetic specification; no auditor has reviewed it.",
  "state_fields": {
    "before": ["ledger_id", "period"],
    "proposed": ["ledger_id", "period", "postings"]
  },
  "action_types": ["post_journal_entry"],
  "policy": {
    "id": "nt-policy:ledger-posting",
    "version": "0.1.0",
    "authored_by": "Neverthought (illustrative class policy; not an accounting standard)",
    "parameters": {
      "max_delegation_depth": 2,
      "evidence_max_age_days": 90
    },
    "note": "Parameter values are illustrative."
  },
  "invariants": [
    {
      "id": "double_entry",
      "label": "Debits equal credits (postings sum to zero)",
      "measure": "double_entry_balance",
      "params": { "field": "postings" },
      "tolerance": 0
    }
  ],
  "evidence_requirements": [
    { "subject": "source_document", "min_tier": "E2", "required_to_resolve": "Attach the invoice, contract or bank record the entry is based on." }
  ],
  "authority_requirements": { "independent_trust_root": true, "segregation_of_duties": true },
  "archetypes": [
    "RA-IRREVERSIBLE-COMMITMENT", "RA-HIDDEN-COUPLING", "RA-ACCUMULATION", "RA-EXPIRED-EVIDENCE",
    "RA-AUTHORITY-DRIFT", "RA-SELF-CERTIFICATION", "RA-UNWARRANTED-EXECUTION"
  ],
  "descriptors": {
    "stake": "material",
    "action": "reversible",
    "authority_kind": "explicit",
    "freshness": "bounded"
  },
  "profiles": {
    "recorder": "nt-receipt-chain:v0 (this site's chain; not CER-17)",
    "underwriting": "nt-underwritability-conditions:v0 (conditions document; not UW-12)"
  },
  "consequence": {
    "bound": "bounded",
    "ceiling": "The absolute value of the entry's postings (direct misstatement only)",
    "rationale": "A single posting misstates the ledger by at most its own amounts. Consequences in downstream reporting, tax or audit are outside this bound and are not declared here."
  },
  "consequence_paths": [
    {
      "id": "misstatement",
      "description": "The ledger is misstated by the entry's amounts."
    },
    {
      "id": "reversal_cost",
      "description": "A reversing entry and its review cost."
    }
  ],
  "structural_tests": [],
  "failure_mode": {
    "mode": "fail-closed",
    "rationale": "The entry is not posted unless the gate returns EXECUTE."
  },
  "underwritability": {
    "what_an_underwriter_would_need": [
      "A receipt for every automated posting, issued before the period closes.",
      "Evidence of segregation between preparer and approver.",
      "Count of postings executed without an EXECUTE determination.",
      "Concentration of postings on a single model or vendor."
    ],
    "conditions": [
      "Every posting balances exactly.",
      "Preparer and approver are different principals.",
      "Source documents are independently retrievable."
    ],
    "exclusions": [
      "Postings executed while held.",
      "Postings approved by their preparer."
    ]
  },
  "non_claims": [
    "Not an accounting standard or audit opinion.",
    "Balancing is necessary, not sufficient, for a correct entry."
  ]
}
