kotonoha 0.1.6-dev.0 → 0.2.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/CHANGELOG.md +17 -0
- package/README-ja.md +246 -0
- package/README.md +74 -47
- package/package.json +7 -3
- package/skills/japanese-prose/NOTICE.md +17 -0
- package/skills/japanese-prose/SKILL.md +108 -0
- package/skills/japanese-prose/references/review-workflow.md +50 -0
- package/skills/japanese-prose/references/scoring.md +24 -0
- package/skills/japanese-prose/references/writing-guidelines.md +60 -0
- package/skills/japanese-prose/scripts/core.py +192 -0
- package/skills/japanese-prose/scripts/fixtures/natural.md +5 -0
- package/skills/japanese-prose/scripts/fixtures/unnatural.md +5 -0
- package/skills/japanese-prose/scripts/lint.py +378 -0
- package/skills/japanese-prose/scripts/outline.py +68 -0
- package/skills/japanese-prose/scripts/terms.py +112 -0
- package/skills/japanese-prose/scripts/test_engine.py +117 -0
- package/skills/tech-writer/SKILL.md +27 -33
- package/skills/tech-writer/references/japanese-prose-optimization.md +20 -21
- package/skills/tech-writer/references/style-constitution.md +1 -1
- package/skills/tech-writer/scripts/lint.py +1 -1
|
@@ -27,10 +27,9 @@ description: >-
|
|
|
27
27
|
question-at-a-time intake before writing. Supports both Japanese and
|
|
28
28
|
English documents, with Japanese as the primary target. Owns document
|
|
29
29
|
structure, information completeness, and reader fit; for living Japanese
|
|
30
|
-
documents, it
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
skill.
|
|
30
|
+
documents, it invokes kotonoha's original bundled `japanese-prose` skill,
|
|
31
|
+
which uses GiNZA for sentence-level naturalness, word choice, rhythm, and
|
|
32
|
+
repeated AI-like pattern analysis.
|
|
34
33
|
license: MIT
|
|
35
34
|
argument-hint: "[write|review|score] [doctype] <target file or request>"
|
|
36
35
|
---
|
|
@@ -57,13 +56,12 @@ reference files.
|
|
|
57
56
|
|
|
58
57
|
Document quality splits into two layers: "is the structure right" and "is
|
|
59
58
|
the prose natural and readable". This skill owns the first layer (structure,
|
|
60
|
-
document type conventions, completeness, reader fit).
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
tech-writer
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
the final rubber-duck review.
|
|
59
|
+
document type conventions, completeness, reader fit). The bundled
|
|
60
|
+
`japanese-prose` skill owns the second layer (sentence-level naturalness,
|
|
61
|
+
reading load, terminology, and repeated-pattern analysis). Kotonoha packages
|
|
62
|
+
both layers: tech-writer locks down the structure and orchestrates the §5
|
|
63
|
+
handoff to japanese-prose during `write` mode before the final rubber-duck
|
|
64
|
+
review.
|
|
67
65
|
|
|
68
66
|
- Rule of thumb: "does removing a heading still make sense?" tests structure
|
|
69
67
|
(this skill's job). "Does rereading a single sentence change its meaning?"
|
|
@@ -274,21 +272,20 @@ step 2 as the primary check for those.
|
|
|
274
272
|
## 5. Optimize Japanese prose without changing the structure — write mode only
|
|
275
273
|
|
|
276
274
|
For a living, multi-section document whose requested final language is
|
|
277
|
-
Japanese, read
|
|
278
|
-
`
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
the optimizer cannot start.
|
|
275
|
+
Japanese, read `references/japanese-prose-optimization.md` and hand the
|
|
276
|
+
completed draft to kotonoha's bundled `japanese-prose` skill. This pass is
|
|
277
|
+
mandatory for an in-scope document.
|
|
278
|
+
|
|
279
|
+
Load `japanese-prose` through the host's skill-loading mechanism. When only
|
|
280
|
+
installed skill files are exposed, resolve the sibling path
|
|
281
|
+
`<tech-writer-dir>/../japanese-prose/SKILL.md` first, then check
|
|
282
|
+
`.github/skills/japanese-prose/SKILL.md`,
|
|
283
|
+
`.copilot/skills/japanese-prose/SKILL.md`, and
|
|
284
|
+
`$HOME/.copilot/skills/japanese-prose/SKILL.md`. Load the discovered
|
|
285
|
+
`SKILL.md` and follow its quick or full workflow. A standard
|
|
286
|
+
`npx kotonoha install` installs this sibling skill automatically. Treat the
|
|
287
|
+
pass as unavailable only when someone copied or installed tech-writer without
|
|
288
|
+
its bundled sibling, or when the optimizer cannot start.
|
|
292
289
|
|
|
293
290
|
Freeze heading hierarchy, section order, identifiers, numeric facts,
|
|
294
291
|
citations, normative language, tables, code, commands, acceptance criteria,
|
|
@@ -394,10 +391,7 @@ of that. Common items to confirm:
|
|
|
394
391
|
|
|
395
392
|
## Acknowledgment
|
|
396
393
|
|
|
397
|
-
The
|
|
398
|
-
[
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
that separation by owning technical-document structure while orchestrating,
|
|
402
|
-
but not reimplementing, the registered prose-polishing skill responsible for
|
|
403
|
-
sentence-level naturalness.
|
|
394
|
+
The bundled prose optimizer is an original kotonoha implementation built on
|
|
395
|
+
[GiNZA](https://github.com/megagonlabs/ginza) (MIT License). Tech-writer owns
|
|
396
|
+
technical-document structure while japanese-prose uses GiNZA's morphology,
|
|
397
|
+
dependency, and named-entity analysis for sentence-level review.
|
|
@@ -5,11 +5,10 @@ are complete. The goal is to remove mechanical or translated-sounding prose
|
|
|
5
5
|
without changing the document's approved meaning, obligations, evidence, or
|
|
6
6
|
traceability.
|
|
7
7
|
|
|
8
|
-
The
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
repeated AI-like phrasing.
|
|
8
|
+
The optimizer is kotonoha's original bundled `japanese-prose` skill.
|
|
9
|
+
Kotonoha owns document structure and completeness; `japanese-prose` owns
|
|
10
|
+
sentence-level clarity, rhythm, word choice, reading load, terminology, and
|
|
11
|
+
detection of repeated AI-like phrasing through GiNZA analysis.
|
|
13
12
|
|
|
14
13
|
## Run this pass when
|
|
15
14
|
|
|
@@ -17,8 +16,7 @@ repeated AI-like phrasing.
|
|
|
17
16
|
whose audience-facing prose is primarily Japanese.
|
|
18
17
|
- The task is `write` mode.
|
|
19
18
|
- The artifact is a living, multi-section document.
|
|
20
|
-
-
|
|
21
|
-
skill is available.
|
|
19
|
+
- The bundled `japanese-prose` skill is readable.
|
|
22
20
|
|
|
23
21
|
Skip it for English documents, generated machine-readable files, and source
|
|
24
22
|
code. Also skip atomic artifacts such as commit messages, PR descriptions,
|
|
@@ -47,25 +45,25 @@ Never trade technical precision for conversational phrasing.
|
|
|
47
45
|
|
|
48
46
|
## Optimization loop
|
|
49
47
|
|
|
50
|
-
1.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`.github/skills/
|
|
54
|
-
`.copilot/skills/
|
|
55
|
-
`$HOME/.copilot/skills/
|
|
48
|
+
1. Invoke kotonoha's bundled `japanese-prose` through the host's
|
|
49
|
+
skill-loading mechanism. If the host exposes only skill files, resolve
|
|
50
|
+
`<tech-writer-dir>/../japanese-prose/SKILL.md` first, then check
|
|
51
|
+
`.github/skills/japanese-prose/SKILL.md`,
|
|
52
|
+
`.copilot/skills/japanese-prose/SKILL.md`, and
|
|
53
|
+
`$HOME/.copilot/skills/japanese-prose/SKILL.md`; expand `$HOME`, load the
|
|
56
54
|
discovered skill,
|
|
57
55
|
and follow its workflow.
|
|
58
56
|
2. Ask the loaded skill to review and rewrite only the Japanese prose under
|
|
59
57
|
the frozen invariants.
|
|
60
|
-
3. Let `<
|
|
58
|
+
3. Let `<japanese-prose-dir>` be the directory containing the loaded
|
|
61
59
|
optimizer's `SKILL.md`. When its diagnostics are available, run the
|
|
62
60
|
optimizer's scripts with their qualified paths:
|
|
63
61
|
|
|
64
62
|
```bash
|
|
65
|
-
uv run <
|
|
66
|
-
uv run <
|
|
67
|
-
uv run <
|
|
68
|
-
uv run <
|
|
63
|
+
uv run <japanese-prose-dir>/scripts/lint.py <target-file> --genre tech --json > <workdir>/prose-baseline.json
|
|
64
|
+
uv run <japanese-prose-dir>/scripts/lint.py <target-file> --genre tech --reading-load
|
|
65
|
+
uv run <japanese-prose-dir>/scripts/outline.py <target-file>
|
|
66
|
+
uv run <japanese-prose-dir>/scripts/terms.py <target-file>
|
|
69
67
|
```
|
|
70
68
|
|
|
71
69
|
Do not substitute `skills/tech-writer/scripts/lint.py`; kotonoha's script
|
|
@@ -95,9 +93,10 @@ final language is Japanese, in `write` mode), report exactly one status:
|
|
|
95
93
|
no actionable prose findings remain. Run diagnostics when available; if
|
|
96
94
|
`uv` or a diagnostic script is unavailable, note that limitation without
|
|
97
95
|
changing this status.
|
|
98
|
-
- `Japanese prose optimization not performed`:
|
|
99
|
-
|
|
100
|
-
concrete reason.
|
|
96
|
+
- `Japanese prose optimization not performed`: the bundled optimizer was
|
|
97
|
+
missing or unreadable, so no prose review or rewrite ran; include the
|
|
98
|
+
concrete reason. A standard `npx kotonoha install` should prevent this
|
|
99
|
+
state.
|
|
101
100
|
- `Japanese prose optimization did not converge`: three rounds completed with
|
|
102
101
|
unresolved actionable findings or invariant violations, or the optimizer
|
|
103
102
|
started but failed before producing a valid result, a required
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Constraints to fix a technical document's *structure* before writing.
|
|
4
4
|
Sentence-level naturalness, vocabulary, and rhythm are out of scope here
|
|
5
|
-
(→ the domain of
|
|
5
|
+
(→ the domain of kotonoha's bundled `japanese-prose` skill).
|
|
6
6
|
|
|
7
7
|
## Scope: living documents vs. atomic artifacts
|
|
8
8
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"""tech-writer skill: a lint script that mechanically checks a technical
|
|
7
7
|
document's *structure* and Markdown rendering safety.
|
|
8
8
|
|
|
9
|
-
Where
|
|
9
|
+
Where japanese-prose's GiNZA lint detects sentence-level naturalness
|
|
10
10
|
(vocabulary, rhythm), this script detects structural problems specific to
|
|
11
11
|
technical documents plus Markdown syntax patterns that render inconsistently
|
|
12
12
|
(heading hierarchy, code examples, leftover placeholders, suspicious links,
|