kotonoha 0.1.2 → 0.1.5-dev.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 +36 -0
- package/README.md +126 -25
- package/bin/kotonoha.js +81 -13
- package/bin/npm-publish-tag.js +12 -0
- package/package.json +7 -3
- package/skills/presentation-planner/SKILL.md +243 -0
- package/skills/presentation-planner/assets/design-templates/data-report.yaml +97 -0
- package/skills/presentation-planner/assets/design-templates/executive-proposal.yaml +92 -0
- package/skills/presentation-planner/assets/design-templates/technical-briefing.yaml +96 -0
- package/skills/presentation-planner/assets/scenario-templates/data-report.md +47 -0
- package/skills/presentation-planner/assets/scenario-templates/executive-decision.md +43 -0
- package/skills/presentation-planner/assets/scenario-templates/technical-briefing.md +45 -0
- package/skills/presentation-planner/references/customizing-design-templates.md +160 -0
- package/skills/presentation-planner/references/design-spec-schema.md +72 -0
- package/skills/presentation-planner/references/handoff-contract.md +49 -0
- package/skills/presentation-planner/references/responsibility-boundary.md +32 -0
- package/skills/presentation-planner/references/scenario-templates.md +55 -0
- package/skills/tech-writer/SKILL.md +147 -46
- package/skills/tech-writer/assets/templates/migration-plan.md +173 -0
- package/skills/tech-writer/assets/templates/operations-runbook.md +202 -0
- package/skills/tech-writer/assets/templates/requirements-definition.md +170 -0
- package/skills/tech-writer/assets/templates/rfi.md +113 -0
- package/skills/tech-writer/assets/templates/rfp.md +180 -0
- package/skills/tech-writer/assets/templates/security-design.md +167 -0
- package/skills/tech-writer/assets/templates/system-design.md +220 -0
- package/skills/tech-writer/assets/templates/technical-proposal.md +112 -0
- package/skills/tech-writer/assets/templates/test-plan.md +153 -0
- package/skills/tech-writer/references/doctypes/migration-plan.md +63 -0
- package/skills/tech-writer/references/doctypes/operations-runbook.md +63 -0
- package/skills/tech-writer/references/doctypes/requirements-definition.md +61 -0
- package/skills/tech-writer/references/doctypes/rfi.md +43 -0
- package/skills/tech-writer/references/doctypes/rfp.md +46 -0
- package/skills/tech-writer/references/doctypes/security-design.md +71 -0
- package/skills/tech-writer/references/doctypes/system-design.md +74 -0
- package/skills/tech-writer/references/doctypes/technical-proposal.md +49 -0
- package/skills/tech-writer/references/doctypes/test-plan.md +67 -0
- package/skills/tech-writer/references/japanese-prose-optimization.md +108 -0
- package/skills/tech-writer/references/style-constitution.md +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,40 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Add a guarded Japanese prose-optimization handoff to `natural-japanese` or
|
|
13
|
+
an equivalent registered skill, with invariant preservation, bounded
|
|
14
|
+
convergence, structural revalidation, and explicit completion statuses.
|
|
15
|
+
|
|
16
|
+
## [0.1.4] - 2026-09-29
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Add Japanese requirements-definition and system-design templates with
|
|
21
|
+
doctype routing, responsibility boundaries, traceability, and review
|
|
22
|
+
checklists.
|
|
23
|
+
- Add Japanese test-plan, operations-runbook, migration-plan, and
|
|
24
|
+
security-design/threat-model templates with dedicated doctype guidance
|
|
25
|
+
and review checklists.
|
|
26
|
+
- Add the `presentation-planner` skill for presentation requirements,
|
|
27
|
+
storyline, slide outlines, design specifications, and PPTX-skill handoff.
|
|
28
|
+
- Add executive decision, technical briefing, and data report presentation
|
|
29
|
+
scenario templates plus a `presentation-scenario.md` planning artifact.
|
|
30
|
+
- Add executive proposal, technical briefing, and data report design
|
|
31
|
+
specifications in YAML.
|
|
32
|
+
- Standardize presentation designs on white backgrounds with Microsoft
|
|
33
|
+
corporate colors and accessible dark semantic text colors.
|
|
34
|
+
- Add a guide for adapting design specifications and adding reusable
|
|
35
|
+
presentation templates.
|
|
36
|
+
- Add multi-skill installation with `kotonoha install --skill <name|all>`.
|
|
37
|
+
- Add Japanese templates for technical proposals, requests for information
|
|
38
|
+
(RFI), and requests for proposal (RFP).
|
|
39
|
+
- Add doctype routing, writing guidance, and checklists for the three new
|
|
40
|
+
templates.
|
|
41
|
+
|
|
8
42
|
## [0.1.2] - 2026-09-29
|
|
9
43
|
|
|
10
44
|
### Added
|
|
@@ -45,3 +79,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
45
79
|
[0.1.2]: https://github.com/nahisaho/kotonoha/compare/v0.1.1...v0.1.2
|
|
46
80
|
[0.1.1]: https://github.com/nahisaho/kotonoha/compare/v0.1.0...v0.1.1
|
|
47
81
|
[0.1.0]: https://github.com/nahisaho/kotonoha/releases/tag/v0.1.0
|
|
82
|
+
[0.1.4]: https://github.com/nahisaho/kotonoha/compare/v0.1.2...v0.1.4
|
|
83
|
+
[Unreleased]: https://github.com/nahisaho/kotonoha/compare/v0.1.4...HEAD
|
package/README.md
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
# kotonoha
|
|
2
2
|
|
|
3
|
-
kotonoha provides
|
|
4
|
-
|
|
3
|
+
kotonoha provides GitHub Copilot CLI skills for technical documents and
|
|
4
|
+
presentation planning. `tech-writer` helps structure and polish README, design
|
|
5
5
|
docs/ADRs, API reference, PR descriptions/commit messages/issue reports,
|
|
6
|
-
release notes, user manuals/how-to guides, code comments,
|
|
7
|
-
|
|
6
|
+
release notes, user manuals/how-to guides, code comments, requirements
|
|
7
|
+
definitions, system designs, test plans, operations runbooks, migration plans,
|
|
8
|
+
security designs, technical proposals, RFI/RFP procurement documents, and
|
|
9
|
+
Qiita/Zenn articles,
|
|
10
|
+
structured so readers never get lost. `presentation-planner` turns source
|
|
11
|
+
material into a reusable presentation scenario, slide outline, design
|
|
12
|
+
specification, and handoff for a dedicated PPTX creation skill.
|
|
8
13
|
|
|
9
14
|
## What tech-writer solves
|
|
10
15
|
|
|
11
16
|
Technical documents tend to have two separate problems: "is the prose
|
|
12
17
|
natural" and "does the structure have the right amount of information".
|
|
13
|
-
`tech-writer` specializes in the latter
|
|
14
|
-
naturalness,
|
|
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
|
|
15
21
|
[natural-japanese](https://github.com/coji/natural-japanese). With both
|
|
16
|
-
installed,
|
|
17
|
-
Japanese prose
|
|
22
|
+
installed, kotonoha locks the structure and technical invariants, invokes the
|
|
23
|
+
Japanese prose pass, then rechecks the structure before rubber-duck review.
|
|
18
24
|
|
|
19
25
|
## What it does
|
|
20
26
|
|
|
21
27
|
- Create/review README, design docs/ADRs, API reference, PR
|
|
22
28
|
descriptions/commit messages/issue reports, release notes, user manuals,
|
|
23
|
-
code comments,
|
|
29
|
+
code comments, requirements definitions, system designs, test plans,
|
|
30
|
+
operations runbooks, migration plans, security designs, technical proposals,
|
|
31
|
+
RFI/RFP procurement documents, and Qiita/Zenn articles
|
|
24
32
|
- 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
|
|
25
36
|
- Iterative rubber-duck review after document creation, with fixes and
|
|
26
37
|
re-review until no actionable findings remain; unavailable reviews are
|
|
27
38
|
reported as `review not performed`, while unresolved review loops are
|
|
@@ -35,6 +46,49 @@ Japanese prose with natural-japanese.
|
|
|
35
46
|
(the target programming language's own syntax)
|
|
36
47
|
- Japanese as the primary target language, with English document support
|
|
37
48
|
|
|
49
|
+
## Supported document types
|
|
50
|
+
|
|
51
|
+
| Document type | Examples | Doctype |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| Project overview | README | `readme` |
|
|
54
|
+
| Design decision | Design doc, ADR, RFC | `design-doc` |
|
|
55
|
+
| Requirements definition | 要件定義書, functional and non-functional requirements | `requirements-definition` |
|
|
56
|
+
| System design | システム設計書, architecture and detailed system design | `system-design` |
|
|
57
|
+
| Test planning | テスト計画書, test strategy and acceptance evidence | `test-plan` |
|
|
58
|
+
| Operations | 運用設計書, operations runbook, incident procedures | `operations-runbook` |
|
|
59
|
+
| Migration | 移行計画書, data and system cutover plan | `migration-plan` |
|
|
60
|
+
| Security | セキュリティ設計書, threat model | `security-design` |
|
|
61
|
+
| API reference | REST API, events, SDK reference | `api-docs` |
|
|
62
|
+
| Development workflow text | PR description, commit message, bug report, feature request | `pr-commit` |
|
|
63
|
+
| Release documentation | Release notes, CHANGELOG | `release-notes` |
|
|
64
|
+
| User guidance | User manual, how-to guide, tutorial | `user-manual` |
|
|
65
|
+
| Source documentation | Code comments, docstrings | `code-comments` |
|
|
66
|
+
| Internal technical proposal | Architecture, investment, and delivery proposal | `technical-proposal` |
|
|
67
|
+
| Request for information | RFI | `rfi` |
|
|
68
|
+
| Request for proposal | RFP | `rfp` |
|
|
69
|
+
| Technical article | Zenn article | `zenn` |
|
|
70
|
+
| Technical article | Qiita article | `qiita` |
|
|
71
|
+
|
|
72
|
+
Reusable templates are included for README, design decisions, user manuals,
|
|
73
|
+
PR descriptions, requirements definitions, system designs, test plans,
|
|
74
|
+
operations runbooks, migration plans, security designs, technical proposals,
|
|
75
|
+
RFI, and RFP documents. Every supported doctype includes dedicated structure
|
|
76
|
+
guidance and a review checklist under
|
|
77
|
+
`skills/tech-writer/references/doctypes/`.
|
|
78
|
+
|
|
79
|
+
## What presentation-planner does
|
|
80
|
+
|
|
81
|
+
- Defines the audience, decision, call to action, and presentation constraints
|
|
82
|
+
- Produces a brief, audience-reasoning scenario, assertion-title slide outline,
|
|
83
|
+
YAML design specification, and deterministic handoff for the host's PPTX
|
|
84
|
+
creation skill
|
|
85
|
+
- Includes executive decision, technical briefing, and data report scenario
|
|
86
|
+
templates
|
|
87
|
+
- Includes executive proposal, technical briefing, and data report design
|
|
88
|
+
specifications
|
|
89
|
+
- Delegates `.pptx` generation, binary editing, rendering, and visual QA to
|
|
90
|
+
the dedicated PPTX skill instead of duplicating it
|
|
91
|
+
|
|
38
92
|
## Setup
|
|
39
93
|
|
|
40
94
|
### Prerequisites
|
|
@@ -42,46 +96,78 @@ Japanese prose with natural-japanese.
|
|
|
42
96
|
- GitHub Copilot CLI installed
|
|
43
97
|
- Python 3.9+ if you want to run the lint script (standard library only,
|
|
44
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
|
|
45
101
|
|
|
46
102
|
### Install from npm
|
|
47
103
|
|
|
48
|
-
Install the package, then copy
|
|
49
|
-
the included CLI:
|
|
104
|
+
Install the package, then copy all packaged skills into a skill directory
|
|
105
|
+
with the included CLI:
|
|
50
106
|
|
|
51
107
|
```bash
|
|
52
108
|
npm install --save-dev kotonoha
|
|
53
109
|
npx kotonoha install
|
|
54
110
|
```
|
|
55
111
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
112
|
+
For Japanese sentence-level optimization, also install
|
|
113
|
+
`natural-japanese` using one of its supported installation methods:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npx skills add coji/natural-japanese
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Ensure the installed skill is visible to Copilot CLI in the same registered
|
|
120
|
+
skill root used by this project, such as
|
|
121
|
+
`.github/skills/natural-japanese` or
|
|
122
|
+
`~/.copilot/skills/natural-japanese`. If the command installs it for a
|
|
123
|
+
different host, follow the upstream alternative installation instructions
|
|
124
|
+
and place or link the skill into a Copilot-visible skill directory.
|
|
125
|
+
|
|
126
|
+
If no compatible Japanese prose-polishing skill is registered, kotonoha
|
|
127
|
+
finishes the structural workflow and reports
|
|
128
|
+
`Japanese prose optimization not performed` instead of claiming that the
|
|
129
|
+
prose was optimized.
|
|
130
|
+
|
|
131
|
+
The default destinations are `.github/skills/tech-writer` and
|
|
132
|
+
`.github/skills/presentation-planner` in the current project. To install
|
|
133
|
+
only one skill, or use another supported skill directory:
|
|
59
134
|
|
|
60
135
|
```bash
|
|
136
|
+
npx kotonoha install --skill presentation-planner
|
|
61
137
|
npx kotonoha install --target .claude/skills
|
|
62
138
|
npx kotonoha install --target ~/.copilot/skills
|
|
63
139
|
```
|
|
64
140
|
|
|
65
|
-
|
|
66
|
-
or back up the existing installation, then pass
|
|
67
|
-
intend to replace
|
|
141
|
+
An explicit `--skill <name>` install refuses to overwrite that existing
|
|
142
|
+
skill directory. Review or back up the existing installation, then pass
|
|
143
|
+
`--force` only when you intend to replace the selected skills:
|
|
68
144
|
|
|
69
145
|
```bash
|
|
70
146
|
npx kotonoha install --force
|
|
71
147
|
```
|
|
72
148
|
|
|
149
|
+
When installing all skills, existing skill directories are skipped and only
|
|
150
|
+
missing skills are added. This makes upgrading from a tech-writer-only
|
|
151
|
+
installation safe:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npx kotonoha install
|
|
155
|
+
# Skipped tech-writer (...)
|
|
156
|
+
# Installed presentation-planner (...)
|
|
157
|
+
```
|
|
158
|
+
|
|
73
159
|
### Install from a source checkout
|
|
74
160
|
|
|
75
|
-
Inside this repository, the
|
|
76
|
-
|
|
77
|
-
Copilot CLI here.
|
|
161
|
+
Inside this repository, the skills are linked under `.github/skills/`, so no
|
|
162
|
+
extra setup is needed to use them with Copilot CLI here.
|
|
78
163
|
|
|
79
|
-
To use
|
|
80
|
-
that repository's `.github/skills/`, `.claude/skills/`, or your global
|
|
164
|
+
To use a skill from a source checkout in another project, copy its directory
|
|
165
|
+
into that repository's `.github/skills/`, `.claude/skills/`, or your global
|
|
81
166
|
`~/.copilot/skills/`.
|
|
82
167
|
|
|
83
168
|
```bash
|
|
84
169
|
cp -r skills/tech-writer /path/to/your-repo/.github/skills/tech-writer
|
|
170
|
+
cp -r skills/presentation-planner /path/to/your-repo/.github/skills/presentation-planner
|
|
85
171
|
```
|
|
86
172
|
|
|
87
173
|
## Ask Copilot for the document you need
|
|
@@ -91,6 +177,10 @@ invoked automatically.
|
|
|
91
177
|
|
|
92
178
|
- "Write a README", "Review this design doc", "Write the PR description",
|
|
93
179
|
"Make this how-to guide clearer"
|
|
180
|
+
- "要件定義書を作って", "承認済み要件からシステム設計書を書いて",
|
|
181
|
+
"移行計画とRunbookを作って"
|
|
182
|
+
- "Create a PPTX from this proposal", "Plan an executive presentation",
|
|
183
|
+
"Design a technical briefing deck"
|
|
94
184
|
|
|
95
185
|
To run a quick structure-only diagnostic:
|
|
96
186
|
|
|
@@ -107,20 +197,31 @@ works too (standard library only).
|
|
|
107
197
|
skills/tech-writer/ # the skill itself
|
|
108
198
|
SKILL.md # skill definition
|
|
109
199
|
references/ # structure constitution + doctype rules/checklists
|
|
110
|
-
references/doctypes/ # README, design
|
|
200
|
+
references/doctypes/ # README, requirements/design/test/operations/migration/security, API docs, PR/issue, release notes, proposals, RFI/RFP, Qiita/Zenn
|
|
111
201
|
scripts/lint.py # structural lint script
|
|
112
|
-
assets/templates/ #
|
|
202
|
+
assets/templates/ # doctype skeletons including requirements, design, test, operations, migration, security, and procurement
|
|
203
|
+
skills/presentation-planner/ # storyline, design-spec, and PPTX handoff skill
|
|
204
|
+
SKILL.md
|
|
205
|
+
references/ # boundary, scenario/design guidance, customization, handoff contract
|
|
206
|
+
assets/scenario-templates/ # executive, technical, and data-report narrative scenarios
|
|
207
|
+
assets/design-templates/ # executive, technical, and data-report YAML designs
|
|
113
208
|
.github/skills/tech-writer # symlink to skills/tech-writer (where Copilot CLI reads it)
|
|
209
|
+
.github/skills/presentation-planner
|
|
114
210
|
```
|
|
115
211
|
|
|
116
212
|
## Known limitations
|
|
117
213
|
|
|
118
214
|
- `scripts/lint.py` only detects structural issues (headings, code blocks,
|
|
119
215
|
placeholders, links); it does not detect prose naturalness, vocabulary,
|
|
120
|
-
or rhythm.
|
|
216
|
+
or rhythm by itself. Those checks require a registered prose-polishing
|
|
217
|
+
skill such as `natural-japanese`.
|
|
121
218
|
- The doctypes are written mainly with Japanese technical-writing
|
|
122
219
|
conventions in mind; most of the guidance (especially the commit-message
|
|
123
220
|
imperative-mood rule) applies directly to English documents as well.
|
|
221
|
+
- `presentation-planner` does not create or validate `.pptx` binaries by
|
|
222
|
+
itself; a dedicated PPTX skill is required for generation and visual QA.
|
|
223
|
+
- Design customization is documented in
|
|
224
|
+
`skills/presentation-planner/references/customizing-design-templates.md`.
|
|
124
225
|
|
|
125
226
|
## Acknowledgment
|
|
126
227
|
|
package/bin/kotonoha.js
CHANGED
|
@@ -7,11 +7,12 @@ const packageJson = require("../package.json");
|
|
|
7
7
|
|
|
8
8
|
function printUsage() {
|
|
9
9
|
console.log(`Usage:
|
|
10
|
-
kotonoha install [--target <directory>] [--force]
|
|
10
|
+
kotonoha install [--target <directory>] [--skill <name|all>] [--force]
|
|
11
11
|
|
|
12
12
|
Options:
|
|
13
13
|
--target <directory> Skill directory root (default: .github/skills)
|
|
14
|
-
--
|
|
14
|
+
--skill <name|all> Skill to install (default: all)
|
|
15
|
+
--force Replace existing selected skill installations
|
|
15
16
|
--help Show this help
|
|
16
17
|
--version Show the installed kotonoha version`);
|
|
17
18
|
}
|
|
@@ -23,6 +24,7 @@ function fail(message) {
|
|
|
23
24
|
|
|
24
25
|
function parseInstallOptions(args) {
|
|
25
26
|
let target = ".github/skills";
|
|
27
|
+
let skill = "all";
|
|
26
28
|
let force = false;
|
|
27
29
|
|
|
28
30
|
for (let index = 0; index < args.length; index += 1) {
|
|
@@ -43,6 +45,25 @@ function parseInstallOptions(args) {
|
|
|
43
45
|
continue;
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
if (argument === "--skill") {
|
|
49
|
+
const value = args[index + 1];
|
|
50
|
+
if (!value || value.startsWith("--")) {
|
|
51
|
+
throw new Error("--skill requires a skill name or all");
|
|
52
|
+
}
|
|
53
|
+
skill = value;
|
|
54
|
+
index += 1;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (argument.startsWith("--skill=")) {
|
|
59
|
+
const value = argument.slice("--skill=".length);
|
|
60
|
+
if (!value) {
|
|
61
|
+
throw new Error("--skill requires a skill name or all");
|
|
62
|
+
}
|
|
63
|
+
skill = value;
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
|
|
46
67
|
if (argument.startsWith("--target=")) {
|
|
47
68
|
const value = argument.slice("--target=".length);
|
|
48
69
|
if (!value) {
|
|
@@ -55,7 +76,7 @@ function parseInstallOptions(args) {
|
|
|
55
76
|
throw new Error(`unknown option: ${argument}`);
|
|
56
77
|
}
|
|
57
78
|
|
|
58
|
-
return { target, force };
|
|
79
|
+
return { target, skill, force };
|
|
59
80
|
}
|
|
60
81
|
|
|
61
82
|
function install(args) {
|
|
@@ -67,28 +88,75 @@ function install(args) {
|
|
|
67
88
|
return;
|
|
68
89
|
}
|
|
69
90
|
|
|
70
|
-
const
|
|
91
|
+
const skillsRoot = path.resolve(__dirname, "..", "skills");
|
|
71
92
|
const targetRoot = path.resolve(process.cwd(), options.target);
|
|
72
|
-
const destination = path.join(targetRoot, "tech-writer");
|
|
73
93
|
|
|
74
|
-
if (!fs.existsSync(
|
|
75
|
-
fail(`packaged
|
|
94
|
+
if (!fs.existsSync(skillsRoot)) {
|
|
95
|
+
fail(`packaged skills not found at ${skillsRoot}`);
|
|
76
96
|
return;
|
|
77
97
|
}
|
|
78
98
|
|
|
79
|
-
|
|
80
|
-
|
|
99
|
+
const availableSkills = fs
|
|
100
|
+
.readdirSync(skillsRoot, { withFileTypes: true })
|
|
101
|
+
.filter(
|
|
102
|
+
(entry) =>
|
|
103
|
+
entry.isDirectory() &&
|
|
104
|
+
fs.existsSync(path.join(skillsRoot, entry.name, "SKILL.md")),
|
|
105
|
+
)
|
|
106
|
+
.map((entry) => entry.name)
|
|
107
|
+
.sort();
|
|
108
|
+
const selectedSkills =
|
|
109
|
+
options.skill === "all" ? availableSkills : [options.skill];
|
|
110
|
+
const installAll = options.skill === "all";
|
|
111
|
+
|
|
112
|
+
for (const skill of selectedSkills) {
|
|
113
|
+
if (!availableSkills.includes(skill)) {
|
|
81
114
|
fail(
|
|
82
|
-
|
|
115
|
+
`unknown skill: ${skill}; available skills: ${availableSkills.join(", ")}`,
|
|
83
116
|
);
|
|
84
117
|
return;
|
|
85
118
|
}
|
|
86
|
-
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const existingDestinations = selectedSkills
|
|
122
|
+
.map((skill) => path.join(targetRoot, skill))
|
|
123
|
+
.filter((destination) => fs.existsSync(destination));
|
|
124
|
+
|
|
125
|
+
if (existingDestinations.length > 0 && !options.force && !installAll) {
|
|
126
|
+
fail(
|
|
127
|
+
`${existingDestinations.join(", ")} already exists; rerun with --force to replace selected skills`,
|
|
128
|
+
);
|
|
129
|
+
return;
|
|
87
130
|
}
|
|
88
131
|
|
|
89
132
|
fs.mkdirSync(targetRoot, { recursive: true });
|
|
90
|
-
|
|
91
|
-
|
|
133
|
+
for (const skill of selectedSkills) {
|
|
134
|
+
const source = path.join(skillsRoot, skill);
|
|
135
|
+
const destination = path.join(targetRoot, skill);
|
|
136
|
+
if (fs.existsSync(destination) && !options.force) {
|
|
137
|
+
console.log(
|
|
138
|
+
`Skipped ${skill} (${destination} already exists; use --force to replace)`,
|
|
139
|
+
);
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const temporaryDestination = path.join(
|
|
144
|
+
targetRoot,
|
|
145
|
+
`.kotonoha-${skill}-${process.pid}-${Date.now()}`,
|
|
146
|
+
);
|
|
147
|
+
try {
|
|
148
|
+
fs.cpSync(source, temporaryDestination, { recursive: true });
|
|
149
|
+
if (options.force) {
|
|
150
|
+
fs.rmSync(destination, { recursive: true, force: true });
|
|
151
|
+
}
|
|
152
|
+
fs.renameSync(temporaryDestination, destination);
|
|
153
|
+
} catch (error) {
|
|
154
|
+
fs.rmSync(temporaryDestination, { recursive: true, force: true });
|
|
155
|
+
fail(`failed to install ${skill}: ${error.message}`);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
console.log(`Installed ${skill} to ${destination}`);
|
|
159
|
+
}
|
|
92
160
|
}
|
|
93
161
|
|
|
94
162
|
const [command, ...args] = process.argv.slice(2);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function publishTagForVersion(version) {
|
|
4
|
+
return version.includes("-") ? "next" : "latest";
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
if (require.main === module) {
|
|
8
|
+
const { version } = require("../package.json");
|
|
9
|
+
process.stdout.write(`${publishTagForVersion(version)}\n`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
module.exports = { publishTagForVersion };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kotonoha",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.5-dev.0",
|
|
4
|
+
"description": "GitHub Copilot CLI skills for technical writing and PPTX presentation planning.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "nahisaho",
|
|
7
7
|
"repository": {
|
|
@@ -27,7 +27,11 @@
|
|
|
27
27
|
"skill",
|
|
28
28
|
"technical-writing",
|
|
29
29
|
"documentation",
|
|
30
|
-
"markdown"
|
|
30
|
+
"markdown",
|
|
31
|
+
"presentation",
|
|
32
|
+
"pptx",
|
|
33
|
+
"powerpoint",
|
|
34
|
+
"slides"
|
|
31
35
|
],
|
|
32
36
|
"files": [
|
|
33
37
|
"CHANGELOG.md",
|