@windyroad/voice-tone 0.8.1 → 0.8.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.
@@ -123,5 +123,5 @@
123
123
  }
124
124
  },
125
125
  "name": "wr-voice-tone",
126
- "version": "0.8.1"
126
+ "version": "0.8.2"
127
127
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wr-voice-tone",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Voice, tone, and external-communications governance",
5
5
  "author": {
6
6
  "name": "Windy Road Technology",
package/agents/agent.md CHANGED
@@ -31,7 +31,7 @@ Output shape when the guide is absent:
31
31
  > **Voice & Tone Review: PASS**
32
32
  > voice-tone gate inactive — no `docs/VOICE-AND-TONE.md` present. Run `/wr-voice-tone:update-guide` to enable voice-tone reviews.
33
33
 
34
- Then `printf 'PASS' > /tmp/voice-tone-verdict` and stop.
34
+ Then stop.
35
35
 
36
36
  ## What You Check
37
37
 
@@ -71,17 +71,15 @@ If the code introduces a UI context, audience, or copy pattern not covered by `d
71
71
  > The code introduces [context/audience/pattern] which is not covered by the current voice and tone guide.
72
72
  > Recommended addition to `docs/VOICE-AND-TONE.md`: [specific section/content to add]
73
73
 
74
- This is a FAIL verdict — the guide must be updated before the code can proceed. Write `printf 'FAIL' > /tmp/voice-tone-verdict` for guide gaps.
74
+ This is a FAIL verdict — the guide must be updated before the code can proceed.
75
75
 
76
76
  ## Verdict
77
77
 
78
- After completing your review, write your verdict to `/tmp/voice-tone-verdict`:
79
- - `printf 'PASS' > /tmp/voice-tone-verdict` — copy is compliant and guide covers the context
80
- - `printf 'FAIL' > /tmp/voice-tone-verdict` — violations found or guide gap detected
78
+ After completing your review, emit exactly one canonical verdict heading from the report shapes above. The PostToolUse hook parses the first canonical heading and writes any gate marker; you do not write marker files.
81
79
 
82
80
  ## Constraints
83
81
 
84
- - You are read-only. You do not edit files (except writing the verdict file).
82
+ - You are read-only. You do not edit files.
85
83
  - You review copy in user-facing source files.
86
84
  - If the change is purely structural (no user-visible text changes), report PASS.
87
85
  - Do not block styling-only changes (CSS classes, layout, imports with no copy).
@@ -6,10 +6,11 @@
6
6
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
7
7
  source "$SCRIPT_DIR/lib/review-gate.sh"
8
8
 
9
- INPUT=$(cat)
9
+ _parse_input
10
10
 
11
- SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // empty') || true
12
- SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty') || true
11
+ [ "$(_get_tool_name)" = "Agent" ] || exit 0
12
+ SUBAGENT=$(_get_subagent_type)
13
+ SESSION_ID=$(_get_session_id)
13
14
 
14
15
  if [ -z "$SESSION_ID" ]; then
15
16
  exit 0
@@ -17,32 +18,20 @@ fi
17
18
 
18
19
  case "$SUBAGENT" in
19
20
  *voice-and-tone-lead*|*wr-voice-tone*)
20
- VERDICT_FILE="/tmp/voice-tone-verdict"
21
- VERDICT=""
22
- if [ -f "$VERDICT_FILE" ]; then
23
- VERDICT=$(cat "$VERDICT_FILE")
24
- rm -f "$VERDICT_FILE"
25
- fi
21
+ HEADING=$(printf '%s\n' "$(_get_tool_output)" \
22
+ | sed -nE 's/^[[:space:]]*>?[[:space:]]*\*\*(Voice \& Tone Review: (PASS|VIOLATIONS FOUND|GUIDE UPDATE NEEDED))\*\*.*/\1/p' \
23
+ | head -n 1)
26
24
 
27
- case "$VERDICT" in
28
- PASS)
25
+ case "$HEADING" in
26
+ "Voice & Tone Review: PASS")
29
27
  touch "/tmp/voice-tone-reviewed-${SESSION_ID}"
30
28
  store_review_hash "$SESSION_ID" "voice-tone" "docs/VOICE-AND-TONE.md"
31
- ;;
32
- FAIL)
33
- # Do NOT create marker — review found issues
29
+ touch "/tmp/voice-tone-plan-reviewed-${SESSION_ID}"
34
30
  ;;
35
31
  *)
36
- # No verdict file — backward compat, allow with marker
37
- touch "/tmp/voice-tone-reviewed-${SESSION_ID}"
38
- store_review_hash "$SESSION_ID" "voice-tone" "docs/VOICE-AND-TONE.md"
32
+ # Fail closed: issues and unparseable output do not unlock edits.
39
33
  ;;
40
34
  esac
41
-
42
- # Plan review: agent completion = reviewed.
43
- # The main agent must actually run the review agent to reach this hook.
44
- # No verdict file needed — PostToolUse:Agent is the unforgeable signal.
45
- touch "/tmp/voice-tone-plan-reviewed-${SESSION_ID}"
46
35
  ;;
47
36
  esac
48
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/voice-tone",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Voice and tone enforcement for user-facing copy",
5
5
  "bin": {
6
6
  "windyroad-voice-tone": "./bin/install.mjs"
@@ -33,6 +33,7 @@
33
33
  ".claude-plugin/",
34
34
  ".codex-plugin/",
35
35
  "lib/",
36
+ "!agents/eval/",
36
37
  "!hooks/test/"
37
38
  ]
38
39
  }