kotonoha 0.1.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/LICENSE +21 -0
- package/README.md +103 -0
- package/package.json +26 -0
- package/skills/tech-writer/SKILL.md +249 -0
- package/skills/tech-writer/assets/templates/design-doc.md +29 -0
- package/skills/tech-writer/assets/templates/pr-description.md +23 -0
- package/skills/tech-writer/assets/templates/readme.md +38 -0
- package/skills/tech-writer/assets/templates/user-manual.md +22 -0
- package/skills/tech-writer/references/doctypes/api-docs.md +33 -0
- package/skills/tech-writer/references/doctypes/code-comments.md +39 -0
- package/skills/tech-writer/references/doctypes/design-doc.md +42 -0
- package/skills/tech-writer/references/doctypes/pr-commit.md +82 -0
- package/skills/tech-writer/references/doctypes/qiita.md +68 -0
- package/skills/tech-writer/references/doctypes/readme.md +43 -0
- package/skills/tech-writer/references/doctypes/release-notes.md +30 -0
- package/skills/tech-writer/references/doctypes/user-manual.md +58 -0
- package/skills/tech-writer/references/doctypes/zenn.md +66 -0
- package/skills/tech-writer/references/style-constitution.md +89 -0
- package/skills/tech-writer/scripts/lint.py +371 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 nahisaho
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# kotonoha
|
|
2
|
+
|
|
3
|
+
kotonoha provides `tech-writer`, a GitHub Copilot CLI skill that helps
|
|
4
|
+
structure and polish technical documents. It covers README, design
|
|
5
|
+
docs/ADRs, API reference, PR descriptions/commit messages/issue reports,
|
|
6
|
+
release notes, user manuals/how-to guides, code comments, and Qiita/Zenn
|
|
7
|
+
articles, structured so readers never get lost.
|
|
8
|
+
|
|
9
|
+
## What tech-writer solves
|
|
10
|
+
|
|
11
|
+
Technical documents tend to have two separate problems: "is the prose
|
|
12
|
+
natural" and "does the structure have the right amount of information".
|
|
13
|
+
`tech-writer` specializes in the latter, leaving the former (sentence-level
|
|
14
|
+
naturalness, removing "AI smell") to a prose-polishing skill such as
|
|
15
|
+
[natural-japanese](https://github.com/coji/natural-japanese). With both
|
|
16
|
+
installed, lock down the structure with `tech-writer` first, then polish
|
|
17
|
+
Japanese prose with natural-japanese.
|
|
18
|
+
|
|
19
|
+
## What it does
|
|
20
|
+
|
|
21
|
+
- Create/review README, design docs/ADRs, API reference, PR
|
|
22
|
+
descriptions/commit messages/issue reports, release notes, user manuals,
|
|
23
|
+
code comments, and Qiita/Zenn articles
|
|
24
|
+
- Doctype-specific structure and checklists to guide writing
|
|
25
|
+
- `scripts/lint.py` for mechanical structural checks (heading-level skips,
|
|
26
|
+
code blocks missing a language tag, leftover placeholders, suspicious
|
|
27
|
+
links, etc.); pass `--atomic` for commit messages, PR descriptions, issue
|
|
28
|
+
reports, code comments, and single release-notes entries
|
|
29
|
+
- Markdown as the default format for every doctype, except a commit
|
|
30
|
+
message body (plain text by convention) and code comments/docstrings
|
|
31
|
+
(the target programming language's own syntax)
|
|
32
|
+
- Japanese as the primary target language, with English document support
|
|
33
|
+
|
|
34
|
+
## Setup
|
|
35
|
+
|
|
36
|
+
### Prerequisites
|
|
37
|
+
|
|
38
|
+
- GitHub Copilot CLI installed
|
|
39
|
+
- Python 3.9+ if you want to run the lint script (standard library only,
|
|
40
|
+
no extra install needed)
|
|
41
|
+
|
|
42
|
+
### Install
|
|
43
|
+
|
|
44
|
+
Inside this repository, the skill is already placed at
|
|
45
|
+
`.github/skills/tech-writer`, so no extra setup is needed to use it with
|
|
46
|
+
Copilot CLI here.
|
|
47
|
+
|
|
48
|
+
To use it in another project, copy the `skills/tech-writer` directory into
|
|
49
|
+
that repository's `.github/skills/`, `.claude/skills/`, or your global
|
|
50
|
+
`~/.copilot/skills/`.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cp -r skills/tech-writer /path/to/your-repo/.github/skills/tech-writer
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Ask Copilot for the document you need
|
|
57
|
+
|
|
58
|
+
Just ask for the document type you need in a Copilot CLI session, and it's
|
|
59
|
+
invoked automatically.
|
|
60
|
+
|
|
61
|
+
- "Write a README", "Review this design doc", "Write the PR description",
|
|
62
|
+
"Make this how-to guide clearer"
|
|
63
|
+
|
|
64
|
+
To run a quick structure-only diagnostic:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
uv run skills/tech-writer/scripts/lint.py --json path/to/document.md
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Without `uv`, `python3 skills/tech-writer/scripts/lint.py path/to/document.md`
|
|
71
|
+
works too (standard library only).
|
|
72
|
+
|
|
73
|
+
## Repository layout
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
skills/tech-writer/ # the skill itself
|
|
77
|
+
SKILL.md # skill definition
|
|
78
|
+
references/ # structure constitution + doctype rules/checklists
|
|
79
|
+
references/doctypes/ # README, design doc, API docs, PR/issue, release notes, manual, comments, Qiita/Zenn
|
|
80
|
+
scripts/lint.py # structural lint script
|
|
81
|
+
assets/templates/ # skeleton templates for the main doctypes
|
|
82
|
+
.github/skills/tech-writer # symlink to skills/tech-writer (where Copilot CLI reads it)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Known limitations
|
|
86
|
+
|
|
87
|
+
- `scripts/lint.py` only detects structural issues (headings, code blocks,
|
|
88
|
+
placeholders, links); it does not detect prose naturalness, vocabulary,
|
|
89
|
+
or rhythm.
|
|
90
|
+
- The doctypes are written mainly with Japanese technical-writing
|
|
91
|
+
conventions in mind; most of the guidance (especially the commit-message
|
|
92
|
+
imperative-mood rule) applies directly to English documents as well.
|
|
93
|
+
|
|
94
|
+
## Acknowledgment
|
|
95
|
+
|
|
96
|
+
- [natural-japanese](https://github.com/coji/natural-japanese) (MIT
|
|
97
|
+
License) — the design principle "machines detect, humans (or agents)
|
|
98
|
+
judge" and "prevent at generation time rather than fix afterward"
|
|
99
|
+
informed this project's design.
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
MIT. See [LICENSE](./LICENSE).
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kotonoha",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A GitHub Copilot CLI skill for structuring and polishing technical documents.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "nahisaho",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/nahisaho/kotonoha.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/nahisaho/kotonoha/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/nahisaho/kotonoha#readme",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"copilot",
|
|
17
|
+
"github-copilot",
|
|
18
|
+
"skill",
|
|
19
|
+
"technical-writing",
|
|
20
|
+
"documentation",
|
|
21
|
+
"markdown"
|
|
22
|
+
],
|
|
23
|
+
"files": [
|
|
24
|
+
"skills/"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tech-writer
|
|
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, and
|
|
7
|
+
Qiita/Zenn articles. Use for requests like "write a README", "draft a
|
|
8
|
+
design doc", "write this PR description", "clean up my commit message",
|
|
9
|
+
"make this how-to guide clearer", "write API docs", "summarize the release
|
|
10
|
+
notes", "write a Zenn article", "write this up for Qiita", as well as
|
|
11
|
+
Japanese-language equivalents (「READMEを書いて」「設計ドキュメントを作って」
|
|
12
|
+
「PRの説明文を書いて」「コミットメッセージを整えて」「手順書を分かりやすくして」
|
|
13
|
+
「APIドキュメントを整備して」「リリースノートをまとめて」「Zennの記事を書いて」
|
|
14
|
+
「Qiitaに投稿する記事を書いて」). Especially useful when
|
|
15
|
+
the request is a bare goal without enough context to start (e.g. "I want
|
|
16
|
+
to write a README" / "○○を書きたい"), since this skill drives a one
|
|
17
|
+
question-at-a-time intake before writing. Supports both Japanese and
|
|
18
|
+
English documents, with Japanese as the primary target for polished,
|
|
19
|
+
natural phrasing (pairing well with https://github.com/coji/natural-japanese
|
|
20
|
+
for sentence-level Japanese refinement). Does NOT handle sentence-level
|
|
21
|
+
naturalness, word choice, or rhythm ("AI smell" removal) — that is the
|
|
22
|
+
domain of natural-japanese and similar prose-polishing skills. This skill
|
|
23
|
+
is specific to a document's structure, information completeness, and
|
|
24
|
+
reader fit.
|
|
25
|
+
license: MIT
|
|
26
|
+
argument-hint: "[write|review|score] [doctype] <target file or request>"
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# tech-writer
|
|
30
|
+
|
|
31
|
+
Structures technical documents so readers reach the information they need
|
|
32
|
+
with the shortest path. Covers README, design docs/ADRs, API reference, PR
|
|
33
|
+
descriptions/commit messages/issue reports, release notes/CHANGELOG, user
|
|
34
|
+
manuals/how-to guides, code comments/docstrings, and Qiita/Zenn articles.
|
|
35
|
+
|
|
36
|
+
Default format: Markdown for every doctype in this skill, except a git
|
|
37
|
+
commit message body (plain text by convention — light "-" bullets are
|
|
38
|
+
fine, but don't add Markdown headings or fenced code there) and code
|
|
39
|
+
comments/docstrings (the target programming language's own comment/
|
|
40
|
+
docstring syntax). Qiita and Zenn use Markdown with a platform-specific
|
|
41
|
+
YAML frontmatter and a few platform extensions on top — see their doctype
|
|
42
|
+
reference files.
|
|
43
|
+
|
|
44
|
+
## Division of labor
|
|
45
|
+
|
|
46
|
+
Document quality splits into two layers: "is the structure right" and "is
|
|
47
|
+
the prose natural and readable". This skill owns the first layer (structure,
|
|
48
|
+
document type conventions, completeness, reader fit). The second layer
|
|
49
|
+
(sentence-level naturalness, removing "AI smell", rhythm) is out of scope and
|
|
50
|
+
belongs to a prose-polishing skill such as [natural-japanese](https://github.com/coji/natural-japanese).
|
|
51
|
+
When both skills are installed, use this skill to lock down the structure
|
|
52
|
+
first, then hand Japanese prose to natural-japanese for polish.
|
|
53
|
+
|
|
54
|
+
- Rule of thumb: "does removing a heading still make sense?" tests structure
|
|
55
|
+
(this skill's job). "Does rereading a single sentence change its meaning?"
|
|
56
|
+
tests prose (not this skill's job).
|
|
57
|
+
- Code comments/docstrings document code itself, but the same
|
|
58
|
+
structure-and-completeness framing still applies.
|
|
59
|
+
|
|
60
|
+
## Execution modes
|
|
61
|
+
|
|
62
|
+
Infer the mode from the argument or the request:
|
|
63
|
+
|
|
64
|
+
- `write` (default): new document, or restructuring a draft. Runs the full
|
|
65
|
+
§1–§4 workflow, starting with the intake loop in §1.
|
|
66
|
+
- `review`: structural review of an existing document. Does not rewrite;
|
|
67
|
+
reports the gap against the doctype checklist (§5).
|
|
68
|
+
- `score`: structure-only quick diagnostic. Runs
|
|
69
|
+
`scripts/lint.py --json <file>` and summarizes the findings (no rewrite).
|
|
70
|
+
|
|
71
|
+
If no mode is given, interpret "write/create" requests as `write`,
|
|
72
|
+
"fix/review" requests as `review`, and "how does this look?/diagnose"
|
|
73
|
+
requests as `score`.
|
|
74
|
+
|
|
75
|
+
## 1. Gather context — one question at a time, then act
|
|
76
|
+
|
|
77
|
+
Requests are often bare goals ("I want to write a README", "○○を書きたい")
|
|
78
|
+
without enough context to start. Do not front-load a long questionnaire or
|
|
79
|
+
hand the user a checklist to fill in. Instead:
|
|
80
|
+
|
|
81
|
+
1. **Determine the doctype first**, from the table below. If the request
|
|
82
|
+
itself doesn't make it clear, that ambiguity is your first question. If
|
|
83
|
+
the table maps the request to `pr-commit`, resolve the **subtype** —
|
|
84
|
+
commit message, PR description, bug report, or feature request — as
|
|
85
|
+
part of this same first question: `references/doctypes/pr-commit.md`
|
|
86
|
+
gives each a different skeleton and different musts, so don't proceed
|
|
87
|
+
past this doctype without knowing which one applies. Similarly, a bare
|
|
88
|
+
"write a tech blog post" request doesn't by itself say Qiita, Zenn, or
|
|
89
|
+
neither — ask which platform (or "no platform, just a plain document")
|
|
90
|
+
as part of this same first question.
|
|
91
|
+
2. Open the matching reference file and note its target reader and any
|
|
92
|
+
"settle before writing" items. Combined with the general musts below,
|
|
93
|
+
this is your information checklist — but never show it to the user as a
|
|
94
|
+
form.
|
|
95
|
+
3. **Ask exactly one question at a time**: pick the single most
|
|
96
|
+
information-gaining missing item, ask only that, and wait for the
|
|
97
|
+
answer before asking the next one. Never batch multiple questions into
|
|
98
|
+
one message.
|
|
99
|
+
4. Stop asking once you have, at minimum: (a) the reader, (b) the
|
|
100
|
+
one-sentence outcome the reader should reach after reading, (c) the
|
|
101
|
+
doctype (and subtype, for `pr-commit`), and (d) any doctype-specific
|
|
102
|
+
musts (e.g. the decision and alternatives for a design doc, the
|
|
103
|
+
prior-knowledge floor for a user manual, breaking-change status for
|
|
104
|
+
release notes, the related issue for a PR description or bug report).
|
|
105
|
+
5. **A "don't know" / "not applicable" / "no ticket for this" answer
|
|
106
|
+
satisfies a must — it is not a reason to keep asking.** Ask that must
|
|
107
|
+
at most once; if the answer is a non-answer, record it as a stated
|
|
108
|
+
assumption or an open question inside the document itself (design docs
|
|
109
|
+
already have an Open Questions section for this; for others, add a
|
|
110
|
+
one-line note) and move on.
|
|
111
|
+
6. **Once complete, do not ask the user to compose anything.** Synthesize
|
|
112
|
+
the gathered answers into the best possible generation approach yourself
|
|
113
|
+
and immediately continue into §2–§4 in the same turn to produce the
|
|
114
|
+
document. Skip further confirmation unless the doctype is release-facing
|
|
115
|
+
and consequential (e.g. a public release note with breaking changes) or
|
|
116
|
+
the user explicitly asked to see a plan first.
|
|
117
|
+
7. If the user already volunteered some of this information in the initial
|
|
118
|
+
request, skip the corresponding question — don't re-ask what's already
|
|
119
|
+
known.
|
|
120
|
+
|
|
121
|
+
| Request | doctype | reference file |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| README / project overview | readme | `references/doctypes/readme.md` |
|
|
124
|
+
| Design doc / ADR / RFC | design-doc | `references/doctypes/design-doc.md` |
|
|
125
|
+
| API reference | api-docs | `references/doctypes/api-docs.md` |
|
|
126
|
+
| PR description / commit message / issue report | pr-commit | `references/doctypes/pr-commit.md` |
|
|
127
|
+
| Release notes / CHANGELOG | release-notes | `references/doctypes/release-notes.md` |
|
|
128
|
+
| User manual / how-to guide / tutorial | user-manual | `references/doctypes/user-manual.md` |
|
|
129
|
+
| Code comments / docstrings | code-comments | `references/doctypes/code-comments.md` |
|
|
130
|
+
| Zenn article | zenn | `references/doctypes/zenn.md` |
|
|
131
|
+
| Qiita article | qiita | `references/doctypes/qiita.md` |
|
|
132
|
+
|
|
133
|
+
For technical documents that don't fit any of these, apply only the general
|
|
134
|
+
principles in `references/style-constitution.md`, using the same
|
|
135
|
+
one-question-at-a-time intake for reader and outcome.
|
|
136
|
+
|
|
137
|
+
## 2. Outline first for long documents
|
|
138
|
+
|
|
139
|
+
For documents likely to run long — design docs/ADRs, user manuals with
|
|
140
|
+
multiple steps, API references covering several endpoints, or anything the
|
|
141
|
+
user calls "long"/"detailed"/"comprehensive" — draft a table of contents
|
|
142
|
+
(heading outline) before writing any body prose.
|
|
143
|
+
|
|
144
|
+
1. Build the heading outline from the reader and outcome gathered in §1 and
|
|
145
|
+
the doctype's recommended skeleton (in its reference file).
|
|
146
|
+
2. **Review the outline from the reader's point of view before writing
|
|
147
|
+
further**: read only the headings, in order, as the reader identified in
|
|
148
|
+
§1 would. Check whether they can predict what they'll learn from each
|
|
149
|
+
section, whether the order matches how they'd naturally look for that
|
|
150
|
+
information, and whether following the outline gets them to the
|
|
151
|
+
§1 outcome. Reorder, merge, or split headings if not — this is cheaper
|
|
152
|
+
to fix in outline form than after the prose is written.
|
|
153
|
+
3. Only once the outline holds up under that reader-perspective read-through
|
|
154
|
+
should you write the body, section by section.
|
|
155
|
+
|
|
156
|
+
Skip this step for inherently short, atomic artifacts (a single commit
|
|
157
|
+
message, a short PR description, one new entry appended to an existing
|
|
158
|
+
release-notes/CHANGELOG file, a code comment/docstring) and draft directly
|
|
159
|
+
under §3 — see the scope note at the top of
|
|
160
|
+
`references/style-constitution.md`. This exception is about a single
|
|
161
|
+
*entry*, not the release-notes/CHANGELOG document as a whole: a CHANGELOG
|
|
162
|
+
being drafted or restructured from scratch is still a living, multi-section
|
|
163
|
+
document and needs the outline step below.
|
|
164
|
+
|
|
165
|
+
## 3. Write — under the structure constitution
|
|
166
|
+
|
|
167
|
+
For living, multi-section documents (README, design doc, API reference,
|
|
168
|
+
release notes, user manual, Zenn/Qiita article), write under the 8 rules
|
|
169
|
+
in `references/style-constitution.md`. Summary: state "what this is" and
|
|
170
|
+
"the outcome for the reader" in the first three lines; make headings
|
|
171
|
+
labels that preview content (not "Overview", but "Overview of what");
|
|
172
|
+
order steps as executed and put prerequisites before the steps; one
|
|
173
|
+
action per numbered step; put a concrete example or number right after
|
|
174
|
+
any abstract term; keep code examples minimal and runnable, marking
|
|
175
|
+
omissions explicitly; disclose known limitations and unsupported cases
|
|
176
|
+
instead of hiding them; and keep a last-updated date or target version
|
|
177
|
+
where staleness is a real risk. For Zenn/Qiita, rule 1's "first three
|
|
178
|
+
lines" maps to the frontmatter `title` plus the lead paragraph right
|
|
179
|
+
after it — see their doctype reference files for why there's no in-body
|
|
180
|
+
'#' title.
|
|
181
|
+
|
|
182
|
+
For atomic artifacts (commit messages, PR descriptions, issue reports,
|
|
183
|
+
code comments/docstrings, a single entry appended to an existing
|
|
184
|
+
release-notes/CHANGELOG file), follow their own skeleton in
|
|
185
|
+
`references/doctypes/pr-commit.md`, `references/doctypes/code-comments.md`,
|
|
186
|
+
or `references/doctypes/release-notes.md` instead — see the scope note in
|
|
187
|
+
`references/style-constitution.md` for why the 8 rules don't apply
|
|
188
|
+
verbatim there.
|
|
189
|
+
|
|
190
|
+
Sentence-level concerns — keeping individual sentences concise, avoiding
|
|
191
|
+
double negatives, not dropping the subject, and general naturalness — are
|
|
192
|
+
out of this skill's scope regardless of doctype. When natural-japanese (or
|
|
193
|
+
an equivalent prose-polishing skill) is available, hand Japanese prose to
|
|
194
|
+
it for that pass; otherwise apply ordinary careful-writing judgment, but
|
|
195
|
+
don't treat it as this skill's responsibility to enforce.
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## 4. Review — structural check
|
|
199
|
+
|
|
200
|
+
After writing, work through the following in order. For atomic artifacts
|
|
201
|
+
(commit message, PR description, issue report, code comment/docstring, a
|
|
202
|
+
single appended release-notes entry), steps 1 and 4 collapse into simply
|
|
203
|
+
re-reading the short artifact against its own doctype skeleton — treat
|
|
204
|
+
step 2 as the primary check for those.
|
|
205
|
+
|
|
206
|
+
1. **Skeleton read-through, from the reader's seat**: extract just the
|
|
207
|
+
headings and the first sentence of each section, and re-read them as the
|
|
208
|
+
§1 reader would — not as the author. Confirm the argument holds together
|
|
209
|
+
and nothing assumes knowledge that reader doesn't have yet. If not,
|
|
210
|
+
revisit how the headings are structured (for long documents, this is the
|
|
211
|
+
same lens as the §2 outline review, now applied to the finished prose).
|
|
212
|
+
2. **Doctype checklist**: compare against the checklist at the end of the
|
|
213
|
+
matching reference file.
|
|
214
|
+
3. **Structural lint**: where possible, run `uv run scripts/lint.py <file>`
|
|
215
|
+
(add `--atomic` for a commit message, PR description, issue report,
|
|
216
|
+
code comment/docstring, or a single release-notes entry) to
|
|
217
|
+
mechanically catch heading-level skips, code blocks missing a
|
|
218
|
+
language tag, leftover placeholders, and suspicious links. Findings
|
|
219
|
+
are flags, not mandates — deliberate exceptions can stay; note the reason
|
|
220
|
+
briefly.
|
|
221
|
+
4. **Reader-goal recheck**: confirm the "what the reader can do after
|
|
222
|
+
reading" outcome from §1 is actually achievable from this document alone.
|
|
223
|
+
|
|
224
|
+
## 5. Doctype checklist summary
|
|
225
|
+
|
|
226
|
+
See each reference file for detail. The items below are for living,
|
|
227
|
+
multi-section documents (README, design doc, API reference, release notes,
|
|
228
|
+
user manual, Zenn/Qiita article). Atomic artifacts (commit message, PR
|
|
229
|
+
description, issue report, code comment/docstring, a single appended
|
|
230
|
+
release-notes entry) are already covered by their own doctype checklist
|
|
231
|
+
via step 2 in §4 — these common items don't add extra requirements on top
|
|
232
|
+
of that. Common items to confirm:
|
|
233
|
+
|
|
234
|
+
- Do the first three lines convey the purpose and target reader?
|
|
235
|
+
- Does reading only the headings trace the whole document's flow?
|
|
236
|
+
- Are prerequisites/dependencies stated before the usage steps?
|
|
237
|
+
- Can code/command examples be copied and run as-is?
|
|
238
|
+
- Are known limitations/unsupported cases/caveats stated, not omitted?
|
|
239
|
+
- Where staleness is a real risk, is the version/last-updated date/target
|
|
240
|
+
branch stated?
|
|
241
|
+
|
|
242
|
+
## Acknowledgment
|
|
243
|
+
|
|
244
|
+
The idea of separating structure from prose comes from
|
|
245
|
+
[natural-japanese](https://github.com/coji/natural-japanese) (MIT License)
|
|
246
|
+
and its design principle "machines detect, humans (or agents) judge" and
|
|
247
|
+
"prevent at generation time rather than fix afterward". This skill extends
|
|
248
|
+
that separation to the structural side of technical documents, deliberately
|
|
249
|
+
leaving prose naturalness out of scope.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# <Noun phrase naming the decision>
|
|
2
|
+
|
|
3
|
+
<One-paragraph summary: the decision being proposed and why it matters now.>
|
|
4
|
+
|
|
5
|
+
- Status: Proposed / Accepted / Rejected / Superseded
|
|
6
|
+
- Date: <YYYY-MM-DD>
|
|
7
|
+
|
|
8
|
+
## Context
|
|
9
|
+
|
|
10
|
+
<Why this decision is needed now. State facts, not opinion>
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
|
|
14
|
+
<State what was chosen in one sentence, then the details>
|
|
15
|
+
|
|
16
|
+
## Alternatives considered
|
|
17
|
+
|
|
18
|
+
### Option A: <name>
|
|
19
|
+
|
|
20
|
+
<Description and why it was rejected>
|
|
21
|
+
|
|
22
|
+
## Consequences
|
|
23
|
+
|
|
24
|
+
- Gains: <...>
|
|
25
|
+
- Costs / trade-offs accepted: <...>
|
|
26
|
+
|
|
27
|
+
## Open questions
|
|
28
|
+
|
|
29
|
+
- <If any>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## What
|
|
2
|
+
|
|
3
|
+
<What changed, 1–3 sentences>
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
<Why it's needed. Related issue: #___>
|
|
8
|
+
|
|
9
|
+
## How
|
|
10
|
+
|
|
11
|
+
<Main design decisions. Implementation detail is left to the diff>
|
|
12
|
+
|
|
13
|
+
## How to verify
|
|
14
|
+
|
|
15
|
+
1. <Concrete steps the reviewer can use to reproduce>
|
|
16
|
+
|
|
17
|
+
## Impact / breaking changes
|
|
18
|
+
|
|
19
|
+
- <State explicitly if any; otherwise state "none">
|
|
20
|
+
|
|
21
|
+
## Remaining work
|
|
22
|
+
|
|
23
|
+
- <If any>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# <Project name>
|
|
2
|
+
|
|
3
|
+
<What this is, in one sentence>
|
|
4
|
+
|
|
5
|
+
## <The problem this project solves>
|
|
6
|
+
|
|
7
|
+
<Problem → approach, 2–4 sentences>
|
|
8
|
+
|
|
9
|
+
## What you can do
|
|
10
|
+
|
|
11
|
+
- <Feature 1 (start with a verb)>
|
|
12
|
+
- <Feature 2>
|
|
13
|
+
|
|
14
|
+
## Setup
|
|
15
|
+
|
|
16
|
+
### Prerequisites
|
|
17
|
+
|
|
18
|
+
- <Required versions, permissions, OS, etc.>
|
|
19
|
+
|
|
20
|
+
### Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
<Command(s) that run as copy-pasted>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## <Verb-first heading naming the smallest successful experience, e.g. "Generate your first README">
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
<Command/code showing the smallest successful experience>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Known limitations
|
|
33
|
+
|
|
34
|
+
- <What's not supported / caveats>
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
<License name>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# <What this guide gets you>
|
|
2
|
+
|
|
3
|
+
Target reader: <floor of prior knowledge assumed>
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- <Required permissions, environment, pre-installs>
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. <Action> — after running this, you'll see <state change>.
|
|
12
|
+
2. <Action> — after running this, you'll see <state change>.
|
|
13
|
+
|
|
14
|
+
## Completion check
|
|
15
|
+
|
|
16
|
+
<What should be displayed/generated to confirm success>
|
|
17
|
+
|
|
18
|
+
## Troubleshooting
|
|
19
|
+
|
|
20
|
+
| Symptom | Cause | Fix |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| <...> | <...> | <...> |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# API reference type
|
|
2
|
+
|
|
3
|
+
The recommended skeleton and checklist for endpoint/function-level
|
|
4
|
+
reference documentation, optimized for a developer who wants to get a
|
|
5
|
+
first call working.
|
|
6
|
+
|
|
7
|
+
## Target reader
|
|
8
|
+
|
|
9
|
+
A developer who wants to call this API from their own code. The goal is
|
|
10
|
+
"get the smallest request to succeed".
|
|
11
|
+
|
|
12
|
+
## Recommended skeleton (per endpoint/function)
|
|
13
|
+
|
|
14
|
+
1. **Signature**: the endpoint (method + path) or function signature first.
|
|
15
|
+
2. **One-sentence description**: what it does. State side effects (state
|
|
16
|
+
changes, billing, async processing) if any.
|
|
17
|
+
3. **Parameters**: a table (name, type, required/optional, default,
|
|
18
|
+
description). Include units (seconds/ms, bytes/KB) in the description.
|
|
19
|
+
4. **Request example**: a minimal, runnable code example (curl or the
|
|
20
|
+
target language). Mark credentials clearly as placeholders.
|
|
21
|
+
5. **Response example**: a real success example (actual sample values, not
|
|
22
|
+
just types).
|
|
23
|
+
6. **Errors / status codes**: a table (code, meaning, whether to retry).
|
|
24
|
+
7. **Rate limits / deprecation notices** (if applicable): don't omit.
|
|
25
|
+
|
|
26
|
+
## Checklist
|
|
27
|
+
|
|
28
|
+
- [ ] Does the request example run after just swapping in values (URL/token
|
|
29
|
+
fields clearly marked as placeholders)?
|
|
30
|
+
- [ ] Does the parameter table have a required/optional column?
|
|
31
|
+
- [ ] Does each error code say what the client should do about it?
|
|
32
|
+
- [ ] Do deprecated parameters/endpoints point to a migration path?
|
|
33
|
+
- [ ] Are units (time, size, currency) stated explicitly?
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Code comments / docstrings type
|
|
2
|
+
|
|
3
|
+
The principles and checklist for in-code documentation, where the same
|
|
4
|
+
"why, not what" and completeness discipline applies at the scale of a
|
|
5
|
+
single comment or docstring.
|
|
6
|
+
|
|
7
|
+
## Target reader
|
|
8
|
+
|
|
9
|
+
Whoever changes this code next (including your future self). The goal is
|
|
10
|
+
to convey "why it's written this way" — the "what" should be conveyed by
|
|
11
|
+
the code itself.
|
|
12
|
+
|
|
13
|
+
## Principles
|
|
14
|
+
|
|
15
|
+
1. **Write "why", not "what"**: don't repeat in a comment what the code
|
|
16
|
+
already shows. Explain why this implementation/ordering/exception
|
|
17
|
+
handling is necessary.
|
|
18
|
+
2. **Write docstrings from the caller's perspective**: order arguments,
|
|
19
|
+
return values, exceptions, and side effects by what the *caller* wants
|
|
20
|
+
to know, not by internal implementation order.
|
|
21
|
+
3. **Give `TODO`/`FIXME` a reason and, if possible, an issue link**:
|
|
22
|
+
`TODO: fix later` carries zero information. Write
|
|
23
|
+
`TODO(#123): running synchronously, async pending queue rollout`
|
|
24
|
+
instead.
|
|
25
|
+
4. **Don't write comments that state the obvious**: delete comments like
|
|
26
|
+
`i += 1 # increment i by 1`.
|
|
27
|
+
5. **Only comment on non-obvious choices**: implementations that look like
|
|
28
|
+
a detour, special code for performance reasons, or external constraints
|
|
29
|
+
(API quirks, past-bug workarounds) must always get a comment.
|
|
30
|
+
|
|
31
|
+
## Checklist
|
|
32
|
+
|
|
33
|
+
- [ ] Are there redundant comments left where the code's intent is clear
|
|
34
|
+
even without them?
|
|
35
|
+
- [ ] Do non-obvious implementations have their reasoning explained?
|
|
36
|
+
- [ ] Is docstring argument order driven by the caller's concerns rather
|
|
37
|
+
than internal variable order?
|
|
38
|
+
- [ ] Do `TODO`/`FIXME` items have a reason or a tracking reference
|
|
39
|
+
(issue number, etc.)?
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Design doc / ADR / RFC type
|
|
2
|
+
|
|
3
|
+
The recommended skeleton and checklist for a design decision record: a
|
|
4
|
+
document meant to earn a reviewer's agreement now and explain the "why" to
|
|
5
|
+
someone reading it long after the decision was made.
|
|
6
|
+
|
|
7
|
+
## Target reader
|
|
8
|
+
|
|
9
|
+
Someone reviewing to reach a decision, or someone later tracing the history
|
|
10
|
+
of that decision. The goal is "consensus" or "record", not a how-to guide
|
|
11
|
+
for implementation.
|
|
12
|
+
|
|
13
|
+
## Recommended skeleton (ADR format)
|
|
14
|
+
|
|
15
|
+
1. **Title**: a noun phrase naming the decision (e.g. "Adopt Redis for the
|
|
16
|
+
async job queue").
|
|
17
|
+
2. **Status**: Proposed / Accepted / Rejected / Superseded — state one.
|
|
18
|
+
3. **Context**: why this decision is needed now. State the current
|
|
19
|
+
constraints as facts, separate from opinion.
|
|
20
|
+
4. **Decision**: say what was chosen in one sentence first, then the
|
|
21
|
+
details.
|
|
22
|
+
5. **Alternatives considered**: keep at least one, including why it was
|
|
23
|
+
rejected. Prevents future re-litigation of "why not A".
|
|
24
|
+
6. **Consequences**: not just the upside — include the costs/constraints
|
|
25
|
+
accepted.
|
|
26
|
+
7. **Open questions** (optional): leave unresolved points during review.
|
|
27
|
+
|
|
28
|
+
## Design doc (RFC format, pre-implementation) specifics
|
|
29
|
+
|
|
30
|
+
- Stating "what we will *not* build" (Non-Goals) before "what we will build"
|
|
31
|
+
keeps review discussion from drifting.
|
|
32
|
+
- If there are diagrams (sequence/architecture), make the diagram carry the
|
|
33
|
+
primary information; keep the prose as supporting detail only.
|
|
34
|
+
|
|
35
|
+
## Checklist
|
|
36
|
+
|
|
37
|
+
- [ ] Is the decision stated in one sentence up front?
|
|
38
|
+
- [ ] Are alternatives and their rejection reasons present (not written as
|
|
39
|
+
"the only option")?
|
|
40
|
+
- [ ] Are trade-offs (what's given up) stated explicitly?
|
|
41
|
+
- [ ] Are Non-Goals stated (for RFCs)?
|
|
42
|
+
- [ ] Does the status reflect the current state?
|