@windyroad/risk-scorer 0.18.2 → 0.18.3-preview.990
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/agents/pipeline.md
CHANGED
|
@@ -168,7 +168,7 @@ criteria above.
|
|
|
168
168
|
|
|
169
169
|
## Below-Appetite Output Rule (ADR-013 Rule 5)
|
|
170
170
|
|
|
171
|
-
When ALL cumulative scores are within appetite (≤ the appetite threshold in `RISK-POLICY.md` § Risk Appetite — read it; `Threshold: N`, default
|
|
171
|
+
When ALL cumulative scores are within appetite (≤ the appetite threshold in `RISK-POLICY.md` § Risk Appetite — read it; `Threshold: N`, default 5/Low when absent; do NOT hardcode), your output MUST contain ONLY:
|
|
172
172
|
1. The Pipeline Risk Report structure (layers, risk items, summary table)
|
|
173
173
|
2. `RISK_SCORES: commit=N push=N release=N`
|
|
174
174
|
3. `RISK_BYPASS: reducing` (if applicable)
|
|
@@ -177,7 +177,7 @@ Do NOT emit: "Suggested Actions", "Your call:", advisory warnings, back-pressure
|
|
|
177
177
|
|
|
178
178
|
## Above-Appetite Remediations
|
|
179
179
|
|
|
180
|
-
When ANY cumulative score exceeds appetite (> the RISK-POLICY.md appetite threshold, default
|
|
180
|
+
When ANY cumulative score exceeds appetite (> the RISK-POLICY.md appetite threshold, default 5 — read it, do NOT hardcode), the verbal verdict is **STOP**.
|
|
181
181
|
The scorer is not the primary decision-maker — the hook gate will block the
|
|
182
182
|
action — but the scorer's verdict must match the structured score so the agent
|
|
183
183
|
does not waste tool calls acting on an ambiguous nudge.
|
|
@@ -203,8 +203,8 @@ Column definitions:
|
|
|
203
203
|
- **description**: free-form prose. The agent reads this and decides what to do. No structured action_class column.
|
|
204
204
|
|
|
205
205
|
Include downstream back-pressure in the remediation list:
|
|
206
|
-
- **Commit**: If adding this commit would
|
|
207
|
-
- **Push**: If pushing would
|
|
206
|
+
- **Commit**: If adding this commit would make the push queue exceed appetite, include a remediation to split the commit.
|
|
207
|
+
- **Push**: If pushing would make the release queue exceed appetite, include a remediation to release first.
|
|
208
208
|
|
|
209
209
|
Do NOT emit free-text "Your call:" or "consider splitting" prose. The structured `RISK_REMEDIATIONS:` block is the only output for above-appetite guidance.
|
|
210
210
|
|
|
@@ -214,7 +214,7 @@ When a pipeline run identifies a **register-worthy risk shape**, emit a structur
|
|
|
214
214
|
|
|
215
215
|
### Trigger conditions (emit a hint when ANY fire)
|
|
216
216
|
|
|
217
|
-
1. **Above-appetite residual** — any cumulative residual score exceeds the appetite threshold declared in `RISK-POLICY.md` § Risk Appetite (default
|
|
217
|
+
1. **Above-appetite residual** — any cumulative residual score exceeds the appetite threshold declared in `RISK-POLICY.md` § Risk Appetite (default 5; read it, do NOT hardcode). A risk that breaches appetite on this change is a standing-risk candidate, not just a one-off remediation target.
|
|
218
218
|
2. **Confidentiality disclosure** — the Confidential Information Disclosure check (below) flagged business metrics (revenue, user counts, pricing, client names, traffic volumes) in the diff. Confidentiality leaks are standing-risk-shaped even after the immediate remediation.
|
|
219
219
|
3. **User-stated precondition** — the User-Stated Preconditions Check (below) flagged an unmet paired capability as a standalone Risk item. Unmet preconditions are standing-risk-shaped because the dependency gap persists until the paired capability ships.
|
|
220
220
|
|
|
@@ -272,7 +272,7 @@ Do NOT emit `RISK_REGISTER_HINT:` when all cumulative scores are within appetite
|
|
|
272
272
|
|
|
273
273
|
## Held-Changeset Graduation Evaluation (ADR-061)
|
|
274
274
|
|
|
275
|
-
When the pipeline state indicates **within-appetite drain mode** (cumulative push and release residual both ≤
|
|
275
|
+
When the pipeline state indicates **within-appetite drain mode** (cumulative push and release residual both ≤ the threshold in `RISK-POLICY.md`, default 5) AND `docs/changesets-holding/` contains entries, evaluate each held changeset against ADR-061 Rule 1's symmetric graduation criterion: **reinstate when `release-risk(pipeline with held changeset hypothetically reinstated) ≤ problem-ticket Priority`**.
|
|
276
276
|
|
|
277
277
|
This is the symmetric counterpart to ADR-042 Rule 2's move-to-holding contract. Material flows in when release-risk would exceed appetite; material flows out when release-risk falls at or below the originating problem-ticket Priority.
|
|
278
278
|
|
package/agents/plan.md
CHANGED
|
@@ -18,7 +18,7 @@ You are the Risk Scorer in plan review mode. Assess both the plan's own risk AND
|
|
|
18
18
|
5. Consider what controls will be in place (CI, hooks, tests, preview deploys)
|
|
19
19
|
6. Estimate the plan's own residual risk after controls
|
|
20
20
|
7. **Project release risk**: what would the release look like if the plan's changes were added to the existing unreleased queue?
|
|
21
|
-
8. **Apply back-pressure**: if projected release risk
|
|
21
|
+
8. **Apply back-pressure**: if projected release risk exceeds appetite and the plan doesn't include a release strategy, FAIL.
|
|
22
22
|
|
|
23
23
|
## Verdict Logic
|
|
24
24
|
|
|
@@ -122,4 +122,4 @@ User warnings outrank technical control discovery.
|
|
|
122
122
|
| 4 Significant | 4 | 8 | 12 | 16 | 20 |
|
|
123
123
|
| 5 Severe | 5 | 10 | 15 | 20 | 25 |
|
|
124
124
|
|
|
125
|
-
Label Bands: 1-2 Very Low, 3-
|
|
125
|
+
Label Bands: 1-2 Very Low, 3-5 Low, 6-9 Medium, 10-16 High, 17-25 Very High.
|
package/agents/wip.md
CHANGED
|
@@ -47,11 +47,11 @@ Always provide the cumulative risk picture:
|
|
|
47
47
|
|
|
48
48
|
### Below-Appetite Rule (ADR-013 Rule 5)
|
|
49
49
|
|
|
50
|
-
If cumulative risk is **within appetite** (≤ the appetite threshold in `RISK-POLICY.md` § Risk Appetite — read it; `Threshold: N`, default
|
|
50
|
+
If cumulative risk is **within appetite** (≤ the appetite threshold in `RISK-POLICY.md` § Risk Appetite — read it; `Threshold: N`, default 5/Low when absent; do NOT hardcode): provide the assessment table and verdict only. Do NOT emit advisory prose, recommendations, or suggestions. The verdict is `RISK_VERDICT: CONTINUE`.
|
|
51
51
|
|
|
52
52
|
### Above-Appetite Remediations
|
|
53
53
|
|
|
54
|
-
If cumulative risk **exceeds appetite
|
|
54
|
+
If cumulative risk **exceeds the configured appetite threshold**, the verbal verdict is **PAUSE**
|
|
55
55
|
(the wip-mode equivalent of STOP).
|
|
56
56
|
|
|
57
57
|
**Do NOT emit** "Proceed", "Continue", "OK to edit", "You may commit", or any
|
|
@@ -89,7 +89,7 @@ After assessing the risk profile, check whether uncommitted changes represent **
|
|
|
89
89
|
- `packages/*/skills/**/*.bats`
|
|
90
90
|
- `docs/decisions/*.md`
|
|
91
91
|
|
|
92
|
-
AND cumulative risk is **within appetite** (≤ the RISK-POLICY.md appetite threshold, default
|
|
92
|
+
AND cumulative risk is **within appetite** (≤ the RISK-POLICY.md appetite threshold, default 5; read it, do NOT hardcode), AND at least one completion signal is present:
|
|
93
93
|
- A problem file diff contains "Fix Released" or a status transition keyword. Under the flat layout this surfaces as a `.known-error.md` / `.closed.md` filename suffix; under the per-state subdir layout it surfaces as a path move into `docs/problems/known-error/` or `docs/problems/closed/`.
|
|
94
94
|
- A SKILL.md was modified alongside a problem file update
|
|
95
95
|
|
|
@@ -145,4 +145,4 @@ assessment.
|
|
|
145
145
|
| 4 Significant | 4 | 8 | 12 | 16 | 20 |
|
|
146
146
|
| 5 Severe | 5 | 10 | 15 | 20 | 25 |
|
|
147
147
|
|
|
148
|
-
Label Bands: 1-2 Very Low, 3-
|
|
148
|
+
Label Bands: 1-2 Very Low, 3-5 Low, 6-9 Medium, 10-16 High, 17-25 Very High.
|
package/package.json
CHANGED
|
@@ -84,7 +84,7 @@ Wait for the wrapper to return. The wrapper invokes the pipeline agent internall
|
|
|
84
84
|
|
|
85
85
|
Present the full risk report to the user. Highlight:
|
|
86
86
|
- The three risk scores (commit / push / release) and their labels
|
|
87
|
-
- Any risks above appetite (score
|
|
87
|
+
- Any risks above appetite (score > the threshold configured in RISK-POLICY.md; default 5)
|
|
88
88
|
- Whether the gate is now pre-satisfied for the current session (i.e., a subsequent `git commit` will reuse the bypass marker without re-triggering the scorer)
|
|
89
89
|
|
|
90
90
|
If any score is above appetite, the action is **framework-mediated, not a user decision** (P377/RFC-029; ADR-044 category-3 explicitly excludes above-appetite). Per **ADR-042 Rule 1**: auto-apply scorer remediations incrementally until residual risk is within appetite, OR halt per ADR-042 Rule 5 if the scorer cannot converge. **MUST NOT commit/push/release above appetite, and MUST NOT use `request_user_input` to ask whether to proceed anyway** — there is no "proceed anyway (bypass)" option; the answer is always reduce-risk-or-halt. The only sanctioned non-blocking path is the risk-reducing path (a genuinely risk-reducing change clears via the `reducing` bypass). Under non-interactive contexts the ADR-013 Rule 6 fail-safe is the terminal fallback: skip the action and report the uncommitted/unreleased state.
|