kotonoha 0.1.6-dev.0 → 0.3.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README-ja.md +307 -0
  3. package/README.md +161 -59
  4. package/package.json +11 -4
  5. package/skills/consulting-analyst/SKILL.md +241 -0
  6. package/skills/consulting-analyst/assets/templates/analysis-brief.md +58 -0
  7. package/skills/consulting-analyst/assets/templates/decision-analysis.md +62 -0
  8. package/skills/consulting-analyst/assets/templates/hypothesis-evidence-ledger.md +48 -0
  9. package/skills/consulting-analyst/assets/templates/issue-tree.md +35 -0
  10. package/skills/consulting-analyst/assets/templates/synthesis-handoff.md +68 -0
  11. package/skills/consulting-analyst/references/evidence-and-hypotheses.md +80 -0
  12. package/skills/consulting-analyst/references/framework-selection.md +84 -0
  13. package/skills/consulting-analyst/references/handoff-contract.md +90 -0
  14. package/skills/japanese-prose/NOTICE.md +17 -0
  15. package/skills/japanese-prose/SKILL.md +111 -0
  16. package/skills/japanese-prose/references/review-workflow.md +50 -0
  17. package/skills/japanese-prose/references/scoring.md +24 -0
  18. package/skills/japanese-prose/references/writing-guidelines.md +60 -0
  19. package/skills/japanese-prose/scripts/core.py +192 -0
  20. package/skills/japanese-prose/scripts/fixtures/natural.md +5 -0
  21. package/skills/japanese-prose/scripts/fixtures/unnatural.md +5 -0
  22. package/skills/japanese-prose/scripts/lint.py +378 -0
  23. package/skills/japanese-prose/scripts/outline.py +68 -0
  24. package/skills/japanese-prose/scripts/terms.py +112 -0
  25. package/skills/japanese-prose/scripts/test_engine.py +117 -0
  26. package/skills/presentation-planner/SKILL.md +14 -0
  27. package/skills/tech-writer/SKILL.md +79 -51
  28. package/skills/tech-writer/assets/templates/blueprint.md +187 -0
  29. package/skills/tech-writer/assets/templates/white-paper.md +192 -0
  30. package/skills/tech-writer/references/doctypes/blueprint.md +81 -0
  31. package/skills/tech-writer/references/doctypes/white-paper.md +84 -0
  32. package/skills/tech-writer/references/japanese-prose-optimization.md +23 -23
  33. package/skills/tech-writer/references/style-constitution.md +11 -5
  34. package/skills/tech-writer/scripts/lint.py +11 -6
