@xulthekl/team-flow 0.63.0 → 0.65.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.
Files changed (80) hide show
  1. package/.claude/always/phase-guard.md +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +1 -1
  5. package/.cursor-plugin/marketplace.json +1 -1
  6. package/.cursor-plugin/plugin.json +1 -1
  7. package/.github/plugin/marketplace.json +2 -2
  8. package/.github/workflows/ci.yml +2 -0
  9. package/CHANGELOG.md +57 -0
  10. package/GEMINI.md +1 -1
  11. package/INSTALL.md +1 -1
  12. package/README.md +1 -1
  13. package/agents/architecture-design.md +1 -1
  14. package/agents/architecture-reviewer.md +2 -2
  15. package/docs/README_en.md +1 -1
  16. package/docs/state-machine.md +4 -1
  17. package/docs/team-flow /344/275/277/347/224/250/350/257/264/346/230/216/357/274/210/347/240/224/345/217/221/345/233/242/351/230/237/347/211/210/357/274/211.md" +2 -2
  18. package/gemini-extension.json +1 -1
  19. package/hooks/session-start +2 -2
  20. package/llms.txt +1 -1
  21. package/package.json +1 -1
  22. package/plugin.json +1 -1
  23. package/scripts/guard/checks/_fs-utils.mjs +18 -0
  24. package/scripts/guard/checks/arch-design-light.mjs +39 -0
  25. package/scripts/guard/checks/arch-gate-exemptions.mjs +5 -3
  26. package/scripts/guard/checks/arch-merged-light.mjs +67 -0
  27. package/scripts/guard/checks/arch-readiness.mjs +1 -1
  28. package/scripts/guard/checks/arch-snapshot-light.mjs +30 -0
  29. package/scripts/guard/checks/arch-snapshot.mjs +5 -3
  30. package/scripts/guard/checks/artifacts-planned.mjs +38 -0
  31. package/scripts/guard/checks/compound-writeback-light.mjs +45 -0
  32. package/scripts/guard/checks/cross-change-consistency-light.mjs +75 -0
  33. package/scripts/guard/checks/direct-short-path.mjs +52 -0
  34. package/scripts/guard/checks/direct-test-result.mjs +30 -0
  35. package/scripts/guard/checks/execution-plan-ready.mjs +7 -1
  36. package/scripts/guard/checks/execution-reviews-passed-light.mjs +28 -0
  37. package/scripts/guard/checks/lightweight-completion-evidence.mjs +27 -0
  38. package/scripts/guard/checks/specs-merged.mjs +25 -1
  39. package/scripts/guard/checks/test-matrix-complete.mjs +27 -1
  40. package/scripts/guard/checks/test-matrix-ready.mjs +28 -1
  41. package/scripts/guard/checks/test-merged-light.mjs +36 -0
  42. package/scripts/guard/guard.mjs +102 -12
  43. package/scripts/infer-workflow.mjs +35 -4
  44. package/scripts/lib/arch-merge.mjs +404 -54
  45. package/scripts/lib/arch-parse.mjs +5 -2
  46. package/scripts/lib/arch-registry.mjs +523 -0
  47. package/scripts/lib/arch-scan-code.mjs +518 -0
  48. package/scripts/lib/cmd-arch.mjs +9 -1
  49. package/scripts/lib/cmd-doctor.mjs +1 -1
  50. package/scripts/lib/cmd-execution.mjs +44 -1
  51. package/scripts/lib/cmd-state.mjs +94 -4
  52. package/scripts/lib/config-loader.mjs +20 -0
  53. package/scripts/lib/execution-plan.mjs +3 -1
  54. package/scripts/lib/state-loader.mjs +43 -0
  55. package/scripts/lib/surface-scan.mjs +156 -0
  56. package/scripts/lib/test-merge.mjs +10 -2
  57. package/scripts/team-flow.mjs +6 -3
  58. package/skills/architecture-design/SKILL.md +29 -11
  59. package/skills/architecture-design/chapters/ch04-entity-to-aggregate.md +18 -7
  60. package/skills/architecture-design/chapters/ch06-integration.md +12 -3
  61. package/skills/architecture-design/glossary.md +5 -1
  62. package/skills/architecture-design/references/adr-templates.md +56 -0
  63. package/skills/architecture-design/references/context-map-8.md +47 -0
  64. package/skills/architecture-design/references/ddd-evented-playbook.md +41 -0
  65. package/skills/architecture-design/references/s3.5-architecture-template.md +36 -4
  66. package/skills/architecture-design/references/s3.5-loading-protocol.md +5 -4
  67. package/skills/architecture-design/references/s3.5-product-architecture.md +6 -6
  68. package/skills/architecture-design/templates/architecture.md +20 -0
  69. package/skills/ce-compound/references/concepts-vocabulary.md +1 -1
  70. package/skills/ce-compound/references/full-mode-workflow.md +2 -2
  71. package/skills/ce-compound/references/lightweight-mode.md +1 -1
  72. package/skills/clean-code/SKILL.md +1 -1
  73. package/skills/jarvis/SKILL.md +2 -0
  74. package/skills/release-archivist/SKILL.md +60 -13
  75. package/skills/release-archivist/references/closing-procedures.md +1 -1
  76. package/skills/session-handoff/SKILL.md +1 -0
  77. package/skills/test-strategy/SKILL.md +1 -1
  78. package/skills/workflow-orchestrator/SKILL.md +2 -2
  79. package/skills/workflow-start/SKILL.md +63 -5
  80. package/skills/workflow-start/references/routing-rules.md +4 -4
