@windyroad/risk-scorer 0.18.7 → 0.18.8-preview.1042

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.
@@ -310,5 +310,5 @@
310
310
  }
311
311
  },
312
312
  "name": "wr-risk-scorer",
313
- "version": "0.18.7"
313
+ "version": "0.18.8"
314
314
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wr-risk-scorer",
3
- "version": "0.18.7",
3
+ "version": "0.18.8",
4
4
  "description": "Pipeline risk scoring, commit/push gates, and secret leak detection",
5
5
  "author": {
6
6
  "name": "Windy Road Technology",
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3
+ import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { spawnSync } from "node:child_process";
6
6
  import { fileURLToPath } from "node:url";
@@ -28,8 +28,14 @@ function riskDir(sessionId) {
28
28
  return join(process.env.TMPDIR || "/tmp", `claude-risk-${sessionId}`);
29
29
  }
30
30
 
31
- function statePath(input, target) {
32
- return join(riskDir(input.session_id), `codex-agent-${Buffer.from(target).toString("base64url")}`);
31
+ function statePath(input, target, suffix = "") {
32
+ return join(riskDir(input.session_id), `codex-agent-${Buffer.from(target).toString("base64url")}${suffix}`);
33
+ }
34
+
35
+ function clearTarget(input, target) {
36
+ for (const suffix of ["", ".claim", ".done"]) {
37
+ rmSync(statePath(input, target, suffix), { force: true });
38
+ }
33
39
  }
34
40
 
35
41
  function spawnTarget(input) {
@@ -42,11 +48,25 @@ function rememberSpawn(input) {
42
48
  const target = spawnTarget(input);
43
49
  if (typeof target !== "string" || !target) return;
44
50
  mkdirSync(riskDir(input.session_id), { recursive: true });
45
- rmSync(statePath(input, target), { force: true });
51
+ clearTarget(input, target);
46
52
  if (!riskAgentRoles.has(role)) return;
47
53
  writeFileSync(statePath(input, target), role, "utf8");
48
54
  }
49
55
 
56
+ function claimTarget(input, target) {
57
+ const claim = statePath(input, target, ".claim");
58
+ const done = statePath(input, target, ".done");
59
+ if (existsSync(done)) return null;
60
+ mkdirSync(riskDir(input.session_id), { recursive: true });
61
+ try {
62
+ writeFileSync(claim, "", { flag: "wx" });
63
+ } catch (error) {
64
+ if (error?.code === "EEXIST") return null;
65
+ throw error;
66
+ }
67
+ return { claim, done };
68
+ }
69
+
50
70
  function markTarget(input, target, output) {
51
71
  if (typeof target !== "string" || typeof output !== "string" || !output) return;
52
72
 
@@ -54,6 +74,8 @@ function markTarget(input, target, output) {
54
74
  if (!existsSync(state)) return;
55
75
  const role = readFileSync(state, "utf8");
56
76
  if (!riskAgentRoles.has(role)) return;
77
+ const claim = claimTarget(input, target);
78
+ if (!claim) return;
57
79
 
58
80
  const synthetic = {
59
81
  ...input,
@@ -67,7 +89,13 @@ function markTarget(input, target, output) {
67
89
  input: JSON.stringify(synthetic),
68
90
  encoding: "utf8",
69
91
  });
70
- if (result.status === 0) rmSync(state, { force: true });
92
+ if (result.status === 0) {
93
+ renameSync(claim.claim, claim.done);
94
+ rmSync(state, { force: true });
95
+ } else {
96
+ rmSync(claim.claim, { force: true });
97
+ process.exitCode = 1;
98
+ }
71
99
  }
72
100
 
73
101
  function markClose(input) {
@@ -82,6 +110,10 @@ function markWait(input) {
82
110
  }
83
111
  }
84
112
 
113
+ function markSubagentStop(input) {
114
+ markTarget(input, input.agent_id, input.last_assistant_message);
115
+ }
116
+
85
117
  let body = "";
86
118
  process.stdin.setEncoding("utf8");
87
119
  for await (const chunk of process.stdin) body += chunk;
@@ -104,3 +136,6 @@ if (["collaborationinterrupt_agent", "close_agent", "multi_agent_v1__close_agent
104
136
  if (["collaborationwait_agent", "wait_agent", "multi_agent_v1__wait_agent"].includes(input.tool_name)) {
105
137
  markWait(input);
106
138
  }
139
+ if (input.hook_event_name === "SubagentStop") {
140
+ markSubagentStop(input);
141
+ }
@@ -407,10 +407,15 @@ fi
407
407
  # Marker absent — deny + delegate.
408
408
  # P166: instruct the orchestrator to structure the agent prompt with a
409
409
  # leading `SURFACE: <name>` line and a `<draft>...</draft>` block so the
410
- # PostToolUse mark hook can derive the canonical marker key locally
410
+ # Claude PostToolUse mark hook can derive the canonical marker key locally
411
411
  # (sha256(DRAFT + '\n' + SURFACE)). Single fire per gate cycle.
412
412
  VERDICT_PREFIX="${EXTERNAL_COMMS_VERDICT_PREFIX:-EXTERNAL_COMMS_${EXTERNAL_COMMS_EVALUATOR_ID^^}}"
413
- REASON=$(printf 'BLOCKED (external-comms gate / %s evaluator): %s draft has not been reviewed by %s. Delegate to %s (subagent_type: '"'"'%s'"'"') with a prompt that starts with the line `SURFACE: %s` and wraps the draft body verbatim inside `<draft>...</draft>` markers (for the changeset-author surface the body is the changeset summary WITHOUT the leading `---` frontmatter block — the gate strips frontmatter before hashing the marker key). The PostToolUse hook derives the marker key from that structure and marks the draft reviewed when the subagent emits %s_VERDICT: PASS — single fire suffices. Dispatch the reviewer SYNCHRONOUSLY (run_in_background: false): a background-launched reviewer does not fire its PostToolUse mark hook, so the marker never persists and this gate re-blocks (P402). Use %s for an interactive walkthrough. There is no env override (P377/RFC-029 — BYPASS_RISK_GATE removed).' \
414
- "$EXTERNAL_COMMS_EVALUATOR_ID" "$SURFACE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$SURFACE" "$VERDICT_PREFIX" "$EXTERNAL_COMMS_ASSESS_SKILL")
413
+ if [ -n "${CODEX_THREAD_ID:-}" ]; then
414
+ COMPLETION_GUIDANCE='On Codex, wait for the reviewer to finish, then close that completed agent once before retrying; the PostToolUse compatibility hook consumes the completed close response and persists its structured verdict, with no transcript parsing or nested codex exec.'
415
+ else
416
+ COMPLETION_GUIDANCE='On Claude Code, dispatch the reviewer SYNCHRONOUSLY (run_in_background: false): a background-launched reviewer does not fire its PostToolUse mark hook, so the marker never persists and this gate re-blocks (P402).'
417
+ fi
418
+ REASON=$(printf 'BLOCKED (external-comms gate / %s evaluator): %s draft has not been reviewed by %s. Delegate to %s (subagent_type: '"'"'%s'"'"') with a prompt that starts with the line `SURFACE: %s` and wraps the draft body verbatim inside `<draft>...</draft>` markers (for the changeset-author surface the body is the changeset summary WITHOUT the leading `---` frontmatter block — the gate strips frontmatter before hashing the marker key). The completion hook marks the draft reviewed when the subagent emits %s_VERDICT: PASS — single fire suffices. %s Use %s for an interactive walkthrough. There is no env override (P377/RFC-029 — BYPASS_RISK_GATE removed).' \
419
+ "$EXTERNAL_COMMS_EVALUATOR_ID" "$SURFACE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$SURFACE" "$VERDICT_PREFIX" "$COMPLETION_GUIDANCE" "$EXTERNAL_COMMS_ASSESS_SKILL")
415
420
  deny_with_reason "$REASON"
416
421
  exit 0
package/hooks/hooks.json CHANGED
@@ -11,6 +11,9 @@
11
11
  ],
12
12
  "PostToolUse": [
13
13
  { "matcher": "Agent|Bash|Edit|Skill|Write|collaborationspawn_agent|collaborationwait_agent|collaborationinterrupt_agent|spawn_agent|wait_agent|close_agent|multi_agent_v1__spawn_agent|multi_agent_v1__wait_agent|multi_agent_v1__close_agent", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/risk-scorer-dispatch.sh post-tool" }] }
14
+ ],
15
+ "SubagentStop": [
16
+ { "matcher": "^wr-risk-scorer:", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/risk-scorer-dispatch.sh subagent-stop" }] }
14
17
  ]
15
18
  }
16
19
  }
@@ -38,7 +38,11 @@ check_risk_gate() {
38
38
  # 1. Score file must exist (fail-closed)
39
39
  if [ ! -f "$SCORE_FILE" ]; then
40
40
  RISK_GATE_CATEGORY="missing"
41
- RISK_GATE_REASON="No ${ACTION} risk score found. Delegate to wr-risk-scorer:pipeline (subagent_type: 'wr-risk-scorer:pipeline') to assess cumulative pipeline risk. Dispatch the scorer SYNCHRONOUSLY (run_in_background: false): a background-launched scorer does not fire its PostToolUse:Agent mark hook, so no marker persists and this gate re-blocks despite a within-appetite score (P402)."
41
+ if [ -n "${CODEX_THREAD_ID:-}" ]; then
42
+ RISK_GATE_REASON="No ${ACTION} risk score found. Delegate to the native Codex agent wr-risk-scorer:pipeline to assess cumulative pipeline risk, wait for it to finish, then close that completed agent once before retrying. The PostToolUse compatibility hook consumes the completed close response and persists its structured verdict; no transcript parsing or nested codex exec is required."
43
+ else
44
+ RISK_GATE_REASON="No ${ACTION} risk score found. Delegate to wr-risk-scorer:pipeline (subagent_type: 'wr-risk-scorer:pipeline') to assess cumulative pipeline risk. Dispatch the scorer SYNCHRONOUSLY (run_in_background: false): a background-launched scorer does not fire its PostToolUse:Agent mark hook, so no marker persists and this gate re-blocks despite a within-appetite score (P402)."
45
+ fi
42
46
  return 1
43
47
  fi
44
48
 
@@ -240,7 +240,7 @@ except Exception:
240
240
  # Fallback: cached old SKILL.md still instructs the agent to emit
241
241
  # EXTERNAL_COMMS_RISK_KEY. Honour it during the deprecation window.
242
242
  KEY_LINE=$(echo "$AGENT_OUTPUT" | grep -E '^EXTERNAL_COMMS_RISK_KEY:' | tail -1) || true
243
- KEY=$(echo "$KEY_LINE" | sed 's/^EXTERNAL_COMMS_RISK_KEY:[[:space:]]*//' | tr -d '[:space:]')
243
+ KEY=$(echo "$KEY_LINE" | sed 's/^EXTERNAL_COMMS_RISK_KEY:[[:space:]]*//' | tr -d '[:space:]`')
244
244
  fi
245
245
 
246
246
  # Validate key: 64 hex chars (sha256 output). Reject anything else.
@@ -92,6 +92,9 @@ if messages:
92
92
  ;;
93
93
  esac
94
94
  ;;
95
+ subagent-stop)
96
+ printf '%s' "$INPUT" | node "$SCRIPT_DIR/codex-agent-completion.mjs"
97
+ ;;
95
98
  *)
96
99
  exit 0
97
100
  ;;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/risk-scorer",
3
- "version": "0.18.7",
3
+ "version": "0.18.8-preview.1042",
4
4
  "description": "Pipeline risk scoring, commit/push gates, and secret leak detection",
5
5
  "scripts": {
6
6
  "prepack": "node scripts/sync-codex-skills.mjs --pack",
@@ -24,7 +24,7 @@ const restoreMode = process.argv.includes("--restore-pack");
24
24
 
25
25
  const preamble = `<!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
26
26
 
27
- > Codex runtime note: use \`request_user_input\` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or \`subagent_type\`, use a native Codex subagent workflow and spawn the matching installed \`wr-risk-scorer:<mode>\` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in \`default\` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
27
+ > Codex runtime note: use \`request_user_input\` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or \`subagent_type\`, use a native Codex subagent workflow and spawn the matching installed \`wr-risk-scorer:<mode>\` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested \`codex exec\`. Do not substitute the built-in \`default\` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
28
28
 
29
29
  `;
30
30
 
@@ -6,7 +6,7 @@ allowed-tools: Read, Glob, Grep, Bash, request_user_input, Skill
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # External-Comms Risk Assessment Skill
@@ -6,7 +6,7 @@ allowed-tools: Read, Glob, Grep, Bash, request_user_input, Skill
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # Inbound-Report Risk Assessment Skill
@@ -6,7 +6,7 @@ allowed-tools: Read, Glob, Grep, Bash, request_user_input, Skill
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # Release Risk Assessment Skill
@@ -6,7 +6,7 @@ allowed-tools: Read, Glob, Grep, Bash, request_user_input, Skill
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # WIP Risk Assessment Skill
@@ -7,7 +7,7 @@ maturity: proposed
7
7
 
8
8
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
9
9
 
10
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
11
11
 
12
12
 
13
13
  # Risk Catalog Bootstrap
@@ -6,7 +6,7 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # Risk Register Entry Generator
@@ -6,7 +6,7 @@ allowed-tools: Read, Glob, Grep, Bash, Agent
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # External-Comms Leak Review Skill (Wrapper)
@@ -6,7 +6,7 @@ allowed-tools: Read, Glob, Bash, Agent
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # Pipeline Scoring Skill (Wrapper)
@@ -6,7 +6,7 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input, Agent
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # Risk Policy Generator
@@ -6,7 +6,7 @@ allowed-tools: Read, Glob, Bash, Agent
6
6
 
7
7
  <!-- Generated from packages/risk-scorer/skills/*/SKILL.md by packages/risk-scorer/scripts/sync-codex-skills.mjs during npm pack. Do not edit packaged output directly. -->
8
8
 
9
- > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it, then close that same agent so the completion hook receives its final response. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
9
+ > Codex runtime note: use `request_user_input` only in Plan Mode where this skill needs structured user input. Outside Plan Mode, ask one concise direct question only when no safe assumption exists. If a step refers to Claude-style agent dispatch or `subagent_type`, use a native Codex subagent workflow and spawn the matching installed `wr-risk-scorer:<mode>` custom agent. Wait for it to finish, then close that completed agent once so the PostToolUse compatibility hook can persist its structured verdict. Do not parse transcripts or launch nested `codex exec`. Do not substitute the built-in `default` agent when a hook consumes the subagent identity; restart Codex if the installed agent is not yet visible.
10
10
 
11
11
 
12
12
  # WIP Scoring Skill (Wrapper)