@clawplays/ospec-cli 0.1.1 → 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.
package/README.ja.md ADDED
@@ -0,0 +1,290 @@
1
+ <h1><a href="https://ospec.ai/" target="_blank" rel="noopener noreferrer">OSpec</a></h1>
2
+
3
+ <p align="center">
4
+ <a href="https://www.npmjs.com/package/@clawplays/ospec-cli"><img src="https://img.shields.io/npm/v/%40clawplays%2Fospec-cli?style=for-the-badge&logo=npm&label=npm" alt="npm"></a>
5
+ <a href="https://www.npmjs.com/package/@clawplays/ospec-cli"><img src="https://img.shields.io/npm/dm/%40clawplays%2Fospec-cli?style=for-the-badge&logo=npm&label=downloads&cacheSeconds=300" alt="npm downloads"></a>
6
+ <a href="https://github.com/clawplays/ospec/stargazers"><img src="https://img.shields.io/github/stars/clawplays/ospec?style=for-the-badge&logo=github" alt="GitHub stars"></a>
7
+ <a href="LICENSE"><img src="https://img.shields.io/github/license/clawplays/ospec?style=for-the-badge&color=green" alt="License"></a>
8
+ </p>
9
+
10
+ <p align="center">
11
+ <img src="https://img.shields.io/badge/Node.js-18%2B-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js 18+">
12
+ <img src="https://img.shields.io/badge/npm-8%2B-CB3837?style=flat-square&logo=npm&logoColor=white" alt="npm 8+">
13
+ <img src="https://img.shields.io/badge/language-TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
14
+ <img src="https://img.shields.io/badge/workflow-3_steps-0F766E?style=flat-square" alt="3-step workflow">
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="README.md">English</a> |
19
+ <a href="README.zh-CN.md">中文</a> |
20
+ <strong>日本語</strong>
21
+ </p>
22
+
23
+ OSpec は AI 対話コラボレーション向けのドキュメント駆動開発ワークフローです。最初にドキュメントで要件と変更を明確にし、その後 AI との協調で実装、検証、アーカイブを進めます。
24
+
25
+ <p align="center">
26
+ <a href="docs/README.ja.md">ドキュメント</a> |
27
+ <a href="docs/prompt-guide.ja.md">プロンプトガイド</a> |
28
+ <a href="docs/usage.md">使い方</a> |
29
+ <a href="docs/project-overview.md">概要</a> |
30
+ <a href="docs/installation.md">インストール</a> |
31
+ <a href="https://github.com/clawplays/ospec/issues">Issues</a>
32
+ </p>
33
+
34
+ ## npm でインストール
35
+
36
+ ```bash
37
+ npm install -g @clawplays/ospec-cli
38
+ ```
39
+
40
+ ## 推奨プロンプト
41
+
42
+ OSpec の利用は、ほとんどの場合この 3 ステップで十分です。
43
+
44
+ 1. プロジェクトディレクトリで OSpec を初期化する
45
+ 2. 要件、ドキュメント更新、バグ修正のための change を作成して進める
46
+ 3. 受け入れ完了後にその change をアーカイブする
47
+
48
+ ### 1. プロジェクトディレクトリで初期化する
49
+
50
+ 推奨プロンプト:
51
+
52
+ ```text
53
+ OSpec を使ってこのプロジェクトを初期化してください。
54
+ ```
55
+
56
+ Claude / Codex skill:
57
+
58
+ ```text
59
+ $ospec を使ってこのプロジェクトを初期化してください。
60
+ ```
61
+
62
+ <details>
63
+ <summary>コマンドライン</summary>
64
+
65
+ ```bash
66
+ ospec init .
67
+ ospec init . --summary "Internal admin portal for operations"
68
+ ospec init . --summary "Internal admin portal for operations" --tech-stack node,react,postgres
69
+ ospec init . --architecture "Single web app with API and shared auth" --document-language ja-JP
70
+ ```
71
+
72
+ メモ:
73
+
74
+ - `--summary`: 生成ドキュメントに書き込むプロジェクト概要
75
+ - `--tech-stack`: `node,react,postgres` のようなカンマ区切りの技術スタック
76
+ - `--architecture`: 短いアーキテクチャ説明
77
+ - `--document-language`: 生成ドキュメントの言語。通常は `en-US`、`zh-CN`、`ja-JP`
78
+ - 値を渡した場合はその内容を使ってドキュメントを生成します
79
+ - 値を渡さない場合は既存ドキュメントを優先利用し、無ければ補完用のプレースホルダを生成します
80
+
81
+ </details>
82
+
83
+ ### 2. Change を作成して進める
84
+
85
+ 要件実装、ドキュメント更新、リファクタ、バグ修正はこの流れを使います。
86
+
87
+ 推奨プロンプト:
88
+
89
+ ```text
90
+ OSpec を使ってこの要件の change を作成して進めてください。
91
+ ```
92
+
93
+ Claude / Codex skill:
94
+
95
+ ```text
96
+ $ospec-change を使ってこの要件の change を作成して進めてください。
97
+ ```
98
+
99
+ ![OSpec Change slash command example](docs/assets/ospecchange-slash-command.ja.svg)
100
+
101
+ <details>
102
+ <summary>コマンドライン</summary>
103
+
104
+ ```bash
105
+ ospec new docs-homepage-refresh .
106
+ ospec new fix-login-timeout .
107
+ ospec new update-billing-copy .
108
+ ```
109
+
110
+ </details>
111
+
112
+ ### 3. 受け入れ完了後にアーカイブする
113
+
114
+ デプロイ、テスト、QA、またはその他の受け入れ確認が終わった後に、確認済みの change をアーカイブします。
115
+
116
+ 推奨プロンプト:
117
+
118
+ ```text
119
+ OSpec を使って承認済みの change をアーカイブしてください。
120
+ ```
121
+
122
+ Claude / Codex skill:
123
+
124
+ ```text
125
+ $ospec を使って承認済みの change をアーカイブしてください。
126
+ ```
127
+
128
+ <details>
129
+ <summary>コマンドライン</summary>
130
+
131
+ ```bash
132
+ ospec verify changes/active/<change-name>
133
+ ospec finalize changes/active/<change-name>
134
+ ```
135
+
136
+ メモ:
137
+
138
+ - 先にプロジェクト固有のデプロイ、テスト、QA を実行します
139
+ - `ospec verify` で change がアーカイブ可能か確認します
140
+ - `ospec finalize` でインデックスを再構築し、change をアーカイブします
141
+
142
+ </details>
143
+
144
+ ## OSpec の動作イメージ
145
+
146
+ ```text
147
+ ┌─────────────────────────────────────────────────────────────────┐
148
+ │ 1. USER REQUEST │
149
+ │ "Use OSpec to create and advance a change for this task." │
150
+ └─────────────────────────────────────────────────────────────────┘
151
+
152
+
153
+ ┌─────────────────────────────────────────────────────────────────┐
154
+ │ 2. INIT TO CHANGE-READY │
155
+ │ ospec init │
156
+ │ - .skillrc │
157
+ │ - .ospec/ │
158
+ │ - changes/active + changes/archived │
159
+ │ - root SKILL files and for-ai guidance │
160
+ │ - docs/project/* baseline knowledge docs │
161
+ │ - reuse docs or fall back to placeholders │
162
+ └─────────────────────────────────────────────────────────────────┘
163
+
164
+
165
+ ┌─────────────────────────────────────────────────────────────────┐
166
+ │ 3. EXECUTION │
167
+ │ ospec new <change-name> │
168
+ │ ospec progress │
169
+ └─────────────────────────────────────────────────────────────────┘
170
+
171
+
172
+ ┌─────────────────────────────────────────────────────────────────┐
173
+ │ 4. DEPLOY + VALIDATE │
174
+ │ project deploy / test / QA │
175
+ │ ospec verify │
176
+ └─────────────────────────────────────────────────────────────────┘
177
+
178
+
179
+ ┌─────────────────────────────────────────────────────────────────┐
180
+ │ 5. ARCHIVE │
181
+ │ ospec finalize │
182
+ │ rebuild index + archive │
183
+ └─────────────────────────────────────────────────────────────────┘
184
+ ```
185
+
186
+ ## 3 つの主要概念
187
+
188
+ | 概念 | 説明 |
189
+ |------|------|
190
+ | **Protocol Shell** | `.skillrc`、`.ospec/`、`changes/`、ルートの `SKILL.md`、`SKILL.index.json`、`for-ai/` を含む最小の協調骨格 |
191
+ | **Project Knowledge Layer** | `docs/project/*`、レイヤード skill ファイル、index 状態など AI が継続的に参照するコンテキスト |
192
+ | **Active Change** | 1 つの要件専用の実行コンテナ。通常 `proposal.md`、`tasks.md`、`state.json`、`verification.md`、`review.md` を持つ |
193
+
194
+ ## 主な機能
195
+
196
+ - **change-ready 初期化**: `ospec init` が protocol shell と基礎ドキュメントを一度に生成
197
+ - **ガイド付き初期化**: AI 支援時は不足している概要や技術スタックを 1 回だけ確認可能
198
+ - **ドキュメント保守**: `ospec docs generate` で後から知識レイヤを更新・修復
199
+ - **change 実行の追跡**: proposal、tasks、state、verification、review を継続的に揃える
200
+ - **キュー支援**: `queue` と `run` で複数 change の明示的な実行を管理
201
+ - **プラグインゲート**: Stitch のデザインレビューと Checkpoint の自動化チェックをサポート
202
+ - **標準クローズアウト**: `finalize` が検証、インデックス再構築、アーカイブを行う
203
+
204
+ ## プラグイン機能
205
+
206
+ OSpec には、文書駆動ワークフローに UI レビューとフロー検証を追加する 2 つのオプションプラグインがあります。
207
+
208
+ ### Stitch
209
+
210
+ Stitch はページデザインレビューとプレビュー共有に使います。ランディングページや UI 変更が多い change に向いています。
211
+
212
+ AI 対話:
213
+
214
+ ```text
215
+ OSpec を使って Stitch プラグインを有効にしてください。
216
+ ```
217
+
218
+ Claude / Codex skill:
219
+
220
+ ```text
221
+ $ospec を使って Stitch プラグインを有効にしてください。
222
+ ```
223
+
224
+ <details>
225
+ <summary>コマンドライン</summary>
226
+
227
+ ```bash
228
+ ospec plugins enable stitch .
229
+ ```
230
+
231
+ </details>
232
+
233
+ ### Checkpoint
234
+
235
+ Checkpoint は画面フロー検証と自動チェックに使います。重要フローや受け入れ前のランタイム検証に向いています。
236
+
237
+ AI 対話:
238
+
239
+ ```text
240
+ OSpec を使って Checkpoint プラグインを有効にしてください。
241
+ ```
242
+
243
+ Claude / Codex skill:
244
+
245
+ ```text
246
+ $ospec を使って Checkpoint プラグインを有効にしてください。
247
+ ```
248
+
249
+ <details>
250
+ <summary>コマンドライン</summary>
251
+
252
+ ```bash
253
+ ospec plugins enable checkpoint . --base-url http://127.0.0.1:3000
254
+ ```
255
+
256
+ メモ:
257
+
258
+ - `--base-url` は自動チェック対象となる起動中アプリの URL を指定します
259
+
260
+ </details>
261
+
262
+ ## ドキュメント
263
+
264
+ ### コアドキュメント
265
+
266
+ - [Docs Index](docs/README.ja.md)
267
+ - [Prompt Guide](docs/prompt-guide.ja.md)
268
+ - [Usage](docs/usage.md)
269
+ - [Project Overview](docs/project-overview.md)
270
+ - [Installation](docs/installation.md)
271
+ - [Skills Installation](docs/skills-installation.md)
272
+
273
+ ### プラグイン仕様
274
+
275
+ - [Stitch Plugin Spec](docs/stitch-plugin-spec.zh-CN.md)
276
+ - [Checkpoint Plugin Spec](docs/checkpoint-plugin-spec.zh-CN.md)
277
+
278
+ ## リポジトリ構成
279
+
280
+ ```text
281
+ dist/ コンパイル済み CLI ランタイム
282
+ assets/ 管理対象プロトコル資産、hooks、skill payload
283
+ docs/ 公開ドキュメント
284
+ scripts/ リリースとインストール補助スクリプト
285
+ .ospec/templates/hooks/ パッケージ同梱の Git hook テンプレート
286
+ ```
287
+
288
+ ## License
289
+
290
+ This project is licensed under the [MIT License](LICENSE).