Hugdrigo's picture
Upload 3 files
f841046 verified
|
Raw History Blame Contribute Delete
5.11 kB
metadata
title: ContractPilot
emoji: 📑
colorFrom: blue
colorTo: indigo
sdk: static
app_file: index.html
pinned: false
license: mit
short_description: Contract renewals and risk simulation.

ContractPilot

Contract Exposure Intelligence Studio | Hugdrigo Portfolio Project #107

ContractPilot is a dependency-free, self-contained browser simulator for analyzing synthetic business contract portfolios, upcoming renewal deadlines, annual spend, simple expected incident-loss exposure, and stress-testing price and service-risk assumptions. The application works offline in a Hugging Face Static Space, without tokens, external APIs, a database or paid compute.

Short description: Contract renewals and risk simulation.

Important: All eight sample contracts, counterparties, amounts, probabilities, and losses are invented. The simulator is not legal advice, insurance modeling, actuarial forecasting, or a replacement for contract review. Probability figures are user-supplied assumptions and have not been calibrated to real incidents. Date calculations do not interpret contract text and do not issue actual notifications.

Publish on Hugging Face

  1. Open Create a new Space.
  2. Set Owner Hugdrigo, Space name contractpilot-exposure-intelligence, SDK Static, Template Blank, Visibility Public, and License MIT.
  3. Extract the ZIP. Upload exactly README.md, index.html, and LICENSE to the repository root, not inside a subfolder.
  4. Select Commit changes and open the App tab.

YAML validity: colorFrom: blue and colorTo: indigo both use supported Hugging Face color tokens (red, yellow, green, blue, indigo, purple, pink, gray). The Space SDK is static and the entrypoint is index.html. No build process required.

Features

Module Included features
Command overview Active annual commitments, expected loss exposure, notice priority count, next-year renewals chart, category share and exposure ranking
Scenario studio Four presets, 3 sliders for price / incident likelihood / impact severity, baseline comparison, 400 deterministic loss-event simulation draws and P10/P50/P90
Contract registry Add/edit fictional contracts, archive/restore records (no destructive record deletion), search, category and status filters, CSV/JSON exports
Renewal calendar 12-month counts and renewal values, notice-date table, days remaining and overdue tagging
Methodology Exact rules and assumptions, privacy constraints and explicit limits

Calculation methodology

  • Annual portfolio commitment: Sum of value for active contract records in USD annual equivalents. Not recognized revenue, accruals, or future cash outflows.
  • Conditional expected annual incident-loss exposure: sum(incident_probability_percent / 100 × incident_loss_usd) over active contracts. Assumes one independent binary event per contract over a hypothetical year. This number is a rule-based expectation, not an insurance estimate.
  • Scenario annual commitment: sum(value × (1 + price_change_percent / 100)).
  • Scenario expected loss: sum(clamp(probability_percent + probability_change_percentage_points, 0, 100) / 100 × loss_amount × (1 + loss_severity_change_percent / 100)).
  • Renewal notice date: UTC calendar renewal day minus integer notice_days. The app does not automatically roll renewal dates forward or interpret agreement clauses. It shows notice deadlines even when they are already overdue.
  • Simulation: 400 draws from a fixed deterministic seed. Each contract independently samples an event according to its assumed probability; each triggered loss varies randomly by ±10% of the assumed amount. P10, P50 and P90 describe only these 400 hypothetical drawings and are not calibrated forecast intervals.

Input and storage safeguards

  • Data is stored in browser localStorage when available. This storage is not encrypted. Do not enter sensitive or confidential contract terms.
  • Imports must be .json under 2MB, with kind=ContractPilotBackup, version=1, integer unique positive IDs, monotonic next ID, valid ISO date, bounded numeric fields, specified categories, and at most 150 contracts. Invalid imports are rejected before state replacement. Current data replacement requires browser confirmation.
  • Names and counterparties are HTML-escaped before rendering. CSV cells are quoted and strings beginning with spreadsheet formula characters are escaped. JSON exports contain plain text and should be secured as needed.
  • Archiving retains a record and excludes it from active calculations. Reset demo requires confirmation and replaces local data. Export a JSON backup first.

Source and dependencies

index.html contains complete HTML, CSS, JavaScript and inline SVG. No external resources are loaded. Repository includes an MIT LICENSE. All sample content and computed analysis are synthetic for portfolio demonstration and educational use.

© 2026 Hugdrigo. Project #107.