devrites 3.2.0 → 3.2.2

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/docs/engine/commands.md +7 -5
  4. package/engine/commands.go +2 -2
  5. package/engine/hooks.go +17 -3
  6. package/engine/hooks_workspace.go +18 -3
  7. package/engine/internal/doctor/doctor.go +21 -23
  8. package/engine/internal/doctor/doctor_test.go +31 -3
  9. package/engine/tests/doctor_cli_test.go +15 -0
  10. package/engine/tests/hook_test.go +93 -0
  11. package/pack/.claude/skills/rite-doctor/SKILL.md +2 -2
  12. package/pack/.claude/skills/rite-upgrade/SKILL.md +1 -1
  13. package/pack/generated/claude/skills/rite-doctor/SKILL.md +2 -2
  14. package/pack/generated/claude/skills/rite-upgrade/SKILL.md +1 -1
  15. package/pack/generated/codex/AGENTS.md +4 -3
  16. package/pack/generated/codex/hooks.json +15 -0
  17. package/pack/generated/codex/skills/devrites-api-interface/SKILL.md +4 -4
  18. package/pack/generated/codex/skills/devrites-audit/SKILL.md +4 -4
  19. package/pack/generated/codex/skills/devrites-browser-proof/SKILL.md +4 -4
  20. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +4 -4
  21. package/pack/generated/codex/skills/devrites-doubt/SKILL.md +4 -4
  22. package/pack/generated/codex/skills/devrites-frontend-craft/SKILL.md +4 -4
  23. package/pack/generated/codex/skills/devrites-interview/SKILL.md +4 -4
  24. package/pack/generated/codex/skills/devrites-lib/SKILL.md +4 -4
  25. package/pack/generated/codex/skills/devrites-prose-craft/SKILL.md +4 -4
  26. package/pack/generated/codex/skills/devrites-refresh-indexes/SKILL.md +4 -4
  27. package/pack/generated/codex/skills/devrites-source-driven/SKILL.md +4 -4
  28. package/pack/generated/codex/skills/devrites-ux-shape/SKILL.md +4 -4
  29. package/pack/generated/codex/skills/rite/SKILL.md +4 -4
  30. package/pack/generated/codex/skills/rite-adopt/SKILL.md +4 -4
  31. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +4 -4
  32. package/pack/generated/codex/skills/rite-build/SKILL.md +4 -4
  33. package/pack/generated/codex/skills/rite-clarify/SKILL.md +4 -4
  34. package/pack/generated/codex/skills/rite-converge/SKILL.md +4 -4
  35. package/pack/generated/codex/skills/rite-customize/SKILL.md +4 -4
  36. package/pack/generated/codex/skills/rite-define/SKILL.md +4 -4
  37. package/pack/generated/codex/skills/rite-doctor/SKILL.md +6 -6
  38. package/pack/generated/codex/skills/rite-dogfood/SKILL.md +4 -4
  39. package/pack/generated/codex/skills/rite-explain/SKILL.md +4 -4
  40. package/pack/generated/codex/skills/rite-frame/SKILL.md +4 -4
  41. package/pack/generated/codex/skills/rite-handoff/SKILL.md +4 -4
  42. package/pack/generated/codex/skills/rite-learn/SKILL.md +4 -4
  43. package/pack/generated/codex/skills/rite-plan/SKILL.md +4 -4
  44. package/pack/generated/codex/skills/rite-polish/SKILL.md +4 -4
  45. package/pack/generated/codex/skills/rite-pov/SKILL.md +4 -4
  46. package/pack/generated/codex/skills/rite-pr-feedback/SKILL.md +4 -4
  47. package/pack/generated/codex/skills/rite-pressure-test/SKILL.md +4 -4
  48. package/pack/generated/codex/skills/rite-prototype/SKILL.md +4 -4
  49. package/pack/generated/codex/skills/rite-prove/SKILL.md +4 -4
  50. package/pack/generated/codex/skills/rite-quick/SKILL.md +4 -4
  51. package/pack/generated/codex/skills/rite-resolve/SKILL.md +4 -4
  52. package/pack/generated/codex/skills/rite-review/SKILL.md +4 -4
  53. package/pack/generated/codex/skills/rite-seal/SKILL.md +4 -4
  54. package/pack/generated/codex/skills/rite-ship/SKILL.md +4 -4
  55. package/pack/generated/codex/skills/rite-spec/SKILL.md +4 -4
  56. package/pack/generated/codex/skills/rite-status/SKILL.md +4 -4
  57. package/pack/generated/codex/skills/rite-temper/SKILL.md +4 -4
  58. package/pack/generated/codex/skills/rite-upgrade/SKILL.md +5 -5
  59. package/pack/generated/codex/skills/rite-vet/SKILL.md +4 -4
  60. package/pack/generated/codex/skills/rite-zoom-out/SKILL.md +4 -4
  61. package/package.json +2 -2
  62. package/scripts/check-npm-audit.mjs +110 -0
  63. package/scripts/codex-generate.sh +24 -8
  64. package/scripts/npm-audit-exceptions.json +26 -0
