---
name: gaapclose-asc606
description: Deterministic US GAAP ASC 606 (Revenue Recognition) and ASC 340-40 (Contract Costs) close assistant and local calculator. Use for relative SSP allocation, multi-element SaaS waterfalls, prospective vs. cumulative catch-up contract modifications, principal vs. agent gross/net presentation, expected-value variable consideration, and capitalized sales commission schedules — 100% local with zero data uploads.
---

# GAAP Close — ASC 606 Local Skill Pack

Run deterministic US GAAP Topic 606 & Subtopic 340-40 calculations locally using Python's standard library (`decimal.Decimal` with `ROUND_HALF_UP`). Never upload confidential customer contracts or SaaS ARR ledgers to external cloud services.

## Authoritative Guardrails (FASB ASC 606 & ASC 340-40)

1. **5-Step Framework (`ASC 606-10-05-4`):** Identify contract (`25-1`), identify distinct performance obligations (`25-19`), determine transaction price (`32-2`), allocate by relative SSP (`32-31`), and recognize revenue upon transfer of control (`25-23`).
2. **Relative SSP Allocation (`ASC 606-10-32-31`):** Allocate bundle discounts proportionally across all distinct performance obligations unless observable evidence satisfies all three criteria in `32-37`.
3. **Contract Modifications (`ASC 606-10-25-12` to `25-13`):**
   - Separate contract (`25-12`) if distinct goods are added at SSP.
   - Prospective (`25-13(a)`) if remaining goods are distinct but not at SSP (zero Day-1 catch-up).
   - Cumulative catch-up (`25-13(b)`) if remaining goods are not distinct (immediate Day-1 revenue adjustment).
4. **Principal vs. Agent (`ASC 606-10-55-36A` to `55-39`):** Assess control before transfer using three indicators (primary responsibility, inventory risk, pricing discretion). Credit risk is **not** an indicator.
5. **Capitalized Commissions (`ASC 340-40-25-1`, `35-1`):** Capitalize incremental sales commissions + direct payroll taxes; expense non-incremental legal/RFP costs (`25-3`). Amortize over the expected customer benefit period including non-commensurate renewals.

## Deterministic Local CLI (`scripts/asc606_calc.py`)

```bash
python3 scripts/asc606_calc.py ssp --price 120000 --saas 100000 --impl 30000 --support 20000
python3 scripts/asc606_calc.py modify --mode prospective --orig-price 120000 --recognized 60000 --add-price 48000 --rem-months 12
python3 scripts/asc606_calc.py modify --mode catchup --orig-price 500000 --recognized 250000 --add-price 100000 --cost-incurred 200000 --rev-total-cost 500000
python3 scripts/asc606_calc.py principal-agent --gross 100000 --supplier 82000 --role agent
python3 scripts/asc606_calc.py commission --commission 20000 --payroll-tax 2000 --legal 5000 --benefit-years 4
```

*General information only, not accounting, audit or tax advice. Always verify against the current FASB Accounting Standards Codification and consult your auditors.*
