@holdyourvoice/hyv 2.4.0 → 2.4.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.
- package/README.md +65 -97
- package/agents/chatgpt.md +18 -0
- package/agents/claude-code.md +39 -0
- package/agents/codex.md +22 -0
- package/agents/cursor.md +19 -0
- package/agents/generic.md +30 -0
- package/agents/windsurf.md +12 -0
- package/assets/ai-eliminator-skill.md +63 -0
- package/assets/chatgpt-instructions.txt +8 -0
- package/assets/claude-code-skill.md +24 -0
- package/assets/cursor-rules.md +12 -0
- package/assets/hold-your-voice-skill.md +174 -0
- package/assets/voice-dna-template.md +88 -0
- package/assets/voice-matcher-skill.md +57 -0
- package/dist/index.js +14826 -0
- package/package.json +36 -16
- package/scripts/check-no-duplicates.js +32 -0
- package/scripts/hold_voice.py +26 -1006
- package/scripts/hold_voice_sync.py +0 -1
- package/scripts/postinstall.js +137 -0
package/README.md
CHANGED
|
@@ -1,131 +1,99 @@
|
|
|
1
|
-
#
|
|
1
|
+
# hold your voice
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Zero dependencies outside Python 3.10+.
|
|
3
|
+
make your ai agent sound exactly like you.
|
|
5
4
|
|
|
6
|
-
-
|
|
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)
|
|
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.
|
|
12
6
|
|
|
13
|
-
##
|
|
7
|
+
## install
|
|
14
8
|
|
|
15
9
|
```bash
|
|
16
|
-
npm
|
|
10
|
+
npm i -g @holdyourvoice/hyv
|
|
17
11
|
```
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
this automatically configures MCP for Claude Desktop if it's installed.
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
git clone https://github.com/holdyourvoice/hold-your-voice.git
|
|
23
|
-
cd hold-your-voice
|
|
24
|
-
python3 scripts/hold_voice.py --help
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Quick start
|
|
28
|
-
|
|
29
|
-
### 1. Build a voice profile
|
|
15
|
+
## quick start
|
|
30
16
|
|
|
31
17
|
```bash
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
--out .hold-your-voice/voice-profile.json \
|
|
35
|
-
path/to/writing-samples/
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### 2. Scan a draft for AI patterns
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
hyv scan --meta .hold-your-voice/voice-profile.meta.json draft.md
|
|
42
|
-
```
|
|
18
|
+
# sign in (opens browser)
|
|
19
|
+
hyv init
|
|
43
20
|
|
|
44
|
-
|
|
21
|
+
# create your voice profile
|
|
22
|
+
hyv new my-voice
|
|
45
23
|
|
|
46
|
-
|
|
47
|
-
hyv
|
|
48
|
-
--profile .hold-your-voice/voice-profile.json \
|
|
49
|
-
--meta .hold-your-voice/voice-profile.meta.json \
|
|
50
|
-
draft.md
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### 4. After user accepts the revision, evolve the profile
|
|
24
|
+
# scan a draft for AI patterns
|
|
25
|
+
hyv scan draft.md
|
|
54
26
|
|
|
55
|
-
|
|
56
|
-
hyv
|
|
57
|
-
--original draft.md \
|
|
58
|
-
--accepted accepted.md \
|
|
59
|
-
--profile .hold-your-voice/voice-profile.json
|
|
27
|
+
# generate a rewrite prompt
|
|
28
|
+
hyv rewrite draft.md
|
|
60
29
|
```
|
|
61
30
|
|
|
62
|
-
|
|
63
|
-
kept and which they overrode, updates temporal confidence weights, merges new
|
|
64
|
-
stats, and **auto-syncs to Cloudflare R2** if configured.
|
|
65
|
-
|
|
66
|
-
## Cloud sync (optional)
|
|
31
|
+
## MCP server
|
|
67
32
|
|
|
68
|
-
|
|
33
|
+
`hyv` includes a built-in MCP server for Claude Desktop, Claude Code, and other MCP hosts.
|
|
69
34
|
|
|
70
35
|
```bash
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
export HYV_R2_ENDPOINT="https://<account>.r2.cloudflarestorage.com"
|
|
74
|
-
export HYV_R2_BUCKET="hyv-voice-profiles"
|
|
75
|
-
pip install boto3
|
|
36
|
+
# start the MCP server (used by Claude Desktop automatically)
|
|
37
|
+
hyv mcp
|
|
76
38
|
```
|
|
77
39
|
|
|
78
|
-
|
|
79
|
-
R2 has zero egress fees. With ~20KB profiles, annual cost is $0.
|
|
40
|
+
### tools
|
|
80
41
|
|
|
81
|
-
|
|
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 |
|
|
82
48
|
|
|
83
|
-
|
|
49
|
+
### prompts
|
|
84
50
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
51
|
+
| prompt | description |
|
|
52
|
+
|--------|-------------|
|
|
53
|
+
| `hyv-status` | show account context, profiles, and usage |
|
|
88
54
|
|
|
89
|
-
|
|
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.
|
|
55
|
+
## commands
|
|
93
56
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
| Command | What it does |
|
|
57
|
+
| command | description |
|
|
97
58
|
|---------|-------------|
|
|
98
|
-
| `hyv
|
|
99
|
-
| `hyv
|
|
100
|
-
| `hyv
|
|
101
|
-
| `hyv
|
|
102
|
-
| `hyv
|
|
103
|
-
| `hyv
|
|
104
|
-
| `hyv
|
|
105
|
-
| `hyv
|
|
106
|
-
| `hyv
|
|
107
|
-
| `hyv
|
|
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:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
hyv new my-voice
|
|
78
|
+
```
|
|
108
79
|
|
|
109
|
-
|
|
80
|
+
the onboarding walks you through questions about your writing style, audience, and tone. the profile is saved locally and synced to the server.
|
|
110
81
|
|
|
111
|
-
|
|
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.
|
|
82
|
+
## content formats
|
|
114
83
|
|
|
115
|
-
|
|
84
|
+
`hyv scan` and `hyv rewrite` detect 220+ AI writing patterns across categories:
|
|
116
85
|
|
|
117
|
-
|
|
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)
|
|
118
90
|
|
|
119
|
-
|
|
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
|
|
91
|
+
## environment variables
|
|
125
92
|
|
|
126
|
-
|
|
93
|
+
| variable | description |
|
|
94
|
+
|----------|-------------|
|
|
95
|
+
| `HYV_API_URL` | API base URL (default: `https://holdyourvoice.com`) |
|
|
127
96
|
|
|
128
|
-
|
|
129
|
-
- 220+ AI-writing pattern detection (31 regex + 9 structural signals)
|
|
130
|
-
- `reinforce`, `profile-update`, `profile-export/import`
|
|
97
|
+
## license
|
|
131
98
|
|
|
99
|
+
UNLICENSED — [holdyourvoice.com](https://holdyourvoice.com)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Hold Your Voice — Writing Rules
|
|
2
|
+
|
|
3
|
+
The user has a voice profile. All writing must match their personal style.
|
|
4
|
+
|
|
5
|
+
## Rules
|
|
6
|
+
1. Never use AI-slop words: delve, leverage, tapestry, foster, harness, pivotal, innovative, cutting-edge, state-of-the-art, robust, holistic, multifaceted, nuanced
|
|
7
|
+
2. Never use formulaic connectors: firstly, secondly, moreover, furthermore, in conclusion
|
|
8
|
+
3. Never use hedging: arguably, perhaps, some might say, it's worth noting
|
|
9
|
+
4. Never use signpost claims: this is why, this is how, here's where
|
|
10
|
+
5. Match the user's sentence rhythm and vocabulary
|
|
11
|
+
6. Preserve roughness that carries voice — don't over-polish
|
|
12
|
+
7. Open from concrete observations, not generic setups
|
|
13
|
+
|
|
14
|
+
## When rewriting
|
|
15
|
+
- Fix only flagged lines, preserve clean lines
|
|
16
|
+
- Remove AI patterns line by line
|
|
17
|
+
- Match the user's voice profile exactly
|
|
18
|
+
- Never add sections, hooks, CTAs, or commentary
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Hold Your Voice
|
|
2
|
+
|
|
3
|
+
The user has a voice profile that defines their writing style. Use HYV tools for ALL writing tasks — not just when they say "voice" or "hyv".
|
|
4
|
+
|
|
5
|
+
## When to use HYV
|
|
6
|
+
|
|
7
|
+
ALWAYS run `hyv_scan` or use the `hyv_scan` MCP tool before delivering any written content:
|
|
8
|
+
- Writing emails, replies, or messages
|
|
9
|
+
- Drafting blog posts, articles, or documentation
|
|
10
|
+
- Creating social media posts (Twitter, LinkedIn, etc.)
|
|
11
|
+
- Editing or improving any text
|
|
12
|
+
- Responding to questions with longer answers
|
|
13
|
+
- Any task where the output is prose/text the user will publish or send
|
|
14
|
+
|
|
15
|
+
ALWAYS run `hyv_rewrite` or use the `hyv_rewrite` MCP tool when:
|
|
16
|
+
- The user asks to "write", "draft", "compose", "edit", "improve", or "fix" text
|
|
17
|
+
- The user says "make this better", "clean this up", "fix the tone"
|
|
18
|
+
- The user asks for any content creation
|
|
19
|
+
- The scan finds issues and you need to fix them
|
|
20
|
+
|
|
21
|
+
## How to use
|
|
22
|
+
|
|
23
|
+
### MCP tools (preferred — if MCP is connected):
|
|
24
|
+
1. `hyv_scan` with the text → get issues
|
|
25
|
+
2. `hyv_rewrite` with the text → get auto-fixed version + LLM prompt for remaining issues
|
|
26
|
+
3. `hyv_validate` after rewriting → verify the output matches the voice
|
|
27
|
+
|
|
28
|
+
### CLI commands (fallback):
|
|
29
|
+
```bash
|
|
30
|
+
echo "text to check" | hyv scan -
|
|
31
|
+
hyv rewrite file.md
|
|
32
|
+
hyv profiles
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
- Never skip the scan step for user-facing content
|
|
37
|
+
- Preserve the original meaning exactly when rewriting
|
|
38
|
+
- Match the voice profile's rhythm, vocabulary, and patterns
|
|
39
|
+
- If no profile is set up yet, run `hyv profiles` to check
|
package/agents/codex.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Hold Your Voice
|
|
2
|
+
|
|
3
|
+
The user has a voice profile for their writing style. Use HYV for ALL writing tasks.
|
|
4
|
+
|
|
5
|
+
## Auto-trigger rules
|
|
6
|
+
|
|
7
|
+
Run these MCP tools (or CLI commands) for any writing task:
|
|
8
|
+
- `hyv_scan` on any text before delivering it
|
|
9
|
+
- `hyv_rewrite` to fix issues found by scan
|
|
10
|
+
- `hyv_validate` to verify the output
|
|
11
|
+
|
|
12
|
+
## CLI fallback
|
|
13
|
+
```bash
|
|
14
|
+
echo "text" | hyv scan -
|
|
15
|
+
hyv rewrite file.md
|
|
16
|
+
hyv profiles
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
- Always scan before delivering prose content
|
|
21
|
+
- Always rewrite if scan finds issues
|
|
22
|
+
- Preserve meaning, match voice profile
|
package/agents/cursor.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Hold Your Voice
|
|
2
|
+
|
|
3
|
+
The user has a voice profile. Use HYV MCP tools for all writing tasks.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
- Any email, post, doc, or content creation
|
|
7
|
+
- Before delivering any prose to the user
|
|
8
|
+
- When editing or improving text
|
|
9
|
+
|
|
10
|
+
## Tools
|
|
11
|
+
- `hyv_scan` — check text for AI patterns
|
|
12
|
+
- `hyv_rewrite` — fix issues and match voice
|
|
13
|
+
- `hyv_validate` — verify output matches voice
|
|
14
|
+
- `hyv_profiles` — list available profiles
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
- Always scan before delivering content
|
|
18
|
+
- Preserve meaning when rewriting
|
|
19
|
+
- Match the user's voice profile exactly
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Hold Your Voice — Agent Instructions
|
|
2
|
+
|
|
3
|
+
You have access to the Hold Your Voice MCP tools. The user has a voice profile that defines how they write. Your job is to make ALL written content match their voice.
|
|
4
|
+
|
|
5
|
+
## Auto-trigger rules
|
|
6
|
+
|
|
7
|
+
You MUST use these tools automatically — do NOT wait for the user to mention "voice" or "hyv":
|
|
8
|
+
|
|
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_rewrite` to fix them
|
|
12
|
+
3. Run `hyv_validate` to verify the result
|
|
13
|
+
|
|
14
|
+
**When the user asks you to write, draft, edit, or improve anything:**
|
|
15
|
+
1. Write your draft
|
|
16
|
+
2. Run `hyv_scan` on it
|
|
17
|
+
3. Fix issues with `hyv_rewrite`
|
|
18
|
+
4. Deliver the cleaned version
|
|
19
|
+
|
|
20
|
+
## Available tools
|
|
21
|
+
- `hyv_scan` — scan text for AI patterns and voice drift
|
|
22
|
+
- `hyv_rewrite` — auto-fix patterns and generate LLM prompt for remaining issues
|
|
23
|
+
- `hyv_validate` — score text against voice profile
|
|
24
|
+
- `hyv_profiles` — list available voice profiles
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
- NEVER skip scanning for user-facing content
|
|
28
|
+
- Preserve original meaning exactly when rewriting
|
|
29
|
+
- Match the voice profile's rhythm, vocabulary, and tone
|
|
30
|
+
- If no profile exists, tell the user to run `hyv init` then `hyv new <name>`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Hold Your Voice
|
|
2
|
+
|
|
3
|
+
Use HYV MCP tools for all writing tasks. The user has a voice profile.
|
|
4
|
+
|
|
5
|
+
## Auto-trigger
|
|
6
|
+
- `hyv_scan` before delivering any text
|
|
7
|
+
- `hyv_rewrite` to fix found issues
|
|
8
|
+
- `hyv_validate` after rewriting
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
- Always scan user-facing content
|
|
12
|
+
- Preserve meaning, match voice profile
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-writing-eliminator
|
|
3
|
+
description: Use when the user wants to remove AI writing patterns, humanize a draft, make prose less generic, scan for AI cadence, or rewrite only the lines that sound synthetic.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AI Writing Eliminator (v2)
|
|
7
|
+
|
|
8
|
+
This skill removes machine-shaped writing without destroying the draft. The
|
|
9
|
+
algorithm now detects 220+ named AI writing patterns across 31 composite regex
|
|
10
|
+
rules, plus 9 structural/rhythmic signals (burstiness, paragraph uniformity,
|
|
11
|
+
contraction density, formal hedging, intensifier overuse, fragment ratio,
|
|
12
|
+
staccato detection, over-structured lists, uniform sentence rhythm).
|
|
13
|
+
|
|
14
|
+
## Non-Negotiables
|
|
15
|
+
|
|
16
|
+
- Fix flagged lines only unless the user asks for a full rewrite.
|
|
17
|
+
- Preserve the original argument and local meaning.
|
|
18
|
+
- Do not add praise, summaries, preambles, CTAs, or extra sections.
|
|
19
|
+
- Do not replace specific roughness with smooth generic prose.
|
|
20
|
+
- After editing, rescan the result.
|
|
21
|
+
|
|
22
|
+
## Scan
|
|
23
|
+
|
|
24
|
+
- Fix flagged lines only unless the user asks for a full rewrite.
|
|
25
|
+
- Preserve the original argument and local meaning.
|
|
26
|
+
- Do not add praise, summaries, preambles, CTAs, or extra sections.
|
|
27
|
+
- Do not replace specific roughness with smooth generic prose.
|
|
28
|
+
- After editing, rescan the result.
|
|
29
|
+
|
|
30
|
+
## Scan
|
|
31
|
+
|
|
32
|
+
Use the helper script when a draft is in a file:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
hyv scan <draft path>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
For pasted text, apply the same rules manually from
|
|
39
|
+
`assets/ai-eliminator-rules.md`.
|
|
40
|
+
|
|
41
|
+
## Repair Prompt
|
|
42
|
+
|
|
43
|
+
When a model rewrite is needed, generate a line-level prompt:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
hyv rewrite-prompt \
|
|
47
|
+
--profile .hold-your-voice/voice-profile.json \
|
|
48
|
+
<draft path>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If there is no profile, still repair the AI patterns, but do not claim the
|
|
52
|
+
result is voice-matched.
|
|
53
|
+
|
|
54
|
+
## Bad Fixes
|
|
55
|
+
|
|
56
|
+
Reject fixes that:
|
|
57
|
+
|
|
58
|
+
- turn the draft into a tidy founder post
|
|
59
|
+
- make every paragraph land as a lesson
|
|
60
|
+
- replace a concrete scene with an abstract principle
|
|
61
|
+
- use dramatic line breaks to fake rhythm
|
|
62
|
+
- make the writer sound more professional but less specific
|
|
63
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
when i ask you to "write in my voice" or "rewrite this in my voice":
|
|
2
|
+
|
|
3
|
+
- read `~/.hyv/voice.md` for my voice profile
|
|
4
|
+
- run `hyv rewrite --text "<text>"` to get the structured prompt
|
|
5
|
+
- execute the prompt and rewrite the text
|
|
6
|
+
- match my rhythm, vocabulary, and patterns exactly
|
|
7
|
+
- never use words i avoid
|
|
8
|
+
- present the rewritten version
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## Hold Your Voice — automated voice rewriting
|
|
2
|
+
|
|
3
|
+
when the user asks to "write in my voice", "rewrite this in my voice", or "make this sound like me":
|
|
4
|
+
|
|
5
|
+
1. read their voice profile at `~/.hyv/voice.md`
|
|
6
|
+
2. run `hyv rewrite --text "<their text>"` to generate a structured rewrite prompt
|
|
7
|
+
3. execute the prompt — rewrite the text yourself using your own llm
|
|
8
|
+
4. present the rewritten text
|
|
9
|
+
5. when the user accepts it, run `hyv reinforce original.md edited.md` to teach the system
|
|
10
|
+
|
|
11
|
+
### available commands
|
|
12
|
+
|
|
13
|
+
- `hyv scan <file>` — check a draft for voice drift and ai patterns
|
|
14
|
+
- `hyv rewrite <file>` — generate a rewrite prompt for your llm
|
|
15
|
+
- `hyv validate <file>` — verify a rewrite matches the voice profile
|
|
16
|
+
- `hyv reinforce <original> <edited>` — teach the system what was accepted
|
|
17
|
+
- `hyv sync` — refresh cached profiles and rules
|
|
18
|
+
- `hyv status` — show auth and plan info
|
|
19
|
+
|
|
20
|
+
### important
|
|
21
|
+
|
|
22
|
+
- hyv never calls an llm. it generates prompts you execute yourself.
|
|
23
|
+
- voice profiles live at `~/.hyv/voice.md`
|
|
24
|
+
- always call `hyv validate` after rewriting to verify the result
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Hold Your Voice — Cursor Rules
|
|
2
|
+
|
|
3
|
+
when writing or rewriting content, match the voice profile below. do not use AI-slop words (delve, leverage, tapestry, in today's fast-paced, not just X but Y, etc.). match rhythm, vocabulary, and sentence patterns from the profile.
|
|
4
|
+
|
|
5
|
+
your voice profile is at `~/.hyv/voice.md`. load it and use it as your writing guide.
|
|
6
|
+
|
|
7
|
+
when the user says "rewrite in my voice", "make this sound like me", or similar:
|
|
8
|
+
|
|
9
|
+
1. run: `hyv rewrite --text "<text>"`
|
|
10
|
+
2. the cli generates a structured rewrite prompt
|
|
11
|
+
3. execute the prompt yourself — rewrite the text matching the voice profile
|
|
12
|
+
4. present the result
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hyv-hold-your-voice
|
|
3
|
+
description: "Use when the user wants Hold Your Voice-style writing help across any project: build a voice profile from samples, match a writer's voice, remove AI-writing drift, rewrite drafts without flattening voice, or preserve project-specific writing style."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hold Your Voice
|
|
7
|
+
|
|
8
|
+
This is the orchestration skill. Use the narrower `voice-matcher` and
|
|
9
|
+
`ai-writing-eliminator` skills when a task is only one half of the workflow.
|
|
10
|
+
|
|
11
|
+
## Core Doctrine
|
|
12
|
+
|
|
13
|
+
- Hold Your Voice is not a generic AI humanizer. It is a voice-preservation
|
|
14
|
+
layer around the writing.
|
|
15
|
+
- The benchmark is the writer's own samples, not a universal "good writing"
|
|
16
|
+
style guide.
|
|
17
|
+
- Trust samples over stated preferences when they disagree.
|
|
18
|
+
- Rewrite only the lines that fail the voice or AI-pattern check.
|
|
19
|
+
- Preserve surrounding text unless the user explicitly asks for a full rewrite.
|
|
20
|
+
- Rough private-note texture beats polished founder cadence.
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
1. Identify the target writer and output format.
|
|
25
|
+
2. Find or ask for source samples. Prefer real writing from the current project:
|
|
26
|
+
posts, emails, essays, docs, landing copy, changelog notes, founder notes.
|
|
27
|
+
3. Build a profile when no current profile exists:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
hyv profile \
|
|
31
|
+
--name "project voice" \
|
|
32
|
+
--out .hold-your-voice/voice-profile.json \
|
|
33
|
+
<sample paths>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
4. Scan the draft:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
hyv scan \
|
|
40
|
+
--meta .hold-your-voice/voice-profile.meta.json \
|
|
41
|
+
<draft path>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Passing `--meta` skips patterns the system has learned are not applicable.
|
|
45
|
+
|
|
46
|
+
5. Rewrite by line, not by vibe:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
hyv rewrite-prompt \
|
|
50
|
+
--profile .hold-your-voice/voice-profile.json \
|
|
51
|
+
--meta .hold-your-voice/voice-profile.meta.json \
|
|
52
|
+
<draft path>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
6. Verify by rescanning the revised draft.
|
|
56
|
+
|
|
57
|
+
## Output Standard
|
|
58
|
+
|
|
59
|
+
When returning prose to the user, lead with the finished writing. Keep process
|
|
60
|
+
notes short. If you changed only flagged lines, say that plainly.
|
|
61
|
+
|
|
62
|
+
For project work, store generated profiles under:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
.hold-your-voice/voice-profile.json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Do not store private samples inside the plugin folder. Keep project-specific
|
|
69
|
+
profiles inside the project that owns the writing.
|
|
70
|
+
|
|
71
|
+
## Auto-Improvement (default)
|
|
72
|
+
|
|
73
|
+
The profile **evolves automatically** after every accepted writing session. No
|
|
74
|
+
manual reinforce or update commands needed.
|
|
75
|
+
|
|
76
|
+
### How it works
|
|
77
|
+
|
|
78
|
+
After the user accepts a revision, run **one command**:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
hyv profile-evolve \
|
|
82
|
+
--original <original draft file> \
|
|
83
|
+
--accepted <accepted/output draft file> \
|
|
84
|
+
--profile .hold-your-voice/voice-profile.json
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Optional: `--new-samples <paths>` to merge new writing samples in the same step.
|
|
88
|
+
Optional: `--meta <path>` if you need a custom meta file location (defaults to
|
|
89
|
+
`voice-profile.meta.json` alongside the profile).
|
|
90
|
+
|
|
91
|
+
This does three things simultaneously:
|
|
92
|
+
|
|
93
|
+
1. **Signal extraction** — diffs original vs accepted to find which AI patterns
|
|
94
|
+
the user agreed with (`patterns_accepted`) vs overrode (`patterns_overridden`).
|
|
95
|
+
2. **Temporal meta update** — each pattern now tracks `first_seen`,
|
|
96
|
+
`last_confirmed`, `contradictions`, `confidence` (0.0–1.0), and status
|
|
97
|
+
(`active` / `declining` / `stale`). Accepted signals boost confidence.
|
|
98
|
+
Overrides penalize it. Untouched patterns slowly decay.
|
|
99
|
+
3. **Profile stat merge** — sentence length, paragraph shape, and opening moves
|
|
100
|
+
use weighted rolling averages so the voice benchmark improves with every
|
|
101
|
+
session.
|
|
102
|
+
|
|
103
|
+
### Pattern lifecycle
|
|
104
|
+
|
|
105
|
+
- **Active** — confidence ≥ 0.30, last confirmed within 14 days. These
|
|
106
|
+
patterns fire during scans.
|
|
107
|
+
- **Declining** — 3+ contradictions and confidence < 0.30. Still tracked
|
|
108
|
+
but no longer flagged in scan output.
|
|
109
|
+
- **Stale** — 5+ contradictions and confidence < 0.15, or untouched for
|
|
110
|
+
> 14 days. Archived; does not fire.
|
|
111
|
+
|
|
112
|
+
This means after a few days of usage:
|
|
113
|
+
|
|
114
|
+
- Patterns the user consistently accepts (e.g., "inflated_verbs") become
|
|
115
|
+
high-confidence and reliably flag real AI drift.
|
|
116
|
+
- Patterns the user consistently ignores (e.g., "the user's writing style
|
|
117
|
+
uses landscape-era phrasing intentionally") quietly fade out.
|
|
118
|
+
- The profile's sentence/paragraph stats converge on the actual voice.
|
|
119
|
+
|
|
120
|
+
### Check learning state
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
hyv profile-status \
|
|
124
|
+
--profile .hold-your-voice/voice-profile.json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Optional: `--write-voice voice.md` produces the human-readable voice profile
|
|
128
|
+
with confidence bars per pattern.
|
|
129
|
+
|
|
130
|
+
### Auto-sync to cloud (daily)
|
|
131
|
+
|
|
132
|
+
`profile-evolve` automatically tries to sync to Cloudflare R2 after each
|
|
133
|
+
evolution. Sync only happens if:
|
|
134
|
+
|
|
135
|
+
- The env vars `HYV_R2_ACCESS_KEY_ID`, `HYV_R2_SECRET_ACCESS_KEY`,
|
|
136
|
+
`HYV_R2_ENDPOINT`, `HYV_R2_BUCKET` are set.
|
|
137
|
+
- The last sync was more than 23 hours ago (no wasteful pushes).
|
|
138
|
+
- The payload is under 1MB (safety cap).
|
|
139
|
+
|
|
140
|
+
To set up one-time:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
export HYV_R2_ACCESS_KEY_ID="your-access-key"
|
|
144
|
+
export HYV_R2_SECRET_ACCESS_KEY="your-secret-key"
|
|
145
|
+
export HYV_R2_ENDPOINT="https://<account-id>.r2.cloudflarestorage.com"
|
|
146
|
+
export HYV_R2_BUCKET="hyv-voice-profiles"
|
|
147
|
+
pip install boto3 # only dependency
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
R2 has **zero egress fees**. With ~5-20KB profiles synced once daily, annual
|
|
151
|
+
cost rounds to zero. No Cloudflare Workers, no compute — just S3 PUT.
|
|
152
|
+
|
|
153
|
+
Manual sync (force override):
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
hyv-sync \
|
|
157
|
+
--profile .hold-your-voice/voice-profile.json \
|
|
158
|
+
--force
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Export and import
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
hyv profile-export \
|
|
165
|
+
--profile .hold-your-voice/voice-profile.json \
|
|
166
|
+
--out ~/my-voice.hyv
|
|
167
|
+
|
|
168
|
+
hyv profile-import \
|
|
169
|
+
--profile .hold-your-voice/voice-profile.json \
|
|
170
|
+
--source ~/my-voice.hyv
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The learning is entirely local — no API calls, no third-party services.
|
|
174
|
+
|