بنقرة واحدة
ospec
// Document-driven OSpec workflow for AI-assisted development with change-ready initialization, execution, validation, and archive readiness.
// Document-driven OSpec workflow for AI-assisted development with change-ready initialization, execution, validation, and archive readiness.
Create or advance an active change inside an OSpec project, from requirement intake through verification and finalize.
Create or advance an active change inside an OSpec project, from requirement intake through verification and finalize.
| name | ospec |
| description | Document-driven OSpec workflow for AI-assisted development with change-ready initialization, execution, validation, and archive readiness. |
| tags | ["cli","workflow","automation","typescript","ospec","bootstrap"] |
Document-driven OSpec workflow for AI-assisted development with change-ready initialization, execution, validation, archiving, and docs maintenance.
When the user says something short like:
使用 ospec 初始化项目使用 ospec 初始化这个目录use ospec to initialize this directoryuse ospec to initialize this repoexpand it internally as:
ospec init so it ends in a change-ready stateDo not force the user to repeat those steps manually when the request is already clear.
Treat plain project-init intent as enough to trigger this flow. Do not require the user to restate the guardrails in a longer prompt.
When the user asks to initialize a directory, do not freehand the initialization flow.
If the user intent is simply to initialize the project or current directory, treat that as a request for this mandatory flow.
Use this exact behavior:
ospec init [path] when the directory is uninitialized or not yet change-ready--document-language; do not assume a brand-new repo will infer itospec new unless the user explicitly asks to create a changeNever replace ospec init with manual directory creation or a hand-written approximation.
Do not say initialization is complete unless the managed protocol-shell assets and baseline project knowledge docs actually exist on disk.
Required checks after ospec init:
.skillrc.ospec/changes/active/changes/archived/SKILL.mdSKILL.index.json.ospec/tools/build-index-auto.cjsfor-ai/ai-guide.mdfor-ai/execution-protocol.mdfor-ai/naming-conventions.mdfor-ai/skill-conventions.mdfor-ai/workflow-conventions.mdfor-ai/development-guide.mddocs/project/overview.mddocs/project/tech-stack.mddocs/project/architecture.mddocs/project/module-map.mddocs/project/api-overview.mdDuring plain init, do not report docs/SKILL.md, optional knowledge maps such as knowledge/src/SKILL.md / knowledge/tests/SKILL.md, or business scaffold as if they were part of change-ready completion.
Use these prompt styles as the preferred mental model.
Use when the user already trusts OSpec defaults.
Use ospec to initialize this project.
Use when you want short prompts and still want OSpec to finish initialization properly.
Use ospec to initialize this project according to current OSpec rules.
Use when you want the AI to gather missing context before initialization if needed.
Use ospec to initialize this project. If project context is missing, ask me for a short summary or tech stack first. If I skip it, continue with placeholder docs.
Use when the repository is already initialized and the project knowledge layer needs a refresh or repair pass.
Use ospec to refresh or repair the project knowledge layer for this directory. Do not create a change yet.
Use when the user is explicitly ready to move into execution.
Use ospec to create and advance a change for this requirement. Respect the current project state and do not create queue work unless I ask for it.
Use when the user explicitly wants multiple changes queued instead of one normal active change.
Use ospec to break this TODO into multiple changes, create a queue, show the queue first, and do not run it yet.
Use when the user explicitly wants queue execution, not the normal single-change flow.
Use ospec to create a change queue and execute it explicitly with ospec run manual-safe.
Always keep these rules:
ospec init should leave the repository in a change-ready state--document-language from the explicit language request or current conversation language when the project language is already apparentospec docs generate refreshes, repairs, or backfills project knowledge docs after initializationdocs/project/* files on disk before declaring successdocs/project/bootstrap-summary.mdThis CLI now covers:
Treat these as the source of truth for active delivery work:
.skillrcdocs/project/overview.mddocs/project/tech-stack.mddocs/project/architecture.mdchanges/active/<change>/proposal.mdchanges/active/<change>/tasks.mdchanges/active/<change>/state.jsonchanges/active/<change>/verification.mdBefore advancing an active change:
.skillrc.plugins to detect enabled blocking pluginsstitch_design_review, inspect changes/active/<change>/artifacts/stitch/approval.jsonstatus != approved, treat the change as blocked and do not claim it is ready to continue or archiveDo not fall back to the old features/... layout unless the target repository really still uses it.
ospec status [path]
ospec init [path]
ospec init [path] --document-language zh-CN
ospec init [path] --summary "..." --tech-stack node,react
ospec docs generate [path]
ospec new <change-name> [path]
ospec docs status [path]
ospec skills status [path]
ospec changes status [path]
ospec queue status [path]
ospec queue add <change-name> [path]
ospec queue next [path]
ospec run start [path] --profile manual-safe
ospec run status [path]
ospec run step [path]
ospec run resume [path]
ospec run stop [path]
ospec plugins available
ospec plugins info <plugin>
ospec plugins install <plugin>
ospec plugins status [path]
ospec plugins approve stitch [changes/active/<change>]
ospec plugins reject stitch [changes/active/<change>]
ospec index check [path]
ospec index build [path]
ospec workflow show
ospec workflow list-flags
ospec progress [changes/active/<change>]
ospec verify [changes/active/<change>]
ospec archive [changes/active/<change>]
ospec archive [changes/active/<change>] --check
ospec finalize [changes/active/<change>]
ospec skill status ospec
ospec skill install ospec
ospec skill status ospec-change
ospec skill install ospec-change
ospec skill status-claude ospec
ospec skill install-claude ospec
ospec skill status-claude ospec-change
ospec skill install-claude ospec-change
Managed auto-sync targets for global install, ospec init, and ospec update are:
ospecospec-changeAdditional packaged skills remain available for explicit install, for example:
ospec skill install ospec-init
ospec skill install-claude ospec-init
Preferred execution order for a new directory:
ospec init [path]
ospec new <change-name> [path]
ospec verify [changes/active/<change>]
ospec finalize [changes/active/<change>]
Use ospec docs generate [path] later when you need a docs-only maintenance pass.
Use ospec status [path] separately when you want an explicit troubleshooting snapshot.
For completed changes, archive before commit. Use ospec archive [changes/active/<change>] to execute the archive and --check only when you want a readiness preview without moving files.
For the normal closeout path, prefer ospec finalize [changes/active/<change>]. It should verify completeness, rebuild the index, archive the change, and leave Git commit as a separate manual step.
If the repository type is unclear:
This is important because valid OSpec projects include:
Before saying work is complete:
SKILL.index.json current after meaningful skill updatesSKILL.index.json section offsets as LF-normalized so Windows CRLF and Linux LF checkouts do not drift