OpenSpec Workflow for Openclaw

A specification-driven development framework that ensures AI agents follow a structured, iterative process from proposal to archival.

huangxiaoqian007
v1.0.0
Mar 31, 2026
1
901
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openspec-dev-flow

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openspec-dev-flow using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is OpenSpec Workflow?

The OpenSpec Workflow is a professional development protocol tailored for AI coding agents to ensure high-quality software delivery. It moves away from rigid waterfall phases toward a fluid, action-based lifecycle where every change is documented and agreed upon before implementation. By integrating this into Openclaw Skills, developers can maintain a clean source of truth for their codebase requirements, ensuring that AI agents understand not just the 'what', but the 'why' and 'how' behind every code change.

At its heart, the workflow emphasizes Brownfield-first development, meaning it is optimized for existing codebases. It uses delta specifications to describe incremental changes rather than rewriting entire documents, making it highly efficient for ongoing projects. Whether you are performing a complex refactoring or adding a new feature, this workflow provides the guardrails necessary for predictable AI behavior.

OpenSpec Workflow Use Cases

  • Orchestrating complex feature development where requirements need to be validated before a single line of code is written.
  • Performing architectural refactoring while maintaining a clear audit trail of design decisions.
  • Developing and documenting new Openclaw Skills using standardized specification patterns.
  • Managing parallel development tasks by archiving completed changes into a central source of truth.

How OpenSpec Workflow Works

  1. Exploration: The agent analyzes the existing code and context to clarify requirements without creating permanent artifacts.
  2. Information Gathering: The agent asks targeted questions to define intent, scope (in-scope vs. out-of-scope), and the high-level approach.
  3. Proposal Creation: A proposal.md is generated for the user to review and confirm the project's direction.
  4. Artifact Planning: The agent builds a design document, delta specs (detailing additions or modifications), and a granular tasks.md checklist.
  5. Implementation (Apply): The agent executes tasks sequentially, marking progress in the checklist and reporting status to the user.
  6. Verification: The agent audits the work across three dimensions: Completeness, Correctness, and Coherence.
  7. Archival: Delta specs are merged into the main system truth, and the change artifacts are moved to a timestamped archive folder.

OpenSpec Workflow Setup

To activate the OpenSpec Workflow in your development environment, ensure your AI agent is equipped with the necessary filesystem permissions. You can initiate the process by requesting a task using the standard OpenSpec triggers. Use the following command structure within your agent interface:

# Trigger a new proposal for a feature
/opsx:propose add-new-feature

# Or simply tell the agent
"Follow the OpenSpec flow to implement dark mode."

The agent will automatically scaffold the openspec/ directory structure if it does not already exist.

OpenSpec Workflow Data Schema & Taxonomy

The workflow maintains a structured taxonomy within the openspec/ root directory to ensure clarity and traceability:

Location Artifact Purpose
specs/ Domain Specs The permanent source of truth for current system behavior.
changes/ Active Changes Subfolders for each active task containing proposals and task lists.
changes/archive/ Historical Records Dated folders containing artifacts from successfully completed and merged changes.
delta specs/ Requirement Deltas Specific Markdown files describing ADDED, MODIFIED, or REMOVED requirements.

All specifications utilize RFC 2119 keywords (MUST, SHOULD, MAY) and Gherkin-style (Given/When/Then) scenarios for maximum technical clarity.

OpenSpec Workflow Advanced Features

  • Core vs. Expanded Profiles: Choose between a fast-path workflow for simple tasks or a detailed, step-by-step workflow for complex migrations.
  • Progressive Rigor: Scale from Lite specs (behavior-focused) to Full specs (API/Contract heavy) based on the risk and complexity of the change.
  • Bulk Archiving: A power-user command to automatically detect and resolve conflicts when merging multiple parallel changes into the source of truth.
  • Interactive Onboarding: A built-in tutorial mode (/opsx:onboard) that guides new users through a real-world implementation to learn the protocol.
  • Context Sanitation: Automatically manages task granularity to keep the AI context window clean and focused on the current implementation step.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*