@jspg-ai/coding-bb 0.0.3-beta.4 → 0.0.3-beta.7
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/dev-standards/rules/cbb-ai-behavior.md +118 -116
- package/cbb/lib/install/codebuddy.js +32 -0
- package/cbb/lib/install/init.js +85 -35
- package/cbb/lib/install/rule-rewrite.js +27 -0
- package/cbb/lib/install/trae.js +35 -0
- package/cbb/lib/openspec/index.js +337 -554
- package/cbb/lib/superpowers/index.js +246 -265
- package/cbb/lib/utils/check-update.js +8 -1
- 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/commands/worktree-close.md +1 -1
- package/config/upstream-mirrors.json +12 -0
- package/config/workspace-agents.sample.md +41 -39
- 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
|
@@ -4,179 +4,193 @@ description: Implement tasks from an OpenSpec change (Experimental)
|
|
|
4
4
|
category: Workflow
|
|
5
5
|
tags: [workflow, artifacts, experimental]
|
|
6
6
|
---
|
|
7
|
-
Implement tasks from an OpenSpec change.
|
|
8
|
-
|
|
9
|
-
**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`). 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.
|
|
10
|
-
|
|
11
|
-
**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- `
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
**Output
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
##
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
**
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
7
|
+
Implement tasks from an OpenSpec change.
|
|
8
|
+
|
|
9
|
+
**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.
|
|
10
|
+
|
|
11
|
+
**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.
|
|
12
|
+
|
|
13
|
+
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`.
|
|
14
|
+
|
|
15
|
+
Otherwise, with no root, what happens next depends on how this workflow was reached:
|
|
16
|
+
|
|
17
|
+
- **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.
|
|
18
|
+
- **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.
|
|
19
|
+
|
|
20
|
+
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.
|
|
21
|
+
|
|
22
|
+
**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.
|
|
23
|
+
|
|
24
|
+
**Steps**
|
|
25
|
+
|
|
26
|
+
1. **Select the change**
|
|
27
|
+
|
|
28
|
+
If a name is provided, use it. Otherwise:
|
|
29
|
+
- Infer from conversation context if the user mentioned a change
|
|
30
|
+
- Auto-select if only one active change exists
|
|
31
|
+
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
|
|
32
|
+
|
|
33
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
|
|
34
|
+
|
|
35
|
+
2. **Check status to understand the schema**
|
|
36
|
+
```bash
|
|
37
|
+
openspec status --change "<name>" --json
|
|
38
|
+
```
|
|
39
|
+
Parse the JSON to understand:
|
|
40
|
+
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
41
|
+
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
|
|
42
|
+
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
|
43
|
+
|
|
44
|
+
3. **Get apply instructions**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
openspec instructions apply --change "<name>" --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This returns:
|
|
51
|
+
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
|
|
52
|
+
- Progress (total, complete, remaining)
|
|
53
|
+
- Task list with status
|
|
54
|
+
- Dynamic instruction based on current state
|
|
55
|
+
- Optional `context`: current required project instruction input from the selected root
|
|
56
|
+
- Optional `operationGuidance`: current advisory guidance for apply
|
|
57
|
+
- `missingArtifacts` (when present): required artifact ids with no output
|
|
58
|
+
|
|
59
|
+
**Handle states:**
|
|
60
|
+
- If `state: "blocked"`: show the message and pause implementation.
|
|
61
|
+
- If `missingArtifacts` is non-empty: suggest using `/opsx:continue` to create them.
|
|
62
|
+
- 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.
|
|
63
|
+
- If `state: "all_done"`: congratulate, suggest archive
|
|
64
|
+
- Otherwise: proceed to implementation
|
|
65
|
+
|
|
66
|
+
Treat `context` as a required prompt-level input. Read and consider it, and
|
|
67
|
+
apply relevant project facts, conventions, and constraints while implementing.
|
|
68
|
+
Treat `operationGuidance` as optional additive advice. Read and consider every
|
|
69
|
+
entry, and follow entries that are applicable and compatible with the built-in
|
|
70
|
+
workflow.
|
|
71
|
+
|
|
72
|
+
Keep both fields separate from CLI-returned state, missing artifacts, tasks,
|
|
73
|
+
progress, `contextFiles`, and the built-in `instruction`. They are not
|
|
74
|
+
evidence of task completion, do not replace the built-in instruction, and do
|
|
75
|
+
not permit bypassing a blocked state. If context conflicts with the built-in
|
|
76
|
+
instruction, an explicit user choice, or a CLI-controlled value, report the
|
|
77
|
+
conflict and preserve the controlling value. If guidance is inapplicable or
|
|
78
|
+
conflicts with those controlling inputs, do not follow it and explain why.
|
|
79
|
+
These are prompt-level behavior contracts, not enforceable checks.
|
|
80
|
+
|
|
81
|
+
4. **Read context files**
|
|
82
|
+
|
|
83
|
+
Read every file path listed under `contextFiles` from the apply instructions output.
|
|
84
|
+
The files depend on the schema being used:
|
|
85
|
+
- **spec-driven**: proposal, specs, design, tasks
|
|
86
|
+
- Other schemas: follow the contextFiles from CLI output
|
|
87
|
+
|
|
88
|
+
Do not copy `context` or `operationGuidance` verbatim into implementation
|
|
89
|
+
files or planning artifacts unless the user separately asks for that content.
|
|
90
|
+
|
|
91
|
+
5. **Show current progress**
|
|
92
|
+
|
|
93
|
+
Display:
|
|
94
|
+
- Schema being used
|
|
95
|
+
- Progress: "N/M tasks complete"
|
|
96
|
+
- Remaining tasks overview
|
|
97
|
+
- Dynamic instruction from CLI
|
|
98
|
+
|
|
99
|
+
6. **Implement tasks (loop until done or blocked)**
|
|
100
|
+
|
|
101
|
+
For each pending task:
|
|
102
|
+
- Show which task is being worked on
|
|
103
|
+
- Make the code changes required
|
|
104
|
+
- Keep changes minimal and focused
|
|
105
|
+
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
|
|
106
|
+
- Continue to next task
|
|
107
|
+
|
|
108
|
+
**Pause if:**
|
|
109
|
+
- Task is unclear → ask for clarification
|
|
110
|
+
- Implementation reveals a design issue → suggest updating artifacts
|
|
111
|
+
- A task needs work beyond what the spec and tasks describe, or you are tempted to drop, narrow, defer, or accept exceptions to specified behavior to make it fit → surface the added scope and ask; do not absorb it silently
|
|
112
|
+
- Error or blocker encountered → report and wait for guidance
|
|
113
|
+
- User interrupts
|
|
114
|
+
|
|
115
|
+
7. **On completion or pause, show status**
|
|
116
|
+
|
|
117
|
+
Display:
|
|
118
|
+
- Tasks completed this session
|
|
119
|
+
- Overall progress: "N/M tasks complete"
|
|
120
|
+
- If all done: suggest archive
|
|
121
|
+
- If paused: explain why and wait for guidance
|
|
122
|
+
|
|
123
|
+
**Output During Implementation**
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
## Implementing: <change-name> (schema: <schema-name>)
|
|
127
|
+
|
|
128
|
+
Working on task 3/7: <task description>
|
|
129
|
+
[...implementation happening...]
|
|
130
|
+
✓ Task complete
|
|
131
|
+
|
|
132
|
+
Working on task 4/7: <task description>
|
|
133
|
+
[...implementation happening...]
|
|
134
|
+
✓ Task complete
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Output On Completion**
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
## Implementation Complete
|
|
141
|
+
|
|
142
|
+
**Change:** <change-name>
|
|
143
|
+
**Schema:** <schema-name>
|
|
144
|
+
**Progress:** 7/7 tasks complete ✓
|
|
145
|
+
|
|
146
|
+
### Completed This Session
|
|
147
|
+
- [x] Task 1
|
|
148
|
+
- [x] Task 2
|
|
149
|
+
...
|
|
150
|
+
|
|
151
|
+
All tasks complete! You can archive this change with `/opsx:archive`.
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Output On Pause (Issue Encountered)**
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
## Implementation Paused
|
|
158
|
+
|
|
159
|
+
**Change:** <change-name>
|
|
160
|
+
**Schema:** <schema-name>
|
|
161
|
+
**Progress:** 4/7 tasks complete
|
|
162
|
+
|
|
163
|
+
### Issue Encountered
|
|
164
|
+
<description of the issue>
|
|
165
|
+
|
|
166
|
+
**Options:**
|
|
167
|
+
1. <option 1>
|
|
168
|
+
2. <option 2>
|
|
169
|
+
3. Other approach
|
|
170
|
+
|
|
171
|
+
What would you like to do?
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Guardrails**
|
|
175
|
+
- Keep going through tasks until done or blocked
|
|
176
|
+
- Always read context files before starting (from the apply instructions output)
|
|
177
|
+
- If task is ambiguous, pause and ask before implementing
|
|
178
|
+
- If implementation reveals issues, pause and suggest artifact updates
|
|
179
|
+
- Keep code changes minimal and scoped to each task
|
|
180
|
+
- Update task checkbox immediately after completing each task
|
|
181
|
+
- Pause on errors, blockers, or unclear requirements - don't guess
|
|
182
|
+
- When a task needs work beyond what the spec describes, surface the added scope and pause - never silently narrow, defer, or simplify away specified behavior
|
|
183
|
+
- Only mark a task `- [x]` when its specified behavior is fully implemented, not when it is partially done or deferred
|
|
184
|
+
- Use contextFiles from CLI output, don't assume specific file names
|
|
185
|
+
- Do not use context or operation guidance as proof that a task is complete
|
|
186
|
+
- Apply relevant project context; report conflicts with controlling workflow inputs
|
|
187
|
+
- Consider every guidance entry; explain any inapplicable or conflicting advice
|
|
188
|
+
- Do not copy runtime context or operation guidance into implementation files or planning artifacts
|
|
189
|
+
- Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria
|
|
190
|
+
|
|
191
|
+
**Fluid Workflow Integration**
|
|
192
|
+
|
|
193
|
+
This skill supports the "actions on a change" model:
|
|
194
|
+
|
|
195
|
+
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
|
|
182
196
|
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
|