@@ -0,0 +1,81 @@
1
+ # Blueprint type
2
+
3
+ A Blueprint defines an agreed future state and the coordinated path from the
4
+ current state to that future state. It can cover technology, business
5
+ capabilities, operating models, governance, or a combination of them. It is
6
+ broader and more directional than a system design, but more executable than a
7
+ vision statement or strategy narrative.
8
+
9
+ ## Target reader
10
+
11
+ Sponsors, architects, transformation leads, delivery owners, governance
12
+ bodies, and affected teams who must align on the destination, sequence,
13
+ decision rights, dependencies, and measures of progress.
14
+
15
+ ## Settle before writing
16
+
17
+ - The outcome and planning horizon covered by the Blueprint
18
+ - The current-state baseline and evidence supporting it
19
+ - The target capabilities and principles that constrain the future state
20
+ - The dimensions in scope: business, organization, process, data, technology,
21
+ security, governance, or operations
22
+ - The authority that approves the Blueprint and owns subsequent changes
23
+ - The level of detail needed for funding, portfolio planning, or delivery
24
+
25
+ ## Responsibility boundary
26
+
27
+ A Blueprint establishes direction, boundaries, target capabilities, major
28
+ building blocks, transformation workstreams, and sequencing. It does not
29
+ replace implementation-level system designs, detailed requirements, project
30
+ plans, operating procedures, or an investment approval proposal.
31
+
32
+ Use `system-design` when teams need buildable component, interface, data, and
33
+ deployment details. Use `technical-proposal` when the primary outcome is an
34
+ approval of one investment or approach. Use `blueprint` when multiple
35
+ initiatives or organizational and technical dimensions must converge on one
36
+ future state over time.
37
+
38
+ ## Template
39
+
40
+ Start from `assets/templates/blueprint.md`.
41
+ The template is the Japanese-language skeleton; translate its headings when
42
+ the target document is English.
43
+
44
+ ## Recommended skeleton
45
+
46
+ 1. Intended outcome, planning horizon, scope, and authority
47
+ 2. Drivers, principles, current-state baseline, and constraints
48
+ 3. Target capabilities and future-state operating and technical views
49
+ 4. Gap analysis, workstreams, dependencies, and transition states
50
+ 5. Phased roadmap with entry, exit, and decision criteria
51
+ 6. Governance, measures, risks, traceability, and change control
52
+
53
+ ## Checklist
54
+
55
+ - [ ] Is the planning horizon and approval authority explicit?
56
+ - [ ] Is `Analysis status: Completed / Incomplete / Not performed` recorded
57
+ separately from approval status, with `Evidence gaps` and the analysis
58
+ handoff location (or none)?
59
+ - [ ] For `Incomplete`, are evidence gaps and confidence visible and every
60
+ affected conclusion or recommendation expressed with conditional wording,
61
+ or returned to consulting-analyst? For `Not performed`, are the scope and
62
+ reason explicit without implying completed analysis?
63
+ - [ ] Is the current state supported by evidence rather than assumption?
64
+ - [ ] Are target capabilities stated before products or implementation detail?
65
+ - [ ] Are business, process, data, technology, security, governance, and
66
+ operations dimensions included or explicitly marked out of scope?
67
+ - [ ] Does each gap map to a workstream, owner, dependency, and target state?
68
+ - [ ] Do roadmap phases have entry conditions, exit conditions, and measurable
69
+ outcomes rather than dates alone?
70
+ - [ ] Are transition states, coexistence, migration, and decommissioning
71
+ concerns visible?
72
+ - [ ] Are decision rights, exception handling, and change control defined?
73
+ - [ ] Can strategic drivers be traced through capabilities and workstreams to
74
+ measures?
75
+ - [ ] Does traceability preserve relevant Q / HYP / FND / EVD and GAP / INT / CRT
76
+ IDs from the consulting handoff alongside driver, principle, capability,
77
+ gap, workstream, and KPI IDs? Are inapplicable links marked `N/A` with a
78
+ reason without forcing consulting IDs when no consulting handoff exists?
79
+ - [ ] Are assumptions, risks, unresolved decisions, and superseded versions
80
+ recorded?
81
+ - [ ] Does the header status match the approval outcome?
@@ -0,0 +1,84 @@
1
+ # White Paper type
2
+
3
+ A White Paper helps a defined audience understand a consequential problem,
4
+ evaluate evidence, and reach an informed conclusion. It may explain an
5
+ emerging topic, establish a point of view, or describe a solution pattern,
6
+ but it must distinguish evidence from interpretation and must not disguise
7
+ marketing claims as independent analysis.
8
+
9
+ ## Target reader
10
+
11
+ Decision-makers, practitioners, evaluators, customers, partners, regulators,
12
+ or industry readers who need a credible explanation and a defensible basis
13
+ for action.
14
+
15
+ ## Settle before writing
16
+
17
+ - The reader's decision, question, or misconception the paper addresses
18
+ - The central claim and what evidence could weaken or disprove it
19
+ - The publication scope, date boundary, geography, and intended longevity
20
+ - The research method and acceptable source quality
21
+ - The publisher's relationship to products, services, sponsors, or cited data
22
+ - The desired next action, without overstating certainty
23
+
24
+ ## Responsibility boundary
25
+
26
+ A White Paper explains and supports a position. It is not a requirements
27
+ specification, implementation design, sales brochure, academic paper, or
28
+ contractual promise. Product examples may illustrate a finding, but factual
29
+ claims, estimates, customer outcomes, and recommendations must remain
30
+ traceable to named evidence and limitations.
31
+
32
+ Use `technical-proposal` for an internal approval request, `blueprint` for a
33
+ future state and transformation roadmap, and `white-paper` for an
34
+ evidence-led public or stakeholder-facing argument.
35
+
36
+ ## Template
37
+
38
+ Start from `assets/templates/white-paper.md`.
39
+ The template is the Japanese-language skeleton; translate its headings when
40
+ the target document is English.
41
+
42
+ ## Recommended skeleton
43
+
44
+ 1. Title, abstract, target reader, central claim, and disclosure
45
+ 2. Problem definition, scope, terminology, and research method
46
+ 3. Evidence-led findings with confidence and limitations
47
+ 4. Options, solution pattern, recommendation, and adoption considerations
48
+ 5. Counterarguments, risks, boundaries, and conclusion
49
+ 6. References, evidence ledger, glossary, authorship, and revision history
50
+
51
+ ## Checklist
52
+
53
+ - [ ] Does the abstract state the problem, conclusion, audience, and practical
54
+ consequence?
55
+ - [ ] Is `Analysis status: Completed / Incomplete / Not performed` recorded
56
+ separately from publication status, with `Evidence gaps` and the analysis
57
+ handoff location (or none)?
58
+ - [ ] For `Incomplete`, are evidence gaps and confidence visible and every
59
+ affected conclusion or recommendation expressed with conditional wording,
60
+ or returned to consulting-analyst? For `Not performed`, are the scope and
61
+ reason explicit without implying completed analysis?
62
+ - [ ] Is the central claim specific enough to challenge with evidence?
63
+ - [ ] Are facts, estimates, interpretations, and recommendations visibly
64
+ distinguished?
65
+ - [ ] Does every consequential claim link to a source or evidence identifier?
66
+ - [ ] Does the evidence ledger keep SRC source records separate from EVD analysis
67
+ evidence, preserving their IDs and meaning?
68
+ - [ ] Do claims and findings link relevant HYP / FND / EVD IDs from the handoff,
69
+ marking inapplicable links `N/A` with a reason without forcing consulting
70
+ IDs when no consulting handoff exists?
71
+ - [ ] Are interpretations preserved without counting as supporting evidence,
72
+ with `Supported` hypotheses backed by relevant Fact / Estimate evidence?
73
+ - [ ] Are source date, scope, method, sample, and limitations available?
74
+ - [ ] Are contradictory evidence and credible alternatives addressed?
75
+ - [ ] Are product, sponsor, author, and data-source relationships disclosed?
76
+ - [ ] Are publication approval and legal, compliance, and claims reviews
77
+ recorded, including approval to use customer names and quantitative
78
+ claims?
79
+ - [ ] Does `Approved for Publication` match a complete approval record, with
80
+ a reason recorded for every review marked not applicable?
81
+ - [ ] Are case studies labeled and prevented from implying universal results?
82
+ - [ ] Does the recommendation state where it does not apply?
83
+ - [ ] Can readers reproduce the source trail and identify the document's
84
+ publication and revision dates?
@@ -5,11 +5,10 @@ are complete. The goal is to remove mechanical or translated-sounding prose
5
5
  without changing the document's approved meaning, obligations, evidence, or
