@holdyourvoice/hyv 2.3.1 → 2.4.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/README.md CHANGED
@@ -1,99 +1,131 @@
1
- # hold your voice
1
+ # Hold Your Voice
2
2
 
3
- make your ai agent sound exactly like you.
3
+ Portable writing-voice toolkit. Works in any AI coding tool or terminal.
4
+ Zero dependencies outside Python 3.10+.
4
5
 
5
- `hyv` is a CLI-first voice gate layer for AI workflows. it scans text for AI writing patterns, builds a voice profile from your own writing, and rewrites drafts to match your personal style.
6
+ - build a voice profile from a writer's own samples
7
+ - scan drafts for AI-writing patterns (220+ rules across 31 regex patterns)
8
+ - rewrite only the flagged lines — no flattening
9
+ - **profile evolves with every session** — patterns you accept get stronger,
10
+ patterns you ignore fade away
11
+ - auto-sync profiles to Cloudflare R2 for backup (near-zero cost)
6
12
 
7
- ## install
13
+ ## Install
8
14
 
9
15
  ```bash
10
- npm i -g @holdyourvoice/hyv
16
+ npm install -g @holdyourvoice/hyv
11
17
  ```
12
18
 
13
- this automatically configures MCP for Claude Desktop if it's installed.
14
-
15
- ## quick start
19
+ Or clone and run directly:
16
20
 
17
21
  ```bash
18
- # sign in (opens browser)
19
- hyv init
22
+ git clone https://github.com/holdyourvoice/hold-your-voice.git
23
+ cd hold-your-voice
24
+ python3 scripts/hold_voice.py --help
25
+ ```
20
26
 
21
- # create your voice profile
22
- hyv new my-voice
27
+ ## Quick start
23
28
 
24
- # scan a draft for AI patterns
25
- hyv scan draft.md
29
+ ### 1. Build a voice profile
26
30
 
27
- # generate a rewrite prompt
28
- hyv rewrite draft.md
31
+ ```bash
32
+ hyv profile \
33
+ --name "my voice" \
34
+ --out .hold-your-voice/voice-profile.json \
35
+ path/to/writing-samples/
29
36
  ```
30
37
 
31
- ## MCP server
32
-
33
- `hyv` includes a built-in MCP server for Claude Desktop, Claude Code, and other MCP hosts.
38
+ ### 2. Scan a draft for AI patterns
34
39
 
35
40
  ```bash
36
- # start the MCP server (used by Claude Desktop automatically)
37
- hyv mcp
41
+ hyv scan --meta .hold-your-voice/voice-profile.meta.json draft.md
38
42
  ```
39
43
 
40
- ### tools
44
+ ### 3. Rewrite flagged lines only
41
45
 
42
- | tool | description |
43
- |------|-------------|
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 |
46
+ ```bash
47
+ hyv rewrite-prompt \
48
+ --profile .hold-your-voice/voice-profile.json \
49
+ --meta .hold-your-voice/voice-profile.meta.json \
50
+ draft.md
51
+ ```
48
52
 
49
- ### prompts
53
+ ### 4. After user accepts the revision, evolve the profile
50
54
 
51
- | prompt | description |
52
- |--------|-------------|
53
- | `hyv-status` | show account context, profiles, and usage |
55
+ ```bash
56
+ hyv profile-evolve \
57
+ --original draft.md \
58
+ --accepted accepted.md \
59
+ --profile .hold-your-voice/voice-profile.json
60
+ ```
54
61
 
55
- ## commands
62
+ This automatically diffs original vs accepted, extracts which patterns the user
63
+ kept and which they overrode, updates temporal confidence weights, merges new
64
+ stats, and **auto-syncs to Cloudflare R2** if configured.
56
65
 
