@jspg-ai/coding-bb 0.0.3-beta.8 → 0.0.4

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 (108) hide show
  1. package/cbb/dev-standards/rules/cbb-ai-behavior.md +0 -15
  2. package/cbb/dev-standards/rules/cbb-workspace-discipline.md +38 -0
  3. package/cbb/lib/external/index.js +228 -0
  4. package/cbb/lib/install/agents-nav.js +92 -0
  5. package/cbb/lib/install/claude-code.js +8 -1
  6. package/cbb/lib/install/command-skill.js +105 -0
  7. package/cbb/lib/install/init.js +399 -129
  8. package/cbb/lib/install/minimax.js +60 -0
  9. package/cbb/lib/install/rule-rewrite.js +1 -1
  10. package/cbb/lib/install/setup-decision.js +92 -0
  11. package/cbb/lib/install/tool-selection.js +23 -0
  12. package/cbb/lib/install/trae.js +18 -8
  13. package/cbb/lib/install/workbuddy.js +36 -0
  14. package/cbb/lib/install/workspaces.js +15 -61
  15. package/cbb/lib/utils/check-update.js +13 -5
  16. package/cbb/lib/utils/githook.js +230 -0
  17. package/cbb/lib/utils/gitignore.js +17 -4
  18. package/cbb/lib/utils/plugin-hook.js +92 -0
  19. package/cbb/worktrees/_shared/scripts/check-local-state.js +114 -0
  20. package/cbb/worktrees/_shared/scripts/check-unarchived.js +77 -0
  21. package/cbb/worktrees/_shared/scripts/delete-branches.js +147 -0
  22. package/cbb/worktrees/_shared/scripts/deprecate-branches.js +119 -0
  23. package/cbb/worktrees/_shared/scripts/find-target-worktree.js +148 -96
  24. package/cbb/worktrees/_shared/scripts/find-workspace-root.js +8 -8
  25. package/cbb/worktrees/_shared/scripts/install-git-hook.js +70 -0
  26. package/cbb/worktrees/_shared/scripts/junction-ai-config.js +192 -0
  27. package/cbb/worktrees/_shared/scripts/merge-branches.js +469 -0
  28. package/cbb/worktrees/_shared/scripts/push-core.js +1 -1
  29. package/cbb/worktrees/_shared/scripts/silence-popup.js +1 -1
  30. package/cbb/worktrees/_shared/scripts/start-local.js +180 -0
  31. package/cbb/worktrees/skills/cbb-local-mode/SKILL.md +194 -0
  32. package/cbb/worktrees/skills/cbb-local-mode/scripts/check-local-state.js +114 -0
  33. package/cbb/worktrees/skills/cbb-local-mode/scripts/delete-branches.js +147 -0
  34. package/cbb/worktrees/skills/cbb-local-mode/scripts/deprecate-branches.js +119 -0
  35. package/cbb/worktrees/skills/cbb-local-mode/scripts/install-git-hook.js +70 -0
  36. package/cbb/worktrees/skills/cbb-local-mode/scripts/merge-branches.js +469 -0
  37. package/cbb/worktrees/skills/cbb-local-mode/scripts/silence-popup.js +23 -0
  38. package/cbb/worktrees/skills/cbb-local-mode/scripts/start-local.js +180 -0
  39. package/cbb/worktrees/skills/cbb-worktree-close/SKILL.md +133 -81
  40. package/cbb/worktrees/skills/cbb-worktree-close/scripts/check-env.js +3 -3
  41. package/cbb/worktrees/skills/cbb-worktree-close/scripts/check-unarchived.js +77 -48
  42. package/cbb/worktrees/skills/cbb-worktree-close/scripts/delete-branches.js +147 -136
  43. package/cbb/worktrees/skills/cbb-worktree-close/scripts/deprecate-branches.js +119 -0
  44. package/cbb/worktrees/skills/cbb-worktree-close/scripts/discover-apps.js +14 -5
  45. package/cbb/worktrees/skills/cbb-worktree-close/scripts/find-target-worktree.js +148 -96
  46. package/cbb/worktrees/skills/cbb-worktree-close/scripts/find-workspace-root.js +8 -8
  47. package/cbb/worktrees/skills/cbb-worktree-close/scripts/junction-ai-config.js +192 -0
  48. package/cbb/worktrees/skills/cbb-worktree-close/scripts/merge-branches.js +469 -0
  49. package/cbb/worktrees/skills/cbb-worktree-close/scripts/remove-worktrees.js +44 -9
  50. package/cbb/worktrees/skills/cbb-worktree-close/scripts/safety-check.js +15 -4
  51. package/cbb/worktrees/skills/cbb-worktree-close/scripts/silence-popup.js +1 -1
  52. package/cbb/worktrees/skills/cbb-worktree-init/SKILL.md +136 -123
  53. package/cbb/worktrees/skills/cbb-worktree-init/scripts/check-env.js +1 -1
  54. package/cbb/worktrees/skills/cbb-worktree-init/scripts/check-repos.js +2 -2
  55. package/cbb/worktrees/skills/cbb-worktree-init/scripts/create-branches.js +33 -8
  56. package/cbb/worktrees/skills/cbb-worktree-init/scripts/create-worktrees.js +60 -46
  57. package/cbb/worktrees/skills/cbb-worktree-init/scripts/install-git-hook.js +70 -0
  58. package/cbb/worktrees/skills/cbb-worktree-init/scripts/junction-ai-config.js +192 -0
  59. package/cbb/worktrees/skills/cbb-worktree-init/scripts/parse-config.js +7 -7
  60. package/cbb/worktrees/skills/cbb-worktree-init/scripts/push-branches.js +3 -3
  61. package/cbb/worktrees/skills/cbb-worktree-init/scripts/push-core.js +1 -1
  62. package/cbb/worktrees/skills/cbb-worktree-init/scripts/silence-popup.js +1 -1
  63. package/cbb/worktrees/skills/cbb-worktree-init/scripts/sync-repos.js +11 -7
  64. package/cbb/worktrees/skills/cbb-worktree-init/scripts/update-gitignore.js +37 -9
  65. package/cbb/worktrees/skills/cbb-worktree-push/SKILL.md +212 -56
  66. package/cbb/worktrees/skills/cbb-worktree-push/scripts/check-unarchived.js +77 -0
  67. package/cbb/worktrees/skills/cbb-worktree-push/scripts/commit-worktrees.js +70 -12
  68. package/cbb/worktrees/skills/cbb-worktree-push/scripts/find-target-worktree.js +148 -96
  69. package/cbb/worktrees/skills/cbb-worktree-push/scripts/find-workspace-root.js +8 -8
  70. package/cbb/worktrees/skills/cbb-worktree-push/scripts/make-mr-urls.js +211 -0
  71. package/cbb/worktrees/skills/cbb-worktree-push/scripts/merge-branches.js +469 -0
  72. package/cbb/worktrees/skills/cbb-worktree-push/scripts/push-core.js +1 -1
  73. package/cbb/worktrees/skills/cbb-worktree-push/scripts/push-worktrees.js +67 -20
  74. package/cbb/worktrees/skills/cbb-worktree-push/scripts/silence-popup.js +1 -1
  75. package/config/{workspace-config.sample.json → CBB-WORKSPACE.sample.json} +1 -1
  76. package/config/openspec/schemas/spec-driven/schema.yaml +20 -0
  77. package/config/upstream-mirrors.json +5 -0
  78. package/external/frontend-design/.version +6 -0
  79. package/external/frontend-design/LICENSE.txt +177 -0
  80. package/external/frontend-design/SKILL.md +71 -0
  81. package/openspec/.version +2 -2
  82. package/openspec/commands/archive.md +15 -8
  83. package/openspec/commands/bulk-archive.md +13 -6
  84. package/openspec/commands/continue.md +0 -1
  85. package/openspec/commands/explore.md +1 -1
  86. package/openspec/commands/ff.md +1 -1
  87. package/openspec/commands/onboard.md +9 -4
  88. package/openspec/commands/update.md +11 -5
  89. package/openspec/commands/verify.md +57 -26
  90. package/openspec/skills/openspec-apply-change/SKILL.md +1 -1
  91. package/openspec/skills/openspec-archive-change/SKILL.md +16 -9
  92. package/openspec/skills/openspec-bulk-archive-change/SKILL.md +14 -7
  93. package/openspec/skills/openspec-continue-change/SKILL.md +1 -2
  94. package/openspec/skills/openspec-explore/SKILL.md +2 -2
  95. package/openspec/skills/openspec-ff-change/SKILL.md +2 -2
  96. package/openspec/skills/openspec-new-change/SKILL.md +1 -1
  97. package/openspec/skills/openspec-onboard/SKILL.md +10 -5
  98. package/openspec/skills/openspec-propose/SKILL.md +1 -1
  99. package/openspec/skills/openspec-sync-specs/SKILL.md +1 -1
  100. package/openspec/skills/openspec-update-change/SKILL.md +12 -6
  101. package/openspec/skills/openspec-verify-change/SKILL.md +59 -27
  102. package/package.json +3 -2
  103. package/superpowers/.version +3 -3
  104. package/superpowers/skills/writing-plans/SKILL.md +32 -20
  105. package/cbb/lib/install/codebuddy.js +0 -30
  106. package/cbb/worktrees/skills/cbb-worktree-init/scripts/find-workspace-root.js +0 -67
  107. package/config/workspace-agents.sample.md +0 -41
  108. package/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
