@jspg-ai/coding-bb 0.0.3-beta.9 → 0.0.5-beta.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.
Files changed (109) hide show
  1. package/README.md +1 -0
  2. package/cbb/dev-standards/rules/cbb-ai-behavior.md +0 -15
  3. package/cbb/dev-standards/rules/cbb-workspace-discipline.md +38 -0
  4. package/cbb/lib/external/index.js +228 -0
  5. package/cbb/lib/install/agents-nav.js +92 -0
  6. package/cbb/lib/install/claude-code.js +8 -1
  7. package/cbb/lib/install/command-skill.js +105 -0
  8. package/cbb/lib/install/init.js +399 -129
  9. package/cbb/lib/install/minimax.js +60 -0
  10. package/cbb/lib/install/rule-rewrite.js +1 -1
  11. package/cbb/lib/install/setup-decision.js +92 -0
  12. package/cbb/lib/install/tool-selection.js +23 -0
  13. package/cbb/lib/install/trae.js +18 -8
  14. package/cbb/lib/install/workbuddy.js +36 -0
  15. package/cbb/lib/install/workspaces.js +15 -61
  16. package/cbb/lib/utils/check-update.js +13 -5
  17. package/cbb/lib/utils/githook.js +230 -0
  18. package/cbb/lib/utils/gitignore.js +17 -4
  19. package/cbb/lib/utils/plugin-hook.js +92 -0
  20. package/cbb/worktrees/_shared/scripts/check-local-state.js +114 -0
  21. package/cbb/worktrees/_shared/scripts/check-unarchived.js +77 -0
  22. package/cbb/worktrees/_shared/scripts/delete-branches.js +147 -0
  23. package/cbb/worktrees/_shared/scripts/deprecate-branches.js +119 -0
  24. package/cbb/worktrees/_shared/scripts/find-target-worktree.js +148 -96
  25. package/cbb/worktrees/_shared/scripts/find-workspace-root.js +8 -8
  26. package/cbb/worktrees/_shared/scripts/install-git-hook.js +70 -0
  27. package/cbb/worktrees/_shared/scripts/junction-ai-config.js +192 -0
  28. package/cbb/worktrees/_shared/scripts/merge-branches.js +580 -0
  29. package/cbb/worktrees/_shared/scripts/push-core.js +1 -1
  30. package/cbb/worktrees/_shared/scripts/silence-popup.js +1 -1
  31. package/cbb/worktrees/_shared/scripts/start-local.js +180 -0
  32. package/cbb/worktrees/skills/cbb-local-mode/SKILL.md +194 -0
  33. package/cbb/worktrees/skills/cbb-local-mode/scripts/check-local-state.js +114 -0
  34. package/cbb/worktrees/skills/cbb-local-mode/scripts/delete-branches.js +147 -0
  35. package/cbb/worktrees/skills/cbb-local-mode/scripts/deprecate-branches.js +119 -0
  36. package/cbb/worktrees/skills/cbb-local-mode/scripts/install-git-hook.js +70 -0
  37. package/cbb/worktrees/skills/cbb-local-mode/scripts/merge-branches.js +580 -0
  38. package/cbb/worktrees/skills/cbb-local-mode/scripts/silence-popup.js +23 -0
  39. package/cbb/worktrees/skills/cbb-local-mode/scripts/start-local.js +180 -0
  40. package/cbb/worktrees/skills/cbb-worktree-close/SKILL.md +134 -81
  41. package/cbb/worktrees/skills/cbb-worktree-close/scripts/check-env.js +3 -3
  42. package/cbb/worktrees/skills/cbb-worktree-close/scripts/check-unarchived.js +77 -48
  43. package/cbb/worktrees/skills/cbb-worktree-close/scripts/delete-branches.js +147 -136
  44. package/cbb/worktrees/skills/cbb-worktree-close/scripts/deprecate-branches.js +119 -0
  45. package/cbb/worktrees/skills/cbb-worktree-close/scripts/discover-apps.js +14 -5
  46. package/cbb/worktrees/skills/cbb-worktree-close/scripts/find-target-worktree.js +148 -96
  47. package/cbb/worktrees/skills/cbb-worktree-close/scripts/find-workspace-root.js +8 -8
  48. package/cbb/worktrees/skills/cbb-worktree-close/scripts/junction-ai-config.js +192 -0
  49. package/cbb/worktrees/skills/cbb-worktree-close/scripts/merge-branches.js +580 -0
  50. package/cbb/worktrees/skills/cbb-worktree-close/scripts/remove-worktrees.js +44 -9
  51. package/cbb/worktrees/skills/cbb-worktree-close/scripts/safety-check.js +15 -4
  52. package/cbb/worktrees/skills/cbb-worktree-close/scripts/silence-popup.js +1 -1
  53. package/cbb/worktrees/skills/cbb-worktree-init/SKILL.md +131 -120
  54. package/cbb/worktrees/skills/cbb-worktree-init/scripts/check-env.js +1 -1
  55. package/cbb/worktrees/skills/cbb-worktree-init/scripts/check-repos.js +2 -2
  56. package/cbb/worktrees/skills/cbb-worktree-init/scripts/create-branches.js +33 -8
  57. package/cbb/worktrees/skills/cbb-worktree-init/scripts/create-worktrees.js +60 -46
  58. package/cbb/worktrees/skills/cbb-worktree-init/scripts/install-git-hook.js +70 -0
  59. package/cbb/worktrees/skills/cbb-worktree-init/scripts/junction-ai-config.js +192 -0
  60. package/cbb/worktrees/skills/cbb-worktree-init/scripts/parse-config.js +7 -7
  61. package/cbb/worktrees/skills/cbb-worktree-init/scripts/push-branches.js +3 -3
  62. package/cbb/worktrees/skills/cbb-worktree-init/scripts/push-core.js +1 -1
  63. package/cbb/worktrees/skills/cbb-worktree-init/scripts/silence-popup.js +1 -1
  64. package/cbb/worktrees/skills/cbb-worktree-init/scripts/sync-repos.js +11 -7
  65. package/cbb/worktrees/skills/cbb-worktree-init/scripts/update-gitignore.js +17 -5
  66. package/cbb/worktrees/skills/cbb-worktree-push/SKILL.md +213 -56
  67. package/cbb/worktrees/skills/cbb-worktree-push/scripts/check-unarchived.js +77 -0
  68. package/cbb/worktrees/skills/cbb-worktree-push/scripts/commit-worktrees.js +70 -12
  69. package/cbb/worktrees/skills/cbb-worktree-push/scripts/find-target-worktree.js +148 -96
  70. package/cbb/worktrees/skills/cbb-worktree-push/scripts/find-workspace-root.js +8 -8
  71. package/cbb/worktrees/skills/cbb-worktree-push/scripts/make-mr-urls.js +211 -0
  72. package/cbb/worktrees/skills/cbb-worktree-push/scripts/merge-branches.js +580 -0
  73. package/cbb/worktrees/skills/cbb-worktree-push/scripts/push-core.js +1 -1
  74. package/cbb/worktrees/skills/cbb-worktree-push/scripts/push-worktrees.js +67 -20
  75. package/cbb/worktrees/skills/cbb-worktree-push/scripts/silence-popup.js +1 -1
  76. package/config/{workspace-config.sample.json → CBB-WORKSPACE.sample.json} +1 -1
  77. package/config/openspec/schemas/spec-driven/schema.yaml +20 -0
  78. package/config/upstream-mirrors.json +5 -0
  79. package/external/frontend-design/.version +6 -0
  80. package/external/frontend-design/LICENSE.txt +177 -0
  81. package/external/frontend-design/SKILL.md +71 -0
  82. package/openspec/.version +2 -2
  83. package/openspec/commands/archive.md +15 -8
  84. package/openspec/commands/bulk-archive.md +13 -6
  85. package/openspec/commands/continue.md +0 -1
  86. package/openspec/commands/explore.md +1 -1
  87. package/openspec/commands/ff.md +1 -1
  88. package/openspec/commands/onboard.md +9 -4
  89. package/openspec/commands/update.md +11 -5
  90. package/openspec/commands/verify.md +57 -26
  91. package/openspec/skills/openspec-apply-change/SKILL.md +1 -1
  92. package/openspec/skills/openspec-archive-change/SKILL.md +16 -9
  93. package/openspec/skills/openspec-bulk-archive-change/SKILL.md +14 -7
  94. package/openspec/skills/openspec-continue-change/SKILL.md +1 -2
  95. package/openspec/skills/openspec-explore/SKILL.md +2 -2
  96. package/openspec/skills/openspec-ff-change/SKILL.md +2 -2
  97. package/openspec/skills/openspec-new-change/SKILL.md +1 -1
  98. package/openspec/skills/openspec-onboard/SKILL.md +10 -5
  99. package/openspec/skills/openspec-propose/SKILL.md +1 -1
  100. package/openspec/skills/openspec-sync-specs/SKILL.md +1 -1
  101. package/openspec/skills/openspec-update-change/SKILL.md +12 -6
  102. package/openspec/skills/openspec-verify-change/SKILL.md +59 -27
  103. package/package.json +3 -2
  104. package/superpowers/.version +3 -3
  105. package/superpowers/skills/writing-plans/SKILL.md +32 -20
  106. package/cbb/lib/install/codebuddy.js +0 -30
  107. package/cbb/worktrees/skills/cbb-worktree-init/scripts/find-workspace-root.js +0 -67
  108. package/config/workspace-agents.sample.md +0 -41
  109. package/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
