brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Document-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
Claude Code
$ npx -y skills add clawplays/ospec --skill ospec --agent claude-code
Codex
$ npx skills add clawplays/ospec --skill ospec -a codex -y
Cursor
$ npx skills add clawplays/ospec --skill ospec -a cursor -y
Gemini CLI
$ npx skills add clawplays/ospec --skill ospec -a gemini-cli -y
GitHub Copilot
$ npx skills add clawplays/ospec --skill ospec -a github-copilot -y
OpenCode
$ npx skills add clawplays/ospec --skill ospec -a opencode -y
Windsurf
$ npx skills add clawplays/ospec --skill ospec -a windsurf -y
name: ospec description: Document-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge. tags: [cli, workflow, automation, ospec]
Use this root skill as a compact router. Keep invariant safety and workflow-selection rules here; load detailed commands and stage protocols from the initialized project's indexed files only when that stage is active.
When the user asks to initialize a project, run `ospec init [path]`. In AI-assisted initialization, pass the explicit or conversational language with `--document-language`. If useful context is missing, ask once for a short project summary or tech stack; if the user skips it, continue with placeholders. Verify the generated files on disk and stop before creating work unless the user explicitly asks for a change or goal.
Initialization is change-ready only when `.skillrc`, the managed `.ospec/` or classic OSpec directory, active and archived change directories, `SKILL.md`, `SKILL.index.json`, the index builder (`.ospec/tools/build-index-auto.cjs`), `for-ai/` protocol files, and baseline `docs/project/` knowledge files exist. Verify those managed files on disk yourself and never claim initialization is complete before you have: a command that exited zero is not evidence that the files are there.
Do not hand-write an approximation of `ospec init`. Do not assume a web stack, apply business scaffold, generate `docs/project/bootstrap-summary.md`, create queue work, or create the first change without explicit intent.
For an initialized project, read in this order:
1. `.skillrc` for layout, language, workflow policy, and model profiles. 2. the `Table of Contents` section of `.ospec/session-brief.md` to see which archived changes and knowledge documents exist, then `ospec docs locate --feature <slug>` / `--affects <path>` to jump straight to the section that describes a behavior, and `ospec index query <keyword...>` as the keyword router into `SKILL.index.json`; never read the whole index file — it grows without bound as changes archive. 3. The current session brief, bootstrap, dispatch, review, or repair packet. 4. Only the indexed project documents, change files, and target files named by that packet.
Do not load every historical change or every protocol file by default. `for-ai/ai-guide.md` is a router into the protocol that owns each profile, not a rule file — the `ospec-change` and `ospec-goal` skills carry the operating rules for their profile. Behind them: `for-ai/change-protocol.md` is the classic-change contract in full, and `for-ai/execution-protocol.md` is the goal controller reference, opened only when a named situation needs its detail and never by a classic change, which that file forbids. Use `ospec help` or subcommand help instead of carrying the complete CLI catalog in context.
Decision gates belong to the user on every harness: never auto-select a `recommended` option or resolve a gate yourself, present each gate through the capability ladder — a harness-native question UI (Claude Code `AskUserQuestion`, Gemini `ask_user`), else a plan/approval UI, else the decision report `Chat Prompt` in chat — and wait for the user's actual answer. You always ask; only the presentation differs. The full contract is stated where your profile is already sent: `for-ai/change-protocol.md` for a classic change, the `ospec-goal` skill and `for-ai/execution-protocol.md` for a goal.
In Claude Code, install the managed hook once with `ospec session hook --target claude --apply` when missing; `PreToolUse(Task)` is then a hard dispatch gate and prompt hooks stay silent unless a required decision is pending. That hook is a Claude-only, opt-in convenience — `ospec session hook --target` accepts no other harness and `ospec init` writes no `.claude/` — so it never replaces the documented contract.
Use the full `ospec execute ...` task-graph/controller layer only for Goal work. A classic Change may use the shared `ospec execute decision` command for durable user choices, but it must not enter Goal bootstrap, workspace, dispatch, review, evidence, or Loop commands.
A router routes: the controller invariants — preflight
Spec-driven, agentic workflow framework for AI coding agents. Turn a request into a verifiable goal loop — plan, act, verify — with durable specs and evidence in your repo. Works with Claude Code, Codex, Gemini, OpenCode, and plain CLI.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.