@@ -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
  Verify that an implementation matches the change artifacts (specs, tasks, design).
@@ -36,7 +36,7 @@ In both branches, never create the root as a side effect: do not run `openspec i
36
36
  - Auto-select if only one active change exists
37
37
  - If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
38
38
 
39
- When prompting, show changes that have implementation tasks (tasks artifact exists).
39
+ When prompting, show all active changes returned by the list, including changes with `status: "no-tasks"`.
40
40
  Include the schema used for each change if available.
41
41
  Mark changes with incomplete tasks as "(In Progress)".
42
42
 
@@ -57,7 +57,9 @@ In both branches, never create the root as a side effect: do not run `openspec i
57
57
  openspec instructions apply --change "<name>" --json
58
58
  ```
59
59
 
60
- This returns the change directory and `contextFiles` (artifact ID -> array of concrete file paths). Read all available artifacts from `contextFiles`.
60
+ 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`.
61
+
62
+ Treat apply `state` and `instruction` as context, not a verification verdict. Do not implement tasks or archive the change during verification.
61
63
 
62
64
  4. **Initialize verification report structure**
63
65
 
@@ -68,32 +70,59 @@ In both branches, never create the root as a side effect: do not run `openspec i
68
70
 
69
71
  Each dimension can have CRITICAL, WARNING, or SUGGESTION issues.
70
72
 
73
+ 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.
74
+
75
+ 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.
76
+
77
+ 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".
78
+
79
+ 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.
80
+
71
81
  5. **Verify Completeness**
72
82
 
73
83
  **Task Completion**:
74
- - If `contextFiles.tasks` exists, read every file path in it
75
- - Parse checkboxes: complete means the box holds only `x`/`X`, ignoring
76
- spacing (`- [ x]` is complete); every other marker is incomplete
77
- (`- [ ]`, `- []`, and unfamiliar ones such as `- [~]` or `- [-]`)
78
- - Count complete vs total tasks
79
- - If incomplete tasks exist:
80
- - Add CRITICAL issue for each incomplete task
84
+ - If `taskTrackingConfigured` is false, report **Task Completion** as not applicable. Do not treat empty `tasks` as missing evidence.
85
+ - 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.
86
+ - 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.
87
+ - 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.
88
+ - Report complete vs total tasks from `progress`.
89
+ - If `progress.remaining` is greater than 0:
90
+ - 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.
81
91
  - Recommendation: "Complete task: <description>" or "Mark as done if already implemented"
82
92
 
83
93
  **Spec Coverage**:
94
+ - 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.
95
+ - 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.
84
96
  - If delta specs exist in `contextFiles.specs`:
85
- - Extract all requirements (marked with "### Requirement:")
86
- - For each requirement:
97
+ - 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.
98
+ - For each ADDED or MODIFIED requirement (for MODIFIED, check the text in the delta, not the old wording):
87
99
  - Search codebase for keywords related to the requirement
88
100
  - Assess if implementation likely exists
89
- - If requirements appear unimplemented:
101
+ - If ADDED or MODIFIED requirements appear unimplemented:
90
102
  - Add CRITICAL issue: "Requirement not found: <requirement name>"
91
103
  - Recommendation: "Implement requirement X: <description>"
104
+ - For each REMOVED requirement, the change asks for the behavior to be gone, so invert the check:
105
+ - 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.
106
+ - Finding no implementation is the expected result. Never report a REMOVED requirement as "Requirement not found" or recommend implementing it.
107
+ - If the behavior is still present:
108
+ - Add CRITICAL issue: "Removed requirement still implemented: <requirement name>"
109
+ - Recommendation: "Remove the remaining implementation at <file>:<lines>, following the requirement's Migration note if it has one"
110
+ - For each RENAMED entry (`FROM:`/`TO:`), the name changes but the behavior stays, so check the TO requirement for that unchanged behavior:
111
+ - Do not report the FROM name as missing, and do not require code symbols, identifiers, or file names to be renamed.
112
+ - If the TO name also appears under MODIFIED, its behavior is checked there against the MODIFIED text; skip it here.
113
+ - 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.
114
+ - Search codebase for that behavior and assess if it is still implemented.
115
+ - If it appears unimplemented:
116
+ - Add CRITICAL issue: "Renamed requirement not found: <TO name>"
117
+ - Recommendation: "Restore the behavior of <TO name> (renamed from <FROM name>); a rename must not change behavior"
118
+ - 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.
92
119
 
93
120
  6. **Verify Correctness**
94
121
 
122
+ 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.
123
+
95
124
  **Requirement Implementation Mapping**:
96
- - For each requirement from delta specs:
125
+ - For each ADDED or MODIFIED requirement from delta specs (REMOVED entries, and RENAMED entries without a MODIFIED block, were settled under Spec Coverage):
97
126
  - Search codebase for implementation evidence
98
127
  - If found, note file paths and line ranges
99
128
  - Assess if implementation matches requirement intent
@@ -102,26 +131,29 @@ In both branches, never create the root as a side effect: do not run `openspec i
102
131
  - Recommendation: "Review <file>:<lines> against requirement X"