57
- | command | description |
58
- |---------|-------------|
59
- | `hyv init` | authenticate with hold your voice |
60
- | `hyv status` | show CLI and auth status |
61
- | `hyv new <name>` | create a voice profile |
62
- | `hyv profiles` | list voice profiles |
63
- | `hyv rename <name>` | rename a voice profile |
64
- | `hyv scan <file>` | scan text for AI patterns |
65
- | `hyv rewrite <file>` | generate rewrite prompt |
66
- | `hyv sync` | sync profiles from server |
67
- | `hyv doctor` | diagnose and fix issues |
68
- | `hyv mcp` | start MCP server |
69
- | `hyv export [format]` | export profile for LLMs |
70
- | `hyv plan` | manage subscription |
71
-
72
- ## voice profiles
73
-
74
- profiles are stored in `~/.hyv/profiles/` as markdown files. create one with:
66
+ ## Cloud sync (optional)
67
+
68
+ Set once:
75
69
 
76
70
  ```bash
77
- hyv new my-voice
71
+ export HYV_R2_ACCESS_KEY_ID="your-access-key"
72
+ export HYV_R2_SECRET_ACCESS_KEY="your-secret-key"
73
+ export HYV_R2_ENDPOINT="https://<account>.r2.cloudflarestorage.com"
74
+ export HYV_R2_BUCKET="hyv-voice-profiles"
75
+ pip install boto3
78
76
  ```
79
77
 
80
- the onboarding walks you through questions about your writing style, audience, and tone. the profile is saved locally and synced to the server.
78
+ `profile-evolve` auto-syncs after every session (> 23h since last sync).
79
+ R2 has zero egress fees. With ~20KB profiles, annual cost is $0.
80
+
81
+ ## What the learning does
82
+
83
+ After a few days of use:
84
+
85
+ - `ai_vocab_density` — confidence 0.76 → reliably catches AI-speak
86
+ - `inflated_verbs` — confidence 0.32 → user removes most of these
87
+ - `em_dash` — confidence 0.08 → user uses em dashes, pattern auto-suppressed
88
+
89
+ Patterns track `first_seen`, `last_confirmed`, per-date contradictions,
90
+ `status` (active/declining/stale), and `source_samples` for full provenance.
91
+ Untouched patterns decay over 14 days. Contradicted patterns drop to declining
92
+ after 3 overrides, stale after 5.
93
+
94
+ ## Commands
95
+
96
+ | Command | What it does |
97
+ |---------|-------------|
98
+ | `hyv profile` | Build voice profile from samples |
99
+ | `hyv scan` | Flag AI-writing patterns in a draft |
100
+ | `hyv rewrite-prompt` | Generate line-level rewrite prompt |
101
+ | `hyv profile-evolve` | **Auto-evolve** — extract signals + update meta + merge stats |
102
+ | `hyv profile-update` | Merge new samples into existing profile (rolling averages) |
103
+ | `hyv profile-status` | Pretty-print learning state with confidence bars |
104
+ | `hyv reinforce` | Diff original vs accepted, emit signal report |
105
+ | `hyv profile-export` | Bundle profile into .hyv file |
106
+ | `hyv profile-import` | Import .hyv bundle |
107
+ | `hyv-sync` | Manually sync to R2 (runs automatically via evolve) |
108
+
109
+ ## Why `.hold-your-voice/`
81
110
 
82
- ## content formats
111
+ Profiles live in your project. They're not hidden in `~/.codex/` or `~/.commandcode/` —
112
+ they're in `.hold-your-voice/` at the root of whatever project you're writing for.
113
+ Portable. Version-control-able. No global state.
83
114
 
84
- `hyv scan` and `hyv rewrite` detect 220+ AI writing patterns across categories:
115
+ ## Changelog
85
116
 
86
- - **ai-slop**overused AI words (delve, leverage, tapestry, pivotal, foster)
87
- - **formulaic** — connector words (firstly, moreover, in conclusion)
88
- - **voice-drift** — hedging language (arguably, perhaps, some might say)
89
- - **structure** — AI structural tells (antithesis, signpost claims, lesson setups)
117
+ ### 0.2.0auto-improving profiles
90
118
 
