dravoice 0.1.2 → 0.1.4

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Dravoice contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dravoice contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,37 +1,126 @@
1
- # Dravoice
2
-
3
- Dravoice is a local-first CLI for compiling Markdown, MDX, and plain-text
4
- writing corpora into reusable voice guidance and deterministic draft review
5
- notes.
6
-
7
- It is not an AI-authorship detector, grammar checker, prose linter, or
8
- third-party author imitation tool. It helps a writer inspect and reuse their
9
- own measurable rhythm, register, evidence habits, discourse shape, and
10
- structure.
11
-
12
- ## Quick Start
13
-
14
- ```bash
15
- npx --package dravoice drav learn --examples ./articles --out ./dravoice-voice
16
- npx --package dravoice drav inspect --voice ./dravoice-voice
17
- npx --package dravoice drav prompt --voice ./dravoice-voice --format agents --out AGENTS.md
18
- npx --package dravoice drav brief --voice ./dravoice-voice --topic "A new article topic" --evidence notes.md --out brief.md
19
- npx --package dravoice drav revise-plan draft.md --voice ./dravoice-voice
20
- npx --package dravoice drav review draft.md --voice ./dravoice-voice
21
- npx --package dravoice drav review draft.md --voice ./dravoice-voice --mode strict --format json
22
- ```
23
-
24
- `learn` writes a schemaVersion 2 `profile.json` plus local metadata. `inspect`
25
- makes the learned feature families visible, `prompt` turns high-confidence
26
- observations into drafting guidance, `brief` creates an evidence-first article
27
- plan, `revise-plan` ranks calibrated stylometric revision actions, and `review`
28
- reports family-level drift.
29
-
30
- ## Fresh Install Smoke Test
31
-
32
- From a packed tarball:
33
-
34
- ```bash
35
- npm pack
36
- npm exec --package ./dravoice-0.1.1.tgz -- drav --help
37
- ```
1
+ # Dravoice
2
+
3
+ Dravoice is a local-first CLI for compiling Markdown, MDX, and plain-text
4
+ writing corpora into reusable voice guidance and deterministic draft review
5
+ notes.
6
+
7
+ It is not an AI-authorship detector, grammar checker, prose linter, or
8
+ third-party author imitation tool. It helps a writer inspect and reuse their
9
+ own measurable rhythm, register, evidence habits, discourse shape, and
10
+ structure.
11
+
12
+ ## First Successful Run
13
+
14
+ Start with your own writing, not a blank prompt. Create an `articles`
15
+ directory in the folder where you want to run Dravoice, then copy in at least
16
+ 3 representative long-form Markdown, MDX, or plain-text pieces.
17
+
18
+ ```bash
19
+ mkdir -p articles
20
+ ```
21
+
22
+ Your first folder should look like this:
23
+
24
+ ```text
25
+ your-writing-folder/
26
+ articles/
27
+ first-piece.md
28
+ second-piece.mdx
29
+ third-piece.txt
30
+ ```
31
+
32
+ `./articles` means "the `articles` directory inside my current terminal
33
+ folder." Five to ten pieces gives Dravoice a stronger profile. If
34
+ `./articles` is missing, interactive `init` can look for common writing folders
35
+ such as `./content`, `./posts`, `./blog`, and `./essays`, then preview the
36
+ files before it learns from them.
37
+
38
+ If your writing is already somewhere else, point Dravoice at that directory:
39
+
40
+ ```bash
41
+ npx dravoice doctor --examples ~/writing
42
+ npx dravoice init --examples ~/writing
43
+ ```
44
+
45
+ ### 1. Check, Initialize, and Inspect
46
+
47
+ ```bash
48
+ npx dravoice doctor
49
+ npx dravoice init
50
+ npx dravoice inspect
51
+ ```
52
+
53
+ Run `doctor` before learning so missing folders, unsupported files, weak
54
+ corpora, duplicate-looking files, and length-imbalanced source sets get clear
55
+ next steps. Inspect the profile before trusting it. If the feature-family
56
+ summaries do not look recognizable, improve the source corpus first.
57
+
58
+ ### 2. Generate Guidance and a Brief
59
+
60
+ ```bash
61
+ npx dravoice prompt --out AGENTS.md
62
+ npx dravoice brief "A new article topic" --evidence notes.md --out brief.md
63
+ ```
64
+
65
+ Use the generated guidance and evidence-first brief to draft from claims you can
66
+ actually support.
67
+
68
+ ### 3. Revise and Review
69
+
70
+ ```bash
71
+ npx dravoice revise-plan draft.md
72
+ npx dravoice review draft.md
73
+ ```
74
+
75
+ `doctor` checks corpus readiness, `init` reads your source pieces, writes a
76
+ local profile in `./dravoice-voice`, and writes `.dravoice.yml` project
77
+ defaults. `inspect` makes the learned feature families visible, `prompt` turns
78
+ high-confidence observations into drafting guidance, `brief` creates an
79
+ evidence-first article plan, `revise-plan` ranks calibrated stylometric
80
+ revision actions, and `review` reports family-level drift with calibration
81
+ confidence.
82
+
83
+ Run `drav help init` or `drav help review` for command-specific help.
84
+
85
+ ## Advanced Automation
86
+
87
+ Use strict JSON output when CI or local automation should fail on drift:
88
+
89
+ ```bash
90
+ npx dravoice review draft.md --mode strict --format json
91
+ ```
92
+
93
+ Benchmark commands are for validating Dravoice itself, not for a first writer
94
+ workflow:
95
+
96
+ ```bash
97
+ npx dravoice benchmark prepare --examples ./articles --topic "A new article topic" --out ./bench-run --seed 42
98
+ npx dravoice benchmark prepare-many --examples ./articles --topic "A new article topic" --out ./bench-runs --runs 3 --seed 42
99
+ npx dravoice benchmark score --run ./bench-run --judge ./bench-run/judge/judgment.json
100
+ ```
101
+
102
+ Benchmark reports include deterministic margins and repeat-run cautions. A
103
+ single run is directional evidence only. Score output includes suggested
104
+ follow-up seeds for repeated validation runs.
105
+
106
+ ## Trust Boundaries
107
+
108
+ Dravoice profiles include per-family calibration diagnostics: threshold
109
+ observations, stability, minimum-evidence checks, and whether a family is usable
110
+ for findings. Weak corpora produce cautious guidance. Strict review can surface
111
+ document-level discourse, lexical, register, and structure drift, but the
112
+ findings remain revision guidance, not authorship proof.
113
+
114
+ V2 profiles expose marker-set register metadata, mixed-register warnings,
115
+ heading-depth and section-order structure signals, paragraph-localized
116
+ revision actions, expanded MDX scaffold filtering before analysis, and
117
+ library-level custom register marker sets for project-specific scoring.
118
+
119
+ ## Fresh Install Smoke Test
120
+
121
+ From a packed tarball:
122
+
123
+ ```bash
124
+ npm pack --json
125
+ node -e "const { execFileSync } = require('node:child_process'); const pack = require('./package.json'); const tarball = './' + pack.name + '-' + pack.version + '.tgz'; execFileSync('npm', ['exec', '--package', tarball, '--', 'drav', '--help'], { stdio: 'inherit' });"
126
+ ```
package/bin/dravoice.js CHANGED
@@ -1,10 +1,11 @@
1
- #!/usr/bin/env node
2
- import { runCli } from "../src/index.js";
3
-
4
- const code = await runCli(process.argv.slice(2), {
5
- cwd: process.cwd(),
6
- stdout: process.stdout,
7
- stderr: process.stderr,
8
- });
9
-
10
- process.exitCode = code;
1
+ #!/usr/bin/env node
2
+ import { runCli } from "../src/index.js";
3
+
4
+ const code = await runCli(process.argv.slice(2), {
5
+ cwd: process.cwd(),
6
+ stdin: process.stdin,
7
+ stdout: process.stdout,
8
+ stderr: process.stderr,
9
+ });
10
+
11
+ process.exitCode = code;
package/package.json CHANGED
@@ -1,45 +1,47 @@
1
- {
2
- "name": "dravoice",
3
- "version": "0.1.2",
4
- "description": "Compile article voice profiles into reusable LLM writing context, evidence-first briefs, and deterministic draft review notes.",
5
- "type": "module",
6
- "bin": {
7
- "drav": "bin/dravoice.js"
8
- },
9
- "exports": {
10
- ".": "./src/index.js"
11
- },
12
- "files": [
13
- "bin/",
14
- "src/",
15
- "README.md",
16
- "LICENSE"
17
- ],
18
- "scripts": {
19
- "lint": "node ../../scripts/check-js-syntax.js packages/js-cli",
20
- "test": "node --test test/v2.test.js"
21
- },
22
- "engines": {
23
- "node": ">=18"
24
- },
25
- "keywords": [
26
- "voice",
27
- "writing",
28
- "cli",
29
- "llm",
30
- "markdown"
31
- ],
32
- "repository": {
33
- "type": "git",
34
- "url": "git+https://github.com/hilmimuktitama/dravoice.git",
35
- "directory": "packages/js-cli"
36
- },
37
- "bugs": {
38
- "url": "https://github.com/hilmimuktitama/dravoice/issues"
39
- },
40
- "homepage": "https://github.com/hilmimuktitama/dravoice#readme",
41
- "publishConfig": {
42
- "access": "public"
43
- },
44
- "license": "MIT"
45
- }
1
+ {
2
+ "name": "dravoice",
3
+ "version": "0.1.4",
4
+ "description": "Compile article voice profiles into reusable LLM writing context, evidence-first briefs, and deterministic draft review notes.",
5
+ "type": "module",
6
+ "bin": {
7
+ "dravoice": "bin/dravoice.js",
8
+ "drav": "bin/dravoice.js"
9
+ },
10
+ "exports": {
11
+ ".": "./src/index.js"
12
+ },
13
+ "files": [
14
+ "bin/",
15
+ "src/",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "scripts": {
20
+ "lint": "node ../../scripts/check-js-syntax.js bin src test",
21
+ "test": "node --test test/v2.test.js",
22
+ "prepublishOnly": "npm run lint && npm run test"
23
+ },
24
+ "engines": {
25
+ "node": ">=18"
26
+ },
27
+ "keywords": [
28
+ "voice",
29
+ "writing",
30
+ "cli",
31
+ "llm",
32
+ "markdown"
33
+ ],
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/hilmimuktitama/dravoice.git",
37
+ "directory": "packages/js-cli"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/hilmimuktitama/dravoice/issues"
41
+ },
42
+ "homepage": "https://github.com/hilmimuktitama/dravoice#readme",
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "license": "MIT"
47
+ }