103
132
 
104
133
  **Scenario Coverage**:
105
- - For each scenario in delta specs (marked with "#### Scenario:"):
134
+ - For each scenario under an ADDED or MODIFIED requirement in delta specs (marked with "#### Scenario:"):
106
135
  - Check if conditions are handled in code
107
136
  - Check if tests exist covering the scenario
108
137
  - If scenario appears uncovered:
109
138
  - Add WARNING: "Scenario not covered: <scenario name>"
110
139
  - Recommendation: "Add test or implementation for scenario: <description>"
140
+ - Skip scenarios under a REMOVED requirement; that behavior is meant to be gone.
111
141
 
112
142
  7. **Verify Coherence**
113
143
 
114
144
  **Design Adherence**:
145
+ - If the schema defines no design artifact, report **Design Adherence** as not applicable.
115
146
  - If `contextFiles.design` exists:
116
147
  - Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:")
117
148
  - Verify implementation follows those decisions
118
149
  - If contradiction detected:
119
150
  - Add WARNING: "Design decision not followed: <decision>"
120
151
  - Recommendation: "Update implementation or revise design.md to match reality"
121
- - If no design.md: Skip design adherence check, note "No design.md to verify against"
152
+ - 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.
122
153
 
123
154
  **Code Pattern Consistency**:
