@xulthekl/team-flow 0.22.4 → 0.23.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 +3 -2
- package/CHANGELOG.md +53 -0
- package/GEMINI.md +1 -1
- package/HANDOFF.md +123 -98
- 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 +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/guard/checks/arch-design.mjs +79 -0
- package/scripts/guard/guard.mjs +3 -1
- package/scripts/lib/arch-merge.mjs +459 -0
- package/scripts/lib/cmd-state.mjs +3 -0
- package/scripts/lib/hash.mjs +18 -0
- package/scripts/lib/state-loader.mjs +11 -0
- package/scripts/team-flow.mjs +3 -0
- package/skills/architecture-design/SKILL.md +42 -3
- package/skills/architecture-design/templates/api.md +71 -0
- package/skills/architecture-design/templates/architecture.md +82 -0
- package/skills/architecture-design/templates/change-brief.md +29 -0
- package/skills/architecture-design/templates/database.md +69 -0
- package/skills/architecture-design/templates/index.md +33 -0
- package/skills/architecture-design/templates/physical-model.md +93 -0
- package/skills/bug-investigator/SKILL.md +1 -1
- package/skills/build-executor/SKILL.md +23 -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 +6 -0
- package/skills/code-reviewer/SKILL.md +6 -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 +25 -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 +11 -9
- package/skills/workflow-bootstrap/SKILL.md +28 -5
- package/skills/workflow-bootstrap/references/b1-reconnaissance.md +16 -1
- package/skills/workflow-orchestrator/references/s2-prd-prototype-loop.md +1 -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 +44 -16
- package/skills/workflow-start/references/routing-rules.md +17 -17
- package/templates/api.md +177 -0
- package/templates/architecture.md +122 -0
- package/templates/change-brief.md +24 -0
- package/templates/database.md +114 -0
|
@@ -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.23.0 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
|
|
@@ -54,12 +54,18 @@ These rules apply to every brainstorm, including the universal (non-software) fl
|
|
|
54
54
|
|
|
55
55
|
Sub-agent dispatch is tiered by task shape, never hardcoded to a model name. When dispatching the Phase 1.1 grounding scout, the Phase 2.6 claim verifier, or the opt-in Slack researcher, read `references/model-tiers.md` for the tier definitions (extraction / generation / ceiling) and the degradation rule for platforms without per-agent model selection or with no subagent primitive at all.
|
|
56
56
|
|
|
57
|
+
## Optional Inputs
|
|
58
|
+
|
|
59
|
+
- `docs/ideation/*.md`(可选):如果 ce-ideate 已产出 ideation artifact,读取作为 brainstorm 的起点。若文件不存在,则从用户提供的 feature description 获取输入。
|
|
60
|
+
|
|
57
61
|
## Feature Description
|
|
58
62
|
|
|
59
63
|
The **feature description** is the input this skill was invoked with — what to explore, present in the current prompt or conversation, whether the user provided it directly or a calling skill passed it.
|
|
60
64
|
|
|
61
65
|
**If no feature description was provided, ask the user:** "What would you like to explore? Please describe the feature, problem, or improvement you're thinking about."
|
|
62
66
|
|
|
67
|
+
**If `docs/ideation/*.md` exists**, read it first and use its ranked ideation content as the starting point for the brainstorm.
|
|
68
|
+
|
|
63
69
|
Do not proceed until you have a feature description from the user.
|
|
64
70
|
|
|
65
71
|
**Session-settled decisions.** The invoking conversation, or a distilled brief passed as invocation input — from the user or a calling skill — may carry decisions already examined-and-chosen. Read `references/settled-decisions.md` before classifying conversation-carried decisions — it carries the settlement test, the two provenance classes, the annotation shape, and capture rules. Skipping the classification fails in both directions: re-asking a decision the user already made, or promoting an unexamined assertion to settled.
|
|
@@ -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.23.0 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
|
|
@@ -43,6 +43,10 @@ behavior-neutral redundancy; never score by line count.
|
|
|
43
43
|
| Important | Architecture problems, missing features, poor error handling, test gaps | Fix before next batch |
|
|
44
44
|
| Minor | Code style, optimization, documentation polish | Note for later |
|
|
45
45
|
|
|
46
|
+
### Architecture Cross-Domain Consistency (v0.10 §28-§31)
|
|
47
|
+
|
|
48
|
+
When `architecture/api.md` exists, verify the implementation against its **cross-domain consistency** section — specifically the API↔data entity alignment (Command/Read/Query routing vs actual DB entity usage). Flag mismatches as Important.
|
|
49
|
+
|
|
46
50
|
### Forbidden Responses
|
|
47
51
|
Never: performative agreement ("You're right!", "Great point!"), blind implementation before verification, thanking the reviewer. Instead: restate the requirement, ask clarifying questions, push back with reasoning, or just fix it (actions > words).
|
|
48
52
|
|
|
@@ -72,7 +76,7 @@ Suggestion breaks existing functionality, reviewer lacks context, violates YAGNI
|
|
|
72
76
|
| Performative agreement | State requirement or just act |
|
|
73
77
|
| Blind implementation | Verify against codebase first |
|
|
74
78
|
| Batch without testing | One at a time, test each |
|
|
75
|
-
| 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.23.0 tf execution review` before the next dependent wave |
|
|
76
80
|
| Assuming reviewer is right | Check if breaks things |
|
|
77
81
|
| Avoiding pushback | Technical correctness > comfort |
|
|
78
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.23.0 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.23.0 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.23.0 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.23.0 tf state set <change-dir> dp_3_result "approved: <summary>"
|
|
42
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 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.23.0 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.23.0 tf state init <change-dir>` or `npx --yes --package @xulthekl/team-flow@0.23.0 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.23.0 tf state set <change-dir> dp_1_result "confirmed: <one-line summary>"
|
|
45
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 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
|
|
|
@@ -48,6 +48,7 @@ Check for files modified outside scope fence, new dependencies not in design. Un
|
|
|
48
48
|
| Correctness | PASS/FAIL/WARN | [list] |
|
|
49
49
|
| Coherence | PASS/FAIL/WARN | [list] |
|
|
50
50
|
|
|
51
|
+
- **Architecture merge**: <merged architecture.md + database.md + api.md + N SQL scripts to docs/architecture/ | architecture/ absent — skipped>
|
|
51
52
|
- **Prototype sync**: <synced N pages / N components / design-system updated | no UX delta | conflicts: N>
|
|
52
53
|
- **Compound promotion**: <promoted N learnings / updated N confirmed patterns | no learnings>
|
|
53
54
|
|
|
@@ -71,12 +72,12 @@ If an `e2e/` suite exists for the change, fold its report into verification (see
|
|
|
71
72
|
- Scope added without artifact updates?
|
|
72
73
|
- Unresolved blockers or known risks?
|
|
73
74
|
- Delta specs exist that need merging?
|
|
74
|
-
- Run `npx --yes --package @xulthekl/team-flow@0.
|
|
75
|
+
- Run `npx --yes --package @xulthekl/team-flow@0.23.0 tf audit <change-dir>` — include `decision-point-audit.md` in archive
|
|
75
76
|
|
|
76
77
|
### DP-6 (Verification Outcome)
|
|
77
78
|
```bash
|
|
78
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
79
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
79
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_6_result "<pass|conditional|fail>: <summary>"
|
|
80
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_6_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
80
81
|
```
|
|
81
82
|
If FAIL, do NOT proceed to DP-7. Route back or ask about abandonment.
|
|
82
83
|
|
|
@@ -84,13 +85,13 @@ After recording a PASS outcome, also record it as the verification gate so the
|
|
|
84
85
|
`executing → closing` transition is allowed (the guard accepts either
|
|
85
86
|
`test_result: pass` or a `dp_6_result` starting with `pass`):
|
|
86
87
|
```bash
|
|
87
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
88
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> test_result pass
|
|
88
89
|
```
|
|
89
90
|
|
|
90
91
|
### DP-7 (Archive Confirmation)
|
|
91
92
|
```bash
|
|
92
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
93
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
93
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_7_result "confirmed: <archive summary>"
|
|
94
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_7_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
94
95
|
```
|
|
95
96
|
Verify DP-0 through DP-6 are recorded before DP-7.
|
|
96
97
|
|
|
@@ -100,17 +101,29 @@ If implementation diverged from the contract, return to `bridging` before closur
|
|
|
100
101
|
|
|
101
102
|
## Post-Verification
|
|
102
103
|
|
|
103
|
-
Run `npx --yes --package @xulthekl/team-flow@0.
|
|
104
|
+
Run `npx --yes --package @xulthekl/team-flow@0.23.0 tf state transition <change-dir> closing`. If delta specs exist, route to `spec-merger`.
|
|
105
|
+
|
|
106
|
+
### Architecture Merge (v0.10 §28-§31) — MUST run first
|
|
107
|
+
|
|
108
|
+
Merge change-level architecture artifacts to the global `docs/architecture/` baseline **before** any other post-verification step:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf arch-merge <change-dir>
|
|
112
|
+
```
|
|
113
|
+
|
|
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`).
|
|
115
|
+
|
|
116
|
+
**Execution order (mandatory)**: `arch-merge` → `prototype-sync` → `compound promotion`. Do not parallelise — global docs must not be in a half-updated state.
|
|
104
117
|
|
|
105
118
|
### Prototype Sync (v0.5)
|
|
106
119
|
|
|
107
120
|
After `arch-merge` completes, run prototype-sync to merge UX deltas back to the global prototype:
|
|
108
121
|
|
|
109
122
|
```bash
|
|
110
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
123
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf prototype-sync <change-dir>
|
|
111
124
|
```
|
|
112
125
|
|
|
113
|
-
**Write-back order (mandatory)**: `arch-merge` → `prototype-sync` 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.
|
|
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.
|
|
114
127
|
|
|
115
128
|
If `prototype-sync` reports conflicts, list them in the closing summary and flag for manual resolution. Do not block closing on prototype-sync conflicts (advisory level).
|
|
116
129
|
|
|
@@ -119,7 +132,7 @@ If `prototype-sync` reports conflicts, list them in the closing summary and flag
|
|
|
119
132
|
During closing, promote change-level learnings to the global solutions library:
|
|
120
133
|
|
|
121
134
|
```bash
|
|
122
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
135
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf solutions promote <change-dir>
|
|
123
136
|
```
|
|
124
137
|
|
|
125
138
|
This checks `specs/<cap>/learnings.md` for entries meeting promotion criteria:
|
|
@@ -139,7 +152,7 @@ Before finalizing the closing, check if this change produced any learnable momen
|
|
|
139
152
|
|
|
140
153
|
If any of the above occurred, capture the learning:
|
|
141
154
|
```bash
|
|
142
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
155
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf solutions capture \
|
|
143
156
|
--phase cross-phase --domain <domain> --type pitfall \
|
|
144
157
|
--severity medium --summary "<what happened and how to prevent it>"
|
|
145
158
|
```
|
|
@@ -161,6 +174,6 @@ Verify files exist and are non-empty, run `node --check` on code files, skip 5-s
|
|
|
161
174
|
## Exception Handling
|
|
162
175
|
|
|
163
176
|
- **Parse failures**: Report exact file and section
|
|
164
|
-
- **Missing files**: If audit can't generate, run `npx --yes --package @xulthekl/team-flow@0.
|
|
177
|
+
- **Missing files**: If audit can't generate, run `npx --yes --package @xulthekl/team-flow@0.23.0 tf audit` manually
|
|
165
178
|
- **User interruption**: Re-run verification from the beginning on resume
|
|
166
179
|
- **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.23.0 tf prototype-sync <change-dir>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
**Write-back order (mandatory)**: `arch-merge` → `prototype-sync` must be executed **sequentially** within the same change closing. Do not run them in parallel.
|
|
@@ -19,7 +19,7 @@ If `prototype-sync` reports conflicts, list them in the closing summary and flag
|
|
|
19
19
|
During closing, promote change-level learnings to the global solutions library:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
22
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf solutions promote <change-dir>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Promotion criteria:
|
|
@@ -39,7 +39,7 @@ Before finalizing the closing, check if this change produced any learnable momen
|
|
|
39
39
|
|
|
40
40
|
If any occurred, capture the learning:
|
|
41
41
|
```bash
|
|
42
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
42
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf solutions capture \
|
|
43
43
|
--phase cross-phase --domain <domain> --type pitfall \
|
|
44
44
|
--severity medium --summary "<what happened and how to prevent it>"
|
|
45
45
|
```
|
|
@@ -49,22 +49,22 @@ Advisory — skip silently if no learnable moments detected.
|
|
|
49
49
|
## DP-6 (Verification Outcome)
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
53
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
52
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_6_result "<pass|conditional|fail>: <summary>"
|
|
53
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_6_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
If FAIL, do NOT proceed to DP-7. Route back or ask about abandonment.
|
|
57
57
|
|
|
58
58
|
After PASS, also record the verification gate:
|
|
59
59
|
```bash
|
|
60
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
60
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> test_result pass
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
## DP-7 (Archive Confirmation)
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
67
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
66
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_7_result "confirmed: <archive summary>"
|
|
67
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_7_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
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.23.0 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.23.0 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
|
|
|
@@ -41,19 +41,21 @@ Read `docs/solutions/INDEX.md` if it exists. Filter entries where `phase = spec
|
|
|
41
41
|
若 `architecture/` 目录存在(本 change 经 workflow-start 的 architecture-design 判断门判定为 `required` 并产出了架构设计),读取以下文件作为 design.md / tasks.md 的架构约束输入:
|
|
42
42
|
|
|
43
43
|
- `architecture/architecture.md` → design.md `## Decisions` 的架构约束(聚合/限界上下文/CQRS 决策)
|
|
44
|
-
- `architecture/database.md` → design.md + tasks.md 的数据层约束(实体/读写模型/schema
|
|
45
|
-
- `architecture/api.md` → tasks.md
|
|
44
|
+
- `architecture/database.md` → design.md + tasks.md 的数据层约束(实体/读写模型/schema 变更);注意 database.md 引用 `architecture/sql/` 路径而非内嵌 DDL
|
|
45
|
+
- `architecture/api.md` → tasks.md 的接口路由约束(**架构路由表**:Command/Read/Query 分类,非详细 API 规格——详细规格由 Swagger 管理)
|
|
46
|
+
- `architecture/sql/ddl/*.sql` → tasks.md 数据层任务的 DDL 脚本约束(可执行建表/改表脚本)
|
|
47
|
+
- `architecture/sql/migration/*.sql` → tasks.md 数据层任务的数据迁移约束
|
|
46
48
|
|
|
47
49
|
**约束传递规则**:
|
|
48
50
|
- design.md 的 `## Decisions` 段必须**引用** architecture/ 中的架构决策,不得与之矛盾
|
|
49
|
-
- tasks.md 的接口定义(Interfaces 段)必须与 `architecture/api.md`
|
|
50
|
-
- tasks.md 的数据层任务必须与 `architecture/database.md` 的 schema
|
|
51
|
+
- tasks.md 的接口定义(Interfaces 段)必须与 `architecture/api.md` 的架构路由表(Command/Read/Query 分类)对齐——详细 API 规格由 Swagger 管理,api.md 不含
|
|
52
|
+
- tasks.md 的数据层任务必须与 `architecture/database.md` 的 schema 变更对齐,并引用 `architecture/sql/ddl/*.sql` 和 `architecture/sql/migration/*.sql` 作为可执行脚本路径
|
|
51
53
|
|
|
52
54
|
`architecture/` 目录不存在时(判定为 `skipped`)跳过本段。
|
|
53
55
|
|
|
54
56
|
## Config Check
|
|
55
57
|
|
|
56
|
-
Run: `npx --yes --package @xulthekl/team-flow@0.
|
|
58
|
+
Run: `npx --yes --package @xulthekl/team-flow@0.23.0 tf runtime config --get artifacts.order` — generate in configured order (default: proposal → specs → design → tasks). Run with `artifacts.skip` — skip any listed artifacts.
|
|
57
59
|
|
|
58
60
|
## Artifact Roles
|
|
59
61
|
|
|
@@ -69,7 +71,7 @@ Run: `npx --yes --package @xulthekl/team-flow@0.22.4 tf runtime config --get art
|
|
|
69
71
|
|
|
70
72
|
**Honor Brief (v0.9)**: 若 `change-brief.md` 存在,尊重其 scope 边界与 AC 列表(见 Required Inputs「Change Brief」)——不静默丢弃 brief AC、不静默超出 brief scope;与 plan.md 冲突时以 plan.md 为准并注明。
|
|
71
73
|
|
|
72
|
-
**Honor Architecture (v0.9 §26)**: 若 `architecture/` 目录存在,design.md 的 Decisions 段必须引用其架构决策(聚合/限界上下文/CQRS/API/DB),tasks.md
|
|
74
|
+
**Honor Architecture (v0.9 §26, v0.10 §28-§31)**: 若 `architecture/` 目录存在,design.md 的 Decisions 段必须引用其架构决策(聚合/限界上下文/CQRS/API/DB),tasks.md 的接口定义(对齐 api.md 架构路由表)和数据层任务(引用 sql/ddl/ + sql/migration/ 脚本路径)必须与 architecture/ 产出对齐——不得静默忽略或矛盾架构设计产出。
|
|
73
75
|
|
|
74
76
|
### proposal.md
|
|
75
77
|
Must state: problem, what changes, capabilities affected, impact areas.
|
|
@@ -122,7 +124,7 @@ Generate one at a time. Confirm each before next. This prevents scope drift —
|
|
|
122
124
|
|
|
123
125
|
### design.md
|
|
124
126
|
- `## Context`, `## Goals`, `## Decisions` (≥1, with Choice+Rationale+Alternatives), `## Risks And Trade-Offs`
|
|
125
|
-
- **Architecture alignment (v0.9 §26)**: 若 `architecture/` 存在,`## Decisions` 必须引用架构设计产出中的关键决策(聚合/限界上下文/CQRS/API/DB
|
|
127
|
+
- **Architecture alignment (v0.9 §26, v0.10 §28-§31)**: 若 `architecture/` 存在,`## Decisions` 必须引用架构设计产出中的关键决策(聚合/限界上下文/CQRS/API/DB);tasks.md 数据层任务须引用 `architecture/sql/` 脚本路径,接口定义须对齐 api.md 架构路由表
|
|
126
128
|
|
|
127
129
|
### tasks.md
|
|
128
130
|
- `## File Structure`, `## Interfaces`, numbered tasks, exact file paths, TDD phases, ≤5 min steps, no placeholders, every requirement mapped, explicit dependencies
|
|
@@ -133,8 +135,8 @@ Generate one at a time. Confirm each before next. This prevents scope drift —
|
|
|
133
135
|
|
|
134
136
|
Present summary of all 4 artifacts (2-3 sentences each). Ask user for adjustments. After approval:
|
|
135
137
|
```bash
|
|
136
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
137
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
138
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_2_result "approved: <summary>"
|
|
139
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf state set <change-dir> dp_2_timestamp $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
138
140
|
```
|
|
139
141
|
|
|
140
142
|
## Handoff Rule
|
|
@@ -66,9 +66,30 @@ Do NOT invoke for:
|
|
|
66
66
|
|
|
67
67
|
**条件**:如果 B1 侦察发现项目有一定复杂度(≥5 个模块或 ≥10 个源文件),执行此阶段。否则跳过。
|
|
68
68
|
|
|
69
|
+
**B2 成果物导入(v0.23.0 新增)**:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
Step 1: 询问用户是否有既有成果物
|
|
73
|
+
├── 有 SQL DDL 脚本 → 导入到 docs/architecture/schema-baseline.sql
|
|
74
|
+
├── 有物理模型文档 → 转换为 docs/architecture/PHYSICAL-MODEL.md(对齐标准格式)
|
|
75
|
+
├── 有 API 文档/Swagger 导出 → 提取端点生成 docs/architecture/API-INDEX.md
|
|
76
|
+
└── 无既有成果物 → Step 2 兜底
|
|
77
|
+
|
|
78
|
+
Step 2: 确定性提取(兜底)
|
|
79
|
+
├── recon-probe.sh 增加 DDL 提取能力(解析 Entity 类 / SHOW CREATE TABLE)
|
|
80
|
+
├── 从 schema-baseline.sql 反向生成 PHYSICAL-MODEL.md
|
|
81
|
+
└── 扫描 Controller/Router 类 → 生成 API-INDEX.md
|
|
82
|
+
|
|
83
|
+
优先级原则:用户既有成果物 > 确定性提取 > LLM 推断
|
|
84
|
+
```
|
|
85
|
+
|
|
69
86
|
产出:
|
|
70
87
|
- `docs/architecture/ARCHITECTURE.md` — 分层、模块边界、技术选型(瘦锚点格式)
|
|
71
88
|
- `docs/architecture/DATABASE.md` — 数据模型(如适用)
|
|
89
|
+
- `docs/architecture/PHYSICAL-MODEL.md` — 物理模型(v0.23.0 新增)
|
|
90
|
+
- `docs/architecture/schema-baseline.sql` — DDL 基线脚本(v0.23.0 新增)
|
|
91
|
+
- `docs/architecture/API-INDEX.md` — API 端点索引(v0.23.0 新增)
|
|
92
|
+
- `docs/architecture/INDEX.md` — 架构文档索引(v0.23.0 新增)
|
|
72
93
|
- `docs/architecture/<bc>/` — 每个有界上下文的目录(如能识别)
|
|
73
94
|
|
|
74
95
|
**轻量 vs 完整**:
|
|
@@ -82,7 +103,9 @@ Do NOT invoke for:
|
|
|
82
103
|
|
|
83
104
|
### B3: Domain Vocabulary Bootstrap(领域词汇种子)
|
|
84
105
|
|
|
85
|
-
从代码命名中提取领域词汇,创建或更新 `CONCEPTS.md`。
|
|
106
|
+
从代码命名中提取领域词汇,创建或更新 `docs/architecture/CONCEPTS.md`。
|
|
107
|
+
|
|
108
|
+
> **v0.23.0 变更**:`CONCEPTS.md` 已迁移至 `docs/architecture/CONCEPTS.md`(原根目录位置已弃用)。如根目录存在旧文件,应迁移至新路径。
|
|
86
109
|
|
|
87
110
|
**提取策略**:
|
|
88
111
|
1. 扫描实体类名、服务类名、模块名
|
|
@@ -104,7 +127,7 @@ Do NOT invoke for:
|
|
|
104
127
|
```
|
|
105
128
|
|
|
106
129
|
**已有 CONCEPTS.md 处理**:
|
|
107
|
-
- 如果 `CONCEPTS.md` 已存在(由之前的 ce-compound 运行创建)→ **合并**而非覆盖
|
|
130
|
+
- 如果 `docs/architecture/CONCEPTS.md` 已存在(由之前的 ce-compound 运行创建)→ **合并**而非覆盖
|
|
108
131
|
- 读取已有词汇,补充从代码中新发现的术语
|
|
109
132
|
- 标注来源:"workflow-bootstrap B3 补充"
|
|
110
133
|
|
|
@@ -124,7 +147,7 @@ Do NOT invoke for:
|
|
|
124
147
|
> - C) 我只是想建立架构基线,暂不开发新需求(→ 结束)
|
|
125
148
|
|
|
126
149
|
**上下文传递**:
|
|
127
|
-
- 将 `docs/architecture/baseline.md` 和 `CONCEPTS.md` 的路径传递给 workflow-orchestrator S1
|
|
150
|
+
- 将 `docs/architecture/baseline.md` 和 `docs/architecture/CONCEPTS.md` 的路径传递给 workflow-orchestrator S1
|
|
128
151
|
- 作为后续流程的架构上下文
|
|
129
152
|
|
|
130
153
|
## Guardrails
|
|
@@ -140,9 +163,9 @@ Do NOT invoke for:
|
|
|
140
163
|
|
|
141
164
|
每次交互结束时说明:
|
|
142
165
|
1. 已完成的阶段(B1-B5)
|
|
143
|
-
2. 已产出的制品(baseline.md / ARCHITECTURE.md / CONCEPTS.md / 目录结构)
|
|
166
|
+
2. 已产出的制品(baseline.md / ARCHITECTURE.md / PHYSICAL-MODEL.md / schema-baseline.sql / API-INDEX.md / INDEX.md / CONCEPTS.md / 目录结构)
|
|
144
167
|
3. 下一步建议(调用哪个 skill)
|
|
145
168
|
|
|
146
169
|
## Success Output
|
|
147
170
|
|
|
148
|
-
接入结束时输出:侦察模式、产出清单(baseline.md / ARCHITECTURE.md / DATABASE.md / CONCEPTS.md / 目录结构)、关键发现(技术栈/模块数/架构模式/测试覆盖)、下一步建议。完整模板见 `references/b1-reconnaissance.md`「Success Output 模板」。
|
|
171
|
+
接入结束时输出:侦察模式、产出清单(baseline.md / 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 模板」。
|
|
@@ -15,6 +15,17 @@ bash scripts/recon-probe.sh --root <项目根> --out /tmp/recon-<slug>.json
|
|
|
15
15
|
|
|
16
16
|
固定采集(不依赖 LLM,两次接入结果一致):目录树(限深 4 层)、依赖清单(pom/package.json/requirements/go.mod/build.gradle)、LOC 与文件类型分布、测试文件计数(含 `.test.mjs`/`.spec.mjs`)、DB 迁移文件清单、README/docs 探测。输出结构化 JSON 供子代理消费。脚本只做确定性机械采集(§17.8 第四类载体),语义判断交给子代理 LLM。
|
|
17
17
|
|
|
18
|
+
## B1.1a DDL 提取能力(v0.23.0 新增)
|
|
19
|
+
|
|
20
|
+
`recon-probe.sh` 需增加 DDL 提取能力,用于 B2 成果物导入阶段的兜底提取:
|
|
21
|
+
|
|
22
|
+
- **Entity 类解析**:扫描 `@Entity`、`@Table` 注解的 Java 类,或 ORM 模型定义文件,提取表名、字段名、字段类型、索引信息
|
|
23
|
+
- **SHOW CREATE TABLE**:当项目配置了数据库连接时,执行 `SHOW CREATE TABLE` 导出各表 DDL
|
|
24
|
+
- **迁移文件解析**:解析 Flyway / Liquibase / Alembic 等迁移脚本,提取最终态 schema
|
|
25
|
+
- **输出**:将提取结果写入 `docs/architecture/schema-baseline.sql`,格式为标准 DDL(CREATE TABLE 语句)
|
|
26
|
+
|
|
27
|
+
此能力为 B2 Step 2 兜底提取的前置依赖。当用户无既有 DDL 脚本时,由 recon-probe.sh 自动从代码/数据库中提取 schema 基线。
|
|
28
|
+
|
|
18
29
|
## B1.2 并行派发侦察子代理(语义增强)
|
|
19
30
|
|
|
20
31
|
读 `references/agents/codebase-recon-analyst.md`,把 B1.1 的 JSON 路径作为 `recon_json` 入参,按维度**并行派发**子代理(每个子代理消费 JSON 基底 + 按需补读源码,按 §18.1 返回结构化摘要):
|
|
@@ -65,7 +76,11 @@ bash scripts/recon-probe.sh --root <项目根> --out /tmp/recon-<slug>.json
|
|
|
65
76
|
- docs/architecture/baseline.md(项目基线画像)
|
|
66
77
|
- docs/architecture/ARCHITECTURE.md(架构锚点,如适用)
|
|
67
78
|
- docs/architecture/DATABASE.md(数据模型,如适用)
|
|
68
|
-
-
|
|
79
|
+
- docs/architecture/PHYSICAL-MODEL.md(物理模型,v0.23.0)
|
|
80
|
+
- docs/architecture/schema-baseline.sql(DDL 基线脚本,v0.23.0)
|
|
81
|
+
- docs/architecture/API-INDEX.md(API 端点索引,v0.23.0)
|
|
82
|
+
- docs/architecture/INDEX.md(架构文档索引,v0.23.0)
|
|
83
|
+
- docs/architecture/CONCEPTS.md(领域词汇,N 个术语)
|
|
69
84
|
- 目录结构:prd/ prototype/ docs/ changes/
|
|
70
85
|
|
|
71
86
|
关键发现:
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
检测可复利时刻(需求矛盾、原型返工、自动评审发现不一致并修正等)。每次自动评审发现不一致并修正后触发:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npx --yes --package @xulthekl/team-flow@0.
|
|
57
|
+
npx --yes --package @xulthekl/team-flow@0.23.0 tf solutions capture --phase prd --domain <domain> --type pitfall --severity <sev> --summary "<summary>"
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
### 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.23.0 tf state init changes/<change-name>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
> ⚠️ **路径约束**:change 脚手架目录固定为项目根 `changes/<change-name>/`。
|