@@ -34,7 +34,6 @@ This workflow revises artifacts that already exist; `/opsx:continue` is what cre
34
34
 
35
35
  When prompting, present the top 3-4 most recently modified changes as options, showing:
36
36
  - Change name
37
- - Schema (from `schema` field if present, otherwise "spec-driven")
38
37
  - Status (e.g., "0/5 tasks", "complete", "no tasks")
39
38
  - How recently it was modified (from `lastModified` field)
40
39
 
@@ -64,7 +63,13 @@ This workflow revises artifacts that already exist; `/opsx:continue` is what cre
64
63
  - Read the artifact(s) the request touches and the change's other existing artifacts.
65
64
  - Draft the requested edit in the conversation, not in files. Work out exactly what it changes; step 5 owns every write. Then check every other existing artifact against the drafted edit - in ANY direction: an edit to a later artifact may require revising an earlier one, not only the other way around. Build order is a useful reading order, not a constraint on which artifacts may be revised.
66
65
  - Note everything that is now inconsistent, missing, or contradictory.
67
- - Propose revisions only to files that already exist (`existingOutputPaths`). Do NOT create artifacts that don't exist yet, and do NOT invent new files under a glob artifact - note them and point the user to `/opsx:continue` to create them.
66
+ - Propose revisions to files that already exist (`existingOutputPaths`). If an artifact has no existing output files and status `ready` or `blocked`, note it and point the user to `/opsx:continue` to create them. Leave `skipped` artifacts untouched; do not treat them as missing or defer them to the continue workflow.
67
+ - A glob artifact (e.g. `specs/**/*.md`) is marked `done` after at least one file matches, and the continue workflow only handles `ready` artifacts. When reconciliation identifies a missing file for a glob artifact whose `existingOutputPaths` is non-empty:
68
+ 1. Run `openspec instructions "<artifact-id>" --change "<name>" --json` and use its `instruction` and `template`. Treat `context` and `rules` as constraints; do not copy them into the file. If instructions report `skipped: true`, do not create the file. Read current dependency files from disk; if a required non-skipped dependency is missing, stop and ask the user to restore it first.
69
+ 2. Choose a concrete path inside `changeRoot` that matches `artifactPaths.<id>.outputPath` and does not already exist. Verify it remains inside `changeRoot` after resolving any symlinked parent directories. The glob `resolvedOutputPath` is not a valid target.
70
+ 3. Include the new file in step 5's proposed revisions and create it only after the user confirms.
71
+ 4. After confirmation, immediately before creation, refresh status and instructions. Verify the artifact is still in scope, not skipped, and partially populated; repeat the concrete-path checks above.
72
+ 5. Use a create operation that fails if the target already exists. If `instruction` delegates creation to another skill or command, invoke it only if it can honor the confirmed path and these guardrails; otherwise stop. If any check fails or the confirmed draft is no longer valid, stop and reconcile with the user rather than replacing existing content or choosing a different path.
68
73
  - If the change is already coherent, say so and propose no revisions.
