@clawplays/ospec-cli 0.1.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/.ospec/templates/hooks/post-merge +8 -0
- package/.ospec/templates/hooks/pre-commit +8 -0
- package/LICENSE +21 -0
- package/README.md +549 -0
- package/README.zh-CN.md +549 -0
- package/assets/for-ai/en-US/ai-guide.md +98 -0
- package/assets/for-ai/en-US/execution-protocol.md +64 -0
- package/assets/for-ai/zh-CN/ai-guide.md +102 -0
- package/assets/for-ai/zh-CN/execution-protocol.md +68 -0
- package/assets/git-hooks/post-merge +12 -0
- package/assets/git-hooks/pre-commit +12 -0
- package/assets/global-skills/claude/ospec-change/SKILL.md +116 -0
- package/assets/global-skills/codex/ospec-change/SKILL.md +117 -0
- package/assets/global-skills/codex/ospec-change/agents/openai.yaml +7 -0
- package/assets/global-skills/codex/ospec-change/skill.yaml +19 -0
- package/assets/project-conventions/en-US/development-guide.md +32 -0
- package/assets/project-conventions/en-US/naming-conventions.md +51 -0
- package/assets/project-conventions/en-US/skill-conventions.md +40 -0
- package/assets/project-conventions/en-US/workflow-conventions.md +70 -0
- package/assets/project-conventions/zh-CN/development-guide.md +32 -0
- package/assets/project-conventions/zh-CN/naming-conventions.md +51 -0
- package/assets/project-conventions/zh-CN/skill-conventions.md +40 -0
- package/assets/project-conventions/zh-CN/workflow-conventions.md +74 -0
- package/dist/adapters/codex-stitch-adapter.js +420 -0
- package/dist/adapters/gemini-stitch-adapter.js +408 -0
- package/dist/adapters/playwright-checkpoint-adapter.js +2260 -0
- package/dist/advanced/BatchOperations.d.ts +36 -0
- package/dist/advanced/BatchOperations.js +159 -0
- package/dist/advanced/CachingLayer.d.ts +66 -0
- package/dist/advanced/CachingLayer.js +136 -0
- package/dist/advanced/FeatureUpdater.d.ts +46 -0
- package/dist/advanced/FeatureUpdater.js +151 -0
- package/dist/advanced/PerformanceMonitor.d.ts +52 -0
- package/dist/advanced/PerformanceMonitor.js +129 -0
- package/dist/advanced/StatePersistence.d.ts +61 -0
- package/dist/advanced/StatePersistence.js +168 -0
- package/dist/advanced/index.d.ts +14 -0
- package/dist/advanced/index.js +22 -0
- package/dist/cli/commands/config.d.ts +5 -0
- package/dist/cli/commands/config.js +6 -0
- package/dist/cli/commands/feature.d.ts +5 -0
- package/dist/cli/commands/feature.js +6 -0
- package/dist/cli/commands/index.d.ts +5 -0
- package/dist/cli/commands/index.js +6 -0
- package/dist/cli/commands/project.d.ts +5 -0
- package/dist/cli/commands/project.js +6 -0
- package/dist/cli/commands/validate.d.ts +5 -0
- package/dist/cli/commands/validate.js +6 -0
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/index.js +6 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +1007 -0
- package/dist/commands/ArchiveCommand.d.ts +14 -0
- package/dist/commands/ArchiveCommand.js +241 -0
- package/dist/commands/BaseCommand.d.ts +33 -0
- package/dist/commands/BaseCommand.js +46 -0
- package/dist/commands/BatchCommand.d.ts +5 -0
- package/dist/commands/BatchCommand.js +42 -0
- package/dist/commands/ChangesCommand.d.ts +3 -0
- package/dist/commands/ChangesCommand.js +71 -0
- package/dist/commands/DocsCommand.d.ts +5 -0
- package/dist/commands/DocsCommand.js +118 -0
- package/dist/commands/FinalizeCommand.d.ts +3 -0
- package/dist/commands/FinalizeCommand.js +24 -0
- package/dist/commands/IndexCommand.d.ts +5 -0
- package/dist/commands/IndexCommand.js +57 -0
- package/dist/commands/InitCommand.d.ts +5 -0
- package/dist/commands/InitCommand.js +65 -0
- package/dist/commands/NewCommand.d.ts +11 -0
- package/dist/commands/NewCommand.js +262 -0
- package/dist/commands/PluginsCommand.d.ts +58 -0
- package/dist/commands/PluginsCommand.js +2491 -0
- package/dist/commands/ProgressCommand.d.ts +5 -0
- package/dist/commands/ProgressCommand.js +103 -0
- package/dist/commands/QueueCommand.d.ts +10 -0
- package/dist/commands/QueueCommand.js +147 -0
- package/dist/commands/RunCommand.d.ts +13 -0
- package/dist/commands/RunCommand.js +200 -0
- package/dist/commands/SkillCommand.d.ts +31 -0
- package/dist/commands/SkillCommand.js +1216 -0
- package/dist/commands/SkillsCommand.d.ts +5 -0
- package/dist/commands/SkillsCommand.js +68 -0
- package/dist/commands/StatusCommand.d.ts +6 -0
- package/dist/commands/StatusCommand.js +140 -0
- package/dist/commands/UpdateCommand.d.ts +8 -0
- package/dist/commands/UpdateCommand.js +251 -0
- package/dist/commands/VerifyCommand.d.ts +5 -0
- package/dist/commands/VerifyCommand.js +278 -0
- package/dist/commands/WorkflowCommand.d.ts +12 -0
- package/dist/commands/WorkflowCommand.js +150 -0
- package/dist/commands/index.d.ts +43 -0
- package/dist/commands/index.js +85 -0
- package/dist/core/constants.d.ts +41 -0
- package/dist/core/constants.js +73 -0
- package/dist/core/errors.d.ts +36 -0
- package/dist/core/errors.js +72 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +23 -0
- package/dist/core/types.d.ts +369 -0
- package/dist/core/types.js +3 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +27 -0
- package/dist/presets/ProjectPresets.d.ts +41 -0
- package/dist/presets/ProjectPresets.js +190 -0
- package/dist/scaffolds/ProjectScaffoldPresets.d.ts +20 -0
- package/dist/scaffolds/ProjectScaffoldPresets.js +151 -0
- package/dist/services/ConfigManager.d.ts +14 -0
- package/dist/services/ConfigManager.js +386 -0
- package/dist/services/FeatureManager.d.ts +5 -0
- package/dist/services/FeatureManager.js +6 -0
- package/dist/services/FileService.d.ts +21 -0
- package/dist/services/FileService.js +152 -0
- package/dist/services/IndexBuilder.d.ts +12 -0
- package/dist/services/IndexBuilder.js +130 -0
- package/dist/services/Logger.d.ts +20 -0
- package/dist/services/Logger.js +48 -0
- package/dist/services/ProjectAssetRegistry.d.ts +12 -0
- package/dist/services/ProjectAssetRegistry.js +96 -0
- package/dist/services/ProjectAssetService.d.ts +49 -0
- package/dist/services/ProjectAssetService.js +223 -0
- package/dist/services/ProjectScaffoldCommandService.d.ts +73 -0
- package/dist/services/ProjectScaffoldCommandService.js +159 -0
- package/dist/services/ProjectScaffoldService.d.ts +44 -0
- package/dist/services/ProjectScaffoldService.js +507 -0
- package/dist/services/ProjectService.d.ts +209 -0
- package/dist/services/ProjectService.js +13239 -0
- package/dist/services/QueueService.d.ts +17 -0
- package/dist/services/QueueService.js +142 -0
- package/dist/services/RunService.d.ts +40 -0
- package/dist/services/RunService.js +420 -0
- package/dist/services/SkillParser.d.ts +30 -0
- package/dist/services/SkillParser.js +88 -0
- package/dist/services/StateManager.d.ts +16 -0
- package/dist/services/StateManager.js +127 -0
- package/dist/services/TemplateEngine.d.ts +43 -0
- package/dist/services/TemplateEngine.js +119 -0
- package/dist/services/TemplateGenerator.d.ts +40 -0
- package/dist/services/TemplateGenerator.js +273 -0
- package/dist/services/ValidationService.d.ts +19 -0
- package/dist/services/ValidationService.js +44 -0
- package/dist/services/Validator.d.ts +5 -0
- package/dist/services/Validator.js +6 -0
- package/dist/services/index.d.ts +52 -0
- package/dist/services/index.js +91 -0
- package/dist/services/templates/ExecutionTemplateBuilder.d.ts +12 -0
- package/dist/services/templates/ExecutionTemplateBuilder.js +300 -0
- package/dist/services/templates/ProjectTemplateBuilder.d.ts +38 -0
- package/dist/services/templates/ProjectTemplateBuilder.js +1897 -0
- package/dist/services/templates/TemplateBuilderBase.d.ts +19 -0
- package/dist/services/templates/TemplateBuilderBase.js +60 -0
- package/dist/services/templates/TemplateInputFactory.d.ts +16 -0
- package/dist/services/templates/TemplateInputFactory.js +298 -0
- package/dist/services/templates/templateTypes.d.ts +90 -0
- package/dist/services/templates/templateTypes.js +3 -0
- package/dist/tools/build-index.js +632 -0
- package/dist/utils/DateUtils.d.ts +18 -0
- package/dist/utils/DateUtils.js +40 -0
- package/dist/utils/PathUtils.d.ts +9 -0
- package/dist/utils/PathUtils.js +66 -0
- package/dist/utils/StringUtils.d.ts +26 -0
- package/dist/utils/StringUtils.js +47 -0
- package/dist/utils/helpers.d.ts +5 -0
- package/dist/utils/helpers.js +6 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +23 -0
- package/dist/utils/logger.d.ts +5 -0
- package/dist/utils/logger.js +6 -0
- package/dist/utils/path.d.ts +5 -0
- package/dist/utils/path.js +6 -0
- package/dist/utils/subcommandHelp.d.ts +11 -0
- package/dist/utils/subcommandHelp.js +119 -0
- package/dist/workflow/ArchiveGate.d.ts +30 -0
- package/dist/workflow/ArchiveGate.js +93 -0
- package/dist/workflow/ConfigurableWorkflow.d.ts +89 -0
- package/dist/workflow/ConfigurableWorkflow.js +186 -0
- package/dist/workflow/HookSystem.d.ts +38 -0
- package/dist/workflow/HookSystem.js +66 -0
- package/dist/workflow/IndexRegenerator.d.ts +49 -0
- package/dist/workflow/IndexRegenerator.js +147 -0
- package/dist/workflow/PluginWorkflowComposer.d.ts +138 -0
- package/dist/workflow/PluginWorkflowComposer.js +239 -0
- package/dist/workflow/SkillUpdateEngine.d.ts +26 -0
- package/dist/workflow/SkillUpdateEngine.js +113 -0
- package/dist/workflow/VerificationSystem.d.ts +24 -0
- package/dist/workflow/VerificationSystem.js +116 -0
- package/dist/workflow/WorkflowEngine.d.ts +15 -0
- package/dist/workflow/WorkflowEngine.js +57 -0
- package/dist/workflow/index.d.ts +19 -0
- package/dist/workflow/index.js +32 -0
- package/package.json +78 -0
- package/scripts/postinstall.js +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ClawPlays
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
# OSpec
|
|
2
|
+
|
|
3
|
+
[简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
OSpec is a CLI workflow system for AI-assisted delivery.
|
|
6
|
+
|
|
7
|
+
It is not a scaffold that starts by generating a pile of business templates. It is a collaboration framework built around a protocol-shell-first approach: establish the minimum collaboration protocol first, explicitly fill in the project knowledge layer second, and then manage execution, verification, and closure through the change workflow.
|
|
8
|
+
|
|
9
|
+
Current version:
|
|
10
|
+
|
|
11
|
+
- CLI: `0.1.1`
|
|
12
|
+
|
|
13
|
+
Documentation:
|
|
14
|
+
|
|
15
|
+
- [Project Overview](docs/project-overview.zh-CN.md)
|
|
16
|
+
- [Installation](docs/installation.zh-CN.md)
|
|
17
|
+
- [Usage](docs/usage.zh-CN.md)
|
|
18
|
+
- [Prompt Guide](docs/prompt-guide.zh-CN.md)
|
|
19
|
+
- [Skills Installation](docs/skills-installation.zh-CN.md)
|
|
20
|
+
- [GitLab Custom Fork Sync](docs/custom-fork-sync.zh-CN.md)
|
|
21
|
+
- [Stitch Plugin Spec](docs/stitch-plugin-spec.zh-CN.md)
|
|
22
|
+
- [Checkpoint Plugin Spec](docs/checkpoint-plugin-spec.zh-CN.md)
|
|
23
|
+
|
|
24
|
+
## What OSpec Is
|
|
25
|
+
|
|
26
|
+
The core goal of OSpec is not to generate a fixed project structure for a team in one shot. Its job is to lock in the basic rules of AI collaboration first.
|
|
27
|
+
|
|
28
|
+
What it does can be summarized in three layers:
|
|
29
|
+
|
|
30
|
+
- Initialize the minimum protocol shell so the project enters a unified collaboration state
|
|
31
|
+
- Fill in the project knowledge layer so AI has stable context to read
|
|
32
|
+
- Use the active change workflow to manage execution, verification, and closure for each request
|
|
33
|
+
|
|
34
|
+
In simpler terms, OSpec is not mainly about deciding which business page to build first. It is about defining the rules by which your team and your AI should collaborate.
|
|
35
|
+
|
|
36
|
+
## Problems It Tries to Solve
|
|
37
|
+
|
|
38
|
+
Once AI joins software delivery, common problems usually look like this:
|
|
39
|
+
|
|
40
|
+
- AI can write code, but does not know the execution rules of the project
|
|
41
|
+
- After a request is completed, the intermediate process is hard to see and hard to trace back
|
|
42
|
+
- Documentation, skill files, and implementation status drift out of sync
|
|
43
|
+
- Different AI clients use inconsistent collaboration protocols
|
|
44
|
+
- Some requests require design approval or extra gates, but there is no unified entry point
|
|
45
|
+
|
|
46
|
+
OSpec does not respond to this by shipping a heavy business scaffold. It establishes the protocol and gates first, so the project becomes inspectable, traceable, and archivable.
|
|
47
|
+
|
|
48
|
+
## Three Core Concepts
|
|
49
|
+
|
|
50
|
+
### 1. Protocol Shell
|
|
51
|
+
|
|
52
|
+
The protocol shell is the minimum collaborative skeleton of the project. Its main purpose is to bring the project into a unified collaboration state first.
|
|
53
|
+
|
|
54
|
+
After initialization, key files and directories usually include:
|
|
55
|
+
|
|
56
|
+
- `.skillrc`
|
|
57
|
+
- `.ospec/`
|
|
58
|
+
- `changes/active/`
|
|
59
|
+
- `changes/archived/`
|
|
60
|
+
- `SKILL.md`
|
|
61
|
+
- `SKILL.index.json`
|
|
62
|
+
- A set of AI collaboration rule documents under `for-ai/`
|
|
63
|
+
|
|
64
|
+
You can think of it as the collaboration foundation of the project.
|
|
65
|
+
|
|
66
|
+
### 2. Project Knowledge Layer
|
|
67
|
+
|
|
68
|
+
After the protocol shell is in place, the project still needs long-lived and stable knowledge context. OSpec uses `docs/project/` and layered `SKILL.md` files to carry that context.
|
|
69
|
+
|
|
70
|
+
Project docs generated by default include:
|
|
71
|
+
|
|
72
|
+
- `docs/project/overview.md`
|
|
73
|
+
- `docs/project/tech-stack.md`
|
|
74
|
+
- `docs/project/architecture.md`
|
|
75
|
+
- `docs/project/module-map.md`
|
|
76
|
+
- `docs/project/api-overview.md`
|
|
77
|
+
|
|
78
|
+
The goal of this step is to make sure AI is not writing blindly later. It should always have stable context to reference.
|
|
79
|
+
|
|
80
|
+
### 3. Active Change
|
|
81
|
+
|
|
82
|
+
OSpec does not leave a request scattered across chat history. It creates an independent execution container for every request.
|
|
83
|
+
|
|
84
|
+
The most important files inside each active change are:
|
|
85
|
+
|
|
86
|
+
- `proposal.md`
|
|
87
|
+
- `tasks.md`
|
|
88
|
+
- `state.json`
|
|
89
|
+
- `verification.md`
|
|
90
|
+
- `review.md`
|
|
91
|
+
|
|
92
|
+
The real source of truth for execution state is:
|
|
93
|
+
|
|
94
|
+
- `state.json`
|
|
95
|
+
|
|
96
|
+
That means the project does not rely on someone saying a task is done. The actual stage of a change is jointly proven by the state file and the verification artifacts.
|
|
97
|
+
|
|
98
|
+
## Main Flow
|
|
99
|
+
|
|
100
|
+
The current OSpec main flow can be summarized in four stages:
|
|
101
|
+
|
|
102
|
+
1. Initialize the protocol shell
|
|
103
|
+
2. Fill in the project knowledge layer
|
|
104
|
+
3. Execute the active change
|
|
105
|
+
4. Close it out through `verify / archive / finalize`
|
|
106
|
+
|
|
107
|
+
Core commands:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
ospec status [path]
|
|
111
|
+
ospec init [path]
|
|
112
|
+
ospec docs generate [path]
|
|
113
|
+
ospec new <change-name> [path]
|
|
114
|
+
ospec progress [changes/active/<change>]
|
|
115
|
+
ospec verify [changes/active/<change>]
|
|
116
|
+
ospec archive [changes/active/<change>]
|
|
117
|
+
ospec finalize [changes/active/<change>]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Common Usage
|
|
121
|
+
|
|
122
|
+
### 1. Inspect the Project State First
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
ospec status .
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
This step is essentially a health check. It tells you:
|
|
129
|
+
|
|
130
|
+
- Whether the project has already been initialized
|
|
131
|
+
- Which protocol files are missing
|
|
132
|
+
- How complete the project documentation is
|
|
133
|
+
- Whether skills are complete
|
|
134
|
+
- Whether active changes currently exist
|
|
135
|
+
- What the most recommended next step is
|
|
136
|
+
|
|
137
|
+
### 2. Initialize the Protocol Shell
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
ospec init .
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
This only performs the minimum initialization:
|
|
144
|
+
|
|
145
|
+
- Create the OSpec protocol shell
|
|
146
|
+
- Do not generate a web template or business scaffold by default
|
|
147
|
+
- Do not automatically create the first change
|
|
148
|
+
|
|
149
|
+
This reflects a core OSpec principle: establish the collaboration protocol first, do not take over business decisions, and do not guess the project type.
|
|
150
|
+
|
|
151
|
+
### 3. Fill in the Project Knowledge Layer
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
ospec docs generate .
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
This step generates the project knowledge layer docs, layered skill entry points, indexes, and other foundational assets.
|
|
158
|
+
|
|
159
|
+
Its boundaries are also explicit:
|
|
160
|
+
|
|
161
|
+
- It fills in project knowledge
|
|
162
|
+
- It does not automatically apply a business scaffold
|
|
163
|
+
- It does not automatically start a request
|
|
164
|
+
|
|
165
|
+
### 4. Create a Change
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
ospec new landing-refresh .
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This does not start writing code immediately. It creates the execution container for the request first.
|
|
172
|
+
|
|
173
|
+
After creation, the project will contain:
|
|
174
|
+
|
|
175
|
+
- `proposal.md`: background, goals, scope, and acceptance criteria
|
|
176
|
+
- `tasks.md`: task list
|
|
177
|
+
- `state.json`: execution status
|
|
178
|
+
- `verification.md`: verification items
|
|
179
|
+
- `review.md`: review perspective
|
|
180
|
+
|
|
181
|
+
### 5. Keep Checking Progress and Risk
|
|
182
|
+
|
|
183
|
+
Common commands:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
ospec progress changes/active/landing-refresh
|
|
187
|
+
ospec verify changes/active/landing-refresh
|
|
188
|
+
ospec changes status .
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
They answer three different questions:
|
|
192
|
+
|
|
193
|
+
- `progress`: where the current change stands
|
|
194
|
+
- `verify`: whether the protocol files and verification items of the change are complete
|
|
195
|
+
- `changes status`: the PASS / WARN / FAIL summary for all active changes in the project
|
|
196
|
+
|
|
197
|
+
### 6. Standard Closure
|
|
198
|
+
|
|
199
|
+
Recommended command:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
ospec finalize changes/active/landing-refresh
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
`finalize` is the default closure path. It runs the following in order:
|
|
206
|
+
|
|
207
|
+
- verify
|
|
208
|
+
- rebuild indexes
|
|
209
|
+
- archive
|
|
210
|
+
|
|
211
|
+
At the end, the change is moved from `changes/active/` to `changes/archived/`, and the repository is left in a state where you can make a manual Git commit.
|
|
212
|
+
|
|
213
|
+
### 7. Explicit Queue Mode
|
|
214
|
+
|
|
215
|
+
Queue mode is intentionally conservative:
|
|
216
|
+
|
|
217
|
+
- `ospec new` still creates one normal active change
|
|
218
|
+
- nothing enters queue mode implicitly
|
|
219
|
+
- queue behavior starts only when you explicitly use `ospec queue ...` or `ospec run ...`
|
|
220
|
+
|
|
221
|
+
Core queue commands:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
ospec queue add landing-refresh .
|
|
225
|
+
ospec queue add billing-cleanup .
|
|
226
|
+
ospec queue status .
|
|
227
|
+
ospec queue next .
|
|
228
|
+
ospec run start . --profile manual-safe
|
|
229
|
+
ospec run step .
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Runner profiles:
|
|
233
|
+
|
|
234
|
+
- `manual-safe`: only tracks and activates the queue explicitly; existing change execution stays manual
|
|
235
|
+
- `archive-chain`: on an explicit `ospec run step`, if the current active change is archive-ready, OSpec finalizes it and then advances to the next queued change
|
|
236
|
+
|
|
237
|
+
Recommended AI phrasing:
|
|
238
|
+
|
|
239
|
+
- single change: `Use OSpec to create and advance one change for this requirement.`
|
|
240
|
+
- build a queue without running it: `Use OSpec to break this TODO into multiple changes, create a queue, and show the queue first. Do not run it yet.`
|
|
241
|
+
- explicit queue execution: `Use OSpec to create a change queue and execute it explicitly with ospec run manual-safe.`
|
|
242
|
+
|
|
243
|
+
## How a Request Flows
|
|
244
|
+
|
|
245
|
+
The recommended order for a single request is:
|
|
246
|
+
|
|
247
|
+
1. Clarify context and impact
|
|
248
|
+
2. Create or update `proposal.md`
|
|
249
|
+
3. Create or update `tasks.md`
|
|
250
|
+
4. Advance implementation based on `state.json`
|
|
251
|
+
5. Update related `SKILL.md`
|
|
252
|
+
6. Rebuild `SKILL.index.json`
|
|
253
|
+
7. Complete `verification.md`
|
|
254
|
+
8. Archive after all gates pass
|
|
255
|
+
|
|
256
|
+
In one line:
|
|
257
|
+
|
|
258
|
+
Request enters
|
|
259
|
+
-> create change
|
|
260
|
+
-> write proposal
|
|
261
|
+
-> write tasks
|
|
262
|
+
-> advance implementation by state
|
|
263
|
+
-> sync docs and skills
|
|
264
|
+
-> complete verification
|
|
265
|
+
-> run verify
|
|
266
|
+
-> archive / finalize
|
|
267
|
+
|
|
268
|
+
The value of this design is:
|
|
269
|
+
|
|
270
|
+
- Every request has an independent container
|
|
271
|
+
- Every stage has explicit document anchors
|
|
272
|
+
- Completion is not based on vague judgment, but on something inspectable
|
|
273
|
+
|
|
274
|
+
## Current Core Capabilities
|
|
275
|
+
|
|
276
|
+
From the CLI perspective, current capabilities can be grouped into five areas.
|
|
277
|
+
|
|
278
|
+
### 1. Project Initialization and Diagnosis
|
|
279
|
+
|
|
280
|
+
- `status`
|
|
281
|
+
- `init`
|
|
282
|
+
- `docs status`
|
|
283
|
+
- `docs generate`
|
|
284
|
+
|
|
285
|
+
This group mainly answers whether the project has entered protocol-based collaboration.
|
|
286
|
+
|
|
287
|
+
### 2. Request Execution Workflow
|
|
288
|
+
|
|
289
|
+
- `new`
|
|
290
|
+
- `progress`
|
|
291
|
+
- `verify`
|
|
292
|
+
- `archive`
|
|
293
|
+
- `finalize`
|
|
294
|
+
- `changes status`
|
|
295
|
+
|
|
296
|
+
This group mainly answers how a request moves from creation to closure.
|
|
297
|
+
|
|
298
|
+
### 3. Skills and Index Management
|
|
299
|
+
|
|
300
|
+
- `skills status`
|
|
301
|
+
- `skill status`
|
|
302
|
+
- `skill install`
|
|
303
|
+
- `index check`
|
|
304
|
+
- `index build`
|
|
305
|
+
|
|
306
|
+
This group mainly answers where AI should read the rules from, and whether those rules are synchronized.
|
|
307
|
+
|
|
308
|
+
### 4. Plugin-Based Workflow
|
|
309
|
+
|
|
310
|
+
- `plugins status`
|
|
311
|
+
- `plugins enable stitch`
|
|
312
|
+
- `plugins run stitch`
|
|
313
|
+
- `plugins approve stitch`
|
|
314
|
+
- `plugins reject stitch`
|
|
315
|
+
- `plugins doctor stitch`
|
|
316
|
+
|
|
317
|
+
This group mainly answers how to handle requests that need extra blocking steps beyond code.
|
|
318
|
+
|
|
319
|
+
The first plugin today is `stitch`, mainly for page design review.
|
|
320
|
+
|
|
321
|
+
### 5. Protocol Update and Distribution
|
|
322
|
+
|
|
323
|
+
- `update`
|
|
324
|
+
- `skill install`
|
|
325
|
+
- `skill install-claude`
|
|
326
|
+
|
|
327
|
+
This allows OSpec not only to manage a single project, but also to distribute the same collaboration protocol to different AI clients.
|
|
328
|
+
|
|
329
|
+
The boundary of `ospec update [path]` is:
|
|
330
|
+
|
|
331
|
+
- It refreshes protocol docs, project tooling, Git hooks, managed skills, and managed workdir assets for enabled plugins
|
|
332
|
+
- It does not automatically `enable/disable` plugins
|
|
333
|
+
- It does not automatically migrate existing active changes to a new plugin workflow
|
|
334
|
+
- If you want to enable Stitch, you still need to run `ospec plugins enable stitch [path]` explicitly
|
|
335
|
+
|
|
336
|
+
## One Easily Confused Detail
|
|
337
|
+
|
|
338
|
+
In the current version, two concepts need to be understood separately:
|
|
339
|
+
|
|
340
|
+
- structure level
|
|
341
|
+
- workflow mode
|
|
342
|
+
|
|
343
|
+
### Structure Level
|
|
344
|
+
|
|
345
|
+
Structure is currently determined only as:
|
|
346
|
+
|
|
347
|
+
- `none`
|
|
348
|
+
|
|
349
|
+
It no longer uses `basic` / `full` to describe repository structure level.
|
|
350
|
+
|
|
351
|
+
### Workflow Mode
|
|
352
|
+
|
|
353
|
+
The default workflow mode in `.skillrc` created by initialization is still:
|
|
354
|
+
|
|
355
|
+
- `full`
|
|
356
|
+
|
|
357
|
+
It affects:
|
|
358
|
+
|
|
359
|
+
- Which feature flags are supported
|
|
360
|
+
- Which optional steps are activated
|
|
361
|
+
- What the archive gate needs to check
|
|
362
|
+
|
|
363
|
+
So the correct way to read it is:
|
|
364
|
+
|
|
365
|
+
- Structure level indicates whether the project has completed protocol-based initialization
|
|
366
|
+
- Workflow mode indicates how strict the request execution process is
|
|
367
|
+
|
|
368
|
+
## Stitch Plugin
|
|
369
|
+
|
|
370
|
+
Stitch demonstrates OSpec's plugin-based extensibility.
|
|
371
|
+
|
|
372
|
+
The idea is not to hardcode design review into the main flow. Instead:
|
|
373
|
+
|
|
374
|
+
- The project enables a plugin to gain a capability
|
|
375
|
+
- The plugin contributes an optional step
|
|
376
|
+
- A change activates that step only if its flags hit the condition
|
|
377
|
+
- `verify / archive / finalize` are blocked or allowed based on approval artifacts
|
|
378
|
+
|
|
379
|
+
For example, after a project enables Stitch, if a new change includes these flags:
|
|
380
|
+
|
|
381
|
+
- `ui_change`
|
|
382
|
+
- `page_design`
|
|
383
|
+
- `landing_page`
|
|
384
|
+
|
|
385
|
+
The system activates:
|
|
386
|
+
|
|
387
|
+
- `stitch_design_review`
|
|
388
|
+
|
|
389
|
+
And generates:
|
|
390
|
+
|
|
391
|
+
- `artifacts/stitch/approval.json`
|
|
392
|
+
|
|
393
|
+
If that approval file is not approved, the change cannot claim completion and cannot be archived.
|
|
394
|
+
|
|
395
|
+
In page design review scenarios, this gate also requires:
|
|
396
|
+
|
|
397
|
+
- The same route may only have one canonical layout
|
|
398
|
+
- `light/dark` must be theme variants of one layout, not two different compositions
|
|
399
|
+
- Delivery must include screen mapping
|
|
400
|
+
- Old drafts and exploration drafts must be archived, not listed beside the canonical page
|
|
401
|
+
|
|
402
|
+
This shows that OSpec plugins do not act as simple reminders. They actually participate in workflow gates.
|
|
403
|
+
|
|
404
|
+
## Design Principles
|
|
405
|
+
|
|
406
|
+
### 1. Protocol-Shell-First
|
|
407
|
+
|
|
408
|
+
Build the protocol shell first, then discuss business specifics.
|
|
409
|
+
|
|
410
|
+
Benefits:
|
|
411
|
+
|
|
412
|
+
- Initialization stays lightweight
|
|
413
|
+
- Project type is less likely to be guessed wrong
|
|
414
|
+
- A repository that is still undefined is not forced into a rigid template
|
|
415
|
+
|
|
416
|
+
### 2. Explicit Over Implicit
|
|
417
|
+
|
|
418
|
+
OSpec rarely does things by guessing what you probably want.
|
|
419
|
+
|
|
420
|
+
For example:
|
|
421
|
+
|
|
422
|
+
- `init` does not automatically generate docs
|
|
423
|
+
- `docs generate` does not automatically create a change
|
|
424
|
+
- `new` does not automatically advance implementation
|
|
425
|
+
|
|
426
|
+
Each step tries to stay clear, controllable, and explainable.
|
|
427
|
+
|
|
428
|
+
### 3. Documentation Is Part of Execution
|
|
429
|
+
|
|
430
|
+
In OSpec:
|
|
431
|
+
|
|
432
|
+
- proposal is not an auxiliary report
|
|
433
|
+
- tasks are not a temporary memo
|
|
434
|
+
- verification is not a final add-on note
|
|
435
|
+
|
|
436
|
+
These documents are part of the workflow itself and directly affect whether later `verify` and `archive` can pass.
|
|
437
|
+
|
|
438
|
+
### 4. `state.json` Is the Source of Truth
|
|
439
|
+
|
|
440
|
+
The project explicitly requires:
|
|
441
|
+
|
|
442
|
+
- Use `state.json` as the basis of current execution state
|
|
443
|
+
- `verification.md` cannot replace `state.json`
|
|
444
|
+
|
|
445
|
+
This prevents workflow drift caused by inconsistent descriptions.
|
|
446
|
+
|
|
447
|
+
### 5. Gate First, Archive Second
|
|
448
|
+
|
|
449
|
+
Closure in OSpec is not "code is written, then commit". It is:
|
|
450
|
+
|
|
451
|
+
- Check whether the workflow is complete
|
|
452
|
+
- Only then allow archiving
|
|
453
|
+
- Enter the Git commit stage after archiving
|
|
454
|
+
|
|
455
|
+
That makes the delivery boundary much clearer.
|
|
456
|
+
|
|
457
|
+
### 6. Pluginized Instead of Hardcoded
|
|
458
|
+
|
|
459
|
+
Capabilities such as design review are not hardcoded into the main flow. They are injected through plugins.
|
|
460
|
+
|
|
461
|
+
That means the system can keep expanding with things like:
|
|
462
|
+
|
|
463
|
+
- design review
|
|
464
|
+
- security checks
|
|
465
|
+
- other approval capabilities
|
|
466
|
+
|
|
467
|
+
without making the main workflow increasingly bloated.
|
|
468
|
+
|
|
469
|
+
### 7. One Protocol Across Multiple AI Clients
|
|
470
|
+
|
|
471
|
+
The current project does not only manage internal workflow. It can also distribute the skill pack to:
|
|
472
|
+
|
|
473
|
+
- Codex
|
|
474
|
+
- Claude Code
|
|
475
|
+
|
|
476
|
+
That means teams can still share one collaboration protocol even when using different AI tools.
|
|
477
|
+
|
|
478
|
+
## About This Repository
|
|
479
|
+
|
|
480
|
+
This repository is first and foremost:
|
|
481
|
+
|
|
482
|
+
- The implementation and release repository of OSpec
|
|
483
|
+
|
|
484
|
+
It mainly contains:
|
|
485
|
+
|
|
486
|
+
- `dist/`: compiled CLI, commands, workflow, services, and adapters
|
|
487
|
+
- `assets/`: protocol docs, convention templates, global skills, and Git hooks
|
|
488
|
+
- `docs/`: external documentation and design specification documents
|
|
489
|
+
- `scripts/`: installation, release, and fork sync scripts
|
|
490
|
+
- `skill.yaml`, `SKILL.md`, `agents/`: skill packaging and distribution entry points
|
|
491
|
+
|
|
492
|
+
From the result of `ospec status .`, the current repository root is not fully initialized as a business project managed by OSpec. It still lacks:
|
|
493
|
+
|
|
494
|
+
- `.skillrc`
|
|
495
|
+
- `changes/active/`
|
|
496
|
+
- `changes/archived/`
|
|
497
|
+
|
|
498
|
+
That means this repository has two different identities:
|
|
499
|
+
|
|
500
|
+
- It is the source repository of the OSpec tool itself
|
|
501
|
+
- It is not an example business repository already running business requests through OSpec
|
|
502
|
+
|
|
503
|
+
So the more accurate interpretation is:
|
|
504
|
+
|
|
505
|
+
- This repository implements OSpec
|
|
506
|
+
- The direct usage target of OSpec is downstream business projects or newly initialized directories
|
|
507
|
+
|
|
508
|
+
## Current Behavioral Characteristics
|
|
509
|
+
|
|
510
|
+
Through actual command verification, the following behaviors can be confirmed:
|
|
511
|
+
|
|
512
|
+
- `ospec init` only initializes the protocol shell, and does not automatically generate project docs or create the first change
|
|
513
|
+
- `ospec docs generate` fills in the knowledge layer and layered skill entries, but does not apply a business scaffold
|
|
514
|
+
- When the Stitch plugin is not enabled, flags such as `ui_change` and `page_design` are recorded in `proposal.md`, but reported as unsupported flags
|
|
515
|
+
- After the Stitch plugin is enabled, the same flags activate `stitch_design_review` for real and automatically generate `artifacts/stitch/approval.json`
|
|
516
|
+
|
|
517
|
+
These behaviors reflect several core OSpec design choices:
|
|
518
|
+
|
|
519
|
+
- minimal by default
|
|
520
|
+
- explicit extension
|
|
521
|
+
- inspectable workflow
|
|
522
|
+
- plugins can block progression
|
|
523
|
+
- queue mode only starts when explicitly requested
|
|
524
|
+
|
|
525
|
+
## Recommended Quick Trial
|
|
526
|
+
|
|
527
|
+
If you want to experience the main workflow quickly, the recommended order is:
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
ospec status demo
|
|
531
|
+
ospec init demo
|
|
532
|
+
ospec docs generate demo
|
|
533
|
+
ospec new landing-refresh demo
|
|
534
|
+
ospec changes status demo
|
|
535
|
+
ospec progress demo/changes/active/landing-refresh
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
If you also want to experience plugin extensibility, continue with:
|
|
539
|
+
|
|
540
|
+
```bash
|
|
541
|
+
ospec plugins enable stitch demo
|
|
542
|
+
ospec new home-hero-redesign demo --flags ui_change,page_design
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
## Summary
|
|
546
|
+
|
|
547
|
+
In one sentence, OSpec is not a tool for helping teams "generate code faster". It is a tool for helping teams "deliver more reliably with AI".
|
|
548
|
+
|
|
549
|
+
Its core value is not templates, pages, or scaffolds. It is turning AI collaboration from something pushed by chat history into a manageable workflow with a protocol shell, a knowledge layer, change containers, gates, and archiving.
|