kotonoha 0.4.2 → 0.5.1

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,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.1] - 2026-10-21
11
+
12
+ ### Fixed
13
+
14
+ - Prohibit session-storage outputs for all Obsidian Skills, including auxiliary
15
+ files and delegated work. Ask for a non-session location before writing when
16
+ necessary; retain Vault scope checks and external CLI workspace requirements.
17
+
18
+ ## [0.5.0] - 2026-10-20
19
+
20
+ ### Added
21
+
22
+ - Add explicit `kotonoha install --agent
23
+ copilot|claude|all` selection for GitHub Copilot, Claude Code, or both.
24
+ Keep the Copilot default and independent `--skill` selection.
25
+ - Preserve existing Skills in both roots, preflight explicit-skill conflicts
26
+ before copying, and allow `--target` overrides for a single agent.
27
+
28
+ ### Changed
29
+
30
+ - Document both hosts and their installation/update paths. Extend
31
+ `tech-writer`'s prose Skill discovery to Claude project and personal roots.
32
+ - Keep npm installation free of automatic Skill writes or interactive setup.
33
+
34
+ ### Fixed
35
+
36
+ - Shorten `tech-writer`'s description to the Agent Skills 1,024-character
37
+ limit so hosts discover all seven bundled Skills. Add a regression check.
38
+
10
39
  ## [0.4.2] - 2026-10-20
11
40
 
12
41
  ### Added
@@ -190,4 +219,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
190
219
  [0.1.4]: https://github.com/nahisaho/kotonoha/compare/v0.1.2...v0.1.4
191
220
  [0.1.5]: https://github.com/nahisaho/kotonoha/compare/v0.1.4...v0.1.5
192
221
  [0.4.2]: https://github.com/nahisaho/kotonoha/compare/d76ef4a...v0.4.2
193
- [Unreleased]: https://github.com/nahisaho/kotonoha/compare/v0.4.2...HEAD
222
+ [0.5.0]: https://github.com/nahisaho/kotonoha/compare/v0.4.2...v0.5.0
223
+ [Unreleased]: https://github.com/nahisaho/kotonoha/compare/v0.5.0...HEAD
package/README-ja.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # kotonoha
2
2
 
3
- kotonohaは、コンサルティング分析、技術文書、日本語表現、プレゼンテーション設計を支援するGitHub Copilot CLIスキルを提供します。曖昧な課題の構造化から、文書化、日本語表現の改善、プレゼンテーション設計までを一連の流れとして支援します。
3
+ kotonohaは、GitHub CopilotとClaude Code向けのスキルを提供します。曖昧な課題の構造化から、文書化、日本語表現の改善、プレゼンテーション設計までを一連の流れとして支援します。
4
4
 
5
5
  `consulting-analyst`は、課題を論点、仮説、証拠、選択肢、提言へ構造化します。分析結果を受け取った`tech-writer`は、README、設計文書、Blueprint、White Paper、提案書などへ内容を落とし込みます。日本語の表現品質は`japanese-prose`がGiNZAベースの診断で改善します。プレゼンテーションが必要な場合は、`presentation-planner`がシナリオ、スライド構成、デザイン仕様、PPTX作成スキル向けの引き継ぎ情報を生成します。
6
6
 
@@ -75,6 +75,10 @@ Vault、読み取り範囲、モデルに渡す情報を利用者が明示し、
75
75
  相対保存先はそこから解決しますが、Vaultルート基準と明示したパスや絶対パスは維持します。
76
76
  許可済みのVaultと範囲内にある対象自体を編集し、セッション領域のコピーで代替しません。
77
77
  補助ファイルへの同意と適切な保存場所も別途必要です。
78
+ Obsidian関連の3スキルは、成果物だけでなく原文・候補・診断・レビュー・計画・一時ファイルもセッション領域へ保存しません。
79
+ 指定場所の実体がセッション領域なら、書き込み前に別の場所を確認し、委譲先にも同じ制約を引き継ぎます。
80
+ CLIの作業領域には引き続きVault外の場所が必要です。セッション領域ではない場所への同意を得て使用します。
81
+ この制約はスキルが保存するファイルに適用し、ホストが管理する会話ログは制御しません。
78
82
  CLI計画保存モードも選べます。こちらはLinux、CPython 3.12、uvを使い、正確な差分と計画の承認後にapplyします。
79
83
  両モードとも、添削時の記法保護とハッシュ付き意味レビューは省略しません。
80
84
  未解決リンクを誤りと断定せず、自動修復もしません。
@@ -155,7 +159,8 @@ White Paper向けの分析を作成して
155
159
 
156
160
  ### 前提条件
157
161
 
158
- - GitHub Copilot CLIがインストールされていること
162
+ - GitHub Copilot(CLIまたは対応IDEのエージェントモード)かClaude Codeがインストールされていること
163
+ - インストーラー用のNode.js 18以上とnpm
159
164
  - tech-writerの構造lintを実行する場合はPython 3.9以上