69
74
 
70
75
  5. **Confirm and apply, one artifact at a time**
@@ -77,7 +82,7 @@ This workflow revises artifacts that already exist; `/opsx:continue` is what cre
77
82
  ```
78
83
 
79
84
  6. **Point to the next step (guidance only - NEVER act on it)**
80
- - Artifacts still missing -> suggest `/opsx:continue` to create them.
85
+ - Artifacts with empty `existingOutputPaths` and status `ready` or `blocked` -> suggest `/opsx:continue` to create them.
81
86
  - Change already implemented (tasks checked off / already applied) -> the code may no longer match the revised plan; suggest `/opsx:apply` to carry the delta into code.
82
87
  - Everything done and implemented -> suggest `/opsx:archive`.
83
88
 
@@ -85,13 +90,14 @@ This workflow revises artifacts that already exist; `/opsx:continue` is what cre
85
90
 
86
91
  After each invocation, show:
87
92
  - Which artifacts were revised (and which proposed revisions were rejected)
88
- - Anything deferred to `/opsx:continue` (not-yet-created artifacts or files)
93
+ - Any file created under a glob artifact that was already partially populated
94
+ - Anything deferred to `/opsx:continue` (artifacts with no files yet and status `ready` or `blocked`, never `skipped` artifacts)
89
95
  - Where the change stands and the recommended next command
90
96
 
91
97
  **Guardrails**
92
98
  - Planning artifacts only - NEVER edit implementation code. If the revised plan implies code changes, stop and point to `/opsx:apply`.
93
99
  - Use the artifact ids and paths reported by `openspec status`; never branch on hardcoded artifact names.
94
100
  - Edit only the concrete files in `existingOutputPaths`; never write to a glob `resolvedOutputPath`.
95
- - Do not advance the build frontier: no new artifacts, no new files under glob artifacts - that is `/opsx:continue`'s job.
101
+ - Do not advance the build frontier: if an artifact has empty `existingOutputPaths` and status `ready` or `blocked`, that is `/opsx:continue`'s job. Leave `skipped` artifacts untouched. The only new-file scope is a confirmed concrete path under a glob artifact whose `existingOutputPaths` is non-empty.
96
102
  - Confirm every edit with the user before writing.
97
103
  - If the request changes the change's *intent* rather than refining it, recommend starting fresh with `/opsx:new` (the "Update vs. Start Fresh" heuristic).
@@ -30,7 +30,7 @@ In both branches, never create the root as a side effect: do not run `openspec i
30
30
  - Auto-select if only one active change exists
31
31
  - If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
32
32
 
33
- When prompting, show changes that have implementation tasks (tasks artifact exists).
33
+ When prompting, show all active changes returned by the list, including changes with `status: "no-tasks"`.
34
34
  Include the schema used for each change if available.
35
35
  Mark changes with incomplete tasks as "(In Progress)".
36
36
 
@@ -51,7 +51,9 @@ In both branches, never create the root as a side effect: do not run `openspec i
51
51
  openspec instructions apply --change "<name>" --json
52
52
  ```
