flow-comet 1.6.4 → 1.7.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/.flow-comet/skills/flow-comet/INSTALLED_VERSION +1 -1
- package/.flow-comet/skills/flow-comet/SKILL.md +36 -6
- package/.flow-comet/skills/flow-comet/reference/artifact-template-overlay.md +154 -0
- package/.flow-comet/skills/flow-comet/reference/artifact-templates.json +387 -0
- package/.flow-comet/skills/flow-comet/reference/commit-discipline.md +1 -1
- package/.flow-comet/skills/flow-comet/reference/entry-detail.md +29 -4
- package/.flow-comet/skills/flow-comet/reference/workflow-protocol.json +22 -0
- package/.flow-comet/skills/flow-comet/scripts/context-init.mjs +26 -23
- package/.flow-comet/skills/flow-comet/scripts/evolve.mjs +174 -0
- package/.flow-comet/skills/flow-comet/scripts/guard-self-test.mjs +17 -95
- package/.flow-comet/skills/flow-comet/scripts/health.mjs +28 -4
- package/.flow-comet/skills/flow-comet/scripts/items/a.mjs +136 -19
- package/.flow-comet/skills/flow-comet/scripts/items/b.mjs +54 -18
- package/.flow-comet/skills/flow-comet/scripts/items/c.mjs +6 -6
- package/.flow-comet/skills/flow-comet/scripts/items/e.mjs +52 -10
- package/.flow-comet/skills/flow-comet/scripts/items/h.mjs +25 -10
- package/.flow-comet/skills/flow-comet/scripts/items/l.mjs +4 -2
- package/.flow-comet/skills/flow-comet/scripts/items/m.mjs +21 -13
- package/.flow-comet/skills/flow-comet/scripts/items/n.mjs +163 -0
- package/.flow-comet/skills/flow-comet/scripts/lib/ac-coverage.mjs +317 -0
- package/.flow-comet/skills/flow-comet/scripts/lib/guard-artifact-skeleton.mjs +448 -0
- package/.flow-comet/skills/flow-comet/scripts/lib/guard-evidence-gates.mjs +396 -27
- package/.flow-comet/skills/flow-comet/scripts/lib/guard-gates.mjs +1035 -172
- package/.flow-comet/skills/flow-comet/scripts/lib/guard-routing.mjs +129 -98
- package/.flow-comet/skills/flow-comet/scripts/lib/guard-state-io.mjs +8 -6
- package/.flow-comet/skills/flow-comet/scripts/lib/guard-template-fidelity.mjs +797 -232
- package/.flow-comet/skills/flow-comet/scripts/lib/guard-uidesign.mjs +91 -22
- package/.flow-comet/skills/flow-comet/scripts/lib/lessons-hits.mjs +160 -0
- package/.flow-comet/skills/flow-comet/scripts/lib/run-root.mjs +21 -0
- package/.flow-comet/skills/flow-comet/scripts/lib/section-body.mjs +92 -0
- package/.flow-comet/skills/flow-comet/scripts/lib/state-commands-admin.mjs +69 -13
- package/.flow-comet/skills/flow-comet/scripts/lib/state-commands-flow.mjs +454 -135
- package/.flow-comet/skills/flow-comet/scripts/lib/state-commands-recovery.mjs +66 -0
- package/.flow-comet/skills/flow-comet/scripts/lib/state-explain.mjs +109 -13
- package/.flow-comet/skills/flow-comet/scripts/lib/state-io.mjs +55 -2
- package/.flow-comet/skills/flow-comet/scripts/lib/state-skillmarkers.mjs +149 -34
- package/.flow-comet/skills/flow-comet/scripts/lib/system-fixtures.mjs +79 -9
- package/.flow-comet/skills/flow-comet/scripts/lib/task-graph.mjs +84 -31
- package/.flow-comet/skills/flow-comet/scripts/lib/test-fixtures.mjs +78 -8
- package/.flow-comet/skills/flow-comet/scripts/lib/test-helpers.mjs +60 -3
- package/.flow-comet/skills/flow-comet/scripts/lib/text-anchor-checks.mjs +167 -3
- package/.flow-comet/skills/flow-comet/scripts/lib/wave-projection.mjs +341 -0
- package/.flow-comet/skills/flow-comet/scripts/protocol-utils.mjs +287 -0
- package/.flow-comet/skills/flow-comet/scripts/scenarios/a.mjs +1454 -16
- package/.flow-comet/skills/flow-comet/scripts/scenarios/b.mjs +1202 -8
- package/.flow-comet/skills/flow-comet/scripts/scenarios/c.mjs +1205 -77
- package/.flow-comet/skills/flow-comet/scripts/scenarios/d.mjs +753 -5
- package/.flow-comet/skills/flow-comet/scripts/scenarios/e.mjs +52 -11
- package/.flow-comet/skills/flow-comet/scripts/scenarios/f.mjs +582 -3
- package/.flow-comet/skills/flow-comet/scripts/scenarios/g.mjs +9 -1
- package/.flow-comet/skills/flow-comet/scripts/scenarios/i.mjs +5 -0
- package/.flow-comet/skills/flow-comet/scripts/scenarios/j.mjs +22 -6
- package/.flow-comet/skills/flow-comet/scripts/scenarios/k.mjs +2 -0
- package/.flow-comet/skills/flow-comet/scripts/scenarios/l.mjs +18 -5
- package/.flow-comet/skills/flow-comet/scripts/scenarios/n.mjs +4100 -0
- package/.flow-comet/skills/flow-comet/scripts/state-schema.mjs +135 -0
- package/.flow-comet/skills/flow-comet/scripts/system-test.mjs +6 -5
- package/.flow-comet/skills/flow-comet/scripts/workflow-guard.mjs +203 -4
- package/.flow-comet/skills/flow-comet/scripts/workflow-handoff.mjs +312 -63
- package/.flow-comet/skills/flow-comet/scripts/workflow-state.mjs +5 -2
- package/.flow-comet/skills/flow-comet-archive/SKILL.md +6 -2
- package/.flow-comet/skills/flow-comet-change/SKILL.md +6 -2
- package/.flow-comet/skills/flow-comet-design/GUIDANCE.md +13 -3
- package/.flow-comet/skills/flow-comet-design/SKILL.md +15 -8
- package/.flow-comet/skills/flow-comet-dev/SKILL.md +1 -1
- package/.flow-comet/skills/flow-comet-evolve/SKILL.md +1 -0
- package/.flow-comet/skills/flow-comet-execute/SKILL.md +42 -15
- package/.flow-comet/skills/flow-comet-health/SKILL.md +1 -1
- package/.flow-comet/skills/flow-comet-integration/SKILL.md +1 -1
- package/.flow-comet/skills/flow-comet-open/GUIDANCE.md +14 -4
- package/.flow-comet/skills/flow-comet-open/SKILL.md +11 -9
- package/.flow-comet/skills/flow-comet-plan/GUIDANCE.md +13 -3
- package/.flow-comet/skills/flow-comet-plan/SKILL.md +21 -10
- package/.flow-comet/skills/flow-comet-requirement/SKILL.md +1 -1
- package/.flow-comet/skills/flow-comet-review/SKILL.md +33 -18
- package/.flow-comet/skills/flow-comet-subagent-execute/GUIDANCE.md +13 -3
- package/.flow-comet/skills/flow-comet-subagent-execute/SKILL.md +44 -16
- package/.flow-comet/skills/flow-comet-task/SKILL.md +3 -2
- package/.flow-comet/skills/flow-comet-test/SKILL.md +6 -2
- package/.flow-comet/skills/flow-comet-ui-design/SKILL.md +2 -2
- package/.flow-comet/skills/flow-comet-verify/SKILL.md +12 -8
- package/README.md +3 -3
- package/package.json +1 -1
- package/scripts/dsh-bridge.mjs +2 -2
- package/scripts/lib/installer-flowkit.mjs +43 -3
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
summaryContent,
|
|
36
36
|
writeBridgeFixture,
|
|
37
37
|
writeIntakeArtifacts,
|
|
38
|
+
writeNodeDeclarationMarkers,
|
|
38
39
|
} from '../lib/test-fixtures.mjs';
|
|
39
40
|
import {
|
|
40
41
|
assertInstalledCopyBridgeVersionCase,
|
|
@@ -1002,6 +1003,7 @@ export const ENTRIES = [
|
|
|
1002
1003
|
};
|
|
1003
1004
|
st.newChange = true;
|
|
1004
1005
|
writeState(dir, st);
|
|
1006
|
+
writeNodeDeclarationMarkers(dir, 'plan');
|
|
1005
1007
|
// ① record 后未 exit 先 next:不把 currentNode 提前校正到 subagent-execute(路由后继)
|
|
1006
1008
|
const r1 = runStateWithProtocol(dir, ['next']);
|
|
1007
1009
|
assertExit(r1, 0);
|
|
@@ -1042,7 +1044,10 @@ export const ENTRIES = [
|
|
|
1042
1044
|
'## verify 输出\n\n```\nnode --check src/t1.mjs\n```',
|
|
1043
1045
|
'## 6 维自查\n\n- 功能: 通过(brooks-review 已跑)\n- 性能: 无影响\n- 安全: 无影响\n- 兼容: 通过\n- 可观测: 通过\n- 可维护: 通过',
|
|
1044
1046
|
'## 越界检查\n\n仅修改 src/t1.mjs,无越界。',
|
|
1045
|
-
'## 自检方法\n\nbrooks-review',
|
|
1047
|
+
'## 自检方法\n\nbrooks-review',
|
|
1048
|
+
// LESSONS 扫描 = 登记的必填增量段(位于自检方法之后或文末):缺它会被增量段门禁拦下,
|
|
1049
|
+
// 掩盖本场景被测的漂移容忍判据。
|
|
1050
|
+
'## LESSONS 扫描\n\n无 active 条目命中(夹具)。', '',
|
|
1046
1051
|
].join('\n'));
|
|
1047
1052
|
// 漂移态:completedNodes=[open,design,plan](execute 未 completed——欠账),currentNode=review
|
|
1048
1053
|
// (路由已越过 execute——execute 证据/产物齐);evidence.execute + enteredNodes 含 execute(防 R2 拦)
|
|
@@ -1057,6 +1062,7 @@ export const ENTRIES = [
|
|
|
1057
1062
|
};
|
|
1058
1063
|
st.newChange = true;
|
|
1059
1064
|
writeState(dir, st);
|
|
1065
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
1060
1066
|
const res = runGuard(['exit', 'execute', '--apply'], dir);
|
|
1061
1067
|
assertExit(res, 0);
|
|
1062
1068
|
assertNotOut(res, 'BLOCKED: currentNode');
|
|
@@ -1162,6 +1168,7 @@ export const ENTRIES = [
|
|
|
1162
1168
|
st.directOverrideSource = 'execution-mode';
|
|
1163
1169
|
st.newChange = true;
|
|
1164
1170
|
writeState(dir, st);
|
|
1171
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
1165
1172
|
writeFile(dir, '.specs/' + CHANGE_ID + '/TASK.md', '# TASK\n\n' +
|
|
1166
1173
|
'<task id="S01" status="done"><action>实现 S01</action><write_files>src/s1.mjs</write_files><verify>node --check src/s1.mjs</verify></task>\n');
|
|
1167
1174
|
writeFile(dir, '.specs/' + CHANGE_ID + '/S01-SUMMARY.md', strictSummary('S01'));
|
|
@@ -1251,6 +1258,7 @@ export const ENTRIES = [
|
|
|
1251
1258
|
st1.executionMode = 'direct';
|
|
1252
1259
|
st1.directOverride = true;
|
|
1253
1260
|
writeState(dir, st1);
|
|
1261
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
1254
1262
|
writeTask();
|
|
1255
1263
|
const rBlock = runGuard(['exit', 'execute', '--apply'], dir);
|
|
1256
1264
|
assertExit(rBlock, 1);
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
scriptTreeFiles,
|
|
23
23
|
strictSummary,
|
|
24
24
|
writeIntakeArtifacts,
|
|
25
|
+
writeNodeDeclarationMarkers,
|
|
25
26
|
} from '../lib/test-fixtures.mjs';
|
|
26
27
|
import {
|
|
27
28
|
FIX_RETURN_FAMILY_COMPLETED,
|
|
@@ -1281,6 +1282,8 @@ export const ENTRIES = [
|
|
|
1281
1282
|
directOverride: false,
|
|
1282
1283
|
newChange: true,
|
|
1283
1284
|
});
|
|
1285
|
+
// 声明标记:真实流程里由协调者 / record 写;夹具直接写 state,须补同一份事实(否则先撞覆盖门)
|
|
1286
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
1284
1287
|
const res = runGuard(['exit', 'execute', '--apply'], dir);
|
|
1285
1288
|
assertExit(res, 0);
|
|
1286
1289
|
assertOut(res, 'FIX-BATCH: 回源节点 review(execute 出口已完成)');
|
|
@@ -1343,6 +1346,8 @@ export const ENTRIES = [
|
|
|
1343
1346
|
},
|
|
1344
1347
|
],
|
|
1345
1348
|
}));
|
|
1349
|
+
// 声明标记(新 change 的出口覆盖门):夹具直接写 state,补上真实流程里协调者 / record 写的那份。
|
|
1350
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
1346
1351
|
const resDivergentPlain = runGuard(['exit', 'execute', '--apply'], dir);
|
|
1347
1352
|
assertExit(resDivergentPlain, 0);
|
|
1348
1353
|
assertOut(resDivergentPlain, 'FIX-BATCH: 回源节点 review(execute 出口已完成)');
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
routeNodeModule,
|
|
23
23
|
strictSummary,
|
|
24
24
|
writeIntakeArtifacts,
|
|
25
|
+
writeNodeDeclarationMarkers,
|
|
25
26
|
} from '../lib/test-fixtures.mjs';
|
|
26
27
|
import {
|
|
27
28
|
FIX_RETURN_FAMILY_COMPLETED,
|
|
@@ -87,6 +88,7 @@ export const ENTRIES = [
|
|
|
87
88
|
at: '2026-09-23T00:00:00.000Z', taskSetSignature: normalSignature,
|
|
88
89
|
}],
|
|
89
90
|
}));
|
|
91
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
90
92
|
const beforeNormal = readScenarioState(dir);
|
|
91
93
|
const resNormal = runGuard(['exit', 'execute', '--apply'], dir);
|
|
92
94
|
assertExit(resNormal, 0);
|
|
@@ -199,6 +201,7 @@ export const ENTRIES = [
|
|
|
199
201
|
directOverride: false,
|
|
200
202
|
newChange: true,
|
|
201
203
|
});
|
|
204
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
202
205
|
const res = runGuard(['exit', 'execute', '--apply'], dir);
|
|
203
206
|
assertExit(res, 0);
|
|
204
207
|
assertOut(res, 'FIX-BATCH: 回源节点 verify(execute 出口已完成)');
|
|
@@ -244,6 +247,9 @@ export const ENTRIES = [
|
|
|
244
247
|
// ① 新 change:review 源直接 exit review --apply → BLOCKED + 恢复指引(不得静默放行)
|
|
245
248
|
writeFile(dir, taskPath, fixBatchTaskText('pending'));
|
|
246
249
|
writeState(dir, reviewState);
|
|
250
|
+
// 本场景先后 exit review 与 execute 两个节点:两个节点的必需声明各写一份(真实流程同形)。
|
|
251
|
+
writeNodeDeclarationMarkers(dir, 'review');
|
|
252
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
247
253
|
const resBlock = runGuard(['exit', 'review', '--apply'], dir);
|
|
248
254
|
assertExit(resBlock, 1);
|
|
249
255
|
assertOut(resBlock, 'BLOCKED: 存在未归位/未跑出口的 Fix 批次');
|
|
@@ -338,12 +344,17 @@ export const ENTRIES = [
|
|
|
338
344
|
...handoffFor(['T-FIX-01']),
|
|
339
345
|
};
|
|
340
346
|
writeState(dir, after);
|
|
341
|
-
assertExit(runStateWithProtocol(dir, ['skill-load', 'execute', 'flow-comet-execute', '--prompt', 'flow-kit/prompts/4-dev.md']), 0);
|
|
347
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'execute', 'flow-comet-execute', '--prompt', 'flow-kit/prompts/4-dev.md', '--templates', 'SUMMARY.md']), 0);
|
|
348
|
+
// 协议 execute.requiredSkillCalls = flow-comet-dev(guarded):节点实现技能与必需技能是两个声明面,
|
|
349
|
+
// 出口的覆盖判据要求后者也有标记(只声明实现技能时覆盖缺口会被拦下)。
|
|
350
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'execute', 'flow-comet-dev', '--prompt', 'flow-kit/prompts/4-dev.md', '--templates', 'SUMMARY.md']), 0);
|
|
342
351
|
const recDoneExit = runGuard(['exit', 'execute', '--apply'], dir);
|
|
343
352
|
assertExit(recDoneExit, 0);
|
|
344
353
|
assertOut(recDoneExit, 'FIX-BATCH: 回源节点 review(execute 出口已完成)');
|
|
345
354
|
assertOut(recDoneExit, 'NODE: review');
|
|
346
|
-
assertExit(runStateWithProtocol(dir, ['skill-load', 'review', 'flow-comet-review', '--prompt', 'flow-kit/prompts/6-review.md']), 0);
|
|
355
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'review', 'flow-comet-review', '--prompt', 'flow-kit/prompts/6-review.md', '--templates', 'REVIEW.md,TEST.md']), 0);
|
|
356
|
+
// review 该读两份协议、协议声明两个 guarded 技能(flow-comet-review / flow-comet-test)
|
|
357
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'review', 'flow-comet-test', '--prompt', 'flow-kit/prompts/5-test.md', '--templates', 'REVIEW.md,TEST.md']), 0);
|
|
347
358
|
assertExit(runGuard(['entry', 'review'], dir), 0);
|
|
348
359
|
const recDoneReview = runGuard(['exit', 'review', '--apply'], dir);
|
|
349
360
|
assertExit(recDoneReview, 0);
|
|
@@ -386,12 +397,15 @@ export const ENTRIES = [
|
|
|
386
397
|
...handoffFor(['T-FIX-01']),
|
|
387
398
|
};
|
|
388
399
|
writeState(dir, after);
|
|
389
|
-
assertExit(runStateWithProtocol(dir, ['skill-load', 'execute', 'flow-comet-execute', '--prompt', 'flow-kit/prompts/4-dev.md']), 0);
|
|
400
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'execute', 'flow-comet-execute', '--prompt', 'flow-kit/prompts/4-dev.md', '--templates', 'SUMMARY.md']), 0);
|
|
401
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'execute', 'flow-comet-dev', '--prompt', 'flow-kit/prompts/4-dev.md', '--templates', 'SUMMARY.md']), 0);
|
|
390
402
|
const recDoneVerifyExit = runGuard(['exit', 'execute', '--apply'], dir);
|
|
391
403
|
assertExit(recDoneVerifyExit, 0);
|
|
392
404
|
assertOut(recDoneVerifyExit, 'FIX-BATCH: 回源节点 verify(execute 出口已完成)');
|
|
393
405
|
assertOut(recDoneVerifyExit, 'NODE: verify');
|
|
394
406
|
assertExit(runStateWithProtocol(dir, ['skill-load', 'verify', 'flow-comet-verify', '--prompt', 'flow-kit/prompts/7-integration.md']), 0);
|
|
407
|
+
// 协议 verify.requiredSkillCalls = flow-comet-integration(guarded):同一份协议文件、另一个技能面
|
|
408
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'verify', 'flow-comet-integration', '--prompt', 'flow-kit/prompts/7-integration.md']), 0);
|
|
395
409
|
assertExit(runGuard(['entry', 'verify'], dir), 0);
|
|
396
410
|
const recDoneVerify = runGuard(['exit', 'verify', '--apply'], dir);
|
|
397
411
|
assertExit(recDoneVerify, 0);
|
|
@@ -448,7 +462,7 @@ export const ENTRIES = [
|
|
|
448
462
|
...handoffFor(['P-FIX-01']),
|
|
449
463
|
};
|
|
450
464
|
writeState(dir, after);
|
|
451
|
-
assertExit(runStateWithProtocol(dir, ['skill-load', 'subagent-execute', 'flow-comet-dev', '--prompt', 'flow-kit/prompts/4-dev.md']), 0);
|
|
465
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'subagent-execute', 'flow-comet-dev', '--prompt', 'flow-kit/prompts/4-dev.md', '--templates', 'SUMMARY.md']), 0);
|
|
452
466
|
const rParExit = runGuard(['exit', 'subagent-execute', '--apply'], dir);
|
|
453
467
|
assertExit(rParExit, 0);
|
|
454
468
|
assertOut(rParExit, 'FIX-BATCH: 回源节点 review(subagent-execute 出口已完成)');
|
|
@@ -463,7 +477,9 @@ export const ENTRIES = [
|
|
|
463
477
|
|| typeof parFamilyExit.taskSetSignature !== 'string' || parFamilyExit.taskSetSignature === '') {
|
|
464
478
|
throw new Error('并行修复出口应记录本 change + taskSetSignature 的家族出口事件,实际 ' + JSON.stringify(parFamilyExit));
|
|
465
479
|
}
|
|
466
|
-
assertExit(runStateWithProtocol(dir, ['skill-load', 'review', 'flow-comet-review', '--prompt', 'flow-kit/prompts/6-review.md']), 0);
|
|
480
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'review', 'flow-comet-review', '--prompt', 'flow-kit/prompts/6-review.md', '--templates', 'REVIEW.md,TEST.md']), 0);
|
|
481
|
+
// review 该读两份协议、协议声明两个 guarded 技能(flow-comet-review / flow-comet-test)
|
|
482
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'review', 'flow-comet-test', '--prompt', 'flow-kit/prompts/5-test.md', '--templates', 'REVIEW.md,TEST.md']), 0);
|
|
467
483
|
assertExit(runGuard(['entry', 'review'], dir), 0);
|
|
468
484
|
const rParSource = runGuard(['exit', 'review', '--apply'], dir);
|
|
469
485
|
assertExit(rParSource, 0);
|
|
@@ -501,7 +517,7 @@ export const ENTRIES = [
|
|
|
501
517
|
...handoffFor(['P-FIX-01']),
|
|
502
518
|
};
|
|
503
519
|
writeState(dir, after);
|
|
504
|
-
assertExit(runStateWithProtocol(dir, ['skill-load', 'subagent-execute', 'flow-comet-dev', '--prompt', 'flow-kit/prompts/4-dev.md']), 0);
|
|
520
|
+
assertExit(runStateWithProtocol(dir, ['skill-load', 'subagent-execute', 'flow-comet-dev', '--prompt', 'flow-kit/prompts/4-dev.md', '--templates', 'SUMMARY.md']), 0);
|
|
505
521
|
const rDoneParExit = runGuard(['exit', 'subagent-execute', '--apply'], dir);
|
|
506
522
|
assertExit(rDoneParExit, 0);
|
|
507
523
|
assertOut(rDoneParExit, 'FIX-BATCH: 回源节点 review(subagent-execute 出口已完成)');
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
runPlanExit,
|
|
43
43
|
strictSummary,
|
|
44
44
|
writeIntakeArtifacts,
|
|
45
|
+
writeNodeDeclarationMarkers,
|
|
45
46
|
} from '../lib/test-fixtures.mjs';
|
|
46
47
|
import {
|
|
47
48
|
REENTRY_EXPECTED_INTERSECTION,
|
|
@@ -1126,6 +1127,7 @@ export const ENTRIES = [
|
|
|
1126
1127
|
// 判据 / 计数。
|
|
1127
1128
|
writeIntakeArtifacts(dir);
|
|
1128
1129
|
writeState(dir, replanExecuteState());
|
|
1130
|
+
writeNodeDeclarationMarkers(dir, 'execute');
|
|
1129
1131
|
assertExit(runGuard(['entry', 'execute'], dir), 0);
|
|
1130
1132
|
// 任务集修订(#119 死锁现场):新增计划外的并行就绪任务
|
|
1131
1133
|
writeFile(dir, '.specs/' + CHANGE_ID + '/TASK.md', REPLAN_TASK_REVISED);
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
timeSingleSourceConsumerProblems,
|
|
42
42
|
timeUtilsModule,
|
|
43
43
|
treeFingerprint,
|
|
44
|
+
writeNodeDeclarationMarkers,
|
|
44
45
|
} from '../lib/test-fixtures.mjs';
|
|
45
46
|
import {
|
|
46
47
|
REPLAN_STALE_SIGNATURE,
|
|
@@ -74,6 +75,7 @@ import {
|
|
|
74
75
|
frontendCriterionProseProblems,
|
|
75
76
|
frontendCriterionRedirectProblems,
|
|
76
77
|
intelFieldToken,
|
|
78
|
+
maintainerFacePresent,
|
|
77
79
|
singleSourceImportProblems,
|
|
78
80
|
uniqueTempNameHits,
|
|
79
81
|
writeDesignExitFixture,
|
|
@@ -611,21 +613,28 @@ export const ENTRIES = [
|
|
|
611
613
|
// 284: 本仓 CONTEXT 的七段校验 + 可选的 `## evolve 元数据` 段语义——缺席不报(没跑过架构
|
|
612
614
|
// 沉淀的项目不补段);在场则三字段必须齐(跑过一次却写残的半成品正是要拦的形态);判据
|
|
613
615
|
// **限定在段内**(别处的同名字段不得让残缺的 evolve 段蒙混过关)。
|
|
614
|
-
// ① 是本仓真实文件的**维护者形态**断言(.specs/ 被 gitignore
|
|
615
|
-
//
|
|
616
|
+
// ① 是本仓真实文件的**维护者形态**断言(.specs/ 被 gitignore):先过维护者面门控(docs/internal/
|
|
617
|
+
// 缺席 = 载体/CI 形态),再查流程工件文件本身是否在场——两种结构性缺席都输出可见 SKIP 行
|
|
618
|
+
// (未验证 ≠ 通过),**维护者面与文件都在场时判据逐字不变**;②~⑤ 恒检(夹具驱动)。
|
|
616
619
|
{
|
|
617
620
|
name: '284 CONTEXT 七段校验 + evolve 元数据可选段:缺席不报·在场缺一即报·判据限段内',
|
|
618
621
|
run: async () => {
|
|
619
622
|
const validate = requireModuleExport(contextInitModule, 'validateContext', 'context-init.mjs');
|
|
620
623
|
|
|
621
|
-
// ① 本仓 CONTEXT.md
|
|
622
|
-
|
|
624
|
+
// ① 本仓 CONTEXT.md 通过七段校验(真实文件,非夹具)——先过维护者面门控:载体(安装副本)
|
|
625
|
+
// 自带的 .specs/CONTEXT.md 是载体自己的上下文,与本仓 CONTEXT 同名不同物(e2e 实测只有 3 个
|
|
626
|
+
// H2)。拿它当本仓证据 = 让载体形态静默通过或判红,故维护者面缺席时显式 SKIP。
|
|
627
|
+
if (!maintainerFacePresent()) {
|
|
628
|
+
console.log('SKIP: 284 的本仓 CONTEXT 面(载体缺失维护者面:docs/internal/ 不在本检出)'
|
|
629
|
+
+ '——本次检出未校验本仓 CONTEXT.md 的七段与 evolve 元数据段语义,请在维护者主树重跑本套件'
|
|
630
|
+
+ '(跳过 ≠ 已通过,未验证 ≠ 通过)');
|
|
631
|
+
} else if (fs.existsSync(REPO_CONTEXT_FILE)) {
|
|
623
632
|
const repo = await validate(REPO_ROOT);
|
|
624
633
|
assertEqual(repo.missingSections.length, 0, '本仓 CONTEXT.md 缺段: ' + JSON.stringify(repo.missingSections));
|
|
625
634
|
assertEqual(repo.formatIssues.length, 0, '本仓 CONTEXT.md 格式问题: ' + JSON.stringify(repo.formatIssues));
|
|
626
635
|
} else {
|
|
627
636
|
console.log('SKIP: 284 的本仓 CONTEXT 面(.specs/CONTEXT.md 为流程工件面,可能结构性缺席)'
|
|
628
|
-
+ '——本仓 CONTEXT 缺席 =
|
|
637
|
+
+ '——本仓 CONTEXT 缺席 = 非维护者工作副本形态;本次检出未校验本仓 CONTEXT.md 的七段与 evolve 元数据段语义,'
|
|
629
638
|
+ '请在维护者主树重跑本套件');
|
|
630
639
|
}
|
|
631
640
|
|
|
@@ -670,6 +679,7 @@ export const ENTRIES = [
|
|
|
670
679
|
{
|
|
671
680
|
name: '285 ui-design 门四类:前端齐备放行 / 前端缺件 BLOCK / 非前端可见跳过 / 旧 change WARN',
|
|
672
681
|
run: (dir) => {
|
|
682
|
+
writeNodeDeclarationMarkers(dir, 'design', { frontend: true });
|
|
673
683
|
// 正例:前端(「视觉调性」段在场且未标注不适用)+ 工件齐备 + 真实声明
|
|
674
684
|
writeDesignExitFixture(dir, {
|
|
675
685
|
newChange: true, visualTone: VISUAL_TONE_APPLICABLE, uiDesign: true, declareUiDesign: true,
|
|
@@ -880,6 +890,7 @@ export const ENTRIES = [
|
|
|
880
890
|
{
|
|
881
891
|
name: '288 ui-design 门按协议绑定键控:删绑定门退场(可见行)/ 在场仍拦 / 其它绑定零改动 / 写回即恢复',
|
|
882
892
|
run: (dir) => {
|
|
893
|
+
writeNodeDeclarationMarkers(dir, 'design', { frontend: true });
|
|
883
894
|
// 负例:协议删掉该绑定 → 前端判据成立且缺件也不再拦(门随绑定退场)
|
|
884
895
|
writeUiDesignBindingVariant(dir, 'absent');
|
|
885
896
|
writeDesignExitFixture(dir, {
|
|
@@ -928,6 +939,7 @@ export const ENTRIES = [
|
|
|
928
939
|
{
|
|
929
940
|
name: '289 ui-design 门按协议等级键控:调回 advisory 不再拦且自动补写原语义 / 写回 guarded 即恢复',
|
|
930
941
|
run: (dir) => {
|
|
942
|
+
writeNodeDeclarationMarkers(dir, 'design', { frontend: true });
|
|
931
943
|
// 负例:等级调回 advisory → 缺工件 + 零真实声明也放行(自动补写保持原语义)
|
|
932
944
|
writeUiDesignBindingVariant(dir, 'advisory');
|
|
933
945
|
writeDesignExitFixture(dir, {
|
|
@@ -976,6 +988,7 @@ export const ENTRIES = [
|
|
|
976
988
|
{
|
|
977
989
|
name: '290 负向标记结构约束:独立行·行首·字段值位跳过并回显片段 / 自然句子·子维度字段·段外标记不关闸',
|
|
978
990
|
run: (dir) => {
|
|
991
|
+
writeNodeDeclarationMarkers(dir, 'design', { frontend: true });
|
|
979
992
|
// 负例:自然句子(标记词在行首且后接「于」,句内再出现一次)→ 判据仍是前端 ⇒ 缺件 BLOCKED
|
|
980
993
|
writeDesignExitFixture(dir, {
|
|
981
994
|
newChange: true, visualTone: VISUAL_TONE_NATURAL_SENTENCE, uiDesign: false, declareUiDesign: true,
|