# README

<!-- This section should contain the following subsections in order: -->
<!-- 1. ## Overview (required) -->
<!-- 2. ## Key Features (required) -->
<!-- 3. ## Module Scope (required) -->
<!-- 4. ## Module Dependencies (required) -->

## Overview

The accounting-event module records accounting events emitted by source modules.
It is the durable handoff point between operational documents, such as payable documents
or inventory cost events, and application-owned handlers that decide how those events
are resolved.

The module does not own journal entries, external accounting destinations, or adapter
payload semantics. Handler execution, routing, retry state, and destination-specific
resolution records are intentionally outside the current module contract.

## Key Features

- Immutable accounting event records with JSON-encoded source snapshots
- Source-module command for posting accounting events into the handoff store
- Top-level event kind and schema version for handler routing
- Standard account payable recognition event contracts

## Module Scope

### In Scope

- Accounting event intent snapshots emitted by source modules
- Company scoping for accounting events
- JSON-encoded handler payload snapshots

### Out of Scope

- General ledger ownership, journal entries, accounting periods, and posting rules
- Destination selection, external API semantics, and adapter-specific payload conversion
- Handler registration, durable execution job storage, retry orchestration, and resolution records
- Source document correction or override behavior

### Scope Decision Rationale

Accounting events should not be modeled as generic journal entries. AP bills, vendor
credits, COGS recognition, and valuation adjustments may resolve to different internal or
external accounting documents. This module captures the source intent without deciding the
destination.

Application-owned handlers remain responsible for translating the event into Tailor
internal records or external API payloads. The accounting-event module only records the
source event snapshot.

## Module Dependencies

- `organization` - Company scope for accounting events
