# Accounting Context Runtime Prototype

Local-first prototype for always-on close preparation for vendor spend.

The app watches a seeded Accounting Inbox, runs deterministic runtime jobs, creates accrual/prepaid accounting cases, prepares schedules and draft JE lines, enforces review controls, and exports workpaper artifacts.

## Run

From this folder:

```powershell
npm start
```

Then open:

```text
http://localhost:4177
```

No ERP connector, model API key, or external service is required.

## Screens

- Accounting Inbox: seeded artifacts, classification, vendor linking, extraction status, linked cases.
- Close Prep Queue: accounting cases by status, treatment, evidence completeness, and exception flags.
- Case Review: evidence, extracted terms, proposed treatment, prepared schedule, draft JE, controls, exports, and audit trail.

## Seed Scenarios

- Open PO / missing invoice accrual
- Vendor renewal prepaid
- Invoice without support
- Low-dollar no-entry-needed case
- Duplicate accrual risk

## Controls Implemented

- Approved treatment required before compile
- Duplicate accrual risk blocks compile
- Material low-evidence cases block compile
- Generated entries must balance
- Case actions write audit events
- Compiled exports link back to the case

## Exports

Approve and compile a case from Case Review, then download:

- prepared schedule CSV
- draft JE CSV
- workpaper HTML packet

## Reset

Use `Reset Seed` in the app to restore the initial seeded state.
