@holdyourvoice/hyv 2.7.1 → 2.8.1

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 ADDED
@@ -0,0 +1,42 @@
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.1] — 2026-06-12
6
+
7
+ ### Fixed
8
+ - `postinstall-lib.js` now included in published tarball — `npm install` no longer fails on postinstall
9
+
10
+ ## [2.8.0] — 2026-06-12
11
+
12
+ ### Added
13
+ - Full Phase 1–4 product plan: free local engine, hybrid analysis, MCP `hyv_analyze` / `hyv_clean`, learning loop UX, packaging hardening
14
+ - `npm run test:smoke` — 28+ CLI regression checks
15
+ - `npm run validate:publish` — prepublish tarball verification
16
+ - Golden prompt tests, postinstall idempotency tests, edge-case suite
17
+
18
+ ### Fixed
19
+ - `hyv check ""` no longer reports false clean — rejects empty input
20
+ - Bundled CLI resolves correct package + rules version from `dist/`
21
+ - Smoke tests avoid SIGPIPE false failures when piping CLI output
22
+
23
+ ## [2.7.1] — 2026-06-12
24
+
25
+ ### Added
26
+ - `hyv upgrade` — check and install latest global CLI
27
+ - `hyv mcp --setup` and `hyv mcp --test` — agent setup + health check
28
+ - MCP tools: `hyv_analyze` (hybrid server+local), `hyv_clean` (scan→fix→validate pipeline)
29
+ - `hyv reinforce --last` — learn from last fix/rewrite session
30
+ - Free-first local engine: scan, fix, check, score, diff work offline without subscription
31
+ - `hyv welcome` / `hyv free` — onboarding with live demo
32
+ - Profile-aware local pipeline: never-list, learned patterns, anchors, cadence
33
+ - Opt-in telemetry: `HYV_TELEMETRY=1`
34
+
35
+ ### Improved
36
+ - Postinstall upgrades agent instructions via `~/.hyv/agents-version.json`
37
+ - `hyv status` shows engine/rules version, drift, evolution summary
38
+ - `hyv doctor` reports full engine label + `--fix-agents`
39
+ - Published package excludes Python dev scripts and `src/`
40
+
41
+ ### Fixed
42
+ - 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, and other MCP hosts.
33
+ `hyv` includes a built-in MCP server for Claude Desktop, Claude Code, Cursor, Windsurf, and Codex.
34
34
 
35
35
  ```bash
36
- # start the MCP server (used by Claude Desktop automatically)
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
- | `hyv_rewrite` | rewrite text to match your voice profile |
45
- | `hyv_scan` | scan text for AI writing patterns |
46
- | `hyv_profiles` | list your voice profiles |
47
- | `hyv_validate` | validate text against a voice profile |
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` | show account context, profiles, and usage |
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
- - `hyv_scan` check text for AI patterns
22
- - `hyv_fix` — auto-fix simple patterns (word swaps) without LLM
23
- - `hyv_rewrite` — fix issues and match voice
24
- - `hyv_check` quick inline check, returns score + issues
25
- - `hyv_score` just a 0-100 score
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
@@ -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. `hyv_scan` with the text get issues
25
- 2. `hyv_fix` with the text auto-fix simple word swaps (delvedig, leverage→use)
26
- 3. `hyv_rewrite` with the text get full rewrite with LLM prompt for remaining issues
27
- 4. `hyv_validate` after rewritingverify the output matches the voice
28
- 5. `hyv_check` for quick inline spot-checks get score + issues
29
- 6. `hyv_score` when you just need a 0-100 number
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
- - `hyv_fix` to auto-fix simple patterns (word swaps) without LLM
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
- - `hyv_check` for inline spot-checks
15
- - `hyv_score` when you just need a 0-100 number
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
- - `hyv_scan` check text for AI patterns
12
- - `hyv_fix` — auto-fix simple patterns (word swaps) without LLM
13
- - `hyv_rewrite` — fix issues and match voice
14
- - `hyv_check` — quick inline check, returns score + issues
15
- - `hyv_score` just a 0-100 score
16
- - `hyv_diff` show what auto-fixes would change
17
- - `hyv_validate` — verify output matches voice
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` for quick word swaps before `hyv_rewrite`
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` on the text
11
- 2. If issues found, run `hyv_fix` for quick word swaps, then `hyv_rewrite` for structural issues
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. Fix issues with `hyv_fix` (auto-swaps) and `hyv_rewrite` (LLM rewrites)
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
- **For quick checks:**
21
- - Use `hyv_check` for inline spot-checks
22
- - Use `hyv_score` when you just need a quality number
23
- - Use `hyv_diff` to show what would change before applying fixes
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
- - `hyv_scan` scan text for AI patterns and voice drift
27
- - `hyv_fix` — auto-fix simple patterns (word swaps) without LLM
28
- - `hyv_rewrite` — auto-fix patterns and generate LLM prompt for remaining issues
29
- - `hyv_check` — quick inline check, returns score + issues
30
- - `hyv_score` just a 0-100 score
31
- - `hyv_diff` show what auto-fixes would change
32
- - `hyv_validate` — score text against voice profile
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>`
@@ -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
- - `hyv_fix` to auto-fix simple patterns (word swaps) without LLM
8
- - `hyv_rewrite` to fix remaining issues with LLM
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
- - `hyv_check` for inline spot-checks
13
- - `hyv_score` when you just need a 0-100 number
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` for quick word swaps before `hyv_rewrite`
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
+ }