--- name: compliance-rules description: Corporate expense policy rules for GuardRail Finance — $500 approval threshold, budget category limits, and compliance report formats. --- # GuardRail Finance — Compliance Policy Reference ## The $500 Approval Rule Any single expense exceeding **$500.00 USD** requires a Manager Approval Code before it can be logged. - Approval code format: `MGR-XXXXXXXX` (the prefix `MGR-` followed by exactly 8 uppercase hexadecimal characters) - Example valid code: `MGR-A1B2C3D4` - No exceptions. No retroactive approvals. If `amount > 500` and `approved_by` is absent or empty, the request **must** be rejected with `COMPLIANCE_VIOLATION`. --- ## Budget Categories & Monthly Limits | Category | Monthly Limit | |-----------|--------------| | travel | $2,000.00 | | software | $500.00 | | hardware | $1,500.00 | | meals | $300.00 | | training | $1,000.00 | These are hard ceilings. An expense that would push `spent` above `monthly_limit` must be rejected with `BUDGET_EXCEEDED`. --- ## Compliance Check Procedure Always execute in this order: 1. **Validate inputs** — amount must be > 0, category must be from the list above, description must be non-empty. 2. **Call `get_remaining_budget(category)`** — never assume budget is available. 3. **Apply $500 rule** — if `amount > 500` and no valid `approved_by`, return `COMPLIANCE_VIOLATION`. Do not log. 4. **Apply budget ceiling** — if `amount > remaining`, return `BUDGET_EXCEEDED`. Do not log. 5. **Call `log_expense(...)`** — only if both checks pass. --- ## Violation Report Templates ### COMPLIANCE_VIOLATION ``` COMPLIANCE VIOLATION ──────────────────────────────── Code : COMPLIANCE_VIOLATION Amount : $ Category : Rule : Expenses over $500.00 require a Manager Approval Code. Required : Provide approved_by in format MGR-XXXXXXXX (8 hex chars). Action : Expense NOT logged. Resubmit with a valid approval code. ``` ### BUDGET_EXCEEDED ``` BUDGET EXCEEDED ──────────────────────────────── Code : BUDGET_EXCEEDED Amount : $ Category : Remaining : $ Overage : $ Action : Expense NOT logged. Request a budget increase or reduce amount. ``` ### EXPENSE APPROVED ``` EXPENSE APPROVED ──────────────────────────────── Expense ID : Amount : $ Category : Description : Approved By : Remaining : $ / $ Policy : ``` --- ## MCP Tools Reference | Tool | Purpose | |------------------------|-------------------------------------------------------| | `log_expense` | Record a validated expense (enforces rules server-side) | | `get_remaining_budget` | Query remaining budget for a category | | `get_expense_report` | List expenses with 50%+ utilization summary | Always call `get_remaining_budget` before `log_expense`.