@godv61/dsh-task-engine 0.14.0 → 0.16.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/README.md +38 -25
- package/defaults/eng.json +1 -22
- package/docs/manual.html +333 -0
- package/hooks/commit-msg +66 -36
- package/lib/client.js +290 -678
- package/lib/client.js.map +4 -4
- package/lib/controller.d.ts +16 -11
- package/lib/controller.js +33 -15
- package/lib/controller.js.map +1 -1
- package/lib/dev-task.js +10 -10
- package/lib/dev-task.js.map +1 -1
- package/lib/engine.d.ts +1 -3
- package/lib/engine.js +1 -16
- package/lib/engine.js.map +1 -1
- package/lib/workflows.d.ts +34 -0
- package/lib/workflows.js +122 -0
- package/lib/workflows.js.map +1 -0
- package/package.json +3 -2
- package/skills/eng-delivery/SKILL.md +1 -1
package/hooks/commit-msg
CHANGED
|
@@ -31,43 +31,73 @@ function readJson(abs) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// Mirrors
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
34
|
+
// Mirrors src/workflows.ts FLOW_CONFIGS — keep in sync.
|
|
35
|
+
const FLOWS = {
|
|
36
|
+
standard: {
|
|
37
|
+
stages: ['需求评审', '设计', '开发', '交付', '代码审核', '完成'],
|
|
38
|
+
start_stage: '需求评审',
|
|
39
|
+
transitions: [
|
|
40
|
+
{ from: '需求评审', to: '设计', requires: ['requirement_confirmation', 'artifacts_present'] },
|
|
41
|
+
{ from: '设计', to: '开发', requires: ['solution_confirmation', 'artifacts_present'] },
|
|
42
|
+
{ from: '开发', to: '交付', requires: ['todos_done'] },
|
|
43
|
+
{ from: '交付', to: '代码审核', requires: ['verified'] },
|
|
44
|
+
{ from: '代码审核', to: '完成', requires: ['review_passed', 'artifacts_present'] },
|
|
45
|
+
],
|
|
46
|
+
artifacts: [
|
|
47
|
+
{ stage: '需求评审', id: 'requirement', name: '需求说明', fields: ['scope', 'acceptance_criteria'] },
|
|
48
|
+
{ stage: '设计', id: 'design', name: '设计文档', fields: ['approach', 'risks', 'impact'] },
|
|
49
|
+
{ stage: '代码审核', id: 'review', name: '评审记录', fields: ['conclusion', 'issues'] },
|
|
50
|
+
],
|
|
51
|
+
commit: {
|
|
52
|
+
policy: 'task',
|
|
53
|
+
message_pattern: '^【(\\S+)】【(?:TASK|T\\d+)】.+',
|
|
54
|
+
message_hint: '【<module>】【TASK/T1】说明',
|
|
55
|
+
checkpoints: ['交付'],
|
|
56
|
+
file_scope: true,
|
|
57
|
+
},
|
|
58
|
+
high_risk_requires_verification: true,
|
|
56
59
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
60
|
+
agile: {
|
|
61
|
+
stages: ['需求', '开发', '交付', '审查'],
|
|
62
|
+
start_stage: '需求',
|
|
63
|
+
transitions: [
|
|
64
|
+
{ from: '需求', to: '开发', requires: ['requirement_confirmation'] },
|
|
65
|
+
{ from: '开发', to: '交付', requires: ['todos_done'] },
|
|
66
|
+
{ from: '交付', to: '审查', requires: [] },
|
|
67
|
+
],
|
|
68
|
+
artifacts: [
|
|
69
|
+
{ stage: '需求', id: 'requirement', name: '需求说明', fields: ['scope'] },
|
|
70
|
+
],
|
|
71
|
+
commit: {
|
|
72
|
+
policy: 'item',
|
|
73
|
+
message_pattern: '^【(\\S+)】【T\\d+】.+',
|
|
74
|
+
message_hint: '【<module>】【T1】说明',
|
|
75
|
+
checkpoints: ['交付'],
|
|
76
|
+
file_scope: true,
|
|
77
|
+
},
|
|
78
|
+
high_risk_requires_verification: false,
|
|
79
|
+
},
|
|
80
|
+
minimal: {
|
|
81
|
+
stages: ['开发', '交付'],
|
|
82
|
+
start_stage: '开发',
|
|
83
|
+
transitions: [
|
|
84
|
+
{ from: '开发', to: '交付', requires: ['todos_done'] },
|
|
85
|
+
],
|
|
86
|
+
artifacts: [],
|
|
87
|
+
commit: {
|
|
88
|
+
policy: 'task',
|
|
89
|
+
message_pattern: '',
|
|
90
|
+
message_hint: '无格式要求',
|
|
91
|
+
checkpoints: ['交付'],
|
|
92
|
+
file_scope: false,
|
|
93
|
+
},
|
|
94
|
+
high_risk_requires_verification: false,
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function loadWorkflow(parsed) {
|
|
99
|
+
const flow = parsed && typeof parsed.flow === 'string' ? parsed.flow : 'standard'
|
|
100
|
+
return FLOWS[flow] || FLOWS.standard
|
|
71
101
|
}
|
|
72
102
|
|
|
73
103
|
// Mirrors engine.guardSatisfied.
|