1---2name: self-attempt-03-353description: Crescent Finance Ops API — Reporting & Forecasting Skill4---5# Crescent Finance Ops API — Reporting & Forecasting Skill67## Remote API Entrypoint8- **Always use** `GDPEVO_ENV_BASE_URL=http://34.46.77.124:8009` as the authoritative base URL.9- **Override rule:** If `payloads/environment_access.json` lists `http://127.0.0.1:8047` or any localhost reference, ignore it and use the remote URL above.10- Do **not** start local env services, run `env/setup.sh`, or read any `env/` source directory.1112## Available Endpoints by Domain13- **Finance:** `/api/finance/branches`, `/api/finance/period-map`, `/api/finance/accounts`, `/api/finance/records`14- **Compensation:** `/api/compensation/rate-book`, `/api/compensation/rosters`, `/api/compensation/scenarios`15- **Payroll:** `/api/payroll/rate-book`, `/api/payroll/productions`1617## Request Workflow181. Read `payloads/environment_access.json` (note endpoints), `payloads/request_memo.json` (filters, IDs, focus areas), and `payloads/answer_template.json` (required keys and types).192. Query the relevant endpoints. Aggregate, filter, and calculate in memory.203. Return **exactly one JSON object** matching the `answer_template.json` schema.2122## Rounding & Formatting Rules23| Field Type | Rule |24|---|---|25| Currency | Round to **2 decimals** (e.g., `1234.50`). |26| Decimal percent / ratio | Round to **4 decimals** (e.g., `0.1523`). |27| Integer | Return as whole number. |28| String | Exact case as defined in enums/templates. |29| Lists | Use **ascending stable IDs** unless a `rank_desc` or explicit ordering rule states otherwise. |3031## Period & Fiscal-Year Conventions32- `M1`–`M12` map to the first fiscal year (e.g., FY2024).33- `M13`–`M24` map to the next fiscal year (e.g., FY2025).34- When a template asks for `period_convention`, include `M1_to_M12`, `M13_to_M24`, `current_month`, and `prior_month` labels.3536## Calculation Patterns37- **Gross margin:** `revenue - cogs`38- **EBITDA margin:** `ebitda / revenue` (decimal percent, 4 decimals)39- **Growth percent:** `(current - prior) / prior` (decimal percent, 4 decimals)40- **Rankings:** `rank_desc` means `1` is highest/best; rank in descending order of the metric.41- **Regional reconciliation variance:** typically `region_total - sum(branch_totals)` or the absolute residual; return as currency (2 decimals).4243## Compensation & Payroll Conventions44- **Pay types enum:** `Minimum Weekly Scale`, `Titled Position Premium`, `Seniority`, `Overscale`.45- **Quarters:** `Q1`, `Q2`, `Q3`, `Q4`.46- **Overscale / partial-quarter counts:** derive from roster flags and return as integers.47- **Per-musician arrays:** order by `musician_id` ascending.48- **Conflict flags:** sort alphabetically using the enum values (`REHEARSAL_EARLY_START`, `REHEARSAL_LATE_END`, `SERVICE_OVER_TIME_LIMIT`, `SOUND_CHECK_DURATION_MISMATCH`).4950## Output Pitfalls51- Do **not** omit any `required_top_level_keys` from `answer_template.json`.52- Return a **single JSON object**, not an array or wrapped structure.53- Match enum values exactly; do not paraphrase pay-type names or flag strings.54- When a field is marked `"currency when applicable"`, omit the key if the value is zero/not applicable; otherwise provide the rounded currency value.55- Ensure branch ID lists are sorted ascending unless the template explicitly asks for rank-based ordering.