@xulthekl/team-flow 0.52.0 → 0.54.0
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/.claude/always/phase-guard.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/marketplace.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/.github/plugin/marketplace.json +2 -2
- package/AGENTS.md +3 -3
- package/CHANGELOG.md +140 -0
- package/GEMINI.md +1 -1
- package/HANDOFF.md +11 -0
- package/INSTALL.md +1 -1
- package/README.md +2 -2
- package/agents/prototype-builder.md +6 -5
- package/agents/prototype-env-scout.md +4 -4
- package/agents/release-archivist.md +5 -4
- package/docs/README_en.md +1 -1
- package/docs/usage-guide.md +4 -1
- package/gemini-extension.json +1 -1
- package/hooks/session-start +2 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/plugin.json +2 -2
- package/scripts/design-system-import.mjs +238 -0
- package/scripts/gen-primer.mjs +143 -0
- package/scripts/guard/checks/arch-merged.mjs +101 -0
- package/scripts/guard/checks/arch-snapshot.mjs +16 -3
- package/scripts/guard/design-token-guard.mjs +284 -63
- package/scripts/guard/guard.mjs +9 -1
- package/scripts/lib/arch-merge.mjs +407 -47
- package/scripts/lib/arch-parse.mjs +304 -26
- package/scripts/lib/cmd-arch.mjs +29 -1
- package/scripts/lib/cmd-publish.mjs +53 -6
- package/scripts/lib/cmd-state.mjs +2 -0
- package/scripts/lib/ds-parse.mjs +124 -0
- package/scripts/lib/prototype-sync.mjs +2 -1
- package/scripts/lib/state-loader.mjs +10 -0
- package/scripts/lib/test-merge.mjs +1 -1
- package/scripts/team-flow.mjs +14 -1
- package/scripts/token-extract.mjs +257 -0
- package/skills/architecture-design/templates/api.md +10 -4
- package/skills/design-system/SKILL.md +55 -9
- package/skills/design-system/references/agents/design-system-architect.md +44 -7
- package/skills/design-system/references/creation-flow.md +39 -5
- package/skills/design-system/references/showcase-board-b-end.md +78 -0
- package/skills/design-system/references/showcase-board-c-end.md +92 -0
- package/skills/design-system/references/token-derivation.md +34 -9
- package/skills/design-system/references/variant-schema.md +14 -3
- package/skills/prototype/SKILL.md +16 -10
- package/skills/prototype/references/builder-methodology.md +62 -5
- package/skills/prototype/references/craft/anti-ai-slop.md +1 -1
- package/skills/prototype/references/craft/state-coverage.md +8 -2
- package/skills/prototype/references/orchestration-flow.md +12 -3
- package/skills/prototype/references/prototype-scaffold/assets/design-tokens.css +2 -2
- package/skills/prototype/references/template.html +10 -10
- package/skills/release-archivist/SKILL.md +50 -33
- package/skills/release-archivist/references/closing-procedures.md +24 -4
- package/skills/workflow-bootstrap/SKILL.md +41 -20
- package/skills/workflow-orchestrator/references/state-model.md +3 -0
- package/templates/design-systems/references/claude.md +315 -0
- package/templates/design-systems/references/linear-app.md +370 -0
- package/templates/design-systems/references/notion.md +312 -0
- package/templates/design-systems/references/posthog.md +259 -0
- package/templates/design-systems/references/sentry.md +265 -0
- package/templates/design-systems/references/stripe.md +325 -0
- package/templates/design-systems/references/supabase.md +258 -0
- package/templates/design-systems/references/vercel.md +313 -0
- package/templates/design-systems/registry.json +75 -0
- package/templates/design-systems/styles.json +576 -0
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
派发插件 agent `prototype-env-scout`(只读,tools 硬限 Read/Bash/Grep/Glob),传入:PRD 路径、config 的 `prototype.designSystem`/`prototype.entry`、当前 git 分支。简报写在 response,主代理按需落盘。
|
|
21
21
|
|
|
22
22
|
子代理探查并产出环境简报:
|
|
23
|
-
-
|
|
23
|
+
- **设计系统现状**:`.team-flow/design-system/` 是否存在(base.md + 端变体)?**合并后** 9 段 schema 完整度?`primer.md` 是否存在且 digest 未过期?契约表组件数分档(<10 / 10-14 / ≥15)?
|
|
24
24
|
- **原型仓库分支**:当前分支、是否已有 `prototype/`、与 PRD 版本分支是否对齐
|
|
25
25
|
- **PRD 版本**:`iteration_version`、冻结状态、UI 功能点清单(§4/§7)
|
|
26
26
|
- **已有页面**:现有 prototype/ 页面/组件清单(迭代时)
|
|
@@ -50,7 +50,7 @@ LT 确认后进入 ③。**confirmed_plan 序列化**:将 scout 简报的选
|
|
|
50
50
|
|
|
51
51
|
## 步骤 ③ 原型绘制(子代理)
|
|
52
52
|
|
|
53
|
-
派发插件 agent `prototype-builder`(有 Write),传入:已确认的原型方案(含选定方向)、`design-system.md
|
|
53
|
+
派发插件 agent `prototype-builder`(有 Write),传入:已确认的原型方案(含选定方向)、`design_system_path`(`.team-flow/design-system/<variant>.md`,与 base.md 合并渲染)、`variant`、`prototype_root`、目标分支/版本、`prd_path`、`mode: default`(showcase 模式见 builder-methodology「Showcase 模式」——该模式豁免 `confirmed_plan`/`prd_path`)。
|
|
54
54
|
|
|
55
55
|
**⛔ 子代理 ID 记录(v0.29.1,必须执行)**:dispatch 后**立即记录**子代理 ID,后续 ⑤ 循环修正和 ⑥ 人工评审调整**必须通过此 ID 恢复子代理**,不得启动新子代理:
|
|
56
56
|
```
|
|
@@ -58,7 +58,7 @@ builder_agent_id = <agentId> # ③ dispatch 返回
|
|
|
58
58
|
reviewer_agent_id = <agentId> # ④ dispatch 返回
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
**prompt 组装顺序契约(v0.18.0, v0.24.0
|
|
61
|
+
**prompt 组装顺序契约(v0.18.0, v0.24.0 扩展)**:`.team-flow/design-system/`(base + 变体)→ references/template.html → references/layouts.md → references/checklist.md → references/craft/(按页面类型选择注入)→ references/interactive-prototype.md(按需)→ references/wireframe.md(按需)→ PRD`。
|
|
62
62
|
|
|
63
63
|
craft 注入策略:仪表盘→laws-of-ux+state-coverage;表单→state-coverage+accessibility-baseline;列表→typography-hierarchy;通用→anti-ai-slop(始终注入)。
|
|
64
64
|
|
|
@@ -107,6 +107,15 @@ agent 直接写审查报告到 `requirement/vN/prototype-auto-review.md`。
|
|
|
107
107
|
- **PRD 有问题** → 回 orchestrator S2 修订 PRD(**vN 内修订 + 变更履历,非升版**;见 feedback-loops 设计)→ PRD 更新后再回 ① 更新原型。**独立调用 fallback**(非 orchestrator 触发时):无 S2 可回,直接提示 LT 修订 `requirement/vN/prd.md` 后重入本 skill。
|
|
108
108
|
- **原型需调整**(美观/体验/品牌/信息密度等自动评审查不到的维度)→ **⛔ 必须通过 SendMessage 恢复原 prototype-builder 实施调整**(`SendMessage(to: builder_agent_id, message: "用户评审反馈:{调整意见}。请修改原型。")`),修改后 SendMessage 恢复原 prototype-reviewer 重新评审。**禁止启动新子代理**(唯一例外:SendMessage 恢复失败时的 fallback)
|
|
109
109
|
- **通过** → 冻结:PRD frontmatter `frozen: true`(frozen_downstream),prototype 定版
|
|
110
|
+
- **设计系统增量确认(v0.54.0,新增分支)**:若 builder handoff 的 `outstanding_questions` 含 `ds_increment` 条目(`missing_component` / `outdated_token` / `new_variant`),在本次 AskUserQuestion 中**并入**呈现:
|
|
111
|
+
|
|
112
|
+
> 「原型绘制中发现 N 项设计系统增量:① {描述}({workaround}) ② … — [全部确认 | 逐项确认 | 暂不处理]」
|
|
113
|
+
|
|
114
|
+
- **全部确认 / 逐项确认** → 主代理调 `/team-flow:design-system`(iterate 模式)传入确认项。
|
|
115
|
+
- **时序约束**:iterate 一律**延迟到 builder 任务终态交接后**执行(避免绘制中途 primer 变更导致产出与白名单版本不一致)
|
|
116
|
+
- **并发提示**:iterate 前检查活跃 change(`${CLAUDE_PLUGIN_ROOT}/scripts/lib/state-loader.mjs`)→ 提示"本次设计系统变更会影响进行中的 change: X/Y"
|
|
117
|
+
- **暂不处理** → 由 **design-system skill**(唯一写者)追加到 `.team-flow/design-system/pending.md`;条目格式 `{描述} | 来源: <change-id 或 s2-prototype> | 时间: <ISO>`
|
|
118
|
+
- **不追溯重构**:已冻结原型不自动重绘——workaround 保留至该页下次进入绘制时替换
|
|
110
119
|
|
|
111
120
|
## 子代理阻断处理(§18.1)
|
|
112
121
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root{
|
|
2
|
-
/* A1-identity:由 design-system
|
|
2
|
+
/* A1-identity:由 .team-flow/design-system/ 渲染覆盖,此处为骨架占位 */
|
|
3
3
|
--color-primary: #c96442; /* 占位,渲染时替换为品牌主色 */
|
|
4
4
|
--color-neutral-900: #1a1916;
|
|
5
5
|
--bg: #fafaf7; --surface: #ffffff; --fg: #1a1916; --muted: #6b6964; --border: #e8e5df;
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
--space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
|
|
16
16
|
--radius-1: 4px; --radius-2: 8px;
|
|
17
17
|
--font-base: 16px;
|
|
18
|
-
/* 由 design-system
|
|
18
|
+
/* 由 .team-flow/design-system/ 渲染;修改走 design-system,不在此硬编码新值 */
|
|
19
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- 种子模板(v0.18.0):builder 从此模板组合,不从零写 CSS。token 由 design-system
|
|
1
|
+
<!-- 种子模板(v0.18.0):builder 从此模板组合,不从零写 CSS。token 由 .team-flow/design-system/ 渲染覆盖。 -->
|
|
2
2
|
<!-- 零外部依赖、可离线:CSS 进 <style>、JS 进 <script>,无 CDN / 外部字体 / 外部脚本。 -->
|
|
3
3
|
<!doctype html>
|
|
4
4
|
<html lang="zh-CN" data-theme="light" data-density="comfortable">
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
<title>team-flow prototype · seed template</title>
|
|
9
9
|
<style>
|
|
10
10
|
/* ============================================================
|
|
11
|
-
TOKENS — 由 design-system
|
|
11
|
+
TOKENS — 由 .team-flow/design-system/ 渲染覆盖,禁止在此硬编码新值。
|
|
12
12
|
占位默认值为「中性陶土」基调(非 indigo),保证模板离线可渲染。
|
|
13
13
|
============================================================ */
|
|
14
14
|
:root{
|
|
15
|
-
/* ——
|
|
16
|
-
--color-primary: #c96442; /* 由 design-system
|
|
17
|
-
--color-neutral-900: #1a1916; /* 由 design-system
|
|
15
|
+
/* —— 品牌/中性色(.team-flow/design-system/ 覆盖位)—— */
|
|
16
|
+
--color-primary: #c96442; /* 由 .team-flow/design-system/ 渲染覆盖 */
|
|
17
|
+
--color-neutral-900: #1a1916; /* 由 .team-flow/design-system/ 渲染覆盖 */
|
|
18
18
|
|
|
19
19
|
/* —— 单一 accent:每屏 ≤2 处 —— */
|
|
20
|
-
--accent: #c96442; /* 由 design-system
|
|
20
|
+
--accent: #c96442; /* 由 .team-flow/design-system/ 渲染覆盖(terracotta 中性暖色占位) */
|
|
21
21
|
--accent-hover: color-mix(in oklab, var(--accent), black 8%);
|
|
22
22
|
--accent-active: color-mix(in oklab, var(--accent), black 14%);
|
|
23
23
|
--accent-soft: color-mix(in oklab, var(--accent), transparent 86%);
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
--border: #e8e5df;
|
|
33
33
|
|
|
34
34
|
/* —— 字体(系统栈,零外部字体)—— */
|
|
35
|
-
--font-display: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 design-system
|
|
36
|
-
--font-body: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 design-system
|
|
35
|
+
--font-display: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 .team-flow/design-system/ 渲染覆盖 */
|
|
36
|
+
--font-body: ui-sans-serif, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; /* 由 .team-flow/design-system/ 渲染覆盖 */
|
|
37
37
|
--font-mono: ui-monospace, 'JetBrains Mono', monospace;
|
|
38
38
|
|
|
39
39
|
/* —— 字号阶梯(type scale)—— */
|
|
@@ -369,7 +369,7 @@ code{ font-family: var(--font-mono); font-size: 0.9em; }
|
|
|
369
369
|
<div class="container hero-center">
|
|
370
370
|
<p class="eyebrow">team-flow · seed template</p>
|
|
371
371
|
<h1>从种子模板组合页面,不从零写 CSS</h1>
|
|
372
|
-
<p class="lead">所有 section 直接落入 main,token 由 design-system
|
|
372
|
+
<p class="lead">所有 section 直接落入 main,token 由 .team-flow/design-system/ 渲染覆盖,零外部依赖、可离线。</p>
|
|
373
373
|
<div class="hero-cta">
|
|
374
374
|
<a class="btn btn-primary" href="#content">主操作</a>
|
|
375
375
|
<a class="btn btn-secondary" href="#content">次要操作</a>
|
|
@@ -383,7 +383,7 @@ code{ font-family: var(--font-mono); font-size: 0.9em; }
|
|
|
383
383
|
<footer class="pagefoot" data-testid="P-00-pagefoot">
|
|
384
384
|
<div class="container row-between">
|
|
385
385
|
<span>© team-flow prototype</span>
|
|
386
|
-
<span class="meta">由 seed template (v0.18.0) 组合 · token 由 design-system
|
|
386
|
+
<span class="meta">由 seed template (v0.18.0) 组合 · token 由 .team-flow/design-system/ 渲染</span>
|
|
387
387
|
</div>
|
|
388
388
|
</footer>
|
|
389
389
|
|
|
@@ -118,7 +118,7 @@ Check for files modified outside scope fence, new dependencies not in design. Un
|
|
|
118
118
|
|
|
119
119
|
## Final Checks
|
|
120
120
|
|
|
121
|
-
**⛔ 状态字段禁写(v0.30.0 + v0.13 §50
|
|
121
|
+
**⛔ 状态字段禁写(v0.30.0 + v0.13 §50;v0.53.0 增补跳过键)**:仅写本 skill 的 `dp_6_*`/`dp_7_*` 决策字段 + `arch_merge_skipped`/`arch_merge_skip_reason` 跳过键(后者见 `### ① Architecture Merge` 的 no-op 登记指引);测试证据经 `tf test record` 程序化写入(不再手工 set `test_result`);**MUST NOT** 修改 `.team-flow.yaml` 的 `state`/`workflow` 核心字段——closing 转换由主代理经 `tf state transition` 执行(来源:workflow-feedback 2026-08-01)。
|
|
122
122
|
|
|
123
123
|
- Tests passing? (cite command and output)
|
|
124
124
|
- All batches complete? (cite batch status)
|
|
@@ -149,13 +149,28 @@ If implementation diverged from the contract, return to `bridging` before closur
|
|
|
149
149
|
|
|
150
150
|
## Post-Verification
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
### ⚠ 执行顺序(v0.53.0 §110 B' 时序前移 — MUST)
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
① tf arch-merge <change-dir> ← 架构增量回写全局台账
|
|
156
|
+
② tf state transition <change-dir> closing
|
|
157
|
+
③ tf prototype-sync <change-dir>
|
|
158
|
+
④ tf test-merge <change-dir>
|
|
159
|
+
⑤ tf solutions promote(compound promotion)
|
|
160
|
+
⑥ 设计系统待办检查(v0.54.0) ← 只读检查 + 报告,不执行 iterate
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
(各步详细说明见下方对应节标题的 ①–⑤ 编号。)
|
|
153
164
|
|
|
154
|
-
|
|
165
|
+
> **本块是全流程中该顺序的【唯一真相源】**(v0.53.0 §115.10):②③ 两节及「阶段产物同步门禁点」原先各自复述同一顺序串(本文件内共 4 处),是既有的漂移源——`agents/release-archivist.md` 已明文禁止复述,本文件却复述了 4 次。现各处改为指向本块。
|
|
166
|
+
>
|
|
167
|
+
> **为何 ① 必须在 ② 之前**(v0.53.0 变更,务必遵守):`executing→closing` 现挂 **`arch-merged` 门禁维度**——转换时校验全局台账已含本 change 增量。**未回写则转换被拒**。完整论证(含与 `arch-snapshot` 的无数据依赖关系)见 `references/closing-procedures.md`。
|
|
155
168
|
|
|
156
|
-
|
|
169
|
+
**架构快照门禁(arch-snapshot,v0.36.0 / v0.36.3)**:本轮迭代产品级架构快照 `iterations/vN/architecture.md` 必须已落盘("先快照后回写"强制化)。**FAIL 升级路径**:回 orchestrator 的 ARCH 阶段补快照;存量升级在途 change(快照缺失但 change 有增量产物)→ WARN 兜底放行;`arch_baseline` 缺失 → WARN 不阻断。hotfix/tweak 豁免(不挂该维度)。判定逻辑见插件内 `scripts/guard/checks/arch-gate-exemptions.mjs`(引用,非调用)。
|
|
157
170
|
|
|
158
|
-
|
|
171
|
+
### ① Architecture Merge (v0.10 §28-§31) — MUST run first
|
|
172
|
+
|
|
173
|
+
Merge change-level architecture artifacts to the global `docs/architecture/` baseline **before** the state transition and before any other post-verification step:
|
|
159
174
|
|
|
160
175
|
```bash
|
|
161
176
|
tf arch-merge <change-dir>
|
|
@@ -163,23 +178,34 @@ tf arch-merge <change-dir>
|
|
|
163
178
|
|
|
164
179
|
This merges `architecture/{architecture,database,api}.md` and `architecture/sql/` into the global architecture docs. Skip silently when `architecture/` does not exist (architecture-design was `skipped`) — 前置判据见 `## Lightweight Closure > 回写链前置判据`(v0.22 §87:先判断再决定是否执行命令)。
|
|
165
180
|
|
|
166
|
-
|
|
181
|
+
**命令输出即是证据**:`arch-merge` 现在会汇总 `[WARN]` / `[FAIL]` 并可能以非零退出码结束。**有 `[FAIL]` 行时必须先解决再转换**(典型:`端点章节表有 N 行候选但 0 条提取——api.md 表格形态失配`)。若命令确为 no-op(无架构增量可回写),用显式跳过键登记:
|
|
167
182
|
|
|
168
|
-
|
|
183
|
+
```bash
|
|
184
|
+
tf state set <change-dir> arch_merge_skipped true
|
|
185
|
+
tf state set <change-dir> arch_merge_skip_reason "<理由>"
|
|
186
|
+
```
|
|
169
187
|
|
|
170
|
-
|
|
188
|
+
### ② State Transition
|
|
189
|
+
|
|
190
|
+
Run `tf state transition <change-dir> closing`. If delta specs exist, route to `spec-merger`.
|
|
191
|
+
|
|
192
|
+
**顺序(MUST)**:见 `### ⚠ 执行顺序` 的 ①–⑤(**本步是 ②**,前置 ① 已完成)。不得并行——全局文档不得处于半更新态。
|
|
193
|
+
|
|
194
|
+
### ③ Prototype Sync (v0.5)
|
|
195
|
+
|
|
196
|
+
After `arch-merge` (①) completes **and the state transition to `closing` (②) has been run**, run prototype-sync to merge UX deltas back to the global prototype:
|
|
171
197
|
|
|
172
198
|
```bash
|
|
173
199
|
tf prototype-sync <change-dir>
|
|
174
200
|
```
|
|
175
201
|
|
|
176
|
-
|
|
202
|
+
**顺序(MUST)**:见 `### ⚠ 执行顺序` 的 ①–⑤(**本步是 ③**,①② 已完成)。同一 change closing 内**顺序执行**,不得并行——`docs/architecture/` / `prototype/` / `docs/test-ledger/` 不得处于半更新态,否则下一个 change 会以半态为基。
|
|
177
203
|
|
|
178
204
|
If `prototype-sync` reports conflicts, list them in the closing summary and flag for manual resolution. Do not block closing on prototype-sync conflicts (advisory level).
|
|
179
205
|
|
|
180
206
|
**Execution verification(v0.24.0)**:`prototype-sync` 命令执行后,检查其 stdout 输出确认合并完成(输出含 `merged`/`no UX delta`/`conflicts` 之一)。若命令未执行或执行失败,Step 5 Report 的 `Prototype sync` 行必须标注 `SKIPPED` 或 `FAILED`,并在 closing summary 中说明原因。**禁止在 prototype-sync 未执行时将 Prototype sync 行标注为已完成**。
|
|
181
207
|
|
|
182
|
-
### Test Merge (v0.12 §43)
|
|
208
|
+
### ④ Test Merge (v0.12 §43)
|
|
183
209
|
|
|
184
210
|
After `prototype-sync` completes, run test-merge to write test matrix results back to the global test ledger:
|
|
185
211
|
|
|
@@ -197,42 +223,31 @@ Skip silently when `test-matrix.md` does not exist (legacy change or test_matrix
|
|
|
197
223
|
|
|
198
224
|
**Execution verification**: check stdout output for `test-merge complete` confirmation. If the command did not execute or failed, Step 5 Report's `Test Matrix` row (from Step 2b) must note the reason.
|
|
199
225
|
|
|
200
|
-
### Compound Promotion (v0.5)
|
|
226
|
+
### ⑤ Compound Promotion (v0.5)
|
|
201
227
|
|
|
202
|
-
|
|
228
|
+
Promote change-level learnings to the global solutions library:
|
|
203
229
|
|
|
204
230
|
```bash
|
|
205
231
|
tf solutions promote <change-dir>
|
|
206
232
|
```
|
|
207
233
|
|
|
208
|
-
|
|
209
|
-
- severity ≥ medium AND type = pitfall/pattern → promote to global `docs/solutions/`
|
|
210
|
-
- domain+type matches existing global entry → mark as "confirmed pattern", upgrade severity (low → medium → high → critical)
|
|
211
|
-
|
|
212
|
-
Valid `severity` values: `critical` | `high` | `medium` | `low` (ordered; lowercase, case-sensitive; v0.23 §91 — the order is defined once in `scripts/lib/severity.mjs`).
|
|
213
|
-
|
|
214
|
-
Report promotion results in the closing summary. Promotion is advisory — failures do not block closing.
|
|
234
|
+
读取 change 根目录的 `learnings.md`(v0.49.0 §83.3.5 路径统一)——`severity ≥ medium` 且 `type = pitfall|pattern` 者晋升全局 `docs/solutions/`;命中既有条目则标记 confirmed pattern 并升级 severity。severity 序 `critical > high > medium > low` 定义在插件内 `scripts/lib/severity.mjs`(引用,非调用)(v0.23 §91,单一来源)。
|
|
215
235
|
|
|
216
|
-
|
|
236
|
+
**Compound Capture Check(v0.5)**:closing 前自检本 change 是否产生了可沉淀的经验(强制回退 / 复发根因 / 范围外扩 / 契约漂移);有则写入 change 根的 `learnings.md`,每条 `## <title>` 带 frontmatter(`phase`/`domain`/`type`/`severity`/`date`)。该文件正是 `compound-captured` guard 检查、`tf solutions promote` 读取的对象。
|
|
217
237
|
|
|
218
|
-
|
|
238
|
+
> **本节的展开版(条目质量要求、`tf solutions capture` 与 `learnings.md` 的分工、Prototype Sync / Worktree Deisolation / Code Landing 全流程)见 `references/closing-procedures.md`**——该处为超集,本节不再重复(v0.53.0 §115.10:同名节曾两处各自维护,属根因 Ⅲ 的同一类漂移)。
|
|
219
239
|
|
|
220
|
-
|
|
221
|
-
- Did bug-investigator find a recurring issue (same root cause as a prior change)?
|
|
222
|
-
- Did scope expand beyond the original proposal?
|
|
223
|
-
- Did execution-contract drift from proposal?
|
|
240
|
+
### ⑥ 设计系统待办检查(v0.54.0)— 只读检查 + 报告
|
|
224
241
|
|
|
225
|
-
|
|
242
|
+
检查 `.team-flow/design-system/pending.md` 非空时,在 closing summary 的 `design_system_pending` 中报告条目数并标注 `needs user confirmation`(报告触发条件与细节见 `references/closing-procedures.md`)。
|
|
226
243
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
This check is advisory — skip silently if no learnable moments are detected.
|
|
230
|
-
|
|
231
|
-
> 详细收尾流程(Prototype Sync / Compound Promotion / Compound Capture / Worktree Deisolation / Code Landing)见 `references/closing-procedures.md`。
|
|
244
|
+
**只读,不执行 iterate**(由 design-system skill 在用户确认后触发);**单写者约束**:写入/移除一律由 design-system skill 执行。快速 closing 时 pending.md 保留不动。
|
|
232
245
|
|
|
233
246
|
### 阶段产物同步门禁点(v0.37.0 §68.2 G5)
|
|
234
247
|
|
|
235
|
-
|
|
248
|
+
回写链(顺序见 `### ⚠ 执行顺序` 的 ①–⑤)**全部完成后**,**阻塞确认**(AskUserQuestion)是否同步 change 实施结果(团队协作:落地结果是团队最需要看的内容):
|
|
249
|
+
|
|
250
|
+
> **v0.53.0 时序说明**:本门禁点原先表述为"回写链全部完成后、`tf state transition closing` **之前**"——那是旧顺序(转换在最后)。B' 方案已把状态转换前移到 ②,故本门禁点改为以「回写链**全部完成后**」为准,**不再对转换位置附加约束**。二者不冲突:本门禁只关心"实施结果是否同步",与转换先后无关。
|
|
236
251
|
- **A 提交并推送**:`tf publish --changes <change-dir> --push`
|
|
237
252
|
- **B 仅提交不推送**:`tf publish --changes <change-dir>`(arch-merge/test-merge 已自动 commit,此步补 push)
|
|
238
253
|
- **C 暂不同步**:继续 closing,后续可补
|
|
@@ -268,7 +283,9 @@ This check is advisory — skip if the user declines. If the user reports issues
|
|
|
268
283
|
|
|
269
284
|
Verify files exist and are non-empty, run `node --check` on code files, skip 5-step verification. Still record DP-6 and DP-7.
|
|
270
285
|
|
|
271
|
-
**回写链前置判据(v0.22 §87)**:先按下表判断适用性,**不适用则不执行命令**(v0.22 实测:逐项跑完才知道不适用,占 release-archivist 80% 耗时)。本表 4 行判据**仅在 Lightweight Closure 适用**;其中 arch-merge 与 test-merge 两行的 "Skip silently" 见 `### Architecture Merge
|
|
286
|
+
**回写链前置判据(v0.22 §87)**:先按下表判断适用性,**不适用则不执行命令**(v0.22 实测:逐项跑完才知道不适用,占 release-archivist 80% 耗时)。本表 4 行判据**仅在 Lightweight Closure 适用**;其中 arch-merge 与 test-merge 两行的 "Skip silently" 见 `### ① Architecture Merge` 与 `### ④ Test Merge` 两节各自的正文句。
|
|
287
|
+
|
|
288
|
+
> **v0.53.0 修正**:此处原用行号引用(`(:164 正文句)`/`(:196 正文句)`),本次改动插入段落使其失效。**行号引用在密集改动期必然漂移,已改为按标题引用**——同轮 `team-flow-workspace/docs/architecture-api-db-design-enhancement-v0.25.md` 亦把 45 处行号引用全量改为符号引用。
|
|
272
289
|
|
|
273
290
|
| 回写项 | 前置判据 | 不满足时登记 |
|
|
274
291
|
|---|---|---|
|
|
@@ -4,13 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
## Prototype Sync (v0.5)
|
|
6
6
|
|
|
7
|
-
After `arch-merge` completes
|
|
7
|
+
After `arch-merge` completes **and the state transition to `closing` has been performed**, run prototype-sync to merge UX deltas back to the global prototype:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
tf prototype-sync <change-dir>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
**Write-back order (mandatory)**: `arch-merge` → `prototype-sync` → `compound promotion` must be executed **sequentially** within the same change closing. Do not run them in parallel — the global `docs/architecture/` and `prototype/` must not be in a half-updated state when the next change grounds on them.
|
|
13
|
+
**Write-back order (mandatory;v0.53.0 增补状态转换位次)**: `arch-merge` → `state transition closing` → `prototype-sync` → `test-merge` → `compound promotion` must be executed **sequentially** within the same change closing. Do not run them in parallel — the global `docs/architecture/` and `prototype/` must not be in a half-updated state when the next change grounds on them.
|
|
14
|
+
|
|
15
|
+
> **为何状态转换插在 arch-merge 之后**(v0.53.0 §110 B' 时序前移,完整论证)
|
|
16
|
+
>
|
|
17
|
+
> ① **门禁只能在转换点校验**:`executing→closing` 现挂 `arch-merged` guard 维度——转换时校验全局 `docs/architecture/ARCHITECTURE.md` 已含本 change 增量(marker 区来源列 `change:<name>` **或** 演进日志锚 `### change:<name>`,双通道)。**未回写则转换被拒**。故 arch-merge 必须先于转换执行。
|
|
18
|
+
> ② **原顺序下"未回写"在状态机层面不可见**:旧序把 arch-merge 放在转换**之后**,而 `VALID_STATES` 无 `closed`、`closing→closed` 转换不存在 → arch-merge 在状态机上**没有任何锚点**,其成败无门禁考核。这是"架构变更必须合并进台账"这条原则长期停留在**文档承诺**而非**代码强制**的机制原因。
|
|
19
|
+
> ③ **与 `arch-snapshot` 不冲突**:两者同挂本转换(`arch-snapshot` 是 v0.36.0 的"先快照后回写"),但**维度之间无数据依赖**——`arch-snapshot` 只读 `docs/architecture/iterations/`,`arch-merge` 全流程不触碰该目录(已逐行核对)。"先快照后回写"仍是语义前提(快照在 ARCH 阶段产出,早于整个 closing)。
|
|
20
|
+
> ④ **逃生通道**:若本 change 确无架构增量可回写,登记 `tf state set <change-dir> arch_merge_skipped true` + `arch_merge_skip_reason "<理由>"`,该维度即豁免。注意:跳过键**只豁免门禁维度**,不改变 `tf arch-merge` 命令自身的退出码——命令的失败按 **owner 归属**判定,非本 change 的解析失配只报 WARN,不会阻断你(v0.53.0 §115.8)。
|
|
14
21
|
|
|
15
22
|
If `prototype-sync` reports conflicts, list them in the closing summary and flag for manual resolution. Do not block closing on prototype-sync conflicts (advisory level).
|
|
16
23
|
|
|
@@ -62,11 +69,14 @@ tf state set <change-dir> dp_6_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
|
62
69
|
|
|
63
70
|
If FAIL, do NOT proceed to DP-7. Route back or ask about abandonment.
|
|
64
71
|
|
|
65
|
-
After PASS, also record the verification gate
|
|
72
|
+
After PASS, also record the verification gate **程序化写入**(v0.53.0 修正:本处原写 `tf state set <change-dir> test_result pass`,与同轮修正的 `SKILL.md`「不再手工 set `test_result`」及 CLI 实测互相矛盾——CLI 直接拒绝:`⛔ 'test_result' 不再支持手工 set(v0.13 §50)`):
|
|
73
|
+
|
|
66
74
|
```bash
|
|
67
|
-
tf
|
|
75
|
+
tf test record <change-dir> --from <runner-output-file>
|
|
68
76
|
```
|
|
69
77
|
|
|
78
|
+
(`test_result` 已移出 `SETTABLE_FIELDS`,`tests-passing` 门禁只认 `tf test record` 写入的程序化证据。DP-6 段此前的 `dp_6_result` 只是决策点记录,**不是**放行凭证。)
|
|
79
|
+
|
|
70
80
|
## DP-7 (Archive Confirmation)
|
|
71
81
|
|
|
72
82
|
```bash
|
|
@@ -86,3 +96,13 @@ If an `e2e/` suite exists for the change:
|
|
|
86
96
|
## Lightweight Closure (hotfix/tweak)
|
|
87
97
|
|
|
88
98
|
Verify files exist and are non-empty, run `node --check` on code files, skip 5-step verification. Still record DP-6 and DP-7.
|
|
99
|
+
|
|
100
|
+
## ⑥ 设计系统待办检查(v0.54.0)
|
|
101
|
+
|
|
102
|
+
`Post-Verification` 顺序的 ⑥(只读检查 + 报告,不执行 iterate)。检查 `.team-flow/design-system/pending.md`(原型阶段"暂不处理"的设计系统增量暂存):
|
|
103
|
+
|
|
104
|
+
1. **非空时**:读取未处理条目(格式 `{描述} | 来源: <change-id 或 s2-prototype> | 时间: <ISO>`),在 closing summary 的 `design_system_pending` 字段列出并标注 `needs user confirmation`
|
|
105
|
+
- **报告触发条件(防仪式膨胀)**:仅当「本 change 产生过 `ds_increment`(来源标注含本 change-id)」**或**「pending.md 非空且本次会话未询问过」时显式列出并建议确认;其余情况仅记录条目数
|
|
106
|
+
2. **不执行 iterate**——iterate 由 design-system skill 在用户确认后另行触发;主代理提示二选一:closing 等待执行 / 保留 pending 待下次绘制处理
|
|
107
|
+
3. **快速 closing(无交互路径)**:pending.md **保留不动**(不丢失,下次生效)
|
|
108
|
+
4. **单写者约束**:本步**只读**——写入/移除一律由 design-system skill 的 iterate 流程执行(避免多 change 并发读改写导致丢失更新)
|
|
@@ -12,7 +12,7 @@ description: 既有项目接入初始化器。在首次使用 team-flow 时执
|
|
|
12
12
|
```
|
|
13
13
|
workflow-bootstrap(一次性,手动触发)
|
|
14
14
|
→ B1 代码库侦察 → B1.5 conventions → B2 架构基线 → B3 领域词汇 → B4 目录初始化
|
|
15
|
-
→ B4.5 CLAUDE.md 初始化 → B5 路径判断
|
|
15
|
+
→ B4.5 CLAUDE.md 初始化 → B4.6 Design System 起点选择 → B5 路径判断
|
|
16
16
|
→ 进入 workflow-orchestrator S1(注入 baseline 上下文)
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -107,38 +107,47 @@ Do NOT invoke for:
|
|
|
107
107
|
**B2 成果物导入(v0.23.0 新增,v0.24.0 模板初始化补强)**:
|
|
108
108
|
|
|
109
109
|
```
|
|
110
|
-
Step 0:
|
|
111
|
-
├──
|
|
112
|
-
|
|
113
|
-
│ architecture.md → docs/architecture/ARCHITECTURE.md
|
|
114
|
-
│ database.md → docs/architecture/DATABASE.md
|
|
115
|
-
│ physical-model.md → docs/architecture/PHYSICAL-MODEL.md
|
|
116
|
-
│ api.md → docs/architecture/API-INDEX.md
|
|
117
|
-
│ index.md → docs/architecture/INDEX.md
|
|
110
|
+
Step 0: 全局台账脚手架(v0.24.0 新增;v0.53.0 修正)
|
|
111
|
+
├── bash: tf arch scaffold --project-root <根>
|
|
112
|
+
│ 复用 arch-merge 的生成器产出**目标格式**的空基线(同源,构造上消除格式漂移)
|
|
118
113
|
└── 已存在的文件不覆盖(只补缺失)
|
|
119
114
|
|
|
115
|
+
⛔ **禁止从 skills/architecture-design/templates/ 复制模板**(v0.53.0 §102 R1 废止):
|
|
116
|
+
原做法把 **change 级模板** 复制成 **全局台账制品**(`api.md → API-INDEX.md` 等 5 处),
|
|
117
|
+
而 arch-merge 把这 5 个路径定义为 `generated, do not edit` 的生成式产物——两类写入方
|
|
118
|
+
语义互斥且互不知情。实测后果:DATABASE / PHYSICAL-MODEL / INDEX 因无条件重建被覆盖,
|
|
119
|
+
而 `ARCHITECTURE.md` / `API-INDEX.md` **永久卡在模板态**;其中 `API-INDEX.md` 模板自带
|
|
120
|
+
的 4 条 `/api/xxx` 占位行使扫描非空,**连"空结果拒绝覆盖"保护都不触发**,
|
|
121
|
+
`updateIndex` 还把这 4 行统计成 `端点数量: 4` 写进 INDEX.md。
|
|
122
|
+
详见 team-flow-workspace/docs/architecture-api-db-design-enhancement-v0.25.md §101.3 / §102.2
|
|
123
|
+
|
|
124
|
+
⛔ **B2 不得直接写生成式制品**(v0.53.0 §115.6 横展):`PHYSICAL-MODEL.md` / `DATABASE.md` /
|
|
125
|
+
`API-INDEX.md` / `INDEX.md` 四个由 arch-merge **无条件重建**——bootstrap 手写的内容在
|
|
126
|
+
该 change 首次 arch-merge 时即被整体覆盖(无 DDL 时 PHYSICAL-MODEL 会被改写为"暂无物理模型",
|
|
127
|
+
**用户提供的知识丢失**)。As-Is 叙述的唯一载体是 `docs/architecture/baseline.md`。
|
|
128
|
+
|
|
120
129
|
Step 1: 询问用户是否有既有成果物
|
|
121
130
|
├── 有 SQL DDL 脚本 → 导入到 docs/architecture/schema-baseline.sql
|
|
122
|
-
|
|
123
|
-
├──
|
|
131
|
+
│ (PHYSICAL-MODEL.md / DATABASE.md 由 arch-merge 从该文件生成,B2 不直接写)
|
|
132
|
+
├── 有物理模型文档 → 内容并入 docs/architecture/baseline.md(B2 的 As-Is 叙述载体)
|
|
133
|
+
├── 有 API 文档/Swagger 导出 → 端点清单写入 baseline.md §5(全局 API 表面基线)
|
|
124
134
|
└── 无既有成果物 → Step 2 兜底
|
|
125
135
|
|
|
126
136
|
Step 2: 确定性提取(兜底)
|
|
127
137
|
├── recon-probe.sh DDL 提取能力(v0.24.0 已实现:SQL 文件 / Java Entity / 占位)
|
|
128
138
|
│ bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --root <根> --ddl-out docs/architecture/schema-baseline.sql
|
|
129
|
-
├──
|
|
130
|
-
└──
|
|
139
|
+
├── 扫描 Controller/Router 类 → 端点清单并入 baseline.md §5
|
|
140
|
+
└── (PHYSICAL-MODEL / DATABASE / API-INDEX / INDEX 由 `tf arch-merge` 维护,bootstrap 不产出)
|
|
131
141
|
|
|
132
142
|
优先级原则:用户既有成果物 > 确定性提取 > LLM 推断
|
|
133
143
|
```
|
|
134
144
|
|
|
135
145
|
产出:
|
|
136
|
-
- `docs/architecture/
|
|
137
|
-
- `docs/architecture/
|
|
138
|
-
-
|
|
139
|
-
- `docs/architecture/schema-baseline.sql` — DDL 基线脚本(
|
|
140
|
-
- `docs/architecture/API-INDEX.md` —
|
|
141
|
-
- `docs/architecture/INDEX.md` — 架构文档索引(v0.23.0 新增)
|
|
146
|
+
- `docs/architecture/baseline.md` — **As-Is 架构基线(B2 的主要产物)**:分层、模块边界、技术选型、既有 API 清单
|
|
147
|
+
- `docs/architecture/ARCHITECTURE.md` — 骨架由 `tf arch scaffold` 建;**As-Is 叙述写在 marker 区之外**,
|
|
148
|
+
`<!-- arch:current-state:begin/end -->` 之间由 arch-merge 独占维护(v0.53.0 §115.6 澄清)
|
|
149
|
+
- `docs/architecture/schema-baseline.sql` — DDL 基线脚本(B2 导入;后续由 arch-merge 幂等追加)
|
|
150
|
+
- `docs/architecture/{PHYSICAL-MODEL,DATABASE,API-INDEX,INDEX}.md` — **生成式,由 arch-merge 维护,B2 不写**
|
|
142
151
|
- `docs/architecture/<bc>/` — 每个有界上下文的目录(如能识别)
|
|
143
152
|
|
|
144
153
|
**轻量 vs 完整**:
|
|
@@ -209,6 +218,18 @@ Step 2: 确定性提取(兜底)
|
|
|
209
218
|
|
|
210
219
|
**不做的事**:不写 SOP 流程(由 skill 负责)、不写变更级状态机(由 workflow skill 负责)、不列可自动发现的文件清单。
|
|
211
220
|
|
|
221
|
+
### B4.6: Design System 起点选择(advisory,v0.54.0 新增)
|
|
222
|
+
|
|
223
|
+
> 编号说明:B4.5 已被占用(CLAUDE.md 初始化),本步骤为 B4.6。
|
|
224
|
+
|
|
225
|
+
`.team-flow/design-system/` 不存在时,AskUserQuestion 呈现起点四选一(**不阻断**,延续 advisory 约定):
|
|
226
|
+
|
|
227
|
+
> 「检测到项目尚无设计系统。选择起点方式:[从模板库选择 | 逆向建库 | 从零创建 | 跳过]」
|
|
228
|
+
|
|
229
|
+
- **模板库**:调 `/team-flow:design-system`(起点=模板库)——由该 skill 呈现 `${CLAUDE_PLUGIN_ROOT}/templates/design-systems/registry.json`(8 个参考设计系统),选定后执行导入并**续跑 Step 5 评审 → Step 6 落盘**(含 primer 生成 + guard 校验)。**本步骤不直接调转换器**:转换器只产 base.md,缺少 primer 会让后续 prototype Step 0 对 `contract: v1` 系统直接 blocked(v0.54.0 P4 实证死路)
|
|
230
|
+
- **逆向建库 / 从零创建**:调 `/team-flow:design-system`(create-from-code / 交互式 6 步)
|
|
231
|
+
- **跳过** → 继续 B5;**已存在** → 跳过
|
|
232
|
+
|
|
212
233
|
### B5: Path Decision(路径判断,v0.42.0 重构:降级路径设计)
|
|
213
234
|
|
|
214
235
|
询问用户。**分组展示**——用户先决定"要不要把地基打牢"(第一组),再决定"打完地基做什么"(第二组):
|
|
@@ -249,7 +270,7 @@ Step 2: 确定性提取(兜底)
|
|
|
249
270
|
## Output Standard
|
|
250
271
|
|
|
251
272
|
每次交互结束时说明:
|
|
252
|
-
1. 已完成的阶段(B1-B1.5-B2-B3-B4-B4.5-B5)
|
|
273
|
+
1. 已完成的阶段(B1-B1.5-B2-B3-B4-B4.5-B4.6-B5)
|
|
253
274
|
2. 已产出的制品(baseline.md / conventions / ARCHITECTURE.md / PHYSICAL-MODEL.md / schema-baseline.sql / API-INDEX.md / INDEX.md / CONCEPTS.md / CLAUDE.md / cross-check-report.md(如执行 B)/ 目录结构)
|
|
254
275
|
3. 下一步建议(调用哪个 skill)
|
|
255
276
|
|
|
@@ -113,6 +113,9 @@ phases:
|
|
|
113
113
|
| 产品级评审门 | ARCH→S3(2026-08-19:ARCH 上移 S3 前,原 ARCH→S4) | architecture-reviewer product 视角 PASS | skip 时仍要物化标记 |
|
|
114
114
|
| arch-readiness | exploring:specifying(guard 存在性)+ S4 拆分(LLM 覆盖校验) | iterations/vN/ 快照覆盖 change 触及的 BC | arch_baseline 缺失 → WARN 不 FAIL |
|
|
115
115
|
| arch-snapshot | executing→closing | 本轮快照已落盘 | 在途 change legacy 豁免 |
|
|
116
|
+
| arch-merged | executing→closing(v0.53.0 新增) | 本 change 架构增量已回写全局 `docs/architecture/ARCHITECTURE.md`(marker 区来源列 `change:<name>` **或** 演进日志锚 `### change:<name>`,任一命中即 PASS) | `arch_design_decision` 缺失/skipped 豁免;`arch_baseline` 缺失 legacy 豁免;`arch_merge_skipped` 显式跳过键 |
|
|
117
|
+
|
|
118
|
+
> **arch-merged 的时序前提(v0.53.0 §110 B')**:arch-merge 需在该转换**之前**执行,否则转换被拒。详细顺序见 `team-flow/skills/release-archivist/SKILL.md` 的 `## Post-Verification`。
|
|
116
119
|
|
|
117
120
|
## arch_baseline 豁免键(v0.35.0 新增)
|
|
118
121
|
|