@xulthekl/team-flow 0.40.1 → 0.41.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 +1 -1
- 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 +2 -2
- package/CHANGELOG.md +9 -0
- package/GEMINI.md +1 -1
- package/INSTALL.md +1 -1
- package/README.md +1 -1
- package/docs/README_en.md +1 -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 +1 -1
- package/skills/workflow-bootstrap/SKILL.md +29 -5
- package/skills/workflow-bootstrap/references/agents/codebase-recon-analyst.md +13 -3
- package/skills/workflow-bootstrap/references/b1-reconnaissance.md +18 -2
- package/skills/workflow-bootstrap/scripts/recon-probe.sh +79 -2
- package/skills/workflow-bootstrap/templates/claude-md-team-flow.md +60 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{
|
|
10
10
|
"name": "team-flow",
|
|
11
11
|
"description": "8-state spec workflow + compound global compounding + architecture-design (4A/DDD) + local HTML prototype + product-level orchestration + bootstrap + e2e + session handoff + workflow feedback. 24 skills + 15 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.41.0",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "LT",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking). 24 skills + 15 agents, one install.",
|
|
5
5
|
"source": "./",
|
|
6
6
|
"author": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "team-flow",
|
|
3
3
|
"displayName": "team-flow",
|
|
4
4
|
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking). 24 skills + 15 agents, one install.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.41.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "LT",
|
|
8
8
|
"url": "https://github.com/LT"
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Unified workflow plugins and skills for AI coding agents (team-flow: team-flow + compound + architecture-design + prototype).",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.41.0"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "team-flow",
|
|
14
14
|
"description": "Unified workflow with planning artifacts, execution contracts, TDD, review gates, systematic debugging, delta spec sync, architecture-design, and local HTML prototyping.",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.41.0",
|
|
16
16
|
"source": ".",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "LT",
|
package/AGENTS.md
CHANGED
|
@@ -68,8 +68,8 @@ spec 驱动开发过程。8 态变更机:`exploring → specifying → bridgin
|
|
|
68
68
|
- 与 workflow-start 分层:orchestrator 管"做什么、什么顺序"(产品级策略),workflow-start 管"怎么做"(变更级执行)
|
|
69
69
|
|
|
70
70
|
### 7. workflow-bootstrap(1 skill,既有项目接入,v0.15.0 脚本+子代理侦察)
|
|
71
|
-
- 一次性"侦察 + 基线建立":代码库侦察 → 架构基线文档化 → 领域词汇提取 → 目录初始化 → 进入 workflow-orchestrator
|
|
72
|
-
- **B1 侦察(v0.15.0)**:先跑确定性脚本 `scripts/recon-probe.sh
|
|
71
|
+
- 一次性"侦察 + 基线建立":代码库侦察 → 架构基线文档化 → 领域词汇提取 → 目录初始化 → CLAUDE.md 初始化(B4.5,v0.41.0)→ 进入 workflow-orchestrator
|
|
72
|
+
- **B1 侦察(v0.15.0)**:先跑确定性脚本 `scripts/recon-probe.sh`(可复现固定化采集,含 Git 子仓库结构 v0.41.0)→ 并行派发 `codebase-recon-analyst` 子代理语义增强(7 维度含 git-structure)→ 主代理汇总写 baseline.md(维度闭合校验 v0.41.0)
|
|
73
73
|
- 仅首次使用时执行;`docs/architecture/baseline.md` 已存在则跳过
|
|
74
74
|
|
|
75
75
|
### 8. session-handoff(1 skill,会话交接,v0.16.0 新增)
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ The format loosely follows Keep a Changelog.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
### Added(workflow-bootstrap CLAUDE.md 初始化 + Git 多子仓库识别,v0.41.0)
|
|
10
|
+
|
|
11
|
+
- **B4.5 CLAUDE.md 初始化**(参考 Claude Code /init):将项目基本信息(项目概况/开发命令/工作区结构/Git 结构)+ team-flow 产物结构索引写入工作区 CLAUDE.md;维护原则=索引级+结构级;已有 CLAUDE.md 追加模式(产物结构 + Git 管理规则章节),无则从 `templates/claude-md-team-flow.md` 新建
|
|
12
|
+
- **CLAUDE.md 标准模板**:`skills/workflow-bootstrap/templates/claude-md-team-flow.md`(新建),覆盖 /init 内容 + team-flow 产物结构表(代码强制 + 设计层面)
|
|
13
|
+
- **recon-probe.sh ⑧ Git 子仓库扫描**:识别嵌套 git 仓库 / submodule / .gitignore 忽略规则,JSON 新增 `git_structure` 字段(is_git_repo / sub_repos[{path,type,has_remote}] / submodules / gitignore_ignores_subrepos)
|
|
14
|
+
- **codebase-recon-analyst git-structure 维度**:侦察维度 6→7,识别子仓库用途(代码库/文档/工具)+ git 操作约束(提交/推送顺序、版本联动、隔离)
|
|
15
|
+
- **B1.3 维度闭合校验**:汇总前核对已派发维度 vs 已返回 handoff(status + deliverable 非空),缺失维度标 INCOMPLETE(advisory 不阻断,Success Output 警告)
|
|
16
|
+
- **AGENTS.md 同步**:workflow-bootstrap 流程描述补 B4.5 + git-structure + 闭合校验
|
|
17
|
+
|
|
9
18
|
## [0.39.0] - 2026-08-06
|
|
10
19
|
|
|
11
20
|
### Added(workflow-feedback 环境版本记录)
|
package/GEMINI.md
CHANGED
|
@@ -8,7 +8,7 @@ The workflow is self-contained and does not require OpenSpec or Superpowers at r
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
<!-- team-flow-phase-guard-start -->
|
|
11
|
-
# team-flow v0.
|
|
11
|
+
# team-flow v0.41.0 | 阶段: {{state}} | 工作流: {{workflow}}
|
|
12
12
|
当前阶段允许的操作由 workflow-start 路由规则定义。
|
|
13
13
|
禁止跨越 DP gate 进入下一阶段。变更范围以 execution-contract.md 的 Intent Lock 为准。
|
|
14
14
|
<!-- team-flow-phase-guard-end -->
|
package/INSTALL.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# team-flow
|
|
2
2
|
|
|
3
|
-
> 当前版本:`v0.
|
|
3
|
+
> 当前版本:`v0.41.0`
|
|
4
4
|
|
|
5
5
|
> 统一插件:**team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,七套能力协同。
|
|
6
6
|
|
package/docs/README_en.md
CHANGED
|
@@ -126,7 +126,7 @@ npm install -g team-flow
|
|
|
126
126
|
|
|
127
127
|
### Version
|
|
128
128
|
|
|
129
|
-
- Current: `v0.
|
|
129
|
+
- Current: `v0.41.0`
|
|
130
130
|
- v0.9.1 highlights: DP-4 execution-mode recommendations, a portable runtime across 17 platforms, and a raw-package smoke with no plugin-root variable.
|
|
131
131
|
- Self-contained — no OpenSpec or Superpowers runtime required
|
|
132
132
|
- Upstream: [Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec), [obra/superpowers](https://github.com/obra/superpowers)
|
package/gemini-extension.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
3
|
"description": "Unified workflow plugin: team-flow (spec-driven dev) + compound-engineering core subset + architecture-design (4A/DDD) + prototype (local HTML). 24 skills, one install.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.41.0",
|
|
5
5
|
"contextFileName": "GEMINI.md"
|
|
6
6
|
}
|
package/hooks/session-start
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# v0.
|
|
2
|
+
# v0.41.0: auto-sync CLI version with plugin version
|
|
3
3
|
set -e
|
|
4
4
|
|
|
5
5
|
# ═══════════════════════════════════════════════════════════════
|
|
6
6
|
# Plugin version (update this when releasing new versions)
|
|
7
7
|
# ═══════════════════════════════════════════════════════════════
|
|
8
|
-
PLUGIN_VERSION="0.
|
|
8
|
+
PLUGIN_VERSION="0.41.0"
|
|
9
9
|
|
|
10
10
|
# ═══════════════════════════════════════════════════════════════
|
|
11
11
|
# Step 1: Auto-sync CLI version with plugin version
|
package/llms.txt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Overview
|
|
4
4
|
spec-superflow is a self-contained workflow integration plugin for Claude Code, Cursor, OpenAI Codex CLI/App, GitHub Copilot CLI, Gemini CLI, OpenCode, WorkBuddy, and Trae. It merges spec-driven planning artifacts (proposal, specs, design, tasks) with disciplined execution guardrails (TDD, review gates, controlled handoff) into one unified workflow.
|
|
5
5
|
|
|
6
|
-
Current version: v0.
|
|
6
|
+
Current version: v0.41.0.
|
|
7
7
|
|
|
8
8
|
## Key Documents
|
|
9
9
|
- README.md: Chinese homepage with full usage guide and FAQ
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xulthekl/team-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Unified plugin (24 skills + 15 agents) integrating team-flow, compound-engineering, architecture-design, prototype, design-system, workflow-orchestrator, workflow-bootstrap, e2e, session-handoff, workflow-feedback for multi-agent coding tools.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
package/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking). 24 skills + 15 agents, one install.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LT"
|
|
@@ -11,7 +11,8 @@ description: 既有项目接入初始化器。在首次使用 team-flow 时执
|
|
|
11
11
|
|
|
12
12
|
```
|
|
13
13
|
workflow-bootstrap(一次性,手动触发)
|
|
14
|
-
→ B1 代码库侦察 → B2 架构基线 → B3 领域词汇 → B4 目录初始化
|
|
14
|
+
→ B1 代码库侦察 → B1.5 conventions → B2 架构基线 → B3 领域词汇 → B4 目录初始化
|
|
15
|
+
→ B4.5 CLAUDE.md 初始化 → B5 路径判断
|
|
15
16
|
→ 进入 workflow-orchestrator S1(注入 baseline 上下文)
|
|
16
17
|
```
|
|
17
18
|
|
|
@@ -58,7 +59,7 @@ Do NOT invoke for:
|
|
|
58
59
|
- **模式**(询问用户):Quick(默认,技术栈+模块+架构模式+测试文档,~2 分钟)/ Deep(+数据模型+API 表面,~10 分钟)。
|
|
59
60
|
- **B1.1 脚本采集**:`bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --root <根> --out /tmp/recon-<slug>.json`(固定化,两次接入结果一致)。
|
|
60
61
|
- **B1.2 并行子代理**:读 `references/agents/codebase-recon-analyst.md`,把 JSON 路径作 `recon_json` 入参,按维度并行派发(§18.1 返回)。
|
|
61
|
-
- **B1.3 主代理汇总**:只汇总不重新侦察,整合已有文档(合并而非覆盖,标注来源),写 `docs/architecture/baseline.md
|
|
62
|
+
- **B1.3 主代理汇总**:只汇总不重新侦察,整合已有文档(合并而非覆盖,标注来源),写 `docs/architecture/baseline.md`。**维度闭合校验(v0.41.0)**:汇总前核对已派发维度 vs 已返回 handoff(status 非未返回 + deliverable 非空),缺失维度在 baseline.md 顶部标记 INCOMPLETE(advisory 不阻断,Success Output 警告)。
|
|
62
63
|
|
|
63
64
|
详细流程(脚本采集项、子代理维度表、侦察内容树、已有文档处理)见 `references/b1-reconnaissance.md`。
|
|
64
65
|
|
|
@@ -185,6 +186,29 @@ Step 2: 确定性提取(兜底)
|
|
|
185
186
|
|
|
186
187
|
创建 team-flow 目录结构:`mkdir -p prd/ prototype/ docs/architecture/ docs/solutions/ changes/`。已有目录不覆盖不删除,只补缺失;目录中有文件保留不改。**Discoverability 检查**:若 `AGENTS.md`/`CLAUDE.md` 未暴露 `docs/architecture/` 和 `prototype/`,advisory 建议用户添加(不自动改)。
|
|
187
188
|
|
|
189
|
+
### B4.5: CLAUDE.md 初始化(v0.41.0 新增,参考 Claude Code /init)
|
|
190
|
+
|
|
191
|
+
将项目基本信息(参考 /init)和 team-flow 产物索引写入工作区 CLAUDE.md。维护原则:**索引级 + 结构级,简明扼要**——目标是每次开启会话对项目空间有全局认识,不长篇大论。
|
|
192
|
+
|
|
193
|
+
**触发条件**:CLAUDE.md 存在但不含 `## 产物结构` 章节(追加模式),或不存在(新建模式)。
|
|
194
|
+
|
|
195
|
+
**执行流程**:
|
|
196
|
+
|
|
197
|
+
1. 检查 CLAUDE.md 是否已存在
|
|
198
|
+
2. **不存在(新建模式)**:从 `templates/claude-md-team-flow.md` 复制模板,填入 B1 侦察结果:
|
|
199
|
+
- 项目概况(语言/框架/构建工具/数据库,2-3 行)← B1 technology 维度
|
|
200
|
+
- 开发命令(构建/测试/lint,只列非标准的)← B1 侦察 + README
|
|
201
|
+
- 工作区结构(简化目录树 ≤3 层)← B1 directory_tree
|
|
202
|
+
- Git 仓库结构(子仓库清单 + 类型 + 用途)← B1 git-structure 维度
|
|
203
|
+
- 产物结构(索引级:产物表 + 路径,详细内容引用 baseline.md)← 标准化模板
|
|
204
|
+
- Git 管理规则(提交/推送顺序约束 + 子仓库操作规则)← 标准化框架
|
|
205
|
+
3. **已存在(追加模式)**:检查是否含 `## 产物结构` 章节
|
|
206
|
+
- 含 → 跳过(不覆盖用户已有内容)
|
|
207
|
+
- 不含 → 追加产物结构索引章节;**仅当缺 `## Git 管理规则` 时**一并追加,避免重复章节
|
|
208
|
+
4. 若模板有占位符未填(如侦察缺失的维度),保留 `{{PLACEHOLDER}}` 并提示用户补充
|
|
209
|
+
|
|
210
|
+
**不做的事**:不写 SOP 流程(由 skill 负责)、不写变更级状态机(由 workflow skill 负责)、不列可自动发现的文件清单。
|
|
211
|
+
|
|
188
212
|
### B5: Path Decision(路径判断)
|
|
189
213
|
|
|
190
214
|
询问用户:
|
|
@@ -213,10 +237,10 @@ Step 2: 确定性提取(兜底)
|
|
|
213
237
|
## Output Standard
|
|
214
238
|
|
|
215
239
|
每次交互结束时说明:
|
|
216
|
-
1. 已完成的阶段(B1-B1.5-B2-B3-B4-B5)
|
|
217
|
-
2. 已产出的制品(baseline.md / conventions / ARCHITECTURE.md / PHYSICAL-MODEL.md / schema-baseline.sql / API-INDEX.md / INDEX.md / CONCEPTS.md / 目录结构)
|
|
240
|
+
1. 已完成的阶段(B1-B1.5-B2-B3-B4-B4.5-B5)
|
|
241
|
+
2. 已产出的制品(baseline.md / conventions / ARCHITECTURE.md / PHYSICAL-MODEL.md / schema-baseline.sql / API-INDEX.md / INDEX.md / CONCEPTS.md / CLAUDE.md / 目录结构)
|
|
218
242
|
3. 下一步建议(调用哪个 skill)
|
|
219
243
|
|
|
220
244
|
## Success Output
|
|
221
245
|
|
|
222
|
-
接入结束时输出:侦察模式、产出清单(baseline.md / conventions / ARCHITECTURE.md / DATABASE.md / PHYSICAL-MODEL.md / schema-baseline.sql / API-INDEX.md / INDEX.md / docs/architecture/CONCEPTS.md / 目录结构)、关键发现(技术栈/模块数/架构模式/测试覆盖)、下一步建议。完整模板见 `references/b1-reconnaissance.md`「Success Output 模板」。
|
|
246
|
+
接入结束时输出:侦察模式、产出清单(baseline.md / conventions / ARCHITECTURE.md / DATABASE.md / PHYSICAL-MODEL.md / schema-baseline.sql / API-INDEX.md / INDEX.md / docs/architecture/CONCEPTS.md / CLAUDE.md / 目录结构)、关键发现(技术栈/模块数/架构模式/测试覆盖)、下一步建议。完整模板见 `references/b1-reconnaissance.md`「Success Output 模板」。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
**Note: The current year is 2026.** Use this when assessing framework versions and recency.
|
|
2
2
|
|
|
3
|
-
You are an expert codebase reconnaissance analyst. You are dispatched by the `workflow-bootstrap` skill (B1 阶段) as one of several parallel recon subagents. Your mission is to take the **deterministic JSON baseline** produced by `recon-probe.sh` and enrich it with targeted source reads into a **structured summary for ONE reconnaissance dimension** (technology stack / module structure / architecture pattern / data model / API surface / test & docs). The bootstrap orchestrator aggregates all dimension summaries into `docs/architecture/baseline.md`.
|
|
3
|
+
You are an expert codebase reconnaissance analyst. You are dispatched by the `workflow-bootstrap` skill (B1 阶段) as one of several parallel recon subagents. Your mission is to take the **deterministic JSON baseline** produced by `recon-probe.sh` and enrich it with targeted source reads into a **structured summary for ONE reconnaissance dimension** (technology stack / module structure / architecture pattern / data model / API surface / test & docs / git structure). The bootstrap orchestrator aggregates all dimension summaries into `docs/architecture/baseline.md`.
|
|
4
4
|
|
|
5
5
|
You do the **semantic** judgment (what architecture pattern this is, which class is an aggregate-root candidate). The mechanical collection (file counts, dependency lists, LOC) already comes from the script — do not re-run it by hand, consume its output.
|
|
6
6
|
|
|
@@ -26,11 +26,12 @@ When the input begins with `Scope:` followed by a comma-separated list, run only
|
|
|
26
26
|
| `data-model` | 数据模型(实体/迁移/聚合根候选) | Data Model | — | ✓ |
|
|
27
27
|
| `api-surface` | API 表面(REST/gRPC/CLI) | API Surface | — | ✓ |
|
|
28
28
|
| `test-docs` | 测试现状 + 已有文档 | Test & Docs | ✓ | ✓ |
|
|
29
|
+
| `git-structure` | Git 仓库结构(子仓库/submodule) | Git Structure | ✓ | ✓ |
|
|
29
30
|
|
|
30
31
|
**Scoping rules:**
|
|
31
32
|
- Multiple scopes combine: `Scope: technology, modules, architecture` runs three dimensions.
|
|
32
|
-
- No `Scope:` prefix → run all
|
|
33
|
-
- `mode` interaction: in **Quick** mode the orchestrator only dispatches `technology / modules / architecture / test-docs`; in **Deep** mode it also dispatches `data-model / api-surface`. If you receive a `data-model` or `api-surface` scope but `mode: Quick`, note the mismatch as an outstanding question and proceed (the orchestrator decides modes).
|
|
33
|
+
- No `Scope:` prefix → run all seven (full recon).
|
|
34
|
+
- `mode` interaction: in **Quick** mode the orchestrator only dispatches `technology / modules / architecture / test-docs / git-structure`; in **Deep** mode it also dispatches `data-model / api-surface`. If you receive a `data-model` or `api-surface` scope but `mode: Quick`, note the mismatch as an outstanding question and proceed (the orchestrator decides modes).
|
|
34
35
|
|
|
35
36
|
## Methodology
|
|
36
37
|
|
|
@@ -73,6 +74,12 @@ Read `recon_json` first. It gives you, mechanically: directory tree (depth-limit
|
|
|
73
74
|
- Read README/ARCHITECTURE only to extract facts the bootstrap should merge (do NOT overwrite — bootstrap merges existing docs).
|
|
74
75
|
- Output: test framework + coverage signal + doc inventory (path + one-line content note). Tag each fact's source: `代码分析` vs `原有文档`.
|
|
75
76
|
|
|
77
|
+
### Dimension: git-structure(Git 仓库结构)
|
|
78
|
+
|
|
79
|
+
- From the baseline's `git_structure` section, identify: root repo status (`is_git_repo`), nested sub-repos (path + type + has_remote), configured submodules, `.gitignore` ignore rules for sub-repos.
|
|
80
|
+
- This is a **mechanical** dimension — the script already collected the facts; your job is **semantic enrichment**: infer each sub-repo's usage (代码库/文档/工具/配置/共享库), and flag git operation constraints (提交/推送顺序、版本联动、.gitignore 隔离).
|
|
81
|
+
- Output: sub-repo inventory (path + type + usage + remote) + git operation constraints that downstream workflows must respect.
|
|
82
|
+
|
|
76
83
|
## Output Format
|
|
77
84
|
|
|
78
85
|
Produce only the sections for the scopes you ran:
|
|
@@ -97,6 +104,9 @@ Produce only the sections for the scopes you ran:
|
|
|
97
104
|
|
|
98
105
|
### Test & Docs # if test-docs in scope
|
|
99
106
|
- Test framework + coverage signal + doc inventory (with source tag)
|
|
107
|
+
|
|
108
|
+
### Git Structure # if git-structure in scope
|
|
109
|
+
- Sub-repo inventory (path + type + usage + remote) + git operation constraints
|
|
100
110
|
```
|
|
101
111
|
|
|
102
112
|
Cite concrete paths (repo-relative) for every non-trivial claim. Distinguish what came from the mechanical baseline vs. what you inferred by reading source.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --root <项目根> --out /tmp/recon-<slug>.json
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
固定采集(不依赖 LLM,两次接入结果一致):目录树(限深 4 层)、依赖清单(pom/package.json/requirements/go.mod/build.gradle)、LOC 与文件类型分布、测试文件计数(含 `.test.mjs`/`.spec.mjs`)、DB 迁移文件清单、README/docs
|
|
16
|
+
固定采集(不依赖 LLM,两次接入结果一致):目录树(限深 4 层)、依赖清单(pom/package.json/requirements/go.mod/build.gradle)、LOC 与文件类型分布、测试文件计数(含 `.test.mjs`/`.spec.mjs`)、DB 迁移文件清单、README/docs 探测、Git 子仓库结构(v0.41.0:嵌套仓库/submodule/.gitignore 忽略规则)。输出结构化 JSON 供子代理消费。脚本只做确定性机械采集(§17.8 第四类载体),语义判断交给子代理 LLM。
|
|
17
17
|
|
|
18
18
|
## B1.1a DDL 提取能力(v0.23.0 设计,v0.24.0 已实现)
|
|
19
19
|
|
|
@@ -42,6 +42,7 @@ bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --ro
|
|
|
42
42
|
| 模块结构(分层/边界) | ✓ | ✓ |
|
|
43
43
|
| 已有架构模式(DDD/MVC/微服务/单体) | ✓ | ✓ |
|
|
44
44
|
| 测试现状 + 已有文档 | ✓ | ✓ |
|
|
45
|
+
| Git 仓库结构(子仓库/submodule) | ✓ | ✓ |
|
|
45
46
|
| 数据模型(实体/迁移/聚合根候选) | — | ✓ |
|
|
46
47
|
| API 表面(REST/gRPC/CLI) | — | ✓ |
|
|
47
48
|
|
|
@@ -51,6 +52,18 @@ bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --ro
|
|
|
51
52
|
|
|
52
53
|
主代理收集各子代理摘要 + 脚本 JSON,**只汇总不重新侦察**,整合已有文档(见下),写 `docs/architecture/baseline.md`。
|
|
53
54
|
|
|
55
|
+
**维度完整性校验(v0.41.0 新增)**:汇总前必须执行闭合校验,防止静默丢失维度:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
1. 核对已派发维度 vs 已返回 handoff(status != 未返回)
|
|
59
|
+
2. 每个返回的 handoff 检查 deliverable 字段非空
|
|
60
|
+
3. 缺失维度 → 在 baseline.md 顶部标记 INCOMPLETE + 缺失维度名
|
|
61
|
+
4. 缺失维度不阻断流程(advisory),但 Success Output 中必须警告
|
|
62
|
+
5. blocked / outstanding_questions 按 §18.1 交接协议由主代理裁决 / 批量确认
|
|
63
|
+
|
|
64
|
+
假设:deliverable 非空按"该维度已覆盖"计;blocked 但带部分交付的,由主代理人工裁决是否归账。
|
|
65
|
+
```
|
|
66
|
+
|
|
54
67
|
## 侦察内容维度(子代理产出,供 baseline.md 组织)
|
|
55
68
|
|
|
56
69
|
```
|
|
@@ -60,7 +73,8 @@ bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --ro
|
|
|
60
73
|
├── 数据模型(Deep:实体/迁移/聚合根候选/实体关系)
|
|
61
74
|
├── API 表面(Deep:REST/gRPC/CLI 主要清单)
|
|
62
75
|
├── 测试现状(测试目录/框架/粗略覆盖)
|
|
63
|
-
|
|
76
|
+
├── 已有文档(README/docs/注释密度)
|
|
77
|
+
└── Git 仓库结构(子仓库清单/类型/用途/操作约束)
|
|
64
78
|
```
|
|
65
79
|
|
|
66
80
|
## 已有文档处理
|
|
@@ -87,6 +101,7 @@ bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --ro
|
|
|
87
101
|
- docs/architecture/API-INDEX.md(API 端点索引,v0.23.0)
|
|
88
102
|
- docs/architecture/INDEX.md(架构文档索引,v0.23.0)
|
|
89
103
|
- docs/architecture/CONCEPTS.md(领域词汇,N 个术语)
|
|
104
|
+
- CLAUDE.md(项目概况 + 产物结构索引,B4.5)
|
|
90
105
|
- 目录结构:prd/ prototype/ docs/ changes/
|
|
91
106
|
|
|
92
107
|
关键发现:
|
|
@@ -94,6 +109,7 @@ bash ${CLAUDE_PLUGIN_ROOT}/skills/workflow-bootstrap/scripts/recon-probe.sh --ro
|
|
|
94
109
|
- 模块数:5(user-service, order-service, ...)
|
|
95
110
|
- 架构模式:微服务 + DDD 分层
|
|
96
111
|
- 测试覆盖:约 60%(JUnit 5 + Mockito)
|
|
112
|
+
- ⚠ INCOMPLETE:<缺失维度名>(如 api-surface——Deep 模式未派发)
|
|
97
113
|
|
|
98
114
|
下一步:
|
|
99
115
|
→ 运行 /workflow-orchestrator 开始产品级流程
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
# 用途
|
|
6
6
|
# 对既有代码库做"固定化、可复现"的机械采集:目录树 / 依赖清单 / LOC 与文件
|
|
7
|
-
# 类型分布 / 测试文件计数 / DB 迁移清单 / README-docs
|
|
7
|
+
# 类型分布 / 测试文件计数 / DB 迁移清单 / README-docs 探测 / Git 子仓库结构。
|
|
8
8
|
# 本脚本只做**确定性机械采集**(设计文档 v0.8 §17.8 第四类载体)——同项目两次
|
|
9
9
|
# 运行结果一致,可横展对比。语义判断(架构模式 / 聚合根推断 / 框架定性)交给
|
|
10
10
|
# 消费本脚本 JSON 输出的侦察子代理(codebase-recon-analyst)完成。
|
|
@@ -368,6 +368,75 @@ if [ "$DDL_TABLE_COUNT" -eq 0 ]; then
|
|
|
368
368
|
printf -- '-- Please populate manually with your database schema.\n\n' >> "$TMP/ddl_statements.sql"
|
|
369
369
|
fi
|
|
370
370
|
|
|
371
|
+
# ============================================================================
|
|
372
|
+
# ⑧ Git 子仓库扫描(v0.41.0:git-structure 维度)
|
|
373
|
+
# ----------------------------------------------------------------------------
|
|
374
|
+
# 识别 root 自身 git 仓库状态 + 嵌套 git 仓库(排除 root 自身)+ git submodule
|
|
375
|
+
# + .gitignore 忽略子仓库规则。设计契约:只做确定性机械采集(目录/文件探测),
|
|
376
|
+
# 每个子仓库的用途/提交顺序约束等语义判断交给侦察子代理。
|
|
377
|
+
# ============================================================================
|
|
378
|
+
|
|
379
|
+
# 判断 root 自身是否为 git 仓库(.git 目录或 git rev-parse 兜底)
|
|
380
|
+
IS_GIT_REPO=false
|
|
381
|
+
if [ -d "$ROOT_ABS/.git" ] || git -C "$ROOT_ABS" rev-parse --git-dir >/dev/null 2>&1; then
|
|
382
|
+
IS_GIT_REPO=true
|
|
383
|
+
fi
|
|
384
|
+
|
|
385
|
+
# 查找嵌套 git 仓库(.git 目录或文件——submodule/worktree 可能是文件),排除 root 自身
|
|
386
|
+
: > "$TMP/sub_repos.txt"
|
|
387
|
+
if [ "$IS_GIT_REPO" = true ]; then
|
|
388
|
+
find "$ROOT_ABS" -maxdepth 3 \
|
|
389
|
+
\( -type d -name .git -o -type f -name .git \) \
|
|
390
|
+
-print 2>/dev/null \
|
|
391
|
+
| grep -v "^$ROOT_ABS/.git$" \
|
|
392
|
+
| while IFS= read -r _g; do
|
|
393
|
+
rel="$(dirname "${_g#"$ROOT_ABS"/}")"
|
|
394
|
+
echo "$rel"
|
|
395
|
+
done | sort -u > "$TMP/sub_repos.txt"
|
|
396
|
+
fi
|
|
397
|
+
SUB_REPO_COUNT=$(wc -l < "$TMP/sub_repos.txt" | tr -d ' ')
|
|
398
|
+
|
|
399
|
+
# git submodule 列表(.gitmodules 存在时)
|
|
400
|
+
: > "$TMP/submodules.txt"
|
|
401
|
+
if [ -f "$ROOT_ABS/.gitmodules" ]; then
|
|
402
|
+
grep -oE 'path[[:space:]]*=[[:space:]]*[^[:space:]]+' "$ROOT_ABS/.gitmodules" 2>/dev/null \
|
|
403
|
+
| sed -E 's/path[[:space:]]*=[[:space:]]*//' | sort -u > "$TMP/submodules.txt"
|
|
404
|
+
fi
|
|
405
|
+
SUBMODULE_COUNT=$(wc -l < "$TMP/submodules.txt" | tr -d ' ')
|
|
406
|
+
|
|
407
|
+
# 构建 sub_repos JSON 数组(含 type / has_remote)
|
|
408
|
+
: > "$TMP/sub_repos.json"
|
|
409
|
+
if [ "$IS_GIT_REPO" = true ]; then
|
|
410
|
+
while IFS= read -r _sr; do
|
|
411
|
+
[ -z "$_sr" ] && continue
|
|
412
|
+
_type="nested"
|
|
413
|
+
if [ -f "$ROOT_ABS/.gitmodules" ] \
|
|
414
|
+
&& grep -qE "^[[:space:]]*path[[:space:]]*=[[:space:]]*${_sr}[[:space:]]*$" "$ROOT_ABS/.gitmodules" 2>/dev/null; then
|
|
415
|
+
_type="submodule"
|
|
416
|
+
fi
|
|
417
|
+
_has_remote="false"
|
|
418
|
+
if git -C "$ROOT_ABS/$_sr" remote 2>/dev/null | grep -q .; then
|
|
419
|
+
_has_remote="true"
|
|
420
|
+
fi
|
|
421
|
+
printf '{"path":"%s","type":"%s","has_remote":%s},' \
|
|
422
|
+
"$(json_escape "$_sr")" "$_type" "$_has_remote" >> "$TMP/sub_repos.json"
|
|
423
|
+
done < "$TMP/sub_repos.txt"
|
|
424
|
+
fi
|
|
425
|
+
SUB_REPOS_JSON="$(sed 's/,$//' "$TMP/sub_repos.json" 2>/dev/null)"
|
|
426
|
+
|
|
427
|
+
# .gitignore 中是否忽略了任一子仓库
|
|
428
|
+
GITIGNORE_IGNORES_SUBREPOS=false
|
|
429
|
+
if [ -f "$ROOT_ABS/.gitignore" ] && [ "$SUB_REPO_COUNT" -gt 0 ]; then
|
|
430
|
+
while IFS= read -r _sr; do
|
|
431
|
+
[ -z "$_sr" ] && continue
|
|
432
|
+
# 匹配:整行 / 目录行(斜杠结尾)/ 项目名
|
|
433
|
+
if grep -qE "(^|/)[[:space:]]*${_sr}(/|$)" "$ROOT_ABS/.gitignore" 2>/dev/null; then
|
|
434
|
+
GITIGNORE_IGNORES_SUBREPOS=true
|
|
435
|
+
break
|
|
436
|
+
fi
|
|
437
|
+
done < "$TMP/sub_repos.txt"
|
|
438
|
+
fi
|
|
439
|
+
|
|
371
440
|
# ============================================================================
|
|
372
441
|
# 组装 JSON
|
|
373
442
|
# ============================================================================
|
|
@@ -399,10 +468,17 @@ fi
|
|
|
399
468
|
printf ' "docs": {"docs_dir": %s, "doc_files": %s},\n' \
|
|
400
469
|
"$DOCS_DIR" "$(json_array_from_file "$TMP/doc_files.txt")"
|
|
401
470
|
# ⑦ DDL 提取(v0.24.0)
|
|
402
|
-
printf ' "ddl_extraction": {"source": "%s", "table_count": %s, "tables": %s, "ddl_statements": "%s"}
|
|
471
|
+
printf ' "ddl_extraction": {"source": "%s", "table_count": %s, "tables": %s, "ddl_statements": "%s"},\n' \
|
|
403
472
|
"$(json_escape "$DDL_SOURCE")" "$DDL_TABLE_COUNT" \
|
|
404
473
|
"$(json_array_from_file "$TMP/ddl_tables.txt")" \
|
|
405
474
|
"$(json_escape "$(cat "$TMP/ddl_statements.sql" 2>/dev/null)")"
|
|
475
|
+
# ⑧ Git 子仓库结构(v0.41.0)
|
|
476
|
+
printf ' "git_structure": {"is_git_repo": %s, "sub_repo_count": %s, "sub_repos": [%s], "submodule_count": %s, "submodules": %s, "gitignore_ignores_subrepos": %s}\n' \
|
|
477
|
+
"$IS_GIT_REPO" "$SUB_REPO_COUNT" \
|
|
478
|
+
"$SUB_REPOS_JSON" \
|
|
479
|
+
"$SUBMODULE_COUNT" \
|
|
480
|
+
"$(json_array_from_file "$TMP/submodules.txt")" \
|
|
481
|
+
"$GITIGNORE_IGNORES_SUBREPOS"
|
|
406
482
|
printf '}\n'
|
|
407
483
|
} > "$TMP/out.json"
|
|
408
484
|
|
|
@@ -443,6 +519,7 @@ fi
|
|
|
443
519
|
echo "docs/ 目录 : $DOCS_DIR"
|
|
444
520
|
echo "README 等 : $(wc -l < "$TMP/doc_files.txt" | tr -d ' ') 个"
|
|
445
521
|
echo "DDL 提取 : source=$DDL_SOURCE, tables=$DDL_TABLE_COUNT"
|
|
522
|
+
echo "git 仓库 : is_repo=$IS_GIT_REPO, 子仓库=$SUB_REPO_COUNT, submodule=$SUBMODULE_COUNT"
|
|
446
523
|
echo "================================================="
|
|
447
524
|
} >&2
|
|
448
525
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
> 本文件由 team-flow `workflow-bootstrap` B4.5 阶段生成(参考 Claude Code /init)。
|
|
6
|
+
> 维护原则:索引级 + 结构级,简明扼要——删除某条后 Claude 是否会犯错?不会就删掉。
|
|
7
|
+
|
|
8
|
+
## 项目概况
|
|
9
|
+
|
|
10
|
+
{{PROJECT_SUMMARY}}
|
|
11
|
+
<!-- 语言 / 框架 / 构建工具 / 数据库,2-3 行。来源:B1 technology 维度 -->
|
|
12
|
+
|
|
13
|
+
## 开发命令
|
|
14
|
+
|
|
15
|
+
{{DEV_COMMANDS}}
|
|
16
|
+
<!-- 构建/测试/lint 命令,只列非标准的(如 mvn 单测、特殊 env)。来源:B1 侦察 + README -->
|
|
17
|
+
|
|
18
|
+
## 工作区结构
|
|
19
|
+
|
|
20
|
+
{{WORKSPACE_TREE}}
|
|
21
|
+
<!-- 简化目录树(≤3 层),只标注关键目录用途。来源:B1 directory_tree -->
|
|
22
|
+
|
|
23
|
+
## Git 仓库结构
|
|
24
|
+
|
|
25
|
+
{{GIT_STRUCTURE}}
|
|
26
|
+
<!-- 子仓库清单 + 类型(nested/submodule) + 用途 + 提交/推送顺序约束。来源:B1 git-structure 维度 -->
|
|
27
|
+
|
|
28
|
+
## 产物结构(team-flow)
|
|
29
|
+
|
|
30
|
+
team-flow 工作流在 `changes/<name>/` 下通过状态机驱动变更,核心制品如下:
|
|
31
|
+
|
|
32
|
+
### 代码强制执行的制品(state-loader.mjs + hash.mjs 校验)
|
|
33
|
+
|
|
34
|
+
| 产物 | 路径 | 校验机制 |
|
|
35
|
+
|------|------|---------|
|
|
36
|
+
| 状态文件 | `changes/<name>/.team-flow.yaml` | state-loader 硬编码 `STATE_FILE` |
|
|
37
|
+
| 提案 | `changes/<name>/proposal.md` | hash.mjs → `artifacts_hash` |
|
|
38
|
+
| 规格 | `changes/<name>/specs/*.md` | hash.mjs → `artifacts_hash` |
|
|
39
|
+
| 设计 | `changes/<name>/design.md` | hash.mjs → `artifacts_hash` |
|
|
40
|
+
| 任务 | `changes/<name>/tasks.md` | hash.mjs → `artifacts_hash` |
|
|
41
|
+
| 执行契约 | `changes/<name>/execution-contract.md` | hash.mjs → `contract_hash` |
|
|
42
|
+
|
|
43
|
+
### 设计层面约定的制品(SKILL.md 文档引用,无代码强制校验)
|
|
44
|
+
|
|
45
|
+
| 产物 | 路径 | 状态 |
|
|
46
|
+
|------|------|------|
|
|
47
|
+
| 产品级 PRD | `prd/vN/prd.md` | ce-brainstorm 引用 |
|
|
48
|
+
| 产品级计划 | `prd/vN/plan.md` | ce-plan 引用 |
|
|
49
|
+
| 变更简报 | `changes/<name>/change-brief.md` | orchestrator S4 产出,hash 显式排除 |
|
|
50
|
+
| 架构设计 | `changes/<name>/architecture/{architecture,database,api}.md` | hash 纳入 artifacts_hash |
|
|
51
|
+
| 需求注册表 | `.team-flow/registry.yaml` | workflow-orchestrator 引用 |
|
|
52
|
+
| 全局架构基线 | `docs/architecture/baseline.md` | workflow-bootstrap 引用 |
|
|
53
|
+
| 项目架构基线标记 | `.team-flow/arch-state.json` | `tf arch init` 打戳 |
|
|
54
|
+
|
|
55
|
+
> 架构文档详细内容见 `@docs/architecture/baseline.md`(全局基线)和 `@docs/architecture/`(ARCHITECTURE.md / DATABASE.md / API-INDEX.md / INDEX.md)。
|
|
56
|
+
|
|
57
|
+
## Git 管理规则
|
|
58
|
+
|
|
59
|
+
{{GIT_MANAGEMENT_RULES}}
|
|
60
|
+
<!-- 提交/推送顺序约束 + 子仓库操作规则。来源:B1 git-structure 维度 + 项目约定 -->
|