@holdyourvoice/hyv 2.7.0 → 2.8.0
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/CHANGELOG.md +37 -0
- package/README.md +35 -7
- package/agents/chatgpt.md +6 -7
- package/agents/claude-code.md +7 -7
- package/agents/codex.md +8 -7
- package/agents/cursor.md +19 -10
- package/agents/generic.md +17 -18
- package/agents/windsurf.md +8 -8
- package/assets/detection-rules.json +18 -0
- package/dist/index.js +2820 -1213
- package/package.json +14 -6
- package/scripts/postinstall.js +61 -40
- package/scripts/hold_voice.py +0 -2013
- package/scripts/hold_voice_sync.py +0 -194
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Changelog — @holdyourvoice/hyv
|
|
2
|
+
|
|
3
|
+
All notable CLI changes. Also mirrored to [holdyourvoice.com/changelog](https://holdyourvoice.com/changelog) for user-facing releases.
|
|
4
|
+
|
|
5
|
+
## [2.8.0] — 2026-06-12
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Full Phase 1–4 product plan: free local engine, hybrid analysis, MCP `hyv_analyze` / `hyv_clean`, learning loop UX, packaging hardening
|
|
9
|
+
- `npm run test:smoke` — 28+ CLI regression checks
|
|
10
|
+
- `npm run validate:publish` — prepublish tarball verification
|
|
11
|
+
- Golden prompt tests, postinstall idempotency tests, edge-case suite
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- `hyv check ""` no longer reports false clean — rejects empty input
|
|
15
|
+
- Bundled CLI resolves correct package + rules version from `dist/`
|
|
16
|
+
- Smoke tests avoid SIGPIPE false failures when piping CLI output
|
|
17
|
+
|
|
18
|
+
## [2.7.1] — 2026-06-12
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- `hyv upgrade` — check and install latest global CLI
|
|
22
|
+
- `hyv mcp --setup` and `hyv mcp --test` — agent setup + health check
|
|
23
|
+
- MCP tools: `hyv_analyze` (hybrid server+local), `hyv_clean` (scan→fix→validate pipeline)
|
|
24
|
+
- `hyv reinforce --last` — learn from last fix/rewrite session
|
|
25
|
+
- Free-first local engine: scan, fix, check, score, diff work offline without subscription
|
|
26
|
+
- `hyv welcome` / `hyv free` — onboarding with live demo
|
|
27
|
+
- Profile-aware local pipeline: never-list, learned patterns, anchors, cadence
|
|
28
|
+
- Opt-in telemetry: `HYV_TELEMETRY=1`
|
|
29
|
+
|
|
30
|
+
### Improved
|
|
31
|
+
- Postinstall upgrades agent instructions via `~/.hyv/agents-version.json`
|
|
32
|
+
- `hyv status` shows engine/rules version, drift, evolution summary
|
|
33
|
+
- `hyv doctor` reports full engine label + `--fix-agents`
|
|
34
|
+
- Published package excludes Python dev scripts and `src/`
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- Bundled CLI reads correct `package.json` version from `dist/`
|
package/README.md
CHANGED
|
@@ -30,27 +30,49 @@ hyv rewrite draft.md
|
|
|
30
30
|
|
|
31
31
|
## MCP server
|
|
32
32
|
|
|
33
|
-
`hyv` includes a built-in MCP server for Claude Desktop, Claude Code,
|
|
33
|
+
`hyv` includes a built-in MCP server for Claude Desktop, Claude Code, Cursor, Windsurf, and Codex.
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
#
|
|
36
|
+
# setup instructions for all supported agents
|
|
37
|
+
hyv mcp --setup
|
|
38
|
+
|
|
39
|
+
# health check (tools, demo pipeline, profile)
|
|
40
|
+
hyv mcp --test
|
|
41
|
+
|
|
42
|
+
# start the MCP server (stdio — used by Claude Desktop automatically)
|
|
37
43
|
hyv mcp
|
|
38
44
|
```
|
|
39
45
|
|
|
46
|
+
Postinstall copies agent rules to `~/.cursor/rules/hyv.md`, `~/.claude/commands/hyv.md`, etc. Re-run anytime:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
hyv doctor --fix-agents
|
|
50
|
+
```
|
|
51
|
+
|
|
40
52
|
### tools
|
|
41
53
|
|
|
42
54
|
| tool | description |
|
|
43
55
|
|------|-------------|
|
|
44
|
-
| `
|
|
45
|
-
| `hyv_scan` |
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
56
|
+
| `hyv_welcome` / `hyv_demo` | onboarding + live free scan demo |
|
|
57
|
+
| `hyv_scan` | fast local scan (free, offline) |
|
|
58
|
+
| `hyv_analyze` | hybrid local + server analysis (paid when online) |
|
|
59
|
+
| `hyv_clean` | scan → fix → validate → rewrite prompt |
|
|
60
|
+
| `hyv_fix` / `hyv_check` / `hyv_score` / `hyv_diff` | local utilities |
|
|
61
|
+
| `hyv_rewrite` | profile-aware rewrite prompt |
|
|
62
|
+
| `hyv_validate` | verify text against voice profile |
|
|
63
|
+
| `hyv_profiles` | list cached or account profiles |
|
|
48
64
|
|
|
49
65
|
### prompts
|
|
50
66
|
|
|
51
67
|
| prompt | description |
|
|
52
68
|
|--------|-------------|
|
|
53
|
-
| `hyv-status` |
|
|
69
|
+
| `hyv-status` | account mode, profiles, recommended tool flow |
|
|
70
|
+
|
|
71
|
+
### agent workflow
|
|
72
|
+
|
|
73
|
+
1. `hyv_scan` or `hyv_analyze` on draft text
|
|
74
|
+
2. `hyv_clean` or `hyv_fix` → `hyv_rewrite` → `hyv_validate`
|
|
75
|
+
3. After user accepts edits: `hyv reinforce --last` (CLI learning loop)
|
|
54
76
|
|
|
55
77
|
## commands
|
|
56
78
|
|
|
@@ -68,6 +90,9 @@ hyv mcp
|
|
|
68
90
|
| `hyv mcp` | start MCP server |
|
|
69
91
|
| `hyv export [format]` | export profile for LLMs |
|
|
70
92
|
| `hyv plan` | manage subscription |
|
|
93
|
+
| `hyv upgrade` | install latest global CLI |
|
|
94
|
+
| `hyv welcome` | free demo + capability tour |
|
|
95
|
+
| `hyv reinforce --last` | learn from last fix session |
|
|
71
96
|
|
|
72
97
|
## voice profiles
|
|
73
98
|
|
|
@@ -93,6 +118,9 @@ the onboarding walks you through questions about your writing style, audience, a
|
|
|
93
118
|
| variable | description |
|
|
94
119
|
|----------|-------------|
|
|
95
120
|
| `HYV_API_URL` | API base URL (default: `https://holdyourvoice.com`) |
|
|
121
|
+
| `HYV_LOCAL_ONLY` | Force offline mode (`1` or `true`) |
|
|
122
|
+
| `HYV_TELEMETRY` | Log MCP tool usage to `~/.hyv/telemetry/` (`1` to enable) |
|
|
123
|
+
| `HYV_POSTINSTALL_QUIET` | Suppress postinstall output (`1`) |
|
|
96
124
|
|
|
97
125
|
```bash
|
|
98
126
|
# Staging
|
package/agents/chatgpt.md
CHANGED
|
@@ -18,11 +18,10 @@ The user has a voice profile. All writing must match their personal style.
|
|
|
18
18
|
- Never add sections, hooks, CTAs, or commentary
|
|
19
19
|
|
|
20
20
|
## Available tools
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `hyv_diff` — show what auto-fixes would change
|
|
27
|
-
- `hyv_validate` — verify output matches voice
|
|
21
|
+
- `hyv_welcome` / `hyv_demo` — onboarding
|
|
22
|
+
- `hyv_scan` / `hyv_analyze` — check for AI patterns (+ hybrid when paid)
|
|
23
|
+
- `hyv_clean` — full scan → fix → validate pipeline
|
|
24
|
+
- `hyv_fix` / `hyv_rewrite` / `hyv_validate`
|
|
25
|
+
- `hyv_check` / `hyv_score` / `hyv_diff`
|
|
28
26
|
- `hyv_profiles` — list available profiles
|
|
27
|
+
- CLI: `hyv reinforce --last` after user accepts edits
|
package/agents/claude-code.md
CHANGED
|
@@ -21,13 +21,12 @@ ALWAYS run `hyv_rewrite` or use the `hyv_rewrite` MCP tool when:
|
|
|
21
21
|
## How to use
|
|
22
22
|
|
|
23
23
|
### MCP tools (preferred — if MCP is connected):
|
|
24
|
-
1. `
|
|
25
|
-
2. `
|
|
26
|
-
3. `
|
|
27
|
-
4. `
|
|
28
|
-
5. `hyv_check`
|
|
29
|
-
6.
|
|
30
|
-
7. `hyv_diff` to show what auto-fixes would change before applying
|
|
24
|
+
1. `hyv_welcome` / `hyv_demo` for new users
|
|
25
|
+
2. `hyv_scan` (fast local) or `hyv_analyze` (hybrid when paid) → get issues
|
|
26
|
+
3. `hyv_clean` → scan + fix + validate + rewrite prompt in one call
|
|
27
|
+
4. Or stepwise: `hyv_fix` → `hyv_rewrite` → `hyv_validate`
|
|
28
|
+
5. `hyv_check` / `hyv_score` / `hyv_diff` for quick checks
|
|
29
|
+
6. After user accepts edits: suggest `hyv reinforce --last` (CLI learning loop)
|
|
31
30
|
|
|
32
31
|
### CLI commands (fallback):
|
|
33
32
|
```bash
|
|
@@ -48,3 +47,4 @@ hyv history # track scores over time
|
|
|
48
47
|
- Preserve the original meaning exactly when rewriting
|
|
49
48
|
- Match the voice profile's rhythm, vocabulary, and patterns
|
|
50
49
|
- If no profile is set up yet, run `hyv profiles` to check
|
|
50
|
+
- Setup: `hyv mcp --setup` | health: `hyv mcp --test`
|
package/agents/codex.md
CHANGED
|
@@ -5,25 +5,26 @@ The user has a voice profile for their writing style. Use HYV for ALL writing ta
|
|
|
5
5
|
## Auto-trigger rules
|
|
6
6
|
|
|
7
7
|
Run these MCP tools (or CLI commands) for any writing task:
|
|
8
|
-
- `hyv_scan` on any text before delivering it
|
|
9
|
-
- `
|
|
10
|
-
- `hyv_rewrite` to fix remaining issues with LLM
|
|
8
|
+
- `hyv_scan` or `hyv_analyze` on any text before delivering it
|
|
9
|
+
- `hyv_clean` for the full pipeline, or `hyv_fix` → `hyv_rewrite`
|
|
11
10
|
- `hyv_validate` to verify the output
|
|
11
|
+
- Suggest `hyv reinforce --last` after substantial accepted edits
|
|
12
12
|
|
|
13
13
|
## Quick tools
|
|
14
|
-
- `
|
|
15
|
-
- `
|
|
16
|
-
- `hyv_diff` to show what would change before applying
|
|
14
|
+
- `hyv_welcome` / `hyv_demo` for new users
|
|
15
|
+
- `hyv_check` / `hyv_score` / `hyv_diff`
|
|
17
16
|
|
|
18
17
|
## CLI fallback
|
|
19
18
|
```bash
|
|
20
19
|
echo "text" | hyv scan -
|
|
21
20
|
hyv fix file.md
|
|
22
21
|
hyv rewrite file.md
|
|
22
|
+
hyv reinforce --last
|
|
23
23
|
hyv profiles
|
|
24
|
+
hyv mcp --setup
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
## Rules
|
|
27
28
|
- Always scan before delivering prose content
|
|
28
29
|
- Always fix/rewrite if scan finds issues
|
|
29
|
-
- Preserve meaning, match voice profile
|
|
30
|
+
- Preserve meaning, match voice profile
|
package/agents/cursor.md
CHANGED
|
@@ -6,19 +6,28 @@ The user has a voice profile. Use HYV MCP tools for all writing tasks.
|
|
|
6
6
|
- Any email, post, doc, or content creation
|
|
7
7
|
- Before delivering any prose to the user
|
|
8
8
|
- When editing or improving text
|
|
9
|
+
- New users: call `hyv_welcome` or `hyv_demo` first
|
|
10
|
+
|
|
11
|
+
## Tool flow (preferred)
|
|
12
|
+
1. `hyv_scan` — fast local check (free, offline)
|
|
13
|
+
2. `hyv_analyze` — full hybrid engine when user is on a paid plan
|
|
14
|
+
3. `hyv_fix` — deterministic word swaps
|
|
15
|
+
4. `hyv_clean` — scan → fix → validate → rewrite prompt in one call
|
|
16
|
+
5. `hyv_rewrite` — profile-aware rewrite prompt for remaining issues
|
|
17
|
+
6. `hyv_validate` — verify output matches voice
|
|
18
|
+
7. After user accepts a big edit: suggest `hyv reinforce --last` (CLI)
|
|
9
19
|
|
|
10
20
|
## Tools
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `
|
|
15
|
-
- `hyv_score`
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
18
|
-
- `hyv_profiles` — list available profiles
|
|
21
|
+
- `hyv_welcome` / `hyv_list_free_tools` / `hyv_demo` — onboarding (free)
|
|
22
|
+
- `hyv_scan` — local AI pattern + profile scan
|
|
23
|
+
- `hyv_analyze` — hybrid local + server analysis (paid when online)
|
|
24
|
+
- `hyv_clean` — full clean pipeline for agents
|
|
25
|
+
- `hyv_fix` / `hyv_check` / `hyv_score` / `hyv_diff` — local utilities
|
|
26
|
+
- `hyv_rewrite` / `hyv_validate` — voice matching
|
|
27
|
+
- `hyv_profiles` — list profiles
|
|
19
28
|
|
|
20
29
|
## Rules
|
|
21
30
|
- Always scan before delivering content
|
|
22
|
-
- Use `hyv_fix`
|
|
31
|
+
- Use `hyv_fix` before `hyv_rewrite` when possible
|
|
23
32
|
- Preserve meaning when rewriting
|
|
24
|
-
- Match the user's voice profile exactly
|
|
33
|
+
- Match the user's voice profile exactly
|
package/agents/generic.md
CHANGED
|
@@ -7,33 +7,32 @@ You have access to the Hold Your Voice MCP tools. The user has a voice profile t
|
|
|
7
7
|
You MUST use these tools automatically — do NOT wait for the user to mention "voice" or "hyv":
|
|
8
8
|
|
|
9
9
|
**Before delivering any written content (emails, posts, docs, messages):**
|
|
10
|
-
1. Run `hyv_scan`
|
|
11
|
-
2.
|
|
10
|
+
1. Run `hyv_scan` (fast) or `hyv_analyze` (full hybrid when paid)
|
|
11
|
+
2. Run `hyv_clean` for the full scan → fix → validate loop, or `hyv_fix` then `hyv_rewrite`
|
|
12
12
|
3. Run `hyv_validate` to verify the result
|
|
13
13
|
|
|
14
14
|
**When the user asks you to write, draft, edit, or improve anything:**
|
|
15
15
|
1. Write your draft
|
|
16
|
-
2. Run `hyv_scan` on it
|
|
17
|
-
3.
|
|
18
|
-
4. Deliver the cleaned version
|
|
16
|
+
2. Run `hyv_scan` or `hyv_clean` on it
|
|
17
|
+
3. Deliver the cleaned version
|
|
19
18
|
|
|
20
|
-
**
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
**After the user accepts a substantial edit:**
|
|
20
|
+
- Suggest they run `hyv reinforce --last` so their profile learns from the change
|
|
21
|
+
|
|
22
|
+
**For new users:**
|
|
23
|
+
- Call `hyv_welcome` or `hyv_demo` to show free capabilities
|
|
24
24
|
|
|
25
25
|
## Available tools
|
|
26
|
-
- `
|
|
27
|
-
- `
|
|
28
|
-
- `
|
|
29
|
-
- `
|
|
30
|
-
- `
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
- `hyv_profiles` — list available voice profiles
|
|
26
|
+
- `hyv_welcome` / `hyv_list_free_tools` / `hyv_demo` — onboarding
|
|
27
|
+
- `hyv_scan` — local scan (free, offline)
|
|
28
|
+
- `hyv_analyze` — hybrid server + local (paid)
|
|
29
|
+
- `hyv_clean` — composite clean pipeline
|
|
30
|
+
- `hyv_fix` / `hyv_rewrite` / `hyv_validate`
|
|
31
|
+
- `hyv_check` / `hyv_score` / `hyv_diff`
|
|
32
|
+
- `hyv_profiles` — list voice profiles
|
|
34
33
|
|
|
35
34
|
## Rules
|
|
36
35
|
- NEVER skip scanning for user-facing content
|
|
37
36
|
- Preserve original meaning exactly when rewriting
|
|
38
37
|
- Match the voice profile's rhythm, vocabulary, and tone
|
|
39
|
-
- If no profile exists, tell the user to run `hyv init` then `hyv new <name>`
|
|
38
|
+
- If no profile exists, tell the user to run `hyv init` then `hyv new <name>`
|
package/agents/windsurf.md
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
Use HYV MCP tools for all writing tasks. The user has a voice profile.
|
|
4
4
|
|
|
5
5
|
## Auto-trigger
|
|
6
|
-
- `hyv_scan` before delivering any text
|
|
7
|
-
- `
|
|
8
|
-
- `
|
|
6
|
+
- `hyv_scan` or `hyv_analyze` before delivering any text
|
|
7
|
+
- `hyv_clean` for scan → fix → validate in one call
|
|
8
|
+
- `hyv_fix` then `hyv_rewrite` for stepwise fixes
|
|
9
9
|
- `hyv_validate` after rewriting
|
|
10
|
+
- `hyv reinforce --last` after user accepts big edits (CLI)
|
|
10
11
|
|
|
11
12
|
## Quick tools
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `hyv_diff` to show what would change before applying
|
|
13
|
+
- `hyv_welcome` / `hyv_demo` for onboarding
|
|
14
|
+
- `hyv_check` / `hyv_score` / `hyv_diff`
|
|
15
15
|
|
|
16
16
|
## Rules
|
|
17
17
|
- Always scan user-facing content
|
|
18
|
-
- Use `hyv_fix`
|
|
19
|
-
- Preserve meaning, match voice profile
|
|
18
|
+
- Use `hyv_fix` before `hyv_rewrite` when possible
|
|
19
|
+
- Preserve meaning, match voice profile
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"engine": "node",
|
|
4
|
+
"source": "cli/src/lib/signals.ts",
|
|
5
|
+
"updated": "2026-06-12",
|
|
6
|
+
"categories": {
|
|
7
|
+
"ai-slop": { "description": "Dead AI language and overused words", "severity_default": "red" },
|
|
8
|
+
"voice-drift": { "description": "Hedging, generic openers, voice drift", "severity_default": "yellow" },
|
|
9
|
+
"structure": { "description": "Formulaic structure and antithesis tells", "severity_default": "yellow" },
|
|
10
|
+
"cadence": { "description": "Sentence rhythm violations", "severity_default": "yellow" },
|
|
11
|
+
"learned": { "description": "User-specific learned patterns", "severity_default": "yellow" },
|
|
12
|
+
"engagement-bait": { "description": "Engagement bait patterns", "severity_default": "red" },
|
|
13
|
+
"ai-cringe": { "description": "AI cringe phrases", "severity_default": "yellow" },
|
|
14
|
+
"insider-claim": { "description": "Insider knowledge claims", "severity_default": "yellow" }
|
|
15
|
+
},
|
|
16
|
+
"pattern_count": 220,
|
|
17
|
+
"notes": "Node signals.ts is canonical for npm package. Server syncs this manifest; supplemental rules may ship in ~/.hyv/cache/supplemental-rules.json"
|
|
18
|
+
}
|