@acceler-digital/karura 0.0.0-stage → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/.claude/hooks/lint-text-style.py +876 -0
  2. package/.claude/settings.json +17 -0
  3. package/.claude/skills/d0-create-artifact-skill/SKILL.md +123 -0
  4. package/.claude/skills/d0-create-artifact-skill/skill-writing-rules.md +67 -0
  5. package/.claude/skills/d0-create-artifact-skill/template.md +63 -0
  6. package/.claude/skills/d1-actor-list/SKILL.md +66 -0
  7. package/.claude/skills/d1-actor-list/template.md +54 -0
  8. package/.claude/skills/d1-business-requirement-document/SKILL.md +116 -0
  9. package/.claude/skills/d1-business-requirement-document/template.md +251 -0
  10. package/.claude/skills/d1-domain-common-requirement-document/SKILL.md +112 -0
  11. package/.claude/skills/d1-domain-common-requirement-document/template.md +120 -0
  12. package/.claude/skills/d1-domain-definition-document/SKILL.md +67 -0
  13. package/.claude/skills/d1-domain-definition-document/template.md +113 -0
  14. package/.claude/skills/d1-domain-requirement-document/SKILL.md +119 -0
  15. package/.claude/skills/d1-domain-requirement-document/template.md +135 -0
  16. package/.claude/skills/d1-product-requirement-document/SKILL.md +104 -0
  17. package/.claude/skills/d1-product-requirement-document/template.md +287 -0
  18. package/.claude/skills/d1-screen-concepts/SKILL.md +154 -0
  19. package/.claude/skills/d1-screen-concepts/template.md +112 -0
  20. package/.claude/skills/d1-use-case-list/SKILL.md +137 -0
  21. package/.claude/skills/d1-use-case-list/template.md +29 -0
  22. package/.claude/skills/d1-user-story-list/SKILL.md +119 -0
  23. package/.claude/skills/d1-user-story-list/template.md +27 -0
  24. package/.claude/skills/d2-c4-level1-sequences/SKILL.md +162 -0
  25. package/.claude/skills/d2-c4-level1-sequences/example.md +83 -0
  26. package/.claude/skills/d2-c4-level1-sequences/template.md +47 -0
  27. package/.claude/skills/d2-c4-level1-system-context/SKILL.md +51 -0
  28. package/.claude/skills/d2-c4-level1-system-context/template.md +48 -0
  29. package/.claude/skills/d2-conceptual-data-model/SKILL.md +138 -0
  30. package/.claude/skills/d2-conceptual-data-model/example.md +75 -0
  31. package/.claude/skills/d2-conceptual-data-model/template.md +60 -0
  32. package/.claude/skills/d2-external-system-list/SKILL.md +33 -0
  33. package/.claude/skills/d2-external-system-list/template.md +15 -0
  34. package/.claude/skills/d2-function-list/SKILL.md +50 -0
  35. package/.claude/skills/d2-function-list/template.md +15 -0
  36. package/.claude/skills/d2-non-functional-requirements/SKILL.md +129 -0
  37. package/.claude/skills/d2-non-functional-requirements/template-chapter.md +32 -0
  38. package/.claude/skills/d2-non-functional-requirements/template-general.md +56 -0
  39. package/.claude/skills/d2-screen-flow-diagram/SKILL.md +85 -0
  40. package/.claude/skills/d2-screen-flow-diagram/template.md +32 -0
  41. package/.claude/skills/d2-screen-list/SKILL.md +93 -0
  42. package/.claude/skills/d2-screen-list/template.md +15 -0
  43. package/.claude/skills/d3-application-architecture/SKILL.md +110 -0
  44. package/.claude/skills/d3-application-architecture/template.md +123 -0
  45. package/.claude/skills/d3-c4-level2-container/SKILL.md +90 -0
  46. package/.claude/skills/d3-c4-level2-container/template.md +62 -0
  47. package/.claude/skills/d3-c4-level2-sequences/SKILL.md +121 -0
  48. package/.claude/skills/d3-c4-level2-sequences/template.md +85 -0
  49. package/.claude/skills/d3-er-diagram/SKILL.md +123 -0
  50. package/.claude/skills/d3-er-diagram/template.md +61 -0
  51. package/.claude/skills/d8-system-test-plan/SKILL.md +98 -0
  52. package/.claude/skills/d8-system-test-plan/template.md +128 -0
  53. package/.claude/skills/d9-test-data-requirements/SKILL.md +97 -0
  54. package/.claude/skills/d9-test-data-requirements/template.md +11 -0
  55. package/.claude/skills/d9-test-data-tool/SKILL.md +92 -0
  56. package/.claude/skills/d9-test-data-tool/template.md +23 -0
  57. package/.claude/skills/d9-test-perspectives/SKILL.md +118 -0
  58. package/.claude/skills/d9-test-perspectives/template.md +11 -0
  59. package/.claude/skills/d9-test-specification/SKILL.md +111 -0
  60. package/.claude/skills/d9-test-specification/template.md +11 -0
  61. package/CLAUDE.md +355 -0
  62. package/LICENSE +201 -0
  63. package/README.md +197 -2
  64. package/cli/assets/logo-ascii.txt +13 -0
  65. package/cli/assets/logo-wide-ascii.txt +14 -0
  66. package/cli/assets/logo-wide.txt +14 -0
  67. package/cli/assets/logo.txt +13 -0
  68. package/cli/bin/karura.js +163 -0
  69. package/cli/lib/banner.js +241 -0
  70. package/cli/lib/init.js +230 -0
  71. package/cli/lib/terminal.js +65 -0
  72. package/docs/D0.project-management/artifact-flow.drawio.svg +5263 -0
  73. package/docs/D0.project-management/artifact-flow.md +3 -0
  74. package/package.json +48 -4
  75. package/scripts/check-markers.sh +74 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,198 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
