dravoice 0.1.2 → 0.1.3

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,103 @@
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`
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 init --examples ~/writing
42
+ ```
43
+
44
+ ### 1. Initialize and Inspect
45
+
46
+ ```bash
47
+ npx dravoice init
48
+ npx dravoice inspect
49
+ ```
50
+
51
+ Inspect the profile before trusting it. If the feature-family summaries do not
52
+ look recognizable, improve the source corpus first.
53
+
54
+ ### 2. Generate Guidance and a Brief
55
+
56
+ ```bash
57
+ npx dravoice prompt --out AGENTS.md
58
+ npx dravoice brief "A new article topic" --evidence notes.md --out brief.md
59
+ ```
60
+
61
+ Use the generated guidance and evidence-first brief to draft from claims you can
62
+ actually support.
63
+
64
+ ### 3. Revise and Review
65
+
66
+ ```bash
67
+ npx dravoice revise-plan draft.md
68
+ npx dravoice review draft.md
69
+ ```
70
+
71
+ `init` reads your source pieces, writes a local profile in `./dravoice-voice`,
72
+ and writes `.dravoice.yml` project defaults. `inspect` makes the learned
73
+ feature families visible, `prompt` turns high-confidence observations into
74
+ drafting guidance, `brief` creates an evidence-first article plan,
75
+ `revise-plan` ranks calibrated stylometric revision actions, and `review`
28
76
  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
- ```
77
+
78
+ Run `drav help init` or `drav help review` for command-specific help.
79
+
80
+ ## Advanced Automation
81
+
82
+ Use strict JSON output when CI or local automation should fail on drift:
83
+
84
+ ```bash
85
+ npx dravoice review draft.md --mode strict --format json
86
+ ```
87
+
88
+ Benchmark commands are for validating Dravoice itself, not for a first writer
89
+ workflow:
90
+
91
+ ```bash
92
+ npx dravoice benchmark prepare --examples ./articles --topic "A new article topic" --out ./bench-run --seed 42
93
+ npx dravoice benchmark score --run ./bench-run --judge ./bench-run/judge/judgment.json
94
+ ```
95
+
96
+ ## Fresh Install Smoke Test
97
+
98
+ From a packed tarball:
99
+
100
+ ```bash
101
+ npm pack --json
102
+ 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' });"
103
+ ```
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.3",
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
+ }