// lib/accounting/core/README.governance.md

# Governance & Safety Gates (WP-01)

## Governance Principles

- All posting, extraction, and migration logic must depend on the contracts in this directory.
- No direct DB writes or legacy posting allowed outside these contracts.
- All event types must be registered and versioned.
- All journal entries are immutable and hash-chained.
- All dimension validation and open balance logic must use these contracts.
- Feature flags must be used to gate new features and migrations.
- Golden matrix tests are mandatory for all posting scenarios.

## Safety Gates

- No extraction or migration may begin until this layer is fully implemented and validated.
- All posting events must pass core validation rules before posting.
- All reversals must be handled via event registry and reversal strategy.
- All FX revaluations must snapshot currency and precision.
- All open balance calculations must use the open balance engine.
- All posting must be idempotent and auditable.

---

> **Note:** These rules are mandatory for all future development and migration work.