124
- - Review new code for consistency with project patterns
155
+ - If implementation changes cannot be identified, mark **Code Pattern Consistency** as not verified and explain the missing evidence.
156
+ - Otherwise, review new code for consistency with project patterns
125
157
  - Check file naming, directory structure, coding style
126
158
  - If significant deviations found:
127
159
  - Add SUGGESTION: "Code pattern deviation: <details>"
@@ -141,11 +173,15 @@ In both branches, never create the root as a side effect: do not run `openspec i
141
173
  | Coherence | Followed/Issues |
142
174
  ```
143
175
 
176
+ 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)`.
177
+
144
178
  **Issues by Priority**:
145
179
 
146
180
  1. **CRITICAL** (Must fix before archive):
147
181
  - Incomplete tasks
148
182
  - Missing requirement implementations
183
+ - Removed requirements still implemented
184
+ - Renamed requirements whose behavior is no longer implemented
149
185
  - Each with specific, actionable recommendation
150
186
 
151
187
  2. **WARNING** (Should fix):
@@ -159,9 +195,12 @@ In both branches, never create the root as a side effect: do not run `openspec i
159
195
  - Each with specific recommendation
160
196
 
161
197
  **Final Assessment**:
162
- - If CRITICAL issues: "X critical issue(s) found. Fix before archiving."
163
- - If only warnings: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
164
- - If all clear: "All checks passed. Ready for archive."
198
+ - If CRITICAL issues: "X critical issue(s) found. Fix before archiving." If any check was skipped, also name every skipped check and its reason.
199
+ - 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)."
200
+ - If only suggestions and no checks were skipped: "No critical issues or warnings. Z suggestion(s) to consider. Ready for archive (with noted improvements)."
201
+ - If no issues and no checks were skipped: "All checks passed. Ready for archive."
202
+ - 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.
203
+ - Include the suggestion count when nonzero in every final assessment.
165
204
 
166
205
  **Verification Heuristics**
167
206
 
