@jspg-ai/coding-bb 0.0.2-beta.29 → 0.0.3-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cbb/bin/cbbm.js +1 -1
- package/cbb/dev-standards/rules/cbb-ai-behavior.md +118 -103
- package/cbb/lib/install/claude-code.js +1 -3
- package/cbb/lib/install/codebuddy.js +30 -0
- package/cbb/lib/install/init.js +354 -305
- package/cbb/lib/install/opencode.js +35 -31
- package/cbb/lib/install/qoder.js +1 -3
- package/cbb/lib/install/rule-rewrite.js +27 -0
- package/cbb/lib/install/trae.js +33 -0
- package/cbb/lib/install/workspaces.js +24 -0
- package/cbb/lib/openspec/index.js +337 -554
- package/cbb/lib/superpowers/index.js +246 -265
- package/cbb/lib/utils/check-update.js +9 -2
- package/cbb/lib/utils/gitignore.js +2 -0
- package/cbb/lib/utils/settings.js +17 -4
- package/cbb/lib/utils/tar.js +92 -0
- package/cbb/lib/utils/upstream.js +90 -0
- package/cbb/worktrees/skills/cbb-worktree-close/SKILL.md +33 -24
- package/cbb/worktrees/skills/cbb-worktree-close/scripts/check-env.js +4 -4
- package/cbb/worktrees/skills/cbb-worktree-close/scripts/remove-worktrees.js +2 -2
- package/cbb/worktrees/skills/cbb-worktree-init/SKILL.md +61 -78
- package/cbb/worktrees/skills/cbb-worktree-init/scripts/check-env-deep.js +3 -33
- package/cbb/worktrees/skills/cbb-worktree-init/scripts/check-env.js +5 -14
- package/cbb/worktrees/skills/cbb-worktree-init/scripts/create-worktrees.js +15 -37
- package/cbb/worktrees/skills/cbb-worktree-init/scripts/update-gitignore.js +25 -9
- package/cbb/worktrees/skills/cbb-worktree-push/SKILL.md +67 -31
- package/config/openspec/schemas/spec-driven/schema.yaml +29 -30
- package/config/openspec/schemas/spec-driven/templates/design.md +0 -18
- package/config/openspec/schemas/spec-driven/templates/proposal.md +4 -3
- package/config/upstream-mirrors.json +12 -0
- package/config/workspace-agents.sample.md +17 -13
- package/config/workspaces.json +5 -0
- package/openspec/.version +2 -3
- package/openspec/commands/apply.md +189 -175
- package/openspec/commands/archive.md +237 -216
- package/openspec/commands/bulk-archive.md +355 -327
- package/openspec/commands/continue.md +116 -105
- package/openspec/commands/explore.md +230 -199
- package/openspec/commands/ff.md +115 -104
- package/openspec/commands/new.md +74 -63
- package/openspec/commands/onboard.md +557 -548
- package/openspec/commands/propose.md +161 -150
- package/openspec/commands/sync.md +277 -249
- package/openspec/commands/update.md +92 -80
- package/openspec/commands/verify.md +175 -162
- package/openspec/skills/openspec-apply-change/SKILL.md +20 -5
- package/openspec/skills/openspec-archive-change/SKILL.md +30 -8
- package/openspec/skills/openspec-bulk-archive-change/SKILL.md +36 -6
- package/openspec/skills/openspec-continue-change/SKILL.md +14 -2
- package/openspec/skills/openspec-explore/SKILL.md +21 -9
- package/openspec/skills/openspec-ff-change/SKILL.md +14 -2
- package/openspec/skills/openspec-new-change/SKILL.md +13 -1
- package/openspec/skills/openspec-onboard/SKILL.md +49 -39
- package/openspec/skills/openspec-propose/SKILL.md +15 -3
- package/openspec/skills/openspec-sync-specs/SKILL.md +31 -2
- package/openspec/skills/openspec-update-change/SKILL.md +27 -14
- package/openspec/skills/openspec-verify-change/SKILL.md +17 -3
- package/package.json +2 -2
- package/superpowers/.version +4 -4
- package/superpowers/skills/brainstorming/SKILL.md +47 -12
- package/superpowers/skills/brainstorming/scripts/frame-template.html +213 -213
- package/superpowers/skills/brainstorming/scripts/server.cjs +723 -723
- package/superpowers/skills/brainstorming/visual-companion.md +6 -6
- package/superpowers/skills/diagnosing-superpowers/SKILL.md +120 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/analyst-common.md +38 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/cost-and-time.md +28 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/plan-adherence.md +29 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/quality-evidence.md +26 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/repeated-work.md +30 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/request-conflicts.md +20 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/scrub-audit.md +33 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/scrub.md +29 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/similar-session.md +38 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/skill-timeline.md +30 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/stumbles.md +28 -0
- package/superpowers/skills/diagnosing-superpowers/references/context-safety.md +22 -0
- package/superpowers/skills/diagnosing-superpowers/references/github-issues.md +47 -0
- package/superpowers/skills/diagnosing-superpowers/references/redaction-policy.md +34 -0
- package/superpowers/skills/diagnosing-superpowers/references/session-discovery.md +31 -0
- package/superpowers/skills/diagnosing-superpowers/templates/bundle-README.md +77 -0
- package/superpowers/skills/diagnosing-superpowers/templates/case.md +64 -0
- package/superpowers/skills/diagnosing-superpowers/templates/issue.md +51 -0
- package/superpowers/skills/diagnosing-superpowers/templates/report.md +82 -0
- package/superpowers/skills/executing-plans/SKILL.md +350 -41
- package/superpowers/skills/executing-plans/scripts/task-done +52 -0
- package/superpowers/skills/executing-plans/scripts/task-start +28 -0
- package/superpowers/skills/requesting-code-review/SKILL.md +1 -1
- package/superpowers/skills/requesting-code-review/code-reviewer.md +17 -0
- package/superpowers/skills/subagent-driven-development/SKILL.md +18 -18
- package/superpowers/skills/subagent-driven-development/re-review-prompt.md +1 -1
- package/superpowers/skills/subagent-driven-development/scripts/review-package +53 -46
- package/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +82 -40
- package/superpowers/skills/subagent-driven-development/scripts/task-brief +43 -41
- package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +2 -2
- package/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/superpowers/skills/test-driven-development/SKILL.md +10 -0
- package/superpowers/skills/using-superpowers/SKILL.md +2 -0
- package/superpowers/skills/using-superpowers/references/claude-code-tools.md +29 -0
- package/superpowers/skills/using-superpowers/references/muse-tools.md +35 -0
- package/superpowers/skills/writing-plans/SKILL.md +30 -9
- package/superpowers/skills/writing-skills/SKILL.md +4 -2
- package/superpowers/skills/writing-skills/graphviz-conventions.dot +171 -171
- package/cbb/worktrees/commands/worktree-close.md +0 -64
- package/cbb/worktrees/commands/worktree-init.md +0 -55
- package/cbb/worktrees/commands/worktree-push.md +0 -42
- package/cbb/worktrees/skills/cbb-worktree-init/scripts/auto-open.js +0 -136
- package/cbb/worktrees/skills/cbb-worktree-init/scripts/install-ai.js +0 -177
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec-apply-change
|
|
3
|
-
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
|
|
3
|
+
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks. Also use when the user says "openspec apply", "opsx apply", or "openspec implement".
|
|
4
4
|
allowed-tools: Bash(openspec:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires openspec CLI.
|
|
7
7
|
metadata:
|
|
8
8
|
author: openspec
|
|
9
9
|
version: "1.0"
|
|
10
|
+
generatedBy: "1.13.1"
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Implement tasks from an OpenSpec change.
|
|
13
14
|
|
|
14
15
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
15
16
|
|
|
16
|
-
**
|
|
17
|
+
**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, or authoring an artifact file), confirm the project has a root: run `openspec list --json` (with `--store <id>` when a store is selected, since the store is then the root) and read `root`. A root object means the project is set up. `"root": null` means it is not - there is no `openspec/` directory here, and a write such as `openspec new change` would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
|
|
18
|
+
|
|
19
|
+
One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `openspec/config.yaml` (or `config.yml`), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the `store:` line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's `message` and `fix`.
|
|
20
|
+
|
|
21
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
22
|
+
|
|
23
|
+
- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
|
|
24
|
+
- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up (`openspec init`), target a store they already have (`--store <id>`), or continue without OpenSpec for this request. Wait for their answer.
|
|
25
|
+
|
|
26
|
+
In both branches, never create the root as a side effect: do not run `openspec init` until the user asks for it, do not hand-create `openspec/` files, and do not let a command create it.
|
|
27
|
+
|
|
28
|
+
**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.
|
|
17
29
|
|
|
18
30
|
**Steps**
|
|
19
31
|
|
|
@@ -24,7 +36,7 @@ Implement tasks from an OpenSpec change.
|
|
|
24
36
|
- Auto-select if only one active change exists
|
|
25
37
|
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
|
|
26
38
|
|
|
27
|
-
Always announce: "Using change: <name>" and how to override (e.g., `/
|
|
39
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
|
|
28
40
|
|
|
29
41
|
2. **Check status to understand the schema**
|
|
30
42
|
```bash
|
|
@@ -48,9 +60,12 @@ Implement tasks from an OpenSpec change.
|
|
|
48
60
|
- Dynamic instruction based on current state
|
|
49
61
|
- Optional `context`: current required project instruction input from the selected root
|
|
50
62
|
- Optional `operationGuidance`: current advisory guidance for apply
|
|
63
|
+
- `missingArtifacts` (when present): required artifact ids with no output
|
|
51
64
|
|
|
52
65
|
**Handle states:**
|
|
53
|
-
- If `state: "blocked"
|
|
66
|
+
- If `state: "blocked"`: show the message and pause implementation.
|
|
67
|
+
- If `missingArtifacts` is non-empty: suggest using `/opsx:continue` to create them.
|
|
68
|
+
- Otherwise, follow the CLI instruction to create or repair the schema-configured tracking file from existing planning artifacts. Do not assume another artifact is ready or start implementation while blocked.
|
|
54
69
|
- If `state: "all_done"`: congratulate, suggest archive
|
|
55
70
|
- Otherwise: proceed to implementation
|
|
56
71
|
|
|
@@ -139,7 +154,7 @@ Working on task 4/7: <task description>
|
|
|
139
154
|
- [x] Task 2
|
|
140
155
|
...
|
|
141
156
|
|
|
142
|
-
All tasks complete! You can archive this change with `/
|
|
157
|
+
All tasks complete! You can archive this change with `/opsx:archive`.
|
|
143
158
|
```
|
|
144
159
|
|
|
145
160
|
**Output On Pause (Issue Encountered)**
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec-archive-change
|
|
3
|
-
description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
|
|
3
|
+
description: Archive a completed OpenSpec change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete. Also use when the user says "openspec archive" or "opsx archive".
|
|
4
4
|
allowed-tools: Bash(openspec:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires openspec CLI.
|
|
7
7
|
metadata:
|
|
8
8
|
author: openspec
|
|
9
9
|
version: "1.0"
|
|
10
|
+
generatedBy: "1.13.1"
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Archive a completed change in the experimental workflow.
|
|
13
14
|
|
|
14
15
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
15
16
|
|
|
17
|
+
**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, or authoring an artifact file), confirm the project has a root: run `openspec list --json` (with `--store <id>` when a store is selected, since the store is then the root) and read `root`. A root object means the project is set up. `"root": null` means it is not - there is no `openspec/` directory here, and a write such as `openspec new change` would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
|
|
18
|
+
|
|
19
|
+
One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `openspec/config.yaml` (or `config.yml`), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the `store:` line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's `message` and `fix`.
|
|
20
|
+
|
|
21
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
22
|
+
|
|
23
|
+
- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
|
|
24
|
+
- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up (`openspec init`), target a store they already have (`--store <id>`), or continue without OpenSpec for this request. Wait for their answer.
|
|
25
|
+
|
|
26
|
+
In both branches, never create the root as a side effect: do not run `openspec init` until the user asks for it, do not hand-create `openspec/` files, and do not let a command create it.
|
|
27
|
+
|
|
16
28
|
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.
|
|
17
29
|
|
|
18
30
|
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
@@ -29,7 +41,7 @@ Archive a completed change in the experimental workflow.
|
|
|
29
41
|
When prompting, show only active changes (not already archived).
|
|
30
42
|
Include the schema used for each change if available.
|
|
31
43
|
|
|
32
|
-
Always announce: "Using change: <name>" and how to override (e.g., `/
|
|
44
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:archive <other>`).
|
|
33
45
|
|
|
34
46
|
**Load current archive inputs before the existing archive checks:**
|
|
35
47
|
|
|
@@ -76,7 +88,11 @@ Archive a completed change in the experimental workflow.
|
|
|
76
88
|
|
|
77
89
|
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
|
|
78
90
|
|
|
79
|
-
|
|
91
|
+
A checkbox is complete when its only content is `x` or `X`; spacing inside
|
|
92
|
+
the brackets does not matter, so `- [ x]` counts as complete too. Every
|
|
93
|
+
other marker is incomplete - `- [ ]`, an empty `- []`, and markers OpenSpec
|
|
94
|
+
assigns no meaning to such as `- [~]` or `- [-]`. Never read an unfamiliar
|
|
95
|
+
marker as complete.
|
|
80
96
|
|
|
81
97
|
**If incomplete tasks found:**
|
|
82
98
|
- Display warning showing count of incomplete tasks
|
|
@@ -94,17 +110,23 @@ Archive a completed change in the experimental workflow.
|
|
|
94
110
|
|
|
95
111
|
**If delta specs exist:**
|
|
96
112
|
- Compare each delta spec with its corresponding main spec at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (use the store-aware `planningHome.root` from step 2, not a hardcoded repo path)
|
|
113
|
+
- A missing main spec is **not automatically** "already synced". For a new capability, the main spec is an *output* of the sync, not an input:
|
|
114
|
+
- If the delta has MODIFIED or RENAMED requirements, report that only ADDED requirements can create a new main spec and mark that capability as sync-blocked. Never invent a requirement that has no current version.
|
|
115
|
+
- Otherwise, if the delta has only REMOVED requirements and the change's `.openspec.yaml` declares `retire_capabilities: true`, the capability is already retired: count it as already synced, warn that there is nothing left to remove, and do not recreate the main spec. Apply this rule both now and when verifying a completed sync.
|
|
116
|
+
- Otherwise, if the delta has no ADDED requirements, report that no sync is possible and mark that capability as sync-blocked. For a REMOVED-only delta, warn that there is no main spec to remove from and leave the main-spec tree unchanged. `openspec archive` refuses the unmarked REMOVED-only case with `Spec must have at least one requirement`.
|
|
117
|
+
- Otherwise, count the capability as needing sync and name it in the summary (`<capability-path>: new main spec will be created`). If the delta also has REMOVED requirements, warn that they will be ignored because there is no main spec to remove from. The sync creates the main spec from only the delta's ADDED requirements, exactly as `openspec archive` does.
|
|
97
118
|
- Determine what changes would be applied (adds, modifications, removals, renames)
|
|
98
|
-
- Show a combined summary before prompting
|
|
119
|
+
- Continue assessing the remaining capabilities even when one is sync-blocked. Show a combined summary before prompting.
|
|
99
120
|
|
|
100
121
|
**Prompt options:**
|
|
101
|
-
- If
|
|
102
|
-
-
|
|
122
|
+
- If any capability is sync-blocked: explain why and offer only "Archive without syncing", "Cancel"
|
|
123
|
+
- Otherwise, if changes needed: "Sync now (recommended)", "Archive without syncing"
|
|
124
|
+
- Otherwise, if already synced: "Archive now", "Sync anyway", "Cancel"
|
|
103
125
|
|
|
104
126
|
Route on the answer:
|
|
105
127
|
- "Cancel" — stop, do not archive
|
|
106
128
|
- "Archive without syncing" or "Archive now" — proceed to archive
|
|
107
|
-
- "Sync now" or "Sync anyway" — sync, then verify (below)
|
|
129
|
+
- "Sync now" or "Sync anyway" — sync, then verify (below). Do not start any sync while a capability is sync-blocked; explain the blocker and repeat the available choices.
|
|
108
130
|
- Anything else — ask again rather than archiving
|
|
109
131
|
|
|
110
132
|
Before a selected sync writes any main spec, run
|
|
@@ -118,7 +140,7 @@ Archive a completed change in the experimental workflow.
|
|
|
118
140
|
|
|
119
141
|
Then run the `openspec-sync-specs` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis and the fetched specs-rule snapshot from above, and wait for it to finish. The inline sync must reuse that snapshot without fetching `specs` instructions again. Do not delegate it to a background task — step 5 would move `changeRoot` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result.
|
|
120
142
|
|
|
121
|
-
Then re-run the comparison from the top of this step against every capability that has a delta spec in `artifactPaths.specs.existingOutputPaths` — not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:
|
|
143
|
+
Then re-run the comparison from the top of this step, including the explicitly retired, missing-spec case, against every capability that has a delta spec in `artifactPaths.specs.existingOutputPaths` — not only the ones the sync reports it touched. A successful sync leaves nothing left to apply, so each capability must now read as already synced:
|
|
122
144
|
- ADDED requirements present
|
|
123
145
|
- MODIFIED requirements carrying the scenario and description changes named in the delta, with their other scenarios intact
|
|
124
146
|
- REMOVED requirements gone — and where this sync retired a capability (removed its last requirement, leaving `## Requirements` empty), its main spec deleted rather than left empty; a spec the sync deliberately kept and reported is also a match
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec-bulk-archive-change
|
|
3
|
-
description: Archive multiple completed changes at once. Use when archiving several parallel changes.
|
|
3
|
+
description: Archive multiple completed OpenSpec changes at once. Use when archiving several parallel changes. Also use for a plural archive request - "openspec bulk-archive", "opsx bulk-archive", "openspec archive all", or "openspec archive these changes".
|
|
4
4
|
allowed-tools: Bash(openspec:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires openspec CLI.
|
|
7
7
|
metadata:
|
|
8
8
|
author: openspec
|
|
9
9
|
version: "1.0"
|
|
10
|
+
generatedBy: "1.13.1"
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Archive multiple completed changes in a single operation.
|
|
@@ -15,6 +16,17 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig
|
|
|
15
16
|
|
|
16
17
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
17
18
|
|
|
19
|
+
**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, or authoring an artifact file), confirm the project has a root: run `openspec list --json` (with `--store <id>` when a store is selected, since the store is then the root) and read `root`. A root object means the project is set up. `"root": null` means it is not - there is no `openspec/` directory here, and a write such as `openspec new change` would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
|
|
20
|
+
|
|
21
|
+
One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `openspec/config.yaml` (or `config.yml`), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the `store:` line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's `message` and `fix`.
|
|
22
|
+
|
|
23
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
24
|
+
|
|
25
|
+
- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
|
|
26
|
+
- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up (`openspec init`), target a store they already have (`--store <id>`), or continue without OpenSpec for this request. Wait for their answer.
|
|
27
|
+
|
|
28
|
+
In both branches, never create the root as a side effect: do not run `openspec init` until the user asks for it, do not hand-create `openspec/` files, and do not let a command create it.
|
|
29
|
+
|
|
18
30
|
`<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.
|
|
19
31
|
|
|
20
32
|
**Input**: None required (prompts for selection)
|
|
@@ -70,7 +82,9 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig
|
|
|
70
82
|
- Note which artifacts are `done` vs other states
|
|
71
83
|
|
|
72
84
|
b. **Task completion** - Read `artifactPaths.tasks.existingOutputPaths` from status JSON
|
|
73
|
-
-
|
|
85
|
+
- Complete means the checkbox holds only `x`/`X`, ignoring spacing
|
|
86
|
+
(`- [ x]` is complete); every other marker is incomplete (`- [ ]`,
|
|
87
|
+
`- []`, and unfamiliar ones such as `- [~]` or `- [-]`)
|
|
74
88
|
- If no tasks file exists, note as "No tasks"
|
|
75
89
|
|
|
76
90
|
c. **Delta specs** - Check `artifactPaths.specs.existingOutputPaths` from status JSON
|
|
@@ -81,6 +95,14 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig
|
|
|
81
95
|
lookup for that change; do not infer deltas from unrelated artifacts.
|
|
82
96
|
- Evaluate this independently for every change, including mixed-schema
|
|
83
97
|
batches where some schemas have no `specs` artifact.
|
|
98
|
+
|
|
99
|
+
d. **Archive target** - Compute each change's target name once and record it as that change's `<target-name>`
|
|
100
|
+
- Use the change name as-is when it already starts with a `YYYY-MM-DD-` prefix; otherwise prepend the current date as `YYYY-MM-DD-<name>` (same rule as `openspec archive`)
|
|
101
|
+
- Check whether `<planningHome.changesDir>/archive/<target-name>` already exists
|
|
102
|
+
- If it exists, or another selected change resolves to the same target name, mark every such change `Blocked` with `Archive directory already exists`
|
|
103
|
+
- A blocked change is never synced or moved: show it as `Blocked` in the step 6 table, leave it out of conflict resolution (resolve its conflicts using only the other changes), and record it as Failed in step 8d
|
|
104
|
+
- Checking here, before any main spec is written, matches `openspec archive`: a collision found after sync would leave main specs rewritten for an archive that never happened
|
|
105
|
+
|
|
84
106
|
4. **Detect spec conflicts**
|
|
85
107
|
|
|
86
108
|
Build a map keyed by `<capability-path>`, the exact path relative to `specs/`:
|
|
@@ -153,8 +175,8 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig
|
|
|
153
175
|
Route on the answer by intent, not by exact label — you wrote these labels,
|
|
154
176
|
so match what the user picked rather than the wording above:
|
|
155
177
|
- "Cancel" — stop, do not archive. Report that nothing was archived and skip the remaining steps.
|
|
156
|
-
- The archive-everything option — proceed with every selected change
|
|
157
|
-
- The ready-only option — proceed with only the changes the step 6 table marks `Ready` or `Ready*`, and record the rest as Skipped in step 8d
|
|
178
|
+
- The archive-everything option — proceed with every selected change that is not `Blocked`
|
|
179
|
+
- The ready-only option — proceed with only the changes the step 6 table marks `Ready` or `Ready*`, and record the rest as Skipped in step 8d, except `Blocked` changes, which stay Failed with `Archive directory already exists`. If a `Ready*` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
|
|
158
180
|
- Anything else — ask again rather than archiving
|
|
159
181
|
|
|
160
182
|
Before step 8 writes the first main spec or moves any change, fetch every
|
|
@@ -199,13 +221,20 @@ This skill allows you to batch-archive changes, handling spec conflicts intellig
|
|
|
199
221
|
|
|
200
222
|
c. **Perform the archive**:
|
|
201
223
|
|
|
202
|
-
Target name: use the change
|
|
224
|
+
Target name: use the `<target-name>` recorded for this change in step 3d, unchanged. Never recompute it here: a batch that runs past midnight would check one date in step 3 and move to another.
|
|
225
|
+
|
|
226
|
+
**Check if target already exists:**
|
|
227
|
+
- Check again immediately before the move, even though step 3 already checked: the target can appear mid-batch
|
|
228
|
+
- If yes: record this change as Failed with `Archive directory already exists`, leave `changeRoot` where it is, report any main specs step 8a already synced for it, and continue with the remaining changes
|
|
229
|
+
- If no: move `changeRoot` to the archive directory
|
|
203
230
|
|
|
204
231
|
```bash
|
|
205
232
|
mkdir -p "<planningHome.changesDir>/archive"
|
|
206
233
|
mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"
|
|
207
234
|
```
|
|
208
235
|
|
|
236
|
+
**Confirm the move did not nest:** `mv` exits 0 even when the target appeared after the check, moving the change *inside* it. If `<planningHome.changesDir>/archive/<target-name>/<change-directory-name>` now exists (the last path segment of `changeRoot`), move that directory back to `changeRoot` and record this change as Failed with `Archive directory already exists`. Never report it as archived.
|
|
237
|
+
|
|
209
238
|
d. **Track outcome** for each change:
|
|
210
239
|
- Success: archived successfully
|
|
211
240
|
- Failed: error during archive or spec verification (record error)
|
|
@@ -320,8 +349,9 @@ No active changes found. Create a new change to get started.
|
|
|
320
349
|
- Never archive after the user cancels the confirmation — a cancelled batch archives nothing
|
|
321
350
|
- Track and report all outcomes (success/skip/fail)
|
|
322
351
|
- Preserve .openspec.yaml when moving to archive
|
|
323
|
-
- Archive directory target uses current date: YYYY-MM-DD-<name>; a name that already starts with a `YYYY-MM-DD-` prefix is used as-is (never stack a second date)
|
|
352
|
+
- Archive directory target uses the current date, computed once in step 3d and reused at the move: YYYY-MM-DD-<name>; a name that already starts with a `YYYY-MM-DD-` prefix is used as-is (never stack a second date)
|
|
324
353
|
- If archive target exists, fail that change but continue with others
|
|
354
|
+
- Check every archive target in step 3, before the first main-spec write; a change whose target exists is never synced or moved
|
|
325
355
|
- If sync is requested, run the `openspec-sync-specs` workflow inline (agent-driven) for each change with included delta specs
|
|
326
356
|
- Carry the per-delta `includedDeltas` and `excludedDeltas` decisions into execution; sync and verify only included deltas
|
|
327
357
|
- Report every excluded delta as `sync skipped` without treating the archive itself as skipped
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec-continue-change
|
|
3
|
-
description: Continue working on an OpenSpec change by creating the next artifact. Use when the user wants to progress their change, create the next artifact, or continue their workflow.
|
|
3
|
+
description: Continue working on an OpenSpec change by creating the next artifact. Use when the user wants to progress their change, create the next artifact, or continue their workflow. Also use when the user says "openspec continue" or "opsx continue".
|
|
4
4
|
allowed-tools: Bash(openspec:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires openspec CLI.
|
|
7
7
|
metadata:
|
|
8
8
|
author: openspec
|
|
9
9
|
version: "1.0"
|
|
10
|
+
generatedBy: "1.13.1"
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Continue working on a change by creating the next artifact.
|
|
13
14
|
|
|
14
15
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
15
16
|
|
|
17
|
+
**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, or authoring an artifact file), confirm the project has a root: run `openspec list --json` (with `--store <id>` when a store is selected, since the store is then the root) and read `root`. A root object means the project is set up. `"root": null` means it is not - there is no `openspec/` directory here, and a write such as `openspec new change` would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
|
|
18
|
+
|
|
19
|
+
One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `openspec/config.yaml` (or `config.yml`), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the `store:` line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's `message` and `fix`.
|
|
20
|
+
|
|
21
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
22
|
+
|
|
23
|
+
- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
|
|
24
|
+
- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up (`openspec init`), target a store they already have (`--store <id>`), or continue without OpenSpec for this request. Wait for their answer.
|
|
25
|
+
|
|
26
|
+
In both branches, never create the root as a side effect: do not run `openspec init` until the user asks for it, do not hand-create `openspec/` files, and do not let a command create it.
|
|
27
|
+
|
|
16
28
|
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
17
29
|
|
|
18
30
|
**Steps**
|
|
@@ -32,7 +44,7 @@ Continue working on a change by creating the next artifact.
|
|
|
32
44
|
|
|
33
45
|
Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.
|
|
34
46
|
|
|
35
|
-
Always announce: "Using change: <name>" and how to override (e.g., `/
|
|
47
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:continue <other>`).
|
|
36
48
|
|
|
37
49
|
2. **Check current status**
|
|
38
50
|
```bash
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec-explore
|
|
3
|
-
description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during
|
|
3
|
+
description: Enter OpenSpec explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements in a project that uses OpenSpec. Use when the user wants to think through something before or during an OpenSpec change. Also use when the user says "openspec explore" or "opsx explore".
|
|
4
4
|
allowed-tools: Bash(openspec:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires openspec CLI.
|
|
7
7
|
metadata:
|
|
8
8
|
author: openspec
|
|
9
9
|
version: "1.0"
|
|
10
|
+
generatedBy: "1.13.1"
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
|
|
13
14
|
|
|
14
|
-
**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, investigate the codebase, and run read-only commands or tools without confirmation, but you must NEVER write code or implement features. If the user asks you to implement something,
|
|
15
|
+
**IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, investigate the codebase, and run read-only commands or tools without confirmation, but you must NEVER write code or implement features. If the user asks you to implement something, do not start it here: say that explore mode does not implement, and point them at `/opsx:propose`, which turns the discussion into a change. The work happens from that change, never from explore mode. You MAY create or update OpenSpec change artifacts (proposals, designs, specs) within a confirmed scope—that's capturing thinking, not implementing. Answering design or clarifying questions is never consent to write. Before the first write-capable action, name the artifacts or files you would change and what you would do, ask a direct yes/no question, and wait for the user's confirmation in a separate message. Confirmation covers only the scope you described; ask again before expanding it. An explicit request from the user to capture the exploration as a new change is itself that confirmation, covering the change and the change artifacts the request names; scaffold it first as described below.
|
|
15
16
|
|
|
16
17
|
**This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
|
|
17
18
|
|
|
18
19
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
19
20
|
|
|
21
|
+
**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, or authoring an artifact file), confirm the project has a root: run `openspec list --json` (with `--store <id>` when a store is selected, since the store is then the root) and read `root`. A root object means the project is set up. `"root": null` means it is not - there is no `openspec/` directory here, and a write such as `openspec new change` would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
|
|
22
|
+
|
|
23
|
+
One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `openspec/config.yaml` (or `config.yml`), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the `store:` line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's `message` and `fix`.
|
|
24
|
+
|
|
25
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
26
|
+
|
|
27
|
+
- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
|
|
28
|
+
- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up (`openspec init`), target a store they already have (`--store <id>`), or continue without OpenSpec for this request. Wait for their answer.
|
|
29
|
+
|
|
30
|
+
In both branches, never create the root as a side effect: do not run `openspec init` until the user asks for it, do not hand-create `openspec/` files, and do not let a command create it.
|
|
31
|
+
|
|
20
32
|
---
|
|
21
33
|
|
|
22
34
|
## The Stance
|
|
@@ -141,14 +153,14 @@ Think freely. When insights crystallize, you might offer:
|
|
|
141
153
|
- "This feels solid enough to start a change. Want me to create a proposal?"
|
|
142
154
|
- Or keep exploring - no pressure to formalize
|
|
143
155
|
|
|
144
|
-
If the user asks you to capture the exploration as a new change,
|
|
156
|
+
If the user asks you to capture the exploration as a new change, that request is the confirmation required above. It covers scaffolding that change and creating the change artifacts the request names, and nothing else. This holds only when the request is theirs: a yes to an offer you made confirms only the scope your offer itself named, so name the change and the artifacts in the offer. Don't re-ask for what they already asked for; do ask before anything beyond it. Transition seamlessly into the requested capture:
|
|
145
157
|
|
|
146
158
|
1. Run `openspec new change "<name>"` (with `--store <id>` when applicable) before creating any artifacts. Never create a new change directory under `openspec/changes/` by hand; the CLI scaffold creates required metadata such as `.openspec.yaml`. Keep the selected `--store <id>` on every applicable follow-up `status` and `instructions` command.
|
|
147
159
|
2. Run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store), then process the requested artifacts in dependency order. For each requested artifact that is `ready`, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store). Before creating a requested artifact, evaluate any condition in its own `instruction` against the explored change; record a deliberate skip instead when the condition does not apply. If a requested artifact is blocked by a direct prerequisite the user did not request, run `openspec instructions "<prerequisite-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) for that prerequisite whether it is `ready` or `blocked`. If its own `instruction` states a condition, evaluate that condition against the explored change and record a deliberate skip only when the condition does not apply. If the condition applies, or the prerequisite is not conditional, treat it as a normal prerequisite and ask before expanding the capture. Do not create an unrequested prerequisite unless the user approves.
|
|
148
160
|
3. Follow the returned `template` and `instruction` fields. Read completed dependency files listed in `dependencies`, and apply `context` and `rules` as constraints without copying them into the artifact. If the instruction delegates creation to a specific skill or command, invoke it; otherwise write the artifact to `resolvedOutputPath`, using the instruction to choose a concrete path when it is a glob. Verify that the selected concrete output exists.
|
|
149
161
|
4. After creating each artifact, re-run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) and continue until every requested artifact is `done`, `skipped`, or was deliberately skipped because its own `instruction` stated a condition that did not apply. Tell the user about a deliberate conditional skip, remember it, and do not reconsider it. Dependencies are enablers, not gates: if a requested artifact is still `blocked` only because you deliberately skipped a conditional prerequisite, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) despite the blocked status, then create it using step 3 only when those recorded conditional skips are its sole missing dependencies. If a requested artifact is blocked by a prerequisite the user did not ask to capture and cannot be conditionally skipped, explain that dependency and ask before expanding the capture.
|
|
150
162
|
|
|
151
|
-
Capture the artifact(s) the user requested without asking them to invoke another workflow command. If they asked only to start a change, stop after scaffolding and show its status.
|
|
163
|
+
Capture the artifact(s) the user requested without asking them to invoke another workflow command. If they asked only to start a change, stop after scaffolding and show its status. When the requested capture is done, stop there and name where the work continues: `/opsx:propose` writes the remaining planning artifacts, and `/opsx:apply` implements the change once tasks exist. Capturing artifacts never starts implementing them.
|
|
152
164
|
|
|
153
165
|
### When a change exists
|
|
154
166
|
|
|
@@ -254,7 +266,7 @@ You: [reads codebase]
|
|
|
254
266
|
|
|
255
267
|
**User is stuck mid-implementation:**
|
|
256
268
|
```
|
|
257
|
-
User: /
|
|
269
|
+
User: /opsx:explore add-auth-system
|
|
258
270
|
The OAuth integration is more complex than expected
|
|
259
271
|
|
|
260
272
|
You: [reads change artifacts]
|
|
@@ -304,7 +316,7 @@ You: That changes everything.
|
|
|
304
316
|
|
|
305
317
|
There's no required ending. Discovery might:
|
|
306
318
|
|
|
307
|
-
- **Flow into a proposal**: "Ready to start?
|
|
319
|
+
- **Flow into a proposal**: "Ready to start? Run `/opsx:propose` and this becomes a change."
|
|
308
320
|
- **Result in artifact updates**: "Updated design.md with these decisions"
|
|
309
321
|
- **Just provide clarity**: User has what they need, moves on
|
|
310
322
|
- **Continue later**: "We can pick this up anytime"
|
|
@@ -321,7 +333,7 @@ When it feels like things are crystallizing, you might summarize:
|
|
|
321
333
|
**Open questions**: [if any remain]
|
|
322
334
|
|
|
323
335
|
**Next steps** (if ready):
|
|
324
|
-
-
|
|
336
|
+
- Turn this into a change: `/opsx:propose`
|
|
325
337
|
- Keep exploring: just keep talking
|
|
326
338
|
```
|
|
327
339
|
|
|
@@ -331,11 +343,11 @@ But this summary is optional. Sometimes the thinking IS the value.
|
|
|
331
343
|
|
|
332
344
|
## Guardrails
|
|
333
345
|
|
|
334
|
-
- **Don't implement** - Never write code or implement features. Workflow configuration counts too: creating or editing schemas, templates, or `openspec/config.yaml` is a change, not thinking. Creating or updating OpenSpec change artifacts within the confirmed scope is fine, writing anything else is not.
|
|
346
|
+
- **Don't implement** - Never write code or implement features. Workflow configuration counts too: creating or editing schemas, templates, or `openspec/config.yaml` is a change, not thinking. Creating or updating OpenSpec change artifacts within the confirmed scope is fine, writing anything else is not. When the user is ready to build, name the handoff rather than starting: `/opsx:propose` turns the discussion into a change, and the work happens there.
|
|
335
347
|
- **Don't fake understanding** - If something is unclear, dig deeper
|
|
336
348
|
- **Don't rush** - Discovery is thinking time, not task time
|
|
337
349
|
- **Don't force structure** - Let patterns emerge naturally
|
|
338
|
-
- **Don't auto-capture** - Offer to save insights, don't just do it. Read-only commands and tools need no confirmation. Before the first write-capable action—including `openspec new change` or another command that writes files—name the artifacts or files and proposed changes, ask a direct yes/no question, and wait for explicit confirmation in a separate user message. That confirmation covers only the described scope; ask again before expanding it. Answers to design or clarifying questions are never consent to write.
|
|
350
|
+
- **Don't auto-capture** - Offer to save insights, don't just do it. Read-only commands and tools need no confirmation. Before the first write-capable action—including `openspec new change` or another command that writes files—name the artifacts or files and proposed changes, ask a direct yes/no question, and wait for explicit confirmation in a separate user message. That confirmation covers only the described scope; ask again before expanding it. Answers to design or clarifying questions are never consent to write. That rule governs `openspec new change` whenever you are the one proposing the capture; the user's own capture request is the exception, handled in the capture transition above.
|
|
339
351
|
- **Don't manually scaffold changes** - Never create a new change directory under `openspec/changes/` by hand. Always use `openspec new change "<name>"` (with `--store <id>` when applicable) so required metadata such as `.openspec.yaml` is created before writing artifacts.
|
|
340
352
|
- **Do visualize** - A good diagram is worth many paragraphs
|
|
341
353
|
- **Do explore the codebase** - Ground discussions in reality
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec-ff-change
|
|
3
|
-
description: Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.
|
|
3
|
+
description: Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually. Also use when the user says "openspec ff" or "opsx ff".
|
|
4
4
|
allowed-tools: Bash(openspec:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires openspec CLI.
|
|
7
7
|
metadata:
|
|
8
8
|
author: openspec
|
|
9
9
|
version: "1.0"
|
|
10
|
+
generatedBy: "1.13.1"
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Fast-forward through artifact creation - generate everything needed to start implementation in one go.
|
|
13
14
|
|
|
14
15
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
15
16
|
|
|
17
|
+
**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, or authoring an artifact file), confirm the project has a root: run `openspec list --json` (with `--store <id>` when a store is selected, since the store is then the root) and read `root`. A root object means the project is set up. `"root": null` means it is not - there is no `openspec/` directory here, and a write such as `openspec new change` would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
|
|
18
|
+
|
|
19
|
+
One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `openspec/config.yaml` (or `config.yml`), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the `store:` line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's `message` and `fix`.
|
|
20
|
+
|
|
21
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
22
|
+
|
|
23
|
+
- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
|
|
24
|
+
- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up (`openspec init`), target a store they already have (`--store <id>`), or continue without OpenSpec for this request. Wait for their answer.
|
|
25
|
+
|
|
26
|
+
In both branches, never create the root as a side effect: do not run `openspec init` until the user asks for it, do not hand-create `openspec/` files, and do not let a command create it.
|
|
27
|
+
|
|
16
28
|
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
17
29
|
|
|
18
30
|
**Steps**
|
|
@@ -95,7 +107,7 @@ After completing all artifacts, summarize:
|
|
|
95
107
|
- Change name and location
|
|
96
108
|
- List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
|
|
97
109
|
- What's ready: "All artifacts needed for implementation are ready."
|
|
98
|
-
- Prompt: "Run `/
|
|
110
|
+
- Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
|
|
99
111
|
|
|
100
112
|
**Artifact Creation Guidelines**
|
|
101
113
|
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openspec-new-change
|
|
3
|
-
description: Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.
|
|
3
|
+
description: Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach. Also use when the user says "openspec new change" or "opsx new".
|
|
4
4
|
allowed-tools: Bash(openspec:*)
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires openspec CLI.
|
|
7
7
|
metadata:
|
|
8
8
|
author: openspec
|
|
9
9
|
version: "1.0"
|
|
10
|
+
generatedBy: "1.13.1"
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Start a new change using the experimental artifact-driven approach.
|
|
13
14
|
|
|
14
15
|
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
15
16
|
|
|
17
|
+
**Project check:** These steps expect a project that already uses OpenSpec. Before the first step that writes anything (`new change`, `archive`, `sync specs`, or authoring an artifact file), confirm the project has a root: run `openspec list --json` (with `--store <id>` when a store is selected, since the store is then the root) and read `root`. A root object means the project is set up. `"root": null` means it is not - there is no `openspec/` directory here, and a write such as `openspec new change` would create one as a side effect. The command also exits non-zero, which is that answer rather than a broken CLI, so read the JSON instead of retrying or working around it.
|
|
18
|
+
|
|
19
|
+
One `"root": null` is not about setup: when a `status` error message starts with `Declared in` or `Invalid store declaration in` and names this project's `openspec/config.yaml` (or `config.yml`), the project does use OpenSpec through a store it declares, which this machine cannot resolve (the store is not registered, or the `store:` line is malformed). Do not treat it as uninitialized and skip the branches below: stop before writing and show the user that error's `message` and `fix`.
|
|
20
|
+
|
|
21
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
22
|
+
|
|
23
|
+
- **Auto-selected**: you chose this workflow yourself, without the user naming OpenSpec, naming this skill, or running its slash command. Stop using OpenSpec and answer the request normally, as you would with no OpenSpec installed. Do not ask them to set anything up and do not mention OpenSpec setup.
|
|
24
|
+
- **Explicit OpenSpec request**: the user named OpenSpec, named this skill, or ran its slash command. Stop before writing and ask how to proceed: set this project up (`openspec init`), target a store they already have (`--store <id>`), or continue without OpenSpec for this request. Wait for their answer.
|
|
25
|
+
|
|
26
|
+
In both branches, never create the root as a side effect: do not run `openspec init` until the user asks for it, do not hand-create `openspec/` files, and do not let a command create it.
|
|
27
|
+
|
|
16
28
|
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
17
29
|
|
|
18
30
|
**Steps**
|