53
53
 
54
- This returns the change directory and `contextFiles` (artifact ID -> array of concrete file paths). Read all available artifacts from `contextFiles`.
54
+ This returns the change directory, `contextFiles` (artifact ID -> array of concrete file paths), `taskTrackingConfigured`, and top-level `tasks` and `progress` aggregated from every concrete file matched by the schema's `apply.tracks` configuration that could be read. Read all available artifacts from `contextFiles`.
55
+
56
+ Treat apply `state` and `instruction` as context, not a verification verdict. Do not implement tasks or archive the change during verification.
55
57
 
56
58
  4. **Initialize verification report structure**
57
59
 
@@ -62,32 +64,58 @@ In both branches, never create the root as a side effect: do not run `openspec i
62
64
 
63
65
  Each dimension can have CRITICAL, WARNING, or SUGGESTION issues.
64
66
 
67
+ Verification is advisory. Respect intentional omissions such as `skip_specs: true`, optional design documents, and schemas without task tracking. Do not require or invent optional or intentionally omitted artifacts to obtain a clean report. `Not verified` describes a limit of this report, not a new archive prerequisite. Archive retains its own checks and user-confirmation behavior.
68
+ Mark checks the schema does not define, or artifacts the status reports as intentionally skipped, as **Not applicable**. The correctness checks of a change whose readable delta specs contain REMOVED or RENAMED requirements but no ADDED or MODIFIED requirements are also **Not applicable** (see step 6). Exclude them from skipped-check counts and the archive-readiness assessment. Reserve **Not verified** for applicable checks whose evidence is missing or unusable.
69
+
70
+ If only task evidence is available for applicable checks, verify task completion only and mark the remaining applicable checks, including **Code Pattern Consistency**, as not verified with the reason "Only task evidence available".
71
+
72
+ If artifacts cannot be read or contain no usable requirements, scenarios, or design decisions, mark the affected checks as not verified with the specific reason. Continue checks supported by the remaining evidence, but a partially checked input set is not a fully verified check. Missing requirements affect Spec Coverage and Requirement Implementation Mapping; missing scenarios affect Scenario Coverage; missing design decisions affect Design Adherence.
73
+
65
74
  5. **Verify Completeness**
66
75
 
67
76
  **Task Completion**:
68
- - If `contextFiles.tasks` exists, read every file path in it
69
- - Parse checkboxes: complete means the box holds only `x`/`X`, ignoring
70
- spacing (`- [ x]` is complete); every other marker is incomplete
71
- (`- [ ]`, `- []`, and unfamiliar ones such as `- [~]` or `- [-]`)
72
- - Count complete vs total tasks
73
- - If incomplete tasks exist:
74
- - Add CRITICAL issue for each incomplete task
77
+ - If `taskTrackingConfigured` is false, report **Task Completion** as not applicable. Do not treat empty `tasks` as missing evidence.
78
+ - Otherwise, use the top-level `tasks` and `progress` fields. They already aggregate every readable concrete file matched by `apply.tracks`, regardless of the tracked artifact's ID; do not infer tracking from a `contextFiles` key.
79
+ - If `unavailableTrackingFiles` is nonempty, mark **Task Completion** as not verified and include every unavailable path and reason. Continue using any readable task evidence, but do not infer completion from the partial `tasks` and `progress` fields.
80
+ - If `taskTrackingConfigured` is true and `tasks` is empty, mark **Task Completion** as not verified and record the reason from apply `state` and `instruction`. Nonzero totals alone do not establish evaluable task descriptions.
81
+ - Report complete vs total tasks from `progress`.
82
+ - If `progress.remaining` is greater than 0:
83
+ - Add CRITICAL issue for each listed incomplete task. If the remaining count exceeds the listed incomplete tasks, also report the incomplete checkboxes without descriptions and recommend adding descriptions and completing them. Do not infer completion from the listed tasks alone.
75
84
  - Recommendation: "Complete task: <description>" or "Mark as done if already implemented"
76
85
 
77
86
  **Spec Coverage**:
87
+ - If status marks the spec artifact skipped by `skip_specs: true`, or the schema defines no spec artifact, report the spec-dependent checks as not applicable.
88
+ - Otherwise, `contextFiles` is keyed by artifact id, and artifact ids come from the active schema. If `contextFiles.specs` is absent or empty, mark **Spec Coverage**, **Requirement Implementation Mapping**, and **Scenario Coverage** as not verified; do not treat any of them as clean.
78
89
  - If delta specs exist in `contextFiles.specs`:
79
- - Extract all requirements (marked with "### Requirement:")
80
- - For each requirement:
90
+ - Extract all requirements (marked with "### Requirement:", or listed as `FROM:`/`TO:` pairs under `## RENAMED Requirements`) and note the delta section each one sits under: `## ADDED`, `## MODIFIED`, `## REMOVED`, or `## RENAMED Requirements`. The section decides what the check looks for.
91
+ - For each ADDED or MODIFIED requirement (for MODIFIED, check the text in the delta, not the old wording):
81
92
  - Search codebase for keywords related to the requirement
82
93
  - Assess if implementation likely exists