@@ -13,10 +13,10 @@ This is the Codex mirror of a DevRites skill. In Codex:
13
13
  - Load DevRites engineering standards from `.agents/skills/devrites-lib/reference/standards/`. Read `.agents/skills/devrites-lib/reference/standards/core.md` before workflow work, then load the other `.agents/skills/devrites-lib/reference/standards/*.md` files exactly when this skill asks for them.
14
14
  - Use the installed `devrites-engine` binary as the canonical runtime helper surface for orientation, gates, and state mutation.
15
15
  - **Invocation and dispatch are different:** invoke means run a skill in this context; dispatch means start a fresh agent with `spawn_agent`, await it, and reconcile its result. Never describe inline skill work as a dispatch.
16
- - For every DevRites specialist or writer dispatch, first call `spawn_agent` with the named `devrites-<role>` custom role. The matching project contract is `.codex/agents/devrites-<role>.toml`.
17
- - If `spawn_agent` is callable but a named read-only role is unavailable, use generic `explorer` only when the host proves that run has a runtime-enforced read-only sandbox. Tell it to read `.codex/agents/devrites-<role>.toml`, follow its `developer_instructions`, and execute the unchanged packet. A missing read-only custom role is not evidence that spawning is unavailable.
18
- - Never dispatch generic `worker` for `devrites-slice-wright` unless the host proves that worker run carries exact DevRites identity and the same `.wright-allowlist` enforcement as the named role. Codex reports a generic run as `agent_type=worker`, so the generated global hooks cannot prove that binding. Reject that unsafe rung and use the documented labelled inline wright path with `.reconcile-inline` plus the full reconcile gate.
19
- - If the host cannot prove the generic explorer is runtime read-only, reject that rung too. Only when no spawn primitive exists or a higher-priority policy rejects a safe spawn may the root run the documented discipline inline. Label it `independence: fallback`, never call it independent, and apply every fallback risk gate. An unbound generic wright or unconfined generic explorer is such a safety rejection, not evidence that no agents exist.
16
+ - Inspect the current `spawn_agent` role list. When the named `devrites-<role>` is exposed, dispatch it with `fork_turns="none"`; full-history forks inherit the parent type. The matching project contract is `.codex/agents/devrites-<role>.toml`.
17
+ - If a named role is not exposed, use generic `explorer` for every read-only role with `fork_turns="none"`. Tell it to read `.codex/agents/devrites-<role>.toml`, follow its `developer_instructions`, and execute the unchanged packet. Trusted `.codex/hooks.json` binds `agent_type=explorer` to the fail-closed reviewer read-only guard.
18
+ - For `devrites-slice-wright`, trusted `.codex/hooks.json` binds generic `worker` (`agent_type=worker`) to the active reconcile window and exact `.wright-allowlist`. Dispatch that worker with `fork_turns="none"`, tell it to read `.codex/agents/devrites-slice-wright.toml`, and execute the unchanged packet. Never create `.reconcile-inline` when this safe rung is available.
19
+ - A missing custom role is not evidence that spawning is unavailable. Only when the project hooks are unavailable or untrusted, no spawn primitive exists, or higher-priority policy rejects a safe spawn may the root run the documented discipline inline. Label it `independence: fallback`, never call it independent, create `.reconcile-inline` only for that path, and apply every fallback risk gate.
20
20
  - Wait for every required fresh-context dispatch before reconciling or advancing. A backgrounded or lost result is incomplete.
