risk-ci

Generates RiskProfile and risk verdicts from ModelSpec and writes pass/fail results into CI reports.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/HKUST-QUANT-SOCIETY/quantcode --skill risk-ci-hkust-quant-society
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: risk-ci
Source: https://github.com/HKUST-QUANT-SOCIETY/quantcode/tree/main/.opencode/groups/risk/skills/risk-ci
Command: npx skills add https://github.com/HKUST-QUANT-SOCIETY/quantcode --skill risk-ci-hkust-quant-society

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Quantitative model changes need automated risk evaluation in CI pipelines, but risk results are often missing, mocked, or blocked behind manual approval gates. This Skill consumes a structured ModelSpec, runs risk calculations, produces a validated RiskProfile, and writes the real pass/fail verdict into the CI report. ## Core Features & Use Cases - Deterministic ReAct workflow: Reads the blackboard for ModelSpec references, calls the risk calculation adapter, generates and schema-validates a RiskProfile, and returns verdict, breached flags, and reasons. - CI report writing: Writes a real PR comment report for both pass and fail outcomes, preserving source, version, and degraded-status information. - No risk-based human gates: Risk limit breaches are domain fail/warning results, never HumanGate approvals, keeping CI flows unblocked. - Use Case: A GitHub Actions pipeline runs scripts/run_risk_ci_tool.py after a model change; the Skill computes risk metrics, emits a schema-valid RiskProfile, and posts the verdict to the PR without waiting for human approval. ## Quick Start Run the risk CI flow on the current ModelSpec and write the verdict and breached reasons into the pull request report.

Frequently Asked Questions about risk-ci

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run risk checks in a CI pipeline for a quant model?

Invoke the CI compatibility path through scripts/run_risk_ci_tool.py, which calls the runner.risk_ci entry point. The flow reads the ModelSpec from the blackboard, calculates risk, generates a RiskProfile, and writes the verdict into the CI report.

What is a RiskProfile and how is it validated?

A RiskProfile is the structured output produced after the risk calculation adapter runs on a ModelSpec. It must pass schema validation before the verdict step, and the final result includes verdict, breached flags, and reasons with explicit source and environment.

Does a risk limit breach trigger a human approval gate?

No. Risk limit breaches are domain fail or warning results, not HumanGate events. The Skill never calls request_human_review and never waits for approve or reject; only merge and permission use ordinary HumanGates.

What happens in the CI report when the risk check fails?

The report is written regardless of pass or fail outcome. It preserves the source, version, and any degraded status, and errors are stated explicitly if the report cannot be produced.

Can mocked or stubbed risk results be used as production evidence?

No. The Skill explicitly forbids presenting mock or stub results as production evidence. Verdicts must come from the actual risk calculation adapter with explicit provenance and environment details.