Loading...
Loading...
OpenSpec Spec-Driven Development Assistant - An AI-aided programming framework based on the OPSX workflow. Align requirements with AI before writing code, and manage changes using a Schema-driven artifact dependency system. Trigger Conditions: 1. User mentions "openspec", "opsx", or spec-driven development 2. User wants to start new feature development or refactoring 3. User needs to explore complex problems or clarify requirements 4. User complains about AI misunderstanding or frequent rework 5. User uses slash commands such as /opsx:new, /opsx:ff, /opsx:apply, etc. 6. During project initialization or preparation for major changes
npx skill4agent add ruan-cat/monorepo openspec/opsx:*openspec/
├── config.yaml # Project configuration (optional)
├── specs/ # Current system behavior (source of truth)
│ ├── auth.md
│ └── api.md
├── changes/ # Active changes
│ └── add-feature/
│ ├── .openspec.yaml
│ ├── proposal.md
│ ├── specs/
│ ├── design.md
│ └── tasks.md
├── archive/ # Archived changes
│ └── 2025-01-23-add-feature/
└── schemas/ # Custom workflows (optional)
└── my-workflow/
├── schema.yaml
└── templates/| Command | Function |
|---|---|
| Explore ideas, investigate problems, clarify requirements |
| Initiate a new change |
| Create the next ready artifact |
| Fast forward - Create all planned artifacts at once |
| Implement tasks and update artifacts as needed |
| Verify completeness, correctness, and consistency of implementation |
| Sync delta specs to main specs (optional) |
| Archive completed changes |
| Bulk archive multiple changes |
| Interactive tutorial |
openspec init # Initialize project
openspec update # Update instruction files
openspec list # List active changes
openspec show <name> # View change details
openspec validate <name> --strict # Strict format validation
openspec status --change <name> # View artifact status
openspec archive <name> --yes # Archive change
openspec schemas # List available schemas
openspec schema init <name> # Create custom schema
openspec schema fork <source> <name> # Copy existing schema/opsx:new → /opsx:ff → /opsx:apply → /opsx:verify → /opsx:archive/opsx:explore → /opsx:new → /opsx:continue → ... → /opsx:apply/opsx:new → /opsx:continue (repeat) → /opsx:apply → /opsx:archiveproposal → specs → design → tasks → implement
↓
designBLOCKED → READY → DONE
↓ ↓ ↓
Missing dependencies Dependencies completed File exists## ADDED Requirements
### Requirement: New Feature Name
The system MUST provide [feature description].
#### Scenario: Scenario Name
- **WHEN** Precondition
- **THEN** Expected result
- **AND** Additional conditions
## MODIFIED Requirements
### Requirement: Modified Feature
- **Change Description**: Specific changes
- **Reason**: Reason for modification
- **Impact Scope**: Affected areas
## REMOVED Requirements
### Requirement: Deprecated Feature
- **Reason**: Deprecation reason
- **Migration**: Migration pathschema: spec-driven # Default schema
context: | # Context injected into all artifacts
Tech stack: TypeScript, React, Node.js
Testing: Vitest
Style: ESLint + Prettier
rules: # Specific rules per artifact
proposal:
- Include rollback plan
specs:
- Use Given/When/Then format
design:
- Include sequence diagrams--schema <name>.openspec.yamlopenspec/config.yamlspec-drivenopenspec schema init my-workflow
# Or based on existing schema
openspec schema fork spec-driven my-workflow# openspec/schemas/my-workflow/schema.yaml
name: my-workflow
version: 1
description: Custom workflow
artifacts:
- id: proposal
generates: proposal.md
template: proposal.md
requires: []
- id: tasks
generates: tasks.md
template: tasks.md
requires: [proposal]
apply:
requires: [tasks]
tracks: tasks.md<!-- templates/proposal.md -->
## Why
<!-- Why this change is needed -->
## What Changes
<!-- Specific change content -->
## Impact
<!-- Impact scope -->/opsx:verifySame intent? → YES: UPDATE / NO: NEW
>50% overlap?→ YES: UPDATE / NO: NEW
Original can be completed?→ NO: UPDATE / YES: NEWtasks.mdtasks.md# Check installation
openspec --version
# Reinstall
npm install -g @fission-ai/openspec@latest
# Refresh instructions
openspec update# View status
openspec status --change <name> --json
# Validate format
openspec validate <name> --strictopenspec validate <name> --strictspecs/OPENSPEC_CONCURRENCYOPENSPEC_TELEMETRY=0NO_COLOR