83
- - If requirements appear unimplemented:
94
+ - If ADDED or MODIFIED requirements appear unimplemented:
84
95
  - Add CRITICAL issue: "Requirement not found: <requirement name>"
85
96
  - Recommendation: "Implement requirement X: <description>"
97
+ - For each REMOVED requirement, the change asks for the behavior to be gone, so invert the check:
98
+ - Search codebase for the removed behavior. Matches in `openspec/` artifacts or docs, or in code that serves only the Migration note or an ADDED requirement, are not evidence by themselves. Report any code path that still delivers the removed behavior, including one shared with an ADDED requirement.
99
+ - Finding no implementation is the expected result. Never report a REMOVED requirement as "Requirement not found" or recommend implementing it.
100
+ - If the behavior is still present:
101
+ - Add CRITICAL issue: "Removed requirement still implemented: <requirement name>"
102
+ - Recommendation: "Remove the remaining implementation at <file>:<lines>, following the requirement's Migration note if it has one"
103
+ - For each RENAMED entry (`FROM:`/`TO:`), the name changes but the behavior stays, so check the TO requirement for that unchanged behavior:
104
+ - Do not report the FROM name as missing, and do not require code symbols, identifiers, or file names to be renamed.
105
+ - If the TO name also appears under MODIFIED, its behavior is checked there against the MODIFIED text; skip it here.
106
+ - Otherwise, read the baseline requirement in the main spec at `<planningHome.root>/openspec/specs/<capability-path>/spec.md`, using the same capability path as the delta spec: the requirement under the FROM name, or under the TO name only when the FROM name is absent because the main spec is already synced. Its body and scenarios are the evidence for the behavior the TO requirement keeps.
107
+ - Search codebase for that behavior and assess if it is still implemented.
108
+ - If it appears unimplemented:
109
+ - Add CRITICAL issue: "Renamed requirement not found: <TO name>"
110
+ - Recommendation: "Restore the behavior of <TO name> (renamed from <FROM name>); a rename must not change behavior"
111
+ - If the baseline requirement cannot be found or read, mark **Spec Coverage** as not verified for that entry with the reason. Never count an unchecked rename as passing.
86
112
 
87
113
  6. **Verify Correctness**
88
114
 
115
+ If the delta specs are readable and contain at least one REMOVED or RENAMED requirement but no ADDED or MODIFIED requirements (the change only removes or renames requirements), report **Requirement Implementation Mapping** and **Scenario Coverage** as **Not applicable**. The REMOVED and RENAMED checks under Spec Coverage are the evidence for such a change (each RENAMED entry is checked there against its baseline behavior), so do not mark these two checks as not verified. A delta spec with no parseable requirements at all is unusable evidence, not a removal-only change: mark these checks as not verified.
116
+
89
117
  **Requirement Implementation Mapping**:
90
- - For each requirement from delta specs:
118
+ - For each ADDED or MODIFIED requirement from delta specs (REMOVED entries, and RENAMED entries without a MODIFIED block, were settled under Spec Coverage):
91
119
  - Search codebase for implementation evidence
92
120
  - If found, note file paths and line ranges
93
121
  - Assess if implementation matches requirement intent
@@ -96,26 +124,29 @@ In both branches, never create the root as a side effect: do not run `openspec i
96
124
  - Recommendation: "Review <file>:<lines> against requirement X"
97
125
 
98
126
  **Scenario Coverage**:
99
- - For each scenario in delta specs (marked with "#### Scenario:"):
127
+ - For each scenario under an ADDED or MODIFIED requirement in delta specs (marked with "#### Scenario:"):
100
128
  - Check if conditions are handled in code
101
129
  - Check if tests exist covering the scenario
102
130
  - If scenario appears uncovered:
103
131
  - Add WARNING: "Scenario not covered: <scenario name>"
104
132
  - Recommendation: "Add test or implementation for scenario: <description>"
133
+ - Skip scenarios under a REMOVED requirement; that behavior is meant to be gone.
105
134
 
106
135
  7. **Verify Coherence**
107
136
 
108
137
  **Design Adherence**:
138
+ - If the schema defines no design artifact, report **Design Adherence** as not applicable.
109
139
  - If `contextFiles.design` exists:
110
140
  - Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:")
111
141
  - Verify implementation follows those decisions
112
142
  - If contradiction detected:
113
143
  - Add WARNING: "Design decision not followed: <decision>"
114
144
  - Recommendation: "Update implementation or revise design.md to match reality"
115
- - If no design.md: Skip design adherence check, note "No design.md to verify against"
145
+ - Otherwise, if `contextFiles.design` is absent or empty: mark **Design Adherence** as not verified. With other supporting artifacts, **Code Pattern Consistency** still runs; the task-only case remains limited to task completion.
116
146
 
117
147
  **Code Pattern Consistency**:
118
- - Review new code for consistency with project patterns
148
+ - If implementation changes cannot be identified, mark **Code Pattern Consistency** as not verified and explain the missing evidence.
149
+ - Otherwise, review new code for consistency with project patterns
119
150
  - Check file naming, directory structure, coding style
120
151
  - If significant deviations found:
121
152
  - Add SUGGESTION: "Code pattern deviation: <details>"
@@ -135,11 +166,15 @@ In both branches, never create the root as a side effect: do not run `openspec i
135
166
  | Coherence | Followed/Issues |
