@jspg-ai/coding-bb 0.0.1
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/README.md +41 -0
- package/cbb/dev-standards/rules/cbb-ai-behavior.md +104 -0
- package/cbb/dev-standards/rules/cbb-coding-rule.md +50 -0
- package/cbb/dev-standards/rules/cbb-priority.md +56 -0
- package/cbb/dev-standards/skills/architecture-specs/SKILL.md +129 -0
- package/cbb/dev-standards/skills/coding-specs/SKILL.md +376 -0
- package/cbb/dev-standards/skills/coding-specs/references/concurrency.md +53 -0
- package/cbb/dev-standards/skills/coding-specs/references/config-center.md +16 -0
- package/cbb/dev-standards/skills/coding-specs/references/distributed.md +42 -0
- package/cbb/dev-standards/skills/coding-specs/references/es-coding.md +60 -0
- package/cbb/dev-standards/skills/coding-specs/references/scheduled-task.md +25 -0
- package/cbb/dev-standards/skills/coding-specs/references/security.md +11 -0
- package/cbb/dev-standards/skills/coding-specs/references/unit-testing.md +43 -0
- package/cbb/dev-standards/skills/es-design-specs/SKILL.md +104 -0
- package/cbb/dev-standards/skills/mysql-design-specs/SKILL.md +89 -0
- package/cbb/lib/install/claude-code.js +20 -0
- package/cbb/lib/install/cleanup.js +64 -0
- package/cbb/lib/install/init.js +1875 -0
- package/cbb/lib/install/qoder.js +20 -0
- package/cbb/lib/install/workspaces.js +232 -0
- package/cbb/lib/openspec/index.js +554 -0
- package/cbb/lib/superpowers/index.js +265 -0
- package/cbb/lib/utils/check-update.js +147 -0
- package/cbb/lib/utils/checkbox.js +383 -0
- package/cbb/lib/utils/gitignore.js +69 -0
- package/cbb/lib/utils/output.js +64 -0
- package/cbb/lib/utils/settings.js +119 -0
- package/cbb/lib/utils/version.js +135 -0
- package/cbb/lib/wiki/api-client.js +358 -0
- package/cbb/lib/wiki/cli.js +427 -0
- package/cbb/lib/wiki/convert.js +464 -0
- package/cbb/lib/wiki/index.js +218 -0
- package/cbb/lib/wiki/mermaid-guard.js +103 -0
- package/cbb/lib/wiki/split.js +131 -0
- package/cbb/tools/cbb-decompile-jar/SKILL.md +220 -0
- package/cbb/tools/cbb-decompile-jar/scripts/decompile.py +863 -0
- package/cbb/tools/cbb-design-to-wiki/SKILL.md +180 -0
- package/cbb/tools/cbb-mvn-guide/SKILL.md +281 -0
- package/cbb/tools/cbb-mvn-guide/scripts/mvn_jdk_manager.py +378 -0
- package/cbb/tools/cbb-mvn-guide/scripts/mvn_pom_jdk_reader.py +197 -0
- package/cbb/tools/cbb-plantuml-authoring/SKILL.md +448 -0
- package/cbb/tools/cbb-plantuml-authoring/references/drawing-templates.md +479 -0
- package/cbb/tools/cbb-wiki-ops/SKILL.md +134 -0
- package/cbb/tools/cbb-wiki-ops/scripts/check-auth.js +44 -0
- package/cbb/worktrees/_shared/scripts/find-target-worktree.js +96 -0
- package/cbb/worktrees/_shared/scripts/find-workspace-root.js +67 -0
- package/cbb/worktrees/_shared/scripts/push-core.js +136 -0
- package/cbb/worktrees/_shared/scripts/silence-popup.js +23 -0
- package/cbb/worktrees/commands/close.md +64 -0
- package/cbb/worktrees/commands/extend.md +65 -0
- package/cbb/worktrees/commands/init.md +55 -0
- package/cbb/worktrees/commands/push.md +42 -0
- package/cbb/worktrees/skills/openspec-close-worktree/SKILL.md +449 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/check-env.js +76 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/check-unarchived.js +48 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/delete-branches.js +136 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/discover-apps.js +76 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/find-target-worktree.js +96 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/find-workspace-root.js +67 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/remove-worktrees.js +124 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/safety-check.js +174 -0
- package/cbb/worktrees/skills/openspec-close-worktree/scripts/silence-popup.js +23 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/SKILL.md +390 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/check-env.js +95 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/check-repos.js +98 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/create-branches-and-worktrees.js +135 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/find-target-worktree.js +96 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/find-workspace-root.js +67 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/install-ai.js +150 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/list-available-apps.js +88 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/push-core.js +136 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/silence-popup.js +23 -0
- package/cbb/worktrees/skills/openspec-extend-worktree/scripts/sync-repos.js +93 -0
- package/cbb/worktrees/skills/openspec-init-worktree/SKILL.md +539 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/auto-open.js +136 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/check-env-deep.js +87 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/check-env.js +90 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/check-repos.js +171 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/create-branches.js +103 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/create-worktrees.js +154 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/find-workspace-root.js +67 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/generate-app-options.js +93 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/install-ai.js +177 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/parse-config.js +67 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/push-branches.js +101 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/push-core.js +136 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/silence-popup.js +23 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/sync-repos.js +95 -0
- package/cbb/worktrees/skills/openspec-init-worktree/scripts/update-gitignore.js +134 -0
- package/cbb/worktrees/skills/openspec-push-worktrees/SKILL.md +307 -0
- package/cbb/worktrees/skills/openspec-push-worktrees/scripts/commit-worktrees.js +269 -0
- package/cbb/worktrees/skills/openspec-push-worktrees/scripts/find-target-worktree.js +96 -0
- package/cbb/worktrees/skills/openspec-push-worktrees/scripts/find-workspace-root.js +67 -0
- package/cbb/worktrees/skills/openspec-push-worktrees/scripts/push-core.js +136 -0
- package/cbb/worktrees/skills/openspec-push-worktrees/scripts/push-worktrees.js +159 -0
- package/cbb/worktrees/skills/openspec-push-worktrees/scripts/silence-popup.js +23 -0
- package/config/cbb.yaml +6 -0
- package/config/config.sample.json +16 -0
- package/config/openspec/config.yaml +28 -0
- package/config/openspec/schemas/spec-driven/schema.yaml +247 -0
- package/config/openspec/schemas/spec-driven/templates/design.md +475 -0
- package/config/openspec/schemas/spec-driven/templates/proposal.md +58 -0
- package/config/openspec/schemas/spec-driven/templates/spec.md +8 -0
- package/config/openspec/schemas/spec-driven/templates/tasks.md +9 -0
- package/config/workspaces.json +15 -0
- package/openspec/.version +6 -0
- package/openspec/commands/apply.md +182 -0
- package/openspec/commands/archive.md +223 -0
- package/openspec/commands/bulk-archive.md +334 -0
- package/openspec/commands/continue.md +112 -0
- package/openspec/commands/explore.md +206 -0
- package/openspec/commands/ff.md +111 -0
- package/openspec/commands/new.md +70 -0
- package/openspec/commands/onboard.md +555 -0
- package/openspec/commands/propose.md +157 -0
- package/openspec/commands/sync.md +256 -0
- package/openspec/commands/update.md +85 -0
- package/openspec/commands/verify.md +169 -0
- package/openspec/skills/openspec-apply-change/SKILL.md +187 -0
- package/openspec/skills/openspec-archive-change/SKILL.md +181 -0
- package/openspec/skills/openspec-bulk-archive-change/SKILL.md +338 -0
- package/openspec/skills/openspec-continue-change/SKILL.md +117 -0
- package/openspec/skills/openspec-explore/SKILL.md +342 -0
- package/openspec/skills/openspec-ff-change/SKILL.md +116 -0
- package/openspec/skills/openspec-new-change/SKILL.md +76 -0
- package/openspec/skills/openspec-onboard/SKILL.md +560 -0
- package/openspec/skills/openspec-propose/SKILL.md +162 -0
- package/openspec/skills/openspec-sync-specs/SKILL.md +261 -0
- package/openspec/skills/openspec-update-change/SKILL.md +90 -0
- package/openspec/skills/openspec-verify-change/SKILL.md +174 -0
- package/package.json +46 -0
- package/superpowers/.version +6 -0
- package/superpowers/skills/brainstorming/SKILL.md +250 -0
- package/superpowers/skills/brainstorming/scripts/frame-template.html +213 -0
- package/superpowers/skills/brainstorming/scripts/helper.js +167 -0
- package/superpowers/skills/brainstorming/scripts/server.cjs +723 -0
- package/superpowers/skills/brainstorming/scripts/start-server.sh +209 -0
- package/superpowers/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/superpowers/skills/brainstorming/visual-companion.md +299 -0
- package/superpowers/skills/dispatching-parallel-agents/SKILL.md +167 -0
- package/superpowers/skills/executing-plans/SKILL.md +64 -0
- package/superpowers/skills/finishing-a-development-branch/SKILL.md +225 -0
- package/superpowers/skills/receiving-code-review/SKILL.md +205 -0
- package/superpowers/skills/requesting-code-review/SKILL.md +95 -0
- package/superpowers/skills/requesting-code-review/code-reviewer.md +181 -0
- package/superpowers/skills/subagent-driven-development/SKILL.md +568 -0
- package/superpowers/skills/subagent-driven-development/implementer-prompt.md +154 -0
- package/superpowers/skills/subagent-driven-development/re-review-prompt.md +115 -0
- package/superpowers/skills/subagent-driven-development/scripts/review-package +46 -0
- package/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +40 -0
- package/superpowers/skills/subagent-driven-development/scripts/task-brief +41 -0
- package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +207 -0
- package/superpowers/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/superpowers/skills/systematic-debugging/SKILL.md +283 -0
- package/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/superpowers/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/superpowers/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/superpowers/skills/systematic-debugging/find-polluter.sh +72 -0
- package/superpowers/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/superpowers/skills/systematic-debugging/test-academic.md +14 -0
- package/superpowers/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/superpowers/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/superpowers/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/superpowers/skills/test-driven-development/SKILL.md +320 -0
- package/superpowers/skills/test-driven-development/writing-good-tests.md +198 -0
- package/superpowers/skills/using-git-worktrees/SKILL.md +167 -0
- package/superpowers/skills/using-superpowers/SKILL.md +63 -0
- package/superpowers/skills/using-superpowers/references/antigravity-tools.md +23 -0
- package/superpowers/skills/using-superpowers/references/codex-tools.md +108 -0
- package/superpowers/skills/using-superpowers/references/gemini-tools.md +63 -0
- package/superpowers/skills/using-superpowers/references/hermes-tools.md +56 -0
- package/superpowers/skills/using-superpowers/references/pi-tools.md +16 -0
- package/superpowers/skills/verification-before-completion/SKILL.md +120 -0
- package/superpowers/skills/writing-plans/SKILL.md +171 -0
- package/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/superpowers/skills/writing-skills/SKILL.md +679 -0
- package/superpowers/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/superpowers/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/superpowers/skills/writing-skills/persuasion-principles.md +187 -0
- package/superpowers/skills/writing-skills/render-graphs.js +169 -0
- package/superpowers/skills/writing-skills/testing-skills-with-subagents.md +384 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-bulk-archive-change
|
|
3
|
+
description: Archive multiple completed changes at once. Use when archiving several parallel changes.
|
|
4
|
+
allowed-tools: Bash(openspec:*)
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Requires openspec CLI.
|
|
7
|
+
metadata:
|
|
8
|
+
author: openspec
|
|
9
|
+
version: "1.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Archive multiple completed changes in a single operation.
|
|
13
|
+
|
|
14
|
+
This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
|
|
15
|
+
|
|
16
|
+
**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
|
+
`<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
|
+
|
|
20
|
+
**Input**: None required (prompts for selection)
|
|
21
|
+
|
|
22
|
+
**Steps**
|
|
23
|
+
|
|
24
|
+
1. **Get active changes**
|
|
25
|
+
|
|
26
|
+
Run `openspec list --json` to get all active changes.
|
|
27
|
+
|
|
28
|
+
If no active changes exist, inform user and stop.
|
|
29
|
+
|
|
30
|
+
2. **Prompt for change selection**
|
|
31
|
+
|
|
32
|
+
Ask the user to choose changes (multi-select):
|
|
33
|
+
- Show each change with its schema
|
|
34
|
+
- Include an option for "All changes"
|
|
35
|
+
- Allow any number of selections (1+ works, 2+ is the typical use case)
|
|
36
|
+
|
|
37
|
+
**IMPORTANT**: Do NOT auto-select. Always let the user choose.
|
|
38
|
+
|
|
39
|
+
**Load current archive inputs once for the selected root before batch validation:**
|
|
40
|
+
|
|
41
|
+
Choose one selected change from this root and run
|
|
42
|
+
`openspec instructions archive --change "<selected-change>" --json` with the
|
|
43
|
+
same selected-root flags. This lookup is advisory and optional: it only supplies
|
|
44
|
+
extra prompt inputs, so it must never block the batch. If it fails or returns
|
|
45
|
+
invalid JSON — for example on an older CLI that does not support this command
|
|
46
|
+
yet — continue the batch with no context and no operation guidance. Do not
|
|
47
|
+
report an error and do not stop.
|
|
48
|
+
|
|
49
|
+
A valid response may omit `context` and `operationGuidance`. Treat
|
|
50
|
+
`context` as a required prompt-level input across the batch: read and consider
|
|
51
|
+
it, and apply relevant project facts, conventions, and constraints. Treat
|
|
52
|
+
`operationGuidance` as optional additive advice: read and consider every
|
|
53
|
+
entry, and follow entries that are applicable and compatible with the built-in
|
|
54
|
+
batch workflow.
|
|
55
|
+
|
|
56
|
+
Keep both fields separate from conflict analysis, explicit user choices,
|
|
57
|
+
resolved paths, CLI checks, and command contracts. If context conflicts with one
|
|
58
|
+
of those controlling inputs, report the conflict and preserve the controlling
|
|
59
|
+
value. If guidance is inapplicable or conflicts with a controlling input, do not
|
|
60
|
+
follow it and explain why. Do not infer skipped prompts, replacement paths, or
|
|
61
|
+
flags from either field, and do not copy their text verbatim into specs, changes,
|
|
62
|
+
or summaries. These are prompt-level behavior contracts, not enforceable checks.
|
|
63
|
+
|
|
64
|
+
3. **Batch validation - gather status for all selected changes**
|
|
65
|
+
|
|
66
|
+
For each selected change, collect:
|
|
67
|
+
|
|
68
|
+
a. **Artifact status** - Run `openspec status --change "<name>" --json`
|
|
69
|
+
- Parse `schemaName`, `artifacts`, `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`
|
|
70
|
+
- Note which artifacts are `done` vs other states
|
|
71
|
+
|
|
72
|
+
b. **Task completion** - Read `artifactPaths.tasks.existingOutputPaths` from status JSON
|
|
73
|
+
- Count `- [ ]` (incomplete) vs `- [x]` (complete)
|
|
74
|
+
- If no tasks file exists, note as "No tasks"
|
|
75
|
+
|
|
76
|
+
c. **Delta specs** - Check `artifactPaths.specs.existingOutputPaths` from status JSON
|
|
77
|
+
- List which capability specs exist
|
|
78
|
+
- For each, extract requirement names (lines matching `### Requirement: <name>`)
|
|
79
|
+
- Treat this list as the only delta-spec source. If the `specs` entry is
|
|
80
|
+
missing or the list is empty, perform no spec sync or specs-instruction
|
|
81
|
+
lookup for that change; do not infer deltas from unrelated artifacts.
|
|
82
|
+
- Evaluate this independently for every change, including mixed-schema
|
|
83
|
+
batches where some schemas have no `specs` artifact.
|
|
84
|
+
4. **Detect spec conflicts**
|
|
85
|
+
|
|
86
|
+
Build a map keyed by `<capability-path>`, the exact path relative to `specs/`:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
identity/user-auth -> [change-a, change-b] <- CONFLICT (2+ changes)
|
|
90
|
+
billing/user-auth -> [change-c] <- OK (different full path)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
A conflict exists when 2+ selected changes have delta specs for the exact same `<capability-path>`.
|
|
94
|
+
|
|
95
|
+
5. **Resolve conflicts agentically**
|
|
96
|
+
|
|
97
|
+
**For each conflict**, investigate the codebase:
|
|
98
|
+
|
|
99
|
+
a. **Read the delta specs** from each conflicting change to understand what each claims to add/modify
|
|
100
|
+
|
|
101
|
+
b. **Search the codebase** for implementation evidence:
|
|
102
|
+
- Look for code implementing requirements from each delta spec
|
|
103
|
+
- Check for related files, functions, or tests
|
|
104
|
+
|
|
105
|
+
c. **Determine resolution**:
|
|
106
|
+
- If only one change is actually implemented -> sync that one's specs
|
|
107
|
+
- If both implemented -> apply in chronological order (older first, newer overwrites)
|
|
108
|
+
- If neither implemented -> skip spec sync, warn user
|
|
109
|
+
|
|
110
|
+
d. **Record resolution** for each conflict:
|
|
111
|
+
- An inclusion or exclusion decision for every delta spec, keyed by change and `<capability-path>`
|
|
112
|
+
- Which included delta specs to apply and in what order
|
|
113
|
+
- Which delta specs to exclude from sync because their implementation is missing
|
|
114
|
+
- Rationale (what was found in codebase)
|
|
115
|
+
|
|
116
|
+
6. **Show consolidated status table**
|
|
117
|
+
|
|
118
|
+
Display a table summarizing all changes:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
| Change | Artifacts | Tasks | Specs | Conflicts | Status |
|
|
122
|
+
|---------------------|-----------|-------|---------|-----------|--------|
|
|
123
|
+
| schema-management | Done | 5/5 | 2 delta | None | Ready |
|
|
124
|
+
| project-config | Done | 3/3 | 1 delta | None | Ready |
|
|
125
|
+
| add-oauth | Done | 4/4 | 1 delta | identity/user-auth (!) | Ready* |
|
|
126
|
+
| add-verify-skill | 1 left | 2/5 | None | None | Warn |
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
For conflicts, show the resolution:
|
|
130
|
+
```text
|
|
131
|
+
* Conflict resolution:
|
|
132
|
+
- identity/user-auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
For incomplete changes, show warnings:
|
|
136
|
+
```text
|
|
137
|
+
Warnings:
|
|
138
|
+
- add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
7. **Confirm batch operation**
|
|
142
|
+
|
|
143
|
+
Ask the user a single confirmation question:
|
|
144
|
+
|
|
145
|
+
- "Archive N changes?" with options based on status
|
|
146
|
+
- Options might include:
|
|
147
|
+
- "Archive all N changes"
|
|
148
|
+
- "Archive only N ready changes (skip incomplete)"
|
|
149
|
+
- "Cancel"
|
|
150
|
+
|
|
151
|
+
If there are incomplete changes, make clear they'll be archived with warnings.
|
|
152
|
+
|
|
153
|
+
Route on the answer by intent, not by exact label — you wrote these labels,
|
|
154
|
+
so match what the user picked rather than the wording above:
|
|
155
|
+
- "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. If a `Ready*` change's conflict partner is skipped, re-derive that conflict's resolution using only the changes being archived.
|
|
158
|
+
- Anything else — ask again rather than archiving
|
|
159
|
+
|
|
160
|
+
Before step 8 writes the first main spec or moves any change, fetch every
|
|
161
|
+
required specs-rule snapshot for the confirmed batch. For each change that will
|
|
162
|
+
sync concrete `artifactPaths.specs.existingOutputPaths`, run
|
|
163
|
+
`openspec instructions specs --change "<name>" --json` exactly once with the
|
|
164
|
+
same selected-root flags. Obtain all snapshots before the first write or move.
|
|
165
|
+
If any lookup exits non-zero or returns invalid artifact-instruction JSON,
|
|
166
|
+
identify the affected change, report the error, and stop the whole batch before
|
|
167
|
+
any main-spec write or change move. Do not treat lookup failure as omitted
|
|
168
|
+
rules. A valid response without `rules` is the no-rules case.
|
|
169
|
+
|
|
170
|
+
8. **Execute archive for each confirmed change**
|
|
171
|
+
|
|
172
|
+
Before processing, carry the recorded decisions from step 5 (after any step 7 re-derivation) into two per-delta sets:
|
|
173
|
+
- `includedDeltas`: all non-conflicting delta specs from confirmed changes plus conflict deltas selected for sync
|
|
174
|
+
- `excludedDeltas`: conflict deltas from confirmed changes excluded because their implementation is missing
|
|
175
|
+
- A single change can have both included and excluded delta specs. Keep the decision per delta; do not collapse it into a per-change sync flag.
|
|
176
|
+
|
|
177
|
+
Process changes in the determined order (respecting conflict resolution):
|
|
178
|
+
|
|
179
|
+
a. **Sync included delta specs**:
|
|
180
|
+
- Run the `openspec-sync-specs` workflow inline (agent-driven intelligent merge) only for changes with entries in `includedDeltas`, passing only the included delta paths and explicitly instructing it to ignore that change's `excludedDeltas`. Wait for it to finish.
|
|
181
|
+
- For conflicts, apply in resolved order.
|
|
182
|
+
- Pass that change's fetched specs-rule snapshot into inline sync; inline
|
|
183
|
+
sync must reuse it without fetching instructions again
|
|
184
|
+
- Apply artifact rules only to main specs produced by that change. They do
|
|
185
|
+
not change conflict resolution, archive behavior, or CLI contracts, and
|
|
186
|
+
their text is not copied into an output file
|
|
187
|
+
- Do not delegate to a background task — step 8c would move `changeRoot` out from under a sync that is still reading it.
|
|
188
|
+
- If a change has no included delta specs, do not run the sync workflow for it.
|
|
189
|
+
|
|
190
|
+
b. **Verify included delta specs before moving changeRoot**:
|
|
191
|
+
- Re-run the comparison only for delta specs in `includedDeltas` against main spec at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (use the store-aware `planningHome.root` from step 3 status JSON, not a hardcoded repo path).
|
|
192
|
+
- Verify that main specs are updated:
|
|
193
|
+
- ADDED requirements present
|
|
194
|
+
- MODIFIED requirements carrying scenario and description changes named in the delta, with their other scenarios intact
|
|
195
|
+
- 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
|
|
196
|
+
- RENAMED requirements present under the new name and absent under the old one
|
|
197
|
+
- Do not verify delta specs in `excludedDeltas`; they are intentionally left unsynced.
|
|
198
|
+
- If sync failed or any capability does not match verification, report what differs and fail/skip moving that change's `changeRoot` — do not archive that change. `changeRoot` remains intact.
|
|
199
|
+
|
|
200
|
+
c. **Perform the archive**:
|
|
201
|
+
|
|
202
|
+
Target name: 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`).
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
mkdir -p "<planningHome.changesDir>/archive"
|
|
206
|
+
mv "<changeRoot>" "<planningHome.changesDir>/archive/<target-name>"
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
d. **Track outcome** for each change:
|
|
210
|
+
- Success: archived successfully
|
|
211
|
+
- Failed: error during archive or spec verification (record error)
|
|
212
|
+
- Skipped: user chose not to archive (if applicable)
|
|
213
|
+
- Sync skipped: for every delta in `excludedDeltas`, report `sync skipped` with the change, `<capability-path>`, and recorded reason. This is distinct from skipping the archive.
|
|
214
|
+
|
|
215
|
+
9. **Display summary**
|
|
216
|
+
|
|
217
|
+
Show final results:
|
|
218
|
+
|
|
219
|
+
```markdown
|
|
220
|
+
## Bulk Archive Complete
|
|
221
|
+
|
|
222
|
+
Archived 3 changes:
|
|
223
|
+
- schema-management-cli -> archive/2026-01-19-schema-management-cli/
|
|
224
|
+
- project-config -> archive/2026-01-19-project-config/
|
|
225
|
+
- add-oauth -> archive/2026-01-19-add-oauth/
|
|
226
|
+
|
|
227
|
+
Skipped 1 change:
|
|
228
|
+
- add-verify-skill (user chose not to archive incomplete)
|
|
229
|
+
|
|
230
|
+
Spec sync summary:
|
|
231
|
+
- 4 delta specs synced to main specs
|
|
232
|
+
- 1 delta spec sync skipped (add-jwt, identity/user-auth: implementation not found)
|
|
233
|
+
- 1 conflict resolved (identity/user-auth: synced add-oauth, skipped add-jwt)
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
If any failures:
|
|
237
|
+
```text
|
|
238
|
+
Failed 1 change:
|
|
239
|
+
- some-change: Archive directory already exists
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Conflict Resolution Examples**
|
|
243
|
+
|
|
244
|
+
Example 1: Only one implemented
|
|
245
|
+
```text
|
|
246
|
+
Conflict: <planningHome.root>/openspec/specs/auth/spec.md touched by [add-oauth, add-jwt]
|
|
247
|
+
|
|
248
|
+
Checking add-oauth:
|
|
249
|
+
- Delta adds "OAuth Provider Integration" requirement
|
|
250
|
+
- Searching codebase... found src/auth/oauth.ts implementing OAuth flow
|
|
251
|
+
|
|
252
|
+
Checking add-jwt:
|
|
253
|
+
- Delta adds "JWT Token Handling" requirement
|
|
254
|
+
- Searching codebase... no JWT implementation found
|
|
255
|
+
|
|
256
|
+
Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Example 2: Both implemented
|
|
260
|
+
```text
|
|
261
|
+
Conflict: <planningHome.root>/openspec/specs/api/spec.md touched by [add-rest-api, add-graphql]
|
|
262
|
+
|
|
263
|
+
Checking add-rest-api (created 2026-01-10):
|
|
264
|
+
- Delta adds "REST Endpoints" requirement
|
|
265
|
+
- Searching codebase... found src/api/rest.ts
|
|
266
|
+
|
|
267
|
+
Checking add-graphql (created 2026-01-15):
|
|
268
|
+
- Delta adds "GraphQL Schema" requirement
|
|
269
|
+
- Searching codebase... found src/api/graphql.ts
|
|
270
|
+
|
|
271
|
+
Resolution: Both implemented. Will apply add-rest-api specs first,
|
|
272
|
+
then add-graphql specs (chronological order, newer takes precedence).
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Output On Success**
|
|
276
|
+
|
|
277
|
+
```markdown
|
|
278
|
+
## Bulk Archive Complete
|
|
279
|
+
|
|
280
|
+
Archived N changes:
|
|
281
|
+
- <change-1> -> archive/<target-name-1>/
|
|
282
|
+
- <change-2> -> archive/<target-name-2>/
|
|
283
|
+
|
|
284
|
+
Spec sync summary:
|
|
285
|
+
- N delta specs synced to main specs
|
|
286
|
+
- No conflicts (or: M conflicts resolved)
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Output On Partial Success**
|
|
290
|
+
|
|
291
|
+
```markdown
|
|
292
|
+
## Bulk Archive Complete (partial)
|
|
293
|
+
|
|
294
|
+
Archived N changes:
|
|
295
|
+
- <change-1> -> archive/<target-name-1>/
|
|
296
|
+
|
|
297
|
+
Skipped M changes:
|
|
298
|
+
- <change-2> (user chose not to archive incomplete)
|
|
299
|
+
|
|
300
|
+
Failed K changes:
|
|
301
|
+
- <change-3>: Archive directory already exists
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Output When No Changes**
|
|
305
|
+
|
|
306
|
+
```markdown
|
|
307
|
+
## No Changes to Archive
|
|
308
|
+
|
|
309
|
+
No active changes found. Create a new change to get started.
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**Guardrails**
|
|
313
|
+
- Allow any number of changes (1+ is fine, 2+ is the typical use case)
|
|
314
|
+
- Always prompt for selection, never auto-select
|
|
315
|
+
- Detect spec conflicts early and resolve by checking codebase
|
|
316
|
+
- When both changes are implemented, apply specs in chronological order
|
|
317
|
+
- Skip spec sync only when implementation is missing (warn user)
|
|
318
|
+
- Show clear per-change status before confirming
|
|
319
|
+
- Use single confirmation for entire batch
|
|
320
|
+
- Never archive after the user cancels the confirmation — a cancelled batch archives nothing
|
|
321
|
+
- Track and report all outcomes (success/skip/fail)
|
|
322
|
+
- 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)
|
|
324
|
+
- If archive target exists, fail that change but continue with others
|
|
325
|
+
- If sync is requested, run the `openspec-sync-specs` workflow inline (agent-driven) for each change with included delta specs
|
|
326
|
+
- Carry the per-delta `includedDeltas` and `excludedDeltas` decisions into execution; sync and verify only included deltas
|
|
327
|
+
- Report every excluded delta as `sync skipped` without treating the archive itself as skipped
|
|
328
|
+
- Never archive a change while a spec sync is still in flight — run the sync inline and verify main specs at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` before moving `changeRoot`
|
|
329
|
+
- Fetch archive inputs once per selected root before spec inspection or moves
|
|
330
|
+
- Fetch all required specs-rule snapshots before the batch's first main-spec write or move
|
|
331
|
+
- A failed archive-inputs lookup never blocks the batch; it proceeds with no context or guidance
|
|
332
|
+
- A failed specs instruction lookup stops the whole batch atomically
|
|
333
|
+
- Changes without concrete `artifactPaths.specs.existingOutputPaths` continue without spec sync
|
|
334
|
+
- Apply relevant runtime context across the batch and report conflicts
|
|
335
|
+
- Operation guidance remains advisory; consider every entry and explain rejected advice
|
|
336
|
+
- Keep runtime inputs, conflict analysis, CLI-derived values, and artifact rules separate
|
|
337
|
+
- Artifact rules constrain only written specs
|
|
338
|
+
- Never copy runtime input or artifact-rule text verbatim into output files
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
allowed-tools: Bash(openspec:*)
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Requires openspec CLI.
|
|
7
|
+
metadata:
|
|
8
|
+
author: openspec
|
|
9
|
+
version: "1.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Continue working on a change by creating the next artifact.
|
|
13
|
+
|
|
14
|
+
**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
|
+
**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
|
+
|
|
18
|
+
**Steps**
|
|
19
|
+
|
|
20
|
+
1. **Select the change**
|
|
21
|
+
|
|
22
|
+
If a name is provided, use it. Otherwise:
|
|
23
|
+
- Infer from conversation context if the user mentioned a change
|
|
24
|
+
- Auto-select if only one active change exists
|
|
25
|
+
- If ambiguous, run `openspec list --json` to get available changes sorted by most recently modified, and ask the user to select one
|
|
26
|
+
|
|
27
|
+
When prompting, present the top 3-4 most recently modified changes as options, showing:
|
|
28
|
+
- Change name
|
|
29
|
+
- Schema (from `schema` field if present, otherwise "spec-driven")
|
|
30
|
+
- Status (e.g., "0/5 tasks", "complete", "no tasks")
|
|
31
|
+
- How recently it was modified (from `lastModified` field)
|
|
32
|
+
|
|
33
|
+
Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.
|
|
34
|
+
|
|
35
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-continue-change <other>`).
|
|
36
|
+
|
|
37
|
+
2. **Check current status**
|
|
38
|
+
```bash
|
|
39
|
+
openspec status --change "<name>" --json
|
|
40
|
+
```
|
|
41
|
+
Parse the JSON to understand current state. The response includes:
|
|
42
|
+
- `schemaName`: The workflow schema being used (e.g., "spec-driven")
|
|
43
|
+
- `artifacts`: Array of artifacts with their status ("done", "skipped", "ready", "blocked")
|
|
44
|
+
- `isPlanningComplete`: Boolean indicating if all planning artifacts are complete. Older CLI versions expose the same value as `isComplete`.
|
|
45
|
+
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
|
|
46
|
+
|
|
47
|
+
3. **Act based on status**:
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
**If all planning artifacts are complete (`isPlanningComplete: true`, or legacy `isComplete: true`)**:
|
|
52
|
+
- Congratulate the user
|
|
53
|
+
- Show final status including the schema used
|
|
54
|
+
- Suggest: "Planning is complete! You can now implement this change. Once implementation and any tracked work are complete, archive it."
|
|
55
|
+
- STOP
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
**If artifacts are ready to create** (status shows artifacts with `status: "ready"`):
|
|
60
|
+
- Pick the FIRST artifact with `status: "ready"` from the status output
|
|
61
|
+
- Get its instructions:
|
|
62
|
+
```bash
|
|
63
|
+
openspec instructions <artifact-id> --change "<name>" --json
|
|
64
|
+
```
|
|
65
|
+
- Parse the JSON. The key fields are:
|
|
66
|
+
- `context`: Project background (constraints for you - do NOT include in output)
|
|
67
|
+
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
68
|
+
- `template`: The structure to use for your output file
|
|
69
|
+
- `instruction`: Schema-specific guidance
|
|
70
|
+
- `resolvedOutputPath`: Resolved path or pattern to write the artifact
|
|
71
|
+
- `dependencies`: Completed artifacts to read for context (entries with `skipped: true` have no files - do not look for them)
|
|
72
|
+
- `skipped`/`warning`: present when the change declares skip_specs and this artifact must NOT be created - pick another artifact
|
|
73
|
+
- **Create the artifact file**:
|
|
74
|
+
- Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
|
|
75
|
+
- If the `instruction` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at `resolvedOutputPath`
|
|
76
|
+
- Otherwise use `template` as the structure - fill in its sections
|
|
77
|
+
- Apply `context` and `rules` as constraints when writing - but do NOT copy them into the file
|
|
78
|
+
- Write to the `resolvedOutputPath` specified in instructions. If it is a glob pattern, choose the concrete file path using the schema instruction and the change's context
|
|
79
|
+
- Show what was created and what's now unlocked
|
|
80
|
+
- STOP after creating ONE artifact
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
**If no artifacts are ready (all blocked)**:
|
|
85
|
+
- This shouldn't happen with a valid schema
|
|
86
|
+
- Show status and suggest checking for issues
|
|
87
|
+
|
|
88
|
+
4. **After creating an artifact, show progress**
|
|
89
|
+
```bash
|
|
90
|
+
openspec status --change "<name>"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Output**
|
|
94
|
+
|
|
95
|
+
After each invocation, show:
|
|
96
|
+
- Which artifact was created
|
|
97
|
+
- Schema workflow being used
|
|
98
|
+
- Current progress (N/M complete)
|
|
99
|
+
- What artifacts are now unlocked
|
|
100
|
+
- Prompt: "Want to continue? Just ask me to continue or tell me what to do next."
|
|
101
|
+
|
|
102
|
+
**Artifact Creation Guidelines**
|
|
103
|
+
|
|
104
|
+
The artifact types and their purpose depend on the schema. The `instruction` field from the instructions output is the authoritative guidance for each artifact - follow it even when the artifact has a familiar name (proposal.md, tasks.md, etc.), since custom schemas may define different content or a different process for the same file names.
|
|
105
|
+
|
|
106
|
+
If the `instruction` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly.
|
|
107
|
+
|
|
108
|
+
**Guardrails**
|
|
109
|
+
- Create ONE artifact per invocation
|
|
110
|
+
- Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
|
|
111
|
+
- Never skip artifacts or create out of order
|
|
112
|
+
- If context is unclear, ask the user before creating
|
|
113
|
+
- Verify the artifact file exists after writing before marking progress
|
|
114
|
+
- Use the schema's artifact sequence, don't assume specific artifact names
|
|
115
|
+
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
|
|
116
|
+
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
|
|
117
|
+
- These guide what you write, but should never appear in the output
|