21
21
  - Codex project hooks are installed in `.codex/hooks.json`; declared-leaf hooks are scoped inside `.codex/agents/devrites-*.toml`. Review and trust them with `/hooks` before relying on hook enforcement.
22
22
  - When this skill asks a HITL question via `AskUserQuestion`: Codex's equivalent (`request_user_input`) exists only in Plan mode. Outside Plan mode, render the option set as a plain numbered list in chat and **end the turn** so the human answers: NEVER silently pick an option yourself; auto-picking is AFK's contract, gated by the `.devrites/AFK` sentinel.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devrites",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "description": "DevRites: a disciplined senior-engineer workflow pack for Claude Code and Codex",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://github.com/ViktorsBaikers/DevRites#readme",
@@ -54,7 +54,7 @@
54
54
  "test:fast": "node scripts/run-tests.mjs --fast",
55
55
  "test:parallel": "node scripts/run-tests.mjs",
56
56
  "test:serial": "node scripts/run-tests.mjs --serial",
57
- "audit": "npm audit --audit-level=moderate",
57
+ "audit": "node scripts/check-npm-audit.mjs",
58
58
  "size:baseline": "node scripts/check-instruction-size-baseline.mjs --write",
59
59
  "release": "semantic-release",
60
60
  "release:dry": "semantic-release --dry-run --no-ci"
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { readFileSync } from 'node:fs';
4
+ import { dirname, resolve } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
8
+ const args = process.argv.slice(2);
9
+ const option = (name, fallback) => {
10
+ const index = args.indexOf(name);
11
+ return index >= 0 ? args[index + 1] : fallback;
12
+ };
13
+ const input = option('--input', '');
14
+ const exceptionsPath = resolve(option('--exceptions', resolve(root, 'scripts', 'npm-audit-exceptions.json')));
15
+ const blocking = new Set(['moderate', 'high', 'critical']);
16
+ const failures = [];
17
+ const fail = (message) => failures.push(message);
18
+ const load = (path) => JSON.parse(readFileSync(path, 'utf8'));
19
+
20
+ let report;
21
+ if (input) {
22
+ report = load(resolve(input));
23
+ } else {
24
+ const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
25
+ const result = spawnSync(npm, ['audit', '--json'], { cwd: root, encoding: 'utf8' });
26
+ if (result.error || ![0, 1].includes(result.status)) {
27
+ console.error(result.stderr || result.error?.message || `npm audit exited ${result.status}`);
28
+ process.exit(1);
29
+ }
30
+ try {
31
+ report = JSON.parse(result.stdout);
32
+ } catch {
33
+ console.error('FAIL: npm audit did not return valid JSON');
34
+ process.exit(1);
35
+ }
36
+ }
37
+
38
+ const concrete = new Map();
39
+ let affected = 0;
40
+ for (const [packageName, vulnerability] of Object.entries(report.vulnerabilities || {})) {
41
+ if (!blocking.has(vulnerability.severity)) continue;
42
+ affected++;
43
+ for (const via of vulnerability.via || []) {
44
+ if (!via || typeof via !== 'object' || !blocking.has(via.severity)) continue;
45
+ const id = via.url?.match(/GHSA-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}/i)?.[0];
46
+ if (!id) {
47
+ fail(`${packageName}: blocking advisory has no GHSA identifier`);
48
+ continue;
49
+ }
50
+ const finding = concrete.get(id) || {
51
+ id,
52
+ package: via.name || packageName,
53
+ range: via.range || vulnerability.range,
54
+ source: via.url,
55
+ nodes: [],
56
+ };
57
+ finding.nodes = [...new Set([...finding.nodes, ...(vulnerability.nodes || [])])].sort();
58
+ concrete.set(id, finding);
59
+ }
60
+ }
61
+ if (affected > 0 && concrete.size === 0) fail('blocking audit findings have no concrete advisory records');
62
+
63
+ const exceptions = load(exceptionsPath);
64
+ if (!Array.isArray(exceptions)) fail('npm audit exceptions must be a JSON array');
65
+ const today = new Date().toISOString().slice(0, 10);
66
+ const seen = new Set();
67
+ for (const exception of Array.isArray(exceptions) ? exceptions : []) {
68
+ const required = ['id', 'package', 'range', 'source', 'owner', 'reason', 'expires'];
69
+ const missing = required.filter((field) => !exception?.[field]);
70
+ if (!Array.isArray(exception?.nodes) || exception.nodes.length === 0) missing.push('nodes');
71
+ if (missing.length) {
72
+ fail(`${exception?.id || 'unknown exception'}: missing ${missing.join(', ')}`);
73
+ continue;
74
+ }
75
+ if (!/^GHSA-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}$/i.test(exception.id) || !/^\d{4}-\d{2}-\d{2}$/.test(exception.expires)) {
76
+ fail(`${exception.id}: invalid id or expiry`);
77
+ continue;
78
+ }
79
+ if (seen.has(exception.id)) fail(`${exception.id}: duplicate exception`);
80
+ seen.add(exception.id);
81
+ if (exception.expires < today) fail(`${exception.id}: exception expired ${exception.expires}`);
82
+
83
+ const finding = concrete.get(exception.id);
84
+ if (!finding) {
85
+ fail(`${exception.id}: exception is stale; advisory is absent`);
86
+ continue;
87
+ }
88
+ for (const field of ['package', 'range', 'source']) {
89
+ if (exception[field] !== finding[field]) {
90
+ fail(`${exception.id}: ${field} mismatch (expected ${finding[field]})`);
91
+ }
92
+ }
93
+ if (JSON.stringify([...exception.nodes].sort()) !== JSON.stringify(finding.nodes)) {
94
+ fail(`${exception.id}: nodes mismatch (expected ${finding.nodes.join(', ')})`);
95
+ }
96
+ }
97
+ for (const finding of concrete.values()) {
98
+ if (!seen.has(finding.id)) fail(`${finding.id}: blocking advisory is not excepted`);
99
+ }
100
+
101
+ for (const message of failures) console.error(`FAIL: ${message}`);
102
+ if (failures.length) process.exit(1);
103
+ if (affected === 0) {
104
+ console.log('npm-audit: no moderate-or-higher advisories');
105
+ } else {
106
+ for (const exception of exceptions) {
107
+ console.log(`npm-audit: temporary ${exception.id} exception owned by ${exception.owner}, expires ${exception.expires}`);
108
+ }
109
+ console.log(`npm-audit: ${concrete.size} exact temporary exception(s), ${affected} affected package record(s)`);
110
+ }
@@ -60,10 +60,10 @@ gen_codex_skill_file() {
60
60
  print "- Load DevRites engineering standards from `.agents/skills/devrites-lib/reference/standards/`. Read `.agents/skills/devrites-lib/reference/standards/core.md` before workflow work, then load the other `.agents/skills/devrites-lib/reference/standards/*.md` files exactly when this skill asks for them."
61
61
  print "- Use the installed `devrites-engine` binary as the canonical runtime helper surface for orientation, gates, and state mutation."
62
62
  print "- **Invocation and dispatch are different:** invoke means run a skill in this context; dispatch means start a fresh agent with `spawn_agent`, await it, and reconcile its result. Never describe inline skill work as a dispatch."
63
- print "- For every DevRites specialist or writer dispatch, first call `spawn_agent` with the named `devrites-<role>` custom role. The matching project contract is `.codex/agents/devrites-<role>.toml`."
64
- print "- If `spawn_agent` is callable but a named read-only role is unavailable, use generic `explorer` only when the host proves that run has a runtime-enforced read-only sandbox. Tell it to read `.codex/agents/devrites-<role>.toml`, follow its `developer_instructions`, and execute the unchanged packet. A missing read-only custom role is not evidence that spawning is unavailable."
65
- print "- Never dispatch generic `worker` for `devrites-slice-wright` unless the host proves that worker run carries exact DevRites identity and the same `.wright-allowlist` enforcement as the named role. Codex reports a generic run as `agent_type=worker`, so the generated global hooks cannot prove that binding. Reject that unsafe rung and use the documented labelled inline wright path with `.reconcile-inline` plus the full reconcile gate."
66
- print "- If the host cannot prove the generic explorer is runtime read-only, reject that rung too. Only when no spawn primitive exists or a higher-priority policy rejects a safe spawn may the root run the documented discipline inline. Label it `independence: fallback`, never call it independent, and apply every fallback risk gate. An unbound generic wright or unconfined generic explorer is such a safety rejection, not evidence that no agents exist."
63
+ print "- Inspect the current `spawn_agent` role list. When the named `devrites-<role>` is exposed, dispatch it with `fork_turns=\"none\"`; full-history forks inherit the parent type. The matching project contract is `.codex/agents/devrites-<role>.toml`."
64
+ print "- If a named role is not exposed, use generic `explorer` for every read-only role with `fork_turns=\"none\"`. Tell it to read `.codex/agents/devrites-<role>.toml`, follow its `developer_instructions`, and execute the unchanged packet. Trusted `.codex/hooks.json` binds `agent_type=explorer` to the fail-closed reviewer read-only guard."
65
+ print "- For `devrites-slice-wright`, trusted `.codex/hooks.json` binds generic `worker` (`agent_type=worker`) to the active reconcile window and exact `.wright-allowlist`. Dispatch that worker with `fork_turns=\"none\"`, tell it to read `.codex/agents/devrites-slice-wright.toml`, and execute the unchanged packet. Never create `.reconcile-inline` when this safe rung is available."
66
+ print "- A missing custom role is not evidence that spawning is unavailable. Only when the project hooks are unavailable or untrusted, no spawn primitive exists, or higher-priority policy rejects a safe spawn may the root run the documented discipline inline. Label it `independence: fallback`, never call it independent, create `.reconcile-inline` only for that path, and apply every fallback risk gate."
67
67
  print "- Wait for every required fresh-context dispatch before reconciling or advancing. A backgrounded or lost result is incomplete."
68
68
  print "- Codex project hooks are installed in `.codex/hooks.json`; declared-leaf hooks are scoped inside `.codex/agents/devrites-*.toml`. Review and trust them with `/hooks` before relying on hook enforcement."
69
69
  print "- When this skill asks a HITL question via `AskUserQuestion`: Codex'\''s equivalent (`request_user_input`) exists only in Plan mode. Outside Plan mode, render the option set as a plain numbered list in chat and **end the turn** so the human answers: NEVER silently pick an option yourself; auto-picking is AFK'\''s contract, gated by the `.devrites/AFK` sentinel."
@@ -78,7 +78,7 @@ gen_codex_skill_file() {
78
78
  print ""
79
79
  print "## Codex compatibility"
80
80
  print ""
81
- print "Load DevRites engineering standards from `.agents/skills/devrites-lib/reference/standards/`. Invocation runs a skill inline; dispatch starts a fresh agent with `spawn_agent` and must be awaited. Try the named `devrites-<role>` first. A missing read-only role may fall back to generic `explorer` reading `.codex/agents/devrites-<role>.toml` only when the host proves runtime-enforced read-only sandboxing. Never use generic `worker` for the wright unless exact DevRites identity and `.wright-allowlist` enforcement are proven; Codex `agent_type=worker` does not prove them, so use the labelled inline `.reconcile-inline` path with full reconciliation. Other inline fallback requires spawning itself to be unavailable or a safe spawn to be rejected by higher-priority policy. Trust `.codex/hooks.json` and the inline hooks in `.codex/agents/devrites-*.toml` with `/hooks` before relying on hooks."
81
+ print "Load DevRites engineering standards from `.agents/skills/devrites-lib/reference/standards/`. Invocation runs a skill inline; dispatch starts a fresh agent with `spawn_agent` and must be awaited. Use an exposed named `devrites-<role>` with `fork_turns=\"none\"`; otherwise use generic `explorer` for read-only roles or generic `worker` for `devrites-slice-wright`, also with `fork_turns=\"none\"`, after telling it to read the exact `.codex/agents/devrites-<role>.toml`. Trusted `.codex/hooks.json` binds `agent_type=explorer` to read-only policy and `agent_type=worker` to the active reconcile window plus `.wright-allowlist`. Inline `.reconcile-inline` fallback is allowed only when those hooks are unavailable or untrusted, spawning is unavailable, or higher-priority policy rejects the safe rung."
82
82
  }
83
83
  }
