-
Notifications
You must be signed in to change notification settings - Fork 972
feat(workflow): Add openspec-refine slash command for feedback loop.
#372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
098b62b
proposal: Add openspec-refine feature proposal.
cylixlee 9ef91ed
apply: Implement openspec-refine slash command.
cylixlee b5f3c06
archive: Complete `openspec-refine` command implementation. Tested lo…
cylixlee bde3233
Merge branch 'main' into feature/openspec-refine
cylixlee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
openspec/changes/archive/2025-12-19-add-refine-command/proposal.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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** | ||
| - 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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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