160
165
  - 同梱`japanese-prose`の文章lint、読解負荷分析、アウトライン抽出、用語検査、編集前後の不変条件検査を実行する場合はPython 3.10以上と`uv`。GiNZA、`ja_ginza`、spaCy、Markdown解析用の依存関係は、各スクリプトの初回実行時に`uv`が解決
161
166
 
@@ -168,6 +173,34 @@ npm install --save-dev kotonoha
168
173
  npx kotonoha install
169
174
  ```
170
175
 
176
+ `npm install`はパッケージの導入だけを行います。エージェントの選択画面は表示せず、スキルディレクトリにも自動で書き込みません。
177
+
178
+ ### GitHub Copilot・Claude Code・両方を選択
179
+
180
+ `--agent`はkotonoha `0.5.0`以降で利用できます。`0.4.2`などの旧版では使えないため、先にnpmパッケージを更新してください。
181
+
182
+ ```bash
183
+ npx kotonoha install --agent copilot # .github/skills/
184
+ npx kotonoha install --agent claude # .claude/skills/
185
+ npx kotonoha install --agent all # 両方のディレクトリ
186
+ ```
187
+
188
+ 未指定時は従来どおり`--agent copilot`です。`--agent`で配置先のエージェント、`--skill`で導入するスキルを選びます。両エージェントには同じSkillファイル、スクリプト、テンプレートを配置します。エージェント本体のインストール、認証設定、各スキルのPython・Node実行依存の準備は行いません。
189
+
190
+ エージェントとスキルの選択は組み合わせられます。
191
+
192
+ ```bash
193
+ npx kotonoha install --agent claude --skill tech-writer
194
+ npx kotonoha install --agent all --skill obsidian-bases
195
+ npx kotonoha install --agent all --force
196
+ ```
197
+
198
+ 既存ディレクトリの保護と`--force`は、選択した各配置先に適用します。明示した単一スキルがどちらかの配置先に存在する場合、コピー開始前に処理を止めます。ただし、コピー中のファイルシステムエラーでは、それ以前のコピーが残ることがあります。複数の配置先をまとめて元に戻す機能はありません。
199
+
200
+ 単一エージェントでは`--target`で配置先を変更できます。`--agent all`と`--target`は併用できません。配置先を個別に変える場合は、エージェントごとに実行します。
201
+
202
+ この選択はファイルの配置先を決めるもので、エージェント間の隔離ではありません。Copilotも`.claude/skills`を認識するため、Claude向けに配置してもCopilotからの読み込みは防げません。対応する配置先は、公式資料([CopilotのSkill説明](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills)、[Claude CodeのSkill説明](https://code.claude.com/docs/en/skills))を参照してください。
203
+
171
204
  ### 同梱スキルをまとめてインストール
172
205
 
173
206
  `kotonoha install`は、まだ存在しない同梱スキルをすべてインストールします。`consulting-analyst`、`tech-writer`、`japanese-prose`、`obsidian-vault`、`obsidian-canvas`、`obsidian-bases`、`presentation-planner`を`.github/skills/`へインストールします。
@@ -232,7 +265,8 @@ consulting-analyst、tech-writer、japanese-prose、obsidian-vault、obsidian-ca
232
265
  ```bash
233
266
  npx kotonoha install --skill consulting-analyst
234
267
  npx kotonoha install --skill presentation-planner
235
- npx kotonoha install --target .claude/skills
268
+ npx kotonoha install --agent claude
269
+ npx kotonoha install --agent claude --target ~/.claude/skills
236
270
  npx kotonoha install --target ~/.copilot/skills
237
271
  ```
238
272
 
@@ -272,8 +306,12 @@ npmパッケージを更新しても、コピー済みのスキルは自動更
272
306
 
273
307
  ```bash
274
308
  npx kotonoha install --force
309
+ npx kotonoha install --agent claude --force
310
+ npx kotonoha install --agent all --force
275
311
  ```
276
312
 
313
+ 上記のうち、初回の導入と同じ`--agent`に対応するコマンドを1つ実行します。最初のコマンドが更新するのは、既定のCopilot向け配置先だけです。
314
+
277
315
  スキルを1つだけ更新する場合は、次のように実行します。
278
316
 
279
317
  ```bash
@@ -293,7 +331,7 @@ npx kotonoha install --target ~/.copilot/skills --force
293
331
 
294
332
  ```bash
295
333
  npx kotonoha --version
296
- git diff -- .github/skills
334
+ git diff -- .github/skills .claude/skills
297
335
  ```
298
336
 
299
337
  `--force`なしで`npx kotonoha install`を実行しても既存のスキルディレクトリは更新されず、不足しているスキルだけがインストールされます。
@@ -314,9 +352,9 @@ cp -r skills/obsidian-bases /path/to/your-repo/.github/skills/obsidian-bases
314
352
  cp -r skills/presentation-planner /path/to/your-repo/.github/skills/presentation-planner
