@godv61/dsh-task-engine 0.23.8 → 0.24.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 +89 -0
- package/.assessment-batch1.mjs +403 -0
- package/.e2e-presets.mjs +195 -0
- package/.freeze-test.mjs +90 -0
- package/.hook-consistency.mjs +60 -0
- package/.p0-test.mjs +11 -4
- package/.preset-test.mjs +2 -2
- package/.revision-test.mjs +99 -0
- package/.workflow-test.mjs +64 -62
- package/defaults/eng.json +45 -6
- package/docs/BRIEF-FOR-REVIEW.md +163 -0
- package/docs/CHANGELOG.md +72 -0
- package/docs/configuration.md +31 -6
- package/hooks/commit-msg +104 -25
- package/lib/client.js +227 -106
- package/lib/client.js.map +2 -3
- package/lib/controller.d.ts +9 -0
- package/lib/controller.js +37 -3
- package/lib/controller.js.map +1 -1
- package/lib/dev-task.js +285 -43
- package/lib/dev-task.js.map +1 -1
- package/lib/engine.d.ts +278 -6
- package/lib/engine.js +264 -13
- package/lib/engine.js.map +1 -1
- package/lib/seed-preset.d.ts +5 -5
- package/lib/seed-preset.js +5 -5
- package/lib/skill-audit.js +5 -1
- package/lib/skill-audit.js.map +1 -1
- package/lib/workflows.js +87 -27
- package/lib/workflows.js.map +1 -1
- package/package.json +9 -3
- package/scripts/verify-package.mjs +3 -3
package/lib/workflows.js
CHANGED
|
@@ -9,11 +9,26 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module dsh-task-engine/workflows
|
|
11
11
|
*/
|
|
12
|
+
import { formatResourceRef } from "./engine.js";
|
|
13
|
+
/**
|
|
14
|
+
* Build one skill binding from a bare name plus its bundled rules.
|
|
15
|
+
*
|
|
16
|
+
* The preset's own bindings are all bundled resources, so the `bundled:` prefix
|
|
17
|
+
* is applied here rather than repeated at every call site. Project and user
|
|
18
|
+
* resources enter through a project's config, where their source is explicit.
|
|
19
|
+
* @param skill - the bundled skill name.
|
|
20
|
+
* @param rules - bundled rule names that belong to this skill.
|
|
21
|
+
* @returns the binding.
|
|
22
|
+
*/
|
|
23
|
+
function bundled(skill, ...rules) {
|
|
24
|
+
const ref = (name) => ({ source: 'bundled', name });
|
|
25
|
+
return { skill: ref(skill), rules: rules.map(ref) };
|
|
26
|
+
}
|
|
12
27
|
/** The selectable preset workflows (shown in the workbench flow picker). */
|
|
13
28
|
export const FLOW_OPTIONS = [
|
|
14
|
-
{ id: 'standard', label: '
|
|
15
|
-
{ id: 'agile', label: '
|
|
16
|
-
{ id: 'minimal', label: '
|
|
29
|
+
{ id: 'standard', label: '完整研发', description: '新功能、架构或跨模块改动、高风险任务:需求确认 → 方案确认 → 实现 → 验证 → 审核 → 提交' },
|
|
30
|
+
{ id: 'agile', label: '日常迭代', description: '目标明确的常规功能与缺陷修复:目标与验收 → 实现 → 验收与审查 → 提交' },
|
|
31
|
+
{ id: 'minimal', label: '快速修改', description: '局部、低风险、方案明确的改动:修改 → 检查与提交' },
|
|
17
32
|
];
|
|
18
33
|
/** Standard review-gated delivery: the default workflow. */
|
|
19
34
|
const STANDARD = {
|
|
@@ -40,11 +55,16 @@ const STANDARD = {
|
|
|
40
55
|
},
|
|
41
56
|
high_risk_requires_verification: true,
|
|
42
57
|
stage_bindings: {
|
|
43
|
-
'需求评审': { skills: ['requirement-analysis'
|
|
44
|
-
'设计': { skills: ['solution-design'] },
|
|
45
|
-
'开发': { skills: ['code-implement'
|
|
46
|
-
'交付': { skills: ['code-verify']
|
|
47
|
-
'代码审核': {
|
|
58
|
+
'需求评审': { skills: [bundled('requirement-analysis', 'security-redlines')] },
|
|
59
|
+
'设计': { skills: [bundled('solution-design')] },
|
|
60
|
+
'开发': { skills: [bundled('code-implement', 'coding-conventions', 'security-redlines')] },
|
|
61
|
+
'交付': { skills: [bundled('code-verify')] },
|
|
62
|
+
'代码审核': {
|
|
63
|
+
skills: [
|
|
64
|
+
bundled('code-review', 'coding-conventions', 'security-redlines'),
|
|
65
|
+
bundled('code-commit', 'commit-conventions'),
|
|
66
|
+
],
|
|
67
|
+
},
|
|
48
68
|
},
|
|
49
69
|
};
|
|
50
70
|
/** Lighter four-stage flow with few artifacts, for fast-moving projects. */
|
|
@@ -58,20 +78,31 @@ const AGILE = {
|
|
|
58
78
|
],
|
|
59
79
|
artifacts: [
|
|
60
80
|
{ stage: '需求', id: 'requirement', name: '需求说明', fields: ['scope'] },
|
|
81
|
+
// The 审查 stage binds code-review, whose instructions write this artifact with
|
|
82
|
+
// `record artifact=review`. Declaring it here keeps that binding executable:
|
|
83
|
+
// the engine refuses an undeclared artifact, so a bound skill pointing at one
|
|
84
|
+
// would be a contract the preset itself made impossible to satisfy.
|
|
85
|
+
{ stage: '审查', id: 'review', name: '评审记录', fields: ['conclusion', 'issues'] },
|
|
61
86
|
],
|
|
62
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.
|
|
63
94
|
policy: 'item',
|
|
64
|
-
message_pattern: '^【(\\S+)】【T\\d
|
|
65
|
-
message_hint: '【<task_id>】【T1】说明 —— 第一段填本任务 id',
|
|
95
|
+
message_pattern: '^【(\\S+)】【(?:TASK|T\\d+)】.+',
|
|
96
|
+
message_hint: '【<task_id>】【TASK/T1】说明 —— 第一段填本任务 id;实施项提交用 T1、T2,收尾提交用 TASK',
|
|
66
97
|
checkpoints: ['交付'],
|
|
67
98
|
file_scope: true,
|
|
68
99
|
},
|
|
69
100
|
high_risk_requires_verification: false,
|
|
70
101
|
stage_bindings: {
|
|
71
|
-
'需求': { skills: ['requirement-analysis'] },
|
|
72
|
-
'开发': { skills: ['code-implement'
|
|
73
|
-
'交付': { skills: ['code-verify', 'code-commit'
|
|
74
|
-
'审查': { skills: ['code-review'] },
|
|
102
|
+
'需求': { skills: [bundled('requirement-analysis', 'security-redlines')] },
|
|
103
|
+
'开发': { skills: [bundled('code-implement', 'coding-conventions', 'security-redlines')] },
|
|
104
|
+
'交付': { skills: [bundled('code-verify'), bundled('code-commit', 'commit-conventions')] },
|
|
105
|
+
'审查': { skills: [bundled('code-review', 'coding-conventions', 'security-redlines')] },
|
|
75
106
|
},
|
|
76
107
|
};
|
|
77
108
|
/** Minimal two-stage flow: only a commit gate, no artifact doors. */
|
|
@@ -90,9 +121,14 @@ const MINIMAL = {
|
|
|
90
121
|
file_scope: false,
|
|
91
122
|
},
|
|
92
123
|
high_risk_requires_verification: false,
|
|
124
|
+
// A fast-change flow checks each change once, not twice under two headings a
|
|
125
|
+
// 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: this
|
|
127
|
+
// flow used to carry the same per-item audit burden as the full one.
|
|
128
|
+
review_depth: 'single',
|
|
93
129
|
stage_bindings: {
|
|
94
|
-
'开发': { skills: ['code-implement'] },
|
|
95
|
-
'交付': { skills: ['code-commit'
|
|
130
|
+
'开发': { skills: [bundled('code-implement', 'coding-conventions', 'security-redlines')] },
|
|
131
|
+
'交付': { skills: [bundled('code-commit', 'commit-conventions')] },
|
|
96
132
|
},
|
|
97
133
|
};
|
|
98
134
|
/**
|
|
@@ -116,9 +152,16 @@ function preset(id, version, label, description, config) {
|
|
|
116
152
|
return { id, version, label, description, capabilities: deriveCapabilities(config), config };
|
|
117
153
|
}
|
|
118
154
|
export const FLOW_PRESETS = {
|
|
119
|
-
standard: preset('standard', 2, '
|
|
120
|
-
|
|
121
|
-
|
|
155
|
+
standard: preset('standard', 2, '完整研发', '新功能、架构或跨模块改动、高风险任务:需求确认 → 方案确认 → 实现 → 验证 → 审核 → 提交', STANDARD),
|
|
156
|
+
// Version 2: the closing-commit label shape was unified with the message pattern,
|
|
157
|
+
// and the `review` artifact the bound code-review skill writes was declared. Tasks
|
|
158
|
+
// created before this keep their frozen version 1 config and are unaffected.
|
|
159
|
+
agile: preset('agile', 2, '日常迭代', '目标明确的常规功能与缺陷修复:目标与验收 → 实现 → 验收与审查 → 提交', AGILE),
|
|
160
|
+
// Version 2: per-item review depth is declared as `single` instead of inheriting
|
|
161
|
+
// the full flow's two verdicts per item. Tasks created before this keep their
|
|
162
|
+
// frozen version 1 config, which has no `review_depth` and therefore reads as
|
|
163
|
+
// two-stage exactly as it behaved.
|
|
164
|
+
minimal: preset('minimal', 2, '快速修改', '局部、低风险、方案明确的改动:修改 → 检查与提交,每项一次检查', MINIMAL),
|
|
122
165
|
};
|
|
123
166
|
/** Whether `flow` names a built-in workflow. */
|
|
124
167
|
export function isKnownFlow(flow) {
|
|
@@ -147,10 +190,19 @@ function dedupe(names) {
|
|
|
147
190
|
return [...new Set(names)];
|
|
148
191
|
}
|
|
149
192
|
/**
|
|
150
|
-
* Merge a project's stage
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
193
|
+
* Merge a project's stage bindings into a preset's defaults without ever removing
|
|
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.
|
|
197
|
+
*
|
|
198
|
+
* Rules are NOT merged here. A rule belongs to the skill that carries it, so a
|
|
199
|
+
* project wanting a skill under a different rule set supplies its own skill
|
|
200
|
+
* binding whose `rules` list is used as given. There is no stage-level rule list
|
|
201
|
+
* to merge into and no override layer to compute — the skill's list is the answer.
|
|
202
|
+
*
|
|
203
|
+
* `legacy_rules` from a project pass through untouched: they are the stage-level
|
|
204
|
+
* rules of a pre-migration config, still enforced, awaiting a human decision
|
|
205
|
+
* about which skill owns them.
|
|
154
206
|
*/
|
|
155
207
|
function mergeBindings(base, override) {
|
|
156
208
|
if (override === undefined)
|
|
@@ -159,13 +211,21 @@ function mergeBindings(base, override) {
|
|
|
159
211
|
const merged = { ...base.stage_bindings };
|
|
160
212
|
for (const [stage, addition] of Object.entries(override)) {
|
|
161
213
|
const existing = merged[stage];
|
|
162
|
-
const skills =
|
|
163
|
-
const
|
|
214
|
+
const skills = [...(existing?.skills ?? [])];
|
|
215
|
+
const seen = new Set(skills.map(skill => formatResourceRef(skill.skill)));
|
|
216
|
+
for (const skill of addition.skills ?? []) {
|
|
217
|
+
const key = formatResourceRef(skill.skill);
|
|
218
|
+
if (seen.has(key))
|
|
219
|
+
continue;
|
|
220
|
+
seen.add(key);
|
|
221
|
+
skills.push(skill);
|
|
222
|
+
}
|
|
223
|
+
const legacy = dedupe([...(existing?.legacy_rules ?? []), ...(addition.legacy_rules ?? [])]);
|
|
164
224
|
const binding = {};
|
|
165
225
|
if (skills.length > 0)
|
|
166
226
|
binding.skills = skills;
|
|
167
|
-
if (
|
|
168
|
-
binding.
|
|
227
|
+
if (legacy.length > 0)
|
|
228
|
+
binding.legacy_rules = legacy;
|
|
169
229
|
merged[stage] = binding;
|
|
170
230
|
changed = true;
|
|
171
231
|
}
|
package/lib/workflows.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../src/workflows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
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,GAAG,KAAe;IAChD,MAAM,GAAG,GAAG,CAAC,IAAY,EAAe,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACxE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAA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|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Preset-workflow engineering delivery engine for DeepSeek Harness: a `dev_task` tool that hard-gates stage transitions and commit scope/message, per-node skill/rule bindings with progressive disclosure, a workbench to pick a flow preset and mount skills/rules, and preset-scoped activation — the tool and skills activate only for sessions on a preset that names the agent row.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -40,7 +40,13 @@
|
|
|
40
40
|
".resource-test.mjs",
|
|
41
41
|
".workflow-test.mjs",
|
|
42
42
|
".hook-test.mjs",
|
|
43
|
-
".preset-test.mjs"
|
|
43
|
+
".preset-test.mjs",
|
|
44
|
+
".assessment-batch1.mjs",
|
|
45
|
+
".e2e-presets.mjs",
|
|
46
|
+
".revision-test.mjs",
|
|
47
|
+
".freeze-test.mjs",
|
|
48
|
+
".acceptance.mjs",
|
|
49
|
+
".hook-consistency.mjs"
|
|
44
50
|
],
|
|
45
51
|
"license": "MIT",
|
|
46
52
|
"publishConfig": {
|
|
@@ -61,7 +67,7 @@
|
|
|
61
67
|
"scripts": {
|
|
62
68
|
"build": "tsc -p tsconfig.json && node build-client.mjs && node build-hook.mjs",
|
|
63
69
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
|
|
64
|
-
"test": "node .p0-test.mjs && node --test .resource-test.mjs .workflow-test.mjs .hook-test.mjs .preset-test.mjs",
|
|
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",
|
|
65
71
|
"verify:package": "node scripts/verify-package.mjs",
|
|
66
72
|
"verify:dsh": "node scripts/verify-dsh-compat.mjs",
|
|
67
73
|
"prepare": "npm run build"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Black-box verification of the npm tarball before publishing: packs the
|
|
3
3
|
* package, extracts it into a clean temp dir, and proves the published entry
|
|
4
|
-
* points actually work
|
|
4
|
+
* points actually work —main import, browser client registration, the bundled
|
|
5
5
|
* `.p0-test.mjs`, the CLI, and the `files` whitelist.
|
|
6
6
|
*
|
|
7
7
|
* Run: `npm run verify:package`
|
|
@@ -42,7 +42,7 @@ const listing = execSync(`tar -tzf "${tgzPath}"`, { encoding: 'utf8' })
|
|
|
42
42
|
check('extract', existsSync(join(pkgDir, 'package.json')))
|
|
43
43
|
|
|
44
44
|
// 3. files whitelist sanity
|
|
45
|
-
for (const required of ['hooks/commit-msg', 'lib/index.js', 'lib/client.js', 'lib/client.d.ts', '.p0-test.mjs', 'preset/enable.mjs', 'README.md', '.resource-test.mjs', '.workflow-test.mjs', '.hook-test.mjs', '.preset-test.mjs']) {
|
|
45
|
+
for (const required of ['hooks/commit-msg', 'lib/index.js', 'lib/client.js', 'lib/client.d.ts', '.p0-test.mjs', 'preset/enable.mjs', 'README.md', '.resource-test.mjs', '.workflow-test.mjs', '.hook-test.mjs', '.preset-test.mjs', '.assessment-batch1.mjs', '.e2e-presets.mjs', '.revision-test.mjs', '.freeze-test.mjs', '.acceptance.mjs', '.hook-consistency.mjs']) {
|
|
46
46
|
check(`tarball contains ${required}`, listing.includes(required))
|
|
47
47
|
}
|
|
48
48
|
check('tarball excludes src sources', !listing.some(line => line.startsWith('src/')))
|
|
@@ -51,7 +51,7 @@ check('tarball excludes build scripts', !listing.some(line => line.endsWith('bui
|
|
|
51
51
|
// Every `node <file>` script the manifest declares must actually ship, EXCEPT
|
|
52
52
|
// the build-time ones that `prepare` needs in the source tree only. A script
|
|
53
53
|
// whose target is absent from `files` installs fine and then dies with
|
|
54
|
-
// MODULE_NOT_FOUND
|
|
54
|
+
// MODULE_NOT_FOUND —which is exactly what verify:package and verify:dsh did
|
|
55
55
|
// until this assertion existed, because neither scripts/ path was published.
|
|
56
56
|
{
|
|
57
57
|
const manifest = JSON.parse(readFileSync(join(pkgRoot, 'package.json'), 'utf8'))
|