@@ -171,13 +210,6 @@ In both branches, never create the root as a side effect: do not run `openspec i
171
210
  - **False Positives**: When uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL
172
211
  - **Actionability**: Every issue must have a specific recommendation with file/line references where applicable
173
212
 
174
- **Graceful Degradation**
175
-
176
- - If only tasks.md exists: verify task completion only, skip spec/design checks
177
- - If tasks + specs exist: verify completeness and correctness, skip design
178
- - If full artifacts: verify all three dimensions
179
- - Always note which checks were skipped and why
180
-
181
213
  **Output Format**
182
214
 
183
215
  Use clear markdown with:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jspg-ai/coding-bb",
3
- "version": "0.0.3-beta.8",
3
+ "version": "0.0.4",
4
4
  "description": "整合业界热门且高价值的工具、框架与技能,为 AI CODING AGENT 提供统一的行为准则与工作流,辅助开发者将需求高效落地为符合规范的代码",
5
5
  "main": "cbb/lib/install/init.js",
6
6
  "bin": {
@@ -12,6 +12,7 @@
12
12
  "openspec/",
13
13
  "config/",
14
14
  "superpowers/",
15
+ "external/",
15
16
  "!**/__pycache__/",
16
17
  "!**/*.pyc",
17
18
  "!**/*.pyo"
@@ -19,7 +20,7 @@
19
20
  "scripts": {
20
21
  "sync:shared": "node scripts/sync-shared.js",
21
22
  "pretest": "node scripts/sync-shared.js --check",
22
- "test": "node test/lib/install/cleanup.test.js && node test/lib/utils/settings.test.js && node test/lib/utils/gitignore.test.js && node test/lib/utils/version.test.js && node test/lib/install/workspaces.test.js && node test/lib/utils/checkbox.test.js && node test/lib/utils/output.test.js && node test/lib/install/cli-help.test.js && node test/lib/install/adapters.test.js && node test/lib/wiki/wiki-publish.test.js && node test/lib/wiki/wiki-parse-args.test.js && node test/lib/wiki/wiki-split.test.js && node test/lib/superpowers/superpowers.test.js && node test/worktrees/push-branches.test.js && node test/worktrees/commit-worktrees.test.js && node test/worktrees/push-worktrees.test.js && node test/worktrees/check-env-deep.test.js && node test/lib/openspec/protected-paths.test.js"
23
+ "test": "node test/lib/install/cleanup.test.js && node test/lib/utils/settings.test.js && node test/lib/utils/gitignore.test.js && node test/lib/utils/githook.test.js && node test/lib/utils/version.test.js && node test/lib/install/workspaces.test.js && node test/lib/utils/checkbox.test.js && node test/lib/utils/output.test.js && node test/lib/install/cli-help.test.js && node test/lib/install/adapters.test.js && node test/lib/install/tool-selection.test.js && node test/lib/install/agents-nav.test.js && node test/lib/install/command-skill.test.js && node test/lib/utils/plugin-hook.test.js && node test/lib/wiki/wiki-publish.test.js && node test/lib/wiki/wiki-parse-args.test.js && node test/lib/wiki/wiki-split.test.js && node test/lib/superpowers/superpowers.test.js && node test/lib/external/external.test.js && node test/worktrees/push-branches.test.js && node test/worktrees/commit-worktrees.test.js && node test/worktrees/push-worktrees.test.js && node test/worktrees/check-env-deep.test.js && node test/worktrees/create-worktrees.test.js && node test/worktrees/make-mr-urls.test.js && node test/lib/install/setup-decision.test.js && node test/lib/openspec/protected-paths.test.js && node test/worktrees/merge-branches.test.js && node test/worktrees/deprecate-branches.test.js && node test/worktrees/delete-branches.test.js && node test/worktrees/skill-refs.test.js"
23
24
  },
24
25
  "keywords": [
25
26
  "cbb",
@@ -1,6 +1,6 @@
1
1
  {
2
- "tag": "v6.4.1",
3
- "sha": "b92c4fa87ea1252077a7f7d3bf420e52325dd25e",
2
+ "tag": "v6.4.2",
3
+ "sha": "668b16d4d8d4d603fd257567684fbbffccbf2022",
4
4
  "repo": "obra/superpowers",
5
- "updatedAt": "2026-09-19T13:23:51.623Z"
5
+ "updatedAt": "2026-09-28T07:29:45.385Z"
6
6
  }
@@ -7,9 +7,7 @@ description: Use when you have a spec or requirements for a multi-step task, bef
7
7
 
8
8
  ## Overview
9
9
 
10
- Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
11
-
12
- Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
10
+ Write implementation plans for an engineer who has not seen this codebase or this spec. Assume they write idiomatic code in the project's language once they know the exact interface and the exact test, and that they will make a reasonable choice wherever the plan leaves one open. What they cannot know is what you decided: which files, which names and signatures, which values from the spec, which tests prove each task. Document those. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
13
11
 
14
12
  **Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
15
13
 
@@ -42,9 +40,9 @@ deliverable needs them; split only where a reviewer could meaningfully
42
40
  reject one task while approving its neighbor. Each task ends with an
43
41
  independently testable deliverable.
44
42
 
45
- ## Bite-Sized Task Granularity
43
+ ## Step Granularity
46
44
 
47
- **Each step is one action (2-5 minutes):**
45
+ **Each step is one action with a checkable result:**
48
46
  - "Write the failing test" - step
49
47
  - "Run it to make sure it fails" - step
50
48
  - "Implement the minimal code to make the test pass" - step
@@ -120,12 +118,11 @@ def test_specific_behavior():
120
118
  Run: `pytest tests/path/test.py::test_name -v`
121
119
  Expected: FAIL with "function not defined"
122
120
 
123
- - [ ] **Step 3: Write minimal implementation**
121
+ - [ ] **Step 3: Implement `function(input: InputType) -> ResultType` in `exact/path/to/file.py`**
124
122
 
125
- ```python
126
- def function(input):
127
- return expected
128
- ```
123
+ One line on the approach when the signature and the test leave a choice
124
+ (which library call, which data structure); a code block only for an
125
+ algorithm they do not determine.
129
126
 
130
127
  - [ ] **Step 4: Run test to verify it passes**
131
128
 
@@ -140,15 +137,28 @@ git commit -m "feat: add specific feature"
140
137
  ```
