kotonoha 0.1.2 → 0.1.4

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 (36) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +95 -20
  3. package/bin/kotonoha.js +81 -13
  4. package/package.json +7 -3
  5. package/skills/presentation-planner/SKILL.md +243 -0
  6. package/skills/presentation-planner/assets/design-templates/data-report.yaml +97 -0
  7. package/skills/presentation-planner/assets/design-templates/executive-proposal.yaml +92 -0
  8. package/skills/presentation-planner/assets/design-templates/technical-briefing.yaml +96 -0
  9. package/skills/presentation-planner/assets/scenario-templates/data-report.md +47 -0
  10. package/skills/presentation-planner/assets/scenario-templates/executive-decision.md +43 -0
  11. package/skills/presentation-planner/assets/scenario-templates/technical-briefing.md +45 -0
  12. package/skills/presentation-planner/references/customizing-design-templates.md +160 -0
  13. package/skills/presentation-planner/references/design-spec-schema.md +72 -0
  14. package/skills/presentation-planner/references/handoff-contract.md +49 -0
  15. package/skills/presentation-planner/references/responsibility-boundary.md +32 -0
  16. package/skills/presentation-planner/references/scenario-templates.md +55 -0
  17. package/skills/tech-writer/SKILL.md +57 -16
  18. package/skills/tech-writer/assets/templates/migration-plan.md +173 -0
  19. package/skills/tech-writer/assets/templates/operations-runbook.md +202 -0
  20. package/skills/tech-writer/assets/templates/requirements-definition.md +170 -0
  21. package/skills/tech-writer/assets/templates/rfi.md +113 -0
  22. package/skills/tech-writer/assets/templates/rfp.md +180 -0
  23. package/skills/tech-writer/assets/templates/security-design.md +167 -0
  24. package/skills/tech-writer/assets/templates/system-design.md +220 -0
  25. package/skills/tech-writer/assets/templates/technical-proposal.md +112 -0
  26. package/skills/tech-writer/assets/templates/test-plan.md +153 -0
  27. package/skills/tech-writer/references/doctypes/migration-plan.md +63 -0
  28. package/skills/tech-writer/references/doctypes/operations-runbook.md +63 -0
  29. package/skills/tech-writer/references/doctypes/requirements-definition.md +61 -0
  30. package/skills/tech-writer/references/doctypes/rfi.md +43 -0
  31. package/skills/tech-writer/references/doctypes/rfp.md +46 -0
  32. package/skills/tech-writer/references/doctypes/security-design.md +71 -0
  33. package/skills/tech-writer/references/doctypes/system-design.md +74 -0
  34. package/skills/tech-writer/references/doctypes/technical-proposal.md +49 -0
  35. package/skills/tech-writer/references/doctypes/test-plan.md +67 -0
  36. package/skills/tech-writer/references/style-constitution.md +7 -6
