Credit Office
Overview
The credit-office API serves branch loan portfolios, pending applications, sector exposures, branch metrics, FDIC/NCUA benchmarks, credit-union segments, and a single credit policy endpoint. Every task type in this domain follows the same pattern: fetch the policy and relevant branch or segment data, apply policy rules to compute derived values (risk ratings, scores, concentrations, stress results), and produce a committee-ready JSON answer shaped by a provided answer template.
General Workflow
1. Fetch policy and branch/segment data
Always start with two parallel calls:
GET /api/policies — the authoritative rule source for ratings, scoring, stress formulas, and concentration limits.
GET /api/branches/{branch_id} or GET /api/credit-union-segments/{segment_id} — the target entity.
Then fetch the supporting data needed for the specific task: loans, applications, sector exposures, metrics, benchmarks. Use the most recent metrics quarter where applicable.
2. Apply policy rules
Compute derived values — risk ratings, CDFI factor scores, CRE weighted scores, stressed DSCRs, concentration ratios — using the formulas in the policies response. Read references/policy.md for the complete rule tables and formulas. Read references/api.md for endpoint details and field descriptions.
3. Produce JSON output
Every task provides an input/payloads/answer_template.json that defines the required output shape, field types, enums, precision, and sort order. Follow it exactly. All numbers at precision 2 or 4 as specified; all lists sorted as specified; all string fields drawn from the template's allowed enums. Do not add narrative text outside the JSON.
Workflow Patterns
Rating Migration Review
Prompt keywords: "rating migration", "regrade", "risk-rating review", "NPA benchmark"
- Fetch branch loans, metrics, policies, and FDIC benchmarks.
- Filter loans to those with
current_rating >= target_current_rating_min (stated in prompt or default to 3).
- Re-derive the final rating for each target loan using the dominant factor rule.
- Identify material downgrades (
final_rating - current_rating >= 2).
- Assign watch-list actions by final_rating band.
- Compute NPA benchmark variance against the relevant FDIC metric.
- Identify the top problem credit (highest exposure among worst-rated loans).
Lending Committee Allocation
Prompt keywords: "allocation package", "lending committee", "pending applications"
- Fetch branch applications, metrics, sector exposures, and policies.
- Score applications with policy flags; decline any with automatic decline criteria.
- Rank surviving applications by priority (consider DSCR, relationship strength, FICO, years in business).
- Allocate capacity in priority order, checking sector concentration before each approval.
- For concentration breaches, either apply mitigation (
participation_required) or decline with sector_breach.
- Record decline reason codes per the template enums.
- Compute post-approval sector concentrations.
Credit Union Segment Posture
Prompt keywords: "credit-union segment", "posture page", "NCUA", "segment_id"
- Fetch the segment, NCUA benchmarks, policies, and the branch record for the CU.
- Extract NC, US, and peer state rows from the NCUA benchmark table.
- Compute peer median for each metric.
- Compare NC vs US and NC vs peer median directionally.
- Recommend posture based on capacity and external risk signals.
- Populate controls, checklist gates, escalation triggers using the segment's
minimum_checklist and internal_context.
Watch-List Stress and Workout
Prompt keywords: "watch-list stress", "adverse-rated", "workout", "CDFI risk class"
- Fetch branch loans (filter to
current_rating >= 6), policies, and metrics.
- Compute CDFI factor score and risk class for each adverse loan.
- For loans with DSCR available, compute +200bp stressed DSCR.
- Flag loans that breach the 1.00 threshold after stress.
- Build workout queue sorted by descending exposure.
- Count severe buckets: group by
current_rating and payment_status.
Competing CRE Decision
Prompt keywords: "competing", "CRE", "two applications", "weighted score"
- Fetch branch applications (filter to the two specified), loans, sector exposures, metrics, policy, and FDIC benchmarks.
- Compute the weighted 5-Cs score for each CRE application.
- Run dual-stress on both applications.
- Evaluate CRE concentration: existing CRE exposure plus each candidate's requested amount against
cre_policy_limit_pct.
- Compare branch delinquency to the relevant FDIC benchmark.
- Select the stronger credit; give the unselected a disposition with reason codes.
Computation Rules
All computation rules live in the policies API response. Read references/policy.md for the full reference including:
- Risk rating derivation (dominant factor rule with DSCR/LTV/delinquency tables)
- CDFI factor scoring (FICO, LTV, liquidity_months, debt_to_asset)
- CRE weighted 5-Cs scoring with component weights
- Stress formulas (+200bp watch-list and CRE dual-stress)
- Capacity and concentration rules
Do not hardcode policy values from train examples; always fetch the live /api/policies response and use its values.
Output Precision and Sort Order
Read the answer template carefully:
- Dollar amounts: round to 2 decimal places.
- Ratio/percentage values: round to 4 decimal places (if specified) or 2 decimal places.
- Integer values (loan counts, ratings, scores): use integers.
- Lists: sort as the template specifies (typically ascending by id, rating, or sector).
- Enum values: use only the allowed values listed in the template for each field.
- Include all required keys even when empty (empty lists as
[], zero values as 0 or 0.0).
Key Policies Endpoint Fields
Always read the live /api/policies response, but these are the stable top-level keys to expect:
risk_rating — DSCR thresholds, LTV thresholds, delinquency minimums, dominant factor rule, material downgrade notch count
cdfi_factor_scores — factor tables and risk class mapping
cre_weighted_score — component weights and score class ranges
stress — formulas, breach thresholds
capacity_concentration — capacity field names, allowed mitigations
Branch Data Sources
For a branch task, the data you typically need:
| Data |
Endpoint |
| Branch info |
GET /api/branches/{branch_id} |
| Loan portfolio |
GET /api/branches/{branch_id}/loans |
| Applications |
GET /api/branches/{branch_id}/applications |
| Sector exposures |
GET /api/branches/{branch_id}/sector-exposures |
| Metrics |
GET /api/branches/{branch_id}/metrics |
| Policy |
GET /api/policies |
| FDIC benchmarks |
GET /api/benchmarks/fdic/q4-2024 |
| NCUA benchmarks |
GET /api/benchmarks/ncua/q1-2025 |
For a segment task, start with GET /api/credit-union-segments/{segment_id} plus the NCUA benchmark endpoint and the branch record for the related CU (use the branch list to find it).
Common Pitfalls
- Don't skip the policy call. Every computation depends on values from
/api/policies. Fetch it first.
- Factor availability. DSCR, LTV, FICO, liquidity_months, debt_to_asset can all be null. When null, omit that factor from rating derivation and substitute score 0 for scoring.
- Capacity arithmetic.
committed_capacity_amount differs from approved_amount only for participation_required approvals, where committed = approved_amount * (1 - sba_guaranty_pct). Otherwise they are equal.
- Quarter selection. Always use the most recent quarter from branch metrics (e.g.,
2025Q1 over 2024Q4).
- Concentration post-approval. Compute against the new total loans outstanding, which is
existing_total_loans + sum(approved_amounts).
- Grandfathering. A sector with
grandfathered == 1 means its existing over-limit exposure is tolerated, but you cannot approve more in that sector without mitigation.
- Template precision. Check the template's numeric_precision or precision fields. Dollar amounts are always rounded to 2 decimals. Ratios are rounded as specified (usually 4 decimals for pct fields).
1---2name: credit-office-33description: "Credit committee analysis for a shared credit office REST API. Covers risk-rating regrades, lending-committee allocations, credit-union segment posture reviews, watch-list stress testing, and competing CRE decisions. Use when the task involves any branch-level or segment-level credit analysis against the credit office API — including portfolio rating migration, application scoring, concentration checks, FDIC benchmark comparisons, NCUA peer analysis, CDFI factor scoring, DSCR stress tests, or committee-ready JSON reporting."4metadata:5 source: https://skillmd.com/skills/prism-shadow/credit-office-36---78# Credit Office910## Overview1112The credit-office API serves branch loan portfolios, pending applications, sector exposures, branch metrics, FDIC/NCUA benchmarks, credit-union segments, and a single credit policy endpoint. Every task type in this domain follows the same pattern: fetch the policy and relevant branch or segment data, apply policy rules to compute derived values (risk ratings, scores, concentrations, stress results), and produce a committee-ready JSON answer shaped by a provided answer template.1314## General Workflow1516### 1. Fetch policy and branch/segment data1718Always start with two parallel calls:1920- `GET /api/policies` — the authoritative rule source for ratings, scoring, stress formulas, and concentration limits.21- `GET /api/branches/{branch_id}` or `GET /api/credit-union-segments/{segment_id}` — the target entity.2223Then fetch the supporting data needed for the specific task: loans, applications, sector exposures, metrics, benchmarks. Use the most recent metrics quarter where applicable.2425### 2. Apply policy rules2627Compute derived values — risk ratings, CDFI factor scores, CRE weighted scores, stressed DSCRs, concentration ratios — using the formulas in the policies response. Read [references/policy.md](references/policy.md) for the complete rule tables and formulas. Read [references/api.md](references/api.md) for endpoint details and field descriptions.2829### 3. Produce JSON output3031Every task provides an `input/payloads/answer_template.json` that defines the required output shape, field types, enums, precision, and sort order. Follow it exactly. All numbers at precision 2 or 4 as specified; all lists sorted as specified; all string fields drawn from the template's allowed enums. Do not add narrative text outside the JSON.3233## Workflow Patterns3435### Rating Migration Review3637Prompt keywords: "rating migration", "regrade", "risk-rating review", "NPA benchmark"3839- Fetch branch loans, metrics, policies, and FDIC benchmarks.40- Filter loans to those with `current_rating >= target_current_rating_min` (stated in prompt or default to 3).41- Re-derive the final rating for each target loan using the dominant factor rule.42- Identify material downgrades (`final_rating - current_rating >= 2`).43- Assign watch-list actions by final_rating band.44- Compute NPA benchmark variance against the relevant FDIC metric.45- Identify the top problem credit (highest exposure among worst-rated loans).4647### Lending Committee Allocation4849Prompt keywords: "allocation package", "lending committee", "pending applications"5051- Fetch branch applications, metrics, sector exposures, and policies.52- Score applications with policy flags; decline any with automatic decline criteria.53- Rank surviving applications by priority (consider DSCR, relationship strength, FICO, years in business).54- Allocate capacity in priority order, checking sector concentration before each approval.55- For concentration breaches, either apply mitigation (`participation_required`) or decline with `sector_breach`.56- Record decline reason codes per the template enums.57- Compute post-approval sector concentrations.5859### Credit Union Segment Posture6061Prompt keywords: "credit-union segment", "posture page", "NCUA", "segment_id"6263- Fetch the segment, NCUA benchmarks, policies, and the branch record for the CU.64- Extract NC, US, and peer state rows from the NCUA benchmark table.65- Compute peer median for each metric.66- Compare NC vs US and NC vs peer median directionally.67- Recommend posture based on capacity and external risk signals.68- Populate controls, checklist gates, escalation triggers using the segment's `minimum_checklist` and `internal_context`.6970### Watch-List Stress and Workout7172Prompt keywords: "watch-list stress", "adverse-rated", "workout", "CDFI risk class"7374- Fetch branch loans (filter to `current_rating >= 6`), policies, and metrics.75- Compute CDFI factor score and risk class for each adverse loan.76- For loans with DSCR available, compute +200bp stressed DSCR.77- Flag loans that breach the 1.00 threshold after stress.78- Build workout queue sorted by descending exposure.79- Count severe buckets: group by `current_rating` and `payment_status`.8081### Competing CRE Decision8283Prompt keywords: "competing", "CRE", "two applications", "weighted score"8485- Fetch branch applications (filter to the two specified), loans, sector exposures, metrics, policy, and FDIC benchmarks.86- Compute the weighted 5-Cs score for each CRE application.87- Run dual-stress on both applications.88- Evaluate CRE concentration: existing CRE exposure plus each candidate's requested amount against `cre_policy_limit_pct`.89- Compare branch delinquency to the relevant FDIC benchmark.90- Select the stronger credit; give the unselected a disposition with reason codes.9192## Computation Rules9394All computation rules live in the policies API response. Read [references/policy.md](references/policy.md) for the full reference including:9596- Risk rating derivation (dominant factor rule with DSCR/LTV/delinquency tables)97- CDFI factor scoring (FICO, LTV, liquidity_months, debt_to_asset)98- CRE weighted 5-Cs scoring with component weights99- Stress formulas (+200bp watch-list and CRE dual-stress)100- Capacity and concentration rules101102Do not hardcode policy values from train examples; always fetch the live `/api/policies` response and use its values.103104## Output Precision and Sort Order105106Read the answer template carefully:107108- Dollar amounts: round to 2 decimal places.109- Ratio/percentage values: round to 4 decimal places (if specified) or 2 decimal places.110- Integer values (loan counts, ratings, scores): use integers.111- Lists: sort as the template specifies (typically ascending by id, rating, or sector).112- Enum values: use only the allowed values listed in the template for each field.113- Include all required keys even when empty (empty lists as `[]`, zero values as `0` or `0.0`).114115## Key Policies Endpoint Fields116117Always read the live `/api/policies` response, but these are the stable top-level keys to expect:118119- `risk_rating` — DSCR thresholds, LTV thresholds, delinquency minimums, dominant factor rule, material downgrade notch count120- `cdfi_factor_scores` — factor tables and risk class mapping121- `cre_weighted_score` — component weights and score class ranges122- `stress` — formulas, breach thresholds123- `capacity_concentration` — capacity field names, allowed mitigations124125## Branch Data Sources126127For a branch task, the data you typically need:128129| Data | Endpoint |130|------|----------|131| Branch info | `GET /api/branches/{branch_id}` |132| Loan portfolio | `GET /api/branches/{branch_id}/loans` |133| Applications | `GET /api/branches/{branch_id}/applications` |134| Sector exposures | `GET /api/branches/{branch_id}/sector-exposures` |135| Metrics | `GET /api/branches/{branch_id}/metrics` |136| Policy | `GET /api/policies` |137| FDIC benchmarks | `GET /api/benchmarks/fdic/q4-2024` |138| NCUA benchmarks | `GET /api/benchmarks/ncua/q1-2025` |139140For a segment task, start with `GET /api/credit-union-segments/{segment_id}` plus the NCUA benchmark endpoint and the branch record for the related CU (use the branch list to find it).141142## Common Pitfalls143144- **Don't skip the policy call.** Every computation depends on values from `/api/policies`. Fetch it first.145- **Factor availability.** DSCR, LTV, FICO, liquidity_months, debt_to_asset can all be null. When null, omit that factor from rating derivation and substitute score 0 for scoring.146- **Capacity arithmetic.** `committed_capacity_amount` differs from `approved_amount` only for `participation_required` approvals, where committed = `approved_amount * (1 - sba_guaranty_pct)`. Otherwise they are equal.147- **Quarter selection.** Always use the most recent quarter from branch metrics (e.g., `2025Q1` over `2024Q4`).148- **Concentration post-approval.** Compute against the *new* total loans outstanding, which is `existing_total_loans + sum(approved_amounts)`.149- **Grandfathering.** A sector with `grandfathered == 1` means its existing over-limit exposure is tolerated, but you cannot approve more in that sector without mitigation.150- **Template precision.** Check the template's numeric_precision or precision fields. Dollar amounts are always rounded to 2 decimals. Ratios are rounded as specified (usually 4 decimals for pct fields).