6
6
  traceability.
7
7
 
8
- The preferred optimizer is the
9
- [natural-japanese prose-polishing skill](https://github.com/coji/natural-japanese).
10
- Kotonoha owns document structure and completeness; `natural-japanese` owns
11
- sentence-level clarity, rhythm, word choice, reading load, and detection of
12
- repeated AI-like phrasing.
8
+ The optimizer is kotonoha's original bundled `japanese-prose` skill.
9
+ Kotonoha owns document structure and completeness; `japanese-prose` owns
10
+ sentence-level clarity, rhythm, word choice, reading load, terminology, and
11
+ detection of repeated AI-like phrasing through GiNZA analysis.
13
12
 
14
13
  ## Run this pass when
15
14
 
@@ -17,8 +16,7 @@ repeated AI-like phrasing.
17
16
  whose audience-facing prose is primarily Japanese.
18
17
  - The task is `write` mode.
19
18
  - The artifact is a living, multi-section document.
20
- - A registered `natural-japanese` or equivalent Japanese prose-polishing
21
- skill is available.
19
+ - The bundled `japanese-prose` skill is readable.
22
20
 
23
21
  Skip it for English documents, generated machine-readable files, and source
24
22
  code. Also skip atomic artifacts such as commit messages, PR descriptions,
@@ -38,8 +36,9 @@ outcome. Require it to preserve:
38
36
  - Normative force such as Must / Should / May, approval states, and
39
37
  acceptance criteria
40
38
  - Tables, code blocks, commands, schemas, frontmatter keys, and placeholders
41
- - Markdown emphasis spacing: keep half-width spaces between surrounding prose
42
- and `**strong emphasis**` delimiters
39
+ - Markdown emphasis spacing: keep ASCII half-width spaces (`U+0020`) between
40
+ surrounding prose and both sides of `**strong emphasis**` delimiters; never
41
+ substitute full-width spaces (`U+3000`), tabs, or non-breaking spaces
43
42
  - Explicit assumptions, limitations, residual risks, and unresolved items
44
43
 
45
44
  Heading wording may improve only when its meaning and hierarchy stay intact.
@@ -47,25 +46,25 @@ Never trade technical precision for conversational phrasing.
47
46
 
48
47
  ## Optimization loop
49
48
 
50
- 1. Inspect the host's registered skill list for `natural-japanese` or a
51
- compatible Japanese prose-polishing skill. Invoke it through the host's
52
- skill-loading mechanism. If the host exposes only skill files, check
53
- `.github/skills/natural-japanese/SKILL.md`,
54
- `.copilot/skills/natural-japanese/SKILL.md`, and
55
- `$HOME/.copilot/skills/natural-japanese/SKILL.md`; expand `$HOME`, load the
49
+ 1. Invoke kotonoha's bundled `japanese-prose` through the host's
50
+ skill-loading mechanism. If the host exposes only skill files, resolve
51
+ `<tech-writer-dir>/../japanese-prose/SKILL.md` first, then check
52
+ `.github/skills/japanese-prose/SKILL.md`,
53
+ `.copilot/skills/japanese-prose/SKILL.md`, and
54
+ `$HOME/.copilot/skills/japanese-prose/SKILL.md`; expand `$HOME`, load the
56
55
  discovered skill,
57
56
  and follow its workflow.
58
57
  2. Ask the loaded skill to review and rewrite only the Japanese prose under
59
58
  the frozen invariants.
60
- 3. Let `<natural-japanese-dir>` be the directory containing the loaded
59
+ 3. Let `<japanese-prose-dir>` be the directory containing the loaded
61
60
  optimizer's `SKILL.md`. When its diagnostics are available, run the
62
61
  optimizer's scripts with their qualified paths:
63
62
 
64
63
  ```bash
65
- uv run <natural-japanese-dir>/scripts/lint.py <target-file> --genre tech
66
- uv run <natural-japanese-dir>/scripts/lint.py <target-file> --reading-load
67
- uv run <natural-japanese-dir>/scripts/outline.py <target-file>
68
- uv run <natural-japanese-dir>/scripts/terms.py <target-file>
64
+ uv run <japanese-prose-dir>/scripts/lint.py <target-file> --genre tech --json > <workdir>/prose-baseline.json
65
+ uv run <japanese-prose-dir>/scripts/lint.py <target-file> --genre tech --reading-load
66
+ uv run <japanese-prose-dir>/scripts/outline.py <target-file>
67
+ uv run <japanese-prose-dir>/scripts/terms.py <target-file>
69
68
  ```
70
69
 
71
70
  Do not substitute `skills/tech-writer/scripts/lint.py`; kotonoha's script
@@ -95,9 +94,10 @@ final language is Japanese, in `write` mode), report exactly one status:
95
94
  no actionable prose findings remain. Run diagnostics when available; if
