@jspg-ai/coding-bb 0.0.3-beta.1 → 0.0.3-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cbb/dev-standards/rules/cbb-ai-behavior.md +118 -116
- package/cbb/lib/install/claude-code.js +1 -3
- package/cbb/lib/install/codebuddy.js +30 -0
- package/cbb/lib/install/init.js +295 -119
- package/cbb/lib/install/opencode.js +35 -31
- package/cbb/lib/install/qoder.js +1 -3
- package/cbb/lib/install/rule-rewrite.js +27 -0
- package/cbb/lib/install/trae.js +33 -0
- package/cbb/lib/openspec/index.js +337 -554
- package/cbb/lib/superpowers/index.js +246 -265
- package/cbb/lib/utils/check-update.js +8 -1
- package/cbb/lib/utils/gitignore.js +2 -0
- package/cbb/lib/utils/settings.js +17 -4
- package/cbb/lib/utils/tar.js +92 -0
- package/cbb/lib/utils/upstream.js +90 -0
- package/cbb/worktrees/skills/cbb-worktree-close/SKILL.md +32 -23
- package/cbb/worktrees/skills/cbb-worktree-close/scripts/remove-worktrees.js +2 -2
- package/cbb/worktrees/skills/cbb-worktree-init/SKILL.md +36 -28
- package/cbb/worktrees/skills/cbb-worktree-init/scripts/create-worktrees.js +15 -37
- package/cbb/worktrees/skills/cbb-worktree-init/scripts/update-gitignore.js +25 -9
- package/cbb/worktrees/skills/cbb-worktree-push/SKILL.md +66 -30
- package/config/openspec/schemas/spec-driven/schema.yaml +29 -30
- package/config/openspec/schemas/spec-driven/templates/design.md +0 -18
- package/config/openspec/schemas/spec-driven/templates/proposal.md +4 -3
- package/config/upstream-mirrors.json +12 -0
- package/config/workspace-agents.sample.md +41 -39
- package/openspec/.version +2 -3
- package/openspec/commands/apply.md +189 -175
- package/openspec/commands/archive.md +237 -216
- package/openspec/commands/bulk-archive.md +355 -327
- package/openspec/commands/continue.md +116 -105
- package/openspec/commands/explore.md +230 -199
- package/openspec/commands/ff.md +115 -104
- package/openspec/commands/new.md +74 -63
- package/openspec/commands/onboard.md +557 -548
- package/openspec/commands/propose.md +161 -150
- package/openspec/commands/sync.md +277 -249
- package/openspec/commands/update.md +92 -80
- package/openspec/commands/verify.md +175 -162
- package/openspec/skills/openspec-apply-change/SKILL.md +20 -5
- package/openspec/skills/openspec-archive-change/SKILL.md +30 -8
- package/openspec/skills/openspec-bulk-archive-change/SKILL.md +36 -6
- package/openspec/skills/openspec-continue-change/SKILL.md +14 -2
- package/openspec/skills/openspec-explore/SKILL.md +21 -9
- package/openspec/skills/openspec-ff-change/SKILL.md +14 -2
- package/openspec/skills/openspec-new-change/SKILL.md +13 -1
- package/openspec/skills/openspec-onboard/SKILL.md +49 -39
- package/openspec/skills/openspec-propose/SKILL.md +15 -3
- package/openspec/skills/openspec-sync-specs/SKILL.md +31 -2
- package/openspec/skills/openspec-update-change/SKILL.md +27 -14
- package/openspec/skills/openspec-verify-change/SKILL.md +17 -3
- package/package.json +2 -2
- package/superpowers/.version +4 -4
- package/superpowers/skills/brainstorming/SKILL.md +47 -12
- package/superpowers/skills/brainstorming/scripts/frame-template.html +213 -213
- package/superpowers/skills/brainstorming/scripts/server.cjs +723 -723
- package/superpowers/skills/brainstorming/visual-companion.md +6 -6
- package/superpowers/skills/diagnosing-superpowers/SKILL.md +120 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/analyst-common.md +38 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/cost-and-time.md +28 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/plan-adherence.md +29 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/quality-evidence.md +26 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/repeated-work.md +30 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/request-conflicts.md +20 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/scrub-audit.md +33 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/scrub.md +29 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/similar-session.md +38 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/skill-timeline.md +30 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/stumbles.md +28 -0
- package/superpowers/skills/diagnosing-superpowers/references/context-safety.md +22 -0
- package/superpowers/skills/diagnosing-superpowers/references/github-issues.md +47 -0
- package/superpowers/skills/diagnosing-superpowers/references/redaction-policy.md +34 -0
- package/superpowers/skills/diagnosing-superpowers/references/session-discovery.md +31 -0
- package/superpowers/skills/diagnosing-superpowers/templates/bundle-README.md +77 -0
- package/superpowers/skills/diagnosing-superpowers/templates/case.md +64 -0
- package/superpowers/skills/diagnosing-superpowers/templates/issue.md +51 -0
- package/superpowers/skills/diagnosing-superpowers/templates/report.md +82 -0
- package/superpowers/skills/executing-plans/SKILL.md +350 -41
- package/superpowers/skills/executing-plans/scripts/task-done +52 -0
- package/superpowers/skills/executing-plans/scripts/task-start +28 -0
- package/superpowers/skills/requesting-code-review/SKILL.md +1 -1
- package/superpowers/skills/requesting-code-review/code-reviewer.md +17 -0
- package/superpowers/skills/subagent-driven-development/SKILL.md +18 -18
- package/superpowers/skills/subagent-driven-development/re-review-prompt.md +1 -1
- package/superpowers/skills/subagent-driven-development/scripts/review-package +53 -46
- package/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +82 -40
- package/superpowers/skills/subagent-driven-development/scripts/task-brief +43 -41
- package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +2 -2
- package/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/superpowers/skills/test-driven-development/SKILL.md +10 -0
- package/superpowers/skills/using-superpowers/SKILL.md +2 -0
- package/superpowers/skills/using-superpowers/references/claude-code-tools.md +29 -0
- package/superpowers/skills/using-superpowers/references/muse-tools.md +35 -0
- package/superpowers/skills/writing-plans/SKILL.md +30 -9
- package/superpowers/skills/writing-skills/SKILL.md +4 -2
- package/superpowers/skills/writing-skills/graphviz-conventions.dot +171 -171
- package/cbb/worktrees/commands/worktree-close.md +0 -64
- package/cbb/worktrees/commands/worktree-init.md +0 -51
- package/cbb/worktrees/commands/worktree-push.md +0 -42
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
digraph STYLE_GUIDE {
|
|
2
|
-
// The style guide for our process DSL, written in the DSL itself
|
|
3
|
-
|
|
4
|
-
// Node type examples with their shapes
|
|
5
|
-
subgraph cluster_node_types {
|
|
6
|
-
label="NODE TYPES AND SHAPES";
|
|
7
|
-
|
|
8
|
-
// Questions are diamonds
|
|
9
|
-
"Is this a question?" [shape=diamond];
|
|
10
|
-
|
|
11
|
-
// Actions are boxes (default)
|
|
12
|
-
"Take an action" [shape=box];
|
|
13
|
-
|
|
14
|
-
// Commands are plaintext
|
|
15
|
-
"git commit -m 'msg'" [shape=plaintext];
|
|
16
|
-
|
|
17
|
-
// States are ellipses
|
|
18
|
-
"Current state" [shape=ellipse];
|
|
19
|
-
|
|
20
|
-
// Warnings are octagons
|
|
21
|
-
"STOP: Critical warning" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
22
|
-
|
|
23
|
-
// Entry/exit are double circles
|
|
24
|
-
"Process starts" [shape=doublecircle];
|
|
25
|
-
"Process complete" [shape=doublecircle];
|
|
26
|
-
|
|
27
|
-
// Examples of each
|
|
28
|
-
"Is test passing?" [shape=diamond];
|
|
29
|
-
"Write test first" [shape=box];
|
|
30
|
-
"npm test" [shape=plaintext];
|
|
31
|
-
"I am stuck" [shape=ellipse];
|
|
32
|
-
"NEVER use git add -A" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Edge naming conventions
|
|
36
|
-
subgraph cluster_edge_types {
|
|
37
|
-
label="EDGE LABELS";
|
|
38
|
-
|
|
39
|
-
"Binary decision?" [shape=diamond];
|
|
40
|
-
"Yes path" [shape=box];
|
|
41
|
-
"No path" [shape=box];
|
|
42
|
-
|
|
43
|
-
"Binary decision?" -> "Yes path" [label="yes"];
|
|
44
|
-
"Binary decision?" -> "No path" [label="no"];
|
|
45
|
-
|
|
46
|
-
"Multiple choice?" [shape=diamond];
|
|
47
|
-
"Option A" [shape=box];
|
|
48
|
-
"Option B" [shape=box];
|
|
49
|
-
"Option C" [shape=box];
|
|
50
|
-
|
|
51
|
-
"Multiple choice?" -> "Option A" [label="condition A"];
|
|
52
|
-
"Multiple choice?" -> "Option B" [label="condition B"];
|
|
53
|
-
"Multiple choice?" -> "Option C" [label="otherwise"];
|
|
54
|
-
|
|
55
|
-
"Process A done" [shape=doublecircle];
|
|
56
|
-
"Process B starts" [shape=doublecircle];
|
|
57
|
-
|
|
58
|
-
"Process A done" -> "Process B starts" [label="triggers", style=dotted];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Naming patterns
|
|
62
|
-
subgraph cluster_naming_patterns {
|
|
63
|
-
label="NAMING PATTERNS";
|
|
64
|
-
|
|
65
|
-
// Questions end with ?
|
|
66
|
-
"Should I do X?";
|
|
67
|
-
"Can this be Y?";
|
|
68
|
-
"Is Z true?";
|
|
69
|
-
"Have I done W?";
|
|
70
|
-
|
|
71
|
-
// Actions start with verb
|
|
72
|
-
"Write the test";
|
|
73
|
-
"Search for patterns";
|
|
74
|
-
"Commit changes";
|
|
75
|
-
"Ask for help";
|
|
76
|
-
|
|
77
|
-
// Commands are literal
|
|
78
|
-
"grep -r 'pattern' .";
|
|
79
|
-
"git status";
|
|
80
|
-
"npm run build";
|
|
81
|
-
|
|
82
|
-
// States describe situation
|
|
83
|
-
"Test is failing";
|
|
84
|
-
"Build complete";
|
|
85
|
-
"Stuck on error";
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Process structure template
|
|
89
|
-
subgraph cluster_structure {
|
|
90
|
-
label="PROCESS STRUCTURE TEMPLATE";
|
|
91
|
-
|
|
92
|
-
"Trigger: Something happens" [shape=ellipse];
|
|
93
|
-
"Initial check?" [shape=diamond];
|
|
94
|
-
"Main action" [shape=box];
|
|
95
|
-
"git status" [shape=plaintext];
|
|
96
|
-
"Another check?" [shape=diamond];
|
|
97
|
-
"Alternative action" [shape=box];
|
|
98
|
-
"STOP: Don't do this" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
99
|
-
"Process complete" [shape=doublecircle];
|
|
100
|
-
|
|
101
|
-
"Trigger: Something happens" -> "Initial check?";
|
|
102
|
-
"Initial check?" -> "Main action" [label="yes"];
|
|
103
|
-
"Initial check?" -> "Alternative action" [label="no"];
|
|
104
|
-
"Main action" -> "git status";
|
|
105
|
-
"git status" -> "Another check?";
|
|
106
|
-
"Another check?" -> "Process complete" [label="ok"];
|
|
107
|
-
"Another check?" -> "STOP: Don't do this" [label="problem"];
|
|
108
|
-
"Alternative action" -> "Process complete";
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// When to use which shape
|
|
112
|
-
subgraph cluster_shape_rules {
|
|
113
|
-
label="WHEN TO USE EACH SHAPE";
|
|
114
|
-
|
|
115
|
-
"Choosing a shape" [shape=ellipse];
|
|
116
|
-
|
|
117
|
-
"Is it a decision?" [shape=diamond];
|
|
118
|
-
"Use diamond" [shape=diamond, style=filled, fillcolor=lightblue];
|
|
119
|
-
|
|
120
|
-
"Is it a command?" [shape=diamond];
|
|
121
|
-
"Use plaintext" [shape=plaintext, style=filled, fillcolor=lightgray];
|
|
122
|
-
|
|
123
|
-
"Is it a warning?" [shape=diamond];
|
|
124
|
-
"Use octagon" [shape=octagon, style=filled, fillcolor=pink];
|
|
125
|
-
|
|
126
|
-
"Is it entry/exit?" [shape=diamond];
|
|
127
|
-
"Use doublecircle" [shape=doublecircle, style=filled, fillcolor=lightgreen];
|
|
128
|
-
|
|
129
|
-
"Is it a state?" [shape=diamond];
|
|
130
|
-
"Use ellipse" [shape=ellipse, style=filled, fillcolor=lightyellow];
|
|
131
|
-
|
|
132
|
-
"Default: use box" [shape=box, style=filled, fillcolor=lightcyan];
|
|
133
|
-
|
|
134
|
-
"Choosing a shape" -> "Is it a decision?";
|
|
135
|
-
"Is it a decision?" -> "Use diamond" [label="yes"];
|
|
136
|
-
"Is it a decision?" -> "Is it a command?" [label="no"];
|
|
137
|
-
"Is it a command?" -> "Use plaintext" [label="yes"];
|
|
138
|
-
"Is it a command?" -> "Is it a warning?" [label="no"];
|
|
139
|
-
"Is it a warning?" -> "Use octagon" [label="yes"];
|
|
140
|
-
"Is it a warning?" -> "Is it entry/exit?" [label="no"];
|
|
141
|
-
"Is it entry/exit?" -> "Use doublecircle" [label="yes"];
|
|
142
|
-
"Is it entry/exit?" -> "Is it a state?" [label="no"];
|
|
143
|
-
"Is it a state?" -> "Use ellipse" [label="yes"];
|
|
144
|
-
"Is it a state?" -> "Default: use box" [label="no"];
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Good vs bad examples
|
|
148
|
-
subgraph cluster_examples {
|
|
149
|
-
label="GOOD VS BAD EXAMPLES";
|
|
150
|
-
|
|
151
|
-
// Good: specific and shaped correctly
|
|
152
|
-
"Test failed" [shape=ellipse];
|
|
153
|
-
"Read error message" [shape=box];
|
|
154
|
-
"Can reproduce?" [shape=diamond];
|
|
155
|
-
"git diff HEAD~1" [shape=plaintext];
|
|
156
|
-
"NEVER ignore errors" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
157
|
-
|
|
158
|
-
"Test failed" -> "Read error message";
|
|
159
|
-
"Read error message" -> "Can reproduce?";
|
|
160
|
-
"Can reproduce?" -> "git diff HEAD~1" [label="yes"];
|
|
161
|
-
|
|
162
|
-
// Bad: vague and wrong shapes
|
|
163
|
-
bad_1 [label="Something wrong", shape=box]; // Should be ellipse (state)
|
|
164
|
-
bad_2 [label="Fix it", shape=box]; // Too vague
|
|
165
|
-
bad_3 [label="Check", shape=box]; // Should be diamond
|
|
166
|
-
bad_4 [label="Run command", shape=box]; // Should be plaintext with actual command
|
|
167
|
-
|
|
168
|
-
bad_1 -> bad_2;
|
|
169
|
-
bad_2 -> bad_3;
|
|
170
|
-
bad_3 -> bad_4;
|
|
171
|
-
}
|
|
1
|
+
digraph STYLE_GUIDE {
|
|
2
|
+
// The style guide for our process DSL, written in the DSL itself
|
|
3
|
+
|
|
4
|
+
// Node type examples with their shapes
|
|
5
|
+
subgraph cluster_node_types {
|
|
6
|
+
label="NODE TYPES AND SHAPES";
|
|
7
|
+
|
|
8
|
+
// Questions are diamonds
|
|
9
|
+
"Is this a question?" [shape=diamond];
|
|
10
|
+
|
|
11
|
+
// Actions are boxes (default)
|
|
12
|
+
"Take an action" [shape=box];
|
|
13
|
+
|
|
14
|
+
// Commands are plaintext
|
|
15
|
+
"git commit -m 'msg'" [shape=plaintext];
|
|
16
|
+
|
|
17
|
+
// States are ellipses
|
|
18
|
+
"Current state" [shape=ellipse];
|
|
19
|
+
|
|
20
|
+
// Warnings are octagons
|
|
21
|
+
"STOP: Critical warning" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
22
|
+
|
|
23
|
+
// Entry/exit are double circles
|
|
24
|
+
"Process starts" [shape=doublecircle];
|
|
25
|
+
"Process complete" [shape=doublecircle];
|
|
26
|
+
|
|
27
|
+
// Examples of each
|
|
28
|
+
"Is test passing?" [shape=diamond];
|
|
29
|
+
"Write test first" [shape=box];
|
|
30
|
+
"npm test" [shape=plaintext];
|
|
31
|
+
"I am stuck" [shape=ellipse];
|
|
32
|
+
"NEVER use git add -A" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Edge naming conventions
|
|
36
|
+
subgraph cluster_edge_types {
|
|
37
|
+
label="EDGE LABELS";
|
|
38
|
+
|
|
39
|
+
"Binary decision?" [shape=diamond];
|
|
40
|
+
"Yes path" [shape=box];
|
|
41
|
+
"No path" [shape=box];
|
|
42
|
+
|
|
43
|
+
"Binary decision?" -> "Yes path" [label="yes"];
|
|
44
|
+
"Binary decision?" -> "No path" [label="no"];
|
|
45
|
+
|
|
46
|
+
"Multiple choice?" [shape=diamond];
|
|
47
|
+
"Option A" [shape=box];
|
|
48
|
+
"Option B" [shape=box];
|
|
49
|
+
"Option C" [shape=box];
|
|
50
|
+
|
|
51
|
+
"Multiple choice?" -> "Option A" [label="condition A"];
|
|
52
|
+
"Multiple choice?" -> "Option B" [label="condition B"];
|
|
53
|
+
"Multiple choice?" -> "Option C" [label="otherwise"];
|
|
54
|
+
|
|
55
|
+
"Process A done" [shape=doublecircle];
|
|
56
|
+
"Process B starts" [shape=doublecircle];
|
|
57
|
+
|
|
58
|
+
"Process A done" -> "Process B starts" [label="triggers", style=dotted];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Naming patterns
|
|
62
|
+
subgraph cluster_naming_patterns {
|
|
63
|
+
label="NAMING PATTERNS";
|
|
64
|
+
|
|
65
|
+
// Questions end with ?
|
|
66
|
+
"Should I do X?";
|
|
67
|
+
"Can this be Y?";
|
|
68
|
+
"Is Z true?";
|
|
69
|
+
"Have I done W?";
|
|
70
|
+
|
|
71
|
+
// Actions start with verb
|
|
72
|
+
"Write the test";
|
|
73
|
+
"Search for patterns";
|
|
74
|
+
"Commit changes";
|
|
75
|
+
"Ask for help";
|
|
76
|
+
|
|
77
|
+
// Commands are literal
|
|
78
|
+
"grep -r 'pattern' .";
|
|
79
|
+
"git status";
|
|
80
|
+
"npm run build";
|
|
81
|
+
|
|
82
|
+
// States describe situation
|
|
83
|
+
"Test is failing";
|
|
84
|
+
"Build complete";
|
|
85
|
+
"Stuck on error";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Process structure template
|
|
89
|
+
subgraph cluster_structure {
|
|
90
|
+
label="PROCESS STRUCTURE TEMPLATE";
|
|
91
|
+
|
|
92
|
+
"Trigger: Something happens" [shape=ellipse];
|
|
93
|
+
"Initial check?" [shape=diamond];
|
|
94
|
+
"Main action" [shape=box];
|
|
95
|
+
"git status" [shape=plaintext];
|
|
96
|
+
"Another check?" [shape=diamond];
|
|
97
|
+
"Alternative action" [shape=box];
|
|
98
|
+
"STOP: Don't do this" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
99
|
+
"Process complete" [shape=doublecircle];
|
|
100
|
+
|
|
101
|
+
"Trigger: Something happens" -> "Initial check?";
|
|
102
|
+
"Initial check?" -> "Main action" [label="yes"];
|
|
103
|
+
"Initial check?" -> "Alternative action" [label="no"];
|
|
104
|
+
"Main action" -> "git status";
|
|
105
|
+
"git status" -> "Another check?";
|
|
106
|
+
"Another check?" -> "Process complete" [label="ok"];
|
|
107
|
+
"Another check?" -> "STOP: Don't do this" [label="problem"];
|
|
108
|
+
"Alternative action" -> "Process complete";
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// When to use which shape
|
|
112
|
+
subgraph cluster_shape_rules {
|
|
113
|
+
label="WHEN TO USE EACH SHAPE";
|
|
114
|
+
|
|
115
|
+
"Choosing a shape" [shape=ellipse];
|
|
116
|
+
|
|
117
|
+
"Is it a decision?" [shape=diamond];
|
|
118
|
+
"Use diamond" [shape=diamond, style=filled, fillcolor=lightblue];
|
|
119
|
+
|
|
120
|
+
"Is it a command?" [shape=diamond];
|
|
121
|
+
"Use plaintext" [shape=plaintext, style=filled, fillcolor=lightgray];
|
|
122
|
+
|
|
123
|
+
"Is it a warning?" [shape=diamond];
|
|
124
|
+
"Use octagon" [shape=octagon, style=filled, fillcolor=pink];
|
|
125
|
+
|
|
126
|
+
"Is it entry/exit?" [shape=diamond];
|
|
127
|
+
"Use doublecircle" [shape=doublecircle, style=filled, fillcolor=lightgreen];
|
|
128
|
+
|
|
129
|
+
"Is it a state?" [shape=diamond];
|
|
130
|
+
"Use ellipse" [shape=ellipse, style=filled, fillcolor=lightyellow];
|
|
131
|
+
|
|
132
|
+
"Default: use box" [shape=box, style=filled, fillcolor=lightcyan];
|
|
133
|
+
|
|
134
|
+
"Choosing a shape" -> "Is it a decision?";
|
|
135
|
+
"Is it a decision?" -> "Use diamond" [label="yes"];
|
|
136
|
+
"Is it a decision?" -> "Is it a command?" [label="no"];
|
|
137
|
+
"Is it a command?" -> "Use plaintext" [label="yes"];
|
|
138
|
+
"Is it a command?" -> "Is it a warning?" [label="no"];
|
|
139
|
+
"Is it a warning?" -> "Use octagon" [label="yes"];
|
|
140
|
+
"Is it a warning?" -> "Is it entry/exit?" [label="no"];
|
|
141
|
+
"Is it entry/exit?" -> "Use doublecircle" [label="yes"];
|
|
142
|
+
"Is it entry/exit?" -> "Is it a state?" [label="no"];
|
|
143
|
+
"Is it a state?" -> "Use ellipse" [label="yes"];
|
|
144
|
+
"Is it a state?" -> "Default: use box" [label="no"];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Good vs bad examples
|
|
148
|
+
subgraph cluster_examples {
|
|
149
|
+
label="GOOD VS BAD EXAMPLES";
|
|
150
|
+
|
|
151
|
+
// Good: specific and shaped correctly
|
|
152
|
+
"Test failed" [shape=ellipse];
|
|
153
|
+
"Read error message" [shape=box];
|
|
154
|
+
"Can reproduce?" [shape=diamond];
|
|
155
|
+
"git diff HEAD~1" [shape=plaintext];
|
|
156
|
+
"NEVER ignore errors" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
157
|
+
|
|
158
|
+
"Test failed" -> "Read error message";
|
|
159
|
+
"Read error message" -> "Can reproduce?";
|
|
160
|
+
"Can reproduce?" -> "git diff HEAD~1" [label="yes"];
|
|
161
|
+
|
|
162
|
+
// Bad: vague and wrong shapes
|
|
163
|
+
bad_1 [label="Something wrong", shape=box]; // Should be ellipse (state)
|
|
164
|
+
bad_2 [label="Fix it", shape=box]; // Too vague
|
|
165
|
+
bad_3 [label="Check", shape=box]; // Should be diamond
|
|
166
|
+
bad_4 [label="Run command", shape=box]; // Should be plaintext with actual command
|
|
167
|
+
|
|
168
|
+
bad_1 -> bad_2;
|
|
169
|
+
bad_2 -> bad_3;
|
|
170
|
+
bad_3 -> bad_4;
|
|
171
|
+
}
|
|
172
172
|
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "CBB: Worktree Close"
|
|
3
|
-
description: 关闭/清理由 init-worktree 创建的多仓库联动 worktree 工作空间,移除 worktree 并按用户选择处理特性分支
|
|
4
|
-
category: Workflow
|
|
5
|
-
tags: [worktree, cleanup, worktree, git-worktree]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# CBB: Worktree Close - 关闭 Worktree
|
|
9
|
-
|
|
10
|
-
## 重要:第一步必须用 Read 工具直接打开 SKILL.md
|
|
11
|
-
|
|
12
|
-
**禁止**用 `ls` / `find` / `cat` / `head` / `grep` 等 bash 命令搜索 SKILL.md。这些命令在 Agent 运行环境(Qoder Windows PowerShell 等)中经常失败。
|
|
13
|
-
|
|
14
|
-
**直接路径**:
|
|
15
|
-
- Qoder 适配器:`.qoder/skills/cbb-worktree-close/SKILL.md`
|
|
16
|
-
- Claude Code 适配器:`.claude/skills/cbb-worktree-close/SKILL.md`
|
|
17
|
-
|
|
18
|
-
**第一步**:
|
|
19
|
-
1. 用 Read 工具直接打开 SKILL.md
|
|
20
|
-
2. 按 SKILL.md 的 Step 0 → 1 → 2 → 3 → 4 → 5 → 6 顺序执行
|
|
21
|
-
3. 每次调用 Node.js 脚本时使用**绝对路径**
|
|
22
|
-
|
|
23
|
-
## Input
|
|
24
|
-
|
|
25
|
-
参数 `<分支名>`(可选),指定要关闭的 worktree 对应的特性分支。**未提供时按 SKILL.md Step 1 在对话中询问或自动选取唯一 worktree**。
|
|
26
|
-
|
|
27
|
-
**Steps 概述**(完整流程见 SKILL.md)
|
|
28
|
-
|
|
29
|
-
1. Step 0:前置校验(Git 仓库检测、workspace-config.json 检测,支持向上查找)
|
|
30
|
-
2. Step 1:确定要关闭的目标 worktree(列出 `.worktrees/` 下的工作空间 worktree,用户选择或自动选取)
|
|
31
|
-
3. Step 2:发现关联应用 worktree(读 workspace-config.json,按实际存在性确定关联清单)
|
|
32
|
-
4. Step 3:安全检查(未提交修改 / 是否合并到主分支 / 是否推到远程,含主动 fetch 刷新远程引用)
|
|
33
|
-
5. Step 4:用户决策(未提交修改处理方式 + 分支处理方式,AskUserQuestion 固定选项)
|
|
34
|
-
6. Step 5:移除 Worktree(三层降级策略:正常移除 → prune+物理删除 → 仅 prune 延迟清理)
|
|
35
|
-
7. Step 5.5:二次确认 worktree 已移除(确保分支不再被检出)
|
|
36
|
-
8. Step 6:删除分支(按用户选择的 MODE:保留 / 删本地 / 删本地+远程)
|
|
37
|
-
9. Step 8:确认收尾(pwd 确认、残留检查、最终报告)
|
|
38
|
-
|
|
39
|
-
**Output**
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
✅ 工作空间 worktree 已关闭
|
|
43
|
-
当前目录:<工作空间根目录绝对路径>
|
|
44
|
-
已移除 worktree:
|
|
45
|
-
- .worktrees/worktree-<需求名>(workspace)
|
|
46
|
-
- .worktrees/worktree-<需求名>/<应用名1>(嵌套)
|
|
47
|
-
- .worktrees/worktree-<需求名>/<应用名2>(嵌套)
|
|
48
|
-
未提交修改:已丢弃(--force)/ 无
|
|
49
|
-
分支处理:<需求名> 已删除(本地+远程)/ 已删除(本地)/ 已保留
|
|
50
|
-
剩余工作空间 worktree:<列出仍存在的,或 "无" >
|
|
51
|
-
Workspace cleaned up.
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
详细输出格式与安全检查报告,见 SKILL.md「最终报告」与「Step 3」段。
|
|
55
|
-
|
|
56
|
-
**Guardrails**
|
|
57
|
-
|
|
58
|
-
- 必须在业务工作空间根目录执行(包含 workspace-config.json 的目录),支持从 worktree 内部向上查找
|
|
59
|
-
- 顺序硬约束:**先移除所有 worktree,再删除分支**(先删分支会报 `Cannot delete branch checked out at`)
|
|
60
|
-
- 破坏性操作必须先报告、经用户确认才执行(未提交修改、未合并分支绝不静默 `--force` 或 `-D`)
|
|
61
|
-
- 只操作 `.worktrees/worktree-<需求名>` 路径,绝不碰其它 worktree(如 IDE 会话 worktree)
|
|
62
|
-
- 关联应用以实际存在的 worktree 为准,不假设 workspace-config.json 中所有应用都有关联
|
|
63
|
-
- 依赖 shell 函数的脚本必须整段在一次 Bash 调用中执行(函数不跨调用保留)
|
|
64
|
-
- git 操作一律用 `git -C <仓库>` 绝对路径,不依赖跨调用的 cwd
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "CBB: Worktree Init"
|
|
3
|
-
description: 为一个需求在 workspace 与各关联应用仓库同步创建同名 git worktree,物理直聚在 `.worktrees/<需求名>/` 目录
|
|
4
|
-
category: Workflow
|
|
5
|
-
tags: [worktree, isolation, worktree, git-worktree]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# CBB: Worktree Init - 创建 Worktree
|
|
9
|
-
|
|
10
|
-
## 重要:第一步必须用 Read 工具直接打开 SKILL.md
|
|
11
|
-
|
|
12
|
-
**禁止**用 `ls` / `find` / `cat` / `head` / `grep` 等 bash 命令搜索 SKILL.md 是否存在。**这些命令在 Agent 运行环境(Qoder Windows PowerShell 等)中经常失败**(如 `head` 不存在、stderr 重定向无效等)。
|
|
13
|
-
|
|
14
|
-
**直接路径**:
|
|
15
|
-
- Qoder 适配器:`.qoder/skills/cbb-worktree-init/SKILL.md`
|
|
16
|
-
- Claude Code 适配器:`.claude/skills/cbb-worktree-init/SKILL.md`
|
|
17
|
-
|
|
18
|
-
**第一步**:
|
|
19
|
-
1. 用 Read 工具直接打开 `.qoder/skills/cbb-worktree-init/SKILL.md`(或 `.claude/skills/...`)
|
|
20
|
-
2. 按 SKILL.md 的 Step 0 → 1 → 2 → 3 → 4 顺序执行
|
|
21
|
-
3. 每次调用 Node.js 脚本时,使用**绝对路径**(避免依赖相对路径):
|
|
22
|
-
```
|
|
23
|
-
node "D:\workspace\<用户工作空间>\.qoder\skills\cbb-worktree-init\scripts\<name>.js" <参数>
|
|
24
|
-
```
|
|
25
|
-
- 参数形式:
|
|
26
|
-
- `check-env.js`:无参数
|
|
27
|
-
- `parse-config.js`:无参数
|
|
28
|
-
- `sync-repos.js`:`<ws_root>`
|
|
29
|
-
- `check-repos.js`:`<ws_root>`
|
|
30
|
-
- `create-branches.js`:`<ws_root> <branch>`
|
|
31
|
-
- `update-gitignore.js`:`<ws_root> <branch>`
|
|
32
|
-
- `create-worktrees.js`:`<ws_root> <branch>`
|
|
33
|
-
|
|
34
|
-
## Input
|
|
35
|
-
|
|
36
|
-
参数 `<需求名>`(kebab-case),同时作分支名和 workspace 工作树目录名。**未提供时按 SKILL.md Step 3.1 在对话中询问**。
|
|
37
|
-
|
|
38
|
-
## 流程总览(完整流程见 SKILL.md)
|
|
39
|
-
|
|
40
|
-
1. Step 0:环境探活 + 解析 workspace-config.json
|
|
41
|
-
2. Step 1:同步 .codespace/ 仓库(fetch --all)
|
|
42
|
-
3. Step 2:状态检查(5 项 / 3 项分级)
|
|
43
|
-
4. Step 3:创建分支 → 推送 upstream → 创建 worktree(workspace + 嵌套 app)
|
|
44
|
-
5. Step 4:收尾与交接(继续当前会话,声明目录纪律)
|
|
45
|
-
|
|
46
|
-
## 关键 Guardrails
|
|
47
|
-
|
|
48
|
-
- workspace 主分支 tracked 的所有内容(openspec/、cbb/ 等)由 git worktree 自动 checkout——**禁止 cp / clone / symlink “带过来”**
|
|
49
|
-
- 必须用 `git branch` 而非 `git checkout -b`(分支不能同时在主目录与 worktree 检出)
|
|
50
|
-
- 运行环境 node 不可用时 fail-fast:终止流程并提示用户到系统终端重试
|
|
51
|
-
- **不要试图搜索 SKILL.md**——直接用 Read 工具打开
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "CBB: Worktree Push"
|
|
3
|
-
description: 跨 worktree 提交并推送当前需求的所有关联仓库到 origin
|
|
4
|
-
category: Workflow
|
|
5
|
-
tags: [workflow, push, commit, worktree, experimental]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
跨 worktree 提交并推送当前需求的所有关联仓库到 origin。
|
|
9
|
-
|
|
10
|
-
**Input**: 可选指定需求名(如 `/cbb:worktree-push ft-diff-on-cargo`)。省略时从 cwd 的 `.worktrees/worktree-<需求名>/` 路径推断(cwd 在工作空间根目录时由 Step 0 定位)。
|
|
11
|
-
|
|
12
|
-
**何时使用**:
|
|
13
|
-
|
|
14
|
-
- apply 完成后准备推送所有改动
|
|
15
|
-
- close-worktree 前需要先确保 ahead 提交已推送(避免丢)
|
|
16
|
-
- 开发过程中想保存中间进度
|
|
17
|
-
- 用户口语化说"提交并push" / "推一下"
|
|
18
|
-
|
|
19
|
-
**Steps 摘要**(详细见 [cbb-worktree-push SKILL.md](../../skills/cbb-worktree-push/SKILL.md)):
|
|
20
|
-
|
|
21
|
-
1. **Step 0**:定位工作空间根(find-workspace-root.js)
|
|
22
|
-
2. **Step 1**:识别目标 worktree(find-target-worktree.js)
|
|
23
|
-
3. **Step 2**:扫描所有 worktree 仓库状态(commit-worktrees.js --dry-run)
|
|
24
|
-
4. **Step 3**:对话中收集 commit 信息(必须由用户提供)
|
|
25
|
-
5. **Step 4**:批量 commit(commit-worktrees.js)
|
|
26
|
-
6. **Step 5**:批量 push(push-worktrees.js)
|
|
27
|
-
7. **Step 6**:汇总报告
|
|
28
|
-
|
|
29
|
-
**关键 Guardrails**:
|
|
30
|
-
|
|
31
|
-
- 严格按 Step 0 → 1 → 2 → 3 → 4 → 5 → 6 顺序执行
|
|
32
|
-
- **Step 2 dry-run 必跑**,让用户看到将要 commit 的内容
|
|
33
|
-
- **Step 3 必问用户 commit 信息**(自由文本),禁止自动生成
|
|
34
|
-
- 默认 `git add -u`(仅 tracked),避免误纳未追踪文件
|
|
35
|
-
- push 失败时阻塞并按错误码分类处理,**禁止**自动跳过失败仓库
|
|
36
|
-
- 远程分支已存在时必须输出 commit 元信息再询问用户决策
|
|
37
|
-
|
|
38
|
-
**Failure Handling**:
|
|
39
|
-
|
|
40
|
-
- commit-worktrees.js 退出码 2 → 部分 commit 失败,**阻塞流程**,询问用户
|
|
41
|
-
- push-worktrees.js 退出码 2 → 部分 push 失败,**阻塞流程**,按错误码询问用户
|
|
42
|
-
- 远程分支已存在 → 先输出元信息,再 AskUserQuestion 让用户选择「关联」或「终止」
|