91
- ## environment variables
119
+ - `profile-evolve` replaces manual reinforce + update — one command per session
120
+ - Temporal pattern confidence tracking (active/declining/stale lifecycle)
121
+ - `scan --meta` and `rewrite-prompt --meta` filter out learned-not-applicable patterns
122
+ - Voice.md as standard readable output (`profile-status --write-voice`)
123
+ - Auto-sync to Cloudflare R2 with daily rate-limiting and 1MB safety cap
124
+ - Universal `hyv` / `hyv-sync` CLI — works in any tool, not just Codex
92
125
 
93
- | variable | description |
94
- |----------|-------------|
95
- | `HYV_API_URL` | API base URL (default: `https://holdyourvoice.com`) |
126
+ ### 0.1.0 initial
96
127
 
97
- ## license
128
+ - `profile`, `scan`, `rewrite-prompt` commands
129
+ - 220+ AI-writing pattern detection (31 regex + 9 structural signals)
130
+ - `reinforce`, `profile-update`, `profile-export/import`
98
131
 
99
- UNLICENSED — [holdyourvoice.com](https://holdyourvoice.com)
package/package.json CHANGED
@@ -1,54 +1,36 @@
1
1
  {
2
2
  "name": "@holdyourvoice/hyv",
3
- "version": "2.3.1",
4
- "description": "Hold Your Voice \u2014 voice gate layer for AI workflows. make your ai agent sound exactly like you! includes 220+ AI pattern detection engine.",
5
- "main": "dist/index.js",
3
+ "version": "2.4.0",
4
+ "description": "Hold Your Voice engine portable voice profiling, AI pattern detection, and self-improving profiles. Works anywhere Python 3.10+ runs.",
6
5
  "bin": {
7
- "hyv": "dist/index.js",
8
- "hyvoice": "dist/index.js"
9
- },
10
- "scripts": {
11
- "build": "esbuild src/index.ts --bundle --platform=node --target=node18 --outfile=dist/index.js --format=cjs --banner:js='#!/usr/bin/env node'",
12
- "dev": "npm run build && node dist/index.js",
13
- "prepublishOnly": "npm run build",
14
- "postinstall": "node scripts/postinstall.js"
6
+ "hyv-voice": "scripts/hold_voice.py",
7
+ "hyv-sync": "scripts/hold_voice_sync.py"
15
8
  },
9
+ "files": [
10
+ "scripts/hold_voice.py",
11
+ "scripts/hold_voice_sync.py",
12
+ "assets/",
13
+ "skills/"
14
+ ],
16
15
  "keywords": [
17
16
  "voice",
18
17
  "writing",
19
18
  "ai",
20
19
  "cli",
21
20
  "brand-voice",
21
+ "hold-your-voice",
22
+ "ai-detection",
22
23
  "content-gate",
23
24
  "hyv"
24
25
  ],
25
26
  "author": "Hold Your Voice",
26
- "license": "UNLICENSED",
27
- "private": false,
28
- "dependencies": {
29
- "chalk": "^4.1.2",
30
- "commander": "^12.1.0",
31
- "open": "^8.4.2",
32
- "glob": "^11.0.0"
33
- },
34
- "devDependencies": {
35
- "@types/node": "^20.11.0",
36
- "esbuild": "^0.20.0",
37
- "typescript": "^5.3.3"
38
- },
39
- "engines": {
40
- "node": ">=18"
41
- },
42
- "files": [
43
- "dist",
44
- "scripts/",
45
- "assets/",
46
- "skills/",
47
- "README.md",
48
- "agents/"
49
- ],
27
+ "license": "Apache-2.0",
50
28
  "repository": {
51
29
  "type": "git",
52
- "url": "git+https://github.com/shashank-sn/hold-your-voice-app.git"
30
+ "url": "git+https://github.com/holdyourvoice/hold-your-voice.git"
31
+ },
32
+ "homepage": "https://holdyourvoice.com",
33
+ "engines": {
34
+ "node": ">=16"
53
35
  }
54
36
  }