@xulthekl/team-flow 0.25.1 → 0.26.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.
- 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/CHANGELOG.md +15 -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/scripts/lib/config-loader.mjs +7 -3
- package/skills/bug-investigator/SKILL.md +1 -1
- package/skills/build-executor/SKILL.md +19 -19
- package/skills/build-executor/implementer-prompt.md +1 -1
- package/skills/build-executor/references/execution-modes.md +6 -6
- package/skills/build-executor/task-reviewer-prompt.md +1 -1
- package/skills/ce-brainstorm/SKILL.md +43 -3
- package/skills/ce-brainstorm/references/brainstorm-sections.md +14 -0
- package/skills/code-reviewer/SKILL.md +2 -2
- package/skills/code-reviewer/code-reviewer-prompt.md +1 -1
- package/skills/contract-builder/SKILL.md +6 -6
- package/skills/need-explorer/SKILL.md +2 -2
- package/skills/release-archivist/SKILL.md +12 -12
- package/skills/release-archivist/references/closing-procedures.md +8 -8
- package/skills/spec-merger/SKILL.md +2 -2
- package/skills/spec-writer/SKILL.md +3 -3
- package/skills/workflow-orchestrator/SKILL.md +89 -1
- package/skills/workflow-orchestrator/references/s2-prd-prototype-loop.md +34 -1
- package/skills/workflow-orchestrator/references/s4-split-validate.md +1 -1
- package/skills/workflow-orchestrator/references/s5-monitoring.md +1 -1
- package/skills/workflow-start/SKILL.md +16 -16
- package/skills/workflow-start/references/routing-rules.md +17 -17
|
@@ -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. 23 skills + 8 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.26.1",
|
|
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.26.1",
|
|
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). 23 skills + 8 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). 23 skills + 8 agents, one install.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.26.1",
|
|
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.26.1"
|
|
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.26.1",
|
|
16
16
|
"source": ".",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "LT",
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,21 @@ The format loosely follows Keep a Changelog.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.26.0] - 2026-07-29
|
|
10
|
+
|
|
11
|
+
### Added(配置管理与 Skill 降级逻辑补强,4 项)
|
|
12
|
+
|
|
13
|
+
#### Config-loader 查找顺序优化
|
|
14
|
+
- **scripts/lib/config-loader.mjs**:`findConfigFile` 函数增加 `.team-flow/team-flow.config.json` 查找路径(优先于项目根目录)。新查找顺序:① `.team-flow/` → ② 根目录(兼容旧路径)→ ③ git 根 → ④ home
|
|
15
|
+
|
|
16
|
+
#### ce-brainstorm Phase 0.0 降级逻辑补强
|
|
17
|
+
- **skills/ce-brainstorm/SKILL.md Phase 0.0**:增加 tf CLI 可用性检查(`which tf`),不可用时走显式降级逻辑:询问用户(默认模板 or 自定义路径)→ 在 `.team-flow/templates/` 创建模板 → 维护配置到 `.team-flow/team-flow.config.json`
|
|
18
|
+
- **skills/ce-brainstorm/SKILL.md Phase 0.0**:增加 guardrail——明确禁止写入 skill 源码目录,项目级制品只在项目工作区创建/修改
|
|
19
|
+
|
|
20
|
+
### Documentation(1 项)
|
|
21
|
+
|
|
22
|
+
- **docs/architecture-api-db-design-enhancement-v0.10.md**:新增第 32 章「配置管理与 Skill 降级逻辑补强」
|
|
23
|
+
|
|
9
24
|
## [0.25.1] - 2026-07-29
|
|
10
25
|
|
|
11
26
|
### Changed(SKILL.md 渐进式披露拆分,P1-9,3 项)
|
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.26.1 | 阶段: {{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.26.1`
|
|
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.26.1`
|
|
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). 17 skills, one install.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.26.1",
|
|
5
5
|
"contextFileName": "GEMINI.md"
|
|
6
6
|
}
|
package/hooks/session-start
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# v0.
|
|
3
|
-
msg="<EXTREMELY_IMPORTANT>\nYou have team-flow installed.
|
|
2
|
+
# v0.26.1: conditional injection — detects artifacts, injects workflow-start pointer
|
|
3
|
+
msg="<EXTREMELY_IMPORTANT>\nYou have team-flow installed. Invoke /team-flow:workflow-start or /team-flow:workflow-orchestrator ONLY when active team-flow artifacts exist (\`.team-flow.yaml\`, \`proposal.md\`, \`execution-contract.md\`, \`specs/\`) or the user explicitly requests it. For ordinary coding tasks, do NOT invoke them.\n</EXTREMELY_IMPORTANT>\n<EXTREMELY_IMPORTANT>\n## Workspace Directory Rule\n\"Base directory for this skill\" = skill source location (read SKILL.md/references/ ONLY). User project = \`pwd\`. ALL project artifacts (changes/, prd/, docs/, .team-flow/, etc.) MUST operate under \`pwd\`, NEVER the skill base directory. Run \`pwd\` first in every skill execution.\n</EXTREMELY_IMPORTANT>"
|
|
4
4
|
|
|
5
5
|
# Three platforms share the same message, only output format differs.
|
|
6
6
|
if [ -n "${CURSOR_PLUGIN_ROOT:-}" ]; then
|
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.26.1.
|
|
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.26.1",
|
|
4
4
|
"description": "Unified plugin (23 skills + 8 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.26.1",
|
|
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). 23 skills + 8 agents, one install.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LT"
|
|
@@ -68,11 +68,15 @@ function deepMerge(target, source) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
function findConfigFile(startDir) {
|
|
71
|
-
// 1. Check
|
|
71
|
+
// 1. Check .team-flow/ directory (preferred location)
|
|
72
|
+
const teamFlowDir = join(startDir, '.team-flow', 'team-flow.config.json');
|
|
73
|
+
if (existsSync(teamFlowDir)) return teamFlowDir;
|
|
74
|
+
|
|
75
|
+
// 2. Check startDir (legacy location, for backward compatibility)
|
|
72
76
|
const direct = join(startDir, 'team-flow.config.json');
|
|
73
77
|
if (existsSync(direct)) return direct;
|
|
74
78
|
|
|
75
|
-
//
|
|
79
|
+
// 3. Check git root
|
|
76
80
|
try {
|
|
77
81
|
const gitRoot = execFileSync('git', ['rev-parse', '--show-toplevel'], {
|
|
78
82
|
cwd: startDir,
|
|
@@ -85,7 +89,7 @@ function findConfigFile(startDir) {
|
|
|
85
89
|
// Not a git repo — skip
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
//
|
|
92
|
+
// 4. Check home directory
|
|
89
93
|
const homePath = join(process.env.HOME || '', 'team-flow.config.json');
|
|
90
94
|
if (existsSync(homePath)) return homePath;
|
|
91
95
|
|
|
@@ -49,7 +49,7 @@ Scientific method: form a single hypothesis ("I think X is the root cause becaus
|
|
|
49
49
|
|
|
50
50
|
### DP-5: Debug Escalation (3+ Failures)
|
|
51
51
|
|
|
52
|
-
3+ failed fixes = architectural problem. Each fix revealing new problems elsewhere = wrong architecture. Record: `npx --yes --package @xulthekl/team-flow@0.
|
|
52
|
+
3+ failed fixes = architectural problem. Each fix revealing new problems elsewhere = wrong architecture. Record: `npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_5_result <decision>`. Discuss with user before attempting more fixes.
|
|
53
53
|
|
|
54
54
|
## Red Flags — Return to Phase 1
|
|
55
55
|
|
|
@@ -15,18 +15,18 @@ When `architecture/sql/` exists, also read:
|
|
|
15
15
|
- `architecture/sql/ddl/*.sql` — executable DDL scripts; reference directly for DB schema change tasks instead of hand-writing DDL
|
|
16
16
|
- `architecture/sql/migration/*.sql` — data migration scripts; execute as-is for data transformation tasks
|
|
17
17
|
|
|
18
|
-
Check workflow mode first: `npx --yes --package @xulthekl/team-flow@0.
|
|
18
|
+
Check workflow mode first: `npx --yes --package @xulthekl/team-flow@0.26.1 tf state get <change-dir> workflow`. If `tweak` → direct edit mode. If `hotfix` or `full` → standard contract-first discipline.
|
|
19
19
|
|
|
20
20
|
Branch/worktree preflight before ANY implementation edit (mandatory — do not skip):
|
|
21
21
|
1. Run the isolation check:
|
|
22
22
|
```bash
|
|
23
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
23
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf isolate <change-dir>
|
|
24
24
|
```
|
|
25
25
|
This script enforces git isolation: if you are on `main`/`master` it creates a
|
|
26
26
|
git worktree (preferred) or a new branch, and exits non-zero if it cannot and you
|
|
27
27
|
have not approved `--force`.
|
|
28
|
-
2. If `npx --yes --package @xulthekl/team-flow@0.
|
|
29
|
-
Ask the user for explicit approval (and re-run with `npx --yes --package @xulthekl/team-flow@0.
|
|
28
|
+
2. If `npx --yes --package @xulthekl/team-flow@0.26.1 tf isolate` exits non-zero: STOP. Do not edit `main`/`master` in place.
|
|
29
|
+
Ask the user for explicit approval (and re-run with `npx --yes --package @xulthekl/team-flow@0.26.1 tf isolate <change-dir> --force`
|
|
30
30
|
only after they approve).
|
|
31
31
|
3. If it succeeds, report the chosen branch/worktree and make all implementation
|
|
32
32
|
edits there.
|
|
@@ -52,15 +52,15 @@ Return to `specifying` or `bridging` if: new behavior appears, interfaces change
|
|
|
52
52
|
For `full`/`hotfix`, generate proposed waves from the approved contract, then use the recommendation as a decision aid rather than silently defaulting a mode:
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
55
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution recommend <change-dir> \
|
|
56
56
|
--wave <wave-id>:<parallel|serial>:<task,...>[:<depends-on,...>] --json
|
|
57
57
|
# Show every available mode, the observed facts, and the recommendation to the user.
|
|
58
58
|
# The command writes a receipt tied to the artifacts, contract, and waves. After the user chooses, record that explicit confirmation:
|
|
59
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
59
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution plan <change-dir> \
|
|
60
60
|
--mode <selected-mode> --confirm --reason "user-selected execution mode" \
|
|
61
61
|
--wave <wave-id>:<parallel|serial>:<task,...>[:<depends-on,...>]
|
|
62
62
|
# Add --acknowledge-recommendation when the selection differs from the recommendation.
|
|
63
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
63
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution show <change-dir> --json
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
The optional fourth `--wave` segment names prerequisite wave IDs. `execution show --json` reports `current`, plus each wave's `depends_on`, `receipt`, `blockers`, `retryable`, and `eligible` status. A wave with `retryable: true` has a current `fail` receipt and is eligible only for its focused repair and re-review; its dependents remain blocked until its replacement `pass` receipt. Report the saved plan revision, selected mode, ordered waves, dependencies, and whether every `parallel` wave can actually be dispatched concurrently on the current platform. If concurrency is unavailable, state the capability and reason plainly; retain the planned `parallel` strategy and do not silently execute it as a serial or Batch Inline plan.
|
|
@@ -73,7 +73,7 @@ The recommendation uses task count, configured `execution.inlineThreshold`, and
|
|
|
73
73
|
| **Inline** | Recommended for a single sequential task; always available for a user-confirmed choice |
|
|
74
74
|
| **Batch Inline** | Recommended for a bounded sequential batch; it remains serial and is never presented as parallel |
|
|
75
75
|
|
|
76
|
-
Do not transition to `executing` until `execution show` reports `current: true` and the phase guard passes. A revised plan must repeat `npx --yes --package @xulthekl/team-flow@0.
|
|
76
|
+
Do not transition to `executing` until `execution show` reports `current: true` and the phase guard passes. A revised plan must repeat `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution recommend` and use `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution revise --confirm`; it creates a new revision and invalidates receipts from the prior revision.
|
|
77
77
|
|
|
78
78
|
## Batch Inline Execution
|
|
79
79
|
|
|
@@ -88,21 +88,21 @@ Boundaries: if any task touches >1 module, involves schema/API/config changes, o
|
|
|
88
88
|
For full/hotfix by default. Dispatch according to the persisted plan, review each planned wave, and run a final broad review after all waves.
|
|
89
89
|
|
|
90
90
|
### Planned-Wave Loop
|
|
91
|
-
1. Read the current plan with `npx --yes --package @xulthekl/team-flow@0.
|
|
91
|
+
1. Read the current plan with `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution show <change-dir> --json`; only waves shown with `current: true` and `eligible: true` may start. A `retryable: true` wave may only be repaired and re-reviewed; do not dispatch its dependents until its replacement receipt is `pass`. The CLI encodes dependencies in `--wave <id>:<strategy>:<tasks>[:<depends-on,...>]` and rejects a review receipt for a wave whose prerequisites lack current `pass` receipts.
|
|
92
92
|
2. A `parallel` wave may dispatch independent tasks simultaneously only when the platform supports concurrent dispatch. If it does not, disclose the unavailable capability and execute the same wave one task at a time without changing its stored strategy.
|
|
93
93
|
3. A `serial` wave dispatches one task at a time in listed order.
|
|
94
94
|
4. After every wave, write a non-empty persisted regular-file review report (separate from the implementer's report), then record exactly one receipt that names that review report:
|
|
95
95
|
```bash
|
|
96
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
96
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution review <change-dir> \
|
|
97
97
|
--wave <wave-id> --base <sha> --head <sha> --report <review-report-path> --verdict <pass|fail>
|
|
98
98
|
```
|
|
99
99
|
Do not begin a dependent wave until its predecessor receipt is `pass`.
|
|
100
100
|
5. Critical/Important findings require a `fail` receipt, a focused repair, re-review, then a replacement `pass` receipt. Never advance or close with a missing or failed receipt.
|
|
101
101
|
|
|
102
102
|
### Per-Task Loop
|
|
103
|
-
1. **Dispatch implementer**: Load the template with `npx --yes --package @xulthekl/team-flow@0.
|
|
103
|
+
1. **Dispatch implementer**: Load the template with `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime asset read skills/build-executor/implementer-prompt.md`. Extract task brief with `scripts/task-brief PLAN_FILE N`. Include: where task fits, brief path, interfaces from prior tasks, report file path.
|
|
104
104
|
2. **Handle response**: DONE → generate review package + dispatch reviewer. DONE_WITH_CONCERNS → assess. NEEDS_CONTEXT → provide context. BLOCKED → re-dispatch with better model or escalate.
|
|
105
|
-
3. **Review**: Load `npx --yes --package @xulthekl/team-flow@0.
|
|
105
|
+
3. **Review**: Load `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime asset read skills/build-executor/task-reviewer-prompt.md`. Reviewer returns spec compliance + code quality verdicts with the wave ID, git range, report path, and `pass`/`fail` receipt command.
|
|
106
106
|
4. **Fix**: If Critical or Important issues, write the `fail` receipt, dispatch fix subagent, re-review, and write the replacement `pass` receipt.
|
|
107
107
|
5. **Mark complete**: Append to `.superpowers/sdd/progress.md`: `Task N: complete (commits <base7>..<head7>, review clean)`
|
|
108
108
|
|
|
@@ -110,7 +110,7 @@ For full/hotfix by default. Dispatch according to the persisted plan, review eac
|
|
|
110
110
|
Use the configured profile that matches the task role. Resolve it before dispatch:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
113
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime config --resolve-model <profile>
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
| Profile | Role |
|
|
@@ -123,11 +123,11 @@ npx --yes --package @xulthekl/team-flow@0.25.1 tf runtime config --resolve-model
|
|
|
123
123
|
For platforms whose dispatch supports a `model` field, explicitly pass the resolved `model` value. If the result is `configured: false`, automatic selection is unavailable: do not invent a provider model and do not bypass the existing requirement to specify `model` explicitly. Resolution only reads configuration; it does not switch models.
|
|
124
124
|
|
|
125
125
|
### Progress Ledger
|
|
126
|
-
Track in `.superpowers/sdd/progress.md`. Check for existing ledger — completed tasks are done. After each batch: `npx --yes --package @xulthekl/team-flow@0.
|
|
126
|
+
Track in `.superpowers/sdd/progress.md`. Check for existing ledger — completed tasks are done. After each batch: `npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> batches_completed <N>`.
|
|
127
127
|
|
|
128
128
|
## Inline Execution Mode
|
|
129
129
|
|
|
130
|
-
Only after a user-confirmed `inline` selection is recorded by `npx --yes --package @xulthekl/team-flow@0.
|
|
130
|
+
Only after a user-confirmed `inline` selection is recorded by `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution plan --confirm`; a non-recommended selection also records `--acknowledge-recommendation`. Executes in the current session and still writes one review receipt per planned wave.
|
|
131
131
|
|
|
132
132
|
Per-task: extract brief → write failing test → confirm failure → implement → confirm green → checkpoint review (done-when criteria, SHALL/MUST verification) → commit → save a task-level recovery checkpoint when another task remains → append to progress ledger.
|
|
133
133
|
|
|
@@ -135,7 +135,7 @@ After a task is committed and reviewed, when another task remains, save the
|
|
|
135
135
|
recovery context with real evidence:
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
138
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf checkpoint save <change-dir> \
|
|
139
139
|
--task <completed-task-id> --next "<next task>" --completed "<completed work>" \
|
|
140
140
|
--verification "<verification report path>" --review "<review report path>" \
|
|
141
141
|
--risk "<open risk or None>" --commit-start <base-sha> --commit-end <head-sha>
|
|
@@ -143,7 +143,7 @@ npx --yes --package @xulthekl/team-flow@0.25.1 tf checkpoint save <change-dir> \
|
|
|
143
143
|
|
|
144
144
|
This augments `.superpowers/sdd/progress.md`; it does not replace the progress
|
|
145
145
|
ledger or add a new core workflow state. Do not claim a checkpoint is current
|
|
146
|
-
when `npx --yes --package @xulthekl/team-flow@0.
|
|
146
|
+
when `npx --yes --package @xulthekl/team-flow@0.26.1 tf checkpoint list` reports it as stale.
|
|
147
147
|
|
|
148
148
|
If task hits BLOCKED (3+ fix failures or changes outside declared scope), escalate to SDD.
|
|
149
149
|
|
|
@@ -153,8 +153,8 @@ Skip TDD. Apply changes directly. Verify file integrity (exists, non-empty, vali
|
|
|
153
153
|
|
|
154
154
|
## DP Records
|
|
155
155
|
|
|
156
|
-
DP-4 is written by `npx --yes --package @xulthekl/team-flow@0.
|
|
157
|
-
DP-5 (debug escalation): `npx --yes --package @xulthekl/team-flow@0.
|
|
156
|
+
DP-4 is written by `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution plan`; do not write it with raw `state set`.
|
|
157
|
+
DP-5 (debug escalation): `npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_5_result "<resolution>"` + timestamp.
|
|
158
158
|
|
|
159
159
|
## Completion Standard
|
|
160
160
|
|
|
@@ -22,7 +22,7 @@ Subagent (general-purpose):
|
|
|
22
22
|
## Planned Wave
|
|
23
23
|
|
|
24
24
|
You are assigned to planned wave [WAVE_ID] with strategy [WAVE_STRATEGY].
|
|
25
|
-
Read `npx --yes --package @xulthekl/team-flow@0.
|
|
25
|
+
Read `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution show <change-dir> --json` before editing. Do not start
|
|
26
26
|
unless all declared dependencies have `pass` review receipts. A `parallel`
|
|
27
27
|
label permits concurrent dispatch only when the controller confirms the
|
|
28
28
|
platform supports it; never change the saved wave strategy yourself.
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
For `full`/`hotfix`, generate proposed waves from the approved contract, then use the recommendation as a decision aid:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
10
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution recommend <change-dir> \
|
|
11
11
|
--wave <wave-id>:<parallel|serial>:<task,...>[:<depends-on,...>] --json
|
|
12
12
|
# Show every available mode, the observed facts, and the recommendation to the user.
|
|
13
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
13
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution plan <change-dir> \
|
|
14
14
|
--mode <selected-mode> --confirm --reason "user-selected execution mode" \
|
|
15
15
|
--wave <wave-id>:<parallel|serial>:<task,...>[:<depends-on,...>]
|
|
16
16
|
# Add --acknowledge-recommendation when the selection differs from the recommendation.
|
|
17
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
17
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution show <change-dir> --json
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
The optional fourth `--wave` segment names prerequisite wave IDs. `execution show --json` reports `current`, plus each wave's `depends_on`, `receipt`, `blockers`, `retryable`, and `eligible` status.
|
|
@@ -37,7 +37,7 @@ Dispatch according to the persisted plan, review each planned wave, and run a fi
|
|
|
37
37
|
3. A `serial` wave dispatches one task at a time in listed order.
|
|
38
38
|
4. After every wave, write a review report, then record one receipt:
|
|
39
39
|
```bash
|
|
40
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
40
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution review <change-dir> \
|
|
41
41
|
--wave <wave-id> --base <sha> --head <sha> --report <review-report-path> --verdict <pass|fail>
|
|
42
42
|
```
|
|
43
43
|
5. Critical/Important findings require a `fail` receipt, focused repair, re-review, then replacement `pass` receipt.
|
|
@@ -66,7 +66,7 @@ Per-task: extract brief → write failing test → confirm failure → implement
|
|
|
66
66
|
## Model Selection
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
69
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime config --resolve-model <profile>
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
| Profile | Role |
|
|
@@ -79,7 +79,7 @@ npx --yes --package @xulthekl/team-flow@0.25.1 tf runtime config --resolve-model
|
|
|
79
79
|
## Recovery Checkpoint
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
82
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf checkpoint save <change-dir> \
|
|
83
83
|
--task <completed-task-id> --next "<next task>" --completed "<completed work>" \
|
|
84
84
|
--verification "<verification report path>" --review "<review report path>" \
|
|
85
85
|
--risk "<open risk or None>" --commit-start <base-sha> --commit-end <head-sha>
|
|
@@ -146,7 +146,7 @@ Subagent (general-purpose):
|
|
|
146
146
|
command for the controller:
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
149
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution review <change-dir> --wave [WAVE_ID] --base [BASE_SHA] --head [HEAD_SHA] --report [REVIEW_REPORT_FILE] --verdict <pass|fail>
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
Use `fail` for any Critical/Important finding. A repair must be re-reviewed
|
|
@@ -62,17 +62,41 @@ If no feature description was provided, ask the user. If `docs/ideation/*.md` ex
|
|
|
62
62
|
|
|
63
63
|
#### 0.0 Resolve Output Mode + PRD Template
|
|
64
64
|
|
|
65
|
+
> **⛔ GUARDRAIL:禁止写入 skill 源码目录**
|
|
66
|
+
>
|
|
67
|
+
> 项目级制品(PRD 模板、配置文件等)只在**项目工作区**创建/修改:
|
|
68
|
+
> - 模板文件:`.team-flow/templates/`
|
|
69
|
+
> - 配置文件:`.team-flow/team-flow.config.json`
|
|
70
|
+
>
|
|
71
|
+
> **绝不写入 skill 源码目录**(`skills/ce-brainstorm/` 等)。
|
|
72
|
+
|
|
65
73
|
Determine `OUTPUT_FORMAT` (md or html). For the full 5-level precedence, read `references/output-format.md`.
|
|
66
74
|
|
|
67
75
|
**Resolve PRD template — MANDATORY STEP, DO NOT SKIP.**
|
|
68
76
|
|
|
69
|
-
|
|
77
|
+
1. **检查 tf CLI 是否可用**:运行 `which tf`
|
|
78
|
+
- ✅ 可用:继续执行 `tf runtime config --get prd.template`
|
|
79
|
+
- ❌ 不可用:走降级逻辑(见下方)
|
|
70
80
|
|
|
71
|
-
|
|
72
|
-
-
|
|
81
|
+
2. **降级逻辑(tf 不可用时)**:
|
|
82
|
+
- 通知用户:`tf` 命令不可用,将使用默认配置
|
|
83
|
+
- **询问用户**:默认模板 or 自定义路径?
|
|
84
|
+
- 默认模板:**直接 cp skill 内置模板到项目目录**(见下方步骤)
|
|
85
|
+
- 自定义路径:验证文件存在,在项目工作区记录配置
|
|
86
|
+
- **维护配置文件**:在 `.team-flow/team-flow.config.json` 中记录配置(如文件不存在则创建)
|
|
87
|
+
|
|
88
|
+
3. **默认模板处理步骤(重要)**:
|
|
89
|
+
- **源文件**:skill 内置 `templates/prd.md`(相对于 skill 基础目录)
|
|
90
|
+
- **目标目录**:`.team-flow/templates/`(项目工作区)
|
|
91
|
+
- **操作**:直接 `cp` 源文件到目标目录,**不要自行创建简化版本**
|
|
92
|
+
- **验证**:检查目标文件是否存在且包含完整的11个章节
|
|
73
93
|
|
|
74
94
|
Built-in `templates/prd.md` is relative to the skill's base directory. Custom paths are relative to project root.
|
|
75
95
|
|
|
96
|
+
**⛔ 关键约束**:
|
|
97
|
+
- **错误行为**:自行创建简化版本的PRD模板
|
|
98
|
+
- **正确行为**:直接 cp 原始 PRD 模板到项目目录,保持模板完整性
|
|
99
|
+
|
|
76
100
|
**Resolve brainstorm profile.** After template resolution, look for `<template-name>-brainstorm-profile.md` in the same directory. Store as `BRAINSTORM_PROFILE_PATH`. Fall back to built-in `templates/prd-brainstorm-profile.md`.
|
|
77
101
|
|
|
78
102
|
#### 0.1–0.5 Routing Sub-phases
|
|
@@ -111,6 +135,22 @@ Propose **2-3 approaches** (or recommend directly if one is clearly best). Use n
|
|
|
111
135
|
|
|
112
136
|
### Phase 3: Generate PRD Document
|
|
113
137
|
|
|
138
|
+
**⛔ MANDATORY:生成PRD文档前,必须先读取 `references/brainstorm-sections.md`**
|
|
139
|
+
|
|
140
|
+
**§8.4 功能模块提取规则(关键规则,必须遵守)**:
|
|
141
|
+
- **详细程度**:保留原始需求文档中的关键细节,不要过度概括
|
|
142
|
+
- **必须保留的内容**:
|
|
143
|
+
- 页面布局(上下分栏、标准列表等)
|
|
144
|
+
- 搜索模块(具体字段)
|
|
145
|
+
- 表格列定义(完整字段列表)
|
|
146
|
+
- 交互规则(默认选中、点击切换、筛选联动等)
|
|
147
|
+
- 按领域动态字段(如有)
|
|
148
|
+
- 动态列名说明
|
|
149
|
+
- 操作说明(已发布/草稿状态等)
|
|
150
|
+
- 级联选择逻辑(如有)
|
|
151
|
+
- **⛔ 错误行为**:只提取输入/输出/业务规则,丢失原始需求文档中的大量关键细节
|
|
152
|
+
- **⛔ 正确行为**:充分利用原始需求文档的详细内容,保持信息完整性
|
|
153
|
+
|
|
114
154
|
Read `references/brainstorm-sections.md` for doc-warranted criteria. If warranted: read template from `PRD_TEMPLATE_PATH`, fill via `references/prd-mapping.md`, write to `prd/{ITERATION_VERSION}/prd.md`. Vocabulary capture: update `CONCEPTS.md` with resolved domain terms (only if it exists).
|
|
115
155
|
|
|
116
156
|
### Phase 3.5: Prototype Inner Loop
|
|
@@ -223,6 +223,20 @@ as template placeholder.
|
|
|
223
223
|
Skip §8.3 (hardware/network) and §8.5 (non-functional) unless the brainstorm
|
|
224
224
|
explicitly covered these.
|
|
225
225
|
|
|
226
|
+
**§8.4 功能模块提取规则**:
|
|
227
|
+
- **详细程度**:保留原始需求文档中的关键细节,不要过度概括
|
|
228
|
+
- **必须保留的内容**:
|
|
229
|
+
- 页面布局(上下分栏、标准列表等)
|
|
230
|
+
- 搜索模块(具体字段)
|
|
231
|
+
- 表格列定义(完整字段列表)
|
|
232
|
+
- 交互规则(默认选中、点击切换、筛选联动等)
|
|
233
|
+
- 按领域动态字段(如有)
|
|
234
|
+
- 动态列名说明
|
|
235
|
+
- 操作说明(已发布/草稿状态等)
|
|
236
|
+
- 级联选择逻辑(如有)
|
|
237
|
+
- **错误行为**:只提取输入/输出/业务规则,丢失原始需求文档中的大量关键细节
|
|
238
|
+
- **正确行为**:充分利用原始需求文档的详细内容,保持信息完整性
|
|
239
|
+
|
|
226
240
|
## Agent agency
|
|
227
241
|
|
|
228
242
|
The chapter catalog is a floor, not a ceiling. When the brainstorm's content
|
|
@@ -16,7 +16,7 @@ Two responsibilities: requesting review (dispatching a reviewer subagent) and re
|
|
|
16
16
|
1. Get SHAs: `BASE_SHA=$(git rev-parse HEAD~1)` and `HEAD_SHA=$(git rev-parse HEAD)`
|
|
17
17
|
2. Dispatch `general-purpose` subagent using template at `skills/code-reviewer/code-reviewer-prompt.md`
|
|
18
18
|
3. Fill placeholders: `[DESCRIPTION]` (what was built), `[PLAN_OR_REQUIREMENTS]` (contract/spec reference), `[BASE_SHA]`, `[HEAD_SHA]`, `[WAVE_ID]`, and a distinct `[REVIEW_REPORT_FILE]`.
|
|
19
|
-
4. Require the reviewer to write a non-empty persisted review report at `[REVIEW_REPORT_FILE]`, then record that exact path in the wave receipt: `npx --yes --package @xulthekl/team-flow@0.
|
|
19
|
+
4. Require the reviewer to write a non-empty persisted review report at `[REVIEW_REPORT_FILE]`, then record that exact path in the wave receipt: `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution review <change-dir> --wave <id> --base <sha> --head <sha> --report <review-report-path> --verdict <pass|fail>`.
|
|
20
20
|
5. Act on feedback: Critical/Important findings require a `fail` receipt, focused repair, re-review, and replacement `pass` receipt before a dependent wave or closing can proceed. Note Minor for later, push back with reasoning if reviewer is wrong.
|
|
21
21
|
|
|
22
22
|
### Minimality And Scope
|
|
@@ -76,7 +76,7 @@ Suggestion breaks existing functionality, reviewer lacks context, violates YAGNI
|
|
|
76
76
|
| Performative agreement | State requirement or just act |
|
|
77
77
|
| Blind implementation | Verify against codebase first |
|
|
78
78
|
| Batch without testing | One at a time, test each |
|
|
79
|
-
| Proceeding without a wave receipt | Record `pass`/`fail` via `npx --yes --package @xulthekl/team-flow@0.
|
|
79
|
+
| Proceeding without a wave receipt | Record `pass`/`fail` via `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution review` before the next dependent wave |
|
|
80
80
|
| Assuming reviewer is right | Check if breaks things |
|
|
81
81
|
| Avoiding pushback | Technical correctness > comfort |
|
|
82
82
|
| Partial implementation | Clarify all items first |
|
|
@@ -93,7 +93,7 @@ Subagent (general-purpose):
|
|
|
93
93
|
report path. End with the exact receipt command:
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
96
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution review <change-dir> --wave [WAVE_ID] --base [BASE_SHA] --head [HEAD_SHA] --report [REVIEW_REPORT_FILE] --verdict <pass|fail>
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
Use `fail` when any Critical or Important finding remains. A repair needs
|
|
@@ -5,9 +5,9 @@ description: Convert approved planning artifacts into an execution contract. Inv
|
|
|
5
5
|
|
|
6
6
|
# Contract Builder
|
|
7
7
|
|
|
8
|
-
Converts planning artifacts into a single execution handshake: `execution-contract.md`. Load the baseline with `npx --yes --package @xulthekl/team-flow@0.
|
|
8
|
+
Converts planning artifacts into a single execution handshake: `execution-contract.md`. Load the baseline with `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime asset read templates/execution-contract.md`.
|
|
9
9
|
|
|
10
|
-
Read before generating: `proposal.md`, `specs/`, `design.md`, `tasks.md`, then load `docs/artifact-contract.md` with `npx --yes --package @xulthekl/team-flow@0.
|
|
10
|
+
Read before generating: `proposal.md`, `specs/`, `design.md`, `tasks.md`, then load `docs/artifact-contract.md` with `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime asset read docs/artifact-contract.md`.
|
|
11
11
|
|
|
12
12
|
**Architecture Design Outputs (v0.9 §26)**: 若 `architecture/` 目录存在,同时读取 `architecture/architecture.md` / `database.md` / `api.md`,作为执行契约的架构约束补充输入——确保 execution-contract.md 的 Implementation Constraints 段包含架构设计的关键约束(聚合边界/CQRS 分流/API 契约/schema 变更)。`architecture/` 不存在时跳过。
|
|
13
13
|
|
|
@@ -38,8 +38,8 @@ Must make obvious: approved behavior, out-of-scope, constraints, batches, test o
|
|
|
38
38
|
|
|
39
39
|
After drafting: summarize handoff rules, identify ambiguity, flag unmapped requirements, ask user to approve explicitly. After approval:
|
|
40
40
|
```bash
|
|
41
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
42
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
41
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_3_result "approved: <summary>"
|
|
42
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_3_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
43
43
|
```
|
|
44
44
|
DP-3 is a hard gate — no implementation without this record.
|
|
45
45
|
|
|
@@ -60,9 +60,9 @@ Generate minimal contract: Intent Lock (one sentence), Task List (numbered), App
|
|
|
60
60
|
|
|
61
61
|
## Post-Generation
|
|
62
62
|
|
|
63
|
-
Run `npx --yes --package @xulthekl/team-flow@0.
|
|
63
|
+
Run `npx --yes --package @xulthekl/team-flow@0.26.1 tf state init <change-dir>` to create `.team-flow.yaml` with hashes.
|
|
64
64
|
|
|
65
|
-
For hotfix, after writing the minimal contract, run `npx --yes --package @xulthekl/team-flow@0.
|
|
65
|
+
For hotfix, after writing the minimal contract, run `npx --yes --package @xulthekl/team-flow@0.26.1 tf state init <change-dir>` or `npx --yes --package @xulthekl/team-flow@0.26.1 tf state rebuild <change-dir>` so `contract_hash` is recorded. DP-3 remains mandatory before build.
|
|
66
66
|
|
|
67
67
|
## Exception Handling
|
|
68
68
|
|
|
@@ -41,8 +41,8 @@ Restate what you heard: "Here's what I'm hearing: [problem, scope, non-goals, su
|
|
|
41
41
|
|
|
42
42
|
After user confirms the summary:
|
|
43
43
|
```bash
|
|
44
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
45
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
44
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_1_result "confirmed: <one-line summary>"
|
|
45
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_1_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
46
46
|
```
|
|
47
47
|
DP-1 confirms scope, non-goals, and success criteria before artifact creation.
|
|
48
48
|
|
|
@@ -72,12 +72,12 @@ If an `e2e/` suite exists for the change, fold its report into verification (see
|
|
|
72
72
|
- Scope added without artifact updates?
|
|
73
73
|
- Unresolved blockers or known risks?
|
|
74
74
|
- Delta specs exist that need merging?
|
|
75
|
-
- Run `npx --yes --package @xulthekl/team-flow@0.
|
|
75
|
+
- Run `npx --yes --package @xulthekl/team-flow@0.26.1 tf audit <change-dir>` — include `decision-point-audit.md` in archive
|
|
76
76
|
|
|
77
77
|
### DP-6 (Verification Outcome)
|
|
78
78
|
```bash
|
|
79
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
80
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
79
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_6_result "<pass|conditional|fail>: <summary>"
|
|
80
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_6_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
81
81
|
```
|
|
82
82
|
If FAIL, do NOT proceed to DP-7. Route back or ask about abandonment.
|
|
83
83
|
|
|
@@ -85,13 +85,13 @@ After recording a PASS outcome, also record it as the verification gate so the
|
|
|
85
85
|
`executing → closing` transition is allowed (the guard accepts either
|
|
86
86
|
`test_result: pass` or a `dp_6_result` starting with `pass`):
|
|
87
87
|
```bash
|
|
88
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
88
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> test_result pass
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
### DP-7 (Archive Confirmation)
|
|
92
92
|
```bash
|
|
93
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
94
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
93
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_7_result "confirmed: <archive summary>"
|
|
94
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_7_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
95
95
|
```
|
|
96
96
|
Verify DP-0 through DP-6 are recorded before DP-7.
|
|
97
97
|
|
|
@@ -101,14 +101,14 @@ If implementation diverged from the contract, return to `bridging` before closur
|
|
|
101
101
|
|
|
102
102
|
## Post-Verification
|
|
103
103
|
|
|
104
|
-
Run `npx --yes --package @xulthekl/team-flow@0.
|
|
104
|
+
Run `npx --yes --package @xulthekl/team-flow@0.26.1 tf state transition <change-dir> closing`. If delta specs exist, route to `spec-merger`.
|
|
105
105
|
|
|
106
106
|
### Architecture Merge (v0.10 §28-§31) — MUST run first
|
|
107
107
|
|
|
108
108
|
Merge change-level architecture artifacts to the global `docs/architecture/` baseline **before** any other post-verification step:
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
111
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf arch-merge <change-dir>
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
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`).
|
|
@@ -120,7 +120,7 @@ This merges `architecture/{architecture,database,api}.md` and `architecture/sql/
|
|
|
120
120
|
After `arch-merge` completes, run prototype-sync to merge UX deltas back to the global prototype:
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
123
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf prototype-sync <change-dir>
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
**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.
|
|
@@ -134,7 +134,7 @@ If `prototype-sync` reports conflicts, list them in the closing summary and flag
|
|
|
134
134
|
During closing, promote change-level learnings to the global solutions library:
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
137
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf solutions promote <change-dir>
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
This checks `specs/<cap>/learnings.md` for entries meeting promotion criteria:
|
|
@@ -154,7 +154,7 @@ Before finalizing the closing, check if this change produced any learnable momen
|
|
|
154
154
|
|
|
155
155
|
If any of the above occurred, capture the learning:
|
|
156
156
|
```bash
|
|
157
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
157
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf solutions capture \
|
|
158
158
|
--phase cross-phase --domain <domain> --type pitfall \
|
|
159
159
|
--severity medium --summary "<what happened and how to prevent it>"
|
|
160
160
|
```
|
|
@@ -176,6 +176,6 @@ Verify files exist and are non-empty, run `node --check` on code files, skip 5-s
|
|
|
176
176
|
## Exception Handling
|
|
177
177
|
|
|
178
178
|
- **Parse failures**: Report exact file and section
|
|
179
|
-
- **Missing files**: If audit can't generate, run `npx --yes --package @xulthekl/team-flow@0.
|
|
179
|
+
- **Missing files**: If audit can't generate, run `npx --yes --package @xulthekl/team-flow@0.26.1 tf audit` manually
|
|
180
180
|
- **User interruption**: Re-run verification from the beginning on resume
|
|
181
181
|
- **DP gaps**: Flag missing DPs during DP-6; ask user whether to proceed or return
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
After `arch-merge` completes, run prototype-sync to merge UX deltas back to the global prototype:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
10
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf prototype-sync <change-dir>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
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.
|
|
@@ -21,7 +21,7 @@ If `prototype-sync` reports conflicts, list them in the closing summary and flag
|
|
|
21
21
|
During closing, promote change-level learnings to the global solutions library:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
24
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf solutions promote <change-dir>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Promotion criteria:
|
|
@@ -41,7 +41,7 @@ Before finalizing the closing, check if this change produced any learnable momen
|
|
|
41
41
|
|
|
42
42
|
If any occurred, capture the learning:
|
|
43
43
|
```bash
|
|
44
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
44
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf solutions capture \
|
|
45
45
|
--phase cross-phase --domain <domain> --type pitfall \
|
|
46
46
|
--severity medium --summary "<what happened and how to prevent it>"
|
|
47
47
|
```
|
|
@@ -51,22 +51,22 @@ Advisory — skip silently if no learnable moments detected.
|
|
|
51
51
|
## DP-6 (Verification Outcome)
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
55
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
54
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_6_result "<pass|conditional|fail>: <summary>"
|
|
55
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_6_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
If FAIL, do NOT proceed to DP-7. Route back or ask about abandonment.
|
|
59
59
|
|
|
60
60
|
After PASS, also record the verification gate:
|
|
61
61
|
```bash
|
|
62
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
62
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> test_result pass
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
## DP-7 (Archive Confirmation)
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
69
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
68
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_7_result "confirmed: <archive summary>"
|
|
69
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_7_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
Verify DP-0 through DP-6 are recorded before DP-7.
|
|
@@ -10,7 +10,7 @@ After a change completes, delta specs (ADDED/MODIFIED/REMOVED/RENAMED) must be m
|
|
|
10
10
|
## Pre-Flight Checks
|
|
11
11
|
|
|
12
12
|
### Conflict Detection
|
|
13
|
-
Run `npx --yes --package @xulthekl/team-flow@0.
|
|
13
|
+
Run `npx --yes --package @xulthekl/team-flow@0.26.1 tf sync <change-dir>`. If conflicts are detected (same requirement modified by multiple changes), present the conflict list to the user for resolution order.
|
|
14
14
|
|
|
15
15
|
### Abandoned Change Guard
|
|
16
16
|
Check if the change is `abandoned`. If so → STOP: "Abandoned changes cannot be synced. Delta specs are preserved for reference but must not be merged."
|
|
@@ -55,7 +55,7 @@ Output sync report table: Capability, ADDED/MODIFIED/REMOVED/RENAMED counts, Sta
|
|
|
55
55
|
2. Change folder (including deltas) remains for traceability.
|
|
56
56
|
3. Record that merging is complete so the `executing → closing` guard allows closure:
|
|
57
57
|
```bash
|
|
58
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
58
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> spec_merged true
|
|
59
59
|
```
|
|
60
60
|
(If the change had no delta sections, still set `spec_merged true` — there was nothing to merge.)
|
|
61
61
|
|
|
@@ -55,7 +55,7 @@ Read `docs/solutions/INDEX.md` if it exists. Filter entries where `phase = spec
|
|
|
55
55
|
|
|
56
56
|
## Config Check
|
|
57
57
|
|
|
58
|
-
Run: `npx --yes --package @xulthekl/team-flow@0.
|
|
58
|
+
Run: `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime config --get artifacts.order` — generate in configured order (default: proposal → specs → design → tasks). Run with `artifacts.skip` — skip any listed artifacts.
|
|
59
59
|
|
|
60
60
|
## Artifact Roles
|
|
61
61
|
|
|
@@ -135,8 +135,8 @@ Generate one at a time. Confirm each before next. This prevents scope drift —
|
|
|
135
135
|
|
|
136
136
|
Present summary of all 4 artifacts (2-3 sentences each). Ask user for adjustments. After approval:
|
|
137
137
|
```bash
|
|
138
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
139
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
138
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_2_result "approved: <summary>"
|
|
139
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_2_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
## Handoff Rule
|
|
@@ -40,13 +40,101 @@ Do NOT invoke for:
|
|
|
40
40
|
**先做需求选择**(v0.15.0 多需求):读 `.team-flow/registry.yaml`,确定 `active_requirement`(多需求则询问操作哪个/新建)。再判断 7 种入口路径之一;检查 baseline.md / CONCEPTS.md 并注入;复利注入(INDEX.md top-5)。**路由结果必须向用户显式确认**(路由是建议非决定)。详见 `references/s1-path-router.md`。
|
|
41
41
|
|
|
42
42
|
### S2: PRD + 原型阶段
|
|
43
|
+
|
|
44
|
+
**⛔ MANDATORY:执行S2阶段前,必须先读取 `references/s2-prd-prototype-loop.md`**
|
|
45
|
+
|
|
46
|
+
**S2阶段状态管理(关键规则,必须遵守)**:
|
|
47
|
+
```
|
|
48
|
+
prd_draft → user_review → prototype_loop → prd_frozen → completed
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
| 子阶段 | 说明 | 是否阻塞 |
|
|
52
|
+
|--------|------|---------|
|
|
53
|
+
| `prd_draft` | PRD草稿生成完成 | ⛔ 是(等待用户确认) |
|
|
54
|
+
| `user_review` | 用户查看PRD文档 | ⛔ 是(等待用户确认) |
|
|
55
|
+
| `prototype_loop` | 原型循环(如需要) | 否(自动执行) |
|
|
56
|
+
| `prd_frozen` | PRD冻结 | 否(自动执行) |
|
|
57
|
+
| `completed` | S2阶段完成 | 否(自动执行) |
|
|
58
|
+
|
|
59
|
+
**⛔ 关键约束**:
|
|
60
|
+
- `prd_draft` 完成后**必须等待用户确认**,不能自动进入 `prototype_loop`
|
|
61
|
+
- 只有用户确认后,才能进入原型循环
|
|
62
|
+
- PRD冻结后,才能进入S3阶段
|
|
63
|
+
- **错误行为**:PRD草稿完成后直接标记S3阶段完成
|
|
64
|
+
- **正确行为**:PRD草稿完成后等待用户查看,确认后继续S2阶段的后续步骤
|
|
65
|
+
|
|
43
66
|
调用 `/ce-brainstorm`(mode: orchestrated)产出 PRD 草稿;**冻结前派 `prd-completeness-reviewer` 子代理做 PRD 完整性评审**(v0.15.0,管"说得全不全");原型循环由编排层直接编排(prototype skill 内部编排产出 → prototype-reviewer 自动评审 → 人工评审 → 冻结);冻结语义为 `frozen_downstream`(迭代内变更不升版)。反馈环路检查点:scope 是否合理。详见 `references/s2-prd-prototype-loop.md`。
|
|
44
67
|
|
|
45
68
|
### S3: 计划阶段
|
|
46
69
|
**入口一次性问定计划模式**(业务/一人公司),调用 `/ce-plan`(`pipeline_mode: orchestrator` + `plan_mode: business|solo`,跳过仪式开销、保留 repo research + change splitting + 依赖 DAG + 技术方向)产出 `prd/vN/plan.md`。plan 只到产品级策略 + 高阶技术设计,**不含接口清单**(属各 change 的 spec-writer)。反馈环路检查点:plan 是否暴露 PRD scope 问题(是→回退 S2)。详见 `references/s3-plan-pipeline.md`。
|
|
47
70
|
|
|
48
71
|
### S4: 拆分验证与分发
|
|
49
|
-
|
|
72
|
+
|
|
73
|
+
**⛔ MANDATORY:执行S4阶段前,必须先读取 `references/s4-split-validate.md`**
|
|
74
|
+
|
|
75
|
+
**S4 步骤清单(必须按顺序执行,不可跳过)**:
|
|
76
|
+
|
|
77
|
+
- [ ] **Step 1: 拆分质量审计**(必选门禁,不可跳过)
|
|
78
|
+
- 调用 `change-split-auditor` agent 对 plan.md 做拆分质量审计
|
|
79
|
+
- 质量维度:覆盖矩阵 / DAG 无环 / 粒度均衡 / 字段完整 / 拆分维度合规(D5 硬门禁)
|
|
80
|
+
- **verdict = PASS 是后续步骤的硬前置条件**
|
|
81
|
+
- verdict = FAIL → 必须回退 S3 调整拆分后重新审计,**不可绕过直接创建 change**
|
|
82
|
+
|
|
83
|
+
- [ ] **Step 2: 反馈环路检查点**
|
|
84
|
+
- 依赖图是否可执行?粒度是否合理?
|
|
85
|
+
- **否** → 回退 S3 调整拆分策略(详见 `references/feedback-loops.md`)
|
|
86
|
+
- **是** → 继续
|
|
87
|
+
|
|
88
|
+
- [ ] **Step 3: 创建 change 脚手架**
|
|
89
|
+
- 为每个 change 执行 `tf state init changes/<change-name>`
|
|
90
|
+
- 验证 `.team-flow.yaml` 已创建在 `changes/<change-name>/` 下
|
|
91
|
+
- ⚠️ 路径约束:项目根 `changes/`,非 `.team-flow/` 或 `specs/`
|
|
92
|
+
|
|
93
|
+
- [ ] **Step 3.5: 落盘 change-brief.md**(产品级→变更级交接物)
|
|
94
|
+
- 为每个 change 写 `changes/<change-name>/change-brief.md`(已存在则覆盖更新)
|
|
95
|
+
- 必须包含 YAML frontmatter(见下方规范)
|
|
96
|
+
- 验证文件存在且格式正确
|
|
97
|
+
|
|
98
|
+
- [ ] **Step 4: 写入 change_dag**
|
|
99
|
+
- 更新 `.team-flow/requirements/<req-id>/orchestrator.yaml` 的 `change_dag` 字段
|
|
100
|
+
- 格式规范:`[{id, change_dir, state_file, depends_on, priority, parallel_group, status}]`
|
|
101
|
+
- **同步更新** orchestrator.yaml 顶层 `workflow_phase` 为 `s4_split`(单一真相源)
|
|
102
|
+
|
|
103
|
+
- [ ] **Step 5: 分发**
|
|
104
|
+
- 告知用户各 change 已就绪及执行顺序建议
|
|
105
|
+
- 示例:`Change C1 已就绪,运行 /workflow-start 进入变更级流程。执行顺序:C1 → (C2 ∥ C3) → C4`
|
|
106
|
+
|
|
107
|
+
**S4 完成校验(必须全部通过才能标记 completed)**:
|
|
108
|
+
|
|
109
|
+
1. ✅ change-split-auditor verdict = PASS(审计报告已生成)
|
|
110
|
+
2. ✅ 所有 change 目录存在于 `changes/` 下(非 `.team-flow/`)
|
|
111
|
+
3. ✅ 每个 change 目录包含 `.team-flow.yaml`(`tf state init` 已执行)
|
|
112
|
+
4. ✅ 每个 change 目录包含 `change-brief.md`(含 YAML frontmatter)
|
|
113
|
+
5. ✅ orchestrator.yaml 的 `change_dag` 已填充(格式正确)
|
|
114
|
+
6. ✅ orchestrator.yaml 顶层 `workflow_phase` 已更新为 `s4_split`
|
|
115
|
+
|
|
116
|
+
**change-brief.md 规范(v0.27.0 强化)**:
|
|
117
|
+
|
|
118
|
+
必要字段(YAML frontmatter):
|
|
119
|
+
```yaml
|
|
120
|
+
upstream_source: orchestrator # orchestrator | manual | null
|
|
121
|
+
upstream_req_id: <req-id> # 对应 requirement ID
|
|
122
|
+
upstream_plan_ref: prd/vN/plan.md # hotfix/快速通道为 null
|
|
123
|
+
upstream_change_id: C2 # 对应 change_dag.id
|
|
124
|
+
plan_hash: sha256:<plan.md 内容摘要> # 检测产品层改动后变更层未同步
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
内容段:Scope / 约束 / AC 列表(取自 auditor 报告 Dim1 覆盖矩阵)/ 全局技术方向(指针,非完整设计)/ PRD & plan 引用
|
|
128
|
+
|
|
129
|
+
**⛔ 反模式(禁止)**:
|
|
130
|
+
- 使用 CLAUDE.md 替代 change-brief.md(team-flow 从不读取 CLAUDE.md)
|
|
131
|
+
- 在 change-brief 中写完整文件清单(这是 spec-writer 的职责,不属于编排层)
|
|
132
|
+
- 省略 YAML frontmatter
|
|
133
|
+
|
|
134
|
+
**workflow_phase 同步规则**:
|
|
135
|
+
- **单一真相源**:`orchestrator.yaml` 顶层 `workflow_phase` 字段
|
|
136
|
+
- **阶段转换时**:必须同步更新顶层 `workflow_phase` + 对应 phase 子节点的 `status`
|
|
137
|
+
- **registry.yaml**:引用 `orchestrator.yaml` 的 `workflow_phase`,不独立维护
|
|
50
138
|
|
|
51
139
|
### S5: 全局监控(change ≥ 2 必选)
|
|
52
140
|
跟踪各 change 进度;cross-change-consistency-checker 检测跨 change 冲突;change closing 时复利晋升;必要时触发动态重规划。详见 `references/s5-monitoring.md`。
|
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
> v0.7 关键变更:原型循环由 orchestrator **直接编排**(思路 B),不再藏在 ce-brainstorm 内部。设计依据:设计增强方案 v0.7 §17.2 / §17.8 / §17.10。
|
|
4
4
|
|
|
5
|
+
## S2阶段状态管理
|
|
6
|
+
|
|
7
|
+
**S2阶段包含多个子阶段,必须按顺序执行,不能跳过:**
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
prd_draft → user_review → prototype_loop → prd_frozen → completed
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
| 子阶段 | 说明 | 是否阻塞 |
|
|
14
|
+
|--------|------|---------|
|
|
15
|
+
| `prd_draft` | PRD草稿生成完成 | 是(等待用户确认) |
|
|
16
|
+
| `user_review` | 用户查看PRD文档 | 是(等待用户确认) |
|
|
17
|
+
| `prototype_loop` | 原型循环(如需要) | 否(自动执行) |
|
|
18
|
+
| `prd_frozen` | PRD冻结 | 否(自动执行) |
|
|
19
|
+
| `completed` | S2阶段完成 | 否(自动执行) |
|
|
20
|
+
|
|
21
|
+
**⛔ 关键约束**:
|
|
22
|
+
- `prd_draft` 完成后必须等待用户确认,不能自动进入 `prototype_loop`
|
|
23
|
+
- 只有用户确认后,才能进入原型循环
|
|
24
|
+
- PRD冻结后,才能进入S3阶段
|
|
25
|
+
|
|
5
26
|
## 编排层 vs 执行层
|
|
6
27
|
|
|
7
28
|
| 编排层(orchestrator 自己做) | 执行层(委托) |
|
|
@@ -20,6 +41,18 @@
|
|
|
20
41
|
|
|
21
42
|
> **阶段后压缩协议(A4)**:ce-brainstorm 冻结 PRD 后,编排层主动触发 compact,只保留 `prd/vN/prd.md` 路径与 frozen 状态,丢弃过程对话。会话级 skill 的过程对话会进入编排层上下文窗口,必须压缩。
|
|
22
43
|
|
|
44
|
+
### 1.5 用户确认 PRD 草稿(强制阻塞点)
|
|
45
|
+
|
|
46
|
+
**⛔ 关键:PRD草稿完成后,必须等待用户确认,不能自动进入下一步。**
|
|
47
|
+
|
|
48
|
+
PRD草稿生成后:
|
|
49
|
+
1. 输出PRD文档位置:`prd/vN/prd.md`
|
|
50
|
+
2. **阻塞等待用户确认**(使用 AskUserQuestion)
|
|
51
|
+
3. 用户确认后,才能进入步骤2(判断是否需要原型)
|
|
52
|
+
|
|
53
|
+
**错误行为**:PRD草稿完成后直接标记S3阶段完成
|
|
54
|
+
**正确行为**:PRD草稿完成后等待用户查看,确认后继续S2阶段的后续步骤
|
|
55
|
+
|
|
23
56
|
### 2. 判断是否需要原型
|
|
24
57
|
|
|
25
58
|
- 需要(涉及 UI/交互/页面)→ 进入原型循环
|
|
@@ -54,7 +87,7 @@
|
|
|
54
87
|
检测可复利时刻(需求矛盾、原型返工、自动评审发现不一致并修正等)。每次自动评审发现不一致并修正后触发:
|
|
55
88
|
|
|
56
89
|
```bash
|
|
57
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
90
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf solutions capture --phase prd --domain <domain> --type pitfall --severity <sev> --summary "<summary>"
|
|
58
91
|
```
|
|
59
92
|
|
|
60
93
|
### 6. 反馈环路检查点
|
|
@@ -38,7 +38,7 @@ verdict = FAIL → 必须回退 S3 调整拆分后重新审计,不可绕过直
|
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
mkdir -p changes/<change-name>
|
|
41
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
41
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state init changes/<change-name>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
> ⚠️ **路径约束**:change 脚手架目录固定为项目根 `changes/<change-name>/`。
|
|
@@ -15,14 +15,14 @@ Do NOT invoke for: general coding tasks outside team-flow changes, casual questi
|
|
|
15
15
|
|
|
16
16
|
## States
|
|
17
17
|
|
|
18
|
-
`exploring` → `specifying` → `bridging` → `approved-for-build` → `executing` → `closing`, with `debugging` side-path from `executing`, and `abandoned` as terminal. If a transition is ambiguous, run `npx --yes --package @xulthekl/team-flow@0.
|
|
18
|
+
`exploring` → `specifying` → `bridging` → `approved-for-build` → `executing` → `closing`, with `debugging` side-path from `executing`, and `abandoned` as terminal. If a transition is ambiguous, run `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime asset read docs/state-machine.md`.
|
|
19
19
|
|
|
20
20
|
## Initialization
|
|
21
21
|
|
|
22
|
-
1. **Update check**: Run `npx --yes --package @xulthekl/team-flow@0.
|
|
22
|
+
1. **Update check**: Run `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime check-update`. Exit 0 → continue. Exit 1 → non-blocking upgrade reminder. Exit 2 → skip.
|
|
23
23
|
2. **Inspect change folder**: Check for `proposal.md`, `specs/`, `design.md`, `tasks.md`, `execution-contract.md`. Answer: Is the change fuzzy? Artifacts missing/unstable? Contract exist? User approved contract? Execution in progress or blocked? In verification/wrap-up?
|
|
24
|
-
3. **Overlay recovery scan**: Run `npx --yes --package @xulthekl/team-flow@0.
|
|
25
|
-
4. **Execution-control recovery scan**: For `approved-for-build`, `executing`, `debugging`, or `closing`, run `npx --yes --package @xulthekl/team-flow@0.
|
|
24
|
+
3. **Overlay recovery scan**: Run `npx --yes --package @xulthekl/team-flow@0.26.1 tf handoff list <change-dir> --json` and `npx --yes --package @xulthekl/team-flow@0.26.1 tf checkpoint list <change-dir> --json`. A `result-ready` handoff requires explicit review and `npx --yes --package @xulthekl/team-flow@0.26.1 tf handoff resolve` before resuming the affected work. An `active` handoff is non-blocking side work. Show a non-stale checkpoint as recovery context; show a stale checkpoint only as historical evidence.
|
|
25
|
+
4. **Execution-control recovery scan**: For `approved-for-build`, `executing`, `debugging`, or `closing`, run `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution show <change-dir> --json`. Treat only `current: true` plus `waves[].eligible: true` as permission to start a wave; report plan revision, mode, next eligible wave, and every wave's receipt/blockers. A missing, invalid, or stale plan blocks implementation and routes to `build-executor`; do not infer progress from chat history.
|
|
26
26
|
|
|
27
27
|
## DP-0: User Confirmation Gate
|
|
28
28
|
|
|
@@ -36,17 +36,17 @@ Ask (manual path): change name + one-sentence intent, known constraints, related
|
|
|
36
36
|
|
|
37
37
|
After confirmation:
|
|
38
38
|
```bash
|
|
39
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
40
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
41
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
42
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
39
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_0_decisions "<summary>"
|
|
40
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_0_result confirmed
|
|
41
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_0_confirmed true
|
|
42
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_0_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Config-aware routing: check `artifacts.order` and `artifacts.skip` from project config.
|
|
46
46
|
|
|
47
47
|
## Mode Detection
|
|
48
48
|
|
|
49
|
-
If workflow is `auto`/`null`/unset: run `npx --yes --package @xulthekl/team-flow@0.
|
|
49
|
+
If workflow is `auto`/`null`/unset: run `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime infer <change-dir>`. Inference: **hotfix** (≤2 tasks, ≤2 files, no schema/API/new modules), **tweak** (≤4 tasks, config/doc only), **full** (anything larger). Persist with `npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <dir> workflow <mode>`.
|
|
50
50
|
|
|
51
51
|
Validate mode against artifact content. If hotfix/tweak criteria not met → upgrade to `full` and output reason. Don't overwrite explicit mode unless user asks.
|
|
52
52
|
|
|
@@ -59,19 +59,19 @@ Change is fuzzy, scope unclear, comparing options, no stable change name.
|
|
|
59
59
|
Guard: `arch_design_decision` in `.team-flow.yaml` is `null` → must run before spec-writer. Dispatch `architecture-design` as sub-agent; after return, run reasonableness check and write yaml. Full protocol in `references/routing-rules.md`「Route to architecture-design」.
|
|
60
60
|
|
|
61
61
|
### Route to spec-writer
|
|
62
|
-
Guard: `npx --yes --package @xulthekl/team-flow@0.
|
|
62
|
+
Guard: `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime guard check <dir> exploring specifying --json` → fail = BLOCK. **arch_design_decision must not be null** → fail = BLOCK (v0.9 §26). User knows what they want, artifacts missing/incomplete.
|
|
63
63
|
|
|
64
64
|
### Route to contract-builder
|
|
65
65
|
Guard: `... check <dir> specifying bridging --json` → fail = BLOCK. Artifacts exist, implementation requested, contract missing/stale. Include `DP-3: 契约批准`.
|
|
66
66
|
|
|
67
67
|
### Route to build-executor
|
|
68
|
-
Contract exists and approved, contract matches artifacts. Include `DP-4: 执行模式选择`: propose waves, run `npx --yes --package @xulthekl/team-flow@0.
|
|
68
|
+
Contract exists and approved, contract matches artifacts. Include `DP-4: 执行模式选择`: propose waves, run `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution recommend <change-dir> [--wave ...]`, show the user every available mode plus evidence and the recommendation, then obtain a clear selection. The command saves a current receipt; before the first implementation edit, `build-executor` must run `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution plan <change-dir> --mode <selected> --confirm ...` (and `--acknowledge-recommendation` when the selected mode differs from the recommendation) using matching artifacts, contract, and waves, then `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution show <change-dir> --json`; report the saved revision, selected mode, recommendation alignment, ordered waves, and actual concurrent-dispatch capability. A revision must repeat recommend and confirmation. Do not transition to `executing` until `show` reports `current: true`; then run `... check <dir> approved-for-build executing --json` → fail = BLOCK.
|
|
69
69
|
|
|
70
70
|
### Route to bug-investigator
|
|
71
71
|
Execution hit blockage: test failure, unexpected behavior, build error, task cannot proceed. After debugging, route back to build-executor.
|
|
72
72
|
|
|
73
73
|
### Route to code-reviewer
|
|
74
|
-
The current planned wave is implemented and ready for spec-compliance + code-quality verification. A reviewer must write an `npx --yes --package @xulthekl/team-flow@0.
|
|
74
|
+
The current planned wave is implemented and ready for spec-compliance + code-quality verification. A reviewer must write an `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution review <change-dir> --wave <id> --base <sha> --head <sha> --report <path> --verdict <pass|fail>` receipt before any dependent wave or closing transition.
|
|
75
75
|
|
|
76
76
|
### Route to release-archivist
|
|
77
77
|
Guard: `... check <dir> executing closing --json` → fail = BLOCK. Implementation complete, verification complete/nearly complete. Include `DP-7: 归档确认`.
|
|
@@ -90,10 +90,10 @@ uncertainty. Do not create a prototype handoff or enter a prototype worktree
|
|
|
90
90
|
until the user confirms. After confirmation:
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
93
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf handoff create <change-dir> \
|
|
94
94
|
--type prototype --objective "<confirmed objective>" \
|
|
95
95
|
--expected-output "<expected evidence>" --acceptance "<completion criterion>"
|
|
96
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
96
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf isolate <change-dir> prototype-<handoff-id>
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
Never suggest or enter this route automatically for backend, CLI, configuration,
|
|
@@ -107,7 +107,7 @@ work.
|
|
|
107
107
|
- **Hotfix**: Route to contract-builder (minimal), skip need-explorer + spec-writer, guard check `exploring bridging --workflow hotfix`, then `bridging -> approved-for-build`, after DP-3 → build-executor (recommend, show, and confirm an execution mode), after → release-archivist (lightweight). Hotfix may skip `proposal.md`, `design.md`, `tasks.md`, and `specs/`, but it still requires a fresh minimal `execution-contract.md`, DP-3 approval, and a current execution plan before build. **architecture-design 不豁免**(v0.9 §26):同样过 architecture-design 子代理判断门,快速判定是否涉及架构变更(hotfix 可能正是架构缺陷导致)
|
|
108
108
|
- **Tweak**: Route to build-executor (direct edit), skip need-explorer + spec-writer + contract-builder, guard check `exploring approved-for-build --workflow tweak`, after → release-archivist (lightweight). **architecture-design 不豁免**(v0.9 §26):同样过 architecture-design 子代理判断门
|
|
109
109
|
|
|
110
|
-
Post-transition: 💡 `npx --yes --package @xulthekl/team-flow@0.
|
|
110
|
+
Post-transition: 💡 `npx --yes --package @xulthekl/team-flow@0.26.1 tf inject <change-dir>` to update phase-guard artifacts.
|
|
111
111
|
|
|
112
112
|
## Staleness Detection
|
|
113
113
|
|
|
@@ -124,7 +124,7 @@ Use content inspection, not timestamps.
|
|
|
124
124
|
## Guardrails
|
|
125
125
|
|
|
126
126
|
- No implementation before planning artifacts or contract exist
|
|
127
|
-
- No implementation for full/hotfix without a current `npx --yes --package @xulthekl/team-flow@0.
|
|
127
|
+
- No implementation for full/hotfix without a current `npx --yes --package @xulthekl/team-flow@0.26.1 tf execution plan`; no state transition based on an unverified DP-4 string
|
|
128
128
|
- No "continue" without state inspection
|
|
129
129
|
- No implementation past stale contract
|
|
130
130
|
- No implementation past bug without investigation
|
|
@@ -32,17 +32,17 @@ artifacts: # required 时必填
|
|
|
32
32
|
- `null`(未判定)→ **BLOCK**
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
36
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
37
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
35
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> arch_design_decision "<required|skipped>"
|
|
36
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> arch_design_reason "<reason>"
|
|
37
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> arch_design_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
38
38
|
# if required:
|
|
39
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
39
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> arch_design_artifacts "architecture/architecture.md,architecture/database.md,architecture/api.md"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
**hotfix / tweak 不豁免**:同样过 architecture-design 子代理判断门。
|
|
43
43
|
|
|
44
44
|
## Route to spec-writer
|
|
45
|
-
Guard: `npx --yes --package @xulthekl/team-flow@0.
|
|
45
|
+
Guard: `npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime guard check <dir> exploring specifying --json` → fail = BLOCK.
|
|
46
46
|
**arch_design_decision must not be null** → fail = BLOCK(architecture-design gate not passed,v0.9 §26)。
|
|
47
47
|
User knows what they want, artifacts missing/incomplete.
|
|
48
48
|
|
|
@@ -55,12 +55,12 @@ Contract exists and approved, contract matches artifacts. Include DP-4: 执行
|
|
|
55
55
|
|
|
56
56
|
Propose waves, run:
|
|
57
57
|
```bash
|
|
58
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
58
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution recommend <change-dir> [--wave ...]
|
|
59
59
|
```
|
|
60
60
|
Show every available mode plus evidence and recommendation, obtain clear selection. Then:
|
|
61
61
|
```bash
|
|
62
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
63
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
62
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution plan <change-dir> --mode <selected> --confirm ...
|
|
63
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution show <change-dir> --json
|
|
64
64
|
```
|
|
65
65
|
Do not transition to `executing` until `show` reports `current: true`.
|
|
66
66
|
Guard: `... check <dir> approved-for-build executing --json` → fail = BLOCK.
|
|
@@ -71,7 +71,7 @@ Execution hit blockage: test failure, unexpected behavior, build error. After de
|
|
|
71
71
|
## Route to code-reviewer
|
|
72
72
|
Current planned wave implemented and ready for review. Reviewer must write:
|
|
73
73
|
```bash
|
|
74
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
74
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf execution review <change-dir> --wave <id> --base <sha> --head <sha> --report <path> --verdict <pass|fail>
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
## Route to release-archivist
|
|
@@ -93,10 +93,10 @@ User explicitly requests, bug-investigator escalates after 3+ failures AND user
|
|
|
93
93
|
|
|
94
94
|
When the user's brief explicitly contains UI/screen/interaction/layout/UX uncertainty, ask once whether a prototype would reduce uncertainty. After confirmation:
|
|
95
95
|
```bash
|
|
96
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
96
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf handoff create <change-dir> \
|
|
97
97
|
--type prototype --objective "<confirmed objective>" \
|
|
98
98
|
--expected-output "<expected evidence>" --acceptance "<completion criterion>"
|
|
99
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
99
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf isolate <change-dir> prototype-<handoff-id>
|
|
100
100
|
```
|
|
101
101
|
Never suggest for backend/CLI/config/internal-refactor work. Never pass `--force`.
|
|
102
102
|
|
|
@@ -130,17 +130,17 @@ else:
|
|
|
130
130
|
|
|
131
131
|
After confirmation:
|
|
132
132
|
```bash
|
|
133
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
134
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
135
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
136
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
133
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_0_decisions "<summary>"
|
|
134
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_0_result confirmed
|
|
135
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_0_confirmed true
|
|
136
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf state set <change-dir> dp_0_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
## Mode Detection
|
|
140
140
|
|
|
141
141
|
If workflow is `auto`/`null`/unset:
|
|
142
142
|
```bash
|
|
143
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
143
|
+
npx --yes --package @xulthekl/team-flow@0.26.1 tf runtime infer <change-dir>
|
|
144
144
|
```
|
|
145
145
|
Inference: **hotfix** (≤2 tasks, ≤2 files, no schema/API/new modules), **tweak** (≤4 tasks, config/doc only), **full** (anything larger).
|
|
146
146
|
|
|
@@ -152,4 +152,4 @@ Inference: **hotfix** (≤2 tasks, ≤2 files, no schema/API/new modules), **twe
|
|
|
152
152
|
- **Brief drift (advisory, v0.9)**: change-brief.md 的 `plan_hash` 与当前 plan.md 不一致 → 提示回 orchestrator 重新分发;**不**阻断、**不**进 artifacts_hash、**不**混入上述三条产物互查
|
|
153
153
|
|
|
154
154
|
## Post-transition
|
|
155
|
-
💡 `npx --yes --package @xulthekl/team-flow@0.
|
|
155
|
+
💡 `npx --yes --package @xulthekl/team-flow@0.26.1 tf inject <change-dir>` to update phase-guard artifacts.
|