84
84
  ' "$_src" > "$_tmp"
@@ -170,9 +170,10 @@ This project has DevRites installed for both Claude Code and Codex.
170
170
  - Before using any DevRites workflow skill, read `.agents/skills/devrites-lib/reference/standards/core.md`. Load other `.agents/skills/devrites-lib/reference/standards/*.md` files when the skill or rule index asks for them. These are DevRites engineering standards, not Codex exec-policy `.rules` files.
171
171
  - Custom Codex subagents generated from the DevRites review agents live in `.codex/agents`.
172
172
  - In DevRites guidance, **invoke** means run a skill inline in the current context; **dispatch** means start a fresh agent with `spawn_agent`, wait for it, and reconcile its result.
173
- - For a DevRites dispatch, first use the named `devrites-<role>` custom role. If a read-only role is unavailable but `spawn_agent` still works, use generic `explorer` only when the host proves runtime-enforced read-only sandboxing; tell it to read `.codex/agents/devrites-<role>.toml` before executing the unchanged packet.
174
- - Do not use generic `worker` for the wright unless exact DevRites identity and `.wright-allowlist` enforcement are proven. Codex exposes that fallback as `agent_type=worker`, which the generated leaf hooks intentionally do not treat as a declared DevRites run. Reject the unsafe worker rung and use the documented labelled inline `.reconcile-inline` path with full reconciliation.
175
- - Other inline work is allowed only when no spawn primitive exists or higher-priority policy rejects a safe spawn; label it `independence: fallback`, never independent. A missing read-only custom role alone is not such a rejection, but an unconfined generic explorer is.
173
+ - Inspect the current `spawn_agent` role list. Use an exposed named `devrites-<role>` with `fork_turns="none"`; full-history forks inherit the parent type.
174
+ - If a named role is not exposed, use generic `explorer` for read-only work with `fork_turns="none"` and tell it to read `.codex/agents/devrites-<role>.toml`. Trusted `.codex/hooks.json` binds `agent_type=explorer` to the fail-closed reviewer guard.
175
+ - For `devrites-slice-wright`, trusted `.codex/hooks.json` binds generic `worker` (`agent_type=worker`) to the active reconcile window and exact `.wright-allowlist`. Dispatch it with `fork_turns="none"`, the unchanged packet, and `.codex/agents/devrites-slice-wright.toml`.
176
+ - A missing custom role is not evidence that spawning is unavailable. Use the labelled inline `.reconcile-inline` path only when project hooks are unavailable or untrusted, spawning is unavailable, or higher-priority policy rejects the safe rung.
176
177
  - Claude Code agent hook metadata is not active in Codex. The generated Codex agents preserve read-only intent with Codex sandbox settings where possible; still follow DevRites' scope and no-mutation rules explicitly.
