@clawplays/ospec-cli 0.2.0 → 0.3.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.
package/README.md CHANGED
@@ -1,10 +1,8 @@
1
- <h1><a href="https://ospec.ai/" target="_blank" rel="noopener noreferrer">OSpec</a></h1>
2
-
3
- [简体中文](README.zh-CN.md)
1
+ <h1><a href="https://ospec.ai/" target="_blank" rel="noopener noreferrer">OSpec.ai</a></h1>
4
2
 
5
3
  <p align="center">
6
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>
7
- <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" alt="npm downloads"></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>
8
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>
9
7
  <a href="LICENSE"><img src="https://img.shields.io/github/license/clawplays/ospec?style=for-the-badge&color=green" alt="License"></a>
10
8
  </p>
@@ -16,10 +14,16 @@
16
14
  <img src="https://img.shields.io/badge/workflow-3_steps-0F766E?style=flat-square" alt="3-step workflow">
17
15
  </p>
18
16
 
19
- OSpec is an AI-first CLI workflow system for initializing repositories to a change-ready state and delivering requirements through auditable change containers.
17
+ <p align="center">
18
+ <strong>English</strong> |
19
+ <a href="docs/README.zh-CN.md">中文</a> |
20
+ <a href="docs/README.ja.md">日本語</a> |
21
+ <a href="docs/README.ar.md">العربية</a>
22
+ </p>
23
+
24
+ OSpec is a document-driven workflow for AI-assisted development, helping you define requirements and changes in docs first, then drive implementation, validation, and archive through AI collaboration.
20
25
 
21
26
  <p align="center">
22
- <a href="docs/README.md">Docs</a> |
23
27
  <a href="docs/prompt-guide.md">Prompt Guide</a> |
24
28
  <a href="docs/usage.md">Usage</a> |
25
29
  <a href="docs/project-overview.md">Overview</a> |
@@ -37,11 +41,11 @@ npm install -g @clawplays/ospec-cli
37
41
 
38
42
  Most teams only need 3 steps to use OSpec:
39
43
 
40
- 1. initialize the project
44
+ 1. initialize OSpec in your project directory
41
45
  2. create and advance one change for a requirement, document update, or bug fix
42
46
  3. archive the accepted change after deployment and validation are complete
43
47
 
44
- ### 1. Initialize The Project
48
+ ### 1. Initialize OSpec In Your Project Directory
45
49
 
46
50
  Recommended prompt:
47
51
 
@@ -92,7 +96,7 @@ Claude / Codex skill mode:
92
96
  Use $ospec-change to create and advance a change for this requirement.
