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 CHANGED
@@ -7,14 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.0] - 2026-09-29
11
+
10
12
  ### Changed
11
13
 
14
+ - Make Japanese prose optimization built in through kotonoha's original
15
+ GiNZA-based `japanese-prose` skill, installed by the default
16
+ `install --skill all` workflow.
12
17
  - Generate Markdown with half-width spaces around `**strong emphasis**`
13
18
  whenever the delimiters would otherwise touch surrounding prose, and flag
14
19
  violations in the structural lint.
15
20
  - Add a Qiita article template whose highest-level body sections use `#` and
16
21
  subsections use `##`.
17
22
 
23
+ ### Added
24
+
25
+ - Add original GiNZA-based prose lint, reading-load analysis, terminology
26
+ extraction, outline inspection, scoring, baseline comparison, writing
27
+ guidelines, and convergence workflow without bundling third-party prose
28
+ skill source code.
29
+ - Add `README-ja.md` as a complete Japanese guide and link it from the
30
+ English README.
31
+ - Explain the meaning of the name `kotonoha` in both READMEs, distinguishing
32
+ the *Kokin Wakashu*'s explicit "leaves of words" image from the related
33
+ *kotodama* tradition in the earlier *Man'yoshu*.
34
+
18
35
  ## [0.1.5] - 2026-09-29
19
36
 
20
37
  ### Added