136
167
  ```
137
168
 
169
+ In each Status cell, report the results of checks that ran and `Not verified (<reason>)` for every skipped check. If all checks in a dimension were skipped, start the cell with `Not verified`. Never score a skipped check as passing. Treat every not verified or partially verified check as skipped in the final assessment. Count only ADDED and MODIFIED requirements in N, and report REMOVED and RENAMED requirements separately (for example, "1 removal confirmed, 1 rename verified"). For a change that only removes or renames requirements, the Correctness cell reads `Not applicable (no ADDED or MODIFIED requirements)`.
170
+
138
171
  **Issues by Priority**:
139
172
 
140
173
  1. **CRITICAL** (Must fix before archive):
141
174
  - Incomplete tasks
142
175
  - Missing requirement implementations
176
+ - Removed requirements still implemented
177
+ - Renamed requirements whose behavior is no longer implemented
143
178
  - Each with specific, actionable recommendation
144
179
 
145
180
  2. **WARNING** (Should fix):
@@ -153,9 +188,12 @@ In both branches, never create the root as a side effect: do not run `openspec i
153
188
  - Each with specific recommendation
154
189
 
155
190
  **Final Assessment**:
156
- - If CRITICAL issues: "X critical issue(s) found. Fix before archiving."
157
- - If only warnings: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
158
- - If all clear: "All checks passed. Ready for archive."
191
+ - If CRITICAL issues: "X critical issue(s) found. Fix before archiving." If any check was skipped, also name every skipped check and its reason.
192
+ - If no CRITICAL issues, one or more warnings, and no checks were skipped: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
193
+ - If only suggestions and no checks were skipped: "No critical issues or warnings. Z suggestion(s) to consider. Ready for archive (with noted improvements)."
194
+ - If no issues and no checks were skipped: "All checks passed. Ready for archive."
195
+ - If any check was skipped and there are no CRITICAL issues: do not claim readiness. Say "No critical issues found in the checks that ran. <check(s)> not verified: <reason>." Include the warning count when nonzero.
196
+ - Include the suggestion count when nonzero in every final assessment.
159
197
 
160
198
  **Verification Heuristics**
161
199
 
@@ -165,13 +203,6 @@ In both branches, never create the root as a side effect: do not run `openspec i
165
203
  - **False Positives**: When uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL
166
204
  - **Actionability**: Every issue must have a specific recommendation with file/line references where applicable
167
205
 
168
- **Graceful Degradation**
169
-
170
- - If only tasks.md exists: verify task completion only, skip spec/design checks
171
- - If tasks + specs exist: verify completeness and correctness, skip design
172
- - If full artifacts: verify all three dimensions
173
- - Always note which checks were skipped and why
174
-
175
206
  **Output Format**
176
207
 
177
208
  Use clear markdown with:
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Implement tasks from an OpenSpec change.
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Archive a completed change in the experimental workflow.
@@ -86,20 +86,27 @@ In both branches, never create the root as a side effect: do not run `openspec i
86
86
 
87
87
  3. **Check task completion status**
88
88
 
89
- Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
90
-
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.
89
+ Run `openspec list --json` with the same selected-root flags and find the
90
+ entry in `changes` whose `name` exactly matches the selected change.
91
+ Require exactly one match and nonnegative integer `totalTasks` and
92
+ `completedTasks`, with `completedTasks <= totalTasks`. The CLI resolves
93
+ the schema's tracked task files, including custom artifact names, output
94
+ paths, and globs.
95
+ Incomplete tasks = `totalTasks - completedTasks`.
96
+
97
+ Do not infer task completion from artifact status or the absence of a
98
+ top-level `tasks.md`. If the lookup fails, returns invalid JSON, omits or
99
+ duplicates the selected change, or returns invalid counts, report the problem
100
+ and stop before syncing or archiving.
101
+ The CLI counts only `x`/`X` checkbox markers as complete;
102
+ other markers, including unfamiliar ones, remain incomplete.
96
103
 
97
104
  **If incomplete tasks found:**
98
105
  - Display warning showing count of incomplete tasks
99
106
  - Ask the user to confirm they want to proceed
100
107
  - Proceed if user confirms
101
108
 
102
- **If no tasks file exists:** Proceed without task-related warning.
109
+ **If `totalTasks` is zero:** Proceed without a task-related warning.
103
110
 
104
111
  4. **Assess delta spec sync state**
105
112
 
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Archive multiple completed changes in a single operation.
@@ -42,7 +42,7 @@ In both branches, never create the root as a side effect: do not run `openspec i
42
42
  2. **Prompt for change selection**
43
43
 
44
44
  Ask the user to choose changes (multi-select):
45
- - Show each change with its schema
45
+ - Show each change name and task status from the list output
46
46
  - Include an option for "All changes"
47
47
  - Allow any number of selections (1+ works, 2+ is the typical use case)
48
48
 
@@ -75,17 +75,24 @@ In both branches, never create the root as a side effect: do not run `openspec i
75
75
 
76
76
  3. **Batch validation - gather status for all selected changes**
77
77
 
