Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 34 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ See the full comparison in [How OpenSpec Compares](#how-openspec-compares).
┌────────────────────┐
│ Review & Align │
│ (edit specs/tasks) │◀──── feedback loop ──────┐
│ (edit specs/tasks) │◀───── refine loop ──────┐
└────────┬───────────┘ │
│ approved plan │
▼ │
Expand All @@ -78,7 +78,8 @@ See the full comparison in [How OpenSpec Compares](#how-openspec-compares).
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.
4. If apply feedback requires changes, refine proposal artifacts and re-approve before continuing.
5. Archive the change to merge the approved updates back into the source-of-truth specs.
```

## Getting Started
Expand All @@ -90,30 +91,30 @@ See the full comparison in [How OpenSpec Compares](#how-openspec-compares).

These tools have built-in OpenSpec commands. Select the OpenSpec integration when prompted.

| Tool | Commands |
|------|----------|
| **Amazon Q Developer** | `@openspec-proposal`, `@openspec-apply`, `@openspec-archive` (`.amazonq/prompts/`) |
| **Antigravity** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.agent/workflows/`) |
| **Auggie (Augment CLI)** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.augment/commands/`) |
| **Claude Code** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` |
| **Cline** | Workflows in `.clinerules/workflows/` directory (`.clinerules/workflows/openspec-*.md`) |
| **CodeBuddy Code (CLI)** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.codebuddy/commands/`) — see [docs](https://www.codebuddy.ai/cli) |
| **Codex** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (global: `~/.codex/prompts`, auto-installed) |
| **CoStrict** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.cospec/openspec/commands/`) — see [docs](https://costrict.ai)|
| **Crush** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.crush/commands/openspec/`) |
| **Cursor** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` |
| **Factory Droid** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.factory/commands/`) |
| **Gemini CLI** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.gemini/commands/openspec/`) |
| **GitHub Copilot** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.github/prompts/`) |
| **iFlow (iflow-cli)** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.iflow/commands/`) |
| **Kilo Code** | `/openspec-proposal.md`, `/openspec-apply.md`, `/openspec-archive.md` (`.kilocode/workflows/`) |
| **OpenCode** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` |
| **Qoder (CLI)** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.qoder/commands/openspec/`) — see [docs](https://qoder.com/cli) |
| **Qwen Code** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.qwen/commands/`) |
| **RooCode** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.roo/commands/`) |
| **Windsurf** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.windsurf/workflows/`) |

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`.
| Tool | Commands |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Amazon Q Developer** | `@openspec-proposal`, `@openspec-apply`, `@openspec-refine`, `@openspec-archive` (`.amazonq/prompts/`) |
| **Antigravity** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.agent/workflows/`) |
| **Auggie (Augment CLI)** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.augment/commands/`) |
| **Claude Code** | `/openspec:proposal`, `/openspec:apply`, `/openspec:refine`, `/openspec:archive` |
| **Cline** | Workflows in `.clinerules/workflows/` directory (`.clinerules/workflows/openspec-*.md`, includes refine) |
| **CodeBuddy Code (CLI)** | `/openspec:proposal`, `/openspec:apply`, `/openspec:refine`, `/openspec:archive` (`.codebuddy/commands/`) — see [docs](https://www.codebuddy.ai/cli) |
| **Codex** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (global: `~/.codex/prompts`, auto-installed) |
| **CoStrict** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.cospec/openspec/commands/`) — see [docs](https://costrict.ai) |
| **Crush** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.crush/commands/openspec/`) |
| **Cursor** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` |
| **Factory Droid** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.factory/commands/`) |
| **Gemini CLI** | `/openspec:proposal`, `/openspec:apply`, `/openspec:refine`, `/openspec:archive` (`.gemini/commands/openspec/`) |
| **GitHub Copilot** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.github/prompts/`) |
| **iFlow (iflow-cli)** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.iflow/commands/`) |
| **Kilo Code** | `/openspec-proposal.md`, `/openspec-apply.md`, `/openspec-refine.md`, `/openspec-archive.md` (`.kilocode/workflows/`) |
| **OpenCode** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` |
| **Qoder (CLI)** | `/openspec:proposal`, `/openspec:apply`, `/openspec:refine`, `/openspec:archive` (`.qoder/commands/openspec/`) — see [docs](https://qoder.com/cli) |
| **Qwen Code** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.qwen/commands/`) |
| **RooCode** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.roo/commands/`) |
| **Windsurf** | `/openspec-proposal`, `/openspec-apply`, `/openspec-refine`, `/openspec-archive` (`.windsurf/workflows/`) |

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`, `/openspec-refine.md`, or `/openspec-archive.md`.

</details>

Expand All @@ -122,8 +123,8 @@ Kilo Code discovers team workflows automatically. Save the generated files under

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 |
|-------|
| Tools |
| -------------------- |
| Amp • Jules • Others |

