@hxp-tools/humanizer 0.0.0-stage → 2.0.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/AGENTS.md +52 -0
- package/CHANGELOG.md +242 -0
- package/LICENSE +21 -0
- package/README.md +214 -2
- package/SKILL.md +355 -0
- package/bin/humanizer.js +161 -0
- package/package.json +51 -4
- package/references/do-not-flag.md +129 -0
- package/references/examples.md +379 -0
- package/references/tell-patterns.md +541 -0
- package/references/text-hygiene.md +111 -0
- package/references/voice-matching.md +122 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Voice Matching
|
|
2
|
+
|
|
3
|
+
Read this only when Step 0 found a voice source. Its job: rewrite so the text
|
|
4
|
+
sounds like a specific writer, not like generic "human-ish" prose. Generic
|
|
5
|
+
de-slopping removes a machine signature. Voice matching replaces it with a
|
|
6
|
+
person's signature, which is far harder to flag and far more useful.
|
|
7
|
+
|
|
8
|
+
## Part 1: Voice sources, in priority order
|
|
9
|
+
|
|
10
|
+
1. **Explicit input in the request.** This matches SKILL.md Step 0:
|
|
11
|
+
- *A sample the user pasted or pointed to.* Their own earlier writing, an
|
|
12
|
+
excerpt, or a file path they named. This is the strongest source: it is
|
|
13
|
+
the real distribution, not a description of it. Read it and infer
|
|
14
|
+
(Part 2).
|
|
15
|
+
- *A named, well-known author.* "make it sound like Hemingway / Joan
|
|
16
|
+
Didion / Paul Graham." Use your knowledge of that author's actual
|
|
17
|
+
habits, but match the *instincts* (sentence rhythm, diction, stance),
|
|
18
|
+
never copy their famous sentences.
|
|
19
|
+
2. **A discovered profile file.** `VOICE.md`, `STYLE-GUIDE.md`,
|
|
20
|
+
`voice-profile.{md,yaml,json}`, `.manuscript/STYLE-GUIDE.md`, or a voice
|
|
21
|
+
section inside `AGENTS.md` / `CLAUDE.md`. Use the documented schema if it
|
|
22
|
+
matches Part 3, otherwise read it as prose and extract what you can.
|
|
23
|
+
|
|
24
|
+
If sources conflict (a pasted sample and a stale STYLE-GUIDE.md, or a named
|
|
25
|
+
author and a VOICE.md in the project), the explicit request wins; mention the
|
|
26
|
+
conflict in the output header.
|
|
27
|
+
|
|
28
|
+
## Part 2: Reading a voice off a raw sample
|
|
29
|
+
|
|
30
|
+
You do not need a schema to extract a voice. From any sample of roughly 150
|
|
31
|
+
words or more, read off these dimensions. If the sample is shorter than ~150
|
|
32
|
+
words, extract cautiously and say so in the output header (low confidence).
|
|
33
|
+
|
|
34
|
+
- **Cadence and sentence-length distribution.** Are sentences mostly short?
|
|
35
|
+
Wildly varied? Long and subordinated? Note the actual swing, not an average.
|
|
36
|
+
This is the single most identifying feature; reproduce its *shape*.
|
|
37
|
+
- **Diction and register.** Anglo-Saxon and plain, or Latinate and formal?
|
|
38
|
+
Technical? Slangy? Profane? Era-marked? Note the ceiling and floor.
|
|
39
|
+
- **Signature constructions.** Habitual moves: rhetorical questions, sentence
|
|
40
|
+
fragments, semicolon chains, starting with "And" or "But," dashes,
|
|
41
|
+
parentheticals, direct address to the reader.
|
|
42
|
+
- **Punctuation habits.** Does this writer genuinely love em dashes? Use
|
|
43
|
+
semicolons? Avoid the Oxford comma? Their real habit overrides the generic
|
|
44
|
+
tell rule (see Part 4).
|
|
45
|
+
- **Paragraph shape.** One-line paragraphs for punch? Long dense blocks?
|
|
46
|
+
Topic-sentence-first or buried lede?
|
|
47
|
+
- **Stance and attitude.** Confident and unhedged? Wry? Earnest? Skeptical?
|
|
48
|
+
Warm? Combative? Self-deprecating? Voice is as much attitude as syntax.
|
|
49
|
+
- **The avoid-list.** What does this writer never do? No exclamation points,
|
|
50
|
+
no jargon, no first person, no profanity. Absences define a voice as much
|
|
51
|
+
as habits.
|
|
52
|
+
|
|
53
|
+
Build a short internal model across these seven, then write Pass 1 so the
|
|
54
|
+
output sits inside that distribution. Match the *instincts*, not specific
|
|
55
|
+
phrases.
|
|
56
|
+
|
|
57
|
+
## Part 3: Optional VOICE.md schema (interop convenience, not a requirement)
|
|
58
|
+
|
|
59
|
+
The skill works with no profile file at all. This schema exists so users (and
|
|
60
|
+
adjacent tools like Scriveno STYLE-GUIDE.md or a Pillars AGENTS.md voice
|
|
61
|
+
section) can hand the skill a structured profile and get sharper results. If a
|
|
62
|
+
file roughly follows this shape, read it directly; if it does not, fall back
|
|
63
|
+
to Part 2 and read it as prose.
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
# Voice
|
|
67
|
+
|
|
68
|
+
## Cadence
|
|
69
|
+
Sentence-length pattern and rhythm. e.g. "Mostly short. Occasional long
|
|
70
|
+
subordinated sentence for contrast. Never two long sentences in a row."
|
|
71
|
+
|
|
72
|
+
## Diction
|
|
73
|
+
Register, word origin, jargon tolerance, profanity, era markers.
|
|
74
|
+
|
|
75
|
+
## Signature moves
|
|
76
|
+
Habitual constructions to reproduce.
|
|
77
|
+
|
|
78
|
+
## Avoid
|
|
79
|
+
Things this writer never does.
|
|
80
|
+
|
|
81
|
+
## Stance
|
|
82
|
+
Attitude and emotional temperature.
|
|
83
|
+
|
|
84
|
+
## Sample
|
|
85
|
+
One representative paragraph (~80-150 words) of the writer's real prose.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Every section is optional. The `## Sample` is the most valuable: if present,
|
|
89
|
+
prefer inferring from it (Part 2) over trusting the bullet descriptions, since
|
|
90
|
+
real prose beats self-description.
|
|
91
|
+
|
|
92
|
+
## Part 4: Applying voice without overfitting
|
|
93
|
+
|
|
94
|
+
- **Match the distribution, not the wording.** Reproduce the rhythm, register,
|
|
95
|
+
and instincts. Never lift a distinctive sentence, image, or coinage from the
|
|
96
|
+
sample into the user's text. That is plagiarism of the sample and produces
|
|
97
|
+
obvious seams.
|
|
98
|
+
- **Voice beats the generic rule.** If the writer genuinely and consistently
|
|
99
|
+
uses em dashes, long sentences, or "moreover," those are not tells for this
|
|
100
|
+
writer. The tell-pattern catalog yields to a documented authentic habit.
|
|
101
|
+
Conflict resolution order: **authentic author habit > generic tell rule >
|
|
102
|
+
neutral default.**
|
|
103
|
+
- **Do not caricature.** Matching Didion does not mean every sentence is a
|
|
104
|
+
fragment about dread. Take the central tendencies and a little of the
|
|
105
|
+
variance, not the extremes turned up to maximum. Caricature is its own
|
|
106
|
+
detectable signature.
|
|
107
|
+
- **Preserve the user's meaning, not the sample's content.** The sample
|
|
108
|
+
supplies *how*; the user's draft supplies *what*. Never let the sample's
|
|
109
|
+
topic, facts, or opinions bleed into the rewrite.
|
|
110
|
+
- **Confidence honesty.** If the sample was thin or the profile sparse, say so
|
|
111
|
+
in the output header ("Voice: from VOICE.md, low-confidence: 60-word
|
|
112
|
+
sample") so the user can supply more.
|
|
113
|
+
|
|
114
|
+
## Part 5: When voice and de-slopping cooperate
|
|
115
|
+
|
|
116
|
+
Voice-first ordering exists because voice is generative and de-slopping is
|
|
117
|
+
subtractive. Establish cadence, diction, and stance in Pass 1, then run Pass 2
|
|
118
|
+
tell removal *within* that voice: a tell fix that would flatten the
|
|
119
|
+
established rhythm is the wrong fix; find one that keeps the voice. Pass 3 then
|
|
120
|
+
checks both that machine tells are gone and that the voice is intact and not
|
|
121
|
+
caricatured. A rewrite that is clean but no longer sounds like the writer has
|
|
122
|
+
failed, even if every tell is gone.
|