@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
@@ -7,7 +7,9 @@ require('./silence-popup');
7
7
  * node push-worktrees.js <wt_path> # wt_path 必须是 <ws_root>/.worktrees/worktree-<branch> 形态
8
8
  *
9
9
  * 行为:
10
- * 1. 扫描 <ws_root>/.worktrees/worktree-<branch>/ 下所有 git 仓库(workspace + 各 app 子 worktree)
10
+ * 1. 按需求名发现参与仓库(ADR 0002 双布局):
11
+ * - worktree 布局:.worktrees/worktree-<branch>/ 的 workspace + 其 .codespace/<app>/ 容器内各 app worktree(镜像主布局,ADR 0003)
12
+ * - 本地布局:根 / .codespace/<app>/ 检出恰在 <branch> 分支上
11
13
  * 2. 对每个仓库调 push-core.pushSingle(已建立 upstream 时直接 push -u;否则建立 upstream)
12
14
  * 3. 逐个报告状态,输出末行 PUSH_RESULT
13
15
  *
@@ -28,6 +30,7 @@ require('./silence-popup');
28
30
  const { pushSingle } = require('./push-core');
29
31
  const fs = require('fs');
30
32
  const path = require('path');
33
+ const { execSync } = require('child_process');
31
34
 
32
35
  function resolveInputs(argv) {
33
36
  // argv[2] 单独:wt_path 形式
@@ -56,35 +59,79 @@ function isGitRepo(p) {
56
59
  }
57
60
  }
58
61
 
62
+ /** 读取 CBB-WORKSPACE.json 的 app 名列表(旧布局兼容判定用;缺失返回 []) */
63
+ function loadAppNames(wsRoot) {
64
+ try {
65
+ const cfg = JSON.parse(fs.readFileSync(path.join(wsRoot, 'CBB-WORKSPACE.json'), 'utf-8'));
66
+ return Array.isArray(cfg.apps) ? cfg.apps.map(a => a.name).filter(Boolean) : [];
67
+ } catch (e) {
68
+ return [];
69
+ }
70
+ }
71
+
72
+ function currentBranch(p) {
73
+ try {
74
+ return execSync('git branch --show-current', { cwd: p, encoding: 'utf-8', stdio: ['ignore', 'pipe', 'pipe'] }).toString().trim();
75
+ } catch (e) { return ''; }
76
+ }
77
+
59
78
  /**
60
- * 扫描 worktree 下的所有 git 仓库
61
- * - workspace worktree:<ws_root>/.worktrees/worktree-<branch>/ 本身
62
- * - app worktree:<ws_root>/.worktrees/worktree-<branch>/<app_name>/(嵌套子目录)
79
+ * 按需求名发现参与仓库(ADR 0002 双布局):
80
+ * 布局一 worktree:.worktrees/worktree-<branch>/ 的 workspace + 其 .codespace/<app>/ 容器内 app worktree(ADR 0003 镜像主布局;≤beta.23 旧平铺顶层布局按配置 app 名兼容)
81
+ * 布局二 本地模式:根 / .codespace/<app>/ 的检出恰在 <branch> 分支上(同名仓库以 worktree 布局优先)
82
+ * 两者皆空 → error。
63
83
  */
