@windyroad/voice-tone 0.5.4 → 0.5.5-preview.396
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
|
@@ -15,7 +15,7 @@ The voice-tone plugin:
|
|
|
15
15
|
3. **Reviews** the proposed copy against your `docs/VOICE-AND-TONE.md` guide
|
|
16
16
|
4. **Reports** violations with suggested fixes that match your brand's voice principles, banned patterns, and word list
|
|
17
17
|
|
|
18
|
-
Beyond in-repo edits, the plugin also gates **external communications** — `gh issue create`, `gh pr create`, `gh issue/pr comment`, `gh api security-advisories`, `npm publish`, and `.changeset/*.md` author-time — via the [`wr-voice-tone:external-comms`](agents/external-comms.md) subagent and the on-demand [`/wr-voice-tone:assess-external-comms`](skills/assess-external-comms/SKILL.md) skill. This composes with `@windyroad/risk-scorer`'s sibling external-comms gate (see [ADR-028 amended 2026-05-14](../../docs/decisions/028-voice-tone-gate-external-comms.proposed.md)) — when both plugins are installed, voice/tone and risk/leak review fire independently on the same outbound prose call.
|
|
18
|
+
Beyond in-repo edits, the plugin also gates **external communications** — `gh issue create`, `gh pr create`, `gh issue/pr comment`, `gh api security-advisories`, `npm publish`, and `.changeset/*.md` author-time — via the [`wr-voice-tone:external-comms`](agents/external-comms.md) subagent and the on-demand [`/wr-voice-tone:assess-external-comms`](skills/assess-external-comms/SKILL.md) skill. This composes with `@windyroad/risk-scorer`'s sibling external-comms gate (see [ADR-028 amended 2026-05-14](../../docs/decisions/028-voice-tone-gate-external-comms.proposed.md)) — when both plugins are installed, voice/tone and risk/leak review fire independently on the same outbound prose call. This serves automatic governance enforcement on every copy edit and on-demand pre-flight governance checks before a release or handover.
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
@@ -52,22 +52,6 @@ The `wr-voice-tone:agent` reads your `docs/VOICE-AND-TONE.md` and reviews propos
|
|
|
52
52
|
- Banned words and patterns
|
|
53
53
|
- Preferred terminology
|
|
54
54
|
|
|
55
|
-
## Jobs to be Done
|
|
56
|
-
|
|
57
|
-
This plugin serves the [Jobs to be Done](../../docs/jtbd/) below. Per [ADR-051](../../docs/decisions/051-jtbd-anchored-readme-with-drift-advisory.proposed.md), the persona-grouped JTBD anchor is the canonical source of truth for the README's value framing.
|
|
58
|
-
|
|
59
|
-
### Solo developer
|
|
60
|
-
|
|
61
|
-
- **[JTBD-001 Enforce Governance Without Slowing Down](../../docs/jtbd/solo-developer/JTBD-001-enforce-governance.proposed.md)** — voice-and-tone review fires automatically on every user-facing copy edit; the project's own voice guide is the policy source rather than the agent's defaults.
|
|
62
|
-
|
|
63
|
-
### Tech lead / consultant
|
|
64
|
-
|
|
65
|
-
- **[JTBD-202 Run Pre-Flight Governance Checks Before Release or Handover](../../docs/jtbd/tech-lead/JTBD-202-pre-flight-governance-check.proposed.md)** — voice-and-tone alignment is reviewable on demand before a release or client handover.
|
|
66
|
-
|
|
67
|
-
### Plugin user
|
|
68
|
-
|
|
69
|
-
- **[JTBD-302 Trust That the README Describes the Plugin I Just Installed](../../docs/jtbd/plugin-user/JTBD-302-trust-readme-describes-installed-behaviour.proposed.md)** — this README is anchored on current JTBD job IDs; drift between prose and shipped behaviour is detectable at retro time per ADR-051.
|
|
70
|
-
|
|
71
55
|
## Updating and Uninstalling
|
|
72
56
|
|
|
73
57
|
```bash
|
|
@@ -233,7 +233,7 @@ fi
|
|
|
233
233
|
# EXTERNAL_COMMS_LEAK_PREFILTER=yes (risk) or =no (voice-tone).
|
|
234
234
|
if [ "$EXTERNAL_COMMS_LEAK_PREFILTER" = "yes" ]; then
|
|
235
235
|
if ! leak_detect_scan "$DRAFT"; then
|
|
236
|
-
REASON=$(printf 'BLOCKED (external-comms gate / %s evaluator): %s on %s. Remove the leak before retrying. Override only if intentional: BYPASS_RISK_GATE=1.' \
|
|
236
|
+
REASON=$(printf 'BLOCKED (external-comms gate / %s evaluator): %s on %s. Remove the leak before retrying. Override only if intentional (pre-session env): BYPASS_RISK_GATE=1.' \
|
|
237
237
|
"$EXTERNAL_COMMS_EVALUATOR_ID" "$LEAK_DETECT_REASON" "$SURFACE")
|
|
238
238
|
deny_with_reason "$REASON"
|
|
239
239
|
exit 0
|
|
@@ -261,7 +261,7 @@ fi
|
|
|
261
261
|
# PostToolUse mark hook can derive the canonical marker key locally
|
|
262
262
|
# (sha256(DRAFT + '\n' + SURFACE)). Single fire per gate cycle.
|
|
263
263
|
VERDICT_PREFIX="${EXTERNAL_COMMS_VERDICT_PREFIX:-EXTERNAL_COMMS_${EXTERNAL_COMMS_EVALUATOR_ID^^}}"
|
|
264
|
-
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. Use %s for an interactive walkthrough. Override only when intentional: BYPASS_RISK_GATE=1.' \
|
|
264
|
+
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. Use %s for an interactive walkthrough. Override only when intentional (pre-session env): BYPASS_RISK_GATE=1.' \
|
|
265
265
|
"$EXTERNAL_COMMS_EVALUATOR_ID" "$SURFACE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$EXTERNAL_COMMS_SUBAGENT_TYPE" "$SURFACE" "$VERDICT_PREFIX" "$EXTERNAL_COMMS_ASSESS_SKILL")
|
|
266
266
|
deny_with_reason "$REASON"
|
|
267
267
|
exit 0
|
|
@@ -84,6 +84,18 @@ run_hook() {
|
|
|
84
84
|
[[ "$output" == *"wr-voice-tone:external-comms"* ]]
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
# P173: the BYPASS_RISK_GATE override is clarified as pre-session — it only
|
|
88
|
+
# takes effect when set in Claude Code's process env before the session
|
|
89
|
+
# started, not via a mid-session Bash export. The in-flight escape-hatch is
|
|
90
|
+
# delegation to the external-comms subagent (already named in the deny).
|
|
91
|
+
@test "P173 marker-absent deny clarifies the env override is pre-session" {
|
|
92
|
+
INPUT=$(build_bash_input "gh issue create --title T --body 'we observed a build failure on Node 20'")
|
|
93
|
+
run_hook "$INPUT"
|
|
94
|
+
[ "$status" -eq 0 ]
|
|
95
|
+
[[ "$output" == *"deny"* ]]
|
|
96
|
+
[[ "$output" == *"pre-session"* ]]
|
|
97
|
+
}
|
|
98
|
+
|
|
87
99
|
@test "voice-tone evaluator skips leak pre-filter (EXTERNAL_COMMS_LEAK_PREFILTER=no)" {
|
|
88
100
|
# A draft with leak-shaped content (revenue figure with business context) would
|
|
89
101
|
# hard-fail in the risk evaluator. The voice-tone gate must NOT hard-fail; leak
|