</details>
Expand Down Expand Up @@ -202,13 +203,14 @@ $ 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:
#### 3. Refine the Proposal (Optional)
Iterate on the proposal artifacts if apply feedback requires changes:

```text
You: Can you add acceptance criteria for the role and team filters?
(Shortcut for tools with slash commands: /openspec:refine add-profile-filters Add acceptance criteria for role and team filters)

AI: I'll update the spec delta with scenarios for role and team filters.
AI: I'll update the proposal artifacts with scenarios for role and team filters.
*Edits openspec/changes/add-profile-filters/specs/profile/spec.md and tasks.md.*
```

Expand Down Expand Up @@ -243,7 +245,7 @@ Or run the command yourself in terminal:
$ openspec archive add-profile-filters --yes # Archive the completed change without prompts
```

**Note:** Tools with native slash commands (Claude Code, CodeBuddy, Cursor, Codex, Qoder, RooCode) 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".
**Note:** Tools with native slash commands (Claude Code, CodeBuddy, Cursor, Codex, Qoder, RooCode) can use the shortcuts shown. All other tools work with natural language requests to "create an OpenSpec proposal", "refine the OpenSpec change", "apply the OpenSpec change", or "archive the change".

## Command Reference

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Why
Teams often need to adjust an approved change after an apply pass produces unexpected results. Today that forces either a brand-new proposal or ad-hoc instructions outside the OpenSpec workflow. A dedicated refine command keeps adjustments inside the workflow while enforcing re-approval and leaving code changes to apply.

## What Changes
**Slash command templates**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use markdown headings instead of bold text for subsections.

The subsection titles "Slash command templates", "Init scaffolding", "Update behavior", and "Agent instructions" are using bold emphasis rather than proper markdown headings. This affects document structure and readability.

🔎 Proposed fix
 ## What Changes
-**Slash command templates**
+### Slash command templates
 - From: Only `proposal`, `apply`, and `archive` shared templates exist.
 - To: Add a `refine` shared template that updates proposal/design/tasks/spec deltas only, runs strict validation, and stops for re-approval.
 - Reason: Provide a first-class refinement loop without mixing in code changes.
 - Impact: New `openspec-refine` command body and template entry.
 
-**Init scaffolding**
+### Init scaffolding
 - From: `openspec init` scaffolds proposal/apply/archive command files.
 - To: Scaffold refine command files alongside the existing three for every supported tool.
 - Reason: Make refine available wherever slash commands are generated.
 - Impact: One additional command file per tool.
 
-**Update behavior**
+### Update behavior
 - From: `openspec update` refreshes only proposal/apply/archive command files.
 - To: Refresh refine files when they already exist, without creating missing ones.
 - Reason: Keep refine guidance current while preserving update semantics.
 - Impact: Update covers refine templates too.
 
-**Agent instructions**
+### Agent instructions
 - From: The workflow guidance focuses on proposal → apply → archive only.
 - To: Add refine guidance for post-apply adjustments, including no code changes, re-approval gating, and out-of-scope handling.
 - Reason: Keep the documented workflow aligned with the new command.
 - Impact: Updated `openspec/AGENTS.md` content.

Also applies to: 11-11, 17-17, 23-23

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

5-5: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🤖 Prompt for AI Agents
In openspec/changes/archive/2025-12-19-add-refine-command/proposal.md around
lines 5, 11, 17, and 23, replace the subsection titles currently formatted with
bold emphasis (e.g., **Slash command templates**, **Init scaffolding**, **Update
behavior**, **Agent instructions**) with proper markdown headings (use an
appropriate level such as "##" or "###") so they become real document headings;
update each instance so the heading syntax is used and remove the surrounding
bold markup to improve document structure and readability.

- From: Only `proposal`, `apply`, and `archive` shared templates exist.
- To: Add a `refine` shared template that updates proposal/design/tasks/spec deltas only, runs strict validation, and stops for re-approval.
- Reason: Provide a first-class refinement loop without mixing in code changes.
- Impact: New `openspec-refine` command body and template entry.

**Init scaffolding**
- From: `openspec init` scaffolds proposal/apply/archive command files.
- To: Scaffold refine command files alongside the existing three for every supported tool.
- Reason: Make refine available wherever slash commands are generated.
- Impact: One additional command file per tool.

**Update behavior**
- From: `openspec update` refreshes only proposal/apply/archive command files.
- To: Refresh refine files when they already exist, without creating missing ones.
- Reason: Keep refine guidance current while preserving update semantics.
- Impact: Update covers refine templates too.

**Agent instructions**
- From: The workflow guidance focuses on proposal → apply → archive only.
- To: Add refine guidance for post-apply adjustments, including no code changes, re-approval gating, and out-of-scope handling.
- Reason: Keep the documented workflow aligned with the new command.
- Impact: Updated `openspec/AGENTS.md` content.

## Impact
- Affected specs: cli-init, cli-update, docs-agent-instructions
- Affected code: src/core/templates/slash-command-templates.ts, src/core/configurators/slash/*, src/core/templates/agents-template.ts
Loading