@windyroad/risk-scorer 0.1.6-preview.56 → 0.2.0-preview.59

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/README.md CHANGED
@@ -49,8 +49,6 @@ This creates a `RISK-POLICY.md` tailored to your project, defining impact levels
49
49
  | `wip-risk-mark.sh` | After edit | Records WIP risk assessment |
50
50
  | `risk-score-mark.sh` | Agent completes | Marks risk review as done |
51
51
  | `risk-hash-refresh.sh` | After Bash | Refreshes content hashes |
52
- | `risk-score-reset.sh` | Session end | Cleans up risk markers |
53
- | `risk-policy-reset-marker.sh` | Session end | Cleans up policy markers |
54
52
 
55
53
  ## Agents
56
54
 
package/hooks/hooks.json CHANGED
@@ -15,10 +15,6 @@
15
15
  { "matcher": "Edit|Write", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/wip-risk-mark.sh" }] },
16
16
  { "matcher": "Agent", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/risk-score-mark.sh" }] },
17
17
  { "matcher": "Bash", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/risk-hash-refresh.sh" }] }
18
- ],
19
- "Stop": [
20
- { "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/risk-score-reset.sh" }] },
21
- { "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/risk-policy-reset-marker.sh" }] }
22
18
  ]
23
19
  }
24
20
  }
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bats
2
+
3
+ # P001 / ADR-009: Stop-hook marker reset removed.
4
+
5
+ setup() {
6
+ PLUGIN_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/../.." && pwd)"
7
+ }
8
+
9
+ @test "risk-scorer: hooks.json has no Stop hook entry (ADR-009)" {
10
+ ! grep -q '"Stop"' "$PLUGIN_DIR/hooks/hooks.json"
11
+ }
12
+
13
+ @test "risk-scorer: risk-score-reset.sh has been removed" {
14
+ [ ! -f "$PLUGIN_DIR/hooks/risk-score-reset.sh" ]
15
+ }
16
+
17
+ @test "risk-scorer: risk-policy-reset-marker.sh has been removed" {
18
+ [ ! -f "$PLUGIN_DIR/hooks/risk-policy-reset-marker.sh" ]
19
+ }
@@ -18,7 +18,7 @@ SESSION_ID=$(_get_session_id)
18
18
  MARKER="$(_risk_dir "$SESSION_ID")/wip-reviewed"
19
19
 
20
20
  # WIP marker persists after assessment — allows multiple edits.
21
- # Cleared on session end by risk-score-reset.sh (Stop hook).
21
+ # Marker lifecycle: TTL + drift detection (ADR-009).
22
22
  # Agent case (marker creation) handled by risk-score-mark.sh.
23
23
 
24
24
  exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/risk-scorer",
3
- "version": "0.1.6-preview.56",
3
+ "version": "0.2.0-preview.59",
4
4
  "description": "Pipeline risk scoring, commit/push gates, and secret leak detection",
5
5
  "bin": {
6
6
  "windyroad-risk-scorer": "./bin/install.mjs"
@@ -1,17 +0,0 @@
1
- #!/bin/bash
2
- # Stop hook: Clears risk-policy session marker.
3
- # Mirrors: architect-reset-marker.sh
4
-
5
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
6
- source "$SCRIPT_DIR/lib/gate-helpers.sh"
7
-
8
- _parse_input
9
-
10
- SESSION_ID=$(_get_session_id)
11
-
12
- if [ -n "$SESSION_ID" ]; then
13
- RDIR=$(_risk_dir "$SESSION_ID")
14
- rm -f "${RDIR}/policy-reviewed" "${RDIR}/plan-reviewed"
15
- fi
16
-
17
- exit 0
@@ -1,17 +0,0 @@
1
- #!/bin/bash
2
- # Stop hook: Clears risk score temp files on session end.
3
-
4
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5
- source "$SCRIPT_DIR/lib/gate-helpers.sh"
6
-
7
- _parse_input
8
-
9
- SESSION_ID=$(_get_session_id)
10
-
11
- if [ -n "$SESSION_ID" ]; then
12
- # Remove the entire session-scoped directory
13
- RDIR="${TMPDIR:-/tmp}/claude-risk-${SESSION_ID}"
14
- rm -rf "$RDIR"
15
- fi
16
-
17
- exit 0