64
84
  function scanWorktreeRepos(wsRoot, branch) {
65
85
  const wtRoot = path.join(wsRoot, '.worktrees', 'worktree-' + branch);
66
86
  const repos = [];
67
87
 
68
- if (!fs.existsSync(wtRoot)) {
69
- return { wtRoot, repos, error: 'worktree 目录不存在:' + wtRoot };
88
+ // 布局一:worktree
89
+ if (fs.existsSync(wtRoot)) {
90
+ if (isGitRepo(wtRoot)) {
91
+ repos.push({ name: 'workspace', wt: wtRoot, repo: wsRoot, layout: 'worktree' });
92
+ }
93
+ // app worktree 收拢在 .codespace/ 容器内(镜像主布局,ADR 0003)
94
+ const appContainer = path.join(wtRoot, '.codespace');
95
+ if (fs.existsSync(appContainer)) {
96
+ for (const e of fs.readdirSync(appContainer, { withFileTypes: true })) {
97
+ if (!e.isDirectory()) continue;
98
+ const appWt = path.join(appContainer, e.name);
99
+ if (!isGitRepo(appWt)) continue;
100
+ repos.push({ name: e.name, wt: appWt, repo: path.join(wsRoot, '.codespace', e.name), layout: 'worktree' });
101
+ }
102
+ }
103
+ // 兼容 ≤beta.23 旧平铺布局:按配置 app 名精确匹配(避免把根仓库自带的嵌套 git 目录误判为 app)
104
+ for (const name of loadAppNames(wsRoot)) {
105
+ if (repos.some(r => r.name === name)) continue;
106
+ const legacyWt = path.join(wtRoot, name);
107
+ if (fs.existsSync(path.join(legacyWt, '.git'))) {
108
+ console.error('⚠️ ' + name + ' 仍是旧平铺布局(' + legacyWt + '),建议重跑 cbb-worktree-init 迁移到 .codespace/ 容器');
109
+ repos.push({ name, wt: legacyWt, repo: path.join(wsRoot, '.codespace', name), layout: 'worktree' });
110
+ }
111
+ }
70
112
  }
71
113
 
72
- // workspace worktree(自身是 git worktree)
73
- if (isGitRepo(wtRoot)) {
74
- repos.push({ name: 'workspace', wt: wtRoot, repo: wsRoot });
114
+ // 布局二:本地模式(检出在需求分支上)
115
+ const names = new Set(repos.map(r => r.name));
116
+ if (!names.has('workspace') && isGitRepo(wsRoot) && currentBranch(wsRoot) === branch) {
117
+ repos.push({ name: 'workspace', wt: wsRoot, repo: wsRoot, layout: 'local' });
75
118
  }
76
-
77
- // app worktree(嵌套子目录)
78
- const entries = fs.readdirSync(wtRoot, { withFileTypes: true });
79
- for (const e of entries) {
80
- if (!e.isDirectory()) continue;
81
- // 跳过 . 开头的隐藏目录(如 .va、.claude、.qoder)
82
- if (e.name.startsWith('.')) continue;
83
- const appWt = path.join(wtRoot, e.name);
84
- if (!isGitRepo(appWt)) continue;
85
- repos.push({ name: e.name, wt: appWt, repo: path.join(wsRoot, '.codespace', e.name) });
119
+ const codeDir = path.join(wsRoot, '.codespace');
120
+ if (fs.existsSync(codeDir)) {
121
+ for (const name of fs.readdirSync(codeDir).sort()) {
122
+ if (names.has(name)) continue;
123
+ const appDir = path.join(codeDir, name);
124
+ if (!isGitRepo(appDir)) continue;
125
+ if (currentBranch(appDir) === branch) {
126
+ repos.push({ name, wt: appDir, repo: appDir, layout: 'local' });
127
+ }
128
+ }
86
129
  }
87
- return { wtRoot, repos, error: null };
130
+
131
+ const error = repos.length === 0
132
+ ? ('未发现需求 ' + branch + ' 的参与仓库(worktree 不存在,且无仓库检出在 ' + branch + ' 分支上)')
133
+ : null;
134
+ return { wtRoot, repos, error };
88
135
  }
89
136
 
90
137
  /**
@@ -4,7 +4,7 @@
4
4
  // koffi is resolved from cbb global install (no local node_modules needed).
5
5
  //
6
6
  // 唯一真源:cbb/worktrees/_shared/scripts/silence-popup.js
7
- // 由 scripts/sync-shared.js 展开到各 skill 的 scripts/ 下(init / extend / close / push)。
7
+ // 由 scripts/sync-shared.js 展开到各 skill 的 scripts/ 下(init / close / push / local-mode)。
8
8
  // skill 内同目录引用:脚本第一行 `require('./silence-popup')`。
9
9
  if (process.platform === 'win32') {
10
10
  try {
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "AI 开发工作空间配置样例(请勿修改本文件,复制为工作空间根目录的 workspace-config.json 后编辑使用)。apps 数组中每个对象需包含:name(应用名,同时作为 .codespace/ 子目录名)、repo(Git 仓库地址,支持 SSH 或 HTTPS)、side(仓库类型,'front' 表示前端工程,'back' 表示后端工程,'mixed' 表示前后端混合工程);可选 desc(该应用的职责描述,便于人与 AI 理解应用分工)。",
2
+ "_comment": "AI 开发工作空间配置样例(请勿修改本文件,复制为工作空间根目录的 CBB-WORKSPACE.json 后编辑使用)。apps 数组中每个对象需包含:name(应用名,同时作为 .codespace/ 子目录名)、repo(Git 仓库地址,支持 SSH 或 HTTPS)、side(仓库类型,'front' 表示前端工程,'back' 表示后端工程,'mixed' 表示前后端混合工程);可选 desc(该应用的职责描述,便于人与 AI 理解应用分工)。",
3
3
  "apps":
4
4
  [
5
5
  {
@@ -224,6 +224,14 @@ apply:
224
224
 
225
225
  `plan.md` 跟 change 同住一个目录,archive 阶段会被一起带走。
226
226
 
227
+ **收尾(全部任务翻成 `- [x]` 后执行;本段为项目级硬约束,覆盖官方 apply 模板自带的完成提示语):**
228
+
229
+ 1. **未决项自检**(逐项确认,任何一项未过都不得宣布完成):
230
+ - change 产物(proposal.md / design.md / specs/** / tasks.md / plan.md)已提交到需求分支(轻量模式:空间根 main 分支);未提交时先询问用户是否现在提交(可随 cbb-worktree-push 一并推送;轻量模式提交后即 push)
231
+ - 本会话产生的临时文件与环境改动(备份目录、未回写远端的本地提交、cherry-pick 等)已列清并交用户决策
232
+ 2. **输出顺序纪律**:存在未决项时,本轮只列未决项并等待用户决策;**禁止同轮输出"下一步建议"**,禁止出现"规划与实施均已完成""可运行 archive"之类表述(产物未提交时归档会丢规划产物)
233
+ 3. **全部未决项关闭后,唯一可建议的下一步是 `/opsx:verify`**:本项目工作流为 propose → apply → verify → archive,verify(强制 code-review + 产出 cr.md)是 archive 的前置阶段;**禁止直接建议 archive**,官方模板的 "You can archive this change" 提示语以本段为准
234
+
227
235
  verify:
228
236
  tracks: cr.md
229
237
  requires: [tasks]
@@ -236,3 +244,15 @@ verify:
236
244
  即便 AI 自认能 review,仍必须调 skill。
237
245
  2. **MANDATORY 产出 `cr.md`**:把完整 Verification Report 写到 `openspec/changes/<name>/cr.md`,
238
246
  缺则视为 verify 未完成。报告必须包含五段:Summary / CRITICAL / WARNING / SUGGESTION / Code Review。
247
+
248
+ **收尾(cr.md 产出且无 CRITICAL 遗留后执行;本段为项目级硬约束,覆盖官方 verify 模板自带的完成提示语):**
249
+
250
+ verify 通过后,用 AskUserQuestion(固定选项)向用户提供两条路径并等待选择,禁止替用户决定、禁止单一路径直接建议归档:
251
+
252
+ - **路径 A · 先验收后归档(推荐)**:执行 `cbb-worktree-push` 推送 feature 分支并提 MR 到测试分支 → 测试环境部署、用户验收 → 验收要改则在 worktree 内修复后再次 push(小改动无需重跑 verify)→ 验收通过后才 `/opsx:archive`
253
+ - **路径 B · 先归档后推送**:立即 `/opsx:archive` 落定变更产物(归档移动与 spec 同步发生在 feature 分支上)→ 再执行 `cbb-worktree-push` 一并推送 → 提 MR 到测试分支验收。注意:验收若发现问题,产物已归档,修复需走新 change 或将归档移回后继续;适合改动小、验收把握大的场景
254
+ - **Step 7 交付选择(ADR 0008)**:两条路径的 `cbb-worktree-push` 推送完成后,除「提 MR」外均可选「直接合并」——合测试分支不要求归档,合主干要求已归档 + 强提醒确认;合并成功不删分支(删除归 `cbb-worktree-close` 收尾门禁)
255
+
256
+ 用户选定后按该路径执行;官方模板的单一 "suggest archive" 提示语以本段为准。
257
+
258
+ **轻量模式变体**(本次 change 完全不涉及应用代码,产物在空间根仓库):无 worktree push / 测试分支 MR 环节,两条路径替换为——A(推荐)"先 push main 交付、观察无回归后再 archive" / B"立即 archive 落定产物,再 push main";main 提交不得悬空本地。
@@ -8,5 +8,10 @@
8
8
  "openspec": [
9
9
  "https://registry.npmmirror.com",
10
10
  "https://registry.npmjs.org"
11
+ ],
12
+ "external": [
13
+ "https://gh-proxy.com/",
14
+ "https://ghfast.top/",
15
+ ""
11
16
  ]
12
17
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "repo": "anthropics/skills",
3
+ "ref": "41bbe19d1a1a7eaab5e7bb9050a417e5c6cffc8f",
4
+ "path": "skills/frontend-design",
5
+ "updatedAt": "2026-09-28T07:10:02.694Z"
6
+ }
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: frontend-design
3
+ description: Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ # Frontend Design
8
+
9
+ Approach this as the design lead at a design studio known for giving every client a distinct visual identity that is not mistaken for anyone else's. This client has already rejected proposals that felt cliché or templated, and is paying for a distinctive point of view: make deliberate, opinionated choices about palette, typography, and layout that are specific to this brief, and take aesthetic risk if justified.
10
+
11
+ ## Ground your designs in the subject matter
12
+
13
+ If the brief does not identify what the product or subject matter is, identify it yourself before designing, and confirm with the client. You can come up with one concrete subject, the design's audience, and the design's primary job, as a proposal. If there's any information in your memory about the client's preferences or context about what they're building, use that as a hint. The subject's industry, subject matter, materials, and vernacular are where distinctive visual choices come from — a design for a toy for girls aged 8–11 will be very aesthetically different from a dashboard for financial analysts. Build with the brief's real content and subject matter throughout.
14
+
15
+ ## Design principles
16
+
17
+ For web designs, the hero is the first thing viewers will see. Open with the most characteristic thing in the subject's world, in the form that is most appropriate: a headline, an image, an animation, a live demo, an interactive moment, or other treatments. Be deliberate with your choice: a big number with a small label, supporting stats, and a gradient accent is the default treatment, so only use it if that's truly the best option.
18
+
19
+ Typography carries the personality of the page. You don't need a different typeface for display or headline text and body content: use one family or two, and if two, make them clearly distinct.
20
+
21
+ Choose your typefaces deliberately, not the default families you would reach for on any other project, and set a clear type scale following the default guidance of The Elements of Typographic Style with intentional weights, widths, and spacing. When type is used as a headline or visual element, use the type treatment itself as an active part of the design, not a neutral delivery vehicle for the content.
22
+
23
+ Default to line lengths of less than 80 characters. Serif typefaces can have slightly longer line lengths; give serif body text slightly more line-height than a sans-serif.
24
+
25
+ Avoid these default typographic treatments; they are the commonest tells of a generated page:
26
+ - Accenting just a single word or phrase in a headline, like putting one word in italic/bold or a different color.
27
+ - Using all caps for labels.
28
+ - Adding unnecessary typographic labels above content.
29
+
30
+ Visual structure is information. Structural devices like outlines, borders, numbering, eyebrows, dividers, labels, etc., encode useful information about the content rather than decorate it. Many generic designs use numbered markers (01 / 02 / 03), but that's only appropriate if the content actually is a sequence — like a stepped process or a timeline. Before adding numbered markers, check the content really is a sequence.
31
+
32
+ Use non-user-triggered motion sparingly and deliberately, only to draw attention. A single orchestrated moment — one page-load sequence or one reveal — lands better than scattered effects; fade-and-slide-up entrances on each section and hover transitions on every card are the generic default and read as AI-generated. Motion that answers a person's action (opening, expanding, confirming) is welcome when it shows what changed.
33
+
34
+ Consider written content carefully. Often a design brief may not contain real content, and it's up to you to come up with copy and placeholder content. Copy can make a design feel as templated as the design itself. See the below section on writing for more guidance.
35
+
36
+ ## Process: plan, review against the brief, build, critique
37
+
38
+ For calibration, AI-generated design right now clusters around some traits:
39
+ 1. a warm cream background (near #F4F1EA) with a high-contrast serif display and a terracotta or warm-clay accent (often near #D97757 — Anthropic's own Claude-interaction accent, so on a user's brief it reads as a tell);
40
+ 2. a near-black background with a single bright acid-green or vermilion accent;
41
+ 3. a broadsheet-style layout with hairline rules, zero border-radius, and dense newspaper-like columns;
42
+ 4. the SaaS-card kit: content chopped into identical rounded cards, one border-radius on everything regardless of hierarchy, the same soft grey shadow (rgba(0,0,0,.1)) under each, and gradient washes as decoration;
43
+ 5. template chrome that appears whatever the subject: a tracked-out ALL-CAPS eyebrow label above every heading; meta strings joined with middle dots ('A · B · C'); labels built as 'WORD — fragment' with a spaced em dash; tinted near-black (#0B0B0B, #111) standing in for black; a monospace face for small data labels; a '→' appended to link and button text.
44
+
45
+ All traits are legitimate for some briefs, but they are defaults rather than choices, and they appear regardless of subject. Where the brief pins down a visual direction, follow it exactly — the brief's own words always win, including when it asks for one of these looks. Where it leaves an axis free, don't spend that freedom on one of these defaults. As with a hired human designer, there's often a careful balance between doing what you're good at and taking each project as a chance to experiment and learn.
46
+
47
+ Work in two passes. First, brainstorm a short design plan based on the client's design brief: create a compact token system with color, type, layout, and principles.
48
+ - Color: describe the core base palette as 4–6 named hex values.
49
+ - Type: the typefaces and their roles.
50
+ - Layout: a layout concept, using one-sentence prose descriptions and ASCII wireframes to ideate and compare. Include alignment guidance; should the content be left aligned, center aligned, justified?
51
+ - Principles: the high-level guidance for what makes this page unique.
52
+
53
+ Then review that plan against the brief before building: if any part of it reads like the generic default you would produce for any similar page (work through a similar prompt to see if you arrive somewhere similar) rather than a choice made for this specific brief — revise that part, say what you changed and why. Only after you've confirmed the relative uniqueness of your design plan should you start to write the code, following the revised plan.
54
+
55
+ When writing the code, be careful of structuring your CSS selector specificities. It's easy to generate CSS classes that cancel each other out (especially with a type-based selector like .section and an element-based selector like .cta). This can happen often with padding/margin between sections.
56
+
57
+ ## Restraint and self-critique
58
+
59
+ Spend your boldness in one place. Let one element be the memorable thing, keep everything around it quiet and disciplined, and cut any decoration that does not serve the brief. Build to a quality floor without announcing it: responsive down to mobile, visible keyboard focus, reduced motion respected, visually accessible, harmonious color palettes. Critique your own work as you build, taking screenshots to review if your environment supports it — a picture is worth 1000 tokens. Consider Chanel's advice: before leaving the house, take a look in the mirror and remove one accessory. Human creatives have memory and always try to do something new, so if you have a space to quickly jot down notes about what you've tried, it can help you in future passes.
60
+
61
+ ## More on writing in design
62
+
63
+ Words appear in a design for one reason: to make it easier to understand and use. They are design content, not decoration. Bring the same intentionality and minimalism to copywriting that you would bring to spacing and color. Before writing anything, ask what the design needs to say, and how it can best be said to help the person navigate the experience.
64
+
65
+ Write from the end user's perspective. Name things by what users will understand in simple language, not by how the system is built. A user manages notifications, not webhook config. Describe what something is or does in plain terms rather than selling it. Being specific and legible to new users is always better than being clever.
66
+
67
+ Use active voice as default. A CTA says exactly what happens when it is used: "Save changes," not "Submit." An action keeps the same name through the whole flow, so the button that says "Publish" produces a toast that says "Published." The vocabulary of an interface is the signposting for someone navigating the product. Cohesion and consistency are how people learn their way around.
68
+
69
+ Treat failure and emptiness as moments for direction, not mood. Explain what went wrong and how to fix it, in the interface's voice rather than a person's. Errors don't apologize, and they are never vague about what happened. An empty screen is an invitation to act.
70
+
71
+ Keep the tone conversational: plain verbs, sentence case, no filler, with tone matched to the brand and the audience. Let each written element do exactly one job.
package/openspec/.version CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.13.1",
2
+ "version": "1.13.2",
3
3
  "repo": "Fission-AI/OpenSpec",
4
- "renderedAt": "2026-09-19T13:22:53.815Z"
4
+ "renderedAt": "2026-09-28T07:29:28.008Z"
5
5
  }
@@ -80,20 +80,27 @@ In both branches, never create the root as a side effect: do not run `openspec i
80
80
 
81
81
  3. **Check task completion status**
82
82
 
83
- Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
84
-
85
- A checkbox is complete when its only content is `x` or `X`; spacing inside
86
- the brackets does not matter, so `- [ x]` counts as complete too. Every
87
- other marker is incomplete - `- [ ]`, an empty `- []`, and markers OpenSpec
88
- assigns no meaning to such as `- [~]` or `- [-]`. Never read an unfamiliar
89
- marker as complete.
83
+ Run `openspec list --json` with the same selected-root flags and find the
84
+ entry in `changes` whose `name` exactly matches the selected change.
85
+ Require exactly one match and nonnegative integer `totalTasks` and
86
+ `completedTasks`, with `completedTasks <= totalTasks`. The CLI resolves
87
+ the schema's tracked task files, including custom artifact names, output
88
+ paths, and globs.
89
+ Incomplete tasks = `totalTasks - completedTasks`.
90
+
91
+ Do not infer task completion from artifact status or the absence of a
92
+ top-level `tasks.md`. If the lookup fails, returns invalid JSON, omits or
93
+ duplicates the selected change, or returns invalid counts, report the problem
94
+ and stop before syncing or archiving.
95
+ The CLI counts only `x`/`X` checkbox markers as complete;
96
+ other markers, including unfamiliar ones, remain incomplete.
90
97
 
91
98
  **If incomplete tasks found:**
92
99
  - Display warning showing count of incomplete tasks
93
100
  - Prompt user for confirmation to continue
94
101
  - Proceed if user confirms
95
102
 
96
- **If no tasks file exists:** Proceed without task-related warning.
103
+ **If `totalTasks` is zero:** Proceed without a task-related warning.
97
104
 
98
105
  4. **Assess delta spec sync state**
99
106
 
@@ -36,7 +36,7 @@ In both branches, never create the root as a side effect: do not run `openspec i
36
36
  2. **Prompt for change selection**
37
37
 
38
38
  Ask the user to choose changes (multi-select):
39
- - Show each change with its schema
39
+ - Show each change name and task status from the list output
40
40
  - Include an option for "All changes"
41
41
  - Allow any number of selections (1+ works, 2+ is the typical use case)
42
42
 
@@ -69,17 +69,24 @@ In both branches, never create the root as a side effect: do not run `openspec i
69
69
 
70
70
  3. **Batch validation - gather status for all selected changes**
71
71
 
72
+ Run `openspec list --json` once with the same selected-root flags for task
73
+ progress. If the lookup fails, returns invalid JSON, or omits any selected
74
+ change, contains a duplicate selected change, or returns invalid counts,
75
+ report the problem and stop before syncing or archiving the batch.
76
+
72
77
  For each selected change, collect:
73
78
 
74
79
  a. **Artifact status** - Run `openspec status --change "<name>" --json`
75
80
  - Parse `schemaName`, `artifacts`, `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`
76
81
  - Note which artifacts are `done` vs other states
77
82
 
78
- b. **Task completion** - Read `artifactPaths.tasks.existingOutputPaths` from status JSON
79
- - Complete means the checkbox holds only `x`/`X`, ignoring spacing
80
- (`- [ x]` is complete); every other marker is incomplete (`- [ ]`,
81
- `- []`, and unfamiliar ones such as `- [~]` or `- [-]`)
82
- - If no tasks file exists, note as "No tasks"
83
+ b. **Task completion** - Find the `changes` entry from the list response whose `name` exactly matches this change
84
+ - Require nonnegative integer `totalTasks` and `completedTasks`, with `completedTasks <= totalTasks`
85
+ - Incomplete tasks = `totalTasks - completedTasks`
86
+ - The CLI resolves the schema's tracked task files, including custom artifact names, output paths, and globs
87
+ - Do not infer task completion from artifact status, an artifact id of `tasks`, or the absence of a top-level `tasks.md`
88
+ - The CLI counts only `x`/`X` checkbox markers as complete; other markers remain incomplete
89
+ - If `totalTasks` is zero, note as "No tasks"
83
90
 
84
91
  c. **Delta specs** - Check `artifactPaths.specs.existingOutputPaths` from status JSON
85
92
  - List which capability specs exist
@@ -32,7 +32,6 @@ In both branches, never create the root as a side effect: do not run `openspec i
32
32
 
33
33
  When prompting, present the top 3-4 most recently modified changes as options, showing:
34
34
  - Change name
35
- - Schema (from `schema` field if present, otherwise "spec-driven")
36
35
  - Status (e.g., "0/5 tasks", "complete", "no tasks")
37
36
  - How recently it was modified (from `lastModified` field)
38
37
 
@@ -130,7 +130,7 @@ openspec list --json
130
130
 
131
131
  This tells you:
132
132
  - If there are active changes
133
- - Their names, schemas, and status
133
+ - Their names and task status
134
134
  - What the user might be working on
135
135
 
136
136
  That is the *change* list - work in flight. It does not include the project's durable capabilities, so list those too:
@@ -86,7 +86,7 @@ In both branches, never create the root as a side effect: do not run `openspec i
86
86
  - Dependencies are enablers, not gates: if a required artifact is still `blocked` only because you skipped a conditional dependency, write it anyway
87
87
  - Stop when every artifact in the required set is `done`, `skipped`, or was deliberately skipped
88
88
 
89
- c. **If an artifact requires user input** (unclear context):
89
+ c. **If an artifact requires user input** (critically unclear context):
90
90
  - Ask the user to clarify
91
91
  - Then continue with creation
92
92
 
@@ -373,7 +373,7 @@ Save to the `resolvedOutputPath` from `openspec instructions design --change "<n
373
373
 
374
374
  Finally, we break the work into implementation tasks—checkboxes that drive the apply phase.
375
375
 
376
- These should be small, clear, and in logical order.
376
+ 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.
377
377
  ```
378
378
 
379
379
  **DO:** Generate tasks based on specs and design:
@@ -396,12 +396,17 @@ Here are the implementation tasks:
396
396
 
397
397
  ---
398
398
 
399
- Each checkbox becomes a unit of work in the apply phase. Ready to implement?
399
+ Each checkbox becomes a unit of work in the apply phase. Does this task breakdown look right?
400
400
  ```
401
401
 
402
- **PAUSE** - Wait for user to confirm they're ready to implement.
402
+ **PAUSE** - Wait for user approval/feedback.
403
+
404
+ After approval, save to the `resolvedOutputPath` from `openspec instructions tasks --change "<name>" --json`.
405
+
406
+ Then ask:
407
+ > "Tasks are saved. Ready to implement?"
403
408
 
404
- Save to the `resolvedOutputPath` from `openspec instructions tasks --change "<name>" --json`.
409
+ **PAUSE** - Wait for user to confirm before implementation.
405
410
 
406
411
  ---
407
412