diff --git a/.cursor/commands/opsx-apply.md b/.cursor/commands/opsx-apply.md index a6b077b..fcfa6c9 100644 --- a/.cursor/commands/opsx-apply.md +++ b/.cursor/commands/opsx-apply.md @@ -35,7 +35,7 @@ Implement tasks from an OpenSpec change. ``` This returns: - - Context file paths (varies by schema) + - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema) - Progress (total, complete, remaining) - Task list with status - Dynamic instruction based on current state @@ -47,7 +47,7 @@ Implement tasks from an OpenSpec change. 4. **Read context files** - Read the files listed in `contextFiles` from the apply instructions output. + Read every file path listed under `contextFiles` from the apply instructions output. The files depend on the schema being used: - **spec-driven**: proposal, specs, design, tasks - Other schemas: follow the contextFiles from CLI output diff --git a/.cursor/commands/opsx-bulk-archive.md b/.cursor/commands/opsx-bulk-archive.md index cae62d1..00efc2e 100644 --- a/.cursor/commands/opsx-bulk-archive.md +++ b/.cursor/commands/opsx-bulk-archive.md @@ -80,7 +80,7 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig Display a table summarizing all changes: ``` - | Change | Artifacts | Tasks | Specs | Conflicts | Status | + | Change | Artifacts | Tasks | Specs | Conflicts | Status | |---------------------|-----------|-------|---------|-----------|--------| | schema-management | Done | 5/5 | 2 delta | None | Ready | | project-config | Done | 3/3 | 1 delta | None | Ready | diff --git a/.cursor/commands/opsx-explore.md b/.cursor/commands/opsx-explore.md index a1fbd17..f1aceec 100644 --- a/.cursor/commands/opsx-explore.md +++ b/.cursor/commands/opsx-explore.md @@ -59,10 +59,10 @@ Depending on what the user brings, you might: │ Use ASCII diagrams liberally │ ├─────────────────────────────────────────┤ │ │ -│ ┌────────┐ ┌────────┐ │ -│ │ State │────────▶│ State │ │ -│ │ A │ │ B │ │ -│ └────────┘ └────────┘ │ +│ ┌────────┐ ┌────────┐ │ +│ │ State │────────▶│ State │ │ +│ │ A │ │ B │ │ +│ └────────┘ └────────┘ │ │ │ │ System diagrams, state machines, │ │ data flows, architecture sketches, │ @@ -119,14 +119,14 @@ If the user mentions a change or you detect one is relevant: 3. **Offer to capture when decisions are made** - | Insight Type | Where to Capture | - |--------------|------------------| - | New requirement discovered | `specs//spec.md` | - | Requirement changed | `specs//spec.md` | - | Design decision made | `design.md` | - | Scope changed | `proposal.md` | - | New work identified | `tasks.md` | - | Assumption invalidated | Relevant artifact | + | Insight Type | Where to Capture | + |----------------------------|--------------------------------| + | New requirement discovered | `specs//spec.md` | + | Requirement changed | `specs//spec.md` | + | Design decision made | `design.md` | + | Scope changed | `proposal.md` | + | New work identified | `tasks.md` | + | Assumption invalidated | Relevant artifact | Example offers: - "That's a design decision. Capture it in design.md?" diff --git a/.cursor/commands/opsx-onboard.md b/.cursor/commands/opsx-onboard.md index 301b4d7..381a680 100644 --- a/.cursor/commands/opsx-onboard.md +++ b/.cursor/commands/opsx-onboard.md @@ -464,21 +464,21 @@ This same rhythm works for any size change—a small fix or a major feature. **Core workflow:** -| Command | What it does | -|---------|--------------| -| `/opsx:propose` | Create a change and generate all artifacts | -| `/opsx:explore` | Think through problems before/during work | -| `/opsx:apply` | Implement tasks from a change | -| `/opsx:archive` | Archive a completed change | + | Command | What it does | + |-------------------|--------------------------------------------| + | `/opsx:propose` | Create a change and generate all artifacts | + | `/opsx:explore` | Think through problems before/during work | + | `/opsx:apply` | Implement tasks from a change | + | `/opsx:archive` | Archive a completed change | **Additional commands:** -| Command | What it does | -|---------|--------------| -| `/opsx:new` | Start a new change, step through artifacts one at a time | -| `/opsx:continue` | Continue working on an existing change | -| `/opsx:ff` | Fast-forward: create all artifacts at once | -| `/opsx:verify` | Verify implementation matches artifacts | + | Command | What it does | + |--------------------|----------------------------------------------------------| + | `/opsx:new` | Start a new change, step through artifacts one at a time | + | `/opsx:continue` | Continue working on an existing change | + | `/opsx:ff` | Fast-forward: create all artifacts at once | + | `/opsx:verify` | Verify implementation matches artifacts | --- @@ -516,21 +516,21 @@ If the user says they just want to see the commands or skip the tutorial: **Core workflow:** -| Command | What it does | -|---------|--------------| -| `/opsx:propose ` | Create a change and generate all artifacts | -| `/opsx:explore` | Think through problems (no code changes) | -| `/opsx:apply ` | Implement tasks | -| `/opsx:archive ` | Archive when done | + | Command | What it does | + |--------------------------|--------------------------------------------| + | `/opsx:propose ` | Create a change and generate all artifacts | + | `/opsx:explore` | Think through problems (no code changes) | + | `/opsx:apply ` | Implement tasks | + | `/opsx:archive ` | Archive when done | **Additional commands:** -| Command | What it does | -|---------|--------------| -| `/opsx:new ` | Start a new change, step by step | -| `/opsx:continue ` | Continue an existing change | -| `/opsx:ff ` | Fast-forward: all artifacts at once | -| `/opsx:verify ` | Verify implementation | + | Command | What it does | + |---------------------------|-------------------------------------| + | `/opsx:new ` | Start a new change, step by step | + | `/opsx:continue ` | Continue an existing change | + | `/opsx:ff ` | Fast-forward: all artifacts at once | + | `/opsx:verify ` | Verify implementation | Try `/opsx:propose` to start your first change. ``` diff --git a/.cursor/commands/opsx-verify.md b/.cursor/commands/opsx-verify.md index b87c212..eca3900 100644 --- a/.cursor/commands/opsx-verify.md +++ b/.cursor/commands/opsx-verify.md @@ -35,7 +35,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design openspec instructions apply --change "" --json ``` - This returns the change directory and context files. Read all available artifacts from `contextFiles`. + This returns the change directory and `contextFiles` (artifact ID -> array of concrete file paths). Read all available artifacts from `contextFiles`. 4. **Initialize verification report structure** @@ -49,7 +49,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design 5. **Verify Completeness** **Task Completion**: - - If tasks.md exists in contextFiles, read it + - If `contextFiles.tasks` exists, read every file path in it - Parse checkboxes: `- [ ]` (incomplete) vs `- [x]` (complete) - Count complete vs total tasks - If incomplete tasks exist: @@ -88,7 +88,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design 7. **Verify Coherence** **Design Adherence**: - - If design.md exists in contextFiles: + - If `contextFiles.design` exists: - Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:") - Verify implementation follows those decisions - If contradiction detected: diff --git a/.cursor/skills/openspec-apply-change/SKILL.md b/.cursor/skills/openspec-apply-change/SKILL.md index d474dc1..70fbdb8 100644 --- a/.cursor/skills/openspec-apply-change/SKILL.md +++ b/.cursor/skills/openspec-apply-change/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Implement tasks from an OpenSpec change. @@ -39,7 +39,7 @@ Implement tasks from an OpenSpec change. ``` This returns: - - Context file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs) + - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs) - Progress (total, complete, remaining) - Task list with status - Dynamic instruction based on current state @@ -51,7 +51,7 @@ Implement tasks from an OpenSpec change. 4. **Read context files** - Read the files listed in `contextFiles` from the apply instructions output. + Read every file path listed under `contextFiles` from the apply instructions output. The files depend on the schema being used: - **spec-driven**: proposal, specs, design, tasks - Other schemas: follow the contextFiles from CLI output diff --git a/.cursor/skills/openspec-archive-change/SKILL.md b/.cursor/skills/openspec-archive-change/SKILL.md index 9b1f851..12e2f70 100644 --- a/.cursor/skills/openspec-archive-change/SKILL.md +++ b/.cursor/skills/openspec-archive-change/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Archive a completed change in the experimental workflow. diff --git a/.cursor/skills/openspec-bulk-archive-change/SKILL.md b/.cursor/skills/openspec-bulk-archive-change/SKILL.md index d2f199a..5be81af 100644 --- a/.cursor/skills/openspec-bulk-archive-change/SKILL.md +++ b/.cursor/skills/openspec-bulk-archive-change/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Archive multiple completed changes in a single operation. @@ -84,7 +84,7 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig Display a table summarizing all changes: ``` - | Change | Artifacts | Tasks | Specs | Conflicts | Status | + | Change | Artifacts | Tasks | Specs | Conflicts | Status | |---------------------|-----------|-------|---------|-----------|--------| | schema-management | Done | 5/5 | 2 delta | None | Ready | | project-config | Done | 3/3 | 1 delta | None | Ready | diff --git a/.cursor/skills/openspec-continue-change/SKILL.md b/.cursor/skills/openspec-continue-change/SKILL.md index a2856f0..4f2c3dc 100644 --- a/.cursor/skills/openspec-continue-change/SKILL.md +++ b/.cursor/skills/openspec-continue-change/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Continue working on a change by creating the next artifact. diff --git a/.cursor/skills/openspec-explore/SKILL.md b/.cursor/skills/openspec-explore/SKILL.md index ffa10ca..6858d3f 100644 --- a/.cursor/skills/openspec-explore/SKILL.md +++ b/.cursor/skills/openspec-explore/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes. @@ -56,10 +56,10 @@ Depending on what the user brings, you might: │ Use ASCII diagrams liberally │ ├─────────────────────────────────────────┤ │ │ -│ ┌────────┐ ┌────────┐ │ -│ │ State │────────▶│ State │ │ -│ │ A │ │ B │ │ -│ └────────┘ └────────┘ │ +│ ┌────────┐ ┌────────┐ │ +│ │ State │────────▶│ State │ │ +│ │ A │ │ B │ │ +│ └────────┘ └────────┘ │ │ │ │ System diagrams, state machines, │ │ data flows, architecture sketches, │ @@ -114,14 +114,14 @@ If the user mentions a change or you detect one is relevant: 3. **Offer to capture when decisions are made** - | Insight Type | Where to Capture | - |--------------|------------------| - | New requirement discovered | `specs//spec.md` | - | Requirement changed | `specs//spec.md` | - | Design decision made | `design.md` | - | Scope changed | `proposal.md` | - | New work identified | `tasks.md` | - | Assumption invalidated | Relevant artifact | + | Insight Type | Where to Capture | + |----------------------------|--------------------------------| + | New requirement discovered | `specs//spec.md` | + | Requirement changed | `specs//spec.md` | + | Design decision made | `design.md` | + | Scope changed | `proposal.md` | + | New work identified | `tasks.md` | + | Assumption invalidated | Relevant artifact | Example offers: - "That's a design decision. Capture it in design.md?" @@ -227,7 +227,7 @@ User: A CLI tool that tracks local dev environments You: That changes everything. ┌─────────────────────────────────────────────────┐ - │ CLI TOOL DATA STORAGE │ + │ CLI TOOL DATA STORAGE │ └─────────────────────────────────────────────────┘ Key constraints: diff --git a/.cursor/skills/openspec-ff-change/SKILL.md b/.cursor/skills/openspec-ff-change/SKILL.md index d5f1204..43f2632 100644 --- a/.cursor/skills/openspec-ff-change/SKILL.md +++ b/.cursor/skills/openspec-ff-change/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Fast-forward through artifact creation - generate everything needed to start implementation in one go. diff --git a/.cursor/skills/openspec-new-change/SKILL.md b/.cursor/skills/openspec-new-change/SKILL.md index 607391a..1af41c7 100644 --- a/.cursor/skills/openspec-new-change/SKILL.md +++ b/.cursor/skills/openspec-new-change/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Start a new change using the experimental artifact-driven approach. diff --git a/.cursor/skills/openspec-onboard/SKILL.md b/.cursor/skills/openspec-onboard/SKILL.md index 9076b5d..b6c734d 100644 --- a/.cursor/skills/openspec-onboard/SKILL.md +++ b/.cursor/skills/openspec-onboard/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Guide the user through their first complete OpenSpec workflow cycle. This is a teaching experience—you'll do real work in their codebase while explaining each step. @@ -468,21 +468,21 @@ This same rhythm works for any size change—a small fix or a major feature. **Core workflow:** -| Command | What it does | -|---------|--------------| -| `/opsx:propose` | Create a change and generate all artifacts | -| `/opsx:explore` | Think through problems before/during work | -| `/opsx:apply` | Implement tasks from a change | -| `/opsx:archive` | Archive a completed change | + | Command | What it does | + |-------------------|--------------------------------------------| + | `/opsx:propose` | Create a change and generate all artifacts | + | `/opsx:explore` | Think through problems before/during work | + | `/opsx:apply` | Implement tasks from a change | + | `/opsx:archive` | Archive a completed change | **Additional commands:** -| Command | What it does | -|---------|--------------| -| `/opsx:new` | Start a new change, step through artifacts one at a time | -| `/opsx:continue` | Continue working on an existing change | -| `/opsx:ff` | Fast-forward: create all artifacts at once | -| `/opsx:verify` | Verify implementation matches artifacts | + | Command | What it does | + |--------------------|----------------------------------------------------------| + | `/opsx:new` | Start a new change, step through artifacts one at a time | + | `/opsx:continue` | Continue working on an existing change | + | `/opsx:ff` | Fast-forward: create all artifacts at once | + | `/opsx:verify` | Verify implementation matches artifacts | --- @@ -520,21 +520,21 @@ If the user says they just want to see the commands or skip the tutorial: **Core workflow:** -| Command | What it does | -|---------|--------------| -| `/opsx:propose ` | Create a change and generate all artifacts | -| `/opsx:explore` | Think through problems (no code changes) | -| `/opsx:apply ` | Implement tasks | -| `/opsx:archive ` | Archive when done | + | Command | What it does | + |--------------------------|--------------------------------------------| + | `/opsx:propose ` | Create a change and generate all artifacts | + | `/opsx:explore` | Think through problems (no code changes) | + | `/opsx:apply ` | Implement tasks | + | `/opsx:archive ` | Archive when done | **Additional commands:** -| Command | What it does | -|---------|--------------| -| `/opsx:new ` | Start a new change, step by step | -| `/opsx:continue ` | Continue an existing change | -| `/opsx:ff ` | Fast-forward: all artifacts at once | -| `/opsx:verify ` | Verify implementation | + | Command | What it does | + |---------------------------|-------------------------------------| + | `/opsx:new ` | Start a new change, step by step | + | `/opsx:continue ` | Continue an existing change | + | `/opsx:ff ` | Fast-forward: all artifacts at once | + | `/opsx:verify ` | Verify implementation | Try `/opsx:propose` to start your first change. ``` diff --git a/.cursor/skills/openspec-sync-specs/SKILL.md b/.cursor/skills/openspec-sync-specs/SKILL.md index 353bfac..f2ed9ec 100644 --- a/.cursor/skills/openspec-sync-specs/SKILL.md +++ b/.cursor/skills/openspec-sync-specs/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Sync delta specs from a change to main specs. diff --git a/.cursor/skills/openspec-verify-change/SKILL.md b/.cursor/skills/openspec-verify-change/SKILL.md index 744a088..00d0532 100644 --- a/.cursor/skills/openspec-verify-change/SKILL.md +++ b/.cursor/skills/openspec-verify-change/SKILL.md @@ -6,7 +6,7 @@ compatibility: Requires openspec CLI. metadata: author: openspec version: "1.0" - generatedBy: "1.2.0" + generatedBy: "1.3.1" --- Verify that an implementation matches the change artifacts (specs, tasks, design). @@ -39,7 +39,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design openspec instructions apply --change "" --json ``` - This returns the change directory and context files. Read all available artifacts from `contextFiles`. + This returns the change directory and `contextFiles` (artifact ID -> array of concrete file paths). Read all available artifacts from `contextFiles`. 4. **Initialize verification report structure** @@ -53,7 +53,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design 5. **Verify Completeness** **Task Completion**: - - If tasks.md exists in contextFiles, read it + - If `contextFiles.tasks` exists, read every file path in it - Parse checkboxes: `- [ ]` (incomplete) vs `- [x]` (complete) - Count complete vs total tasks - If incomplete tasks exist: @@ -92,7 +92,7 @@ Verify that an implementation matches the change artifacts (specs, tasks, design 7. **Verify Coherence** **Design Adherence**: - - If design.md exists in contextFiles: + - If `contextFiles.design` exists: - Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:") - Verify implementation follows those decisions - If contradiction detected: diff --git a/.github/prompts/opsx-apply.prompt.md b/.github/prompts/opsx-apply.prompt.md new file mode 100644 index 0000000..e23ec64 --- /dev/null +++ b/.github/prompts/opsx-apply.prompt.md @@ -0,0 +1,149 @@ +--- +description: Implement tasks from an OpenSpec change (Experimental) +--- + +Implement tasks from an OpenSpec change. + +**Input**: Optionally specify a change name (e.g., `/opsx:apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes. + +**Steps** + +1. **Select the change** + + If a name is provided, use it. Otherwise: + - Infer from conversation context if the user mentioned a change + - Auto-select if only one active change exists + - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select + + Always announce: "Using change: " and how to override (e.g., `/opsx:apply `). + +2. **Check status to understand the schema** + ```bash + openspec status --change "" --json + ``` + Parse the JSON to understand: + - `schemaName`: The workflow being used (e.g., "spec-driven") + - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others) + +3. **Get apply instructions** + + ```bash + openspec instructions apply --change "" --json + ``` + + This returns: + - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema) + - Progress (total, complete, remaining) + - Task list with status + - Dynamic instruction based on current state + + **Handle states:** + - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue` + - If `state: "all_done"`: congratulate, suggest archive + - Otherwise: proceed to implementation + +4. **Read context files** + + Read every file path listed under `contextFiles` from the apply instructions output. + The files depend on the schema being used: + - **spec-driven**: proposal, specs, design, tasks + - Other schemas: follow the contextFiles from CLI output + +5. **Show current progress** + + Display: + - Schema being used + - Progress: "N/M tasks complete" + - Remaining tasks overview + - Dynamic instruction from CLI + +6. **Implement tasks (loop until done or blocked)** + + For each pending task: + - Show which task is being worked on + - Make the code changes required + - Keep changes minimal and focused + - Mark task complete in the tasks file: `- [ ]` → `- [x]` + - Continue to next task + + **Pause if:** + - Task is unclear → ask for clarification + - Implementation reveals a design issue → suggest updating artifacts + - Error or blocker encountered → report and wait for guidance + - User interrupts + +7. **On completion or pause, show status** + + Display: + - Tasks completed this session + - Overall progress: "N/M tasks complete" + - If all done: suggest archive + - If paused: explain why and wait for guidance + +**Output During Implementation** + +``` +## Implementing: (schema: ) + +Working on task 3/7: +[...implementation happening...] +✓ Task complete + +Working on task 4/7: +[...implementation happening...] +✓ Task complete +``` + +**Output On Completion** + +``` +## Implementation Complete + +**Change:** +**Schema:** +**Progress:** 7/7 tasks complete ✓ + +### Completed This Session +- [x] Task 1 +- [x] Task 2 +... + +All tasks complete! You can archive this change with `/opsx:archive`. +``` + +**Output On Pause (Issue Encountered)** + +``` +## Implementation Paused + +**Change:** +**Schema:** +**Progress:** 4/7 tasks complete + +### Issue Encountered + + +**Options:** +1.