177
178
 
178
179
  ## Workflow contract
@@ -214,6 +215,21 @@ gen_codex_hooks_json() {
214
215
  "statusMessage": "DevRites: checking build write boundary"
215
216
  }
216
217
  ]
218
+ },
219
+ {
220
+ "matcher": "Bash|Shell|sh|exec_command|run_command|Edit|Write|MultiEdit|NotebookEdit|apply_patch|exec|js|python|computer|computer_use|write_stdin|run_code|Agent|Task|spawn_agent|delegate|dispatch_agent|create_agent",
221
+ "hooks": [
222
+ {
223
+ "type": "command",
224
+ "command": "payload=\"$(cat)\"; if ! command -v devrites-engine >/dev/null 2>&1; then if printf '%s' \"$payload\" | grep -Eq '\"agent_type\"[[:space:]]*:[[:space:]]*\"(explorer|worker)\"'; then printf '%s\\n' 'DevRites: generic Codex leaf guard unavailable; install or repair devrites-engine. (devrites-codex-generic-guard)' >&2; exit 2; fi; exit 0; fi; cd \"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\" 2>/dev/null || { printf '%s\\n' 'DevRites: cannot resolve the project root for a generic Codex leaf. (devrites-codex-generic-guard)' >&2; exit 2; }; printf '%s' \"$payload\" | DEVRITES_CODEX_GENERIC_AGENT_COMPAT=1 devrites-engine hook reviewer-readonly --harness=codex; rc=$?; case \"$rc\" in 0) exit 0 ;; 2) exit 2 ;; *) printf '%s\\n' 'DevRites: generic Codex reviewer guard unavailable or crashed; install or repair devrites-engine. (devrites-codex-generic-guard)' >&2; exit 2 ;; esac",
225
+ "statusMessage": "DevRites: checking generic reviewer boundary"
226
+ },
227
+ {
228
+ "type": "command",
229
+ "command": "payload=\"$(cat)\"; if ! command -v devrites-engine >/dev/null 2>&1; then if printf '%s' \"$payload\" | grep -Eq '\"agent_type\"[[:space:]]*:[[:space:]]*\"(explorer|worker)\"'; then printf '%s\\n' 'DevRites: generic Codex leaf guard unavailable; install or repair devrites-engine. (devrites-codex-generic-guard)' >&2; exit 2; fi; exit 0; fi; cd \"$(git rev-parse --show-toplevel 2>/dev/null || pwd)\" 2>/dev/null || { printf '%s\\n' 'DevRites: cannot resolve the project root for a generic Codex leaf. (devrites-codex-generic-guard)' >&2; exit 2; }; printf '%s' \"$payload\" | DEVRITES_CODEX_GENERIC_AGENT_COMPAT=1 devrites-engine hook wright-scope --harness=codex; rc=$?; case \"$rc\" in 0) exit 0 ;; 2) exit 2 ;; *) printf '%s\\n' 'DevRites: generic Codex wright guard unavailable or crashed; install or repair devrites-engine. (devrites-codex-generic-guard)' >&2; exit 2 ;; esac",
230
+ "statusMessage": "DevRites: checking generic wright boundary"
231
+ }
232
+ ]
217
233
  }
218
234
  ],
219
235
  "PostToolUse": [
@@ -0,0 +1,26 @@
1
+ [
2
+ {
3
+ "id": "GHSA-r292-9mhp-454m",
4
+ "package": "tar",
5
+ "range": "<=7.5.20",
6
+ "nodes": [
7
+ "node_modules/npm/node_modules/tar"
8
+ ],
9
+ "source": "https://github.com/advisories/GHSA-r292-9mhp-454m",
10
+ "owner": "release-maintainers",
11
+ "reason": "npm@11.18.0 bundles tar@7.5.19 through @semantic-release/npm. The plugin invokes npm for authentication and publishing operations over trusted local source; it does not select or extract members from untrusted tar archives. Remove this exception as soon as npm bundles tar@7.5.21 or newer.",
12
+ "expires": "2026-08-07"
13
+ },
14
+ {
15
+ "id": "GHSA-mh99-v99m-4gvg",
16
+ "package": "brace-expansion",
17
+ "range": "<=5.0.7",
18
+ "nodes": [
19
+ "node_modules/npm/node_modules/brace-expansion"
20
+ ],
21
+ "source": "https://github.com/advisories/GHSA-mh99-v99m-4gvg",
22
+ "owner": "release-maintainers",
23
+ "reason": "npm@11.18.0 bundles brace-expansion@5.0.7 through minimatch@10.2.5 via @semantic-release/npm. npm's bundled dependency tree ignores root overrides and npm audit cannot repair it; npm@12.0.1 and npm/cli's current source lock still contain 5.0.7. The release workflow supplies only repository-controlled package patterns. Remove this exception as soon as npm bundles brace-expansion@5.0.8 or newer.",
24
+ "expires": "2026-08-01"
25
+ }
26
+ ]