Files
OpenSpec/docs/README.md
T
Clay GoodandClaude Opus 5 9a61f3f30d docs(installation): add an AI-assistant setup prompt (#1466)
* docs(installation): add an AI-assistant setup prompt

Adds a provider-neutral "Install with your AI assistant" section to
docs/installation.md with one copyable prompt that detects the runtime and
package manager, installs the CLI, runs `openspec init --tools <id>`, and
verifies the result. Surfaced from the README Quick Start and the docs map.
The manual package-manager instructions stay the source of truth.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs(installation): harden the AI-assistant prompt and link it from the install paths

Adversarial review found the first draft's verify step false-failing on healthy
installs and its guardrails unenforceable. The prompt now reports what init
actually printed instead of asserting config.yaml and command files (config.yml
is equally valid; six tools and delivery=skills correctly generate zero
commands), warns that --tools auto-cleans legacy files including opsx-*.md
prompts under $HOME, picks the package manager by what's on PATH rather than by
lockfile, scopes yarn to 1.x, and stops cleanly on EACCES, a missing pnpm global
bin dir, or a version-manager shim.

Also links the flow from getting-started, the docs map, troubleshooting, and the
website CTA; notes Berry dropped `yarn global`; replaces `npm bin -g` (removed in
npm 9) with `npm prefix -g`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs(installation): close the gaps two trial runs found in the setup prompt

Two assistants (different models) ran the prompt end to end in sandboxes, one
on Cursor and one on Codex with deliberately messy legacy files. Both finished
with a working, verified setup. Their findings:

- Cursor's commands are `/opsx-propose`, not `/opsx:propose`. The prompt named
  the colon form and init's summary agrees with it, so the assistant would have
  handed back a command the tool doesn't match. It now takes the spelling from
  the files init created.
- "List whatever you find and wait for my go-ahead" was undefined when the list
  is empty, i.e. on every fresh project. It now says to carry on.
- `openspec --version` succeeding doesn't prove it's the copy just installed;
  an older one earlier on PATH shadows it. Step 3 now compares the two.
- The request asked for confirmation before privileged/global changes; the
  prompt only stopped reactively on failure. It now shows the global install
  command and waits.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: correct the core profile to six workflows and the tool count to 30+

Two long-standing inaccuracies, found while verifying the install docs.

`CORE_WORKFLOWS` (src/core/profiles.ts:14) is six — propose, explore, apply,
update, sync, archive — and a real `openspec init` generates six skills and six
commands. Eleven pages listed five, omitting `update`; migration-guide listed
four and filed `sync` under the expanded set. supported-tools also dropped
`update` from the full workflow-ID list. docs/commands.md was already right and
is untouched, as are flow diagrams that show a typical path rather than a
profile roster.

The tool count was written as both "25+" and "30+" against 34 supported tools.
Now consistently "30+".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: address CodeRabbit review on the AI-assisted install flow

- Windows puts global npm binaries directly in the prefix directory, not in a
  `bin/` subdirectory; the troubleshooting fix I added said otherwise.
- Tell the assistant to stop rather than improvise when none of npm/pnpm/yarn/bun
  is available, and point Nix users at the Nix section.
- Drop the blockquote on the getting-started pointer so it isn't a second `>`
  block adjacent to the explore callout (markdownlint MD028).

Two other comments were already fixed in 1bf0706 (stop on a PATH problem; map
the user's answer to an exact tool id).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 00:39:47 +00:00

7.3 KiB

OpenSpec Documentation

Welcome. This is the home for everything OpenSpec.

OpenSpec helps you and your AI coding assistant agree on what to build before any code is written. You describe the change, the AI drafts a short spec and a task list, you both look at the same plan, and then the work happens. No more discovering halfway through that the AI built the wrong thing.

If you read nothing else, read these two pages:

  1. Getting Started: install, initialize, and ship your first change.
  2. How Commands Work: where you actually type /opsx:propose (hint: in your AI chat, not the terminal). This trips up almost everyone once.

That second one matters more than it looks. OpenSpec has two halves: a command line tool you run in your terminal, and slash commands you give to your AI assistant. Knowing which is which saves you the most common moment of confusion.

The best habit to build first: when you're not sure what to build, start with /opsx:explore. It's a no-stakes thinking partner that reads your code, weighs options, and sharpens a fuzzy idea into a concrete plan before any artifact or code exists. The Explore First guide makes the case.

Pick your path

I'm brand new. Start with Getting Started, then skim the Core Concepts at a Glance. When something feels mysterious, the FAQ and Glossary are nearby.

I have a problem but not a plan. This is the common case, and it has a dedicated answer: Explore First. Use /opsx:explore to think it through with the AI before committing to anything.

I have a big existing codebase. You don't document all of it. Using OpenSpec in an Existing Project shows how to start on real, brownfield code without boiling the ocean.

I just want to get it working. Install, run openspec init, then read How Commands Work so your first slash command lands in the right place. Or hand the setup to your assistant with the AI-assisted install prompt.

I learn by example. The Examples & Recipes page walks through real changes start to finish: a small feature, a bug fix, a refactor, an exploration.

The AI just drafted a plan — now what? Read it. Reviewing a Change shows the two-minute pass that catches a wrong turn while it's still cheap, and Writing Good Specs covers what a plan worth approving is made of.

I work on a team. OpenSpec on a Team shows how a change maps onto a branch and a pull request, and how teammates review a plan before the code.

I'm coming from the old workflow. The Migration Guide explains what changed and why, and promises your existing work is safe.

I want to bend it to my team's process. Customization covers project config, custom schemas, and shared context.

Something's broken. Troubleshooting collects the failures people actually hit, with fixes.

The whole map

Start here

Doc What it gives you
Getting Started Install, initialize, and run your first change end to end
Explore First Use /opsx:explore to think through an idea before you commit
How Commands Work Where slash commands run, what "interactive mode" means, terminal vs chat
Core Concepts at a Glance The whole mental model on one page: specs, changes, deltas, archive
Installation npm, pnpm, yarn, bun, Nix, a prompt that hands setup to your AI assistant, and how to verify it worked

Use it day to day

Doc What it gives you
Workflows Common patterns and when to reach for each command
Examples & Recipes Full walkthroughs of real changes, copy-pasteable
Writing Good Specs What a strong requirement and scenario look like, and how to right-size a change
Reviewing a Change The two-minute pass on a drafted plan before any code is written
OpenSpec on a Team How changes fit branches, pull requests, and review
Using OpenSpec in an Existing Project Adopting OpenSpec on a large brownfield codebase
Editing & Iterating on a Change Update artifacts, go back, reconcile manual edits
Commands Reference for every /opsx:* slash command
CLI Reference for every openspec terminal command

Understand it deeply

Doc What it gives you
Concepts The long-form explanation of specs, changes, artifacts, schemas, and archive
OPSX Workflow Why the workflow is fluid instead of phase-locked, plus an architecture deep dive
Glossary Every term defined in one place

Make it yours

Doc What it gives you
Customization Project config, custom schemas, shared context
Multi-Language Generate artifacts in languages other than English
Supported Tools The 30+ AI tools OpenSpec integrates with, and where files land

When you need help

Doc What it gives you
FAQ Quick answers to the questions people ask most
Troubleshooting Concrete fixes for concrete failures
Migration Guide Moving from the legacy workflow to OPSX

Coordinate across repos (beta)

Doc What it gives you
Stores: User Guide Plan in its own repo when your work spans repos or teams
Agent Contract The machine-readable CLI surfaces agents drive

The thirty-second version

1. Install        npm install -g @fission-ai/openspec@latest
2. Initialize     cd your-project && openspec init
3. Explore        (in your AI chat)  /opsx:explore           ← optional, but a great habit
4. Propose        (in your AI chat)  /opsx:propose add-dark-mode
5. Build          (in your AI chat)  /opsx:apply
6. Archive        (in your AI chat)  /opsx:archive

Steps 1 and 2 happen in your terminal. The rest happen in your AI assistant's chat. That split is the one thing worth memorizing, and How Commands Work explains exactly why. Step 3 is optional, but starting with /opsx:explore when you're unsure is the habit most worth forming.

Where else to get help

Found something in these docs that's wrong, stale, or confusing? That's a bug. Open an issue or a PR. Documentation improvements are some of the most valuable contributions you can make.