// lib/accounting/core/README.context-types.md

# Posting Context Types (WP-01)

## Purpose

- Defines the context contract for all posting operations
- Ensures all posting events have consistent metadata and audit fields
- Used in posting, migration, and audit scenarios

## Usage

- Use `PostingContext` for all posting event handlers and validation

## Example

```ts
const context: PostingContext = {
  event: AccountingEventType.PURCHASE_POSTED,
  documentId: 'PUR-123',
  postingType: 'purchase',
  postingSequence: 1,
  postingRuleVersion: 'v1',
  actorId: 'user-1',
  timestamp: new Date().toISOString(),
  status: 'posted',
};
```

---

> **Note:** Posting context is mandatory for all posting and migration scenarios.
