From 692bf5f77a9edf60f19ee91bd418f13600ad23c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 28 Jan 2026 12:40:23 +0100 Subject: [PATCH] chore: update OpenSpec MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .opencode/command/openspec-apply.md | 26 - .opencode/command/openspec-archive.md | 30 - .opencode/command/openspec-proposal.md | 36 -- .opencode/command/opsx-apply.md | 152 +++++ .opencode/command/opsx-archive.md | 156 +++++ .opencode/command/opsx-bulk-archive.md | 245 ++++++++ .opencode/command/opsx-continue.md | 116 ++++ .opencode/command/opsx-explore.md | 179 ++++++ .opencode/command/opsx-ff.md | 98 ++++ .opencode/command/opsx-new.md | 75 +++ .opencode/command/opsx-onboard.md | 542 +++++++++++++++++ .opencode/command/opsx-sync.md | 137 +++++ .opencode/command/opsx-verify.md | 164 ++++++ .../skills/openspec-apply-change/SKILL.md | 159 +++++ .../skills/openspec-archive-change/SKILL.md | 116 ++++ .../openspec-bulk-archive-change/SKILL.md | 252 ++++++++ .../skills/openspec-continue-change/SKILL.md | 123 ++++ .opencode/skills/openspec-explore/SKILL.md | 301 ++++++++++ .opencode/skills/openspec-ff-change/SKILL.md | 108 ++++ .opencode/skills/openspec-new-change/SKILL.md | 83 +++ .opencode/skills/openspec-onboard/SKILL.md | 549 ++++++++++++++++++ .opencode/skills/openspec-sync-specs/SKILL.md | 144 +++++ .../skills/openspec-verify-change/SKILL.md | 171 ++++++ AGENTS.md | 22 - openspec/AGENTS.md | 522 ----------------- openspec/project.md | 175 ------ 26 files changed, 3870 insertions(+), 811 deletions(-) delete mode 100644 .opencode/command/openspec-apply.md delete mode 100644 .opencode/command/openspec-archive.md delete mode 100644 .opencode/command/openspec-proposal.md create mode 100644 .opencode/command/opsx-apply.md create mode 100644 .opencode/command/opsx-archive.md create mode 100644 .opencode/command/opsx-bulk-archive.md create mode 100644 .opencode/command/opsx-continue.md create mode 100644 .opencode/command/opsx-explore.md create mode 100644 .opencode/command/opsx-ff.md create mode 100644 .opencode/command/opsx-new.md create mode 100644 .opencode/command/opsx-onboard.md create mode 100644 .opencode/command/opsx-sync.md create mode 100644 .opencode/command/opsx-verify.md create mode 100644 .opencode/skills/openspec-apply-change/SKILL.md create mode 100644 .opencode/skills/openspec-archive-change/SKILL.md create mode 100644 .opencode/skills/openspec-bulk-archive-change/SKILL.md create mode 100644 .opencode/skills/openspec-continue-change/SKILL.md create mode 100644 .opencode/skills/openspec-explore/SKILL.md create mode 100644 .opencode/skills/openspec-ff-change/SKILL.md create mode 100644 .opencode/skills/openspec-new-change/SKILL.md create mode 100644 .opencode/skills/openspec-onboard/SKILL.md create mode 100644 .opencode/skills/openspec-sync-specs/SKILL.md create mode 100644 .opencode/skills/openspec-verify-change/SKILL.md delete mode 100644 openspec/AGENTS.md delete mode 100644 openspec/project.md diff --git a/.opencode/command/openspec-apply.md b/.opencode/command/openspec-apply.md deleted file mode 100644 index 26868638..00000000 --- a/.opencode/command/openspec-apply.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -agent: build -description: Implement an approved OpenSpec change and keep tasks in sync. ---- - - - -**Guardrails** - -- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required. -- Keep changes tightly scoped to the requested outcome. -- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications. - -**Steps** -Track these steps as TODOs and complete them one by one. - -1. Read `changes//proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria. -2. Work through tasks sequentially, keeping edits minimal and focused on the requested change. -3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished. -4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality. -5. Reference `openspec list` or `openspec show ` when additional context is required. - -**Reference** - -- Use `openspec show --json --deltas-only` if you need additional context from the proposal while implementing. - diff --git a/.opencode/command/openspec-archive.md b/.opencode/command/openspec-archive.md deleted file mode 100644 index 5b564fb5..00000000 --- a/.opencode/command/openspec-archive.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -description: Archive a deployed OpenSpec change and update specs. ---- - - - $ARGUMENTS - - -**Guardrails** -- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required. -- Keep changes tightly scoped to the requested outcome. -- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications. - -**Steps** - -1. Determine the change ID to archive: - - If this prompt already includes a specific change ID (for example inside a `` block populated by slash-command arguments), use that value after trimming whitespace. - - If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends. - - Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding. - - If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet. -2. Validate the change ID by running `openspec list` (or `openspec show `) and stop if the change is missing, already archived, or otherwise not ready to archive. -3. Run `openspec archive --yes` so the CLI moves the change and applies spec updates without prompts (use `--skip-specs` only for tooling-only work). -4. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`. -5. Validate with `openspec validate --strict --no-interactive` and inspect with `openspec show ` if anything looks off. - -**Reference** - -- Use `openspec list` to confirm change IDs before archiving. -- Inspect refreshed specs with `openspec list --specs` and address any validation issues before handing off. - diff --git a/.opencode/command/openspec-proposal.md b/.opencode/command/openspec-proposal.md deleted file mode 100644 index fcd086f8..00000000 --- a/.opencode/command/openspec-proposal.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -agent: build -description: Scaffold a new OpenSpec change and validate strictly. ---- - -The user has requested the following change proposal. Use the openspec instructions to create their change proposal. - -$ARGUMENTS - - - - -**Guardrails** - -- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required. -- Keep changes tightly scoped to the requested outcome. -- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications. -- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files. -- Do not write any code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, and spec deltas). Implementation happens in the apply stage after approval. - -**Steps** - -1. Review `openspec/project.md`, run `openspec list` and `openspec list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification. -2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `openspec/changes//`. -3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing. -4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs. -5. Draft spec deltas in `changes//specs//spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant. -6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work. -7. Validate with `openspec validate --strict --no-interactive` and resolve every issue before sharing the proposal. - -**Reference** - -- Use `openspec show --json --deltas-only` or `openspec show --type spec` to inspect details when validation fails. -- Search existing requirements with `rg -n "Requirement:|Scenario:" openspec/specs` before writing new ones. -- Explore the codebase with `rg `, `ls`, or direct file reads so proposals align with current implementation realities. - diff --git a/.opencode/command/opsx-apply.md b/.opencode/command/opsx-apply.md new file mode 100644 index 00000000..c10970bc --- /dev/null +++ b/.opencode/command/opsx-apply.md @@ -0,0 +1,152 @@ +--- +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: + - Context 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 the files listed in `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! Ready to archive this change. +``` + +**Output On Pause (Issue Encountered)** + +``` +## Implementation Paused + +**Change:** +**Schema:** +**Progress:** 4/7 tasks complete + +### Issue Encountered + + +**Options:** +1.