78
+ Run `openspec list --json` once with the same selected-root flags for task
79
+ progress. If the lookup fails, returns invalid JSON, or omits any selected
80
+ change, contains a duplicate selected change, or returns invalid counts,
81
+ report the problem and stop before syncing or archiving the batch.
82
+
78
83
  For each selected change, collect:
79
84
 
80
85
  a. **Artifact status** - Run `openspec status --change "<name>" --json`
81
86
  - Parse `schemaName`, `artifacts`, `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`
82
87
  - Note which artifacts are `done` vs other states
83
88
 
84
- b. **Task completion** - Read `artifactPaths.tasks.existingOutputPaths` from status JSON
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 `- [-]`)
88
- - If no tasks file exists, note as "No tasks"
89
+ b. **Task completion** - Find the `changes` entry from the list response whose `name` exactly matches this change
90
+ - Require nonnegative integer `totalTasks` and `completedTasks`, with `completedTasks <= totalTasks`
91
+ - Incomplete tasks = `totalTasks - completedTasks`
92
+ - The CLI resolves the schema's tracked task files, including custom artifact names, output paths, and globs
93
+ - Do not infer task completion from artifact status, an artifact id of `tasks`, or the absence of a top-level `tasks.md`
94
+ - The CLI counts only `x`/`X` checkbox markers as complete; other markers remain incomplete
95
+ - If `totalTasks` is zero, note as "No tasks"
89
96
 
90
97
  c. **Delta specs** - Check `artifactPaths.specs.existingOutputPaths` from status JSON
91
98
  - List which capability specs exist
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Continue working on a change by creating the next artifact.
@@ -38,7 +38,6 @@ In both branches, never create the root as a side effect: do not run `openspec i
38
38
 
39
39
  When prompting, present the top 3-4 most recently modified changes as options, showing:
40
40
  - Change name
41
- - Schema (from `schema` field if present, otherwise "spec-driven")
42
41
  - Status (e.g., "0/5 tasks", "complete", "no tasks")
43
42
  - How recently it was modified (from `lastModified` field)
44
43
 
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
@@ -129,7 +129,7 @@ openspec list --json
129
129
 
130
130
  This tells you:
131
131
  - If there are active changes
132
- - Their names, schemas, and status
132
+ - Their names and task status
133
133
  - What the user might be working on
134
134
 
135
135
  That is the *change* list - work in flight. It does not include the project's durable capabilities, so list those too:
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Fast-forward through artifact creation - generate everything needed to start implementation in one go.
@@ -92,7 +92,7 @@ In both branches, never create the root as a side effect: do not run `openspec i
92
92
  - Dependencies are enablers, not gates: if a required artifact is still `blocked` only because you skipped a conditional dependency, write it anyway
93
93
  - Stop when every artifact in the required set is `done`, `skipped`, or was deliberately skipped
94
94
 
95
- c. **If an artifact requires user input** (unclear context):
95
+ c. **If an artifact requires user input** (critically unclear context):
96
96
  - Ask the user to clarify
97
97
  - Then continue with creation
98
98
 
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Start a new change using the experimental artifact-driven approach.
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Guide the user through their first complete OpenSpec workflow cycle. This is a teaching experience—you'll do real work in their codebase while explaining each step.
@@ -379,7 +379,7 @@ Save to the `resolvedOutputPath` from `openspec instructions design --change "<n
379
379
 
380
380
  Finally, we break the work into implementation tasks—checkboxes that drive the apply phase.
381
381
 
382
- These should be small, clear, and in logical order.
382
+ These should be small, clear, and in logical order. Each group carries the tests and documentation for its own work - the last group is only for integration checks.
383
383
  ```
384
384
 
385
385
  **DO:** Generate tasks based on specs and design:
@@ -402,12 +402,17 @@ Here are the implementation tasks:
402
402
 
403
403
  ---
404
404
 
