# OpenSpec **Repository Path**: cpgithub/OpenSpec ## Basic Information - **Project Name**: OpenSpec - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-11-10 - **Last Updated**: 2025-11-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
Spec-driven development for AI coding assistants.
Follow @0xTab on X for updates · Join the OpenSpec Discord for help and questions.
# OpenSpec OpenSpec aligns humans and AI coding assistants with spec-driven development so you agree on what to build before any code is written. **No API keys required.** ## Why OpenSpec? AI coding assistants are powerful but unpredictable when requirements live in chat history. OpenSpec adds a lightweight specification workflow that locks intent before implementation, giving you deterministic, reviewable outputs. Key outcomes: - Human and AI stakeholders agree on specs before work begins. - Structured change folders (proposals, tasks, and spec updates) keep scope explicit and auditable. - Shared visibility into what's proposed, active, or archived. - Works with the AI tools you already use: custom slash commands where supported, context rules everywhere else. ## How OpenSpec compares (at a glance) - **Lightweight**: simple workflow, no API keys, minimal setup. - **Brownfield-first**: works great beyond 0→1. OpenSpec separates the source of truth from proposals: `openspec/specs/` (current truth) and `openspec/changes/` (proposed updates). This keeps diffs explicit and manageable across features. - **Change tracking**: proposals, tasks, and spec deltas live together; archiving merges the approved updates back into specs. - **Compared to spec-kit & Kiro**: those shine for brand-new features (0→1). OpenSpec also excels when modifying existing behavior (1→n), especially when updates span multiple specs. See the full comparison in [How OpenSpec Compares](#how-openspec-compares). ## How It Works ``` ┌────────────────────┐ │ Draft Change │ │ Proposal │ └────────┬───────────┘ │ share intent with your AI ▼ ┌────────────────────┐ │ Review & Align │ │ (edit specs/tasks) │◀──── feedback loop ──────┐ └────────┬───────────┘ │ │ approved plan │ ▼ │ ┌────────────────────┐ │ │ Implement Tasks │──────────────────────────┘ │ (AI writes code) │ └────────┬───────────┘ │ ship the change ▼ ┌────────────────────┐ │ Archive & Update │ │ Specs (source) │ └────────────────────┘ 1. Draft a change proposal that captures the spec updates you want. 2. Review the proposal with your AI assistant until everyone agrees. 3. Implement tasks that reference the agreed specs. 4. Archive the change to merge the approved updates back into the source-of-truth specs. ``` ## Getting Started ### Supported AI Tools #### Native Slash Commands These tools have built-in OpenSpec commands. Select the OpenSpec integration when prompted. | Tool | Commands | |------|----------| | **Claude Code** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` | | **CodeBuddy Code (CLI)** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.codebuddy/commands/`) — see [docs](https://www.codebuddy.ai/cli) | | **CoStrict** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.cospec/openspec/commands/`) — see [docs](https://costrict.ai)| | **Cursor** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` | | **Cline** | Rules in `.clinerules/` directory (`.clinerules/openspec-*.md`) | | **Crush** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.crush/commands/openspec/`) | | **Factory Droid** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.factory/commands/`) | | **OpenCode** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` | | **Kilo Code** | `/openspec-proposal.md`, `/openspec-apply.md`, `/openspec-archive.md` (`.kilocode/workflows/`) | | **Qoder (CLI)** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.qoder/commands/openspec/`) — see [docs](https://qoder.com/cli) | | **Windsurf** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.windsurf/workflows/`) | | **Codex** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (global: `~/.codex/prompts`, auto-installed) | | **GitHub Copilot** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.github/prompts/`) | | **Amazon Q Developer** | `@openspec-proposal`, `@openspec-apply`, `@openspec-archive` (`.amazonq/prompts/`) | | **Auggie (Augment CLI)** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.augment/commands/`) | | **Qwen Code** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.qwen/commands/`) | Kilo Code discovers team workflows automatically. Save the generated files under `.kilocode/workflows/` and trigger them from the command palette with `/openspec-proposal.md`, `/openspec-apply.md`, or `/openspec-archive.md`. #### AGENTS.md Compatible These tools automatically read workflow instructions from `openspec/AGENTS.md`. Ask them to follow the OpenSpec workflow if they need a reminder. Learn more about the [AGENTS.md convention](https://agents.md/). | Tools | |-------| | Amp • Jules • Gemini CLI • Others | ### Install & Initialize #### Prerequisites - **Node.js >= 20.19.0** - Check your version with `node --version` #### Step 1: Install the CLI globally ```bash npm install -g @fission-ai/openspec@latest ``` Verify installation: ```bash openspec --version ``` #### Step 2: Initialize OpenSpec in your project Navigate to your project directory: ```bash cd my-project ``` Run the initialization: ```bash openspec init ``` **What happens during initialization:** - You'll be prompted to pick any natively supported AI tools (Claude Code, CodeBuddy, Cursor, OpenCode, Qoder,etc.); other assistants always rely on the shared `AGENTS.md` stub - OpenSpec automatically configures slash commands for the tools you choose and always writes a managed `AGENTS.md` hand-off at the project root - A new `openspec/` directory structure is created in your project **After setup:** - Primary AI tools can trigger `/openspec` workflows without additional configuration - Run `openspec list` to verify the setup and view any active changes - If your coding assistant doesn't surface the new slash commands right away, restart it. Slash commands are loaded at startup, so a fresh launch ensures they appear ### Optional: Populate Project Context After `openspec init` completes, you'll receive a suggested prompt to help populate your project context: ```text Populate your project context: "Please read openspec/project.md and help me fill it out with details about my project, tech stack, and conventions" ``` Use `openspec/project.md` to define project-level conventions, standards, architectural patterns, and other guidelines that should be followed across all changes. ### Create Your First Change Here's a real example showing the complete OpenSpec workflow. This works with any AI tool. Those with native slash commands will recognize the shortcuts automatically. #### 1. Draft the Proposal Start by asking your AI to create a change proposal: ```text You: Create an OpenSpec change proposal for adding profile search filters by role and team (Shortcut for tools with slash commands: /openspec:proposal Add profile search filters) AI: I'll create an OpenSpec change proposal for profile filters. *Scaffolds openspec/changes/add-profile-filters/ with proposal.md, tasks.md, spec deltas.* ``` #### 2. Verify & Review Check that the change was created correctly and review the proposal: ```bash $ openspec list # Confirm the change folder exists $ openspec validate add-profile-filters # Validate spec formatting $ openspec show add-profile-filters # Review proposal, tasks, and spec delta ``` #### 3. Refine the Specs Iterate on the specifications until they match your needs: ```text You: Can you add acceptance criteria for the role and team filters? AI: I'll update the spec delta with scenarios for role and team filters. *Edits openspec/changes/add-profile-filters/specs/profile/spec.md and tasks.md.* ``` #### 4. Implement the Change Once specs look good, start implementation: ```text You: The specs look good. Let's implement this change. (Shortcut for tools with slash commands: /openspec:apply add-profile-filters) AI: I'll work through the tasks in the add-profile-filters change. *Implements tasks from openspec/changes/add-profile-filters/tasks.md* *Marks tasks complete: Task 1.1 ✓, Task 1.2 ✓, Task 2.1 ✓...* ``` #### 5. Archive the Completed Change After implementation is complete, archive the change: ```text AI: All tasks are complete. The implementation is ready. You: Please archive the change (Shortcut for tools with slash commands: /openspec:archive add-profile-filters) AI: I'll archive the add-profile-filters change. *Runs: openspec archive add-profile-filters --yes* ✓ Change archived successfully. Specs updated. Ready for the next feature! ``` Or run the command yourself in terminal: ```bash $ openspec archive add-profile-filters --yes # Archive the completed change without prompts ``` **Note:** Tools with native slash commands (Claude Code, CodeBuddy, Cursor, Codex, Qoder) can use the shortcuts shown. All other tools work with natural language requests to "create an OpenSpec proposal", "apply the OpenSpec change", or "archive the change". ## Command Reference ```bash openspec list # View active change folders openspec view # Interactive dashboard of specs and changes openspec show