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.
@@ -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 orchestrates a registered prose-polishing skill such as
31
- https://github.com/coji/natural-japanese for sentence-level naturalness,
32
- word choice, rhythm, and "AI smell" removal without reimplementing that
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). A prose-polishing skill
61
- such as [natural-japanese](https://github.com/coji/natural-japanese) owns the
62
- second layer (sentence-level naturalness, removing "AI smell", rhythm);
63
- tech-writer orchestrates that skill without duplicating its rules or scripts.
64
- When both skills are installed, this skill locks down the structure and
65
- orchestrates the §5 handoff to natural-japanese during `write` mode before
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
- `references/japanese-prose-optimization.md` and hand the completed draft to a
279
- registered `natural-japanese` or equivalent Japanese prose-polishing skill.
280
- This pass is mandatory when such a skill is available.
281
-
282
- Treat the optimizer as available when the host's registered skill list
283
- contains `natural-japanese` or a compatible Japanese prose-polishing skill.
284
- Invoke it through the host's skill-loading mechanism; when only installed
285
- skill files are exposed, check
286
- `.github/skills/natural-japanese/SKILL.md`,
287
- `.copilot/skills/natural-japanese/SKILL.md`, and
288
- `$HOME/.copilot/skills/natural-japanese/SKILL.md`, then load the discovered
289
- `SKILL.md` and follow that workflow. Treat the pass as unavailable only when
290
- no compatible registration or readable skill installation exists, or when
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 idea of separating structure from prose comes from
398
- [natural-japanese](https://github.com/coji/natural-japanese) (MIT License)
399
- and its design principle "machines detect, humans (or agents) judge" and
400
- "prevent at generation time rather than fix afterward". This skill extends
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 preferred optimizer is the
9
- [natural-japanese prose-polishing skill](https://github.com/coji/natural-japanese).
10
- Kotonoha owns document structure and completeness; `natural-japanese` owns
11
- sentence-level clarity, rhythm, word choice, reading load, and detection of
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
- - A registered `natural-japanese` or equivalent Japanese prose-polishing
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. Inspect the host's registered skill list for `natural-japanese` or a
51
- compatible Japanese prose-polishing skill. Invoke it through the host's
52
- skill-loading mechanism. If the host exposes only skill files, check
53
- `.github/skills/natural-japanese/SKILL.md`,
54
- `.copilot/skills/natural-japanese/SKILL.md`, and
55
- `$HOME/.copilot/skills/natural-japanese/SKILL.md`; expand `$HOME`, load the
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 `<natural-japanese-dir>` be the directory containing the loaded
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 <natural-japanese-dir>/scripts/lint.py <target-file> --genre tech
66
- uv run <natural-japanese-dir>/scripts/lint.py <target-file> --reading-load
67
- uv run <natural-japanese-dir>/scripts/outline.py <target-file>
68
- uv run <natural-japanese-dir>/scripts/terms.py <target-file>
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`: no compatible optimizer was
99
- registered or loaded, so no prose review or rewrite ran; include the
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 a prose-polishing skill such as natural-japanese).
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 natural-japanese's lint.py detects sentence-level naturalness
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,