@holdyourvoice/hyv 2.9.26 → 2.9.28
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 +12 -1
- package/README.md +7 -3
- package/agents/AGENTS.md +6 -4
- package/agents/README.md +20 -0
- package/agents/chatgpt.md +3 -1
- package/agents/claude-code.md +9 -14
- package/agents/codex.md +6 -5
- package/agents/cursor.md +7 -6
- package/agents/generic.md +8 -6
- package/agents/windsurf.md +5 -4
- package/assets/README.md +20 -0
- package/dist/index.js +32 -23
- package/package.json +1 -1
- package/scripts/README.md +23 -0
- package/skills/README.md +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable CLI changes. Also mirrored to [holdyourvoice.com/changelog](https://holdyourvoice.com/changelog) for user-facing releases.
|
|
4
4
|
|
|
5
|
+
## [2.9.28] — 2026-07-31
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Scoped MCP activation** — installed rules, export prompts, and MCP metadata now use HYV automatically for publishable copy or an explicit voice request, while routine chat and engineering work bypass it
|
|
9
|
+
- **Agent refresh** — `hyv doctor --fix-agents` refreshes the new scoped instructions through the package version marker
|
|
10
|
+
|
|
11
|
+
## [2.9.27] — 2026-07-15
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **MCP scan hang** — `hyv_scan`, `hyv_fix`, `hyv_check`, `hyv_score`, `hyv_diff`, and `hyv_validate` no longer block on account profile sync; they use local `~/.hyv` cache immediately (matching `hyv scan` CLI) and hydrate profiles in the background
|
|
15
|
+
|
|
5
16
|
## [2.9.26] — 2026-07-09
|
|
6
17
|
|
|
7
18
|
### Improved
|
|
@@ -227,4 +238,4 @@ All notable CLI changes. Also mirrored to [holdyourvoice.com/changelog](https://
|
|
|
227
238
|
- Published package excludes Python dev scripts and `src/`
|
|
228
239
|
|
|
229
240
|
### Fixed
|
|
230
|
-
- Bundled CLI reads correct `package.json` version from `dist/`
|
|
241
|
+
- Bundled CLI reads correct `package.json` version from `dist/`
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Already have node 18+?
|
|
|
29
29
|
npm i -g @holdyourvoice/hyv
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
postinstall copies agent rules and configures MCP for claude desktop and cursor (plus claude code, windsurf, codex, command code skills when detected). set `HYV_AUTO_CONFIGURE_AGENTS=0` to skip.
|
|
32
|
+
postinstall copies scoped agent rules and configures MCP for claude desktop and cursor (plus claude code, windsurf, codex, command code skills when detected). HYV runs automatically for publishable copy or an explicit voice request, not routine chat or engineering work. set `HYV_AUTO_CONFIGURE_AGENTS=0` to skip.
|
|
33
33
|
|
|
34
34
|
## free vs paid
|
|
35
35
|
|
|
@@ -96,7 +96,7 @@ hyv doctor --fix-agents
|
|
|
96
96
|
| tool | description |
|
|
97
97
|
|------|-------------|
|
|
98
98
|
| `hyv_welcome` / `hyv_demo` | onboarding + live free scan demo |
|
|
99
|
-
| `hyv_scan` | fast local scan (free, offline) |
|
|
99
|
+
| `hyv_scan` | fast local scan (free, offline; uses `~/.hyv` cache, no network wait) |
|
|
100
100
|
| `hyv_analyze` | hybrid local + server analysis (paid when online) |
|
|
101
101
|
| `hyv_clean` | scan → fix → validate → rewrite prompt |
|
|
102
102
|
| `hyv_fix` / `hyv_check` / `hyv_score` / `hyv_diff` | local utilities |
|
|
@@ -209,6 +209,10 @@ HYV_API_URL=https://staging.holdyourvoice.com hyv init
|
|
|
209
209
|
- [blog](https://holdyourvoice.com/blog)
|
|
210
210
|
- [community](https://holdyourvoice.com/community)
|
|
211
211
|
|
|
212
|
+
## documentation ownership
|
|
213
|
+
|
|
214
|
+
Changes under `cli/` update this README, the more-specific owner README when applicable, and the root repository README. Package-relative paths, bin names, published files, and postinstall behavior are contracts; validate them with `npm run validate:publish` before merging.
|
|
215
|
+
|
|
212
216
|
## license
|
|
213
217
|
|
|
214
|
-
UNLICENSED — [holdyourvoice.com](https://holdyourvoice.com)
|
|
218
|
+
UNLICENSED — [holdyourvoice.com](https://holdyourvoice.com)
|
package/agents/AGENTS.md
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
# Hold Your Voice — Agent Instructions
|
|
2
2
|
|
|
3
|
-
The user has a voice profile
|
|
3
|
+
The user has a voice profile for publishable copy. Use it for social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails. Also use it whenever the user explicitly asks for HYV, a voice profile, or writing in their voice.
|
|
4
4
|
|
|
5
5
|
## Auto-trigger — do these automatically
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**For eligible publishable copy or an explicit HYV/voice request:**
|
|
8
8
|
1. Run `hyv_scan` for a fast local check (free, offline, works without a profile)
|
|
9
9
|
2. Run `hyv_clean` for the full scan → fix → validate pipeline, or `hyv_fix` then `hyv_rewrite`
|
|
10
10
|
3. Run `hyv_validate` to verify the output matches their voice
|
|
11
11
|
|
|
12
|
-
**When the user asks you to
|
|
12
|
+
**When the user asks you to create or rewrite eligible copy:**
|
|
13
13
|
1. Write your draft normally
|
|
14
14
|
2. Run `hyv_scan` or `hyv_clean` on it
|
|
15
15
|
3. Run `hyv_rewrite` to match their voice profile
|
|
16
16
|
4. Deliver the voice-matched version
|
|
17
17
|
|
|
18
|
+
**Do not auto-run HYV** for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, or internal engineering-status messages. If the request is ambiguous, bypass HYV unless the user explicitly asks for it.
|
|
19
|
+
|
|
18
20
|
**After the user accepts a substantial edit:**
|
|
19
21
|
- Suggest they run `hyv reinforce --last` so their profile learns from the change
|
|
20
22
|
|
|
@@ -25,7 +27,7 @@ The user has a voice profile that defines their unique writing style. Your job i
|
|
|
25
27
|
| `hyv_welcome` | Onboarding guide (name → samples → test → signup) | New users, first time |
|
|
26
28
|
| `hyv_mcp_setup` | Status, integrate apps, ChatGPT connector | Check/refresh setup |
|
|
27
29
|
| `hyv_profiles` | List voice profiles | See which profiles are available |
|
|
28
|
-
| `hyv_scan` | Fast local AI-pattern scan (free, 220+ patterns) |
|
|
30
|
+
| `hyv_scan` | Fast local AI-pattern scan (free, 220+ patterns) | Eligible publishable copy or an explicit HYV request |
|
|
29
31
|
| `hyv_analyze` | Full hybrid scan (local + server, paid) | Important drafts |
|
|
30
32
|
| `hyv_clean` | Scan → fix → validate → rewrite in one call | Best single-call pipeline |
|
|
31
33
|
| `hyv_fix` | Auto-fix deterministic patterns (no LLM) | Before rewrite |
|
package/agents/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# `cli/agents/`
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`cli/agents/` contains agent resources included in the published CLI package.
|
|
6
|
+
|
|
7
|
+
## Contracts
|
|
8
|
+
|
|
9
|
+
The directory is included by the `files` list in `cli/package.json`. Changes must preserve package inclusion and postinstall discovery behavior. All host instructions share the same activation boundary: publishable copy or an explicit voice request uses HYV; routine chat and engineering work bypass it.
|
|
10
|
+
|
|
11
|
+
## Validation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd cli
|
|
15
|
+
npm run validate:publish
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Documentation ownership
|
|
19
|
+
|
|
20
|
+
Changes update this README, `cli/README.md`, and the root `README.md`.
|
package/agents/chatgpt.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Hold Your Voice — Writing Rules
|
|
2
2
|
|
|
3
|
-
The user has a voice profile.
|
|
3
|
+
The user has a voice profile for publishable copy: social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails. Apply it whenever the user explicitly asks for HYV, a voice profile, or writing in their voice.
|
|
4
|
+
|
|
5
|
+
Do not apply these rules to routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, or internal engineering-status messages. If a request is ambiguous, bypass HYV unless the user explicitly requests it.
|
|
4
6
|
|
|
5
7
|
## Rules
|
|
6
8
|
1. Never use AI-slop words: delve, leverage, tapestry, foster, harness, pivotal, innovative, cutting-edge, state-of-the-art, robust, holistic, multifaceted, nuanced
|
package/agents/claude-code.md
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
# Hold Your Voice
|
|
2
2
|
|
|
3
|
-
The user has a voice profile
|
|
3
|
+
The user has a voice profile for publishable copy. Use HYV for social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails. Always use HYV when the user explicitly asks for it, a voice profile, or writing in their voice.
|
|
4
4
|
|
|
5
5
|
## When to use HYV
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
7
|
+
Run `hyv_scan` or use the `hyv_scan` MCP tool before delivering eligible publishable copy:
|
|
8
|
+
- Social posts, threads, and public replies
|
|
9
|
+
- Newsletters, blogs, articles, and landing or product pages
|
|
10
|
+
- Campaigns and external audience-facing emails
|
|
11
|
+
|
|
12
|
+
Run `hyv_rewrite` or use the `hyv_rewrite` MCP tool when eligible copy needs voice work, or whenever the user explicitly asks for HYV or voice-profile writing.
|
|
13
|
+
|
|
14
|
+
Bypass HYV for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages. If the request is ambiguous, bypass it unless the user explicitly requests HYV.
|
|
20
15
|
|
|
21
16
|
## How to use
|
|
22
17
|
|
package/agents/codex.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Hold Your Voice
|
|
2
2
|
|
|
3
|
-
The user has a voice profile for
|
|
3
|
+
The user has a voice profile for publishable copy. Use HYV for social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails. Always use HYV when the user explicitly asks for it, a voice profile, or writing in their voice.
|
|
4
4
|
|
|
5
5
|
## Auto-trigger rules
|
|
6
6
|
|
|
7
|
-
Run these MCP tools (or CLI commands) for
|
|
8
|
-
- `hyv_scan` or `hyv_analyze`
|
|
7
|
+
Run these MCP tools (or CLI commands) for eligible publishable copy:
|
|
8
|
+
- `hyv_scan` or `hyv_analyze` before delivering it
|
|
9
9
|
- `hyv_clean` for the full pipeline, or `hyv_fix` → `hyv_rewrite`
|
|
10
10
|
- `hyv_validate` to verify the output
|
|
11
11
|
- Suggest `hyv reinforce --last` after substantial accepted edits
|
|
@@ -25,6 +25,7 @@ hyv mcp --setup
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Rules
|
|
28
|
-
-
|
|
28
|
+
- Bypass HYV for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages. If ambiguous, bypass it unless HYV is explicitly requested.
|
|
29
|
+
- Always scan eligible publishable copy
|
|
29
30
|
- Always fix/rewrite if scan finds issues
|
|
30
|
-
- Preserve meaning, match voice profile
|
|
31
|
+
- Preserve meaning, match voice profile
|
package/agents/cursor.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# Hold Your Voice
|
|
2
2
|
|
|
3
|
-
Use HYV MCP tools for
|
|
3
|
+
Use HYV MCP tools for publishable copy: social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails. Always use HYV when the user explicitly asks for it, a voice profile, or writing in their voice. If no profile exists yet, call `hyv_welcome` or `hyv_profiles` first — free local scan works without a profile. For MCP host setup or refresh, call `hyv_mcp_setup` (no terminal).
|
|
4
4
|
|
|
5
5
|
## When to use
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
- When editing or improving text
|
|
6
|
+
- Social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails
|
|
7
|
+
- Any request that explicitly names HYV, a voice profile, or writing in the user's voice
|
|
9
8
|
- New users: `hyv_welcome` (name → samples via extract_prompt → scan → signup last)
|
|
10
9
|
|
|
10
|
+
Bypass HYV for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages. If ambiguous, bypass it unless HYV is explicitly requested.
|
|
11
|
+
|
|
11
12
|
## Tool flow (preferred)
|
|
12
13
|
1. `hyv_scan` — fast local check (free, offline)
|
|
13
14
|
2. `hyv_analyze` — full hybrid engine when user is on a paid plan
|
|
@@ -29,7 +30,7 @@ Use HYV MCP tools for all writing tasks. If no profile exists yet, call `hyv_wel
|
|
|
29
30
|
- `hyv_profiles` — list profiles
|
|
30
31
|
|
|
31
32
|
## Rules
|
|
32
|
-
- Always scan
|
|
33
|
+
- Always scan eligible publishable copy
|
|
33
34
|
- Use `hyv_fix` before `hyv_rewrite` when possible
|
|
34
35
|
- Preserve meaning when rewriting
|
|
35
|
-
- Match the user's voice profile exactly
|
|
36
|
+
- Match the user's voice profile exactly
|
package/agents/generic.md
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
# Hold Your Voice — Agent Instructions
|
|
2
2
|
|
|
3
|
-
You have access to the Hold Your Voice MCP tools.
|
|
3
|
+
You have access to the Hold Your Voice MCP tools. Use the user's voice profile for publishable copy: social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails. Also use it whenever the user explicitly asks for HYV, a voice profile, or writing in their voice.
|
|
4
4
|
|
|
5
5
|
## Auto-trigger rules
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use these tools automatically for eligible publishable copy. Always honor an explicit HYV or voice-profile request:
|
|
8
8
|
|
|
9
|
-
**Before delivering
|
|
9
|
+
**Before delivering eligible publishable copy:**
|
|
10
10
|
1. Run `hyv_scan` (fast) or `hyv_analyze` (full hybrid when paid)
|
|
11
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
|
-
**When the user asks you to
|
|
14
|
+
**When the user asks you to create or rewrite eligible copy:**
|
|
15
15
|
1. Write your draft
|
|
16
16
|
2. Run `hyv_scan` or `hyv_clean` on it
|
|
17
17
|
3. Deliver the cleaned version
|
|
18
18
|
|
|
19
|
+
**Bypass HYV** for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages. If the request is ambiguous, bypass it unless the user explicitly requests HYV.
|
|
20
|
+
|
|
19
21
|
**After the user accepts a substantial edit:**
|
|
20
22
|
- Suggest they run `hyv reinforce --last` so their profile learns from the change
|
|
21
23
|
|
|
@@ -41,7 +43,7 @@ You MUST use these tools automatically — do NOT wait for the user to mention "
|
|
|
41
43
|
- `hyv_profiles` — list voice profiles
|
|
42
44
|
|
|
43
45
|
## Rules
|
|
44
|
-
- NEVER skip scanning for
|
|
46
|
+
- NEVER skip scanning for eligible publishable copy
|
|
45
47
|
- Preserve original meaning exactly when rewriting
|
|
46
48
|
- Match the voice profile's rhythm, vocabulary, and tone
|
|
47
|
-
- If no profile exists, run onboarding via `hyv_welcome` (step 2 extract_prompt from chat history)
|
|
49
|
+
- If no profile exists, run onboarding via `hyv_welcome` (step 2 extract_prompt from chat history)
|
package/agents/windsurf.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Hold Your Voice
|
|
2
2
|
|
|
3
|
-
Use HYV MCP tools for
|
|
3
|
+
Use HYV MCP tools for publishable copy: social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails. Always use HYV when the user explicitly asks for it, a voice profile, or writing in their voice.
|
|
4
4
|
|
|
5
5
|
## Auto-trigger
|
|
6
|
-
- `hyv_scan` or `hyv_analyze` before delivering
|
|
6
|
+
- `hyv_scan` or `hyv_analyze` before delivering eligible publishable copy
|
|
7
7
|
- `hyv_clean` for scan → fix → validate in one call
|
|
8
8
|
- `hyv_fix` then `hyv_rewrite` for stepwise fixes
|
|
9
9
|
- `hyv_validate` after rewriting
|
|
@@ -14,6 +14,7 @@ Use HYV MCP tools for all writing tasks. The user has a voice profile.
|
|
|
14
14
|
- `hyv_check` / `hyv_score` / `hyv_diff`
|
|
15
15
|
|
|
16
16
|
## Rules
|
|
17
|
-
-
|
|
17
|
+
- Bypass HYV for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages. If ambiguous, bypass it unless HYV is explicitly requested.
|
|
18
|
+
- Always scan eligible publishable copy
|
|
18
19
|
- Use `hyv_fix` before `hyv_rewrite` when possible
|
|
19
|
-
- Preserve meaning, match voice profile
|
|
20
|
+
- Preserve meaning, match voice profile
|
package/assets/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# `cli/assets/`
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`cli/assets/` contains assets included in the published CLI package.
|
|
6
|
+
|
|
7
|
+
## Contracts
|
|
8
|
+
|
|
9
|
+
The directory is included by the `files` list in `cli/package.json`. Keep package paths and postinstall consumers intact.
|
|
10
|
+
|
|
11
|
+
## Validation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd cli
|
|
15
|
+
npm run validate:publish
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Documentation ownership
|
|
19
|
+
|
|
20
|
+
Changes update this README, `cli/README.md`, and the root `README.md`.
|
package/dist/index.js
CHANGED
|
@@ -16662,7 +16662,9 @@ function buildRewritePrompt(options) {
|
|
|
16662
16662
|
const template = loadPromptTemplate();
|
|
16663
16663
|
const prompt = template.replace("{profile_block}", profileBlock).replace("{constraints_block}", constraints || "(none)").replace("{tier_one_lines}", tierOneLines).replace("{other_lines}", otherLines).replace("{draft_name}", draftPath).replace("{numbered_draft}", numberedDraft);
|
|
16664
16664
|
return {
|
|
16665
|
-
prompt
|
|
16665
|
+
prompt: skipScan ? `${prompt}
|
|
16666
|
+
|
|
16667
|
+
none found by deterministic scan` : prompt,
|
|
16666
16668
|
profileUsed,
|
|
16667
16669
|
issuesFound: issues.length
|
|
16668
16670
|
};
|
|
@@ -17938,6 +17940,7 @@ var MCP_SERVER_ARGS = ["mcp", "--stdio"];
|
|
|
17938
17940
|
// src/lib/cli-entry.ts
|
|
17939
17941
|
function resolveCliEntry() {
|
|
17940
17942
|
const candidates = [
|
|
17943
|
+
typeof __filename !== "undefined" ? path17.resolve(__filename) : "",
|
|
17941
17944
|
path17.resolve(process.argv[1] || ""),
|
|
17942
17945
|
path17.resolve(__dirname, "index.js"),
|
|
17943
17946
|
path17.resolve(__dirname, "..", "dist", "index.js")
|
|
@@ -17949,7 +17952,7 @@ function mcpServerCommand() {
|
|
|
17949
17952
|
if (entry) {
|
|
17950
17953
|
return { command: process.execPath, args: [entry, ...MCP_SERVER_ARGS] };
|
|
17951
17954
|
}
|
|
17952
|
-
|
|
17955
|
+
throw new Error("could not resolve hyv CLI entry \u2014 reinstall @holdyourvoice/hyv or run via node dist/index.js");
|
|
17953
17956
|
}
|
|
17954
17957
|
function mcpServerSnippet() {
|
|
17955
17958
|
const { command, args: args2 } = mcpServerCommand();
|
|
@@ -19827,6 +19830,10 @@ async function resolveProfile(slug) {
|
|
|
19827
19830
|
}
|
|
19828
19831
|
return profile;
|
|
19829
19832
|
}
|
|
19833
|
+
async function loadLocalProfileForTool(slug) {
|
|
19834
|
+
void ensureMcpProfilesHydrated();
|
|
19835
|
+
return loadProfileForCommand(slug);
|
|
19836
|
+
}
|
|
19830
19837
|
function jsonRpcOk(id, result) {
|
|
19831
19838
|
return JSON.stringify({ jsonrpc: "2.0", id, result });
|
|
19832
19839
|
}
|
|
@@ -19884,7 +19891,7 @@ async function toolScan(args2) {
|
|
|
19884
19891
|
return "Error: no text or file provided";
|
|
19885
19892
|
try {
|
|
19886
19893
|
let scanText2 = text;
|
|
19887
|
-
const profile = await
|
|
19894
|
+
const profile = await loadLocalProfileForTool(args2.profile);
|
|
19888
19895
|
if (filePath) {
|
|
19889
19896
|
try {
|
|
19890
19897
|
scanText2 = readScanFile(filePath);
|
|
@@ -19932,7 +19939,7 @@ async function toolValidate(args2) {
|
|
|
19932
19939
|
if (!text.trim())
|
|
19933
19940
|
return "Error: no text provided";
|
|
19934
19941
|
try {
|
|
19935
|
-
const profile = await
|
|
19942
|
+
const profile = await loadLocalProfileForTool(profileSlug);
|
|
19936
19943
|
if (!profile)
|
|
19937
19944
|
return "Error: no voice profile available. Run hyv init or use hyv scan for free generic checks.";
|
|
19938
19945
|
const result = validateRewrite(text, text, profile);
|
|
@@ -19955,7 +19962,7 @@ async function toolFix(args2) {
|
|
|
19955
19962
|
if (!text.trim())
|
|
19956
19963
|
return "Error: no text provided";
|
|
19957
19964
|
try {
|
|
19958
|
-
const profile = await
|
|
19965
|
+
const profile = await loadLocalProfileForTool(args2.profile);
|
|
19959
19966
|
const result = runPipeline(text, profile, true);
|
|
19960
19967
|
if (result.changes.length === 0)
|
|
19961
19968
|
return "No auto-fixable issues found.";
|
|
@@ -19974,7 +19981,7 @@ async function toolCheck(args2) {
|
|
|
19974
19981
|
if (!text.trim())
|
|
19975
19982
|
return "Error: no text provided";
|
|
19976
19983
|
try {
|
|
19977
|
-
const profile = await
|
|
19984
|
+
const profile = await loadLocalProfileForTool(args2.profile);
|
|
19978
19985
|
const result = runPipeline(text, profile, false);
|
|
19979
19986
|
if (result.stats.totalSignals === 0)
|
|
19980
19987
|
return `Clean \u2014 score: ${result.score}/100. No AI patterns found.`;
|
|
@@ -19992,7 +19999,7 @@ async function toolScore(args2) {
|
|
|
19992
19999
|
if (!text.trim())
|
|
19993
20000
|
return "Error: no text provided";
|
|
19994
20001
|
try {
|
|
19995
|
-
const profile = await
|
|
20002
|
+
const profile = await loadLocalProfileForTool(args2.profile);
|
|
19996
20003
|
const result = runPipeline(text, profile, false);
|
|
19997
20004
|
return result.score.toString();
|
|
19998
20005
|
} catch (err) {
|
|
@@ -20004,7 +20011,7 @@ async function toolDiff(args2) {
|
|
|
20004
20011
|
if (!text.trim())
|
|
20005
20012
|
return "Error: no text provided";
|
|
20006
20013
|
try {
|
|
20007
|
-
const profile = await
|
|
20014
|
+
const profile = await loadLocalProfileForTool(args2.profile);
|
|
20008
20015
|
const result = runPipeline(text, profile, true);
|
|
20009
20016
|
if (result.changes.length === 0)
|
|
20010
20017
|
return "No auto-fixable changes available.";
|
|
@@ -20183,7 +20190,7 @@ var TOOLS = [
|
|
|
20183
20190
|
},
|
|
20184
20191
|
{
|
|
20185
20192
|
name: "hyv_rewrite",
|
|
20186
|
-
description: "Rewrite
|
|
20193
|
+
description: "Rewrite publishable copy to match the user's voice profile. Use for social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails, or when the user explicitly asks for HYV, a voice profile, or writing in their voice. Do not auto-use for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, or internal engineering-status messages.",
|
|
20187
20194
|
inputSchema: {
|
|
20188
20195
|
type: "object",
|
|
20189
20196
|
properties: {
|
|
@@ -20195,7 +20202,7 @@ var TOOLS = [
|
|
|
20195
20202
|
},
|
|
20196
20203
|
{
|
|
20197
20204
|
name: "hyv_analyze",
|
|
20198
|
-
description: "Full analysis: local scan + optional server hybrid engine when authed (paid).
|
|
20205
|
+
description: "Full analysis for eligible publishable copy or an explicit HYV/voice-profile request: local scan + optional server hybrid engine when authed (paid). Falls back to local offline.",
|
|
20199
20206
|
inputSchema: {
|
|
20200
20207
|
type: "object",
|
|
20201
20208
|
properties: {
|
|
@@ -20208,7 +20215,7 @@ var TOOLS = [
|
|
|
20208
20215
|
},
|
|
20209
20216
|
{
|
|
20210
20217
|
name: "hyv_clean",
|
|
20211
|
-
description: "Composite clean: scan \u2192 auto-fix \u2192 validate \u2192 LLM rewrite prompt for remaining issues.
|
|
20218
|
+
description: "Composite clean for eligible publishable copy or an explicit HYV/voice-profile request: scan \u2192 auto-fix \u2192 validate \u2192 LLM rewrite prompt for remaining issues.",
|
|
20212
20219
|
inputSchema: {
|
|
20213
20220
|
type: "object",
|
|
20214
20221
|
properties: {
|
|
@@ -20221,7 +20228,7 @@ var TOOLS = [
|
|
|
20221
20228
|
},
|
|
20222
20229
|
{
|
|
20223
20230
|
name: "hyv_scan",
|
|
20224
|
-
description: "Fast local scan for 80+ AI patterns + profile never-list/learned rules. FREE, offline.
|
|
20231
|
+
description: "Fast local scan for 80+ AI patterns + profile never-list/learned rules. FREE, offline. Auto-use only for eligible publishable copy (social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails) or an explicit HYV/voice-profile request.",
|
|
20225
20232
|
inputSchema: {
|
|
20226
20233
|
type: "object",
|
|
20227
20234
|
properties: {
|
|
@@ -20233,7 +20240,7 @@ var TOOLS = [
|
|
|
20233
20240
|
},
|
|
20234
20241
|
{
|
|
20235
20242
|
name: "hyv_fix",
|
|
20236
|
-
description: "Apply deterministic auto-fixes without an LLM. FREE, works offline.",
|
|
20243
|
+
description: "Apply deterministic auto-fixes without an LLM. FREE, works offline. Auto-use only for eligible publishable copy or an explicit HYV/voice-profile request.",
|
|
20237
20244
|
inputSchema: {
|
|
20238
20245
|
type: "object",
|
|
20239
20246
|
properties: {
|
|
@@ -20245,7 +20252,7 @@ var TOOLS = [
|
|
|
20245
20252
|
},
|
|
20246
20253
|
{
|
|
20247
20254
|
name: "hyv_check",
|
|
20248
|
-
description: "Quick inline text check \u2014 score and issues. FREE, works offline.",
|
|
20255
|
+
description: "Quick inline text check \u2014 score and issues. FREE, works offline. Auto-use only for eligible publishable copy or an explicit HYV/voice-profile request.",
|
|
20249
20256
|
inputSchema: {
|
|
20250
20257
|
type: "object",
|
|
20251
20258
|
properties: {
|
|
@@ -20257,7 +20264,7 @@ var TOOLS = [
|
|
|
20257
20264
|
},
|
|
20258
20265
|
{
|
|
20259
20266
|
name: "hyv_score",
|
|
20260
|
-
description: "Return a 0-100 voice score. FREE, works offline.",
|
|
20267
|
+
description: "Return a 0-100 voice score. FREE, works offline. Auto-use only for eligible publishable copy or an explicit HYV/voice-profile request.",
|
|
20261
20268
|
inputSchema: {
|
|
20262
20269
|
type: "object",
|
|
20263
20270
|
properties: {
|
|
@@ -20269,7 +20276,7 @@ var TOOLS = [
|
|
|
20269
20276
|
},
|
|
20270
20277
|
{
|
|
20271
20278
|
name: "hyv_diff",
|
|
20272
|
-
description: "Show auto-fixes as before/after diff. FREE, works offline.",
|
|
20279
|
+
description: "Show auto-fixes as before/after diff. FREE, works offline. Auto-use only for eligible publishable copy or an explicit HYV/voice-profile request.",
|
|
20273
20280
|
inputSchema: {
|
|
20274
20281
|
type: "object",
|
|
20275
20282
|
properties: {
|
|
@@ -20286,7 +20293,7 @@ var TOOLS = [
|
|
|
20286
20293
|
},
|
|
20287
20294
|
{
|
|
20288
20295
|
name: "hyv_validate",
|
|
20289
|
-
description: "Validate text against a voice profile (never-list, cadence, learned rules).",
|
|
20296
|
+
description: "Validate text against a voice profile (never-list, cadence, learned rules). Auto-use only for eligible publishable copy or an explicit HYV/voice-profile request.",
|
|
20290
20297
|
inputSchema: {
|
|
20291
20298
|
type: "object",
|
|
20292
20299
|
properties: {
|
|
@@ -20309,7 +20316,7 @@ var HYV_STATUS_PROMPT = `Use hold your voice MCP tools:
|
|
|
20309
20316
|
0. MCP setup \u2192 hyv_mcp_setup (status | integrate | chatgpt). Profiles \u2192 hyv_profiles (lists MCP-ready profiles).
|
|
20310
20317
|
1. Profiles work automatically: terminal \`hyv welcome\` saves locally; dashboard profiles need \`hyv init\` once on this machine (MCP auto-syncs).
|
|
20311
20318
|
2. New onboarding in chat \u2192 hyv_welcome. Step 2: mode=extract_prompt. Save markdown \u2192 hyv import or dashboard.
|
|
20312
|
-
3.
|
|
20319
|
+
3. Eligible publishable copy (social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails), or an explicit HYV/voice-profile request: hyv_scan \u2192 hyv_fix / hyv_rewrite \u2192 hyv_validate. Bypass HYV for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages.
|
|
20313
20320
|
4. Paid extras \u2192 hyv init + hyv plan --upgrade (signup last).
|
|
20314
20321
|
|
|
20315
20322
|
Keep the answer compact.`;
|
|
@@ -20650,11 +20657,11 @@ init_api();
|
|
|
20650
20657
|
var FORMATS = {
|
|
20651
20658
|
claude: {
|
|
20652
20659
|
name: "Claude / Claude Code",
|
|
20653
|
-
wrap: (profile, body) => `You are rewriting
|
|
20660
|
+
wrap: (profile, body) => `You are rewriting publishable copy to match a specific voice profile. Use the HYV voice profile only for social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails, or when explicitly asked to use HYV, a voice profile, or to write in this voice.
|
|
20654
20661
|
|
|
20655
20662
|
${body}
|
|
20656
20663
|
|
|
20657
|
-
|
|
20664
|
+
Bypass it for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages. Preserve meaning. Match rhythm, vocabulary, tone, and sentence patterns. Never use words from the never-list.`
|
|
20658
20665
|
},
|
|
20659
20666
|
chatgpt: {
|
|
20660
20667
|
name: "ChatGPT Custom Instructions",
|
|
@@ -20662,7 +20669,7 @@ When asked to write or rewrite "in my voice", match this profile exactly. Preser
|
|
|
20662
20669
|
|
|
20663
20670
|
${body}
|
|
20664
20671
|
|
|
20665
|
-
|
|
20672
|
+
Use the HYV voice profile only for social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails, or when I explicitly ask to use HYV, a voice profile, or to write in my voice. Do not apply it to routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, or internal engineering-status messages. Same rhythm. Same vocabulary. Same patterns. No AI-slop words.`
|
|
20666
20673
|
},
|
|
20667
20674
|
generic: {
|
|
20668
20675
|
name: "Generic System Prompt",
|
|
@@ -20671,7 +20678,7 @@ When I ask you to "write in my voice" or "rewrite this in my voice", match this
|
|
|
20671
20678
|
${body}
|
|
20672
20679
|
|
|
20673
20680
|
## Instructions
|
|
20674
|
-
|
|
20681
|
+
Use the HYV voice profile only for social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails, or when explicitly asked to use HYV, a voice profile, or to write in this voice. Bypass it for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages. Preserve meaning. Match rhythm, vocabulary, and tone. Remove AI-slop patterns (delve, leverage, tapestry, etc.).`
|
|
20675
20682
|
},
|
|
20676
20683
|
cursor: {
|
|
20677
20684
|
name: "Cursor Rules",
|
|
@@ -20680,7 +20687,9 @@ Rewrite text to match this voice profile. Preserve meaning. Match rhythm, vocabu
|
|
|
20680
20687
|
${body}
|
|
20681
20688
|
|
|
20682
20689
|
## Rewrite Rules
|
|
20683
|
-
-
|
|
20690
|
+
- Use the HYV voice profile only for social posts, newsletters, blogs, landing or product pages, campaigns, and external audience-facing emails
|
|
20691
|
+
- Also use it when explicitly asked to use HYV, a voice profile, or to write in this voice
|
|
20692
|
+
- Bypass it for routine chat, Q&A, analysis, research, planning, coding, debugging, reviews, logs, operational work, code comments, and internal engineering-status messages
|
|
20684
20693
|
- Preserve meaning
|
|
20685
20694
|
- Remove AI-slop patterns
|
|
20686
20695
|
- Use the same rhythm and vocabulary`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holdyourvoice/hyv",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.28",
|
|
4
4
|
"description": "Free local AI writing scan for cursor & claude. MCP server, 220+ pattern detection, voice profiles. npx @holdyourvoice/hyv welcome",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# `cli/scripts/`
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`cli/scripts/` contains package install, publish validation, smoke-test, and supporting CLI scripts.
|
|
6
|
+
|
|
7
|
+
## Contracts
|
|
8
|
+
|
|
9
|
+
Scripts are referenced by `cli/package.json` and the npm package `files` list. Package-relative paths must remain valid when the package is published.
|
|
10
|
+
|
|
11
|
+
`postinstall-lib.js` writes the managed host instructions. A CLI version bump refreshes them through the `~/.hyv/agents-version.json` marker when users run install or `hyv doctor --fix-agents`. `validate-publish.js` accepts npm's array and package-name keyed dry-run manifests.
|
|
12
|
+
|
|
13
|
+
## Validation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cd cli
|
|
17
|
+
npm run validate:publish
|
|
18
|
+
npm run test:smoke
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Documentation ownership
|
|
22
|
+
|
|
23
|
+
Changes under this folder update this README, `cli/README.md`, and the root `README.md`.
|
package/skills/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# `cli/skills/`
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`cli/skills/` contains skills included in the published CLI package.
|
|
6
|
+
|
|
7
|
+
## Contracts
|
|
8
|
+
|
|
9
|
+
The directory is included by the `files` list in `cli/package.json`. Changes must preserve package inclusion and any postinstall or agent configuration paths that reference these files.
|
|
10
|
+
|
|
11
|
+
## Validation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd cli
|
|
15
|
+
npm run validate:publish
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Documentation ownership
|
|
19
|
+
|
|
20
|
+
Changes update this README, `cli/README.md`, and the root `README.md`.
|