@jspg-ai/coding-bb 0.0.3-beta.4 → 0.0.3-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cbb/dev-standards/rules/cbb-ai-behavior.md +118 -116
- package/cbb/lib/install/codebuddy.js +32 -0
- package/cbb/lib/install/init.js +85 -35
- package/cbb/lib/install/rule-rewrite.js +27 -0
- package/cbb/lib/install/trae.js +35 -0
- package/cbb/lib/openspec/index.js +337 -554
- package/cbb/lib/superpowers/index.js +246 -265
- package/cbb/lib/utils/check-update.js +8 -1
- package/cbb/lib/utils/gitignore.js +2 -0
- package/cbb/lib/utils/settings.js +17 -4
- package/cbb/lib/utils/tar.js +92 -0
- package/cbb/lib/utils/upstream.js +90 -0
- package/cbb/worktrees/commands/worktree-close.md +1 -1
- package/config/upstream-mirrors.json +12 -0
- package/config/workspace-agents.sample.md +41 -39
- package/openspec/.version +2 -3
- package/openspec/commands/apply.md +189 -175
- package/openspec/commands/archive.md +237 -216
- package/openspec/commands/bulk-archive.md +355 -327
- package/openspec/commands/continue.md +116 -105
- package/openspec/commands/explore.md +230 -199
- package/openspec/commands/ff.md +115 -104
- package/openspec/commands/new.md +74 -63
- package/openspec/commands/onboard.md +557 -548
- package/openspec/commands/propose.md +161 -150
- package/openspec/commands/sync.md +277 -249
- package/openspec/commands/update.md +92 -80
- package/openspec/commands/verify.md +175 -162
- package/openspec/skills/openspec-apply-change/SKILL.md +20 -5
- package/openspec/skills/openspec-archive-change/SKILL.md +30 -8
- package/openspec/skills/openspec-bulk-archive-change/SKILL.md +36 -6
- package/openspec/skills/openspec-continue-change/SKILL.md +14 -2
- package/openspec/skills/openspec-explore/SKILL.md +21 -9
- package/openspec/skills/openspec-ff-change/SKILL.md +14 -2
- package/openspec/skills/openspec-new-change/SKILL.md +13 -1
- package/openspec/skills/openspec-onboard/SKILL.md +49 -39
- package/openspec/skills/openspec-propose/SKILL.md +15 -3
- package/openspec/skills/openspec-sync-specs/SKILL.md +31 -2
- package/openspec/skills/openspec-update-change/SKILL.md +27 -14
- package/openspec/skills/openspec-verify-change/SKILL.md +17 -3
- package/package.json +2 -2
- package/superpowers/.version +4 -4
- package/superpowers/skills/brainstorming/SKILL.md +47 -12
- package/superpowers/skills/brainstorming/scripts/frame-template.html +213 -213
- package/superpowers/skills/brainstorming/scripts/server.cjs +723 -723
- package/superpowers/skills/brainstorming/visual-companion.md +6 -6
- package/superpowers/skills/diagnosing-superpowers/SKILL.md +120 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/analyst-common.md +38 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/cost-and-time.md +28 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/plan-adherence.md +29 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/quality-evidence.md +26 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/repeated-work.md +30 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/request-conflicts.md +20 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/scrub-audit.md +33 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/scrub.md +29 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/similar-session.md +38 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/skill-timeline.md +30 -0
- package/superpowers/skills/diagnosing-superpowers/prompts/stumbles.md +28 -0
- package/superpowers/skills/diagnosing-superpowers/references/context-safety.md +22 -0
- package/superpowers/skills/diagnosing-superpowers/references/github-issues.md +47 -0
- package/superpowers/skills/diagnosing-superpowers/references/redaction-policy.md +34 -0
- package/superpowers/skills/diagnosing-superpowers/references/session-discovery.md +31 -0
- package/superpowers/skills/diagnosing-superpowers/templates/bundle-README.md +77 -0
- package/superpowers/skills/diagnosing-superpowers/templates/case.md +64 -0
- package/superpowers/skills/diagnosing-superpowers/templates/issue.md +51 -0
- package/superpowers/skills/diagnosing-superpowers/templates/report.md +82 -0
- package/superpowers/skills/executing-plans/SKILL.md +350 -41
- package/superpowers/skills/executing-plans/scripts/task-done +52 -0
- package/superpowers/skills/executing-plans/scripts/task-start +28 -0
- package/superpowers/skills/requesting-code-review/SKILL.md +1 -1
- package/superpowers/skills/requesting-code-review/code-reviewer.md +17 -0
- package/superpowers/skills/subagent-driven-development/SKILL.md +18 -18
- package/superpowers/skills/subagent-driven-development/re-review-prompt.md +1 -1
- package/superpowers/skills/subagent-driven-development/scripts/review-package +53 -46
- package/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +82 -40
- package/superpowers/skills/subagent-driven-development/scripts/task-brief +43 -41
- package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +2 -2
- package/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/superpowers/skills/test-driven-development/SKILL.md +10 -0
- package/superpowers/skills/using-superpowers/SKILL.md +2 -0
- package/superpowers/skills/using-superpowers/references/claude-code-tools.md +29 -0
- package/superpowers/skills/using-superpowers/references/muse-tools.md +35 -0
- package/superpowers/skills/writing-plans/SKILL.md +30 -9
- package/superpowers/skills/writing-skills/SKILL.md +4 -2
- package/superpowers/skills/writing-skills/graphviz-conventions.dot +171 -171
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 跨平台 .tar.gz 解压工具。
|
|
5
|
+
*
|
|
6
|
+
* 用 zlib + 手写 tar parser,避开 OS shell tar(Windows 上是 bsdtar、行为不完全一致),
|
|
7
|
+
* 与仓库「脚本语言统一 Node.js、禁止平台绑定脚本」的约定一致。
|
|
8
|
+
*
|
|
9
|
+
* 支持:
|
|
10
|
+
* - gzip 压缩的 tar(GitHub tarball / npm registry tgz 都是这种)
|
|
11
|
+
* - 目录项(type '5' 或名字以 '/' 结尾)
|
|
12
|
+
* - 跳过 pax 扩展头('g'/'x')等元数据伪条目
|
|
13
|
+
* - 路径穿越防护(拒绝 ../ 逃逸 destDir)
|
|
14
|
+
*
|
|
15
|
+
* 不支持(上游 tarball 均不使用,遇到时跳过而非静默损坏):
|
|
16
|
+
* - GNU longname/longlink('L'/'K')—— 超过 100 字符的路径
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const fs = require('fs');
|
|
20
|
+
const path = require('path');
|
|
21
|
+
const zlib = require('zlib');
|
|
22
|
+
|
|
23
|
+
// 非文件、非目录的 tar 条目类型(pax 扩展头、GNU 长名等)
|
|
24
|
+
const META_TYPE_FLAGS = new Set(['g', 'x', 'L', 'K', 'V', 'N']);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 解析 tar buffer,返回条目列表(不落盘)。
|
|
28
|
+
* @param {Buffer} data - 已解压的 tar 数据
|
|
29
|
+
* @returns {Array<{name: string, size: number, typeFlag: string, dataStart: number}>}
|
|
30
|
+
*/
|
|
31
|
+
function listTar(data) {
|
|
32
|
+
const entries = [];
|
|
33
|
+
let off = 0;
|
|
34
|
+
while (off + 512 <= data.length) {
|
|
35
|
+
const header = data.subarray(off, off + 512);
|
|
36
|
+
off += 512;
|
|
37
|
+
|
|
38
|
+
// 连续两个 512 字节零块 = tar 终止
|
|
39
|
+
if (header.every(b => b === 0)) break;
|
|
40
|
+
|
|
41
|
+
// 文件名 header[0..100](NUL 终止)
|
|
42
|
+
let nameEnd = 0;
|
|
43
|
+
while (nameEnd < 100 && header[nameEnd] !== 0) nameEnd++;
|
|
44
|
+
const name = header.subarray(0, nameEnd).toString('utf-8');
|
|
45
|
+
|
|
46
|
+
// 文件大小 header[124..136](八进制 ASCII)
|
|
47
|
+
const size = parseInt(header.subarray(124, 136).toString('utf-8').trim(), 8) || 0;
|
|
48
|
+
|
|
49
|
+
// 类型标志 header[156]('0'/NUL = 普通文件,'5' = 目录)
|
|
50
|
+
const typeFlag = String.fromCharCode(header[156]);
|
|
51
|
+
|
|
52
|
+
entries.push({ name, size, typeFlag, dataStart: off });
|
|
53
|
+
off += Math.ceil(size / 512) * 512;
|
|
54
|
+
}
|
|
55
|
+
return entries;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 解压 .tar.gz buffer 到目标目录。
|
|
60
|
+
* @param {Buffer} compressed - .tar.gz 文件内容
|
|
61
|
+
* @param {string} destDir - 解压目标根目录(不存在则创建)
|
|
62
|
+
* @returns {{files: number, dirs: number}} 落盘计数
|
|
63
|
+
*/
|
|
64
|
+
function extractTarGz(compressed, destDir) {
|
|
65
|
+
const data = zlib.gunzipSync(compressed);
|
|
66
|
+
const root = path.resolve(destDir);
|
|
67
|
+
let files = 0;
|
|
68
|
+
let dirs = 0;
|
|
69
|
+
|
|
70
|
+
for (const entry of listTar(data)) {
|
|
71
|
+
if (!entry.name) continue;
|
|
72
|
+
// 跳过 pax 扩展头等元数据伪条目
|
|
73
|
+
if (META_TYPE_FLAGS.has(entry.typeFlag)) continue;
|
|
74
|
+
|
|
75
|
+
const target = path.resolve(root, entry.name);
|
|
76
|
+
// 路径穿越防护:解压目标必须落在 destDir 内
|
|
77
|
+
if (target !== root && !target.startsWith(root + path.sep)) continue;
|
|
78
|
+
|
|
79
|
+
if (entry.typeFlag === '5' || entry.name.endsWith('/')) {
|
|
80
|
+
fs.mkdirSync(target, { recursive: true });
|
|
81
|
+
dirs += 1;
|
|
82
|
+
} else {
|
|
83
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
84
|
+
fs.writeFileSync(target, data.subarray(entry.dataStart, entry.dataStart + entry.size));
|
|
85
|
+
files += 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return { files, dirs };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
module.exports = { extractTarGz, listTar };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 上游内容拉取的共享工具。
|
|
5
|
+
*
|
|
6
|
+
* 维护者侧(cbbm update --upstream-*)需要访问 GitHub / npm registry。
|
|
7
|
+
* 本模块提供:
|
|
8
|
+
* - 镜像前缀列表加载(config/upstream-mirrors.json,仓库内维护)
|
|
9
|
+
* - 带重定向跟随的 HTTPS GET
|
|
10
|
+
* - 「按镜像列表依次尝试」的拉取策略(首个成功即用)
|
|
11
|
+
*
|
|
12
|
+
* 镜像前缀为空字符串表示直连;列表末位通常放 "" 作为兜底。
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
const https = require('https');
|
|
17
|
+
const path = require('path');
|
|
18
|
+
|
|
19
|
+
const SHARED_STANDARDS_DIR = path.join(__dirname, '..', '..', '..');
|
|
20
|
+
const MIRRORS_FILE = path.join(SHARED_STANDARDS_DIR, 'config', 'upstream-mirrors.json');
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 读取指定上游的镜像前缀列表。
|
|
24
|
+
* 文件缺失 / 解析失败 / 未配置该上游时返回 [''](仅直连)。
|
|
25
|
+
* @param {string} name - 上游名(如 'superpowers')
|
|
26
|
+
* @returns {string[]}
|
|
27
|
+
*/
|
|
28
|
+
function loadMirrors(name) {
|
|
29
|
+
try {
|
|
30
|
+
const data = JSON.parse(fs.readFileSync(MIRRORS_FILE, 'utf-8'));
|
|
31
|
+
const list = data[name];
|
|
32
|
+
if (Array.isArray(list) && list.length > 0) {
|
|
33
|
+
return list.map(m => String(m));
|
|
34
|
+
}
|
|
35
|
+
} catch (_) { /* 回退到直连 */ }
|
|
36
|
+
return [''];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 发起 HTTPS GET,跟随重定向(最多 8 次),返回响应体 Buffer。
|
|
41
|
+
* @param {string} url
|
|
42
|
+
* @param {number} [redirectCount]
|
|
43
|
+
* @returns {Promise<Buffer>}
|
|
44
|
+
*/
|
|
45
|
+
function httpsGetBuffer(url, redirectCount = 0) {
|
|
46
|
+
if (redirectCount > 8) return Promise.reject(new Error('Too many redirects'));
|
|
47
|
+
return new Promise((resolve, reject) => {
|
|
48
|
+
https.get(url, { headers: { 'User-Agent': 'cbb-cli' } }, res => {
|
|
49
|
+
if ([301, 302, 307, 308].includes(res.statusCode) && res.headers.location) {
|
|
50
|
+
res.resume();
|
|
51
|
+
return httpsGetBuffer(res.headers.location, redirectCount + 1).then(resolve, reject);
|
|
52
|
+
}
|
|
53
|
+
if (res.statusCode !== 200) {
|
|
54
|
+
res.resume();
|
|
55
|
+
return reject(new Error(`HTTP ${res.statusCode}: ${url}`));
|
|
56
|
+
}
|
|
57
|
+
const chunks = [];
|
|
58
|
+
res.on('data', c => chunks.push(c));
|
|
59
|
+
res.on('end', () => resolve(Buffer.concat(chunks)));
|
|
60
|
+
res.on('error', reject);
|
|
61
|
+
}).on('error', reject);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 按镜像列表依次尝试拉取,首个成功即返回。
|
|
67
|
+
* @param {string[]} mirrors - 镜像前缀列表('' = 直连)
|
|
68
|
+
* @param {(prefix: string) => string} buildUrl - 由前缀构造完整 URL
|
|
69
|
+
* @returns {Promise<{buffer: Buffer, mirror: string, url: string}>}
|
|
70
|
+
*/
|
|
71
|
+
async function fetchWithMirrors(mirrors, buildUrl) {
|
|
72
|
+
const errors = [];
|
|
73
|
+
for (const mirror of mirrors) {
|
|
74
|
+
const url = buildUrl(mirror);
|
|
75
|
+
try {
|
|
76
|
+
const buffer = await httpsGetBuffer(url);
|
|
77
|
+
return { buffer, mirror, url };
|
|
78
|
+
} catch (err) {
|
|
79
|
+
errors.push(`${mirror || '(直连)'}: ${err.message}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
throw new Error(`所有镜像均失败:\n ${errors.join('\n ')}`);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
module.exports = {
|
|
86
|
+
MIRRORS_FILE,
|
|
87
|
+
loadMirrors,
|
|
88
|
+
httpsGetBuffer,
|
|
89
|
+
fetchWithMirrors,
|
|
90
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "CBB: Worktree Close"
|
|
3
|
-
description: 关闭/清理由 init
|
|
3
|
+
description: 关闭/清理由 worktree-init 创建的多仓库联动 worktree 工作空间,移除 worktree 并按用户选择处理特性分支
|
|
4
4
|
category: Workflow
|
|
5
5
|
tags: [worktree, cleanup, worktree, git-worktree]
|
|
6
6
|
---
|
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
# 业务空间使用说明(AI Agent 导航)
|
|
2
|
-
|
|
3
|
-
本目录是由 `@jspg-ai/coding-bb` 初始化的**多仓库联动开发业务空间**。
|
|
4
|
-
进入本目录工作时,请先按本文件理解目录职责与协作约定,再动手。
|
|
5
|
-
|
|
6
|
-
## 核心约定
|
|
7
|
-
|
|
8
|
-
1.
|
|
9
|
-
2. **AI 配置安装在空间根**:编码规范、OpenSpec 命令、worktree 管理技能都装在本目录(`cbb setup` / `cbb update` 安装);worktree 内**不安装** AI 配置,AI 会话始终以空间根为基础。
|
|
10
|
-
3. **接到新需求先建 worktree**:在本目录执行 `/cbb:worktree-init <需求名>`(opencode 写法:`/cbb-worktree-init`)。它会为 `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/` | AI 工具适配目录:编码规范规则、OpenSpec 命令、worktree 管理命令 | 由 cbb 按 setup 时选择的工具安装;已 gitignore,不提交,勿手动改 |
|
|
24
|
-
| `.cbb/` | cbb 安装清单 + worktree 运行时(`.cbb/skills/`:流程文档与脚本,各工具命令共用) | 由 cbb 管理;**勿手动编辑** |
|
|
25
|
-
|
|
26
|
-
## 典型流程
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
本目录:/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
|
-
> 命令写法因 AI 工具而异:Claude Code / Qoder 为 `/cbb:worktree-init
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
本文件由 `@jspg-ai/coding-bb` 生成(仅缺失时写入,之后不会覆盖或删除,可自由增补团队约定)。
|
|
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 <需求名>`(opencode 写法:`/cbb-worktree-init`)。它会为 `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 管理命令 | 由 cbb 按 setup 时选择的工具安装;已 gitignore,不提交,勿手动改 |
|
|
24
|
+
| `.cbb/` | cbb 安装清单 + worktree 运行时(`.cbb/skills/`:流程文档与脚本,各工具命令共用) | 由 cbb 管理;**勿手动编辑** |
|
|
25
|
+
|
|
26
|
+
## 典型流程
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
本目录:/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
|
+
> 命令写法因 AI 工具而异:Claude Code / Qoder / WorkBuddy / Trae 为 `/cbb:worktree-init`、`/opsx:propose`;opencode 因「文件名即命令名」且 Windows 文件名不允许 `:`,扁平化为 `/cbb-worktree-init`、`/opsx-propose`。
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
本文件由 `@jspg-ai/coding-bb` 生成(仅缺失时写入,之后不会覆盖或删除,可自由增补团队约定)。
|
|
40
|
+
|
|
41
|
+
> ⓘ 本文件仅供导航;目录纪律以 cbb 安装的编码规范规则(`cbb-ai-behavior.md` 第 8 条)为准,该规则随 `cbb update` 更新。
|
package/openspec/.version
CHANGED