@@ -0,0 +1,49 @@
1
+ # PPTX handoff contract
2
+
3
+ Use this structure for
4
+ `.presentation/<deck-slug>/pptx-handoff.md`.
5
+
6
+ ## Inputs
7
+
8
+ - Brief: `<path>/presentation-brief.md`
9
+ - Scenario: `<path>/presentation-scenario.md`
10
+ - Slide outline: `<path>/slide-outline.md`
11
+ - Design specification: `<path>/design-spec.yaml`
12
+ - Source materials: `<paths>`
13
+
14
+ ## Output
15
+
16
+ - PPTX path: `<path>/<filename>.pptx`
17
+ - Aspect ratio: `<16:9 / 4:3 / custom>`
18
+ - Expected slide count: `<count or range>`
19
+
20
+ ## Rendering requirements
21
+
22
+ - Preserve slide order and assertion titles.
23
+ - Preserve the approved scenario stages and audience reasoning journey.
24
+ - Require every slide to map to at least one scenario stage; preserve
25
+ multi-stage mappings recorded with ` / ` in the outline.
26
+ - Treat evidence and citation fields as content requirements.
27
+ - Apply semantic design tokens from `design-spec.yaml`.
28
+ - Add speaker notes where specified.
29
+ - Add alt text or an equivalent description for informative visuals.
30
+ - Do not invent quantitative claims or citations.
31
+
32
+ ## Required visual QA
33
+
34
+ - Render every slide to an image or thumbnail.
35
+ - Check clipping, overlap, off-canvas objects, font substitution, and
36
+ unreadable contrast.
37
+ - Check charts for legible labels, units, legends, and source notes.
38
+ - Check diagrams for readable flow direction and connector attachment.
39
+ - Report every deviation from the outline or design specification.
40
+
41
+ ## Completion report
42
+
43
+ Return:
44
+
45
+ 1. Output path and final slide count
46
+ 2. Visual QA result
47
+ 3. Missing or substituted assets/fonts
48
+ 4. Deviations from the scenario, outline, or design and their reasons
49
+ 5. Remaining manual-review items
@@ -0,0 +1,32 @@
1
+ # Responsibility boundary with the PPTX creation skill
2
+
3
+ `presentation-planner` and the host's PPTX skill are complementary.
4
+
5
+ | Concern | presentation-planner | PPTX creation skill |
6
+ |---|---:|---:|
7
+ | Audience, outcome, and decision | Owns | Consumes |
8
+ | Scenario and audience reasoning journey | Owns | Preserves |
9
+ | Storyline and slide sequence | Owns | Preserves |
10
+ | Assertion titles and evidence mapping | Owns | Renders |
11
+ | Design tokens and layout intent | Owns | Implements |
12
+ | `.pptx` binary creation and editing | Never | Owns |
13
+ | python-pptx/PptxGenJS/COM code | Never | Owns |
14
+ | Theme/layout extraction from an existing PPTX | Requests and consumes summary | Owns |
15
+ | Rendering and thumbnails | Never | Owns |
16
+ | Overlap, clipping, and font checks | Defines acceptance criteria | Executes |
17
+ | Speaker notes insertion | Specifies content | Implements |
18
+
19
+ ## Conflict rule
20
+
21
+ If both skills could act, `presentation-planner` runs first and creates the
22
+ handoff package. The PPTX skill starts only after the planning artifacts are
23
+ complete. For a simple mechanical edit to an existing presentation where
24
+ the storyline and design are unchanged, skip `presentation-planner` and use
25
+ the PPTX skill directly.
26
+
27
+ ## Failure rule
28
+
29
+ If the PPTX skill cannot implement a requested visual instruction, it must
30
+ report the constraint and proposed fallback. The planning skill may update
31
+ the design spec or slide outline, but it must not work around the constraint
32
+ by manipulating the PPTX binary itself.
@@ -0,0 +1,55 @@
1
+ # Presentation scenario templates
2
+
3
+ A presentation scenario defines the audience's reasoning journey between the
4
+ brief and the slide-by-slide outline. It is not a script and does not repeat
5
+ all slide content. It records the assertions, evidence, transitions,
6
+ objections, and final action that make the deck persuasive and coherent.
7
+
8
+ ## Artifact boundary
9
+
10
+ | Artifact | Question it answers |
11
+ |---|---|
12
+ | `presentation-brief.md` | Who is the audience, and what outcome is required? |
13
+ | `presentation-scenario.md` | What reasoning journey moves them to that outcome? |
14
+ | `slide-outline.md` | Which slides deliver each assertion and piece of evidence? |
15
+ | `design-spec.yaml` | Which visual system expresses the content? |
16
+ | `pptx-handoff.md` | How must the PPTX skill generate and validate the deck? |
17
+
18
+ Do not use the scenario as a second slide outline. A scenario stage may span
19
+ several slides, or two stages may share one slide when the argument remains
20
+ clear.
21
+
22
+ ## Choose a template
23
+
24
+ | Template | Use when | Avoid when |
25
+ |---|---|---|
26
+ | `executive-decision.md` | The audience must approve an option, investment, roadmap, or policy | The goal is purely educational |
27
+ | `technical-briefing.md` | The audience must understand or review architecture and technical behavior | The deck is primarily KPI analysis |
28
+ | `data-report.md` | Findings, trends, research, or experiments must support an action | Credible data is unavailable |
29
+
30
+ Copy the closest template to
31
+ `.presentation/<deck-slug>/presentation-scenario.md`, then remove stages that
32
+ do not advance the required outcome. Do not add stages or slides merely to
33
+ match the template.
34
+
35
+ If none fits, create `presentation-scenario.md` from the generic fallback in
36
+ `SKILL.md`, preserving the same stage, audience-question, assertion, evidence,
37
+ transition, and suggested-slide-range fields used by packaged templates.
38
+
39
+ ## Adaptation rules
40
+
41
+ - Express each stage as an assertion the audience must accept.
42
+ - Record the audience question answered by each stage.
43
+ - Map factual claims to sources or mark them as assumptions.
44
+ - State the transition: why accepting one stage makes the next relevant.
45
+ - Include objections, uncertainty, and trade-offs before the final action.
46
+ - Keep the final decision or call to action singular and testable.
47
+ - Set suggested slide counts only as planning ranges, never quotas.
48
+
49
+ ## Validation
50
+
51
+ - Reading only stage assertions reconstructs the argument.
52
+ - Every stage changes what the audience knows, believes, or is ready to do.
53
+ - Evidence strength matches the certainty of the assertion.
54
+ - The slide outline maps every slide to a scenario stage.
55
+ - No slide introduces a new conclusion absent from the approved scenario.
@@ -3,15 +3,25 @@ name: tech-writer
3
3
  description: >-
4
4
  Helps structure and polish technical documents: README, design docs/ADRs,
