@holdyourvoice/hyv 2.0.1 → 2.1.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/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/dist/index.js +6484 -315
- package/package.json +14 -9
- package/scripts/hold_voice.py +2013 -0
- package/scripts/hold_voice_sync.py +194 -0
- package/skills/ai-writing-eliminator/SKILL.md +63 -0
- package/skills/hold-your-voice/SKILL.md +174 -0
- package/skills/voice-matcher/SKILL.md +57 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
#!/usr/bin/env python3
|
|
3
|
+
"""Push voice profile, meta, and voice.md to Cloudflare R2 for backup.
|
|
4
|
+
|
|
5
|
+
Cost design: R2 has no egress fees. This script uses S3-compatible PUT only
|
|
6
|
+
(no Workers, no compute). Typical payload: 5-20KB. At $0.015/GB stored with
|
|
7
|
+
1 sync/day, annual cost is essentially zero.
|
|
8
|
+
|
|
9
|
+
Requires: pip install boto3
|
|
10
|
+
|
|
11
|
+
Env vars (set once):
|
|
12
|
+
HYV_R2_ACCESS_KEY_ID
|
|
13
|
+
HYV_R2_SECRET_ACCESS_KEY
|
|
14
|
+
HYV_R2_ENDPOINT (e.g. https://<account>.r2.cloudflarestorage.com)
|
|
15
|
+
HYV_R2_BUCKET (e.g. hyv-voice-profiles)
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import json
|
|
21
|
+
import os
|
|
22
|
+
import sys
|
|
23
|
+
from datetime import datetime, timezone
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
from typing import Any
|
|
26
|
+
|
|
27
|
+
SCRIPT_DIR = Path(__file__).resolve().parent
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _now_iso() -> str:
|
|
31
|
+
return datetime.now(timezone.utc).isoformat()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def sync_profile(
|
|
35
|
+
profile_path: Path,
|
|
36
|
+
meta_path: Path | None = None,
|
|
37
|
+
voice_md_path: Path | None = None,
|
|
38
|
+
dry_run: bool = False,
|
|
39
|
+
) -> dict[str, Any]:
|
|
40
|
+
"""push files to R2. returns summary dict."""
|
|
41
|
+
try:
|
|
42
|
+
import boto3
|
|
43
|
+
except ImportError:
|
|
44
|
+
return {"synced": False, "error": "boto3 not installed. pip install boto3"}
|
|
45
|
+
|
|
46
|
+
required = ["HYV_R2_ACCESS_KEY_ID", "HYV_R2_SECRET_ACCESS_KEY", "HYV_R2_ENDPOINT", "HYV_R2_BUCKET"]
|
|
47
|
+
missing = [v for v in required if not os.environ.get(v)]
|
|
48
|
+
if missing:
|
|
49
|
+
return {"synced": False, "error": f"missing env vars: {', '.join(missing)}"}
|
|
50
|
+
|
|
51
|
+
if not profile_path.exists():
|
|
52
|
+
return {"synced": False, "error": f"profile not found: {profile_path}"}
|
|
53
|
+
|
|
54
|
+
s3 = boto3.client(
|
|
55
|
+
"s3",
|
|
56
|
+
endpoint_url=os.environ["HYV_R2_ENDPOINT"],
|
|
57
|
+
aws_access_key_id=os.environ["HYV_R2_ACCESS_KEY_ID"],
|
|
58
|
+
aws_secret_access_key=os.environ["HYV_R2_SECRET_ACCESS_KEY"],
|
|
59
|
+
region_name="auto",
|
|
60
|
+
)
|
|
61
|
+
bucket = os.environ["HYV_R2_BUCKET"]
|
|
62
|
+
profile_name = profile_path.stem # e.g. "voice-profile"
|
|
63
|
+
|
|
64
|
+
files_to_sync: list[tuple[Path, str]] = [
|
|
65
|
+
(profile_path, f"{profile_name}/{profile_path.name}"),
|
|
66
|
+
]
|
|
67
|
+
if meta_path and meta_path.exists():
|
|
68
|
+
files_to_sync.append((meta_path, f"{profile_name}/{meta_path.name}"))
|
|
69
|
+
if voice_md_path and voice_md_path.exists():
|
|
70
|
+
files_to_sync.append((voice_md_path, f"{profile_name}/{voice_md_path.name}"))
|
|
71
|
+
|
|
72
|
+
total_size = sum(f.stat().st_size for f, _ in files_to_sync if f.exists())
|
|
73
|
+
if total_size > 1_000_000: # 1MB safety cap
|
|
74
|
+
return {"synced": False, "error": f"payload too large: {total_size} bytes"}
|
|
75
|
+
|
|
76
|
+
if dry_run:
|
|
77
|
+
return {"synced": False, "dry_run": True, "would_sync": [k for _, k in files_to_sync], "size": total_size}
|
|
78
|
+
|
|
79
|
+
sync_time = _now_iso()
|
|
80
|
+
uploaded = []
|
|
81
|
+
for local_path, remote_key in files_to_sync:
|
|
82
|
+
if not local_path.exists():
|
|
83
|
+
continue
|
|
84
|
+
s3.upload_file(
|
|
85
|
+
str(local_path),
|
|
86
|
+
bucket,
|
|
87
|
+
remote_key,
|
|
88
|
+
ExtraArgs={"ContentType": "application/json" if local_path.suffix == ".json" else "text/markdown"},
|
|
89
|
+
)
|
|
90
|
+
uploaded.append(remote_key)
|
|
91
|
+
|
|
92
|
+
return {"synced": True, "uploaded": uploaded, "size": total_size, "time": sync_time}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def was_synced_recently(meta: dict[str, Any], max_hours: int = 24) -> bool:
|
|
96
|
+
"""check if a sync happened within max_hours."""
|
|
97
|
+
last = meta.get("last_sync")
|
|
98
|
+
if not last:
|
|
99
|
+
return False
|
|
100
|
+
try:
|
|
101
|
+
last_dt = datetime.fromisoformat(last)
|
|
102
|
+
hours_since = (datetime.now(timezone.utc) - last_dt.replace(tzinfo=timezone.utc)).total_seconds() / 3600
|
|
103
|
+
return hours_since < max_hours
|
|
104
|
+
except (ValueError, TypeError):
|
|
105
|
+
return False
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def try_auto_sync(
|
|
109
|
+
profile_path: str,
|
|
110
|
+
meta_path: str | None = None,
|
|
111
|
+
voice_md_path: str | None = None,
|
|
112
|
+
) -> bool:
|
|
113
|
+
"""called by profile-evolve after saving. syncs if env is configured and
|
|
114
|
+
last sync was > 24h ago. returns True if sync happened."""
|
|
115
|
+
p = Path(profile_path).expanduser()
|
|
116
|
+
if not p.exists():
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
m = Path(meta_path).expanduser() if meta_path else p.with_suffix(".meta.json")
|
|
120
|
+
meta: dict[str, Any] = {}
|
|
121
|
+
if m.exists():
|
|
122
|
+
try:
|
|
123
|
+
meta = json.loads(m.read_text(encoding="utf-8", errors="ignore"))
|
|
124
|
+
except (json.JSONDecodeError, OSError):
|
|
125
|
+
meta = {}
|
|
126
|
+
|
|
127
|
+
if was_synced_recently(meta, max_hours=23):
|
|
128
|
+
return False
|
|
129
|
+
|
|
130
|
+
vm = Path(voice_md_path).expanduser() if voice_md_path else p.with_suffix(".voice.md")
|
|
131
|
+
result = sync_profile(p, meta_path=m, voice_md_path=vm)
|
|
132
|
+
|
|
133
|
+
if result.get("synced"):
|
|
134
|
+
meta["last_sync"] = result.get("time", _now_iso())
|
|
135
|
+
m.parent.mkdir(parents=True, exist_ok=True)
|
|
136
|
+
m.write_text(json.dumps(meta, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
137
|
+
return True
|
|
138
|
+
return False
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def main() -> int:
|
|
142
|
+
import argparse
|
|
143
|
+
|
|
144
|
+
parser = argparse.ArgumentParser(description="Sync voice profile to Cloudflare R2")
|
|
145
|
+
parser.add_argument("--profile", required=True, help="voice profile JSON file")
|
|
146
|
+
parser.add_argument("--meta", help="meta JSON file (default: profile path with .meta.json)")
|
|
147
|
+
parser.add_argument("--voice-md", help="voice.md file (default: profile path with .voice.md)")
|
|
148
|
+
parser.add_argument("--dry-run", action="store_true", help="print what would be synced without uploading")
|
|
149
|
+
parser.add_argument("--force", action="store_true", help="sync even if recently synced")
|
|
150
|
+
args = parser.parse_args()
|
|
151
|
+
|
|
152
|
+
profile_path = Path(args.profile).expanduser()
|
|
153
|
+
meta_path = Path(args.meta).expanduser() if args.meta else profile_path.with_suffix(".meta.json")
|
|
154
|
+
voice_md_path = Path(args.voice_md).expanduser() if args.voice_md else profile_path.with_suffix(".voice.md")
|
|
155
|
+
|
|
156
|
+
if not args.force:
|
|
157
|
+
meta: dict[str, Any] = {}
|
|
158
|
+
if meta_path.exists():
|
|
159
|
+
try:
|
|
160
|
+
meta = json.loads(meta_path.read_text(encoding="utf-8", errors="ignore"))
|
|
161
|
+
except (json.JSONDecodeError, OSError):
|
|
162
|
+
pass
|
|
163
|
+
if was_synced_recently(meta):
|
|
164
|
+
print("sync skipped — already synced within 24h (use --force to override)")
|
|
165
|
+
return 0
|
|
166
|
+
|
|
167
|
+
result = sync_profile(profile_path, meta_path=meta_path, voice_md_path=voice_md_path, dry_run=args.dry_run)
|
|
168
|
+
|
|
169
|
+
if args.dry_run:
|
|
170
|
+
print(json.dumps(result, indent=2))
|
|
171
|
+
return 0
|
|
172
|
+
|
|
173
|
+
if result.get("synced"):
|
|
174
|
+
meta: dict[str, Any] = {}
|
|
175
|
+
if meta_path.exists():
|
|
176
|
+
try:
|
|
177
|
+
meta = json.loads(meta_path.read_text(encoding="utf-8", errors="ignore"))
|
|
178
|
+
except (json.JSONDecodeError, OSError):
|
|
179
|
+
meta = {}
|
|
180
|
+
meta["last_sync"] = result.get("time", _now_iso())
|
|
181
|
+
meta_path.parent.mkdir(parents=True, exist_ok=True)
|
|
182
|
+
meta_path.write_text(json.dumps(meta, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
183
|
+
|
|
184
|
+
print(f"synced {len(result.get('uploaded', []))} files ({result.get('size', 0)} bytes)")
|
|
185
|
+
for f in result.get("uploaded", []):
|
|
186
|
+
print(f" {f}")
|
|
187
|
+
return 0
|
|
188
|
+
|
|
189
|
+
print(f"sync failed: {result.get('error', 'unknown')}", file=sys.stderr)
|
|
190
|
+
return 1
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
if __name__ == "__main__":
|
|
194
|
+
raise SystemExit(main())
|
|
@@ -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,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
|
+
|