+ <img src="static/img/karura-logo.png" alt="KARURA" width="700" />
2
3
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
4
+ **ビジネス要求から保守運用まで、成果物を一貫生成する<br>エンタープライズ向けAI駆動開発総合フレームワーク**
5
+
6
+ [![License](https://img.shields.io/github/license/Acceler-Digital/karura?style=flat-square)](LICENSE)
7
+ [![Release](https://img.shields.io/github/v/release/Acceler-Digital/karura?include_prereleases&label=release&style=flat-square)](https://github.com/Acceler-Digital/karura/releases)
8
+ [![npm](https://img.shields.io/npm/v/@acceler-digital/karura?style=flat-square)](https://www.npmjs.com/package/@acceler-digital/karura)
9
+
10
+ [![成果物フロー](https://img.shields.io/badge/🗺_成果物フロー-181717?style=for-the-badge)](docs/D0.project-management/artifact-flow.md)
11
+ [![ハンドブック](https://img.shields.io/badge/📚_ハンドブック-181717?style=for-the-badge)](handbook/README.md)
12
+ [![corporate](https://img.shields.io/badge/🌐_corporate-acceler--digital.com-181717?style=for-the-badge)](https://www.acceler-digital.com/)
13
+ </div>
14
+
15
+ ## 注記: 現在β版です
16
+
17
+ > [!NOTE]
18
+ > KARURAは現在 **β版(v0.x)** です。スキル・テンプレートは今後も多くの追加・変更を予定しています。
19
+
20
+ 現在、KARURAについて多くのお問い合わせをいただいており、誠にありがとうございます。すでにプロジェクトで参照・利用を始めていただいている方も多いため、現時点の状態について以下の点にご留意ください。
21
+
22
+ - **スキル・テンプレートは今後大幅に増えます**: 成果物フローに定義した成果物のうち、現時点でスキル・テンプレートを収録しているのは一部のみです。今後順次追加していきます。
23
+ - **破壊的変更が入る可能性があります**: 正式版(v1.0)までは、スキル名・テンプレートの章構成・ID体系・成果物フロー等を、後方互換性を保たずに変更することがあります。
24
+ - **実プロジェクトで利用する場合は、バージョンを固定してください**: `npm install -g @acceler-digital/karura@<バージョン>`のようにインストールするバージョンを指定し、更新を取り込む際は差分を確認したうえで反映することを推奨します。公開済みのバージョンは、`npm view @acceler-digital/karura versions`または[リリース一覧](https://github.com/Acceler-Digital/karura/releases)で確認できます。
25
+
26
+ 不具合のご報告や改善のご提案は [GitHub Issues](https://github.com/Acceler-Digital/karura/issues) までお寄せください。
27
+
28
+ ## KARURAとは
29
+
30
+ KARURAは、Acceler DigitalのAI駆動開発の知見を体系化した、エンタープライズ向けAI駆動開発総合フレームワークです。大規模、且つ、ミッションクリティカルなシステム開発を対象に、生成AI(Claude Code等)を使ってビジネス要求からリリース・保守運用までの成果物を一貫した体系として生成するための仕組み一式を提供します。
31
+
32
+ 成果物体系は金融機関を中心とした現場での実践における知見を中核としつつ、ISO/IEC/IEEE 12207をはじめとする国際規格や、ISTQBやPMBOK等業界標準ガイドを掛け合わせて構築されています。
33
+
34
+ > [!TIP]
35
+ > **まず実物を見たい方へ** - KARURAで実際に生成した成果物一式は[成果物サンプル(生命保険 新契約システム)](https://github.com/Acceler-Digital/karura-sample-artifacts-individual-life-insurance-new-business)で公開しています。
36
+
37
+ ### KARURAの収録要素
38
+ | 収録要素 | 該当成果物 | 内容 |
39
+ | --- | --- | --- |
40
+ | **スキル定義** | [.claude/skills/](.claude/skills/) | Claudeが各成果物を生成・更新するための振る舞いルール。スラッシュコマンド`/<スキル名>`で呼び出し。 |
41
+ | **成果物テンプレート** | [.claude/skills/](.claude/skills/) 配下の各スキルの`template.md` | 成果物の骨組み(章構成・書き方ヒント)。AIが読み込んで記入するフォーマット。 |
42
+ | **プロジェクト共通規約** | [CLAUDE.md](CLAUDE.md) | プレースホルダ・ID表記・文体などの横断規約。Claude Codeが常に読み込み、各スキルの生成・更新時に適用。 |
43
+ | **成果物フロー** | [docs/D0.project-management/artifact-flow.md](docs/D0.project-management/artifact-flow.md) | 全成果物のinput/outputの依存関係・生成順の定義 |
44
+ | **表記規約フック** | [.claude/hooks/lint-text-style.py](.claude/hooks/lint-text-style.py) | Markdownの作成・編集直後に、和欧間スペースの自動修正やリンク切れの検出を行うClaude Codeのフック |
45
+ | **補助スクリプト** | [scripts/check-markers.sh](scripts/check-markers.sh) | 成果物に残った要確認マーカー・プレースホルダの集計 |
46
+ | **karuraコマンド** | [cli/](cli/) | 上記一式を自分のプロジェクトに導入するCLI。`npm install -g @acceler-digital/karura`でインストールし、`karura init`で実行する。 |
47
+
48
+ ## 成果物フロー
49
+
50
+ KARURAにおいて、中核となる考え方が[成果物フロー](docs/D0.project-management/artifact-flow.drawio.svg)です。各成果物が何をインプットとし、何をアウトプットするのか、成果物同士の依存関係を定義したものであり、KARURAにおけるAIの挙動の根底になります。
51
+
52
+ 各成果物はD0~D11のフェーズに分かれており、フェーズ単位の簡略版の全体像は以下の通りです。
53
+
54
+ ```mermaid
55
+ flowchart LR
56
+ classDef included fill:#2da44e,stroke:#2da44e,color:#fff
57
+ classDef planned fill:#f6f8fa,stroke:#d0d7de,color:#57606a
58
+
59
+ D1["D1 ビジネス要求"]:::included --> D2["D2 システム要件"]:::included
60
+ D2 --> D3["D3 システム設計"]:::included
61
+ D3 --> D4["D4 実装・UT・内部結合テスト(ITa)"]:::planned
62
+ D4 --> D5["D5 E2Eテスト(ITb)"]:::planned
63
+ D5 --> D6["D6 システムテスト"]:::planned
64
+ D6 --> D7["D7 リリース"]:::planned
65
+ D2 --> D10["D10 システム運用要件"]:::planned
66
+ D10 --> D11["D11 システム運用設計"]:::planned
67
+ D11 --> D6
68
+ D2 -->D8["D8 テスト計画"]:::included
69
+ D8 --> D4
70
+ D8 -->D9["D9 テスト設計"]:::included
71
+ D9 --> D5 & D6
72
+ D0["D0 プロジェクトマネジメント(全フェーズ横断)"]:::planned
73
+ ```
74
+
75
+ 🟩 = 本リポジトリにスキルを収録しているフェーズ(フェーズ内の一部の成果物のみを含む)
76
+
77
+ ## ハンドブック
78
+
79
+ KARURA全体の考え方と、各成果物の目的・作り込み/レビューの勘所は、リポジトリ直下の [handbook/](handbook/README.md) にまとめています。
80
+
81
+ ## クイックスタート
82
+
83
+ ### 環境準備
84
+
85
+ KARURAの利用に必要なツールは以下の通りです。用途に応じて導入してください(インストールが必要なものはすべてこの欄に集約しています)。
86
+
87
+ | ツール | 用途 | 備考 |
88
+ | --- | --- | --- |
89
+ | [Claude Code](https://code.claude.com/) | 成果物の生成・更新(必須) | — |
90
+ | `git` | バージョン管理(必須) | 通常はプリインストール済み |
91
+ | `bash` | 補助スクリプト(マーカー集計 等)の実行 | macOS / Linuxは標準搭載。**WindowsはWSLまたはGit Bashが必要** |
92
+ | [Node.js](https://nodejs.org/) 22以降 | `karura`コマンドの実行(導入時のみ) | 導入したファイルの利用には不要 |
93
+ | [Python](https://www.python.org/) 3.9以降 | 表記規約フック(`.claude/hooks/lint-text-style.py`)の実行 | 未導入でも成果物は生成できるが、和欧間スペースの自動修正やリンク切れの検出が行われない。macOSはXcode Command Line Toolsに同梱。**Windowsは`python3`コマンドで起動できるようにする必要がある** |
94
+
95
+ ### 1. karuraコマンドをインストールする
96
+
97
+ 最初に1回だけ、次のコマンドを実行します。以降は`karura`コマンドとして使えます。
98
+
99
+ ```bash
100
+ npm install -g @acceler-digital/karura
101
+ ```
102
+
103
+ - **権限エラー(`EACCES`)で止まる場合は、** [npm公式の対処法](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally)を参照してください。
104
+ - **`karura`コマンドは、自動では新しいバージョンになりません。** `npm update -g @acceler-digital/karura`で更新します。インストール中のバージョンは`karura --version`で確認できます。
105
+
106
+ ### 2. プロジェクトに導入する
107
+
108
+ 自分のプロジェクトのディレクトリで、次のコマンドを実行します。
109
+
110
+ ```bash
111
+ cd <自分のプロジェクト>
112
+ karura init
113
+ ```
114
+
115
+ `.claude/`配下一式(スキル定義・テンプレート、表記規約フック、Claude Codeの設定)、共通規約(`CLAUDE.md`)、成果物フロー(`docs/D0.project-management/`)、補助スクリプト(`scripts/check-markers.sh`)がコピーされます。スキル定義・テンプレートは、プロジェクトの特性に合わせてカスタマイズして使う前提です。
116
+
117
+ - **既存のファイルは上書きしません。** 同じパスに内容の異なるファイルがあると、何も変更せずに止まります。上書きしてよい場合は`--force`を付けます。`.claude/settings.json`だけは例外で、既存の設定を残したままKARURAの設定を足します。
118
+ - **実行前に確認できます。** `--dry-run`を付けると、書き込まずに操作の一覧だけを表示します。
119
+ - **バージョンを固定できます。** `npm install -g @acceler-digital/karura@<バージョン>`のように、インストールするバージョンを指定してください(冒頭の注記を参照)。
120
+ - **導入記録をコミットしてください。** 導入したバージョンとファイルごとのハッシュを`.karura/manifest.json`に記録します。今後のバージョンアップで使います。
121
+ - **導入済みのファイルの更新は今後対応します。** `karura`コマンドを新しいバージョンにしても、導入済みのファイルは変わりません。カスタマイズを残したまま更新する`karura update`は未対応です。
122
+
123
+ KARURA本体を改変・コントリビュートする場合は、本リポジトリを`git clone`してください。コントリビュートの前に[CONTRIBUTING.md](CONTRIBUTING.md)(CLAへの同意 等)を確認してください。
124
+
125
+ ### 3. 最初の成果物を生成する
126
+
127
+ プロジェクト立ち上げの起点はビジネス要件定義書です。導入したプロジェクトでClaude Codeを起動し、スラッシュコマンドを実行します。
128
+
129
+ ```
130
+ /d1-business-requirement-document
131
+ ```
132
+
133
+ 以降は[成果物フロー](docs/D0.project-management/artifact-flow.md)に沿って、各成果物のスラッシュコマンド(`/d1-actor-list`、`/d2-function-list`など)を順に実行していきます。上流の成果物を入力として下流の成果物が生成されるため、生成順はフローに従ってください。
134
+
135
+ 生成された成果物は`docs/<フェーズ>/`配下(例: `docs/D1.business-requirements/`)に配置していく運用を想定しています。本リポジトリの`docs/`には成果物フローのみを置いています(生成物の実例は [成果物サンプル](#成果物サンプル) を参照)。
136
+
137
+ ## 本リポジトリに含まれないもの
138
+
139
+ 本リポジトリ(OSS版)は、KARURAの全体像を理解し、上流工程を中心に体験していただくためのものです。以下は**含まれません**。
140
+
141
+ - **全フェーズ・全成果物のスキル / テンプレート一式** — 成果物フローには80種類以上の成果物を定義していますが、本リポジトリには一部のフェーズのみを収録しています。今後も拡張を続けますが、全量を収録する予定はありません
142
+ - **導入・伴走サポート** — プロジェクトへの導入支援、成果物のレビュー、プロジェクト特性に合わせたスキル / テンプレートのカスタマイズ
143
+
144
+ 全フェーズに対応した完全版の提供や、導入・伴走サポートが必要な場合は、別途ご契約のうえで提供しています。[Acceler Digital](https://www.acceler-digital.com/) までお問い合わせください。
145
+
146
+ ## 付属ツール
147
+
148
+ ### 要確認マーカーの集計
149
+
150
+ AIは自身で生成した内容に自信がない場合、要確認マーカーを付けます。[docs/](docs/) 配下に残っている未確定マーカー(プレースホルダ`{{xxx}}`と要確認マーカー`要確認`)の件数・該当ファイルを以下で集計できます。レビュー時の気付き支援用で、CIでfailさせる目的ではありません(スクリプトは常にexit 0)。
151
+
152
+ ```bash
153
+ bash scripts/check-markers.sh
154
+ ```
155
+
156
+ スクリプトは [scripts/check-markers.sh](scripts/check-markers.sh) です。マーカー記法は [CLAUDE.md](CLAUDE.md) §1〜§3を参照してください。
157
+
158
+ ## リポジトリ構成
159
+
160
+ ```
161
+ .
162
+ ├── .claude/
163
+ │ ├── skills/ # Claude スキル定義(フェーズ別、テンプレート同梱)
164
+ │ │ ├── d1-business-requirement-document/
165
+ │ │ │ ├── SKILL.md # スキル本体(振る舞いルール)
166
+ │ │ │ └── template.md # 成果物テンプレート(章構成・書き方ヒント入り)
167
+ │ │ └── ... # d0-* / d1-* / d2-* / d3-* / d8-* / d9-* 各スキル
168
+ │ ├── hooks/
169
+ │ │ └── lint-text-style.py # 表記規約フック(和欧間スペースの自動修正・リンク切れ検出 等)
170
+ │ └── settings.json # Claude Code 設定(表記規約フックの登録)
171
+ ├── .github/workflows/ # karura コマンドのテストと npm 公開
172
+ ├── cli/ # karura コマンドの実装とテスト
173
+ ├── docs/
174
+ │ └── D0.project-management/ # 成果物フロー
175
+ ├── handbook/ # KARURA の設計思想・方法論の解説
176
+ ├── scripts/
177
+ │ └── check-markers.sh # 未確定マーカー集計
178
+ ├── CLAUDE.md # 横断規約(プレースホルダ・ID 表記・文体 等)
179
+ ├── CONTRIBUTING.md # コントリビューションガイド(CLA への同意 等)
180
+ ├── package.json # karura コマンド専用の npm パッケージ定義(他の用途には使わない)
181
+ └── SECURITY.md # 脆弱性の報告手順(セキュリティポリシー)
182
+ ```
183
+
184
+ ## 成果物サンプル
185
+ KARURAを使用した成果物サンプルとして、以下リポジトリをご用意しております。実際にプロジェクトに適用する前に、各成果物に対するイメージを掴む際にご利用ください。
186
+
187
+ 👉 **[KARURA成果物サンプル - 生命保険 新契約システム](https://github.com/Acceler-Digital/karura-sample-artifacts-individual-life-insurance-new-business)**
188
+
189
+ ## お問い合わせ
190
+
191
+ - **バグ報告・改善提案** — [GitHub Issues](https://github.com/Acceler-Digital/karura/issues)
192
+ - **完全版の提供・導入支援・伴走サポートのご相談** — Acceler Digitalのお問い合わせ窓口までお願いいたします。
193
+ [![corporate](https://img.shields.io/badge/🌐_corporate-acceler--digital.com-181717?style=for-the-badge)](https://www.acceler-digital.com/)
194
+
195
+
196
+ ## ライセンス
197
+
198
+ 本リポジトリに含まれるドキュメント・図・設定ファイル・スクリプトは [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) の下で提供されます。全文は同梱の [LICENSE](LICENSE) を参照してください。
@@ -0,0 +1,13 @@
1
+
2
+ oooooo
3
+ "8 8888o
4
+ 8888 "
5
+ ooooooo8888ooooooo
6
+ 88888888888888888888 88 88 d888888 8888888 88 88 8888888 d888888
7
+ 888888"888888"888888 88 d8' 88 88 88 88 88 88 88 88 88 88
8
+ 888888 888888 888888 88888b 8888888 888888P 88 88 888888P 8888888
9
+ 888888 "8888" 888888 88 Y8b 88 88 88 Y8b 88 88 88 Y8b 88 88
10
+ 8888"" "88" ""8888 88 88 88 88 88 88 Y888888 88 88 88 88
11
+ 88"" o88o ""88
12
+ o8888o Enterprise AI-Driven Development Framework v{version}
13
+
@@ -0,0 +1,14 @@
1
+
2
+ "MMMMMMMb
3
+ dMMMMb "
4
+ ..gMMMMMMMMMMMMg..
5
+ .dMMMMMMMMMMMMMMMMMMb. MMM MMM .dMMMMMMM MMMMMMMMMM MMM MMM MMMMMMMMMM .dMMMMMMM
6
+ MMMMMMMMMMMMMMMMMMMMMMMM MMM MMM dMMP MMM MMM MMM MMM MMM MMM MMM dMMP MMM
7
+ MMMMMMMYMMMMMMMMYMMMMMMM MMM .MMP MMM MMM MMM .MMP MMM MMM MMM .MMP MMM MMM
8
+ MMMMMMM MMMMMMMM MMMMMMM MMMMMMMMP MMMMMMMMMM MMMMMMMMP MMM MMM MMMMMMMMP MMMMMMMMMM
9
+ MMMMMMM YMMMMMMP MMMMMMM MMM YMMb MMM MMM MMM YMMb MMM MMM MMM YMMb MMM MMM
10
+ MMMMMP" YMMMMP "YMMMMM MMM YMMb MMM MMM MMM YMMb YMMb MMM MMM YMMb MMM MMM
11
+ MMMP" YMMP "YMMM MMM YMM MMM MMM MMM YMM "YMMMMMMM MMM YMM MMM MMM
12
+ MP" .dMMb. "YM
13
+ dMMMMMMb Enterprise AI-Driven Development Framework v{version}
14
+
@@ -0,0 +1,14 @@
1
+
2
+ ▀███████▄
3
+ ██████ ▀
4
+ ▄▄▄▄▄▄██████▄▄▄▄▄▄
5
+ ▄████████████████████▄ ███ ███ ▄████████ ██████████ ███ ███ ██████████ ▄████████
6
+ ████████████████████████ ███ ███ ███▀▀▀▀███ ███▀▀▀▀███ ███ ███ ███▀▀▀▀███ ███▀▀▀▀███
7
+ ███████▀████████▀███████ ███ ▄██▀ ███ ███ ███ ▄██▀ ███ ███ ███ ▄██▀ ███ ███
8
+ ███████ ████████ ███████ ████████▀ ██████████ ████████▀ ███ ███ ████████▀ ██████████
9
+ ███████ ▀██████▀ ███████ ███▀▀███▄ ███▀▀▀▀███ ███▀▀███▄ ███ ███ ███▀▀███▄ ███▀▀▀▀███
10
+ █████▀▀ ▀████▀ ▀▀█████ ███ ▀██▄ ███ ███ ███ ▀██▄ ███▄▄▄▄███ ███ ▀██▄ ███ ███
11
+ ███▀▀ ▀██▀ ▀▀███ ███ ███ ███ ███ ███ ███ ▀████████ ███ ███ ███ ███
12
+ ██▀ ▄██▄ ▀██
13
+ ▄██████▄ Enterprise AI-Driven Development Framework v{version}
14
+
@@ -0,0 +1,13 @@
1
+
2
+ ▄▄▄▄▄▄
3
+ ▀█▀████▄
4
+ ████ ▀
5
+ ▄▄▄▄▄▄▄████▄▄▄▄▄▄▄
6
+ ████████████████████ ██ ██ ▄██████ ███████ ██ ██ ███████ ▄██████
7
+ ██████▀██████▀██████ ██ ▄█▀ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
8
+ ██████ ██████ ██████ █████▄ ███████ ██████▀ ██ ██ ██████▀ ███████
9
+ ██████ ▀████▀ ██████ ██ ▀█▄ ██ ██ ██ ▀█▄ ██ ██ ██ ▀█▄ ██ ██
10
+ ████▀▀ ▀██▀ ▀▀████ ██ ██ ██ ██ ██ ██ ▀██████ ██ ██ ██ ██
11
+ ██▀▀ ▄██▄ ▀▀██
12
+ ▄████▄ Enterprise AI-Driven Development Framework v{version}
13
+
@@ -0,0 +1,163 @@
1
+ #!/usr/bin/env node
2
+ import path from 'node:path';
3
+ import { parseArgs } from 'node:util';
4
+ import { showBanner } from '../lib/banner.js';
5
+ import { createDecorator } from '../lib/terminal.js';
6
+ import { MANIFEST_FILE, VERSION, applyPlan, isHomeDirectory, planInit } from '../lib/init.js';
7
+
8
+ const EXIT_CODE = { SUCCESS: 0, FAILURE: 1, USAGE_ERROR: 2 };
9
+
10
+ const HELP_TEXT = `KARURA v${VERSION}
11
+
12
+ Usage:
13
+ karura init [dir] Install KARURA's skills and conventions into dir (default: current directory)
14
+
15
+ Options:
16
+ --dry-run Show what would be done without writing anything
17
+ --force Overwrite existing files whose content differs
18
+ -h, --help Show this help
19
+ -v, --version Show the version
20
+ `;
21
+
22
+ const PLAN_LABELS = {
23
+ create: 'create',
24
+ overwrite: 'overwrite',
25
+ merge: 'merge',
26
+ skip: 'unchanged',
27
+ conflict: 'conflict',
28
+ };
29
+ // 導入後に、利用者の既存のファイルに手を入れたものだけを示す。導入記録は KARURA が管理するので示さない
30
+ const CHANGED_EXISTING_LABELS = {
31
+ overwrite: 'overwritten',
32
+ merge: 'merged',
33
+ };
34
+
35
+ const FIRST_SKILL = '/d1-business-requirement-document';
36
+
37
+ const decorate = createDecorator(process.stdout);
38
+
39
+ class UsageError extends Error {}
40
+
41
+ const formatStep = (label, step) =>
42
+ ` ${label ? label.padEnd(13) : ''}${step.relativePath}${step.reason ? ` (${step.reason})` : ''}`;
43
+
44
+ function printPlan(steps, targetDir) {
45
+ for (const step of steps) console.log(formatStep(PLAN_LABELS[step.action], step));
46
+ console.log(`\nDry run: nothing was written to ${targetDir}`);
47
+ }
48
+
49
+ function printConflicts(conflicts) {
50
+ console.error('Nothing was changed because the following files cannot be written:');
51
+ for (const step of conflicts) console.error(formatStep(null, step));
52
+ if (conflicts.every((step) => step.forceable)) {
53
+ console.error('\nTo overwrite them, run again with --force.');
54
+ } else {
55
+ console.error('\nSome of them cannot be written even with --force. Fix or remove them, then run again.');
56
+ }
57
+ }
58
+
59
+ // 導入先へ移動するコマンド。導入先がカレントディレクトリなら null を返す。
60
+ // カレントディレクトリの中なら相対パスで、外なら絶対パスで示す
61
+ function toCdCommand(targetDir) {
62
+ const relativePath = path.relative(process.cwd(), targetDir);
63
+ if (relativePath === '') return null;
64
+ const isOutsideCwd =
65
+ relativePath === '..' || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath);
66
+ const cdPath = isOutsideCwd ? targetDir : relativePath;
67
+ return `cd ${/\s/.test(cdPath) ? `"${cdPath}"` : cdPath}`;
68
+ }
69
+
70
+ function printNextSteps(targetDir) {
71
+ const cdCommand = toCdCommand(targetDir);
72
+ const startCommands = cdCommand ? [cdCommand, 'claude'] : ['claude'];
73
+ console.log(`\n${decorate.emoji('🚀')}${decorate.bold('Next steps')}`);
74
+ console.log(' 1. Start Claude Code in your project:');
75
+ for (const command of startCommands) console.log(` ${decorate.command(command)}`);
76
+ console.log(' 2. In Claude Code, create your first artifact, the business requirements document:');
77
+ console.log(` ${decorate.command(FIRST_SKILL)}`);
78
+ }
79
+
80
+ function printSummary(steps, targetDir) {
81
+ console.log(`${decorate.emoji('🎉')}${decorate.bold(decorate.accent('KARURA is ready!'))}`);
82
+ console.log(` Installed into ${targetDir}`);
83
+ for (const step of steps) {
84
+ const label = CHANGED_EXISTING_LABELS[step.action];
85
+ if (label && step.relativePath !== MANIFEST_FILE) console.log(formatStep(label, step));
86
+ }
87
+ printNextSteps(targetDir);
88
+ }
89
+
90
+ async function runInit(dir, { force, dryRun }) {
91
+ await showBanner(VERSION);
92
+ const targetDir = path.resolve(dir);
93
+ if (isHomeDirectory(targetDir)) {
94
+ console.error('KARURA cannot be installed into your home directory: it would change Claude Code settings for every project.');
95
+ console.error('Run it in your project directory, or pass one: karura init <project-dir>');
96
+ return EXIT_CODE.FAILURE;
97
+ }
98
+ const steps = planInit(targetDir, { force });
99
+ const conflicts = steps.filter((step) => step.action === 'conflict');
100
+ const hasConflicts = conflicts.length > 0;
101
+
102
+ if (dryRun) {
103
+ printPlan(steps, targetDir);
104
+ // 本番で衝突するなら、dry-run でも失敗として返す
105
+ return hasConflicts ? EXIT_CODE.FAILURE : EXIT_CODE.SUCCESS;
106
+ }
107
+ if (hasConflicts) {
108
+ printConflicts(conflicts);
109
+ return EXIT_CODE.FAILURE;
110
+ }
111
+ applyPlan(steps);
112
+ printSummary(steps, targetDir);
113
+ return EXIT_CODE.SUCCESS;
114
+ }
115
+
116
+ function parseCommandLine(argv) {
117
+ try {
118
+ return parseArgs({
119
+ args: argv,
120
+ allowPositionals: true,
121
+ options: {
122
+ force: { type: 'boolean', default: false },
123
+ 'dry-run': { type: 'boolean', default: false },
124
+ help: { type: 'boolean', short: 'h', default: false },
125
+ version: { type: 'boolean', short: 'v', default: false },
126
+ },
127
+ });
128
+ } catch (error) {
129
+ throw new UsageError(error.message);
130
+ }
131
+ }
132
+
133
+ async function main(argv) {
134
+ const { values: options, positionals } = parseCommandLine(argv);
135
+ const [command, ...commandArgs] = positionals;
136
+
137
+ if (options.version) {
138
+ console.log(VERSION);
139
+ return EXIT_CODE.SUCCESS;
140
+ }
141
+ if (options.help || command === undefined) {
142
+ console.log(HELP_TEXT);
143
+ return EXIT_CODE.SUCCESS;
144
+ }
145
+ if (command === 'init') {
146
+ if (commandArgs.length > 1) throw new UsageError('init takes at most one directory.');
147
+ const [dir = '.'] = commandArgs;
148
+ return runInit(dir, { force: options.force, dryRun: options['dry-run'] });
149
+ }
150
+ throw new UsageError(`Unknown command: ${command}`);
151
+ }
152
+
153
+ try {
154
+ process.exitCode = await main(process.argv.slice(2));
155
+ } catch (error) {
156
+ console.error(`Error: ${error.message}`);
157
+ if (error instanceof UsageError) {
158
+ console.error("\nRun 'karura --help' for usage.");
159
+ process.exitCode = EXIT_CODE.USAGE_ERROR;
160
+ } else {
161
+ process.exitCode = EXIT_CODE.FAILURE;
162
+ }
163
+ }