141
138
  ````
142
139
 
143
- ## No Placeholders
144
-
145
- Every step must contain the actual content an engineer needs. These are **plan failures** — never write them:
146
- - "TBD", "TODO", "implement later", "fill in details"
147
- - "Add appropriate error handling" / "add validation" / "handle edge cases"
148
- - "Write tests for the above" (without actual test code)
149
- - "Similar to Task N" (repeat the code — the engineer may be reading tasks out of order)
150
- - Steps that describe what to do without showing how (code blocks required for code steps)
151
- - References to types, functions, or methods not defined in any task
140
+ ## What a Step Contains
141
+
142
+ A step is done when the implementer can write exactly one reasonable thing
143
+ from it. That is the whole requirement: unambiguous, not complete. Each kind
144
+ of step carries what makes it unambiguous and nothing more:
145
+
146
+ - **A test step:** the test's name and its assertions, as code, with the
147
+ spec's exact values in them.
148
+ - **A code step:** the exact signature (name, parameters, return type), the
149
+ file it lives in, and the specific values the spec pins. The implementer
150
+ writes the body. A body appears only for an algorithm the signature and
151
+ tests do not determine, or for exact copy the spec fixes.
152
+ - **A verification step:** the command to run and the output that means it
153
+ passed.
154
+ - **A reference to another task:** that task's Interfaces block says what
155
+ to use; the plan does not repeat that task's code.
156
+
157
+ A plan is the set of decisions the implementer cannot make alone. A plan
158
+ longer than the code it describes has written the code instead. Lines that
159
+ decide nothing ("TBD", "handle edge cases", "add appropriate validation",
160
+ "write tests for the above", a type or function no task defines) are the
161
+ opposite failure, and the self-review catches both.
152
162
 
153
163
  ## Self-Review
154
164
 
@@ -156,12 +166,14 @@ After writing the complete plan, look at the spec with fresh eyes and check the
156
166
 
157
167
  **1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
158
168
 
159
- **2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
169
+ **2. Step scan:** Every step must let the implementer write exactly one reasonable thing, and no step may carry more than that: a line that decides nothing is a gap, a function body the signature and tests already determine is a transcript. Fix both.
160
170
 
161
171
  **3. Type consistency:** Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called `clearLayers()` in Task 3 but `clearFullLayers()` in Task 7 is a bug.
162
172
 
163
173
  **4. Review Focus:** For each input class or failure mode the spec implies, is there a task whose tests exercise it? The five uncovered ones most likely to bite a person go in the Review Focus section, and each line there gets its test added to the owning task. An empty section means you checked and found none, not that you skipped the check.
164
174
 
175
+ **5. Proportion:** Compare the plan's length to the spec's. A plan several times longer than the spec it implements is a transcript of the program, not a plan. If code blocks are most of the document, replace bodies with signatures, test names and assertions, and check that each step is still unambiguous.
176
+
165
177
  If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
166
178
 
167
179
  ## Execution Handoff