package/README-ja.md ADDED
@@ -0,0 +1,246 @@
1
+ # kotonoha
2
+
3
+ kotonohaは、技術文書の作成とプレゼンテーション設計を支援するGitHub Copilot CLIスキルを提供します。`tech-writer`は、開発文書、要件・設計文書、運用・移行文書、調達文書、Qiita・Zenn記事の構成と文章を整えます。対応する文書の一覧は「対応している文書」に掲載しています。`presentation-planner`は、プレゼンテーションシナリオ、スライド構成、デザイン仕様、PPTX作成スキル向けの引き継ぎ情報を生成します。
4
+
5
+ [English](./README.md) | [日本語](./README-ja.md)
6
+
7
+ ## kotonoha(言の葉)という名前
8
+
9
+ `kotonoha`は、「言葉」「言語」「和歌」を表す古典的・詩的な表現「言の葉(ことのは)」に由来します。読み手の意図を、明確で構造化された言葉へ育てるという、このプロジェクトの目的を表しています。
10
+
11
+ 『万葉集』との関係には補足が必要です。『万葉集』という書名を「万(よろづ)の言の葉、すなわち数多くの歌」と解釈する伝統的な説がありますが、書名の由来は確定していません。「やまとうたは、人の心を種として、よろづの言の葉とぞなれりける」という有名な表現の直接の典拠は、『万葉集』ではなく紀貫之による[『古今和歌集』仮名序](https://ja.wikisource.org/wiki/%E5%8F%A4%E4%BB%8A%E5%92%8C%E6%AD%8C%E9%9B%86%E4%BB%AE%E5%90%8D%E5%BA%8F)です。
12
+
13
+ それ以前の『万葉集』にも、言葉が現実に働きかけるという近い思想が「言霊」として詠まれています。奈良県立万葉文化館の「万葉百科」では、山上憶良の[894番歌](https://manyo-hyakka.pref.nara.jp/db/detailLink?cls=db_manyo&pkey=894)や[3254番歌](https://manyo-hyakka.pref.nara.jp/db/detailLink?cls=db_manyo&pkey=3254)で確認できます。「言の葉」の歴史的な語義については、[コトバンク](https://kotobank.jp/word/%E8%A8%80%E3%81%AE%E8%91%89-503155)も参照しています。
14
+
15
+ ## tech-writerが解決する課題
16
+
17
+ 技術文書には、「文章が自然か」と「必要な情報が適切な構成で含まれているか」という別々の課題があります。kotonohaは両方の機能を同梱しています。`tech-writer`が構成と情報の完全性を担当し、独自実装の`japanese-prose`が[GiNZA](https://github.com/megagonlabs/ginza)を使って、文単位の自然さ、読解負荷、用語統一、係り受けの深さ、AIらしい反復表現を検査します。
18
+
19
+ kotonohaは文書構造と技術的な不変条件を固定してから日本語表現を最適化し、構造を再検証した後にrubber-duck reviewを実施します。
20
+
21
+ ## 主な機能
22
+
23
+ - README、設計書・ADR、APIリファレンス、PR説明・コミットメッセージ・Issue、リリースノート、ユーザーマニュアル、コードコメント、要件定義書、システム設計書、テスト計画書、運用設計書・Runbook、移行計画書、セキュリティ設計書、技術提案書、RFI・RFP、Qiita・Zenn記事の作成とレビュー
24
+ - 文書種別ごとの推奨構成とチェックリスト
25
+ - ID、事実、表、コード、受け入れ基準を変更せずに日本語表現を反復的に最適化する、GiNZAベースの独自`japanese-prose`文章診断
26
+ - 文書作成後のrubber-duck reviewと、対応可能な指摘がなくなるまでの修正・再レビュー
27
+ - `scripts/lint.py`による構造検査。見出しレベルの飛び、言語指定のないコードブロック、未解決のプレースホルダー、不審なリンク、文章に隣接した強調記号を検出
28
+ - コミットメッセージ本文とコードコメント・docstringを除き、すべての文書種別でMarkdownを標準形式として使用
29
+ - 日本語を主な対象言語とし、英語文書にも対応
30
+
31
+ ## 対応している文書
32
+
33
+ | 文書種別 | 例 | Doctype |
34
+ |---|---|---|
35
+ | プロジェクト概要 | README | `readme` |
36
+ | 設計判断 | 設計書、ADR、RFC | `design-doc` |
37
+ | 要件定義 | 要件定義書、機能要件、非機能要件 | `requirements-definition` |
38
+ | システム設計 | システム設計書、アーキテクチャ設計、詳細設計 | `system-design` |
39
+ | テスト計画 | テスト計画書、テスト戦略、受け入れ証跡 | `test-plan` |
40
+ | 運用 | 運用設計書、Runbook、インシデント対応手順 | `operations-runbook` |
41
+ | 移行 | 移行計画書、データ移行、システム切り替え計画 | `migration-plan` |
42
+ | セキュリティ | セキュリティ設計書、脅威モデル | `security-design` |
43
+ | APIリファレンス | REST API、イベント、SDKリファレンス | `api-docs` |
44
+ | 開発ワークフロー文書 | PR説明、コミットメッセージ、バグ報告、機能要求 | `pr-commit` |
45
+ | リリース文書 | リリースノート、CHANGELOG | `release-notes` |
46
+ | 利用者向け文書 | ユーザーマニュアル、手順書、チュートリアル | `user-manual` |
47
+ | ソースコード文書 | コードコメント、docstring | `code-comments` |
48
+ | 社内向け技術提案 | アーキテクチャ、投資、デリバリー提案 | `technical-proposal` |
49
+ | 情報提供依頼 | RFI | `rfi` |
50
+ | 提案依頼 | RFP | `rfp` |
51
+ | 技術記事 | Zenn記事 | `zenn` |
52
+ | 技術記事 | Qiita記事 | `qiita` |
53
+
54
+ 再利用可能なテンプレートには、README、設計判断、ユーザーマニュアル、PR説明があります。要件定義、システム設計、テスト、運用、移行、セキュリティの各文書にも対応しています。技術提案、RFI、RFP、Qiita記事のテンプレートも含まれます。すべての文書種別には、`skills/tech-writer/references/doctypes/`配下に専用の構成ガイドとレビューチェックリストがあります。
55
+
56
+ ## presentation-plannerの機能
57
+
58
+ - 対象者、意思決定、行動喚起、プレゼンテーションの制約を定義
59
+ - ブリーフ、対象者の理解を導くシナリオ、主張型タイトルを使ったスライド構成を生成
60
+ - YAMLデザイン仕様とPPTX作成スキル向けの決定的な引き継ぎ情報を生成
61
+ - 経営判断、技術説明、データ報告向けのシナリオテンプレート
62
+ - 経営提案、技術説明、データ報告向けのデザイン仕様
63
+ - `.pptx`の生成、バイナリ編集、レンダリング、視覚的な品質確認は専用PPTXスキルへ委譲
64
+
65
+ ## セットアップ
66
+
67
+ ### 前提条件
68
+
69
+ - GitHub Copilot CLIがインストールされていること
70
+ - tech-writerの構造lintを実行する場合はPython 3.9以上
71
+ - 同梱`japanese-prose`の文章lint、読解負荷分析、アウトライン抽出、用語検査を実行する場合はPython 3.10以上と`uv`。GiNZA、`ja_ginza`、spaCyは初回実行時に`uv`が解決
72
+
73
+ ### npmからインストール
74
+
75
+ パッケージをインストールし、同梱CLIでスキルをスキルディレクトリへコピーします。
76
+
77
+ ```bash
78
+ npm install --save-dev kotonoha
79
+ npx kotonoha install
80
+ ```
81
+
82
+ ### 同梱スキルをまとめてインストール
83
+
84
+ `kotonoha install`は、まだ存在しない同梱スキルをすべてインストールします。次のコマンドは、`tech-writer`、`japanese-prose`、`presentation-planner`を`.github/skills/`へインストールします。
85
+
86
+ ```bash
87
+ npm install --save-dev kotonoha
88
+ npx kotonoha install --skill all
89
+ ```
90
+
91
+ `--skill all`が既定値であるため、`npx kotonoha install`も同じ動作です。3つのスキルがインストールされたことを確認します。
92
+
93
+ ```bash
94
+ test -f .github/skills/tech-writer/SKILL.md
95
+ test -f .github/skills/japanese-prose/SKILL.md
96
+ test -f .github/skills/presentation-planner/SKILL.md
97
+ ```
98
+
99
+ いずれかのディレクトリがすでに存在する場合、既定のコマンドはそのディレクトリを保持し、不足しているスキルだけをインストールします。すべてのインストール済みスキルをまとめて置き換える場合は、ローカルのカスタマイズを確認またはバックアップしてから実行します。
100
+
101
+ ```bash
102
+ npx kotonoha install --skill all --force
103
+ ```
104
+
105
+ ### 内蔵された日本語表現最適化
106
+
107
+ kotonohaには独自開発の`japanese-prose`が同梱されるため、文章最適化スキルを別途インストールする必要はありません。`npx kotonoha install`により`tech-writer`と同じスキルルートへ配置され、GiNZAを使った文章lint、読解負荷検査、用語抽出、アウトライン検査、反復的な文章レビューをローカルで実行できます。この実装はkotonoha向けにゼロから開発しており、`natural-japanese`のソースコードを含みません。GiNZAの依存関係とライセンス情報は`skills/japanese-prose/NOTICE.md`に記録しています。
108
+
109
+ 既定のインストール先は、現在のプロジェクトの`.github/skills/tech-writer`、`.github/skills/japanese-prose`、`.github/skills/presentation-planner`です。スキルを1つだけインストールする場合や、別の対応ディレクトリを使用する場合は、次のように指定します。
110
+
111
+ ```bash
112
+ npx kotonoha install --skill presentation-planner
113
+ npx kotonoha install --target .claude/skills
114
+ npx kotonoha install --target ~/.copilot/skills
115
+ ```
116
+
117
+ `--skill <name>`を明示したインストールは、既存のスキルディレクトリを上書きしません。既存のインストールを確認またはバックアップし、選択したスキルを置き換える場合にだけ`--force`を指定します。
118
+
119
+ ```bash
120
+ npx kotonoha install --force
121
+ ```
122
+
123
+ すべてのスキルをインストールする場合、既存のスキルディレクトリはスキップされ、不足しているスキルだけが追加されます。このため、`tech-writer`だけをインストール済みの環境から安全に更新できます。
124
+
125
+ ```bash
126
+ npx kotonoha install
127
+ # Skipped tech-writer (...)
128
+ # Installed japanese-prose (...)
129
+ # Installed presentation-planner (...)
130
+ ```
131
+
132
+ ### kotonohaを更新
133
+
134
+ インストール済みスキルディレクトリ内のローカル変更を、先に確認してコミットまたはバックアップします。`--force`による更新は、ローカルのカスタマイズを含む対象ディレクトリ全体を置き換えます。
135
+
136
+ 最新の安定版へ更新します。
137
+
138
+ ```bash
139
+ npm install --save-dev kotonoha@latest
140
+ ```
141
+
142
+ 現在のプレリリース版を試す場合は、`next`タグをインストールします。
143
+
144
+ ```bash
145
+ npm install --save-dev kotonoha@next
146
+ ```
147
+
148
+ npmパッケージを更新しても、コピー済みのスキルは自動更新されません。パッケージ更新後に、同梱スキルを再インストールします。
149
+
150
+ ```bash
151
+ npx kotonoha install --force
152
+ ```
153
+
154
+ スキルを1つだけ更新する場合は、次のように実行します。
155
+
156
+ ```bash
157
+ npx kotonoha install --skill tech-writer --force
158
+ npx kotonoha install --skill japanese-prose --force
159
+ npx kotonoha install --skill presentation-planner --force
160
+ ```
161
+
162
+ 最初のインストールで別のインストール先を指定した場合は、同じディレクトリを再度指定します。
163
+
164
+ ```bash
165
+ npx kotonoha install --target ~/.copilot/skills --force
166
+ ```
167
+
168
+ インストール済みパッケージのバージョンを確認し、置き換えられたファイルをコミット前に確認します。
169
+
170
+ ```bash
171
+ npx kotonoha --version
172
+ git diff -- .github/skills
173
+ ```
174
+
175
+ `--force`なしで`npx kotonoha install`を実行しても既存のスキルディレクトリは更新されず、不足しているスキルだけがインストールされます。
176
+
177
+ ### ソースチェックアウトからインストール
178
+
179
+ このリポジトリでは、スキルが`.github/skills/`配下にリンクされているため、Copilot CLIで使用するための追加設定は不要です。
180
+
181
+ 別のプロジェクトでソースチェックアウトのスキルを使用する場合は、スキルのディレクトリを対象リポジトリの`.github/skills/`、`.claude/skills/`、またはグローバルの`~/.copilot/skills/`へコピーします。
182
+
183
+ ```bash
184
+ cp -r skills/tech-writer /path/to/your-repo/.github/skills/tech-writer
185
+ cp -r skills/japanese-prose /path/to/your-repo/.github/skills/japanese-prose
186
+ cp -r skills/presentation-planner /path/to/your-repo/.github/skills/presentation-planner
187
+ ```
188
+
189
+ ## Copilotに文書作成を依頼
190
+
191
+ Copilot CLIセッションで必要な文書種別を依頼すると、対応するスキルが自動的に呼び出されます。
192
+
193
+ - 「READMEを書いて」「この設計書をレビューして」「PR説明文を書いて」「この手順書を分かりやすくして」
194
+ - 「要件定義書を作って」「承認済み要件からシステム設計書を書いて」「移行計画とRunbookを作って」
195
+ - 「この提案書からPPTXを作って」「経営層向けプレゼンを設計して」「技術説明資料を設計して」
196
+
197
+ 構造だけを簡単に診断する場合は、次のコマンドを実行します。
198
+
199
+ ```bash
200
+ uv run skills/tech-writer/scripts/lint.py --json path/to/document.md
201
+ ```
202
+
203
+ `uv`がない場合も、標準ライブラリだけを使う次のコマンドで実行できます。
204
+
205
+ ```bash
206
+ python3 skills/tech-writer/scripts/lint.py path/to/document.md
207
+ ```
208
+
209
+ ## リポジトリ構成
210
+
211
+ ```text
212
+ skills/tech-writer/ # tech-writerスキル
213
+ SKILL.md # スキル定義
214
+ references/ # 構成原則、文書種別ごとの規則とチェックリスト
215
+ references/doctypes/ # README、要件、設計、テスト、運用、移行、セキュリティ、API、PR・Issue、リリースノート、提案、RFI・RFP、Qiita・Zenn
216
+ scripts/lint.py # 構造とMarkdown表示のlintスクリプト
217
+ assets/templates/ # 要件、設計、テスト、運用、移行、セキュリティ、調達などの文書テンプレート
218
+ skills/japanese-prose/ # 独自開発のGiNZAベース文章最適化スキル
219
+ SKILL.md # 執筆、lint、レビュー、収束のワークフロー
220
+ references/ # 執筆規則、レビューワークフロー、採点規則
221
+ scripts/ # 文章lint、読解負荷、アウトライン、用語検査
222
+ NOTICE.md # GiNZAの依存関係とライセンス情報
223
+ skills/presentation-planner/ # シナリオ、デザイン仕様、PPTX引き継ぎスキル
224
+ SKILL.md
225
+ references/ # 責任境界、シナリオ・デザインガイド、カスタマイズ、引き継ぎ契約
226
+ assets/scenario-templates/ # 経営判断、技術説明、データ報告向けシナリオ
227
+ assets/design-templates/ # 経営提案、技術説明、データ報告向けYAMLデザイン
228
+ .github/skills/tech-writer # Copilot CLIが読み込むskills/tech-writerへのシンボリックリンク
229
+ .github/skills/japanese-prose
230
+ .github/skills/presentation-planner
231
+ ```
232
+
233
+ ## 既知の制約
234
+
235
+ - `skills/tech-writer/scripts/lint.py`は、見出し、コードブロック、プレースホルダー、リンク、Markdown強調記号などの構造・表示上の問題を検出します。文章の自然さ、語彙、リズム、読解負荷は、別工程として呼び出される同梱`skills/japanese-prose`がGiNZAで検査します。
236
+ - 文書種別は主に日本語の技術文書作成規則を前提としています。コミットメッセージの命令形などを含む多くのガイドは、英語文書にも適用できます。
237
+ - `presentation-planner`だけでは`.pptx`バイナリを生成または検証できません。生成と視覚的な品質確認には専用PPTXスキルが必要です。
238
+ - デザインのカスタマイズ方法は、`skills/presentation-planner/references/customizing-design-templates.md`に記載されています。
239
+
240
+ ## 謝辞
241
+
242
+ - [GiNZA](https://github.com/megagonlabs/ginza)(MIT License)— kotonoha独自の日本語文章診断に、形態素解析、品詞タグ付け、係り受け解析、見出し語化、文境界、固有表現抽出を提供します。
243
+
244
+ ## ライセンス
245
+
246
+ MIT。詳細は[LICENSE](./LICENSE)を参照してください。
package/README.md CHANGED
@@ -11,16 +11,40 @@ structured so readers never get lost. `presentation-planner` turns source
11
11
  material into a reusable presentation scenario, slide outline, design
12
12
  specification, and handoff for a dedicated PPTX creation skill.
13
13
 
14
+ [English](./README.md) | [日本語](./README-ja.md)
15
+
16
+ ## Why the name kotonoha
17
+
18
+ `kotonoha` comes from the Japanese expression 言の葉 (*kotonoha*), a
19
+ classical and poetic name for words, language, and verse. The name reflects
20
+ this project's purpose: helping a reader's intent grow into clear,
21
+ well-structured words.
22
+
23
+ Its connection to the *Man'yoshu* needs one qualification. One traditional
24
+ interpretation reads the anthology's title as "countless words or poems,"
25
+ but the title's etymology is not settled. The famous explicit image,
26
+ "Japanese poetry takes the human heart as its seed and grows into myriad
27
+ leaves of words," is from the
28
+ [*Kokin Wakashu* Kana Preface](https://ja.wikisource.org/wiki/%E5%8F%A4%E4%BB%8A%E5%92%8C%E6%AD%8C%E9%9B%86%E4%BB%AE%E5%90%8D%E5%BA%8F),
29
+ not the *Man'yoshu*. The earlier *Man'yoshu* expresses a related belief in
30
+ the power of language through *kotodama*, including poems
31
+ [894](https://manyo-hyakka.pref.nara.jp/db/detailLink?cls=db_manyo&pkey=894)
32
+ and
33
+ [3254](https://manyo-hyakka.pref.nara.jp/db/detailLink?cls=db_manyo&pkey=3254).
34
+ The broader historical meaning of 言の葉 is summarized by
35
+ [Kotobank](https://kotobank.jp/word/%E8%A8%80%E3%81%AE%E8%91%89-503155).
36
+
14
37
  ## What tech-writer solves
15
38
 
16
39
  Technical documents tend to have two separate problems: "is the prose
17
40
  natural" and "does the structure have the right amount of information".
18
- `tech-writer` specializes in the latter and delegates the former
19
- (sentence-level naturalness, reading load, terminology, and removing
20
- "AI smell") to a prose-polishing skill such as
21
- [natural-japanese](https://github.com/coji/natural-japanese). With both
22
- installed, kotonoha locks the structure and technical invariants, invokes the
23
- Japanese prose pass, then rechecks the structure before rubber-duck review.
41
+ Kotonoha includes both layers. `tech-writer` owns structure and completeness;
42
+ the original bundled `japanese-prose` skill uses
43
+ [GiNZA](https://github.com/megagonlabs/ginza) to check sentence-level
44
+ naturalness, reading load, terminology, dependency depth, and repeated
45
+ AI-like patterns. Kotonoha locks the structure and technical invariants, runs
46
+ the Japanese prose pass, then rechecks the structure before rubber-duck
47
+ review.
24
48
 
25
49
  ## What it does
26
50
 
@@ -30,9 +54,9 @@ Japanese prose pass, then rechecks the structure before rubber-duck review.
30
54
  operations runbooks, migration plans, security designs, technical proposals,
31
55
  RFI/RFP procurement documents, and Qiita/Zenn articles
32
56
  - Doctype-specific structure and checklists to guide writing
33
- - Optional `natural-japanese` integration for Japanese phrase lint,
34
- reading-load review, terminology checks, and iterative prose optimization
35
- without changing IDs, facts, tables, code, or acceptance criteria
57
+ - Original GiNZA-based `japanese-prose` lint, reading-load review, terminology
58
+ checks, and iterative prose optimization without changing IDs, facts,
59
+ tables, code, or acceptance criteria
36
60
  - Iterative rubber-duck review after document creation, with fixes and
37
61
  re-review until no actionable findings remain; unavailable reviews are
38
62
  reported as `review not performed`, while unresolved review loops are
@@ -94,10 +118,10 @@ structure guidance and a review checklist under
94
118
  ### Prerequisites
95
119
 
96
120
  - GitHub Copilot CLI installed
97
- - Python 3.9+ if you want to run the lint script (standard library only,
98
- no extra install needed)
99
- - `uv` when using `natural-japanese` diagnostics such as phrase lint,
100
- reading-load analysis, outline extraction, and terminology checks
121
+ - Python 3.9+ for tech-writer's structural lint
122
+ - Python 3.10+ and `uv` for the bundled GiNZA diagnostics such as prose lint,
123
+ reading-load analysis, outline extraction, and terminology checks; `uv`
124
+ resolves GiNZA, `ja_ginza`, and spaCy on first use
101
125
 
102
126
  ### Install from npm
103
127
 
@@ -109,10 +133,10 @@ npm install --save-dev kotonoha
109
133
  npx kotonoha install
110
134
  ```
111
135
 
112
- ### Install tech-writer and presentation-planner together
136
+ ### Install all bundled skills together
113
137
 
114
138
  `kotonoha install` installs every packaged skill that is not already present.
115
- The following commands install both `tech-writer` and
139
+ The following commands install `tech-writer`, `japanese-prose`, and
116
140
  `presentation-planner` into `.github/skills/`:
117
141
 
118
142
  ```bash
@@ -121,43 +145,37 @@ npx kotonoha install --skill all
121
145
  ```
122
146
 
123
147
  `--skill all` is the default, so `npx kotonoha install` has the same behavior.
124
- Confirm that both skills were installed:
148
+ Confirm that all three skills were installed:
125
149
 
126
150
  ```bash
127
151
  test -f .github/skills/tech-writer/SKILL.md
152
+ test -f .github/skills/japanese-prose/SKILL.md
128
153
  test -f .github/skills/presentation-planner/SKILL.md
129
154
  ```
130
155
 
131
- If either directory already exists, the default command preserves it and
132
- installs only the missing skill. To replace and update both installed skills
133
- at once, review or back up local customizations first, then run:
156
+ If a directory already exists, the default command preserves it and installs
157
+ only the missing skills. To replace and update all installed skills at once,
158
+ review or back up local customizations first, then run:
134
159
 
135
160
  ```bash
136
161
  npx kotonoha install --skill all --force
137
162
  ```
138
163
 
139
- For Japanese sentence-level optimization, also install
140
- `natural-japanese` using one of its supported installation methods:
141
-
142
- ```bash
143
- npx skills add coji/natural-japanese
144
- ```
145
-
146
- Ensure the installed skill is visible to Copilot CLI in the same registered
147
- skill root used by this project, such as
148
- `.github/skills/natural-japanese` or
149
- `~/.copilot/skills/natural-japanese`. If the command installs it for a
150
- different host, follow the upstream alternative installation instructions
151
- and place or link the skill into a Copilot-visible skill directory.
164
+ ### Built-in Japanese prose optimization
152
165
 
153
- If no compatible Japanese prose-polishing skill is registered, kotonoha
154
- finishes the structural workflow and reports
155
- `Japanese prose optimization not performed` instead of claiming that the
156
- prose was optimized.
166
+ Kotonoha includes its own `japanese-prose` skill, so no separate prose skill
167
+ installation is required. `npx kotonoha install` places it beside
168
+ `tech-writer`, allowing the writing workflow to run GiNZA-based prose lint,
169
+ reading-load checks, terminology extraction, outline inspection, and
170
+ iterative prose review locally. The implementation was developed from
171
+ scratch for kotonoha and does not include `natural-japanese` source code.
172
+ GiNZA dependency and license information is recorded in
173
+ `skills/japanese-prose/NOTICE.md`.
157
174
 
158
- The default destinations are `.github/skills/tech-writer` and
159
- `.github/skills/presentation-planner` in the current project. To install
160
- only one skill, or use another supported skill directory:
175
+ The default destinations are `.github/skills/tech-writer`,
176
+ `.github/skills/japanese-prose`, and
177
+ `.github/skills/presentation-planner` in the current project. To install only
178
+ one skill, or use another supported skill directory:
161
179
 
162
180
  ```bash
163
181
  npx kotonoha install --skill presentation-planner
@@ -180,6 +198,7 @@ installation safe:
180
198
  ```bash
181
199
  npx kotonoha install
182
200
  # Skipped tech-writer (...)
201
+ # Installed japanese-prose (...)
183
202
  # Installed presentation-planner (...)
184
203
  ```
185
204
 
@@ -212,6 +231,7 @@ To update only one skill:
212
231
 
213
232
  ```bash
214
233
  npx kotonoha install --skill tech-writer --force
234
+ npx kotonoha install --skill japanese-prose --force
215
235
  npx kotonoha install --skill presentation-planner --force
216
236
  ```
217
237
 
@@ -244,6 +264,7 @@ into that repository's `.github/skills/`, `.claude/skills/`, or your global
244
264
 
245
265
  ```bash
246
266
  cp -r skills/tech-writer /path/to/your-repo/.github/skills/tech-writer
267
+ cp -r skills/japanese-prose /path/to/your-repo/.github/skills/japanese-prose
247
268
  cp -r skills/presentation-planner /path/to/your-repo/.github/skills/presentation-planner
248
269
  ```
249
270
 
@@ -277,21 +298,27 @@ skills/tech-writer/ # the skill itself
277
298
  references/doctypes/ # README, requirements/design/test/operations/migration/security, API docs, PR/issue, release notes, proposals, RFI/RFP, Qiita/Zenn
278
299
  scripts/lint.py # structural lint script
279
300
  assets/templates/ # doctype skeletons including requirements, design, test, operations, migration, security, and procurement
301
+ skills/japanese-prose/ # original GiNZA-based prose optimization skill
302
+ SKILL.md # writing, lint, review, and convergence workflow
303
+ references/ # writing guidelines, review workflow, and scoring
304
+ scripts/ # prose lint, reading-load, outline, and terminology diagnostics
305
+ NOTICE.md # GiNZA dependency and license information
280
306
  skills/presentation-planner/ # storyline, design-spec, and PPTX handoff skill
281
307
  SKILL.md
282
308
  references/ # boundary, scenario/design guidance, customization, handoff contract
283
309
  assets/scenario-templates/ # executive, technical, and data-report narrative scenarios
284
310
  assets/design-templates/ # executive, technical, and data-report YAML designs
285
311
  .github/skills/tech-writer # symlink to skills/tech-writer (where Copilot CLI reads it)
312
+ .github/skills/japanese-prose
286
313
  .github/skills/presentation-planner
287
314
  ```
288
315
 
289
316
  ## Known limitations
290
317
 
291
- - `scripts/lint.py` only detects structural issues (headings, code blocks,
292
- placeholders, links); it does not detect prose naturalness, vocabulary,
293
- or rhythm by itself. Those checks require a registered prose-polishing
294
- skill such as `natural-japanese`.
318
+ - `skills/tech-writer/scripts/lint.py` detects structural and Markdown
319
+ rendering issues. Prose naturalness, vocabulary, rhythm, and reading load
320
+ are handled by the separately invoked but bundled
321
+ `skills/japanese-prose` workflow and GiNZA diagnostics.
295
322
  - The doctypes are written mainly with Japanese technical-writing
296
323
  conventions in mind; most of the guidance (especially the commit-message
297
324
  imperative-mood rule) applies directly to English documents as well.
@@ -302,10 +329,10 @@ skills/presentation-planner/ # storyline, design-spec, and PPTX handoff skill
302
329
 
303
330
  ## Acknowledgment
304
331
 
305
- - [natural-japanese](https://github.com/coji/natural-japanese) (MIT
306
- License) — the design principle "machines detect, humans (or agents)
307
- judge" and "prevent at generation time rather than fix afterward"
308
- informed this project's design.
332
+ - [GiNZA](https://github.com/megagonlabs/ginza) (MIT License) — provides
333
+ tokenization, part-of-speech tagging, dependency parsing, lemmatization,
334
+ sentence boundaries, and named-entity recognition for kotonoha's original
335
+ Japanese prose diagnostics.
309
336
 
310
337
  ## License
311
338
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kotonoha",
3
- "version": "0.1.6-dev.0",
3
+ "version": "0.2.0",
4
4
  "description": "GitHub Copilot CLI skills for technical writing and PPTX presentation planning.",
5
5
  "license": "MIT",
6
6
  "author": "nahisaho",
@@ -16,7 +16,8 @@
16
16
  "kotonoha": "bin/kotonoha.js"
17
17
  },
18
18
  "scripts": {
19
- "test": "node --test"
19
+ "test": "node --test",
20
+ "test:ginza": "uv run skills/japanese-prose/scripts/test_engine.py"
20
21
  },
21
22
  "engines": {
22
23
  "node": ">=18"
@@ -35,7 +36,10 @@
35
36
  ],
36
37
  "files": [
37
38
  "CHANGELOG.md",
39
+ "README-ja.md",
38
40
  "bin/",
39
- "skills/"
41
+ "skills/",
42
+ "!skills/**/__pycache__/",
43
+ "!skills/**/*.pyc"
40
44
  ]
41
45
  }
@@ -0,0 +1,17 @@
1
+ # GiNZA dependency notice
2
+
3
+ This skill is an original kotonoha implementation and does not include source
4
+ code from `coji/natural-japanese`.
5
+
6
+ Morphological and syntactic analysis uses
7
+ [GiNZA](https://github.com/megagonlabs/ginza), its `ja_ginza` model, and
8
+ spaCy. These dependencies are resolved by `uv` when a diagnostic script is
9
+ run. GiNZA and its Japanese Universal Dependencies models are distributed
10
+ under the MIT License. spaCy is distributed under the MIT License.
11
+ SudachiPy and SudachiDict are distributed under the Apache License 2.0.
12
+ GiNZA documents the licenses of its remaining dependencies and training
13
+ datasets.
14
+
15
+ The implementation targets GiNZA 5.2.x and uses token surface forms, lemmas,
16
+ universal part-of-speech tags, dependency relationships, sentence boundaries,
17
+ and named-entity labels.
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: japanese-prose
3
+ description: >-
4
+ Improves Japanese prose in technical and business documents using
5
+ kotonoha's original GiNZA-based diagnostics. Use when writing, rewriting,
6
+ reviewing, or scoring Japanese prose; when the user asks for more natural,
7
+ readable, concise, or less AI-like Japanese; or when tech-writer delegates
8
+ its sentence-level quality pass. Owns wording, sentence rhythm, reading
9
+ load, terminology review, and formulaic-expression detection. Does not own
10
+ technical-document structure or presentation storylines.
11
+ license: MIT
12
+ argument-hint: "[write|review|score] [quick|full] <target file or request>"
13
+ ---
14
+
15
+ # japanese-prose
16
+
17
+ Improves Japanese wording without changing approved facts, obligations,
18
+ identifiers, evidence, code, or document structure. This is an original
19
+ kotonoha implementation. It uses
20
+ [GiNZA](https://github.com/megagonlabs/ginza) for tokenization, part-of-speech
21
+ tagging, dependency parsing, lemmatization, and named-entity recognition.
22
+
23
+ ## Responsibility boundary
24
+
25
+ - `tech-writer` owns doctype selection, section structure, completeness,
26
+ traceability, and Markdown organization.
27
+ - `presentation-planner` owns audience strategy, scenarios, slide order, and
28
+ design specifications.
29
+ - `japanese-prose` owns sentence-level Japanese: clarity, rhythm, reading
30
+ load, terminology, repeated patterns, and contextual rewriting.
31
+
32
+ Never move, add, or remove sections unless the calling skill explicitly
33
+ authorizes it. Never alter requirement IDs, risk IDs, control IDs, numbers,
34
+ units, dates, proper nouns, citations, URLs, commands, tables, schemas,
35
+ acceptance criteria, approval states, or normative force.
36
+
37
+ ## Modes
38
+
39
+ - `write`: write or rewrite Japanese prose. Use `quick` unless the document
40
+ is external-facing, high-risk, or longer than roughly 10,000 Japanese
41
+ characters.
42
+ - `review`: report problems and proposed corrections without editing.
43
+ - `score`: run diagnostics and report the 0–100 score without rewriting.
44
+ - `quick`: run prose lint once, review findings in context, edit, and rerun
45
+ until no new actionable findings appear.
46
+ - `full`: run prose lint, reading-load lint, outline extraction, and
47
+ terminology extraction; then review the whole document against
48
+ `references/review-workflow.md`.
49
+
50
+ ## Workflow
51
+
52
+ 1. Read the target, audience, intended outcome, and calling skill's frozen
53
+ invariants.
54
+ 2. Read `references/writing-guidelines.md` before generating or rewriting
55
+ prose.
56
+ 3. Run the GiNZA prose diagnostic:
57
+
58
+ ```bash
59
+ uv run scripts/lint.py <target-file> --genre tech --json > <workdir>/prose-baseline.json
60
+ ```
61
+
62
+ 4. For `full` mode, also run:
63
+
64
+ ```bash
65
+ uv run scripts/lint.py <target-file> --genre tech --reading-load --json
66
+ uv run scripts/outline.py <target-file>
67
+ uv run scripts/terms.py <target-file> --json
68
+ ```
69
+
70
+ 5. Classify each finding as `fix` or `keep`. A detector identifies a review
71
+ target; it does not authorize blind replacement.
72
+ 6. Apply only fixes that improve the intended reader's understanding while
73
+ preserving the frozen invariants.
74
+ 7. Rerun the prose diagnostic with
75
+ `--baseline <workdir>/prose-baseline.json` to classify new, persisting,
76
+ and resolved findings. Replace the baseline only after recording the
77
+ decisions for the current round.
78
+ 8. Stop when every finding has a decision, no new actionable finding appears,
79
+ and the document passes the checks in `references/review-workflow.md`.
80
+
81
+ Allow at most three edit-and-diagnose rounds per invocation. If actionable
82
+ findings or invariant violations remain, report that the optimization did not
83
+ converge and list the unresolved items.
84
+
85
+ ## Markdown emphasis
86
+
87
+ When strong emphasis touches surrounding prose, put half-width spaces outside
88
+ the delimiters: `これは **重要** です`, not `これは**重要**です`. Spaces are
89
+ unnecessary at line boundaries or next to punctuation, and must not be placed
90
+ inside `**`.
91
+
92
+ ## Diagnostic interpretation
93
+
94
+ The score is a triage aid, not a quality certificate. Read
95
+ `references/scoring.md` before presenting it. GiNZA provides linguistic
96
+ observations; the agent remains responsible for deciding whether a change is
97
+ correct in context.
98
+
99
+ ## Completion report
100
+
101
+ Report:
102
+
103
+ - mode and diagnostics executed
104
+ - initial and final scores
105
+ - findings fixed and findings deliberately kept
106
+ - any skipped diagnostic and its reason
107
+ - invariant verification result
108
+ - `completed` or `did not converge`