1---2name: oc-risk-scope3description: "Trigger: risk assessment, refactor risk, scope analysis, target boundary discovery. Classify technical and functional legacy risk and delimit class/package/module scope."4license: Apache-2.05metadata:6 author: gentle-ai7 adapted_by: andresnator8 source: https://skillmd.com/skills/andresnator/oc-risk-scope9 upstream: gentle-ai/plan-refactor10 version: "1.0.0"11 status: testing12---1314# Risk and Scope1516## Intent1718- **Goal:** Classify overall risk as low, medium, high, or critical from technical and functional evidence and explain why; delimit whether the target is a class, package, or module, then keep the plan inside that boundary.19- **Limits:** Git access is read-only (`git log` / `git blame` / `git shortlog`). Neighboring context is not in scope; record out-of-scope work explicitly.20- **Fails if:** The classification lacks evidence; the value tier is guessed instead of stated as not inferable; in-scope files and neighboring context are mixed; or out-of-scope work goes unrecorded.2122## Context2324- **Reads:**25 - Risk: complexity, large units, test gaps/coverage, CRAP score, fan-in/fan-out, consumers, external dependencies, public contracts, async, transactions, persistence, critical domain rules, git churn.26 - Scope: primary target file(s); callers/consumers via references, imports, routes, LSP, or a code-graph index (for example, Graphify MCP/CLI) when available; existing tests by naming, package, fixtures, integration suites, and build metadata.27- **Never reads:** Code unrelated to the target and its consumers.28- **Persona:** Evidence-driven risk assessor and scope analyst for refactor and plan work.29- **Scope:** Assessing refactor or legacy risk; scope analysis and target boundary discovery.3031## Expectations3233- **Scenarios:**34 - WHEN git history is available THEN rank files by change frequency; high churn on a risky unit raises priority; churn ≈ 0 lowers it (zero-interest debt) unless a planned change lands there.35 - WHEN sizing investment THEN follow the value tier: core domain justifies deep plans, supporting moderate ones, generic code is often better replaced; infer it from domain language, dependency direction, and test intensity.36 - WHEN inspecting a target THEN find public methods, exported APIs, public constructors, endpoints, and events, plus their callers and tests.37- **Done means:** Both outputs: (1) risk level, rationale, churn priority, value tier; (2) target level (class/package/module), in-scope files, neighboring context, and explicit out-of-scope work.38- **Quality needs:** Boundaries backed by references, not guesses; no claim beyond the evidence rules.