5
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
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
+ RFI/RFP procurement documents, and Qiita/Zenn articles. Use for requests
10
+ like "write a README", "draft a design doc", "define system requirements",
11
+ "write a system design", "create a test plan", "write an operations
12
+ runbook", "plan a migration", "create a threat model", "write a technical
13
+ proposal", "draft an RFI", "create an RFP", "write this PR description",
14
+ "clean up my commit
15
+ message", "make this how-to guide clearer", "write API docs", "summarize
16
+ the release notes", "write a Zenn article", "write this up for Qiita", as
17
+ well as
11
18
  Japanese-language equivalents (「READMEを書いて」「設計ドキュメントを作って」
12
- 「PRの説明文を書いて」「コミットメッセージを整えて」「手順書を分かりやすくして」
13
- 「APIドキュメントを整備して」「リリースノートをまとめて」「Zennの記事を書いて」
14
- 「Qiitaに投稿する記事を書いて」). Especially useful when
19
+ 「要件定義書を作って」「システム設計書を書いて」「テスト計画書を作って」
20
+ 「運用設計書を書いて」「移行計画を作って」「脅威モデルを作って」
21
+ 「技術提案書を書いて」「RFIを作って」「RFPを作って」「PRの説明文を書いて」
22
+ 「コミットメッセージを整えて」「手順書を分かりやすくして」
23
+ 「APIドキュメントを整備して」「リリースノートをまとめて」
24
+ 「Zennの記事を書いて」「Qiitaに投稿する記事を書いて」). Especially useful when
15
25
  the request is a bare goal without enough context to start (e.g. "I want
16
26
  to write a README" / "○○を書きたい"), since this skill drives a one
17
27
  question-at-a-time intake before writing. Supports both Japanese and
@@ -31,7 +41,10 @@ argument-hint: "[write|review|score] [doctype] <target file or request>"
31
41
  Structures technical documents so readers reach the information they need
32
42
  with the shortest path. Covers README, design docs/ADRs, API reference, PR
33
43
  descriptions/commit messages/issue reports, release notes/CHANGELOG, user
34
- manuals/how-to guides, code comments/docstrings, and Qiita/Zenn articles.
44
+ manuals/how-to guides, code comments/docstrings, requirements definitions,
45
+ system designs, test plans, operations runbooks, migration plans, security
46
+ designs/threat models, technical proposals, RFI/RFP procurement documents,
47
+ and Qiita/Zenn articles.
35
48
 
36
49
  Default format: Markdown for every doctype in this skill, except a git
37
50
  commit message body (plain text by convention — light "-" bullets are
@@ -90,7 +103,13 @@ hand the user a checklist to fill in. Instead:
90
103
  past this doctype without knowing which one applies. Similarly, a bare
91
104
  "write a tech blog post" request doesn't by itself say Qiita, Zenn, or
92
105
  neither — ask which platform (or "no platform, just a plain document")
93
- as part of this same first question.
106
+ as part of this same first question. For a "technical proposal", ask
107
+ whether it is an internal approval proposal or a supplier response to an
108
+ RFP; only the internal approval proposal maps to `technical-proposal`.
109
+ For a supplier response, structure the document against the supplied
110
+ RFP's requirement IDs, requested proposal contents, pricing format, and
111
+ contract deviations, then apply the general principles in
112
+ `references/style-constitution.md`.
94
113
  2. Open the matching reference file and note its target reader and any
95
114
  "settle before writing" items. Combined with the general musts below,
96
115
  this is your information checklist — but never show it to the user as a
@@ -104,7 +123,12 @@ hand the user a checklist to fill in. Instead:
104
123
  doctype (and subtype, for `pr-commit`), and (d) any doctype-specific
105
124
  musts (e.g. the decision and alternatives for a design doc, the
106
125
  prior-knowledge floor for a user manual, breaking-change status for
107
- release notes, the related issue for a PR description or bug report).
126
+ release notes, the related issue for a PR description or bug report,
127
+ measurable acceptance conditions for a requirements definition, the
128
+ approved requirements baseline for a system design, exit criteria for a
129
+ test plan, RTO/RPO for an operations runbook, rollback conditions for a
130
+ migration plan, assets and trust boundaries for a threat model, market
131
+ unknowns for an RFI, or evaluation rules for an RFP).
108
132
  5. **A "don't know" / "not applicable" / "no ticket for this" answer
109
133
  satisfies a must — it is not a reason to keep asking.** Ask that must
110
134
  at most once; if the answer is a non-answer, record it as a stated
@@ -130,6 +154,15 @@ hand the user a checklist to fill in. Instead:
130
154
  | Release notes / CHANGELOG | release-notes | `references/doctypes/release-notes.md` |
131
155
  | User manual / how-to guide / tutorial | user-manual | `references/doctypes/user-manual.md` |
132
156
  | Code comments / docstrings | code-comments | `references/doctypes/code-comments.md` |
157
+ | Requirements definition / 要件定義書 | requirements-definition | `references/doctypes/requirements-definition.md` |
158
+ | System design / システム設計書 | system-design | `references/doctypes/system-design.md` |
159
+ | Test plan / テスト計画書 | test-plan | `references/doctypes/test-plan.md` |
160
+ | Operations design / Runbook / 運用設計書 | operations-runbook | `references/doctypes/operations-runbook.md` |
161
+ | Migration plan / 移行計画書 | migration-plan | `references/doctypes/migration-plan.md` |
162
+ | Security design / Threat model / セキュリティ設計書 | security-design | `references/doctypes/security-design.md` |
163
+ | Internal technical proposal | technical-proposal | `references/doctypes/technical-proposal.md` |
164
+ | Request for information / RFI | rfi | `references/doctypes/rfi.md` |
165
+ | Request for proposal / RFP | rfp | `references/doctypes/rfp.md` |
133
166
  | Zenn article | zenn | `references/doctypes/zenn.md` |
134
167
  | Qiita article | qiita | `references/doctypes/qiita.md` |
135
168
 
@@ -140,9 +173,12 @@ one-question-at-a-time intake for reader and outcome.
140
173
  ## 2. Outline first for long documents
141
174
 
142
175
  For documents likely to run long — design docs/ADRs, user manuals with
143
- multiple steps, API references covering several endpoints, or anything the
144
- user calls "long"/"detailed"/"comprehensive" — draft a table of contents
145
- (heading outline) before writing any body prose.
176
+ multiple steps, API references covering several endpoints, requirements
177
+ definitions, system designs, test plans, operations runbooks, migration
178
+ plans, security designs, technical proposals, RFI/RFP documents, or anything
179
+ the user calls
180
+ "long"/"detailed"/"comprehensive" — draft a table of contents (heading
181
+ outline) before writing any body prose.
146
182
 
147
183
  1. Build the heading outline from the reader and outcome gathered in §1 and
148
184
  the doctype's recommended skeleton (in its reference file).
@@ -168,7 +204,9 @@ document and needs the outline step below.
168
204
  ## 3. Write — under the structure constitution
169
205
 
170
206
  For living, multi-section documents (README, design doc, API reference,
171
- release notes, user manual, Zenn/Qiita article), write under the 8 rules
207
+ release notes, user manual, requirements definition, system design, test
208
+ plan, operations runbook, migration plan, security design, technical
209
+ proposal, RFI/RFP, Zenn/Qiita article), write under the 8 rules
172
210
  in `references/style-constitution.md`. Summary: state "what this is" and