315
353
  ```
316
354
 
317
- ## Copilotに文書作成を依頼
355
+ ## Copilot・Claude Codeに文書作成を依頼
318
356
 
319
- Copilot CLIセッションで必要な文書種別を依頼すると、対応するスキルが自動的に呼び出されます。
357
+ CopilotまたはClaude Codeのセッションで必要な文書種別を依頼すると、対応するスキルが自動的に呼び出されます。
320
358
 
321
359
  - 「READMEを書いて」「この設計書をレビューして」「PR説明文を書いて」「この手順書を分かりやすくして」
322
360
  - 「要件定義書を作って」「承認済み要件からシステム設計書を書いて」「移行計画とRunbookを作って」
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # kotonoha
2
2
 
3
- kotonoha provides GitHub Copilot CLI skills for consulting analysis, technical
3
+ kotonoha provides skills for GitHub Copilot and Claude Code: consulting analysis, technical
4
4
  documents, Japanese prose, and presentation planning. `consulting-analyst`
5
5
  structures ambiguous problems into issue trees, hypotheses, evidence, option
6
6
  comparisons, and recommendations. `tech-writer` turns that reasoning into
@@ -139,6 +139,12 @@ at request start by default. Relative targets resolve there unless explicitly
139
139
  Vault-relative; absolute targets stay unchanged. Edit the authorized target
140
140
  itself, not a session-state copy. This does not broaden the permitted Vault scope;
141
141
  auxiliary copies still need separate consent and a suitable location.
142
+ All three Obsidian skills prohibit saving operation files in session storage,
143
+ including originals, candidates, diagnostics, reviews, plans and temporary files.
144
+ If a selected directory resolves there, they ask for another location before
145
+ writing. Delegated skills receive the same restriction. CLI workspaces still
146
+ require a consented location outside the Vault, not in session storage.
147
+ This governs skill-directed files, not host-managed conversation logs.
142
148
  Protected syntax checks and a hash-bound semantic review remain required for
143
149
  Japanese proofreading in either mode.
144
150
  Unresolved links are observations, not automatic repair requests.
@@ -251,7 +257,8 @@ handoff without inventing missing evidence.
251
257
 
252
258
  ### Prerequisites
253
259
 
254
- - GitHub Copilot CLI installed
260
+ - GitHub Copilot (CLI or a supported IDE agent mode) or Claude Code installed
261
+ - Node.js 18+ and npm for the installer
255
262
  - Python 3.9+ for tech-writer's structural lint
256
263
  - Python 3.10+ and `uv` for the edit-invariant gate and bundled GiNZA
257
264
  diagnostics such as prose lint,
@@ -268,6 +275,48 @@ npm install --save-dev kotonoha
268
275
  npx kotonoha install
269
276
  ```
270
277
 