405
- Each checkbox becomes a unit of work in the apply phase. Ready to implement?
405
+ Each checkbox becomes a unit of work in the apply phase. Does this task breakdown look right?
406
406
  ```
407
407
 
408
- **PAUSE** - Wait for user to confirm they're ready to implement.
408
+ **PAUSE** - Wait for user approval/feedback.
409
+
410
+ After approval, save to the `resolvedOutputPath` from `openspec instructions tasks --change "<name>" --json`.
411
+
412
+ Then ask:
413
+ > "Tasks are saved. Ready to implement?"
409
414
 
410
- Save to the `resolvedOutputPath` from `openspec instructions tasks --change "<name>" --json`.
415
+ **PAUSE** - Wait for user to confirm before implementation.
411
416
 
412
417
  ---
413
418
 
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Propose a new change - create the change and generate all artifacts in one step.
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Sync delta specs from a change to main specs.
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI.
7
7
  metadata:
8
8
  author: openspec
9
9
  version: "1.0"
10
- generatedBy: "1.13.1"
10
+ generatedBy: "1.13.2"
11
11
  ---
12
12
 
13
13
  Revise a change's existing planning artifacts and keep them coherent. Never edit code.
@@ -40,7 +40,6 @@ This workflow revises artifacts that already exist; `/opsx:continue` is what cre
40
40
 
41
41
  When prompting, present the top 3-4 most recently modified changes as options, showing:
42
42
  - Change name
43
- - Schema (from `schema` field if present, otherwise "spec-driven")
44
43
  - Status (e.g., "0/5 tasks", "complete", "no tasks")
45
44
  - How recently it was modified (from `lastModified` field)
46
45
 
@@ -70,7 +69,13 @@ This workflow revises artifacts that already exist; `/opsx:continue` is what cre
70
69
  - Read the artifact(s) the request touches and the change's other existing artifacts.
71
70
  - Draft the requested edit in the conversation, not in files. Work out exactly what it changes; step 5 owns every write. Then check every other existing artifact against the drafted edit - in ANY direction: an edit to a later artifact may require revising an earlier one, not only the other way around. Build order is a useful reading order, not a constraint on which artifacts may be revised.
72
71
  - Note everything that is now inconsistent, missing, or contradictory.
73
- - Propose revisions only to files that already exist (`existingOutputPaths`). Do NOT create artifacts that don't exist yet, and do NOT invent new files under a glob artifact - note them and point the user to `/opsx:continue` to create them.
72
+ - Propose revisions to files that already exist (`existingOutputPaths`). If an artifact has no existing output files and status `ready` or `blocked`, note it and point the user to `/opsx:continue` to create them. Leave `skipped` artifacts untouched; do not treat them as missing or defer them to the continue workflow.
73
+ - A glob artifact (e.g. `specs/**/*.md`) is marked `done` after at least one file matches, and the continue workflow only handles `ready` artifacts. When reconciliation identifies a missing file for a glob artifact whose `existingOutputPaths` is non-empty:
74
+ 1. Run `openspec instructions "<artifact-id>" --change "<name>" --json` and use its `instruction` and `template`. Treat `context` and `rules` as constraints; do not copy them into the file. If instructions report `skipped: true`, do not create the file. Read current dependency files from disk; if a required non-skipped dependency is missing, stop and ask the user to restore it first.
75
+ 2. Choose a concrete path inside `changeRoot` that matches `artifactPaths.<id>.outputPath` and does not already exist. Verify it remains inside `changeRoot` after resolving any symlinked parent directories. The glob `resolvedOutputPath` is not a valid target.
76
+ 3. Include the new file in step 5's proposed revisions and create it only after the user confirms.
77
+ 4. After confirmation, immediately before creation, refresh status and instructions. Verify the artifact is still in scope, not skipped, and partially populated; repeat the concrete-path checks above.
78
+ 5. Use a create operation that fails if the target already exists. If `instruction` delegates creation to another skill or command, invoke it only if it can honor the confirmed path and these guardrails; otherwise stop. If any check fails or the confirmed draft is no longer valid, stop and reconcile with the user rather than replacing existing content or choosing a different path.
74
79
  - If the change is already coherent, say so and propose no revisions.
75
80
 
76
81
  5. **Confirm and apply, one artifact at a time**
@@ -83,7 +88,7 @@ This workflow revises artifacts that already exist; `/opsx:continue` is what cre
83
88
  ```
84
89
 
85
90
  6. **Point to the next step (guidance only - NEVER act on it)**
86
- - Artifacts still missing -> suggest `/opsx:continue` to create them.
91
+ - Artifacts with empty `existingOutputPaths` and status `ready` or `blocked` -> suggest `/opsx:continue` to create them.
87
92
  - Change already implemented (tasks checked off / already applied) -> the code may no longer match the revised plan; suggest `/opsx:apply` to carry the delta into code.
88
93
  - Everything done and implemented -> suggest `/opsx:archive`.
89
94
 
@@ -91,13 +96,14 @@ This workflow revises artifacts that already exist; `/opsx:continue` is what cre
91
96
 
92
97
  After each invocation, show:
93
98
  - Which artifacts were revised (and which proposed revisions were rejected)
94
- - Anything deferred to `/opsx:continue` (not-yet-created artifacts or files)
99
+ - Any file created under a glob artifact that was already partially populated
100
+ - Anything deferred to `/opsx:continue` (artifacts with no files yet and status `ready` or `blocked`, never `skipped` artifacts)
95
101
  - Where the change stands and the recommended next command
96
102
 
97
103
  **Guardrails**
98
104
  - Planning artifacts only - NEVER edit implementation code. If the revised plan implies code changes, stop and point to `/opsx:apply`.
99
105
  - Use the artifact ids and paths reported by `openspec status`; never branch on hardcoded artifact names.
100
106
  - Edit only the concrete files in `existingOutputPaths`; never write to a glob `resolvedOutputPath`.
101
- - Do not advance the build frontier: no new artifacts, no new files under glob artifacts - that is `/opsx:continue`'s job.
107
+ - Do not advance the build frontier: if an artifact has empty `existingOutputPaths` and status `ready` or `blocked`, that is `/opsx:continue`'s job. Leave `skipped` artifacts untouched. The only new-file scope is a confirmed concrete path under a glob artifact whose `existingOutputPaths` is non-empty.
102
108
  - Confirm every edit with the user before writing.
103
109
  - If the request changes the change's *intent* rather than refining it, recommend starting fresh with `/opsx:new` (the "Update vs. Start Fresh" heuristic).