173
211
  "the outcome for the reader" in the first three lines; make headings
174
212
  labels that preview content (not "Overview", but "Overview of what");
@@ -272,7 +310,10 @@ for `write` mode; do not run it for `review` or `score` mode.
272
310
 
273
311
  See each reference file for detail. The items below are for living,
274
312
  multi-section documents (README, design doc, API reference, release notes,
275
- user manual, Zenn/Qiita article). Atomic artifacts (commit message, PR
313
+ user manual, requirements definition, system design, test plan, operations
314
+ runbook, migration plan, security design, technical proposal, RFI/RFP,
315
+ Zenn/Qiita article). Atomic
316
+ artifacts (commit message, PR
276
317
  description, issue report, code comment/docstring, a single appended
277
318
  release-notes entry) are already covered by their own doctype checklist
278
319
  via step 2 in §4 — these common items don't add extra requirements on top
@@ -0,0 +1,173 @@
1
+ # <システム・データ名> 移行計画書
2
+
3
+ <何をどこからどこへ、どの停止許容時間と品質基準で安全に移行するかを3文以内で要約する。>
4
+
5
+ - 文書版: <例: 1.0>
6
+ - 作成日: <YYYY-MM-DD>
7
+ - 最終更新日: <YYYY-MM-DD>
8
+ - 移行責任者: <氏名・チーム>
9
+ - Go / No-Go判断者: <氏名・会議体>
10
+ - ステータス: Draft / In Review / Approved
11
+ - 本番移行予定: <YYYY-MM-DD HH:mm–HH:mm TZ>
12
+ - 関連要件・設計: <文書名・版・URL>
13
+
14
+ ## この移行計画で合意する事項
15
+
16
+ - 移行対象: <データ、利用者、機能、外部接続>
17
+ - 移行方式: <一括、段階、並行稼働など>
18
+ - 許容停止時間と品質基準: <値>
19
+ - 承認を求める事項: <日程、体制、判定、ロールバック>
20
+
21
+ ## 現行と移行後の状態
22
+
23
+ | 項目 | 現行 | 移行後 | 主な変更 | 利用者への影響 |
24
+ |---|---|---|---|---|
25
+ | システム | <現行> | <移行先> | <変更> | <影響> |
26
+ | データ | <形式・量> | <形式・量> | <変換> | <影響> |
27
+ | 業務 | <手順> | <手順> | <変更> | <教育・周知> |
28
+
29
+ ## 対象範囲と対象外
30
+
31
+ ### 対象範囲
32
+
33
+ - <移行するデータ・設定・利用者・接続先>
34
+
35
+ ### 対象外
36
+
37
+ - <廃止しないもの・後続フェーズへ送るもの>
38
+
39
+ ## 前提条件と制約
40
+
41
+ | ID | 条件・制約 | 確認方法 | 期限 | 所有者 |
42
+ |---|---|---|---|---|
43
+ | MIG-CON-001 | <停止時間・契約・技術制約> | <確認> | <期限> | <担当> |
44
+
45
+ ## 移行対象の棚卸し
46
+
47
+ | 対象ID | 対象 | 移行元 | 移行先 | 件数・容量 | 所有者 | 依存関係 | 移行要否 |
48
+ |---|---|---|---|---:|---|---|---|
49
+ | MIG-001 | <データ・設定> | <場所> | <場所> | <値> | <担当> | <依存先> | Yes / No |
50
+
51
+ ## データマッピングと変換
52
+
53
+ | 移行元項目 | 移行先項目 | 変換ルール | 必須・既定値 | 検証ルール | エラー時の扱い |
54
+ |---|---|---|---|---|---|
55
+ | <項目> | <項目> | <変換> | <条件> | <型・範囲・参照整合性> | <除外・補正・中止> |
56
+
57
+ ## 移行方式と移行単位
58
+
59
+ - 方式: 一括 / 段階 / 並行稼働 / Blue-Green / <その他>
60
+ - 選定理由: <停止時間、整合性、ロールバックとの関係>
61
+ - 差分同期: <CDC、二重書き、再実行など>
62
+ - 冪等性: <再実行しても重複・欠損しない仕組み>
63
+
64
+ | Wave | 対象 | 実施日時 | 完了条件 | 次Waveへの判定 |
65
+ |---|---|---|---|---|
66
+ | 1 | <対象> | <日時> | <条件> | <条件> |
67
+
68
+ ## 体制と役割
69
+
70
+ | 役割 | 担当 | 責任 | 当日の連絡方法 | 代行者 |
71
+ |---|---|---|---|---|
72
+ | 移行指揮 | <担当> | Go / No-Go、進行 | <方法> | <担当> |
73
+ | データ移行 | <担当> | 抽出・変換・投入 | <方法> | <担当> |
74
+ | 業務確認 | <担当> | 業務受入 | <方法> | <担当> |
75
+ | 運用・監視 | <担当> | 監視・障害対応 | <方法> | <担当> |
76
+
77
+ ## リハーサル計画
78
+
79
+ | 回 | 目的 | 対象・データ量 | 実施日 | 目標時間 | 合格条件 | 改善事項 |
80
+ |---|---|---|---|---:|---|---|
81
+ | 1 | <手順・性能・復旧の検証> | <範囲> | <日付> | <時間> | <条件> | <記録> |
82
+
83
+ ## 移行開始条件
84
+
85
+ - <リハーサルが合格している>
86
+ - <対象版が承認され、変更凍結されている>
87
+ - <バックアップとリストア試験が完了している>
88
+ - <監視、連絡網、ロールバック環境が準備されている>
89
+ - <利用者通知と業務側の準備が完了している>
90
+
91
+ ## 本番移行タイムライン
92
+
93
+ | 時刻 | 手順ID | 作業 | 実行者 | 想定時間 | 完了条件 | 証跡 |
94
+ |---|---|---|---|---:|---|---|
95
+ | <HH:mm> | STEP-001 | <作業> | <担当> | <分> | <確認可能な条件> | <ログ・画面> |
96
+
97
+ ## 検証と照合
98
+
99
+ | 検証ID | 対象 | 検証方法 | 移行前値 | 移行後値 | 許容差 | 判定者 |
100
+ |---|---|---|---:|---:|---:|---|
101
+ | VAL-001 | 件数 | <SQL・レポート> | <値> | <値> | 0 | <担当> |
102
+ | VAL-002 | 金額・集計 | <照合方法> | <値> | <値> | <値> | <担当> |
103
+ | VAL-003 | 参照整合性 | <孤立・重複・外部キー検査> | <値> | <値> | 0 | <担当> |
104
+ | VAL-004 | 業務シナリオ | <操作> | <期待> | <実結果> | なし | <担当> |
105
+
106
+ ## Go / No-Go判定
107
+
108
+ | 判定時点 | Go条件 | No-Go条件 | 必要な証跡 | 判断者 |
109
+ |---|---|---|---|---|
110
+ | 移行開始前 | <条件> | <条件> | <チェックリスト> | <担当> |
111
+ | 切替前 | <条件> | <条件> | <移行・照合結果> | <担当> |
112
+ | サービス再開前 | <条件> | <条件> | <業務確認・監視> | <担当> |
113
+
114
+ ## ロールバック計画
115
+
116
+ - ロールバック可能期限: <時刻・条件>
117
+ - ロールバック判断条件: <時間超過、欠損、重大障害など>
118
+ - 判断者: <役割>
119
+ - データ整合性方針: <移行後更新の扱い>
120
+
121
+ | 手順 | 作業 | 実行者 | 想定時間 | 完了条件 |
122
+ |---:|---|---|---:|---|
123
+ | 1 | <新環境への書き込みを停止する> | <担当> | <分> | <条件> |
124
+ | 2 | <切替後に新環境へ書き込まれた差分を退避し、再適用・補償対象を確定する> | <担当> | <分> | <差分が固定され証跡がある> |
125
+ | 3 | <旧環境を復旧し、必要な差分を再適用または補償する> | <担当> | <分> | <整合性基準を満たす> |
126
+ | 4 | <データと業務を確認して旧環境を再開する> | <担当> | <分> | <再開条件を満たす> |
127
+
128
+ ## 業務継続と利用者コミュニケーション
129
+
130
+ | 対象 | 通知内容 | 通知時期 | 手段 | 担当 |
131
+ |---|---|---|---|---|
132
+ | 利用者 | <停止・変更・再開> | <時期> | <メール・画面> | <担当> |
133
+ | 問い合わせ窓口 | <FAQ・既知問題> | <時期> | <手段> | <担当> |
134
+ | 経営・顧客 | <進捗・障害> | <条件> | <手段> | <担当> |
135
+
136
+ - 停止中の代替業務: <手作業・受付停止など>
137
+ - 再開後の問い合わせ増加対応: <増員・期間>
138
+
139
+ ## セキュリティと監査
140
+
141
+ - 移行データの暗号化: <転送時・保存時>
142
+ - 一時ファイル: <保管場所・アクセス・削除期限>
143
+ - 特権アクセス: <申請・有効期限・監査>
144
+ - 個人情報・機密情報: <マスキング・取扱い>
145
+ - 操作証跡: <記録内容・保存期間>
146
+
147
+ ## 移行後の安定化
148
+
149
+ | 期間 | 監視強化項目 | 判定基準 | 担当 | 通常運用への移行条件 |
150
+ |---|---|---|---|---|
151
+ | <期間> | <エラー率・照合・問い合わせ> | <閾値> | <担当> | <条件> |
152
+
153
+ - 旧環境の扱い: <参照専用、保持期間、廃止日>
154
+ - 一時データ・権限の削除: <期限・証跡>
155
+ - 未移行・エラーデータの処理: <方法・期限>
156
+
157
+ ## リスクと未解決事項
158
+
159
+ | ID | 内容 | 影響 | 発生可能性 | 対策・期限 | 所有者 | ステータス |
160
+ |---|---|---|---|---|---|---|
161
+ | MIG-RSK-001 | <内容> | High / Medium / Low | High / Medium / Low | <対策> | <担当> | Open |
162
+
163
+ ## 承認記録
164
+
165
+ | 版 | 承認日 | 承認者 | 判断 | 条件・コメント |
166
+ |---|---|---|---|---|
167
+ | <版> | <YYYY-MM-DD> | <氏名・会議体> | Approved / Rejected / Deferred | <条件> |
168
+
169
+ ## 変更履歴
170
+
171
+ | 版 | 日付 | 変更内容 | 変更理由 | 作成者 |
172
+ |---|---|---|---|---|
173
+ | 0.1 | <YYYY-MM-DD> | 初版 | <理由> | <氏名> |
@@ -0,0 +1,202 @@
1
+ # <サービス名> 運用設計書・Runbook
2
+
3
+ <サービスを安定して監視・変更・復旧するために、運用担当者が実行する判断と手順を3文以内で要約する。>
4
+
5
+ - 文書版: <例: 1.0>
6
+ - 作成日: <YYYY-MM-DD>
7
+ - 最終更新日: <YYYY-MM-DD>
8
+ - サービス所有者: <チーム・責任者>
9
+ - 運用責任者: <チーム・責任者>
10
+ - ステータス: Draft / In Review / Approved
11
+ - 対象環境: Production / Staging / <その他>
12
+ - 関連設計書: <文書名・版・URL>
13
+
14
+ ## この運用設計で合意する事項
15
+
16
+ - 運用対象とサービス時間: <対象・時間帯>
17
+ - 運用体制: <担当、当番、委託先>
18
+ - サービス目標: <SLO・復旧目標>
19
+ - 承認を求める事項: <監視、権限、手順、残余リスク>
20
+
21
+ ## サービス概要と依存関係
22
+
23
+ | 項目 | 内容 |
24
+ |---|---|
25
+ | 利用者・業務 | <対象利用者と重要業務> |
26
+ | 主要機能 | <機能> |
27
+ | サービス時間 | <曜日・時間・計画停止> |
28
+ | 依存サービス | <クラウド、外部API、ネットワークなど> |
29
+ | データストア | <種類・場所> |
30
+ | 構成管理 | <IaC・設定リポジトリ> |
31
+ | ダッシュボード | <URL> |
32
+ | Issue・問い合わせ | <URL・窓口> |
33
+
34
+ ```mermaid
35
+ flowchart LR
36
+ U[<利用者>] --> S[<対象サービス>]
37
+ S --> D[(<データストア>)]
38
+ S --> E[<外部依存サービス>]
39
+ M[<監視基盤>] --> S
40
+ ```
41
+
42
+ ## サービスレベルと運用指標
43
+
44
+ | SLI | 測定方法 | SLO | 集計期間 | エラーバジェット | 未達時の対応 |
45
+ |---|---|---:|---|---:|---|
46
+ | <可用性・遅延など> | <式・データソース> | <値> | <期間> | <値> | <変更停止・改善> |
47
+
48
+ ## 運用体制と連絡経路
49
+
50
+ | 役割 | 担当 | 対応時間 | 責任 | 連絡方法 |
51
+ |---|---|---|---|---|
52
+ | サービス所有者 | <担当> | <時間帯> | <判断・予算> | <方法> |
53
+ | オンコール | <担当> | <時間帯> | <一次対応> | <方法> |
54
+ | セキュリティ | <担当> | <時間帯> | <事故対応> | <方法> |
55
+
56
+ ### エスカレーション
57
+
58
+ | 条件 | 一次連絡 | 二次連絡 | 経営・顧客連絡 | 期限 |
59
+ |---|---|---|---|---|
60
+ | <重大度・継続時間> | <担当> | <担当> | <担当> | <時間> |
61
+
62
+ ## 監視・ログ・アラート
63
+
64
+ | 監視ID | 対象 | シグナル | 閾値・条件 | 重要度 | 通知先 | Runbook節 |
65
+ |---|---|---|---|---|---|---|
66
+ | MON-001 | <対象> | <メトリクス・ログ> | <条件と継続時間> | Critical / Warning | <通知先> | <節名> |
67
+
68
+ - ログ保存期間: <期間>
69
+ - トレース・相関ID: <方式>
70
+ - 機密情報のマスキング: <対象・方式>
71
+ - 通知抑制・重複排除: <方式>
72
+ - アラート試験: <頻度・方法>
73
+
74
+ ## 日次・週次・月次の定常作業
75
+
76
+ | 頻度 | 作業 | 手順 | 完了条件 | 証跡 | 担当 |
77
+ |---|---|---|---|---|---|
78
+ | 日次 | <作業> | <コマンド・URL・手順> | <確認結果> | <保存先> | <担当> |
79
+ | 週次 | <作業> | <手順> | <確認結果> | <保存先> | <担当> |
80
+ | 月次 | <作業> | <手順> | <確認結果> | <保存先> | <担当> |
81
+
82
+ ## インシデントの重大度と初動
83
+
84
+ | 重大度 | 定義 | 例 | 応答期限 | 更新頻度 | 指揮権 |
85
+ |---|---|---|---|---|---|
86
+ | SEV-1 | <全停止・重大漏えいなど> | <例> | <時間> | <間隔> | <役割> |
87
+ | SEV-2 | <主要機能障害など> | <例> | <時間> | <間隔> | <役割> |
88
+ | SEV-3 / 4 | <限定影響> | <例> | <時間> | <間隔> | <役割> |
89
+
90
+ ### 共通初動
91
+
92
+ 1. <アラートと利用者影響を確認する。>
93
+ 2. <インシデントを起票し、指揮担当と記録担当を決める。>
94
+ 3. <直近変更、依存先、主要メトリクスを確認する。>
95
+ 4. <影響拡大を止めるための緩和策を実施する。>
96
+ 5. <定めた頻度で関係者へ状況を更新する。>
97
+ 6. <復旧を検証し、事後レビューを登録する。>
98
+
99
+ ## 症状別Runbook
100
+
101
+ ### <症状・アラート名>
102
+
103
+ - 検知条件: <アラート・問い合わせ>
104
+ - 利用者影響: <影響>
105
+ - 安全上の注意: <実行禁止条件・承認が必要な操作>
106
+
107
+ 1. <ダッシュボード・ログで事象を確認する。>
108
+ 2. <切り分けコマンドまたは画面操作を実行する。>
109
+ 3. <一時的な緩和策を実行する。>
110
+ 4. <正常化をSLIと利用者操作で確認する。>
111
+
112
+ - エスカレーション条件: <条件>
113
+ - 復旧しない場合: <代替手段・停止判断>
114
+ - 証跡: <保存するログ・時刻・操作>
115
+
116
+ ## 起動・停止・再起動
117
+
118
+ | 操作 | 実行条件 | 手順 | 正常性確認 | 失敗時の対応 | 承認 |
119
+ |---|---|---|---|---|---|
120
+ | 起動 | <条件> | <手順> | <ヘルスチェック> | <復旧> | <要否> |
121
+ | 停止 | <条件> | <手順> | <停止確認> | <復旧> | <要否> |
122
+ | 再起動 | <条件> | <手順> | <正常性確認> | <ロールバック> | <要否> |
123
+
124
+ ## バックアップとリストア
125
+
126
+ | 対象 | 方式 | 頻度 | 保持期間 | 暗号化 | 復元目標 | 復元試験 |
127
+ |---|---|---|---|---|---|---|
128
+ | <データ・設定> | <方式> | <頻度> | <期間> | <方式> | RTO / RPO | <頻度・証跡> |
129
+
130
+ ### リストア手順
131
+
132
+ - 前提・承認: <障害状況、復元時点、影響範囲、実行承認者>
133
+ - 復元先: <原則として隔離環境へ先行復元し、検証後に本番へ適用する>
134
+ - 失敗時の対応: <中止条件、再試行上限、エスカレーション先>
135
+ - 証跡: <承認、スナップショット、ログ、検証結果の保存先>
136
+
137
+ 1. <復元時点、影響範囲、復元先について承認を得る。>
138
+ 2. <現在状態のスナップショットと操作開始時刻を記録する。>
139
+ 3. <隔離環境へ復元し、バックアップの完全性と復元手順を検証する。>
140
+ 4. <本番への書き込み停止または対象データの隔離を実施する。>
141
+ 5. <承認済みの復元先へバックアップを復元する。>
142
+ 6. <件数、参照整合性、アプリケーション動作を検証する。>
143
+ 7. <サービスを再開し、監視結果と利用者影響を確認する。>
144
+ 8. <関係者へ結果を通知し、すべての証跡を保存する。>
145
+
146
+ ## セキュリティ運用
147
+
148
+ - 特権アクセス: <申請、承認、有効期限、記録>
149
+ - シークレット・鍵・証明書: <保管、更新、失効、期限監視>
150
+ - 脆弱性対応: <検知元、重大度、修正期限>
151
+ - 監査ログ: <対象、保存期間、確認頻度>
152
+ - セキュリティ事故: <隔離、証拠保全、連絡先>
153
+
154
+ ## 変更・リリース・ロールバック
155
+
156
+ | 変更区分 | 承認 | 実施時間帯 | 検証 | ロールバック条件 |
157
+ |---|---|---|---|---|
158
+ | 標準変更 | <承認者> | <時間帯> | <確認> | <条件> |
159
+ | 通常変更 | <承認者> | <時間帯> | <確認> | <条件> |
160
+ | 緊急変更 | <承認者> | <時間帯> | <事後確認> | <条件> |
161
+
162
+ - リリース手順: <パイプライン・段階展開>
163
+ - 変更前確認: <バックアップ・依存先・エラーバジェット>
164
+ - 変更後確認: <SLI・ログ・利用者シナリオ>
165
+ - ロールバック手順: <復旧先・データ互換性>
166
+
167
+ ## 容量・性能・コスト管理
168
+
169
+ | 指標 | 現在値 | 警告閾値 | 上限 | 拡張方法 | 確認頻度 |
170
+ |---|---:|---:|---:|---|---|
171
+ | <CPU・容量・件数・費用> | <値> | <値> | <値> | <方法> | <頻度> |
172
+
173
+ ## 災害復旧と事業継続
174
+
175
+ - 災害シナリオ: <リージョン障害・拠点喪失など>
176
+ - RTO / RPO: <値>
177
+ - 切替判断者: <役割>
178
+ - 切替・切戻し手順: <手順参照>
179
+ - 代替業務: <手作業・縮退運転>
180
+ - 訓練頻度と証跡: <頻度・保存先>
181
+
182
+ ## リスクと未解決事項
183
+
184
+ | ID | 内容 | 影響 | 対応・期限 | 所有者 | ステータス |
185
+ |---|---|---|---|---|---|
186
+ | OPS-RSK-001 | <内容> | <影響> | <対応> | <担当> | Open |
187
+
188
+ ## Runbookの有効性と陳腐化検知
189
+
190
+ - 定期レビュー期限: <例: 90日ごと>
191
+ - 臨時レビュー条件: <構成、依存先、権限、アラート、復旧方式の変更>
192
+ - 期限超過時の扱い: <警告、利用停止、再検証が必要な手順>
193
+
194
+ | Runbook・手順 | 最終実行・訓練日 | 検証した構成版 | 次回期限 | 所有者 | 状態 |
195
+ |---|---|---|---|---|---|
196
+ | <手順名> | <YYYY-MM-DD> | <バージョン・構成> | <YYYY-MM-DD> | <担当> | Current / Review Due / Stale |
197
+
198
+ ## レビューと変更履歴
199
+
200
+ | 版 | 日付 | 変更内容・訓練結果 | レビュー担当 | 次回見直し |
201
+ |---|---|---|---|---|
202
+ | 0.1 | <YYYY-MM-DD> | 初版 | <担当> | <YYYY-MM-DD> |