-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore: archive completed changes and clean up stale ones #455
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
Merged
Merged
Changes from all commits
Commits
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 was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
openspec/changes/add-scaffold-command/specs/cli-scaffold/spec.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions
60
...-01-06-make-apply-instructions-schema-aware/specs/cli-artifact-workflow/spec.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,60 @@ | ||
| ## ADDED Requirements | ||
|
|
||
| ### Requirement: Schema Apply Block | ||
|
|
||
| The system SHALL support an `apply` block in schema definitions that controls when and how implementation begins. | ||
|
|
||
| #### Scenario: Schema with apply block | ||
|
|
||
| - **WHEN** a schema defines an `apply` block | ||
| - **THEN** the system uses `apply.requires` to determine which artifacts must exist before apply | ||
| - **AND** uses `apply.tracks` to identify the file for progress tracking (or null if none) | ||
| - **AND** uses `apply.instruction` for guidance shown to the agent | ||
|
|
||
| #### Scenario: Schema without apply block | ||
|
|
||
| - **WHEN** a schema has no `apply` block | ||
| - **THEN** the system requires all artifacts to exist before apply is available | ||
| - **AND** uses default instruction: "All artifacts complete. Proceed with implementation." | ||
|
|
||
| ### Requirement: Apply Instructions Command | ||
|
|
||
| The system SHALL generate schema-aware apply instructions via `openspec instructions apply`. | ||
|
|
||
| #### Scenario: Generate apply instructions | ||
|
|
||
| - **WHEN** user runs `openspec instructions apply --change <id>` | ||
| - **AND** all required artifacts (per schema's `apply.requires`) exist | ||
| - **THEN** the system outputs: | ||
| - Context files from all existing artifacts | ||
| - Schema-specific instruction text | ||
| - Progress tracking file path (if `apply.tracks` is set) | ||
|
|
||
| #### Scenario: Apply blocked by missing artifacts | ||
|
|
||
| - **WHEN** user runs `openspec instructions apply --change <id>` | ||
| - **AND** required artifacts are missing | ||
| - **THEN** the system indicates apply is blocked | ||
| - **AND** lists which artifacts must be created first | ||
|
|
||
| #### Scenario: Apply instructions JSON output | ||
|
|
||
| - **WHEN** user runs `openspec instructions apply --change <id> --json` | ||
| - **THEN** the system outputs JSON with: | ||
| - `contextFiles`: array of paths to existing artifacts | ||
| - `instruction`: the apply instruction text | ||
| - `tracks`: path to progress file or null | ||
| - `applyRequires`: list of required artifact IDs | ||
|
|
||
| ## MODIFIED Requirements | ||
|
|
||
| ### Requirement: Status Command | ||
|
|
||
| The system SHALL display artifact completion status for a change, including apply readiness. | ||
|
|
||
| #### Scenario: Status JSON includes apply requirements | ||
|
|
||
| - **WHEN** user runs `openspec status --change <id> --json` | ||
| - **THEN** the system outputs JSON with: | ||
| - `changeName`, `schemaName`, `isComplete`, `artifacts` array | ||
| - `applyRequires`: array of artifact IDs needed for apply phase |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
openspec/changes/make-validation-scope-aware/specs/cli-validate/spec.md
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,122 @@ | ||
| # OPSX Archive Skill Spec | ||
|
|
||
| ### Requirement: OPSX Archive Skill | ||
|
|
||
| The system SHALL provide an `/opsx:archive` skill that archives completed changes in the experimental workflow. | ||
|
|
||
| #### Scenario: Archive a change with all artifacts complete | ||
|
|
||
| - **WHEN** agent executes `/opsx:archive` with a change name | ||
| - **AND** all artifacts in the schema are complete | ||
| - **AND** all tasks are complete | ||
| - **THEN** the agent moves the change to `openspec/changes/archive/YYYY-MM-DD-<name>/` | ||
| - **AND** displays success message with archived location | ||
|
|
||
| #### Scenario: Change selection prompt | ||
|
|
||
| - **WHEN** agent executes `/opsx:archive` without specifying a change | ||
| - **THEN** the agent prompts user to select from available changes | ||
| - **AND** shows only active changes (excludes archive/) | ||
|
|
||
| ### Requirement: Artifact Completion Check | ||
|
|
||
| The skill SHALL check artifact completion status using the artifact graph before archiving. | ||
|
|
||
| #### Scenario: Incomplete artifacts warning | ||
|
|
||
| - **WHEN** agent checks artifact status | ||
| - **AND** one or more artifacts have status other than `done` | ||
| - **THEN** display warning listing incomplete artifacts | ||
| - **AND** prompt user for confirmation to continue | ||
| - **AND** proceed if user confirms | ||
|
|
||
| #### Scenario: All artifacts complete | ||
|
|
||
| - **WHEN** agent checks artifact status | ||
| - **AND** all artifacts have status `done` | ||
| - **THEN** proceed without warning | ||
|
|
||
| ### Requirement: Task Completion Check | ||
|
|
||
| The skill SHALL check task completion status from tasks.md before archiving. | ||
|
|
||
| #### Scenario: Incomplete tasks found | ||
|
|
||
| - **WHEN** agent reads tasks.md | ||
| - **AND** incomplete tasks are found (marked with `- [ ]`) | ||
| - **THEN** display warning showing count of incomplete tasks | ||
| - **AND** prompt user for confirmation to continue | ||
| - **AND** proceed if user confirms | ||
|
|
||
| #### Scenario: All tasks complete | ||
|
|
||
| - **WHEN** agent reads tasks.md | ||
| - **AND** all tasks are complete (marked with `- [x]`) | ||
| - **THEN** proceed without task-related warning | ||
|
|
||
| #### Scenario: No tasks file | ||
|
|
||
| - **WHEN** tasks.md does not exist | ||
| - **THEN** proceed without task-related warning | ||
|
|
||
| ### Requirement: Spec Sync Prompt | ||
|
|
||
| The skill SHALL prompt to sync delta specs before archiving if specs exist. | ||
|
|
||
| #### Scenario: Delta specs exist | ||
|
|
||
| - **WHEN** agent checks for delta specs | ||
| - **AND** `specs/` directory exists in the change with spec files | ||
| - **THEN** prompt user: "This change has delta specs. Would you like to sync them to main specs before archiving?" | ||
| - **AND** if user confirms, execute `/opsx:sync` logic | ||
| - **AND** proceed with archive regardless of sync choice | ||
|
|
||
| #### Scenario: No delta specs | ||
|
|
||
| - **WHEN** agent checks for delta specs | ||
| - **AND** no `specs/` directory or no spec files exist | ||
| - **THEN** proceed without sync prompt | ||
|
|
||
| ### Requirement: Archive Process | ||
|
|
||
| The skill SHALL move the change to the archive folder with date prefix. | ||
|
|
||
| #### Scenario: Successful archive | ||
|
|
||
| - **WHEN** archiving a change | ||
| - **THEN** create `archive/` directory if it doesn't exist | ||
| - **AND** generate target name as `YYYY-MM-DD-<change-name>` using current date | ||
| - **AND** move entire change directory to archive location | ||
| - **AND** preserve `.openspec.yaml` file in archived change | ||
|
|
||
| #### Scenario: Archive already exists | ||
|
|
||
| - **WHEN** target archive directory already exists | ||
| - **THEN** fail with error message | ||
| - **AND** suggest renaming existing archive or using different date | ||
|
|
||
| ### Requirement: Skill Output | ||
|
|
||
| The skill SHALL provide clear feedback about the archive operation. | ||
|
|
||
| #### Scenario: Archive complete with sync | ||
|
|
||
| - **WHEN** archive completes after syncing specs | ||
| - **THEN** display summary: | ||
| - Specs synced (from `/opsx:sync` output) | ||
| - Change archived to location | ||
| - Schema that was used | ||
|
|
||
| #### Scenario: Archive complete without sync | ||
|
|
||
| - **WHEN** archive completes without syncing specs | ||
| - **THEN** display summary: | ||
| - Note that specs were not synced (if applicable) | ||
| - Change archived to location | ||
| - Schema that was used | ||
|
|
||
| #### Scenario: Archive complete with warnings | ||
|
|
||
| - **WHEN** archive completes with incomplete artifacts or tasks | ||
| - **THEN** include note about what was incomplete | ||
| - **AND** suggest reviewing if archive was intentional | ||
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.
Add missing h2 section heading between title and requirements.
The file starts with an h1 heading (
# OPSX Archive Skill Spec) then jumps directly to h3 (### Requirement:), skipping the h2 level. Add an intermediate h2 section (e.g.,## Purpose,## Overview, or## Specification) to comply with markdown structure conventions.🔎 Suggested structure fix
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents