RISK STRATEGY

KittyCopilot

Risk strategy workbench for onchain risk control. Design, simulate, and validate risk rules with a PostgreSQL-backed catalog, interactive web UI, and CLI-driven workflows.

Capabilities

🎯

Scene Management

Define risk scenes with workflows, nodes, and rules. Organize complex risk strategies into manageable units.

🔄

Simulation Engine

Run replay batches on simulation scenes. Test risk rules against historical data before deploying to production.

📊

Replay Analysis

Compare replay batches, inspect performance metrics, and analyze correlation between rules and outcomes.

⚙️

Rule Engine

Expression-based rule evaluation with variables, conditions, and assignments. Full validation before deployment.

📝

User Label Datasets

Manage labeled datasets for training and validation. Track user-defined labels alongside automated analysis.

Web Interface

Dashboard

At-a-glance view of scenes, workflows, and replay status across your risk catalog.

Scene Editor

Visual scene configuration with node detail views and rule management.

Replay Viewer

Inspect replay batches with detailed results, metrics, and diff views.

Copilot Drawer

AI-assisted analysis integrated directly into the web interface.

CLI Workflows

--read

Browse scenes, workflows, nodes, rules, variables, history, and replay batches.

--analyze

Compare replay batches and inspect performance or correlation metrics.

--simulate

Copy scenes or run replay batches on simulation scenes for testing.

--edit

Validate and mutate simulation scenes with full diff tracking.

Architecture

PostgreSQL (Source of Truth) | Catalog State ├── Scenes ├── Workflows ├── Nodes ├── Rules ├── Variables ├── History Records ├── Replay Batches └── User Label Datasets | Flask Backend (API + Static Serving) | Vue 3 + Vite Frontend

Tech Stack

Python Flask PostgreSQL SQLAlchemy Vue 3 Vite TypeScript