93
97
  ```
94
98
 
95
- ![OSpec Change slash command example](docs/assets/ospecchange-slash-command.svg)
99
+ ![OSpec Change slash command example](docs/assets/ospecchange-slash-command.en.svg)
96
100
 
97
101
  <details>
98
102
  <summary>Command line</summary>
@@ -198,25 +202,78 @@ Archive notes:
198
202
  - **Skill management**: install and inspect OSpec skills for Codex and Claude Code.
199
203
  - **Standard closeout**: `finalize` verifies, rebuilds indexes, and archives the change before manual Git commit.
200
204
 
205
+ ## Plugin Features
206
+
207
+ OSpec includes two optional plugins that extend the document-driven workflow with UI review and flow validation.
208
+
209
+ ### Stitch
210
+
211
+ Use Stitch for page design review and preview collaboration, especially for landing pages, marketing pages, and UI-heavy changes.
212
+
213
+ AI conversation:
214
+
215
+ ```text
216
+ Use OSpec to enable the Stitch plugin.
217
+ ```
218
+
219
+ Claude / Codex skill mode:
220
+
221
+ ```text
222
+ Use $ospec to enable the Stitch plugin.
223
+ ```
224
+
225
+ <details>
226
+ <summary>Command line</summary>
227
+
228
+ ```bash
229
+ ospec plugins enable stitch .
230
+ ```
231
+
232
+ </details>
233
+
234
+ ### Checkpoint
235
+
236
+ Use Checkpoint for app flow validation and automated checks, especially for submission flows, critical paths, and pre-acceptance runtime verification.
237
+
238
+ AI conversation:
239
+
240
+ ```text
241
+ Use OSpec to enable the Checkpoint plugin.
242
+ ```
243
+
244
+ Claude / Codex skill mode:
245
+
246
+ ```text
247
+ Use $ospec to enable the Checkpoint plugin.
248
+ ```
249
+
250
+ <details>
251
+ <summary>Command line</summary>
252
+
253
+ ```bash
254
+ ospec plugins enable checkpoint . --base-url http://127.0.0.1:3000
255
+ ```
256
+
257
+ Notes:
258
+
259
+ - `--base-url` points to the running app used by automated checks
260
+
261
+ </details>
262
+
201
263
  ## Documentation
202
264
 
203
265
  ### Core Docs
204
266
 
205
- - [Docs Index](docs/README.md)
206
267
  - [Prompt Guide](docs/prompt-guide.md)
207
268
  - [Usage](docs/usage.md)
208
269
  - [Project Overview](docs/project-overview.md)
209
270
  - [Installation](docs/installation.md)
210
271
  - [Skills Installation](docs/skills-installation.md)
211
- - [GitLab Custom Fork Sync](docs/custom-fork-sync.md)
212
- - [Upstream Brand Protection](docs/upstream-brand-protection.md)
213
272
 
214
- ### Chinese-Only Advanced Specs
273
+ ### Plugin Specs
215
274
 
216
275
  - [Stitch Plugin Spec](docs/stitch-plugin-spec.zh-CN.md)
217
- - [Stitch Plugin Roadmap](docs/stitch-plugin-roadmap.zh-CN.md)
218
276
  - [Checkpoint Plugin Spec](docs/checkpoint-plugin-spec.zh-CN.md)
219
- - [Current Vibe Coding Spec Flow](docs/current-vibe-coding-spec-flow.zh-CN.md)
220
277
 
221
278
  ## Repository Structure
222
279
 
package/dist/cli.js CHANGED
@@ -224,7 +224,7 @@ const services_1 = require("./services");
224
224
 
225
225
 
226
226
 
227
- const CLI_VERSION = '0.2.0';
227
+ const CLI_VERSION = '0.3.1';
228
228
 
229
229
  function showInitUsage() {
230
230
  console.log('Usage: ospec init [root-dir] [--summary "..."] [--tech-stack node,react] [--architecture "..."] [--document-language zh-CN|en-US]');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawplays/ospec-cli",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "CLI tool for enforcing ospec workflow",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/README.zh-CN.md DELETED
@@ -1,233 +0,0 @@
1
- <h1><a href="https://ospec.ai/" target="_blank" rel="noopener noreferrer">OSpec</a></h1>
2
-
3
- [English](README.md)
4
-
5
- <p align="center">
6
- <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>
7
- <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" alt="npm downloads"></a>
8
- <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>
9
- <a href="LICENSE"><img src="https://img.shields.io/github/license/clawplays/ospec?style=for-the-badge&color=green" alt="License"></a>
10
- </p>
11
-
12
- <p align="center">
13
- <img src="https://img.shields.io/badge/Node.js-18%2B-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js 18+">
14
- <img src="https://img.shields.io/badge/npm-8%2B-CB3837?style=flat-square&logo=npm&logoColor=white" alt="npm 8+">
15
- <img src="https://img.shields.io/badge/language-TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
16
- <img src="https://img.shields.io/badge/workflow-3_steps-0F766E?style=flat-square" alt="3-step workflow">
17
- </p>
18
-
19
- OSpec 是一个面向 AI 协作交付的 CLI 工作流系统,用来把仓库一次性初始化到可提 change 的状态,并通过可审计的 change 容器推进需求执行。
20
-
21
- <p align="center">
22
- <a href="docs/README.zh-CN.md">文档入口</a> |
23
- <a href="docs/prompt-guide.zh-CN.md">提示词文档</a> |
24
- <a href="docs/usage.zh-CN.md">使用说明</a> |
25
- <a href="docs/project-overview.zh-CN.md">项目介绍</a> |
26
- <a href="docs/installation.zh-CN.md">安装说明</a> |
27
- <a href="https://github.com/clawplays/ospec/issues">Issues</a>
28
- </p>
29
-
30
- ## npm 安装
31
-
32
- ```bash
33
- npm install -g @clawplays/ospec-cli
34
- ```
35
-
36
- ## 推荐提示词
37
-
38
- 大多数团队使用 OSpec,只要 3 步:
39
-
40
- 1. 初始化项目
41
- 2. 为文档更新、需求开发或 Bug 修复创建并推进一个 change
42
- 3. 在需求验收通过后归档这个 change
43
-
44
- ### 1. 初始化项目
45
-
46
- 推荐提示词:
47
-
48
- ```text
49
- 使用 OSpec 初始化这个项目。
50
- ```
51
-
52
- Claude / Codex Skill 方式:
53
-
54
- ```text
55
- 使用 $ospec 初始化这个项目。
56
- ```
57
-
58
- <details>
59
- <summary>命令行</summary>
60
-
61
- ```bash
62
- ospec init .
63
- ospec init . --summary "运营后台"
64
- ospec init . --summary "运营后台" --tech-stack node,react,postgres
65
- ospec init . --architecture "单体 Web 应用 + API + 统一鉴权" --document-language zh-CN
66
- ```
67
-
68
- 命令行说明:
69
-
70
- - `--summary`:项目概况,会写入生成的项目文档
71
- - `--tech-stack`:技术栈,使用逗号分隔,例如 `node,react,postgres`
72
- - `--architecture`:简短的架构说明
73
- - `--document-language`:生成文档的语言,通常使用 `zh-CN` 或 `en-US`
74
- - 传了这些参数,就按你提供的内容生成项目说明
75
- - 不传时,OSpec 会优先复用现有文档;如果没有,就先生成待补充的默认文档
76
-
77
- </details>
78
-
79
- ### 2. 创建并推进一个 Change
80
-
81
- 文档更新、需求开发、重构、Bug 修复,都使用这一类方式。
82
-
83
- 推荐提示词:
84
-
85
- ```text
86
- 使用 OSpec 为这个需求创建并推进一个 change。
87
- ```
88
-
89
- Claude / Codex Skill 方式:
90
-
91
- ```text
92
- 使用 $ospec-change 为这个需求创建并推进一个 change。
93
- ```
94
-
95
- ![OSpec Change Slash Command 示例](docs/assets/ospecchange-slash-command.svg)
96
-
97
- <details>
98
- <summary>命令行</summary>
99
-
100
- ```bash
101
- ospec new docs-homepage-refresh .
102
- ospec new fix-login-timeout .
103
- ospec new update-billing-copy .
104
- ```
105
-
106
- </details>
107
-
108
- ### 3. 验收通过后归档
109
-
110
- 当需求已经完成部署、测试、QA 或业务验收后,再归档这个 change。
111
-
112
- 推荐提示词:
113
-
114
- ```text
115
- 使用 OSpec 归档这个已验收通过的 change。
116
- ```
117
-
118
- Claude / Codex Skill 方式:
119
-
120
- ```text
121
- 使用 $ospec 归档这个已验收通过的 change。
122
- ```
123
-
124
- <details>
125
- <summary>命令行</summary>
126
-
127
- ```bash
128
- ospec verify changes/active/<change-name>
129
- ospec finalize changes/active/<change-name>
130
- ```
131
-
132
- 归档说明:
133
-
134
- - 先完成你项目自己的部署、测试、QA 或验收流程
135
- - 使用 `ospec verify` 确认当前 change 已满足归档条件
136
- - 使用 `ospec finalize` 重建索引并归档这个已验收通过的 change
137
-
138
- </details>
139
-
140
- ## OSpec 的工作方式
141
-
142
- ```text
143
- ┌─────────────────────────────────────────────────────────────────┐
144
- │ 1. 用户提出需求 │
145
- │ “使用 OSpec 为这个任务创建并推进一个 change。” │
146
- └─────────────────────────────────────────────────────────────────┘
147
-
148
-
149
- ┌─────────────────────────────────────────────────────────────────┐
150
- │ 2. 初始化到 change-ready │
151
- │ ospec init │
152
- │ - .skillrc │
153
- │ - .ospec/ │
154
- │ - changes/active + changes/archived │
155
- │ - 根目录 SKILL 文件和 for-ai 规则文档 │
156
- │ - docs/project/* 基础知识文档 │
157
- │ - 复用已有文档或回退到占位文档 │
158
- └─────────────────────────────────────────────────────────────────┘
159
-
160
-
161
- ┌─────────────────────────────────────────────────────────────────┐
162
- │ 3. 执行 │
163
- │ ospec new <change-name> │
164
- │ ospec progress │
165
- └─────────────────────────────────────────────────────────────────┘
166
-
167
-
168
- ┌─────────────────────────────────────────────────────────────────┐
169
- │ 4. 部署并验证 │
170
- │ 项目部署 / 测试 / QA │
171
- │ ospec verify │
172
- └─────────────────────────────────────────────────────────────────┘
173
-
174
-
175
- ┌─────────────────────────────────────────────────────────────────┐
176
- │ 5. 归档 │
177
- │ ospec finalize │
178
- │ 重建索引 + archive │
179
- └─────────────────────────────────────────────────────────────────┘
180
- ```
181
-
182
- ## 三个核心概念
183
-
184
- | 概念 | 说明 |
185
- |------|------|
186
- | **协议壳** | 最小协作骨架,包括 `.skillrc`、`.ospec/`、`changes/`、根目录 `SKILL.md`、`SKILL.index.json` 和 `for-ai/` 规则文档。 |
187
- | **项目知识层** | 给 AI 持续读取的项目上下文,例如 `docs/project/*`、分层技能文件和索引状态。 |
188
- | **Active Change** | 单个需求的独立执行容器,通常包含 `proposal.md`、`tasks.md`、`state.json`、`verification.md`、`review.md`。 |
189
-
190
- ## 功能特性
191
-
192
- - **一步到 change-ready 的初始化**:`ospec init` 一次性创建协议壳和基础项目知识文档。
193
- - **带追问能力的初始化**:在 AI 协作初始化中,如果缺少项目概况或技术栈,可以只追问一次;纯 CLI 初始化则直接落占位文档。
194
- - **知识层维护命令**:`ospec docs generate` 用于后续刷新、修复或补齐项目知识层。
195
- - **需求执行可追踪**:一个 change 可以持续对齐 proposal、tasks、state、verification、review。
196
- - **显式队列能力**:`queue` 和 `run` 用于多 change 场景,不会默认偷偷进入队列模式。
197
- - **插件工作流门禁**:内置支持 Stitch 设计审核和 Checkpoint 自动化检查。
198
- - **skills 管理**:支持 Codex 和 Claude Code 的 OSpec skill 安装与检查。
199
- - **标准收口路径**:`finalize` 负责验证、重建索引和归档,Git 提交仍保持手动可控。
200
-
201
- ## 文档入口
202
-
203
- ### 核心文档
204
-
205
- - [文档总览](docs/README.zh-CN.md)
206
- - [提示词文档](docs/prompt-guide.zh-CN.md)
207
- - [使用说明](docs/usage.zh-CN.md)
208
- - [项目介绍](docs/project-overview.zh-CN.md)
209
- - [安装说明](docs/installation.zh-CN.md)
210
- - [Skills 安装说明](docs/skills-installation.zh-CN.md)
211
- - [GitLab 自定义 Fork 同步方案](docs/custom-fork-sync.zh-CN.md)
212
- - [上游品牌保护说明](docs/upstream-brand-protection.zh-CN.md)
213
-
214
- ### 高级规范
215
-
216
- - [Stitch 插件规范](docs/stitch-plugin-spec.zh-CN.md)
217
- - [Stitch 插件路线图](docs/stitch-plugin-roadmap.zh-CN.md)
218
- - [Checkpoint 插件规范](docs/checkpoint-plugin-spec.zh-CN.md)
219
- - [当前 Vibe Coding Spec Flow](docs/current-vibe-coding-spec-flow.zh-CN.md)
220
-
221
- ## 仓库结构
222
-
223
- ```text
224
- dist/ 编译后的 CLI 运行时
225
- assets/ 托管协议资产、hooks 和 skill 载荷
226
- docs/ 对外文档
227
- scripts/ 发布和安装辅助脚本
228
- .ospec/templates/hooks/ 随包分发的 Git hook 模板
229
- ```
230
-
231
- ## License
232
-
233
- 本项目使用 [MIT License](LICENSE)。