@@ -1,30 +0,0 @@
1
- /**
2
- * WorkBuddy / CodeBuddy 适配器
3
- *
4
- * 腾讯 WorkBuddy 桌面工作台与 CodeBuddy IDE / CLI 共用项目级配置目录 `.codebuddy/`,
5
- * 故一个适配器同时覆盖两者。
6
- *
7
- * 与 Claude Code / Qoder 的映射差异:
8
- * - rules:`.codebuddy/rules/*.md`(扁平文件、递归加载),frontmatter 用
9
- * `alwaysApply: true`(Qoder 的 `trigger: always_on` 需改写,见 ruleRewrites)
10
- * - skills:`.codebuddy/skills/<name>/SKILL.md`,结构与 Claude 同构
11
- * - commands:`.codebuddy/commands/`,支持目录嵌套(`/group:command`),与 Claude 同风格
12
- * - hooks:完全兼容 Claude Code Hooks 规范,settings 结构一致,直接复用 settingsManager
13
- */
14
-
15
- const path = require('path');
16
- const os = require('os');
17
-
18
- module.exports = {
19
- name: 'codebuddy',
20
- displayName: 'WorkBuddy(CodeBuddy)',
21
- rulesDir: '.codebuddy/rules',
22
- skillsDir: '.codebuddy/skills',
23
- commandsDir: '.codebuddy/commands/opsx',
24
- // 规则 frontmatter 改写:Qoder 风格 → CodeBuddy 风格
25
- ruleRewrites: [['trigger: always_on', 'alwaysApply: true']],
26
- // 用户级 settings,写入全局生效,不污染项目目录
27
- settingsFile: path.join(os.homedir(), '.codebuddy', 'settings.json'),
28
- settingsFileIsUserLevel: true,
29
- hookEvents: ['UserPromptSubmit'],
30
- };
@@ -1,67 +0,0 @@
1
- require('./silence-popup');
2
- /**
3
- * openspec-shared 工作空间根目录定位
4
- *
5
- * 唯一真源:cbb/worktrees/_shared/scripts/find-workspace-root.js
6
- * 由 scripts/sync-shared.js 展开到各 skill 的 scripts/ 下(init / extend / close / push)。
7
- *
8
- * 优先:git worktree list 第一行(主仓库根目录,不受 worktree 内 workspace-config.json 副本干扰)
9
- * 兜底:当前目录含 workspace-config.json
10
- *
11
- * 退出码:
12
- * 0 - 定位成功,输出 WS_ROOT 绝对路径
13
- * 1 - 未找到工作空间根目录
14
- *
15
- * 输出格式:
16
- * 第一行:人类可读报告
17
- * 最后一行:纯路径(便于 AI agent 解析后用于 cd)
18
- */
19
-
20
- const { execSync } = require('child_process');
21
- const fs = require('fs');
22
- const path = require('path');
23
-
24
- function tryExec(cmd) {
25
- try {
26
- return { ok: true, out: execSync(cmd, { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'pipe'] }).trim() };
27
- } catch (e) {
28
- return { ok: false };
29
- }
30
- }
31
-
32
- let wsRoot = '';
33
-
34
- // 优先:git worktree list 第一行
35
- const worktreeList = tryExec('git worktree list');
36
- if (worktreeList.ok) {
37
- const firstLine = worktreeList.out.split('\n')[0];
38
- if (firstLine) {
39
- // 格式:<path> <sha> [<branch>]
40
- const candidate = firstLine.split(/\s+/)[0];
41
- if (candidate && fs.existsSync(candidate)) {
42
- wsRoot = candidate;
43
- }
44
- }
45
- }
46
-
47
- // 兜底:当前目录含 workspace-config.json
48
- if (!wsRoot) {
49
- const cwd = process.cwd();
50
- if (fs.existsSync(path.join(cwd, 'workspace-config.json'))) {
51
- wsRoot = cwd;
52
- }
53
- }
54
-
55
- // 校验
56
- if (!wsRoot || !fs.existsSync(path.join(wsRoot, 'workspace-config.json'))) {
57
- console.error('❌ 未找到工作空间根目录');
58
- console.error(' 原因:git worktree list 失败且当前目录无 workspace-config.json');
59
- console.error(' 请在业务工作空间根目录(由 cbb setup 初始化、包含 workspace-config.json)下执行本技能');
60
- process.exit(1);
61
- }
62
-
63
- console.log('✅ 工作空间根目录:' + wsRoot);
64
- console.log('---');
65
- // 最后一行输出纯路径,AI agent 可直接 cd 使用
66
- console.log(wsRoot);
67
- process.exit(0);
@@ -1,41 +0,0 @@
1
- # 业务空间使用说明(AI Agent 导航)
2
-
3
- 本目录是由 `@jspg-ai/coding-bb` 初始化的**多仓库联动开发业务空间**。
4
- 进入本目录工作时,请先按本文件理解目录职责与协作约定,再动手。
5
-
6
- ## 核心约定
7
-
8
- 1. **本目录不做需求开发**。本目录(业务空间主分支)只负责组织与调度;需求开发的**写操作**都在 `.worktrees/worktree-<需求名>/` 隔离目录内进行,**AI 会话仍停在空间根**(worktree 内不装 AI 配置)。
9
- 2. **AI 配置安装在空间根**:编码规范、OpenSpec 命令、worktree 管理技能都装在本目录(`cbb setup` / `cbb update` 安装);worktree 内**不安装** AI 配置,AI 会话始终以空间根为基础。
10
- 3. **接到新需求先建 worktree**:使用 `/cbb-worktree-init <需求名>`(skill 形态,各工具写法见文末),或直接自然语言说"为 <需求名> 创建工作空间"。它会为 `workspace-config.json` 中的全量关联应用同步创建同名 worktree。
11
- 4. **开发命令在本会话执行,写操作指向 worktree**:需求提案 / 实现 / 验证 / 归档(`/opsx:propose` → `/opsx:apply` → `/opsx:verify` → `/opsx:archive`)在空间根会话执行;但所有产生写操作的命令(git commit / openspec / 构建 / 测试 / 文件修改)必须以 `.worktrees/worktree-<需求名>/`(或其应用子目录)为工作目录(显式 `cd` 或绝对路径);**禁止在空间根(主分支)执行写操作**。
12
- 5. **关联应用增减只改配置**:编辑 `workspace-config.json` 的 `apps` 数组(`name` / `repo` / `side` / `desc`),然后用同一需求名重跑 worktree 初始化即幂等补齐;不要手工 `git clone` 应用仓库。
13
- 6. **不要绕过 worktree 直接修改 `.codespace/` 或本目录的代码**。`.codespace/` 是工具维护的基准代码,不是开发区。
14
-
15
- ## 目录结构与职责
16
-
17
- | 路径 | 职责 | 维护方式 |
18
- |------|----------|----------|
19
- | `workspace-config.json` | 关联应用清单,所有应用联动的唯一数据源 | 人工编辑 |
20
- | `.codespace/` | 各关联应用的基准代码(每个应用一个子目录) | `cbb setup` 与 worktree 流程自动 clone / fetch;**勿手动编辑**;已 gitignore,不提交 |
21
- | `.worktrees/` | 需求隔离开发区(每个需求一个 `worktree-<需求名>/` 目录) | worktree 命令自动创建 / 清理;不提交(首次执行 worktree 流程时自动加入 .gitignore) |
22
- | `openspec/` | OpenSpec 工作流配置(`config.yaml` + `schemas/`) | 由 cbb 安装;需求变更产物(`openspec/changes/` 等)在**需求工作树内**生成,随需求分支提交 |
23
- | `.claude/` `.qoder/` `.opencode/` `.codebuddy/` `.trae/` | AI 工具适配目录:编码规范规则、OpenSpec 命令、worktree 管理技能(skill 形态) | 由 cbb 按 setup 时选择的工具安装;已 gitignore,不提交,勿手动改 |
24
- | `.cbb/` | cbb 安装清单与状态(`.managed-by-cbb`、`.last-tools`) | 由 cbb 管理;**勿手动编辑** |
25
-
26
- ## 典型流程
27
-
28
- ```
29
- 本目录:对 AI 说"为 <需求名> 创建工作空间"(或 /cbb-worktree-init <需求名>)
30
- → 继续在当前会话开发:写操作命令以 .worktrees/worktree-<需求名>/ 为工作目录
31
- (/opsx:propose → /opsx:apply → /opsx:verify → /opsx:archive)
32
- → 说"提交并推送"(或 /cbb-worktree-push)→ 合并后说"关闭工作空间"(或 /cbb-worktree-close)
33
- ```
34
-
35
- > worktree 管理三件套(init / close / push)以 **skill 形态**分发:既能被 AI 在对话中按意图**自动触发**,也能用斜杠命令手动指定(`/cbb-worktree-init` 等,各工具一致)。OpenSpec 命令为 `/opsx:propose`(opencode 扁平化为 `/opsx-propose`)。
36
-
37
- ---
38
-
39
- 本文件由 `@jspg-ai/coding-bb` 生成(仅缺失时写入,之后不会覆盖或删除,可自由增补团队约定)。
40
-
41
- > ⓘ 本文件仅供导航;目录纪律以 cbb 安装的编码规范规则(`cbb-ai-behavior.md` 第 8 条)为准,该规则随 `cbb update` 更新。
@@ -1,49 +0,0 @@
1
- # Plan Document Reviewer Prompt Template
2
-
3
- Use this template when dispatching a plan document reviewer subagent.
4
-
5
- **Purpose:** Verify the plan is complete, matches the spec, and has proper task decomposition.
6
-
7
- **Dispatch after:** The complete plan is written.
8
-
9
- ```
10
- Subagent (general-purpose):
11
- description: "Review plan document"
12
- prompt: |
13
- You are a plan document reviewer. Verify this plan is complete and ready for implementation.
14
-
15
- **Plan to review:** [PLAN_FILE_PATH]
16
- **Spec for reference:** [SPEC_FILE_PATH]
17
-
18
- ## What to Check
19
-
20
- | Category | What to Look For |
21
- |----------|------------------|
22
- | Completeness | TODOs, placeholders, incomplete tasks, missing steps |
23
- | Spec Alignment | Plan covers spec requirements, no major scope creep |
24
- | Task Decomposition | Tasks have clear boundaries, steps are actionable |
25
- | Buildability | Could an engineer follow this plan without getting stuck? |
26
-
27
- ## Calibration
28
-
29
- **Only flag issues that would cause real problems during implementation.**
30
- An implementer building the wrong thing or getting stuck is an issue.
31
- Minor wording, stylistic preferences, and "nice to have" suggestions are not.
32
-
33
- Approve unless there are serious gaps — missing requirements from the spec,
34
- contradictory steps, placeholder content, or tasks so vague they can't be acted on.
35
-
36
- ## Output Format
37
-
38
- ## Plan Review
39
-
40
- **Status:** Approved | Issues Found
41
-
42
- **Issues (if any):**
43
- - [Task X, Step Y]: [specific issue] - [why it matters for implementation]
44
-
45
- **Recommendations (advisory, do not block approval):**
46
- - [suggestions for improvement]
47
- ```
48
-
49
- **Reviewer returns:** Status, Issues (if any), Recommendations