@godv61/dsh-task-engine 0.24.0 → 0.26.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/.acceptance.mjs +101 -39
- package/.assessment-batch1.mjs +32 -12
- package/.e2e-presets.mjs +40 -5
- package/.enforce-test.mjs +139 -0
- package/.evidence-test.mjs +118 -0
- package/.filter-test.mjs +93 -0
- package/.freeze-test.mjs +110 -1
- package/.hook-test.mjs +195 -190
- package/.p0-test.mjs +130 -46
- package/.preset-test.mjs +160 -160
- package/.revision-test.mjs +32 -3
- package/.roundtrip-test.mjs +178 -0
- package/.workflow-test.mjs +117 -4
- package/README.md +10 -8
- package/cordis.patch.yml +10 -10
- package/defaults/eng.json +70 -22
- package/docs/BRIEF-FOR-REVIEW.md +162 -162
- package/docs/CHANGELOG.md +49 -0
- package/docs/README.md +40 -40
- package/docs/configuration.md +14 -11
- package/docs/development.md +1 -1
- package/docs/faq.md +4 -4
- package/docs/listing/godv61__dsh-task-engine.yml +5 -5
- package/docs/listing/submission.md +83 -83
- package/docs/manual.html +31 -26
- package/docs/releases/0.23.2.md +21 -21
- package/docs/roadmap.md +34 -34
- package/docs/testing/0.23.2/R02/344/270/232/345/212/241/346/265/213/350/257/225/346/230/216/347/273/206.md +56 -56
- package/docs/testing/0.23.2/R03/344/270/232/345/212/241/346/265/213/350/257/225/346/230/216/347/273/206.md +38 -38
- package/docs/testing/0.23.2//346/265/213/350/257/225/346/212/245/345/221/212.md +65 -65
- package/hooks/commit-msg +159 -72
- package/lib/client.js +963 -571
- package/lib/client.js.map +3 -3
- package/lib/controller.d.ts +11 -2
- package/lib/controller.js +33 -5
- package/lib/controller.js.map +1 -1
- package/lib/dev-task.js +170 -28
- package/lib/dev-task.js.map +1 -1
- package/lib/engine.d.ts +105 -0
- package/lib/engine.js +93 -5
- package/lib/engine.js.map +1 -1
- package/lib/hook.js +17 -4
- package/lib/hook.js.map +1 -1
- package/lib/skill-audit.d.ts +14 -3
- package/lib/skill-audit.js +66 -3
- package/lib/skill-audit.js.map +1 -1
- package/lib/workflows.d.ts +78 -12
- package/lib/workflows.js +258 -94
- package/lib/workflows.js.map +1 -1
- package/package.json +9 -5
- package/preset/agent.cordis.yml +21 -21
- package/preset/enable.mjs +87 -87
- package/preset/persona.md +4 -4
- package/preset/preset.yml +1 -1
- package/rules/coding-conventions.md +6 -6
- package/rules/commit-conventions.md +6 -6
- package/rules/security-redlines.md +5 -5
- package/scripts/verify-dsh-compat.mjs +144 -144
- package/scripts/verify-package.mjs +1 -1
- package/skills/code-verify/SKILL.md +3 -3
package/lib/workflows.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Built-in
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
2
|
+
* Built-in workflow SKELETONS.
|
|
3
|
+
*
|
|
4
|
+
* A preset states how work MOVES: the stage graph and the guards on each edge.
|
|
5
|
+
* It deliberately carries nothing about HOW to do the work, because a preset that
|
|
6
|
+
* also baked in skills, a commit format and artifact fields would make every
|
|
7
|
+
* project follow the shipped method whether or not that suits it.
|
|
8
|
+
*
|
|
9
|
+
* One reasonable engineering setup per skeleton is offered separately as a
|
|
10
|
+
* {@link FlowRecommendation}, and enters a project only when a user adopts it
|
|
11
|
+
* explicitly. After adoption those values are the user's own config: edited,
|
|
12
|
+
* extended or removed, with nothing merged back by a later version.
|
|
9
13
|
*
|
|
10
14
|
* @module dsh-task-engine/workflows
|
|
11
15
|
*/
|
|
@@ -30,7 +34,15 @@ export const FLOW_OPTIONS = [
|
|
|
30
34
|
{ id: 'agile', label: '日常迭代', description: '目标明确的常规功能与缺陷修复:目标与验收 → 实现 → 验收与审查 → 提交' },
|
|
31
35
|
{ id: 'minimal', label: '快速修改', description: '局部、低风险、方案明确的改动:修改 → 检查与提交' },
|
|
32
36
|
];
|
|
33
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Standard review-gated delivery.
|
|
39
|
+
*
|
|
40
|
+
* The skeleton states how work MOVES: which stages exist, what may follow what,
|
|
41
|
+
* and which confirmations or evidence an edge demands. Everything about HOW to do
|
|
42
|
+
* the work — which skills run, what a commit message must look like, which
|
|
43
|
+
* artifacts a stage records — lives in {@link STANDARD_RECOMMENDATION} and enters
|
|
44
|
+
* a project only when the user adopts it.
|
|
45
|
+
*/
|
|
34
46
|
const STANDARD = {
|
|
35
47
|
stages: ['需求评审', '设计', '开发', '交付', '代码审核', '完成'],
|
|
36
48
|
start_stage: '需求评审',
|
|
@@ -41,19 +53,31 @@ const STANDARD = {
|
|
|
41
53
|
{ from: '交付', to: '代码审核', requires: ['verified'] },
|
|
42
54
|
{ from: '代码审核', to: '完成', requires: ['review_passed', 'artifacts_present'] },
|
|
43
55
|
],
|
|
56
|
+
// No artifacts, no commit policy, no skills: the skeleton carries none of them.
|
|
57
|
+
artifacts: [],
|
|
58
|
+
commit: { policy: 'task', message_pattern: '', message_hint: '无格式要求', checkpoints: ['代码审核'], file_scope: true },
|
|
59
|
+
high_risk_requires_verification: true,
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* One ready-made setup for the standard flow, offered for explicit adoption.
|
|
63
|
+
*
|
|
64
|
+
* This is a recommendation, not a default: it reflects one reasonable way to work
|
|
65
|
+
* and nothing here takes effect until a user adopts it. After adoption these
|
|
66
|
+
* values are ordinary user config — edited, extended or removed — and no later
|
|
67
|
+
* version merges anything back in.
|
|
68
|
+
*/
|
|
69
|
+
const STANDARD_RECOMMENDATION = {
|
|
70
|
+
commit: {
|
|
71
|
+
// Only the TEXT conventions. Policy, checkpoints and scope stay on the
|
|
72
|
+
// skeleton: they decide when a gate fires, not how a message reads.
|
|
73
|
+
message_pattern: '^【(\\S+)】【(?:TASK|T\\d+)】.+',
|
|
74
|
+
message_hint: '【<task_id>】【TASK/T1】说明 —— 第一段填本任务 id(如 GREET-001),写结果不写空泛动作',
|
|
75
|
+
},
|
|
44
76
|
artifacts: [
|
|
45
77
|
{ stage: '需求评审', id: 'requirement', name: '需求说明', fields: ['scope', 'acceptance_criteria'] },
|
|
46
78
|
{ stage: '设计', id: 'design', name: '设计文档', fields: ['approach', 'risks', 'impact'] },
|
|
47
79
|
{ stage: '代码审核', id: 'review', name: '评审记录', fields: ['conclusion', 'issues'] },
|
|
48
80
|
],
|
|
49
|
-
commit: {
|
|
50
|
-
policy: 'task',
|
|
51
|
-
message_pattern: '^【(\\S+)】【(?:TASK|T\\d+)】.+',
|
|
52
|
-
message_hint: '【<task_id>】【TASK/T1】说明 —— 第一段填本任务 id(如 GREET-001),写结果不写空泛动作',
|
|
53
|
-
checkpoints: ['代码审核'],
|
|
54
|
-
file_scope: true,
|
|
55
|
-
},
|
|
56
|
-
high_risk_requires_verification: true,
|
|
57
81
|
stage_bindings: {
|
|
58
82
|
'需求评审': { skills: [bundled('requirement-analysis', 'security-redlines')] },
|
|
59
83
|
'设计': { skills: [bundled('solution-design')] },
|
|
@@ -67,37 +91,46 @@ const STANDARD = {
|
|
|
67
91
|
},
|
|
68
92
|
},
|
|
69
93
|
};
|
|
70
|
-
/** Lighter four-stage flow
|
|
94
|
+
/** Lighter four-stage flow: the skeleton only. */
|
|
71
95
|
const AGILE = {
|
|
72
96
|
stages: ['需求', '开发', '交付', '审查'],
|
|
73
97
|
start_stage: '需求',
|
|
74
98
|
transitions: [
|
|
75
99
|
{ from: '需求', to: '开发', requires: ['requirement_confirmation'] },
|
|
76
100
|
{ from: '开发', to: '交付', requires: ['todos_done'] },
|
|
101
|
+
// Entering 审查 is unconditional. A review guard on this edge would be
|
|
102
|
+
// circular — it would demand the verdict BEFORE the stage that produces it —
|
|
103
|
+
// and it would also block the commit at 交付, since a commit requires its
|
|
104
|
+
// stage's outgoing guards. What 审查 requires is declared as completion_guards
|
|
105
|
+
// instead, because a terminal stage has no outgoing edge to carry it.
|
|
77
106
|
{ from: '交付', to: '审查', requires: [] },
|
|
78
107
|
],
|
|
108
|
+
artifacts: [],
|
|
109
|
+
commit: { policy: 'item', message_pattern: '', message_hint: '无格式要求', checkpoints: ['交付'], file_scope: true },
|
|
110
|
+
high_risk_requires_verification: false,
|
|
111
|
+
// 审查 is terminal and IS the review, so there is no outgoing edge to carry
|
|
112
|
+
// the guard. Declaring it here is what makes a blocked review prevent
|
|
113
|
+
// completion; without it the stage could be reached and finished with the
|
|
114
|
+
// review failing, which is what the assessment found.
|
|
115
|
+
completion_guards: ['review_passed'],
|
|
116
|
+
};
|
|
117
|
+
/** One ready-made setup for the agile flow, offered for explicit adoption. */
|
|
118
|
+
const AGILE_RECOMMENDATION = {
|
|
119
|
+
commit: {
|
|
120
|
+
// `item` policy emits two label shapes: `T<n>` mid-flow and `TASK` at the
|
|
121
|
+
// closing checkpoint. The pattern accepts BOTH, so the label the engine hands
|
|
122
|
+
// the model always satisfies the rule that validates it.
|
|
123
|
+
message_pattern: '^【(\\S+)】【(?:TASK|T\\d+)】.+',
|
|
124
|
+
message_hint: '【<task_id>】【TASK/T1】说明 —— 第一段填本任务 id;实施项提交用 T1、T2,收尾提交用 TASK',
|
|
125
|
+
},
|
|
79
126
|
artifacts: [
|
|
80
127
|
{ stage: '需求', id: 'requirement', name: '需求说明', fields: ['scope'] },
|
|
81
128
|
// The 审查 stage binds code-review, whose instructions write this artifact with
|
|
82
|
-
// `record artifact=review`. Declaring it
|
|
83
|
-
//
|
|
84
|
-
//
|
|
129
|
+
// `record artifact=review`. Declaring it keeps that binding executable: the
|
|
130
|
+
// engine refuses an undeclared artifact, so a bound skill pointing at one would
|
|
131
|
+
// be a contract the recommendation made impossible to satisfy.
|
|
85
132
|
{ stage: '审查', id: 'review', name: '评审记录', fields: ['conclusion', 'issues'] },
|
|
86
133
|
],
|
|
87
|
-
commit: {
|
|
88
|
-
// `item` policy emits two label shapes: `T<n>` for a mid-flow item commit and
|
|
89
|
-
// `TASK` for the closing commit at the checkpoint. The pattern below accepts
|
|
90
|
-
// BOTH, so the label the engine hands the model always satisfies the preset's
|
|
91
|
-
// own rule. Previously it accepted only `T\d+` while the checkpoint stage
|
|
92
|
-
// returned `TASK`, which made the closing commit impossible to phrase: the
|
|
93
|
-
// status line and the validator disagreed about the contract.
|
|
94
|
-
policy: 'item',
|
|
95
|
-
message_pattern: '^【(\\S+)】【(?:TASK|T\\d+)】.+',
|
|
96
|
-
message_hint: '【<task_id>】【TASK/T1】说明 —— 第一段填本任务 id;实施项提交用 T1、T2,收尾提交用 TASK',
|
|
97
|
-
checkpoints: ['交付'],
|
|
98
|
-
file_scope: true,
|
|
99
|
-
},
|
|
100
|
-
high_risk_requires_verification: false,
|
|
101
134
|
stage_bindings: {
|
|
102
135
|
'需求': { skills: [bundled('requirement-analysis', 'security-redlines')] },
|
|
103
136
|
'开发': { skills: [bundled('code-implement', 'coding-conventions', 'security-redlines')] },
|
|
@@ -105,7 +138,7 @@ const AGILE = {
|
|
|
105
138
|
'审查': { skills: [bundled('code-review', 'coding-conventions', 'security-redlines')] },
|
|
106
139
|
},
|
|
107
140
|
};
|
|
108
|
-
/** Minimal two-stage flow:
|
|
141
|
+
/** Minimal two-stage flow: the skeleton only. */
|
|
109
142
|
const MINIMAL = {
|
|
110
143
|
stages: ['开发', '交付'],
|
|
111
144
|
start_stage: '开发',
|
|
@@ -113,18 +146,14 @@ const MINIMAL = {
|
|
|
113
146
|
{ from: '开发', to: '交付', requires: ['todos_done'] },
|
|
114
147
|
],
|
|
115
148
|
artifacts: [],
|
|
116
|
-
commit: {
|
|
117
|
-
policy: 'task',
|
|
118
|
-
message_pattern: '',
|
|
119
|
-
message_hint: '无格式要求',
|
|
120
|
-
checkpoints: ['交付'],
|
|
121
|
-
file_scope: false,
|
|
122
|
-
},
|
|
149
|
+
commit: { policy: 'task', message_pattern: '', message_hint: '无格式要求', checkpoints: ['交付'], file_scope: false },
|
|
123
150
|
high_risk_requires_verification: false,
|
|
151
|
+
};
|
|
152
|
+
/** One ready-made setup for the minimal flow, offered for explicit adoption. */
|
|
153
|
+
const MINIMAL_RECOMMENDATION = {
|
|
124
154
|
// A fast-change flow checks each change once, not twice under two headings a
|
|
125
155
|
// short change rarely distinguishes. The item still has to be reviewed — what
|
|
126
|
-
// drops is the duplicated verdict, which is where the weight actually was
|
|
127
|
-
// flow used to carry the same per-item audit burden as the full one.
|
|
156
|
+
// drops is the duplicated verdict, which is where the weight actually was.
|
|
128
157
|
review_depth: 'single',
|
|
129
158
|
stage_bindings: {
|
|
130
159
|
'开发': { skills: [bundled('code-implement', 'coding-conventions', 'security-redlines')] },
|
|
@@ -148,20 +177,27 @@ function deriveCapabilities(config) {
|
|
|
148
177
|
caps.push('file_scope');
|
|
149
178
|
return caps;
|
|
150
179
|
}
|
|
151
|
-
function preset(id, version, label, description, config) {
|
|
152
|
-
return {
|
|
180
|
+
function preset(id, version, label, description, config, recommendation) {
|
|
181
|
+
return {
|
|
182
|
+
id, version, label, description,
|
|
183
|
+
capabilities: deriveCapabilities(config),
|
|
184
|
+
config,
|
|
185
|
+
// exactOptionalPropertyTypes: omit rather than assign undefined.
|
|
186
|
+
...(recommendation !== undefined ? { recommendation } : {}),
|
|
187
|
+
};
|
|
153
188
|
}
|
|
154
189
|
export const FLOW_PRESETS = {
|
|
155
|
-
standard: preset('standard',
|
|
156
|
-
// Version
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
|
|
160
|
-
// Version
|
|
161
|
-
//
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
|
|
190
|
+
standard: preset('standard', 3, '完整研发', '新功能、架构或跨模块改动、高风险任务:需求确认 → 方案确认 → 实现 → 验证 → 审核 → 提交', STANDARD, STANDARD_RECOMMENDATION),
|
|
191
|
+
// Version 4 for agile: 交付 → 审查 now requires review_passed, where it previously
|
|
192
|
+
// required nothing. That is a gate-semantics change, so a task created before it
|
|
193
|
+
// keeps its frozen version 3 config and behaves exactly as it did.
|
|
194
|
+
//
|
|
195
|
+
// Version 3 across all three: the preset is now a bare skeleton and its former
|
|
196
|
+
// built-in bindings, commit rule and artifacts are a separate recommendation a
|
|
197
|
+
// user adopts explicitly. Tasks created before this keep their frozen config and
|
|
198
|
+
// are unaffected; a project's existing config is likewise left exactly as it is.
|
|
199
|
+
agile: preset('agile', 4, '日常迭代', '目标明确的常规功能与缺陷修复:目标与验收 → 实现 → 验收与审查 → 提交', AGILE, AGILE_RECOMMENDATION),
|
|
200
|
+
minimal: preset('minimal', 3, '快速修改', '局部、低风险、方案明确的改动:修改 → 检查与提交,每项一次检查', MINIMAL, MINIMAL_RECOMMENDATION),
|
|
165
201
|
};
|
|
166
202
|
/** Whether `flow` names a built-in workflow. */
|
|
167
203
|
export function isKnownFlow(flow) {
|
|
@@ -190,48 +226,175 @@ function dedupe(names) {
|
|
|
190
226
|
return [...new Set(names)];
|
|
191
227
|
}
|
|
192
228
|
/**
|
|
193
|
-
*
|
|
194
|
-
* a core skill. Skills are appended and de-duplicated by their source-qualified
|
|
195
|
-
* reference, so a project cannot cancel a shipped binding and two same-named
|
|
196
|
-
* skills from different layers stay distinct.
|
|
229
|
+
* Apply a project's own config over a preset skeleton.
|
|
197
230
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
231
|
+
* The project's values are taken as given. There is nothing to merge against any
|
|
232
|
+
* more: the skeleton carries no skills, no commit rule, no artifacts and no
|
|
233
|
+
* review depth, so whatever the user configured IS the configuration. Earlier
|
|
234
|
+
* versions merged a project's skills into the preset's built-in set, which had two
|
|
235
|
+
* consequences this removes — a built-in skill could never be dropped, and an
|
|
236
|
+
* attempt to give a built-in skill a different rule list was discarded because the
|
|
237
|
+
* skill reference already existed.
|
|
202
238
|
*
|
|
203
|
-
* `
|
|
204
|
-
*
|
|
205
|
-
*
|
|
239
|
+
* `stage_bindings` entirely replaces the skeleton's (empty) map; a stage the user
|
|
240
|
+
* omits simply has no bindings, which is a legitimate state rather than a gap to
|
|
241
|
+
* be filled from a recommendation.
|
|
206
242
|
*/
|
|
207
|
-
function
|
|
208
|
-
if (
|
|
243
|
+
function applyProjectConfig(base, project) {
|
|
244
|
+
if (project === undefined)
|
|
209
245
|
return base;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
for (const
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
246
|
+
const next = { ...base };
|
|
247
|
+
if (project.stage_bindings !== undefined) {
|
|
248
|
+
const profiles = { ...(project.skill_profiles ?? {}) };
|
|
249
|
+
const explicitProfiles = new Set(Object.keys(project.skill_profiles ?? {}));
|
|
250
|
+
const problems = [];
|
|
251
|
+
const bindings = {};
|
|
252
|
+
for (const [stage, binding] of Object.entries(project.stage_bindings)) {
|
|
253
|
+
const entry = {};
|
|
254
|
+
if (binding === null || typeof binding !== 'object') {
|
|
255
|
+
problems.push(`stage_bindings "${stage}" must be an object`);
|
|
256
|
+
bindings[stage] = entry;
|
|
219
257
|
continue;
|
|
220
|
-
|
|
221
|
-
skills
|
|
258
|
+
}
|
|
259
|
+
if (binding.skill_refs !== undefined && binding.skills !== undefined) {
|
|
260
|
+
problems.push(`stage_bindings "${stage}" has both skill_refs and legacy skills`);
|
|
261
|
+
}
|
|
262
|
+
if (binding.skill_refs !== undefined) {
|
|
263
|
+
if (!Array.isArray(binding.skill_refs)) {
|
|
264
|
+
problems.push(`stage_bindings "${stage}" skill_refs must be an array`);
|
|
265
|
+
}
|
|
266
|
+
entry.skills = (Array.isArray(binding.skill_refs) ? binding.skill_refs : []).flatMap(ref => {
|
|
267
|
+
if (ref === null || typeof ref !== 'object') {
|
|
268
|
+
problems.push(`stage_bindings "${stage}" has an invalid skill reference`);
|
|
269
|
+
return [];
|
|
270
|
+
}
|
|
271
|
+
const key = formatResourceRef(ref);
|
|
272
|
+
const profile = profiles[key];
|
|
273
|
+
if (profile === undefined) {
|
|
274
|
+
problems.push(`skill profile "${key}" is missing`);
|
|
275
|
+
return [];
|
|
276
|
+
}
|
|
277
|
+
if (profile === null || !Array.isArray(profile.rules)) {
|
|
278
|
+
problems.push(`skill profile "${key}" must declare a rules array`);
|
|
279
|
+
return [];
|
|
280
|
+
}
|
|
281
|
+
return [{ skill: ref, rules: profile.rules, ...(profile.evidence !== undefined ? { evidence: profile.evidence } : {}) }];
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
else if (binding.skills !== undefined) {
|
|
285
|
+
// Read pre-migration inline bindings, then normalize their rule lists to
|
|
286
|
+
// a single profile per skill. Divergent copies cannot be reconciled by
|
|
287
|
+
// guessing which stage should win.
|
|
288
|
+
if (!Array.isArray(binding.skills)) {
|
|
289
|
+
problems.push(`stage_bindings "${stage}" skills must be an array`);
|
|
290
|
+
}
|
|
291
|
+
entry.skills = (Array.isArray(binding.skills) ? binding.skills : []).flatMap(skill => {
|
|
292
|
+
if (skill === null || typeof skill !== 'object' || skill.skill === null || typeof skill.skill !== 'object') {
|
|
293
|
+
problems.push(`stage_bindings "${stage}" has an invalid skill binding`);
|
|
294
|
+
return [];
|
|
295
|
+
}
|
|
296
|
+
const key = formatResourceRef(skill.skill);
|
|
297
|
+
if (explicitProfiles.has(key)) {
|
|
298
|
+
// The project profile is authoritative. Inline methods are a legacy
|
|
299
|
+
// transport shape and may be stale after the skill is edited.
|
|
300
|
+
const profile = profiles[key];
|
|
301
|
+
if (profile === null || !Array.isArray(profile?.rules)) {
|
|
302
|
+
problems.push(`skill profile "${key}" must declare a rules array`);
|
|
303
|
+
return [];
|
|
304
|
+
}
|
|
305
|
+
return [{ skill: skill.skill, rules: profile.rules,
|
|
306
|
+
...(profile.evidence !== undefined ? { evidence: profile.evidence } : {}) }];
|
|
307
|
+
}
|
|
308
|
+
const candidate = { rules: skill.rules ?? [], ...(skill.evidence !== undefined ? { evidence: skill.evidence } : {}) };
|
|
309
|
+
const existing = profiles[key];
|
|
310
|
+
if (existing !== undefined && JSON.stringify(existing) !== JSON.stringify(candidate)) {
|
|
311
|
+
problems.push(`skill "${key}" has different rules or evidence in multiple stages; copy it as a distinct skill`);
|
|
312
|
+
}
|
|
313
|
+
else
|
|
314
|
+
profiles[key] = candidate;
|
|
315
|
+
return [skill];
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
const legacy = dedupe(binding.legacy_rules ?? []);
|
|
319
|
+
if (legacy.length > 0)
|
|
320
|
+
entry.legacy_rules = legacy;
|
|
321
|
+
bindings[stage] = entry;
|
|
222
322
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
if (
|
|
226
|
-
|
|
227
|
-
if (legacy.length > 0)
|
|
228
|
-
binding.legacy_rules = legacy;
|
|
229
|
-
merged[stage] = binding;
|
|
230
|
-
changed = true;
|
|
323
|
+
next.stage_bindings = bindings;
|
|
324
|
+
next.skill_profiles = profiles;
|
|
325
|
+
if (problems.length > 0)
|
|
326
|
+
next.configuration_errors = problems;
|
|
231
327
|
}
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
|
|
328
|
+
else if (project.skill_profiles !== undefined) {
|
|
329
|
+
next.skill_profiles = project.skill_profiles;
|
|
330
|
+
}
|
|
331
|
+
if (project.commit !== undefined)
|
|
332
|
+
next.commit = project.commit;
|
|
333
|
+
if (project.artifacts !== undefined)
|
|
334
|
+
next.artifacts = project.artifacts;
|
|
335
|
+
if (project.review_depth !== undefined)
|
|
336
|
+
next.review_depth = project.review_depth;
|
|
337
|
+
if (project.commit_required !== undefined)
|
|
338
|
+
next.commit_required = project.commit_required;
|
|
339
|
+
return next;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Write a preset's recommendation into a config, for a user who asked for it.
|
|
343
|
+
*
|
|
344
|
+
* This is the ADOPTION step. It is a deliberate, one-time act: the returned config
|
|
345
|
+
* is the user's own from then on, and nothing re-applies or re-merges the
|
|
346
|
+
* recommendation later, so a value the user deletes stays deleted.
|
|
347
|
+
* @param presetId - the preset whose recommendation to adopt.
|
|
348
|
+
* @param current - the user's current config, if any values should be kept.
|
|
349
|
+
* @returns the config with the recommendation applied, or undefined for an unknown preset.
|
|
350
|
+
*/
|
|
351
|
+
export function adoptRecommendation(presetId, current) {
|
|
352
|
+
const preset = FLOW_PRESETS[presetId];
|
|
353
|
+
if (preset === undefined)
|
|
354
|
+
return undefined;
|
|
355
|
+
const rec = preset.recommendation;
|
|
356
|
+
if (rec === undefined)
|
|
357
|
+
return { flow: presetId, ...current };
|
|
358
|
+
// The recommendation supplies a starting point; anything the user already set
|
|
359
|
+
// wins, so adopting never overwrites an existing decision.
|
|
360
|
+
//
|
|
361
|
+
// The commit rule is assembled from BOTH halves, because they live in different
|
|
362
|
+
// places by design: the skeleton owns when a gate fires and whether the scope is
|
|
363
|
+
// protected, the recommendation owns how a message reads. Writing the
|
|
364
|
+
// recommendation's half alone would produce a config with no checkpoints and no
|
|
365
|
+
// scope protection — the flow control would silently disappear on adoption.
|
|
366
|
+
const commit = {
|
|
367
|
+
...preset.config.commit,
|
|
368
|
+
...(rec.commit ?? {}),
|
|
369
|
+
...(current?.commit ?? {}),
|
|
370
|
+
};
|
|
371
|
+
const config = {
|
|
372
|
+
flow: presetId,
|
|
373
|
+
stage_bindings: current?.stage_bindings ?? rec.stage_bindings ?? {},
|
|
374
|
+
...(current?.skill_profiles !== undefined ? { skill_profiles: current.skill_profiles } : {}),
|
|
375
|
+
commit,
|
|
376
|
+
artifacts: current?.artifacts ?? rec.artifacts ?? preset.config.artifacts,
|
|
377
|
+
...(current?.review_depth !== undefined
|
|
378
|
+
? { review_depth: current.review_depth }
|
|
379
|
+
: (rec.review_depth !== undefined ? { review_depth: rec.review_depth } : {})),
|
|
380
|
+
...(current?.commit_required !== undefined ? { commit_required: current.commit_required } : {}),
|
|
381
|
+
};
|
|
382
|
+
return config;
|
|
383
|
+
}
|
|
384
|
+
/** Persist stages as references and each skill's rules exactly once. */
|
|
385
|
+
export function compactProjectConfig(project) {
|
|
386
|
+
const resolved = resolveFlow(project.flow, project);
|
|
387
|
+
if (!resolved.ok)
|
|
388
|
+
return project;
|
|
389
|
+
const profiles = resolved.config.skill_profiles ?? {};
|
|
390
|
+
const bindings = {};
|
|
391
|
+
for (const [stage, binding] of Object.entries(resolved.config.stage_bindings ?? {})) {
|
|
392
|
+
bindings[stage] = {
|
|
393
|
+
skill_refs: (binding.skills ?? []).map(entry => entry.skill),
|
|
394
|
+
...(binding.legacy_rules?.length ? { legacy_rules: binding.legacy_rules } : {}),
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
return { ...project, stage_bindings: bindings, skill_profiles: profiles };
|
|
235
398
|
}
|
|
236
399
|
/**
|
|
237
400
|
* Resolve a preset workflow plus a project's stage-binding additions into the
|
|
@@ -240,13 +403,14 @@ function mergeBindings(base, override) {
|
|
|
240
403
|
* project that names a missing or stale preset stops instead of running the
|
|
241
404
|
* wrong gate.
|
|
242
405
|
* @param flow - workflow id from the project's `.dsh/eng.json`.
|
|
243
|
-
* @param
|
|
406
|
+
* @param project - the project's own config, applied verbatim over the skeleton.
|
|
244
407
|
*/
|
|
245
|
-
export function resolveFlow(flow,
|
|
408
|
+
export function resolveFlow(flow, project) {
|
|
246
409
|
const preset = FLOW_PRESETS[flow];
|
|
247
410
|
if (preset === undefined) {
|
|
248
411
|
return { ok: false, code: 'UNKNOWN_FLOW', flow, knownFlows: Object.keys(FLOW_PRESETS) };
|
|
249
412
|
}
|
|
250
|
-
|
|
413
|
+
const { flow: _ignored, ...rest } = project ?? { flow };
|
|
414
|
+
return { ok: true, config: applyProjectConfig(preset.config, { flow, ...rest }), preset };
|
|
251
415
|
}
|
|
252
416
|
//# sourceMappingURL=workflows.js.map
|
package/lib/workflows.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../src/workflows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAU/C;;;;;;;;;GASG;AACH,SAAS,OAAO,CAAC,KAAa,EAAE,GA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,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;AAC3F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godv61/dsh-task-engine",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.26.0",
|
|
4
|
+
"description": "Workflow engine for DeepSeek Harness: a `dev_task` tool that hard-gates stage transitions and commit scope/message, per-node skill bindings with progressive disclosure, and a workbench to configure flows and mount skills. A preset is a flow SKELETON — state control only — and one reasonable engineering setup is offered separately for explicit adoption; which skills run, which rules they follow and what a commit message must look like stay the user's decisions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"docs/**",
|
|
38
38
|
"README.md",
|
|
39
39
|
".p0-test.mjs",
|
|
40
|
+
".acceptance.mjs",
|
|
41
|
+
".hook-consistency.mjs",
|
|
40
42
|
".resource-test.mjs",
|
|
41
43
|
".workflow-test.mjs",
|
|
42
44
|
".hook-test.mjs",
|
|
@@ -45,8 +47,10 @@
|
|
|
45
47
|
".e2e-presets.mjs",
|
|
46
48
|
".revision-test.mjs",
|
|
47
49
|
".freeze-test.mjs",
|
|
48
|
-
".
|
|
49
|
-
".
|
|
50
|
+
".enforce-test.mjs",
|
|
51
|
+
".evidence-test.mjs",
|
|
52
|
+
".roundtrip-test.mjs",
|
|
53
|
+
".filter-test.mjs"
|
|
50
54
|
],
|
|
51
55
|
"license": "MIT",
|
|
52
56
|
"publishConfig": {
|
|
@@ -67,7 +71,7 @@
|
|
|
67
71
|
"scripts": {
|
|
68
72
|
"build": "tsc -p tsconfig.json && node build-client.mjs && node build-hook.mjs",
|
|
69
73
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
|
|
70
|
-
"test": "node .p0-test.mjs && node .acceptance.mjs && node .hook-consistency.mjs && node --test .resource-test.mjs .workflow-test.mjs .hook-test.mjs .preset-test.mjs .assessment-batch1.mjs .e2e-presets.mjs .revision-test.mjs .freeze-test.mjs",
|
|
74
|
+
"test": "node .p0-test.mjs && node .acceptance.mjs && node .hook-consistency.mjs && node --test .resource-test.mjs .workflow-test.mjs .hook-test.mjs .preset-test.mjs .assessment-batch1.mjs .e2e-presets.mjs .revision-test.mjs .freeze-test.mjs .enforce-test.mjs .evidence-test.mjs .roundtrip-test.mjs .filter-test.mjs",
|
|
71
75
|
"verify:package": "node scripts/verify-package.mjs",
|
|
72
76
|
"verify:dsh": "node scripts/verify-dsh-compat.mjs",
|
|
73
77
|
"prepare": "npm run build"
|
package/preset/agent.cordis.yml
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
# dsh-task-engine — agent-plane opt-in fragment.
|
|
2
|
-
#
|
|
3
|
-
# Copy these two rows into a preset's `agent.cordis.yml` to activate the
|
|
4
|
-
# engineering-delivery flow for that preset's sessions. Start from a copy of
|
|
5
|
-
# `standard`, then REPLACE its `persona` row with the one below and ADD the
|
|
6
|
-
# `task-engine-agent` row. (The bundle must also be installed via
|
|
7
|
-
# `dsh plugin add @godv61/dsh-task-engine` so the engine and workbench exist.)
|
|
8
|
-
#
|
|
9
|
-
# `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
|
|
10
|
-
|
|
11
|
-
- id: persona
|
|
12
|
-
name: '@deepseek-ai/dsh-persona'
|
|
13
|
-
config:
|
|
14
|
-
text: |-
|
|
15
|
-
You are an engineering-delivery coding agent, powered by the {{model}} model, running on DeepSeek Harness. Your working directory is {{cwd}}.
|
|
16
|
-
|
|
17
|
-
本仓库采用工程化交付流程,由 `dev_task` 工具硬性持有任务状态机:需求评审 → 设计 → 开发 → 交付 → 代码审核。阶段、流转门槛、提交格式都来自项目根 `.dsh/eng.json`(没有该文件则用内置默认)。任何开发类请求开始前,先加载 `eng-delivery` 技能。
|
|
18
|
-
|
|
19
|
-
铁律:一切阶段流转、确认、验证、评审和提交都必须通过 `dev_task`——它拒绝时是硬事实,必须修正前置条件,禁止绕过。只做任务范围内的本地提交;绝不 push、合并、创建 PR、执行数据库、操作 Jenkins、部署或发布。
|
|
20
|
-
|
|
21
|
-
- id: task-engine-agent
|
|
1
|
+
# dsh-task-engine — agent-plane opt-in fragment.
|
|
2
|
+
#
|
|
3
|
+
# Copy these two rows into a preset's `agent.cordis.yml` to activate the
|
|
4
|
+
# engineering-delivery flow for that preset's sessions. Start from a copy of
|
|
5
|
+
# `standard`, then REPLACE its `persona` row with the one below and ADD the
|
|
6
|
+
# `task-engine-agent` row. (The bundle must also be installed via
|
|
7
|
+
# `dsh plugin add @godv61/dsh-task-engine` so the engine and workbench exist.)
|
|
8
|
+
#
|
|
9
|
+
# `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
|
|
10
|
+
|
|
11
|
+
- id: persona
|
|
12
|
+
name: '@deepseek-ai/dsh-persona'
|
|
13
|
+
config:
|
|
14
|
+
text: |-
|
|
15
|
+
You are an engineering-delivery coding agent, powered by the {{model}} model, running on DeepSeek Harness. Your working directory is {{cwd}}.
|
|
16
|
+
|
|
17
|
+
本仓库采用工程化交付流程,由 `dev_task` 工具硬性持有任务状态机:需求评审 → 设计 → 开发 → 交付 → 代码审核。阶段、流转门槛、提交格式都来自项目根 `.dsh/eng.json`(没有该文件则用内置默认)。任何开发类请求开始前,先加载 `eng-delivery` 技能。
|
|
18
|
+
|
|
19
|
+
铁律:一切阶段流转、确认、验证、评审和提交都必须通过 `dev_task`——它拒绝时是硬事实,必须修正前置条件,禁止绕过。只做任务范围内的本地提交;绝不 push、合并、创建 PR、执行数据库、操作 Jenkins、部署或发布。
|
|
20
|
+
|
|
21
|
+
- id: task-engine-agent
|
|
22
22
|
name: '@godv61/dsh-task-engine/agent'
|