@holdyourvoice/hyv 2.0.0 → 2.1.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/assets/ai-eliminator-rules.md +130 -0
- package/assets/ai-eliminator-skill.md +63 -0
- package/assets/chatgpt-instructions 2.txt +8 -0
- package/assets/chatgpt-instructions 3.txt +8 -0
- package/assets/chatgpt-instructions.txt +8 -0
- package/assets/claude-code-skill 2.md +24 -0
- package/assets/claude-code-skill.md +24 -0
- package/assets/cursor-rules 2.md +12 -0
- package/assets/cursor-rules 3.md +12 -0
- package/assets/cursor-rules.md +12 -0
- package/assets/economic-drift-voice.md +42 -0
- package/assets/hold-your-voice-skill.md +174 -0
- package/assets/voice-matcher-skill.md +57 -0
- package/assets/voice-profile-schema.json +28 -0
- package/package.json +5 -3
- package/scripts/hold_voice.py +2013 -0
- package/scripts/hold_voice_sync.py +194 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# AI Eliminator Rules (v2 — 220+ patterns + structural signals)
|
|
2
|
+
|
|
3
|
+
Use these rules to remove AI-generated cadence without erasing the writer.
|
|
4
|
+
|
|
5
|
+
## Core Rule
|
|
6
|
+
|
|
7
|
+
Fix the exact line that drifted. Do not rewrite a whole draft when one sentence
|
|
8
|
+
is the problem. Preserve clean surrounding lines.
|
|
9
|
+
|
|
10
|
+
## Detection Coverage
|
|
11
|
+
|
|
12
|
+
The algorithm now detects 220+ named AI writing patterns organized across 31
|
|
13
|
+
composite regex rules, plus structural/rhythmic analysis of: burstiness
|
|
14
|
+
(sentence length variance), paragraph rhythm uniformity, contraction density,
|
|
15
|
+
formal hedging, generic intensifiers, fragment ratio, over-structured list
|
|
16
|
+
patterns, and uniform sentence rhythm within paragraphs.
|
|
17
|
+
|
|
18
|
+
## Banned Pattern Categories
|
|
19
|
+
|
|
20
|
+
### Binary reframing & negation (#1, #210-212)
|
|
21
|
+
- "It's not X, it's Y" / "The point isn't X, it's Y"
|
|
22
|
+
- "You don't need X, you need Y"
|
|
23
|
+
- "Not just X, but Y" / "Not only... but also"
|
|
24
|
+
|
|
25
|
+
### Staccato drama (#2, #95, #96)
|
|
26
|
+
- Short punchy sentence runs: "No X. No Y. Just Z."
|
|
27
|
+
- Perfectly even sentence rhythm throughout paragraphs
|
|
28
|
+
- Three short sentences in a row (performance cadence)
|
|
29
|
+
|
|
30
|
+
### Landscape/era grandstanding (#3, #181-188)
|
|
31
|
+
- "In today's fast-paced world" / "ever-evolving landscape"
|
|
32
|
+
- "Now more than ever" / "as never before"
|
|
33
|
+
- "Has never been more important"
|
|
34
|
+
- "In the digital age" / "new era of X"
|
|
35
|
+
- "The rise of X" / "increasingly + adjective"
|
|
36
|
+
|
|
37
|
+
### Truth/reality posturing (#22, #110, #161-163)
|
|
38
|
+
- "The truth is" / "the reality is" / "here's the truth"
|
|
39
|
+
- "The harsh/ugly/brutal reality" / "real talk"
|
|
40
|
+
- "Brutal honesty" / "reality check"
|
|
41
|
+
|
|
42
|
+
### Hedging & non-committal (#4, #53-55, #89, #197-199)
|
|
43
|
+
- "It depends, but" / "no one-size-fits-all"
|
|
44
|
+
- "It can be tempting to" / "you might be tempted to"
|
|
45
|
+
- "In many ways" / "at first it might seem"
|
|
46
|
+
|
|
47
|
+
### Transitions & balance (#7, #38-40, #81, #91, #203)
|
|
48
|
+
- "On the one hand / on the other hand"
|
|
49
|
+
- "On the flip side" / "that said" / "however"
|
|
50
|
+
- "Moreover / furthermore / in addition" chains
|
|
51
|
+
- "At first glance vs on closer inspection"
|
|
52
|
+
|
|
53
|
+
### Let's/invitation patterns (#5, #63-65, #80, #127)
|
|
54
|
+
- "Let's dive in" / "let's explore" / "let's break it down"
|
|
55
|
+
- "Delve into" / "dive deeper" / "deep dive"
|
|
56
|
+
- "Navigate the complex landscape"
|
|
57
|
+
|
|
58
|
+
### Empathy opener (#21, #74-75, #107, #164-165)
|
|
59
|
+
- "It's easy to feel X" / "you're not alone"
|
|
60
|
+
- "You're not imagining it" / "you deserve"
|
|
61
|
+
- "Shouting into the void"
|
|
62
|
+
|
|
63
|
+
### Founder/thought-leader cadence (#72-73, #104-109)
|
|
64
|
+
- "Here's the thing" / "and honestly?"
|
|
65
|
+
- "Here's the kicker" / "the part most people miss"
|
|
66
|
+
- "What nobody's saying" / "the best part?"
|
|
67
|
+
- "Same X. Better Y." / "the moment X becomes Y"
|
|
68
|
+
|
|
69
|
+
### Marketing verbs (#61-62, #83, #114-117, #145-150)
|
|
70
|
+
- "Unlock the power of" / "harness the power of"
|
|
71
|
+
- "Transform/elevate/take to the next level"
|
|
72
|
+
- "Master the art of" / "game-changer"
|
|
73
|
+
- "Supercharge / turbocharge / on steroids"
|
|
74
|
+
|
|
75
|
+
### Journey/destination clichés (#59, #84, #122, #144, #214-215)
|
|
76
|
+
- "X isn't a destination; it's a journey"
|
|
77
|
+
- "No matter where you are on your journey"
|
|
78
|
+
- "Embark on" / "you're still early" / "it's still day one"
|
|
79
|
+
|
|
80
|
+
### Metaphor clusters (#18, #120-121, #159-160, #167-168, #173-180)
|
|
81
|
+
- "Beacon / lighthouse / tapestry / symphony / tides"
|
|
82
|
+
- "Silent killer / hidden gem / tip of the iceberg"
|
|
83
|
+
- "North star / double-edged sword / blessing and a curse"
|
|
84
|
+
- "Noise vs signal" / "X is the new Y"
|
|
85
|
+
- "Flood / avalanche / tsunami of X"
|
|
86
|
+
|
|
87
|
+
### Guide/article framing (#11-13, #27-28, #136-138)
|
|
88
|
+
- "You're in the right place" / "here's a step-by-step guide"
|
|
89
|
+
- "First, second, third" / "key takeaways" / "actionable tips"
|
|
90
|
+
- "In this article/guide/post" / "this piece explores"
|
|
91
|
+
|
|
92
|
+
### Wrapping/closing (#9, #14-15, #51-52, #66, #93, #103, #189, #217)
|
|
93
|
+
- "At the end of the day" / "the bottom line is"
|
|
94
|
+
- "In conclusion / in summary / to recap"
|
|
95
|
+
- "Let that sink in" / "only time will tell"
|
|
96
|
+
- "Curious what others think" / "let me know if you need help"
|
|
97
|
+
|
|
98
|
+
### UX/business buzzwords (#92, #123-126, #155-157)
|
|
99
|
+
- "Robust, scalable, innovative, impactful"
|
|
100
|
+
- "Seamless experience" / "frictionless journey"
|
|
101
|
+
- "Pain points" / "wealth of insights"
|
|
102
|
+
|
|
103
|
+
### Story/temporal templates (#17, #32-33, #113, #216, #218-219)
|
|
104
|
+
- "Imagine this / picture this"
|
|
105
|
+
- "Storytelling has been around for centuries"
|
|
106
|
+
- "Little did I know" / "at first I was skeptical"
|
|
107
|
+
- "The best time was X, the second-best time is now"
|
|
108
|
+
|
|
109
|
+
## Structural Signals (Beyond Individual Words)
|
|
110
|
+
|
|
111
|
+
- **Low burstiness**: Sentence lengths all similar (coefficient of variation < 0.35)
|
|
112
|
+
- **Mechanical paragraphs**: All paragraphs nearly identical sentence count
|
|
113
|
+
- **Over-structured lists**: Rigid 3-item lists throughout
|
|
114
|
+
- **Uniform paragraph rhythm**: Most sentences fall in 12-22 word range
|
|
115
|
+
- **Low contractions**: < 0.8 contractions per 100 words (overly formal)
|
|
116
|
+
- **Formal hedging density**: 2+ institutional hedging phrases
|
|
117
|
+
- **Generic intensifiers**: 3+ "remarkably/incredibly/amazingly" instances
|
|
118
|
+
- **No fragments**: Zero sentence fragments in 20+ sentences (over-polished)
|
|
119
|
+
|
|
120
|
+
## What To Do Instead
|
|
121
|
+
|
|
122
|
+
- Start from rough private-note material: an exact edit, meeting fragment,
|
|
123
|
+
dashboard annoyance, customer confusion, half-remembered sentence, or internal
|
|
124
|
+
contradiction.
|
|
125
|
+
- Let the idea move because the logic moves, not because line breaks perform.
|
|
126
|
+
- Prefer concrete scenes, mechanisms, quoted language, and specific stakes.
|
|
127
|
+
- Let some pieces end on a detail, hesitation, unresolved thought, or awkwardly
|
|
128
|
+
specific observation.
|
|
129
|
+
- If a line sounds like a maxim, a carousel, or a model trying to be sharp,
|
|
130
|
+
make it plainer and more grounded.
|
|
@@ -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,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,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,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,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,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,42 @@
|
|
|
1
|
+
# Economic Drift Voice
|
|
2
|
+
|
|
3
|
+
Economic Drift is the default Shashank voice profile when the user asks for
|
|
4
|
+
"my voice" and no fresher project samples are available. Do not force it onto a
|
|
5
|
+
different writer when their own samples exist.
|
|
6
|
+
|
|
7
|
+
## Philosophy
|
|
8
|
+
|
|
9
|
+
High-signal, low-friction writing. The reader should get a lot without working
|
|
10
|
+
hard. The tone feels like a private conversation with someone smart, slightly
|
|
11
|
+
cynical, and not performing for approval.
|
|
12
|
+
|
|
13
|
+
## Style
|
|
14
|
+
|
|
15
|
+
- Open with a concrete observation, moment, mechanism, or pattern.
|
|
16
|
+
- Avoid lesson openers, question openers, inspirational claims, and generic
|
|
17
|
+
category summaries.
|
|
18
|
+
- Use contrarian tension only when the real point is uncomfortable, not for
|
|
19
|
+
cheap shock.
|
|
20
|
+
- Mix simple language with dense thinking.
|
|
21
|
+
- Let sentence length vary naturally. No theatrical staccato.
|
|
22
|
+
- Favor rough private-note texture: exact edits, customer confusion, dashboard
|
|
23
|
+
annoyances, meeting fragments, internal contradictions.
|
|
24
|
+
- Do not turn every piece into a tidy lesson. Some endings should stop on a
|
|
25
|
+
detail or unresolved thought.
|
|
26
|
+
- Use lowercase when writing in Shashank's deliberate social-writing style,
|
|
27
|
+
unless the user or target format asks otherwise.
|
|
28
|
+
|
|
29
|
+
## Hard Bans
|
|
30
|
+
|
|
31
|
+
- `here's the thing`
|
|
32
|
+
- `let's be honest`
|
|
33
|
+
- `at the end of the day`
|
|
34
|
+
- `which is another way of saying`
|
|
35
|
+
- `in other words`
|
|
36
|
+
- `the moment x becomes y`
|
|
37
|
+
- `same x. better y.`
|
|
38
|
+
- motivational poster energy
|
|
39
|
+
- screenshot-ready punchline cadence
|
|
40
|
+
- generic founder advice
|
|
41
|
+
- bullets, hashtags, emojis, and bold emphasis in social prose unless requested
|
|
42
|
+
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: voice-matcher
|
|
3
|
+
description: Use when the user wants to write from their own writing, build a voice profile from samples, match an existing writer's style, or make new copy sound like a project/person without copying generic style advice.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Voice Matcher
|
|
7
|
+
|
|
8
|
+
Build from the writer's own writing. Do not invent a voice from adjectives.
|
|
9
|
+
|
|
10
|
+
## Source Hierarchy
|
|
11
|
+
|
|
12
|
+
1. User-provided samples in the conversation.
|
|
13
|
+
2. Project files the user identifies as their own writing.
|
|
14
|
+
3. Obvious authored prose in the repo, such as essays, posts, emails, public
|
|
15
|
+
copy, changelog entries, or founder notes.
|
|
16
|
+
4. `assets/economic-drift-voice.md` only when the user asks for Shashank's or
|
|
17
|
+
"my" voice and no better current samples exist.
|
|
18
|
+
|
|
19
|
+
## Profile Build
|
|
20
|
+
|
|
21
|
+
Run the portable profiler when files are available:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
hyv profile \
|
|
25
|
+
--name "project voice" \
|
|
26
|
+
--out .hold-your-voice/voice-profile.json \
|
|
27
|
+
<sample paths>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The profile is a working benchmark, not a literary biography. It should capture:
|
|
31
|
+
|
|
32
|
+
- sentence rhythm
|
|
33
|
+
- paragraph shape
|
|
34
|
+
- openings
|
|
35
|
+
- argument pattern
|
|
36
|
+
- recurring concrete textures
|
|
37
|
+
- things the writer avoids
|
|
38
|
+
- sample anchors that prove the profile
|
|
39
|
+
|
|
40
|
+
## Writing Method
|
|
41
|
+
|
|
42
|
+
- Start from the user's requested point, not from decorative tone imitation.
|
|
43
|
+
- Use the profile as a constraint system.
|
|
44
|
+
- Match cadence and thinking pattern before vocabulary.
|
|
45
|
+
- Keep the writer's roughness when it is part of the voice.
|
|
46
|
+
- Do not sand the draft into smooth, generic competence.
|
|
47
|
+
- After drafting, run an AI-pattern scan and repair only weak lines.
|
|
48
|
+
|
|
49
|
+
## Verification
|
|
50
|
+
|
|
51
|
+
Before handing back final copy, ask:
|
|
52
|
+
|
|
53
|
+
- Does the opening sound like a real observation rather than a template?
|
|
54
|
+
- Could this line belong unchanged to five other people? If yes, rewrite it.
|
|
55
|
+
- Are there profile anchors that justify this cadence?
|
|
56
|
+
- Did the rewrite preserve the user's meaning and risk appetite?
|
|
57
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"profile_version": "hold-your-voice-portable-v1",
|
|
3
|
+
"name": "project voice",
|
|
4
|
+
"source_count": 0,
|
|
5
|
+
"word_count": 0,
|
|
6
|
+
"sentence": {
|
|
7
|
+
"avg_words": 0,
|
|
8
|
+
"variance": "medium"
|
|
9
|
+
},
|
|
10
|
+
"paragraph": {
|
|
11
|
+
"avg_sentences": 0
|
|
12
|
+
},
|
|
13
|
+
"signature": {
|
|
14
|
+
"case_style": "mixed",
|
|
15
|
+
"argument_pattern": "mixed",
|
|
16
|
+
"opening_moves": [],
|
|
17
|
+
"cadence": [],
|
|
18
|
+
"anchors": [],
|
|
19
|
+
"never_list": []
|
|
20
|
+
},
|
|
21
|
+
"voice_rules": [],
|
|
22
|
+
"ai_eliminator": {
|
|
23
|
+
"rewrite_scope": "flagged-lines-only",
|
|
24
|
+
"preserve_surrounding_lines": true,
|
|
25
|
+
"avoid_polished_founder_cadence": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holdyourvoice/hyv",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Hold Your Voice
|
|
3
|
+
"version": "2.1.0",
|
|
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
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"hyv": "dist/index.js"
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"node": ">=18"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
|
-
"dist"
|
|
40
|
+
"dist",
|
|
41
|
+
"scripts/",
|
|
42
|
+
"assets/"
|
|
41
43
|
]
|
|
42
44
|
}
|