1---2name: self-attempt-01-363description: Crescent Arts Collective — Finance Ops Reporting4---5# Crescent Arts Collective — Finance Ops Reporting67## Environment & API8- Always use the remote base URL from `environment_access.md` (`GDPEVO_ENV_BASE_URL`). Do not use localhost or `127.0.0.1` even if staged JSON files list them.9- Do not read, list, or enter any `env/` source directory. Interact only with the remote API.1011### Endpoint families12| Domain | Endpoints |13|---|---|14| Finance | `/api/finance/branches`, `/api/finance/period-map`, `/api/finance/accounts`, `/api/finance/records` |15| Compensation | `/api/compensation/rate-book`, `/api/compensation/rosters`, `/api/compensation/scenarios` |16| Payroll | `/api/payroll/rate-book`, `/api/payroll/productions` |1718## General workflow191. Read `environment_access.md` to get the true remote base URL.202. Read `payloads/request_memo.json` to extract targets (branch/region/ensemble/production IDs, periods, years, scenario ID).213. Read `payloads/answer_template.json` to identify required top-level keys, field types, and ordering rules.224. Fetch all necessary data from the relevant Finance Ops endpoints.235. Compute derived values, apply rounding, sort/order collections, and assemble a **single JSON object** matching the template exactly.2425## Rounding26- **Currency**: round to **2 decimals**.27- **Percent / ratio fields** (e.g., `revenue_growth_pct`, `ebitda_margin`, `growth_rates`): round to **4 decimals** as decimal values (e.g., `0.1234` for 12.34%).2829## Ordering & ID conventions30- Lists of IDs (`branch_ids`, `branch_ids` in region context, etc.) must be **ascending** (stable sort) unless a rank field explicitly states otherwise.31- `per_musician` arrays must be ordered by `musician_id` ascending.32- `conflict_flags` must be sorted **alphabetically**.33- `pay_types` must follow the order returned by the rate book.3435## Financial calculation rules36- `gross_margin = revenue - cogs`37- `ebitda = gross_margin - sga - allocations`38- `ebitda_margin = ebitda / revenue`39- Growth percentages: `(current - prior) / prior`40- Period convention mapping (from period-map):41 - `M1`–`M12` → first fiscal year (e.g., FY2024)42 - `M13`–`M24` → second fiscal year (e.g., FY2025)43- Regional reconciliation: sum branch-level values and compare to region total; report variance as `region_reconciliation_variance`.4445## Ranking rules46- `*_rank_desc` fields: **1 = highest / best**.47- `top_*_branch_id` = branch with highest value.48- `bottom_*_branch_id` = branch with lowest value.49- `largest_pay_type` = pay type with the highest annual total.50- `largest_growth_pay_type` = pay type with the highest growth rate.51- `top_paid_musician_id` = musician with the highest total pay.5253## Compensation specifics54- Pay type enum values (exact strings):55 - `Minimum Weekly Scale`56 - `Titled Position Premium`57 - `Seniority`58 - `Overscale`59- `combined_overscale_employee_count` = count of employees with any overscale amount > 0.60- `partial_quarter_employee_count` = count of employees with partial service in any quarter.61- Quarter totals: `Q1`, `Q2`, `Q3`, `Q4` must sum to the annual total.6263## Payroll specifics64- Service types map to pay categories; aggregate into:65 - `performance`, `audit`, `rehearsal`, `sound_check`, `premium`, `doubles`, `vacation`, `guarantee_adjustment`, `substitute_adjustment`66- Conflict flag enum values (exact strings):67 - `REHEARSAL_EARLY_START`68 - `REHEARSAL_LATE_END`69 - `SERVICE_OVER_TIME_LIMIT`70 - `SOUND_CHECK_DURATION_MISMATCH`71- `category_totals` and `per_musician.categories` should include only **nonzero** categories where applicable (follow template instructions).7273## Output compliance74- Return exactly **one JSON object**.75- Include **all required top-level keys** from `answer_template.json`.76- Use the field types specified in the template (currency, integer, decimal percent, string, list, object).77- Do not include extra commentary or keys outside the template unless explicitly allowed.