96
95
  `uv` or a diagnostic script is unavailable, note that limitation without
97
96
  changing this status.
98
- - `Japanese prose optimization not performed`: no compatible optimizer was
99
- registered or loaded, so no prose review or rewrite ran; include the
100
- concrete reason.
97
+ - `Japanese prose optimization not performed`: the bundled optimizer was
98
+ missing or unreadable, so no prose review or rewrite ran; include the
99
+ concrete reason. A standard `npx kotonoha install` should prevent this
100
+ state.
101
101
  - `Japanese prose optimization did not converge`: three rounds completed with
102
102
  unresolved actionable findings or invariant violations, or the optimizer
103
103
  started but failed before producing a valid result, a required
@@ -2,15 +2,17 @@
2
2
 
3
3
  Constraints to fix a technical document's *structure* before writing.
4
4
  Sentence-level naturalness, vocabulary, and rhythm are out of scope here
5
- (→ the domain of a prose-polishing skill such as natural-japanese).
5
+ (→ the domain of kotonoha's bundled `japanese-prose` skill).
6
6
 
7
7
  ## Scope: living documents vs. atomic artifacts
8
8
 
9
9
  These 8 rules assume a **living, multi-section reference document** —
10
10
  README, design doc/ADR, API reference, release notes/CHANGELOG file as a
11
- whole, user manual, technical proposal, RFI/RFP (including a supplier's RFP
12
- response), or Zenn/Qiita article. Apply all 8 rules to those doctypes. For
13
- Zenn and Qiita, rule 1's article title lives in YAML frontmatter — see their
11
+ whole, user manual, requirements definition, system design, test plan,
12
+ operations runbook, migration plan, security design, technical proposal,
13
+ Blueprint, White Paper, RFI/RFP (including a supplier's RFP response), or
14
+ Zenn/Qiita article. Apply all 8 rules to those doctypes. For Zenn and Qiita,
15
+ rule 1's article title lives in YAML frontmatter — see their
14
16
  doctype reference files for the platform-specific fields. Zenn body sections
15
17
  start at `##`; Qiita body sections start at `#` and use `##` for subsections.
16
18
  Every other rule (code examples, disclosed limitations, etc.) still applies
@@ -34,7 +36,11 @@ In generated Markdown, add half-width spaces outside strong-emphasis
34
36
  delimiters when they touch surrounding prose. Write
35
37
  `これは **強調** になる` rather than `これは**強調**にならない`.
36
38
  The spaces are unnecessary at a line boundary or next to punctuation, for
37
- example `**重要**: 設定を確認する`. Never put spaces inside the delimiters.
39
+ example `**重要**: 設定を確認する`. Use ASCII spaces (`U+0020`), not
40
+ full-width spaces (`U+3000`), tabs, or non-breaking spaces, immediately before
41
+ and after emphasis embedded in prose. Write `これは **「重要」** と説明する`,
42
+ not `これは **「重要」** と説明する`. Never put spaces inside the
43
+ delimiters.
38
44
 
39
45
  ## 1. Say "what this is" and "the outcome" in the first three lines
40
46
 
@@ -6,7 +6,7 @@
6
6
  """tech-writer skill: a lint script that mechanically checks a technical
7
7
  document's *structure* and Markdown rendering safety.
8
8
 
9
- Where natural-japanese's lint.py detects sentence-level naturalness
9
+ Where japanese-prose's GiNZA lint detects sentence-level naturalness
10
10
  (vocabulary, rhythm), this script detects structural problems specific to
11
11
  technical documents plus Markdown syntax patterns that render inconsistently
12
12
  (heading hierarchy, code examples, leftover placeholders, suspicious links,
@@ -246,11 +246,12 @@ def check_links(lines: list, fence_mask: list) -> list:
246
246
 
247
247
 
248
248
  def check_bold_spacing(lines: list, fence_mask: list) -> list:
249
- """Flag bold delimiters that directly touch surrounding prose.
249
+ """Flag bold delimiters with missing or non-ASCII surrounding spaces.
250
250
 
251
251
  Some Markdown renderers fail to recognize strong emphasis when `**`
252
252
  directly adjoins Japanese or other word characters. Punctuation and
253
- line boundaries do not need padding.
253
+ line boundaries do not need padding. When padding is present, it must
254
+ be an ASCII half-width space rather than a tab or Unicode space.
254
255
  """
255
256
  findings = []
256
257
  for i, line in enumerate(lines):
@@ -262,15 +263,19 @@ def check_bold_spacing(lines: list, fence_mask: list) -> list:
262
263
  after = checked[match.end()] if match.end() < len(checked) else ""
263
264
  if (before and (before.isalnum() or before == "_")) or (
264
265
  after and (after.isalnum() or after == "_")
266
+ ) or (
267
+ before and before.isspace() and before != " "
268
+ ) or (
269
+ after and after.isspace() and after != " "
265
270
  ):
266
271
  findings.append(
267
272
  Finding(
268
273
  line=i + 1,
269
274
  category="bold_spacing",
270
275
  message=(
271
- "Add half-width spaces outside '**...**' when it "
272
- "touches surrounding prose so strong emphasis "
273
- "renders consistently."
276
+ "Use ASCII half-width spaces immediately before "
277
+ "and after '**...**' when it is embedded in prose; "
278
+ "do not use full-width or other Unicode spaces."
274
279
  ),
275
280
  snippet=line.strip(),
276
281
  )