278
+ `npm install` installs the package only; it does not write to your agent's
279
+ skill directories or prompt you to choose an agent.
280
+
281
+ ### Choose GitHub Copilot, Claude Code, or both
282
+
283
+ Agent selection requires kotonoha `0.5.0` or later. Older packages such as
284
+ `0.4.2` do not support `--agent`; update the npm package before using it.
285
+
286
+ ```bash
287
+ npx kotonoha install --agent copilot # .github/skills/
288
+ npx kotonoha install --agent claude # .claude/skills/
289
+ npx kotonoha install --agent all # both directories
290
+ ```
291
+
292
+ The default is `--agent copilot`, preserving existing installations.
293
+ `--agent` chooses the destination agent(s); `--skill` chooses the bundled
294
+ skill(s). Both agents receive the same Skill files, scripts and templates.
295
+ The installer does not install either agent application, configure credentials,
296
+ or prepare Python/Node runtime dependencies for individual skills.
297
+
298
+ You can combine agent and skill selection:
299
+
300
+ ```bash
301
+ npx kotonoha install --agent claude --skill tech-writer
302
+ npx kotonoha install --agent all --skill obsidian-bases
303
+ npx kotonoha install --agent all --force
304
+ ```
305
+
306
+ Existing-directory protection and `--force` apply separately in each selected
307
+ root. An explicitly selected skill that already exists in either root blocks
308
+ the operation before any Skill is copied. A later filesystem/copy error can
309
+ still leave earlier copies installed; this is not a transaction across roots.
310
+
311
+ For one agent, `--target` overrides its default root. Combining `--target`
312
+ with `--agent all` is rejected; use separate commands for custom roots.
313
+
314
+ Agent selection controls file placement, not isolation: Copilot can also
315
+ discover `.claude/skills`. Installing for Claude does not prevent Copilot from
316
+ loading those files. See the official
317
+ [Copilot Skill locations](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills)
318
+ and [Claude Code Skills](https://code.claude.com/docs/en/skills).
319
+
271
320
  ### Install all bundled skills together
272
321
 
273
322
  `kotonoha install` installs every packaged skill that is not already present.
@@ -364,7 +413,8 @@ one skill, or use another supported skill directory:
364
413
  ```bash
365
414
  npx kotonoha install --skill consulting-analyst
366
415
  npx kotonoha install --skill presentation-planner
367
- npx kotonoha install --target .claude/skills
416
+ npx kotonoha install --agent claude
417
+ npx kotonoha install --agent claude --target ~/.claude/skills
368
418
  npx kotonoha install --target ~/.copilot/skills
369
419
  ```
370
420
 
@@ -411,8 +461,13 @@ skills. Reinstall all packaged skills after the package update:
411
461
 
412
462
  ```bash
413
463
  npx kotonoha install --force
464
+ npx kotonoha install --agent claude --force
465
+ npx kotonoha install --agent all --force
414
466
  ```
415
467
 
468
+ Choose the command matching the original `--agent`; these are alternatives.
469
+ The first updates only the default Copilot destination.
470
+
416
471
  To update only one skill:
417
472
 
418
473
  ```bash
@@ -434,7 +489,7 @@ committing them:
434
489
 
435
490
  ```bash
436
491
  npx kotonoha --version
437
- git diff -- .github/skills
492
+ git diff -- .github/skills .claude/skills
438
493
  ```
439
494
 
440
495
  Running `npx kotonoha install` without `--force` is safe but does not update
@@ -459,9 +514,9 @@ cp -r skills/obsidian-bases /path/to/your-repo/.github/skills/obsidian-bases
459
514
  cp -r skills/presentation-planner /path/to/your-repo/.github/skills/presentation-planner
460
515
  ```
461
516
 
462
- ## Ask Copilot for the document you need
517
+ ## Ask Copilot or Claude Code for the document you need
463
518
 
464
- Just ask for the document type you need in a Copilot CLI session, and it's
519
+ Just ask for the document type you need in a Copilot or Claude Code session, and it's
465
520
  invoked automatically.
466
521
 
467
522
  - "Write a README", "Review this design doc", "Write the PR description",
package/bin/kotonoha.js CHANGED
@@ -4,13 +4,19 @@ const fs = require("node:fs");
4
4
  const path = require("node:path");
5
5
 
6
6
  const packageJson = require("../package.json");
7
+ const agentTargets = {
8
+ copilot: ".github/skills",
9
+ claude: ".claude/skills",
10
+ };
7
11
 
8
12
  function printUsage() {
9
13
  console.log(`Usage:
10
- kotonoha install [--target <directory>] [--skill <name|all>] [--force]
14
+ kotonoha install [--agent <copilot|claude|all>] [--target <directory>] [--skill <name|all>] [--force]
11
15
 
12
16
  Options:
13
- --target <directory> Skill directory root (default: .github/skills)
17
+ --agent <name|all> Agent to install for (default: copilot)
18
+ copilot: .github/skills; claude: .claude/skills; all: both
19
+ --target <directory> Override the skill root for one agent; cannot combine with --agent all
14
20
  --skill <name|all> Skill to install (default: all)
15
21
  --force Replace existing selected skill installations
16
22
  --help Show this help
@@ -23,7 +29,8 @@ function fail(message) {
23
29
  }
24
30
 
25
31
  function parseInstallOptions(args) {
26
- let target = ".github/skills";
32
+ let agent = "copilot";
33
+ let target;
27
34
  let skill = "all";
28
35
  let force = false;
29
36
 
@@ -35,6 +42,25 @@ function parseInstallOptions(args) {
35
42
  continue;
36
43
  }
37
44
 
45
+ if (argument === "--agent") {
46
+ const value = args[index + 1];
47
+ if (!value || value.startsWith("--")) {
48
+ throw new Error("--agent requires copilot, claude, or all");
49
+ }
50
+ agent = value;
51
+ index += 1;
52
+ continue;
53
+ }
54
+
55
+ if (argument.startsWith("--agent=")) {
56
+ const value = argument.slice("--agent=".length);
57
+ if (!value) {
58
+ throw new Error("--agent requires copilot, claude, or all");
59
+ }
60
+ agent = value;
61
+ continue;
62
+ }
63
+
38
64
  if (argument === "--target") {
39
65
  const value = args[index + 1];
40
66
  if (!value || value.startsWith("--")) {
@@ -76,7 +102,14 @@ function parseInstallOptions(args) {
76
102
  throw new Error(`unknown option: ${argument}`);
77
103
  }
78
104
 
79
- return { target, skill, force };
105
+ if (agent !== "all" && !Object.hasOwn(agentTargets, agent)) {
106
+ throw new Error(`unknown agent: ${agent}; available agents: copilot, claude, all`);
107
+ }
108
+ if (agent === "all" && target !== undefined) {
109
+ throw new Error("--target cannot be combined with --agent all; install each agent separately to use custom directories");
110
+ }
111
+
112
+ return { agent, target, skill, force };
80
113
  }
81
114
 
82
115
  function install(args) {
@@ -89,7 +122,10 @@ function install(args) {
89
122
  }
90
123
 
91
124
  const skillsRoot = path.resolve(__dirname, "..", "skills");
92
- const targetRoot = path.resolve(process.cwd(), options.target);
125
+ const agents = options.agent === "all" ? Object.keys(agentTargets) : [options.agent];
126
+ const targetRoots = agents.map((agent) =>
127
+ path.resolve(process.cwd(), options.target ?? agentTargets[agent]),
128
+ );
93
129
 
94
130
  if (!fs.existsSync(skillsRoot)) {
95
131
  fail(`packaged skills not found at ${skillsRoot}`);
@@ -118,9 +154,16 @@ function install(args) {
118
154
  }
119
155
  }
120
156
 
121
- const existingDestinations = selectedSkills
122
- .map((skill) => path.join(targetRoot, skill))
123
- .filter((destination) => fs.existsSync(destination));
157
+ const destinations = targetRoots.flatMap((targetRoot) =>
158
+ selectedSkills.map((skill) => ({
159
+ skill,
160
+ targetRoot,
161
+ destination: path.join(targetRoot, skill),
162
+ })),
163
+ );
164
+ const existingDestinations = destinations
165
+ .filter(({ destination }) => fs.existsSync(destination))
166
+ .map(({ destination }) => destination);
124
167
 
125
168
  if (existingDestinations.length > 0 && !options.force && !installAll) {
126
169
  fail(
@@ -129,10 +172,16 @@ function install(args) {
129
172
  return;
130
173
  }
131
174
 
132
- fs.mkdirSync(targetRoot, { recursive: true });
133
- for (const skill of selectedSkills) {
175
+ for (const targetRoot of targetRoots) {
176
+ try {
177
+ fs.mkdirSync(targetRoot, { recursive: true });
178
+ } catch (error) {
179
+ fail(`failed to prepare skill root ${targetRoot}: ${error.message}`);
180
+ return;
181
+ }
182
+ }
183
+ for (const { skill, targetRoot, destination } of destinations) {
134
184
  const source = path.join(skillsRoot, skill);
135
- const destination = path.join(targetRoot, skill);
136
185
  if (fs.existsSync(destination) && !options.force) {
137
186
  console.log(
138
187
  `Skipped ${skill} (${destination} already exists; use --force to replace)`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kotonoha",
3
- "version": "0.4.2",
4
- "description": "GitHub Copilot CLI skills for consulting analysis, technical writing, Japanese prose, Obsidian vaults, Canvas and Bases, and PPTX planning.",
3
+ "version": "0.5.1",
4
+ "description": "Skills for GitHub Copilot and Claude Code: consulting analysis, technical writing, Japanese prose, Obsidian vaults, Canvas and Bases, and PPTX planning.",
5
5
  "license": "MIT",
6
6
  "author": "nahisaho",
7
7
  "repository": {
@@ -28,6 +28,7 @@
28
28
  "keywords": [
29
29
  "copilot",
30
30
  "github-copilot",
31
+ "claude-code",
31
32
  "skill",
32
33
  "technical-writing",
33
34
  "consulting",
@@ -35,7 +35,13 @@ Use the user's working directory or the current directory at request start.
35
35
  Resolve relative working directories from that start and relative targets from
36
36
  the selected directory; preserve explicitly Vault-relative and absolute paths.
37
37
  Verify authorized Vault/scope separately. Edit the target itself, never substitute
38
- a session-state copy or silently use `~/.copilot/session-state/.../files/`.
38
+ a session-state copy. Never save any operation files in session storage,
39
+ including `~/.copilot/session-state/`. This includes deliverables, requests,
40
+ originals, candidates, diffs, diagnostics, reviews and temporary files.
41
+ Check resolved locations before writing; if the working directory or any
42
+ selected output is in session storage, stop and ask for a non-session location.
43
+ Do not use it as a fallback. Pass the same locations and restriction to
44
+ delegated Skills and tools; use stdout when no diagnostic file is needed.
39
45
  Auxiliary files need a suitable consented location, purpose, retention and cleanup
40
46
  agreement. If an external proofreading workspace is needed, ask for it.
41
47
 
@@ -14,6 +14,10 @@ replacement authority. Do not overwrite local customizations without consent.
14
14
  npx kotonoha install --skill obsidian-bases
15
15
  ```
16
16
 
17
+ This defaults to Copilot's `.github/skills`. Add `--agent claude` for Claude
18
+ Code's `.claude/skills`, or `--agent all` for both. Resolve `<bases-dir>` from
19
+ the installed Skill in the selected root.
20
+
17
21
  Installation copies authored assets and the canonical private lockfile, not
18
22
  `node_modules`. Before dependency preparation explain the local installation
19
23
  directory and possible package-registry traffic; get separate permission.
@@ -54,6 +58,13 @@ Preserve absolute and explicitly Vault-relative paths. A directory choice is
54
58
  not Vault authority. If the target's existing parent or allowed scope is missing,
55
59
  stop instead of creating directories or saving elsewhere. Never substitute
56
60
  session-state copies for the target.
61
+ Never save any operation files in session storage, including
62
+ `~/.copilot/session-state/`: deliverables, requests, originals, candidates,
63
+ diffs, diagnostics, reviews and temporary files are all covered.
64
+ Check resolved locations before writing. If the workdir or an output is in
65
+ session storage, stop and ask for a non-session location, even if explicitly
66
+ selected. Never fall back there. Pass the locations and restriction to delegated
67
+ Skills/tools; use stdout when no diagnostic file is needed.
57
68
 
58
69
  ## Check exact text
59
70
 
@@ -31,6 +31,15 @@ Markdownノートの操作はobsidian-vault、Basesの操作は別の責務と
31
31
  添付は存在と通常ファイルかどうかだけを調べ、画像やPDFの内容は取得しない。
32
32
 
33
33
  コピーを作る前に、Vault外の作業領域、原文・候補・差分・診断・レビューの保存目的を説明する。
34
+ 成果物と補助ファイルは、セッション領域へ一切保存しない。`~/.copilot/session-state/`も対象とする。
35
+ 依頼、原文、候補、差分、診断、レビュー、計画、保存記録、結果、一時ファイルにも同じ制約を適用する。
36
+ 作業ディレクトリはユーザー指定を優先し、未指定なら依頼開始時のカレントディレクトリを使う。
37
+ 相対指定の作業ディレクトリは開始時のカレントから、相対保存先は選択した作業ディレクトリから解決する。
38
+ Vaultルート基準と明示されたパスや絶対パスは維持する。CLIのVault相対パスを作業ディレクトリ基準に変換しない。
39
+ 書き込み前に実体の保存場所を確認し、作業ディレクトリや出力先がセッション領域なら、別の場所を1問ずつ確認する。
40
+ 明示指定された場合も、このSkillではセッション領域へ書かず、代替場所への許可を得る。
41
+ CLIのworkspaceは引き続きVault外とし、適切な場所がなければ確認までlayout、plan、applyを使わない。
42
+ 委譲先にも保存場所と同じ制約を引き継ぎ、ファイルが不要な診断には標準出力を使う。
34
43
  利用者が削除するまで保持することと、操作単位の既知ファイルだけを削除する方法を示す。
35
44
  同意がなければlayout、plan、applyを使わず、読み取り・診断・会話内の提案にとどめる。
36
45
  ホストやモデル提供者の記録の削除を制御できるとは説明しない。
@@ -20,6 +20,8 @@ kotonoha install --skill obsidian-canvas
20
20
  kotonoha install --skill obsidian-vault
21
21
  ```
22
22
 
23
+ 上記はCopilot向けの導入例である。Claude Codeでは両コマンドに`--agent claude`、両方には`--agent all`を付ける。CanvasとVaultの兄弟Skillは、エージェントごとの同じルートに置く。
24
+
23
25
  添削にはjapanese-proseも必要である。通常の図の編集では必須にしない。
24
26
  初回の依存準備で通信する場合は、対象と目的を説明して別に許可を得る。
25
27
 
@@ -72,6 +74,15 @@ Vaultの絶対パス、目的、読み取り範囲、モデルに渡す情報を
72
74
 
73
75
  ## 候補、配置、変更対象
74
76
 
77
+ 成果物と補助ファイルは、セッション領域へ一切保存しない。`~/.copilot/session-state/`も対象とする。
78
+ 依頼、原文、候補、差分、診断、レビュー、計画、保存記録、結果、一時ファイルにも同じ制約を適用する。
79
+ 作業ディレクトリはユーザー指定を優先し、未指定なら依頼開始時のカレントディレクトリを使う。
80
+ 相対指定の作業ディレクトリは開始時のカレントから、相対保存先は選択した作業ディレクトリから解決する。
81
+ Vaultルート基準と明示されたパスや絶対パスは維持する。CLIのVault相対パスを作業ディレクトリ基準に変換しない。
82
+ 書き込み前に実体の保存場所を確認し、セッション領域への指定なら別の場所への許可を得るまで止める。
83
+ CLIのworkspaceには引き続きVault外の場所が必要であり、セッション領域へ自動退避しない。
84
+ 委譲先にも保存場所と同じ制約を引き継ぎ、ファイルが不要な診断には標準出力を使う。
85
+
75
86
  作成ではintent=create、保存先、Vault外のworkspace、コピー同意を設定する。
76
87
  base_sha256はnull、mutationsは空とし、候補全体を承認対象にする。
77
88
  編集ではintent=editとし、readで得た原文のbase_sha256と保存先を設定する。
@@ -39,8 +39,12 @@ relative targets from the selected working directory. Preserve explicitly
39
39
  Vault-relative and absolute paths. Working-directory selection grants neither
40
40
  whole-Vault access nor write permission: verify the authorized Vault and scopes.
41
41
 
42
- Edit the resolved target itself, not a session-state copy. Never default to
43
- `~/.copilot/session-state/.../files/` unless the user explicitly selects it.
42
+ Edit the resolved target itself, not a session-state copy. Never save any
43
+ operation files in session storage, including `~/.copilot/session-state/`.
44
+ This includes deliverables, requests, originals, candidates, diffs, diagnostics,
45
+ reviews, plans, receipts, results and temporary files. Check resolved locations
46
+ before writing; if the working directory or any selected output is in session
47
+ storage, stop and ask for a non-session location. Do not use it as a fallback.
44
48
  Stop on out-of-scope, ambiguous or missing-parent targets; do not create folders
45
49
  or substitute another location.
46
50
 
@@ -51,6 +55,8 @@ purpose, retention until user deletion, and cleanup of known per-operation files
51
55
  Copy consent is separate from target-write consent. If CLI planning or
52
56
  proofreading needs an external workspace but the working directory is inside
53
57
  the Vault, ask for another location; never silently use session storage.
58
+ Pass the same non-session locations and restriction to delegated Skills and
59
+ tools; use stdout for diagnostics when no output file is needed.
54
60
  Without copy consent, make no external copies or CLI `plan`/`apply` calls.
55
61
  Do not claim control over host/model-provider retention or deletion.
56
62
 
@@ -24,7 +24,10 @@ Vaultルート基準と明示されたパスや絶対パスは、その指定を
24
24
  作業ディレクトリはVaultルートやアクセス許可と同義ではない。保存先が許可済みのVaultと範囲内にあることを確認する。
25
25
  作業ディレクトリがVault外なら、相対保存先を勝手にVault内へ移さず、対象の指定を確認する。
26
26
  対象ノートは解決したパスで直接作成・編集し、セッション領域のコピーだけを修正して完了としない。
27
- ユーザーが保存先として明示しない限り、~/.copilot/session-state/.../files/を既定にしない。
27
+ 成果物と補助ファイルは、セッション領域へ一切保存しない。`~/.copilot/session-state/`も対象とする。
28
+ 依頼、原文、候補、差分、診断、レビュー、計画、保存記録、結果、一時ファイルにも同じ制約を適用する。
29
+ 書き込み前に実体の保存場所を確認し、作業ディレクトリや出力先がセッション領域なら、別の場所を1問ずつ確認する。
30
+ 明示指定された場合も、このSkillではセッション領域へ書かず、代替場所への許可を得る。
28
31
  対象の親が存在しなければ止め、セッション領域への代替保存や新規フォルダー作成を行わない。
29
32
  次のようにVaultと対象、変更内容、保存の可否を指定する。
30
33
 
@@ -59,6 +62,7 @@ Vault内の`.md`だけを扱い、対象と親の実体、許可範囲、通常
59
62
  補助ファイルの場所もカレントディレクトリまたはユーザー指定の場所から選び、セッション領域へ自動退避しない。
60
63
  CLI計画や添削に必要なVault外の場所を使えなければ、別の場所の指定とコピーへの同意を得るまで停止する。
61
64
  補助ファイルを作る許可は、対象ノートの保存許可ではない。
65
+ 委譲先のSkillやツールにも保存場所とセッション領域への保存禁止を引き継ぐ。診断にファイルが不要なら標準出力を使う。
62
66
  日本語添削では直接編集でもjapanese-proseの保護検査とハッシュ付き意味レビューを省略しない。
63
67
  通常の内容変更をproofreadと偽らず、CLIに存在しないeditコマンドも生成しない。
64
68
 
@@ -77,6 +81,8 @@ npx kotonoha install --skill tech-writer
77
81
  npx kotonoha install --skill japanese-prose
78
82
  ```
79
83
 
84
+ 上記はCopilot向けの導入例である。Claude Codeでは各コマンドに`--agent claude`、両方には`--agent all`を付け、必要な兄弟Skillも同じルートへ導入する。既定のルートはCopilotが`.github/skills`、Claude Codeが`.claude/skills`である。以下の起動例では、選択したルートにパスを合わせる。
85
+
80
86
  既存のjapanese-proseが古い場合は共通ゲートを利用できず、依存不足となる。
81
87
  既存Skillのローカル変更を確認・退避し、利用者が更新を許可してから、対象Skillだけを`--force`付きで再導入する。
82
88
 
@@ -1,39 +1,17 @@
1
1
  ---
2
2
  name: tech-writer
3
3
  description: >-
4
- Helps structure and polish technical documents: README, design docs/ADRs,
5
- API reference, PR descriptions/commit messages/issue reports, release
6
- notes/CHANGELOG, user manuals/how-to guides, code comments/docstrings,
7
- requirements definitions, system designs, test plans, operations runbooks,
8
- migration plans, security designs/threat models, technical proposals,
9
- Blueprints, White Papers, RFI/RFP procurement documents, Obsidian notes
10
- and templates, and Qiita/Zenn articles. Use for requests
11
- like "write a README", "draft a design doc", "define system requirements",
12
- "write a system design", "create a test plan", "write an operations
13
- runbook", "plan a migration", "create a threat model", "write a technical
14
- proposal", "create a Blueprint", "write a White Paper", "draft an RFI",
15
- "create an RFP", "write this PR description", "clean up my commit
16
- message", "make this how-to guide clearer", "write API docs", "summarize
17
- the release notes", "create an Obsidian note", "write a Zenn article",
18
- "write this up for Qiita", as
19
- well as
20
- Japanese-language equivalents (「READMEを書いて」「設計ドキュメントを作って」
21
- 「要件定義書を作って」「システム設計書を書いて」「テスト計画書を作って」
22
- 「運用設計書を書いて」「移行計画を作って」「脅威モデルを作って」
23
- 「技術提案書を書いて」「Blueprintを作って」「ホワイトペーパーを書いて」
24
- 「RFIを作って」「RFPを作って」「PRの説明文を書いて」
25
- 「コミットメッセージを整えて」「手順書を分かりやすくして」
26
- 「APIドキュメントを整備して」「リリースノートをまとめて」
27
- 「Obsidian用のノートを作って」「Obsidianのテンプレートを作って」
28
- 「Zennの記事を書いて」「Qiitaに投稿する記事を書いて」). Especially useful when
29
- the request is a bare goal without enough context to start (e.g. "I want
30
- to write a README" / "○○を書きたい"), since this skill drives a one
31
- question-at-a-time intake before writing. Supports both Japanese and
32
- English documents, with Japanese as the primary target. Owns document
33
- structure, information completeness, and reader fit; for living Japanese
34
- documents, it invokes kotonoha's original bundled `japanese-prose` skill,
35
- which uses GiNZA for sentence-level naturalness, word choice, rhythm, and
36
- repeated AI-like pattern analysis.
4
+ Structures, writes, reviews, and scores technical documents: README,
5
+ design docs/ADRs, API references, requirements, system designs, test plans,
6
+ operations runbooks, migration plans, security designs/threat models,
7
+ technical proposals, Blueprints, White Papers, RFI/RFP, PR descriptions,
8
+ commit messages, issue reports, release notes/CHANGELOG, manuals/how-to
9
+ guides, comments/docstrings, Obsidian notes/templates, and Qiita/Zenn
10
+ articles. Use when asked to create, improve, review, or score these
11
+ documents in Japanese or English, including a bare goal without context.
12
+ Asks one question at a time before writing. Owns structure, completeness,
13
+ traceability, and reader fit; delegates sentence-level Japanese wording
14
+ to kotonoha's original bundled japanese-prose skill with GiNZA diagnostics.
37
15
  license: MIT
38
16
  argument-hint: "[write|review|score] [doctype] <target file or request>"
39
17
  ---
@@ -68,6 +46,11 @@ directory, or the current directory at request start if none was specified.
68
46
  Resolve the final target there without reinterpreting an explicitly absolute or
69
47
  Vault-relative path. Do not replace the target with a copy in session-state
70
48
  storage; retain Vault scope checks and separate consent for any auxiliary copies.
49
+ For Obsidian handoffs, never save any operation files in session storage,
50
+ including originals, drafts, diagnostics, reviews and temporary files. Pass the
51
+ authorized non-session locations and this restriction to every delegated Skill
52
+ or tool. If a location is missing or resolves to session storage, ask for a
53
+ non-session location before writing; do not silently substitute another path.
71
54
  Route standalone `.base` configuration to `obsidian-bases`, not the Markdown
72
55
  template or Vault Markdown writer; its host workflow validates without evaluating
73
56
  formulas and never mutates source-note properties.
@@ -333,8 +316,10 @@ Load `japanese-prose` through the host's skill-loading mechanism. When only
333
316
  installed skill files are exposed, resolve the sibling path
334
317
  `<tech-writer-dir>/../japanese-prose/SKILL.md` first, then check
335
318
  `.github/skills/japanese-prose/SKILL.md`,
319
+ `.claude/skills/japanese-prose/SKILL.md`,
336
320
  `.copilot/skills/japanese-prose/SKILL.md`, and
337
- `$HOME/.copilot/skills/japanese-prose/SKILL.md`. Load the discovered
321
+ `$HOME/.copilot/skills/japanese-prose/SKILL.md`, then
322
+ `$HOME/.claude/skills/japanese-prose/SKILL.md`. Load the discovered
338
323
  `SKILL.md` and follow its quick or full workflow. A standard
339
324
  `npx kotonoha install` installs this sibling skill automatically. Treat the
340
325
  pass as unavailable only when someone copied or installed tech-writer without
@@ -50,8 +50,10 @@ Never trade technical precision for conversational phrasing.
50
50
  skill-loading mechanism. If the host exposes only skill files, resolve
51
51
  `<tech-writer-dir>/../japanese-prose/SKILL.md` first, then check
52
52
  `.github/skills/japanese-prose/SKILL.md`,
53
+ `.claude/skills/japanese-prose/SKILL.md`,
53
54
  `.copilot/skills/japanese-prose/SKILL.md`, and
54
- `$HOME/.copilot/skills/japanese-prose/SKILL.md`; expand `$HOME`, load the
55
+ `$HOME/.copilot/skills/japanese-prose/SKILL.md`, then
56
+ `$HOME/.claude/skills/japanese-prose/SKILL.md`; expand `$HOME`, load the
55
57
  discovered skill,
56
58
  and follow its workflow.
57
59
  2. Ask the loaded skill to review and rewrite only the Japanese prose under