@@ -57,11 +57,14 @@ function inferMode(changeDir) {
57
57
  const state = readState(changeDir);
58
58
 
59
59
  // Explicit override: honor any non-auto, non-null workflow value
60
+ // v0.64.0(§3.2 F1):VALID_WORKFLOWS 扩为五值,quick/lightweight 亦为合法显式档位。
60
61
  if (state.workflow && state.workflow !== 'auto') {
61
- const valid = ['hotfix', 'tweak', 'full'];
62
+ const valid = ['hotfix', 'tweak', 'full', 'quick', 'lightweight'];
62
63
  if (valid.includes(state.workflow)) {
63
64
  return {
64
65
  mode: state.workflow,
66
+ // 双通道(§3.2):显式 workflow 已定时不再建议前门(显式 > 推断)
67
+ suggested_path: null,
65
68
  explicit: true,
66
69
  reason: `workflow explicitly set to '${state.workflow}' in .team-flow.yaml; skipping auto-detection`,
67
70
  };
@@ -85,6 +88,20 @@ function inferMode(changeDir) {
85
88
  '新增 capability', 'new capability',
86
89
  ]);
87
90
 
91
+ // v0.64.0(§3.2 双通道):前门建议信号。
92
+ // hasSchemaChange 已含 api/schema/接口 关键词(F-06 去重:不新建同词判定);
93
+ // arch/aggregate/cross_module/uncertainty 为净新增信号(现状 infer 无)。
94
+ const hasArchAggregate = hasKeyword(combined, [
95
+ '聚合', 'aggregate', 'architecture', '架构', '限界上下文', 'bounded context', 'cqrs',
96
+ ]);
97
+ const hasCrossModule = hasKeyword(combined, [
98
+ 'cross-module', '跨模块', '跨服务', 'multi-repo', '多仓',
99
+ ]);
100
+ // 架构 surface 信号 → 建议 planned(轻架构);不再直接推 full(D1)
101
+ const archPathSignal = hasSchemaChange || hasArchAggregate;
102
+ // 跨模块 / 高不确定性 → full(D1:full 只留重场景)
103
+ const fullSignal = hasCrossModule || (taskCount > 4 && fileCount > 6);
104
+
88
105
  const allExts = files.map(f => {
89
106
  const parts = f.split('.');
90
107
  return parts[parts.length - 1].toLowerCase();
@@ -96,6 +113,7 @@ function inferMode(changeDir) {
96
113
  if (taskCount === 0 && fileCount === 0) {
97
114
  return {
98
115
  mode: 'full',
116
+ suggested_path: null,
99
117
  explicit: false,
100
118
  reason: 'no planning artifacts detected → full (safe default)',
101
119
  };
@@ -105,8 +123,9 @@ function inferMode(changeDir) {
105
123
  if (taskCount <= 2 && fileCount <= 2 && !hasSchemaChange && !hasNewModule) {
106
124
  return {
107
125
  mode: 'hotfix',
126
+ suggested_path: 'direct',
108
127
  explicit: false,
109
- reason: `≤2 tasks, ≤2 files, no schema/API/new-module keywords → hotfix`,
128
+ reason: `≤2 tasks, ≤2 files, no schema/API/new-module keywords → hotfix (trivial → suggest path direct; hotfix retained when reusing an existing contract)`,
110
129
  };
111
130
  }
112
131
 
@@ -114,16 +133,28 @@ function inferMode(changeDir) {
114
133
  if (taskCount <= 4 && configDocOnly && !hasSchemaChange && !hasNewModule) {
115
134
  return {
116
135
  mode: 'tweak',
136
+ suggested_path: 'direct',
137
+ explicit: false,
138
+ reason: `≤4 tasks, only config/doc files, no schema/API/new-module keywords → tweak (trivial → suggest path direct)`,
139
+ };
140
+ }
141
+
142
+ // Arch/API/DB/聚合信号 → 建议 planned(轻架构)而非 full(§3.2 D1 修正)
143
+ if (archPathSignal && !fullSignal) {
144
+ return {
145
+ mode: 'full',
146
+ suggested_path: 'planned',
117
147
  explicit: false,
118
- reason: `≤4 tasks, only config/doc files, no schema/API/new-module keywords → tweak`,
148
+ reason: `${taskCount} tasks, ${fileCount} files${hasSchemaChange ? ', schema/API change detected' : ''}${hasArchAggregate ? ', arch/aggregate keywords detected' : ''} → suggest path planned (light architecture); front door: workflow start --path planned (new change) or tf state upgrade <dir> planned (existing change)`,
119
149
  };
120
150
  }
121
151
 
122
152
  // Default
123
153
  return {
124
154
  mode: 'full',
155
+ suggested_path: null,
125
156
  explicit: false,
126
- reason: `${taskCount} tasks, ${fileCount} files${codeFileCount > 0 ? ` (${codeFileCount} code files)` : ''}${hasSchemaChange ? ', schema/API change detected' : ''}${hasNewModule ? ', new module detected' : ''} → full`,
157
+ reason: `${taskCount} tasks, ${fileCount} files${codeFileCount > 0 ? ` (${codeFileCount} code files)` : ''}${hasSchemaChange ? ', schema/API change detected' : ''}${hasNewModule ? ', new module detected' : ''}${hasCrossModule ? ', cross-module detected' : ''} → full`,
127
158
  };
128
159
  }
129
160