@pm_zhousl/xinyun-ai-init 1.7.0 → 1.7.2
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 +1 -1
- package/init/xinyun-ai-init/README.md +75 -3
- package/init/xinyun-ai-init/rules/directory-self-completion.md +16 -0
- package/init/xinyun-ai-init/rules/init-rules.md +25 -0
- package/init/xinyun-ai-init/rules/session-workbench.md +33 -0
- package/init/xinyun-ai-init/rules/upgrade-rules.md +20 -0
- package/init/xinyun-ai-init/templates/AGENTS.template.md +26 -1
- package/init/xinyun-ai-init/templates/archive-transaction.template.json +15 -0
- package/init/xinyun-ai-init/templates/core-rules.template.md +47 -1
- package/init/xinyun-ai-init/templates/current-task.template.md +37 -0
- package/init/xinyun-ai-init/templates/init-result.template.json +23 -1
- package/init/xinyun-ai-init/templates/managed-baseline.template.json +2 -2
- package/init/xinyun-ai-init/templates/manifest.template.json +52 -3
- package/init/xinyun-ai-init/templates/project-check.template.md +32 -0
- package/init/xinyun-ai-init/templates/project-guide.template.md +27 -0
- package/init/xinyun-ai-init/templates/project-index.template.json +48 -0
- package/init/xinyun-ai-init/templates/role-execution.template.md +35 -0
- package/init/xinyun-ai-init/templates/role-subtask.template.md +28 -0
- package/init/xinyun-ai-init/templates/task-history.template.md +1 -1
- package/init/xinyun-ai-init/templates/task-index.template.json +37 -0
- package/init/xinyun-ai-init/templates/task-main.template.md +32 -0
- package/init/xinyun-ai-init/version.json +1 -1
- package/package.json +2 -2
- package/scripts/verify-init-package.js +266 -22
- package/scripts/verify-rules-package.js +105 -9
- package/test-scenarios/README.md +10 -4
- package/test-scenarios/review-template.md +23 -4
- package/test-scenarios/scenarios.md +108 -5
- package/test-scenarios/v1.7.1-scenarios.md +130 -0
- package/test-scenarios/v1.7.2-scenarios.md +51 -0
|
@@ -103,18 +103,18 @@ function verifyPackageFiles() {
|
|
|
103
103
|
);
|
|
104
104
|
|
|
105
105
|
addCheck(
|
|
106
|
-
"package.json 版本为 1.
|
|
107
|
-
packageJson.version === "1.7.
|
|
106
|
+
"package.json 版本为 1.7.2",
|
|
107
|
+
packageJson.version === "1.7.2",
|
|
108
108
|
`当前版本为 ${packageJson.version}`
|
|
109
109
|
);
|
|
110
110
|
addCheck(
|
|
111
|
-
"version.json 版本为 1.
|
|
112
|
-
versionJson.version === "1.7.
|
|
111
|
+
"version.json 版本为 1.7.2",
|
|
112
|
+
versionJson.version === "1.7.2",
|
|
113
113
|
`当前版本为 ${versionJson.version}`
|
|
114
114
|
);
|
|
115
115
|
addCheck(
|
|
116
|
-
"manifest.template.json 版本为 1.
|
|
117
|
-
manifestTemplate.xinyunAiVersion === "1.7.
|
|
116
|
+
"manifest.template.json 版本为 1.7.2",
|
|
117
|
+
manifestTemplate.xinyunAiVersion === "1.7.2",
|
|
118
118
|
`当前版本为 ${manifestTemplate.xinyunAiVersion}`
|
|
119
119
|
);
|
|
120
120
|
}
|
|
@@ -469,22 +469,43 @@ function verifyInitRules() {
|
|
|
469
469
|
|
|
470
470
|
function verifyTestScenarios() {
|
|
471
471
|
requireIncludes("test-scenarios/scenarios.md", [
|
|
472
|
-
"1-
|
|
473
|
-
"
|
|
472
|
+
"1-87",
|
|
473
|
+
"88",
|
|
474
474
|
"## 40. v1.6-A",
|
|
475
475
|
"## 53. v1.6 tarball",
|
|
476
476
|
"## 55. verify:rules",
|
|
477
477
|
"## 59. ThinkPHP",
|
|
478
478
|
"## 64. HTML",
|
|
479
479
|
"## 69. verify:rules JSON schema",
|
|
480
|
-
"##
|
|
480
|
+
"## 71. v1.7.1 主任务命名",
|
|
481
|
+
"## 87. v1.7.1 普通咨询和版本回归",
|
|
482
|
+
"## 88. Skill",
|
|
481
483
|
]);
|
|
482
484
|
|
|
483
485
|
requireIncludes("test-scenarios/README.md", [
|
|
484
|
-
"pm_zhousl-xinyun-ai-init-1.7.
|
|
485
|
-
"1-
|
|
486
|
-
"
|
|
486
|
+
"pm_zhousl-xinyun-ai-init-1.7.2.tgz",
|
|
487
|
+
"1-87",
|
|
488
|
+
"88",
|
|
487
489
|
"npm run verify:rules",
|
|
490
|
+
"v1.7.2-scenarios.md",
|
|
491
|
+
]);
|
|
492
|
+
|
|
493
|
+
requireIncludes("test-scenarios/v1.7.1-scenarios.md", [
|
|
494
|
+
"主任务命名",
|
|
495
|
+
"角色登记与执行资格分离",
|
|
496
|
+
"归档原子性和任务索引",
|
|
497
|
+
"CodeGraph初始化授权边界",
|
|
498
|
+
"CodeGraph记录与失败矩阵",
|
|
499
|
+
"普通咨询边界",
|
|
500
|
+
]);
|
|
501
|
+
|
|
502
|
+
requireIncludes("test-scenarios/v1.7.2-scenarios.md", [
|
|
503
|
+
"role-execution",
|
|
504
|
+
"activeTaskIds",
|
|
505
|
+
"executableTaskIds",
|
|
506
|
+
"固定优先级",
|
|
507
|
+
"幂等补建",
|
|
508
|
+
"补建失败和索引恢复",
|
|
488
509
|
]);
|
|
489
510
|
}
|
|
490
511
|
function verifyFrameworkRules() {
|
|
@@ -730,7 +751,7 @@ function verifyV16Contracts() {
|
|
|
730
751
|
]);
|
|
731
752
|
|
|
732
753
|
requireIncludes("init/xinyun-ai-init/README.md", [
|
|
733
|
-
"当前规则版本:`1.7.
|
|
754
|
+
"当前规则版本:`1.7.2`",
|
|
734
755
|
"v1.6 初始化任务、幂等恢复与结果记录",
|
|
735
756
|
"xinyun-ai/tasks/.idempotency/",
|
|
736
757
|
"xinyun-ai/init-result.json",
|
|
@@ -930,7 +951,7 @@ function verifyV16Contracts() {
|
|
|
930
951
|
}
|
|
931
952
|
|
|
932
953
|
addCheck("init-result mode 为 initialization", initResult.mode === "initialization");
|
|
933
|
-
addCheck("init-result targetVersion=1.7.
|
|
954
|
+
addCheck("init-result targetVersion=1.7.2", initResult.targetVersion === "1.7.2");
|
|
934
955
|
addCheck("init-result businessCodeChanged 初始为 unknown", initResult.businessCodeChanged && initResult.businessCodeChanged.value === "unknown");
|
|
935
956
|
addCheck("task-lock scope=xinyun-ai-control", taskLock.scope === "xinyun-ai-control");
|
|
936
957
|
addCheck("task-lock audit 包含 released", Array.isArray(taskLock.audit) && taskLock.audit.some((item) => item.action === "released"));
|
|
@@ -966,7 +987,7 @@ function verifyV17Contracts() {
|
|
|
966
987
|
"init/xinyun-ai-init/templates/html-migration-open-issues.template.md",
|
|
967
988
|
"init/xinyun-ai-init/templates/html-migration-record.template.json",
|
|
968
989
|
"scripts/verify-rules-package.js",
|
|
969
|
-
"test-scenarios/v1.7.
|
|
990
|
+
"test-scenarios/v1.7.1-scenarios.md",
|
|
970
991
|
];
|
|
971
992
|
|
|
972
993
|
for (const file of requiredTemplates) {
|
|
@@ -1036,7 +1057,7 @@ function verifyV17Contracts() {
|
|
|
1036
1057
|
addCheck("html migration pilot requires separate confirmation", htmlMigration.pilotPlan && htmlMigration.pilotPlan.requiresSeparateConfirmation === true);
|
|
1037
1058
|
|
|
1038
1059
|
requireIncludes("init/xinyun-ai-init/README.md", [
|
|
1039
|
-
"当前规则版本:`1.7.
|
|
1060
|
+
"当前规则版本:`1.7.2`",
|
|
1040
1061
|
"v1.7 规则包一致性检查与 verify:rules",
|
|
1041
1062
|
"frameworkStatus=confirmed/inferred/not-found/unknown/detected-unsupported",
|
|
1042
1063
|
"v1.7 深化预算:5 层目录、80 个关键文件、100 条证据",
|
|
@@ -1055,21 +1076,137 @@ function verifyV17Contracts() {
|
|
|
1055
1076
|
]);
|
|
1056
1077
|
|
|
1057
1078
|
requireIncludes("test-scenarios/scenarios.md", [
|
|
1058
|
-
"当前必测场景为 1-
|
|
1059
|
-
"当前观察场景为
|
|
1079
|
+
"当前必测场景为 1-87",
|
|
1080
|
+
"当前观察场景为 88",
|
|
1060
1081
|
"## 55. verify:rules 正常通过",
|
|
1061
1082
|
"## 69. verify:rules JSON schema 和重复执行",
|
|
1062
|
-
"##
|
|
1083
|
+
"## 88. Skill 触发测试",
|
|
1063
1084
|
]);
|
|
1064
1085
|
|
|
1065
1086
|
requireIncludes("test-scenarios/README.md", [
|
|
1066
|
-
"pm_zhousl-xinyun-ai-init-1.7.
|
|
1067
|
-
"当前必测场景为 `scenarios.md` 的 1-
|
|
1068
|
-
"当前观察场景为 `scenarios.md` 的
|
|
1087
|
+
"pm_zhousl-xinyun-ai-init-1.7.2.tgz",
|
|
1088
|
+
"当前必测场景为 `scenarios.md` 的 1-87",
|
|
1089
|
+
"当前观察场景为 `scenarios.md` 的 88",
|
|
1069
1090
|
"npm run verify:rules",
|
|
1070
1091
|
]);
|
|
1071
1092
|
}
|
|
1072
1093
|
|
|
1094
|
+
function verifyV171Contracts() {
|
|
1095
|
+
const manifestTemplate = JSON.parse(readText("init/xinyun-ai-init/templates/manifest.template.json"));
|
|
1096
|
+
const projectIndexTemplate = JSON.parse(readText("init/xinyun-ai-init/templates/project-index.template.json"));
|
|
1097
|
+
const initResult = JSON.parse(readText("init/xinyun-ai-init/templates/init-result.template.json"));
|
|
1098
|
+
const taskIndex = JSON.parse(readText("init/xinyun-ai-init/templates/task-index.template.json"));
|
|
1099
|
+
const archiveTransaction = JSON.parse(readText("init/xinyun-ai-init/templates/archive-transaction.template.json"));
|
|
1100
|
+
|
|
1101
|
+
const requiredTemplates = [
|
|
1102
|
+
"init/xinyun-ai-init/templates/task-index.template.json",
|
|
1103
|
+
"init/xinyun-ai-init/templates/task-main.template.md",
|
|
1104
|
+
"init/xinyun-ai-init/templates/role-subtask.template.md",
|
|
1105
|
+
"init/xinyun-ai-init/templates/archive-transaction.template.json",
|
|
1106
|
+
"test-scenarios/v1.7.1-scenarios.md",
|
|
1107
|
+
];
|
|
1108
|
+
for (const file of requiredTemplates) requireFile(file);
|
|
1109
|
+
|
|
1110
|
+
for (const flag of ["namedInitializationTaskTree", "taskArchiveTransactions", "codeGraphRequiredInitialization"]) {
|
|
1111
|
+
addCheck(
|
|
1112
|
+
`manifest capabilities 包含 ${flag}`,
|
|
1113
|
+
manifestTemplate.capabilities && manifestTemplate.capabilities[flag] === true,
|
|
1114
|
+
`manifest.template.json 未声明 ${flag}`
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
const taskingPaths = {
|
|
1119
|
+
taskIndex: "xinyun-ai/tasks/task-index.json",
|
|
1120
|
+
archiveDirectory: "xinyun-ai/tasks/archive/",
|
|
1121
|
+
archiveTransactionsDirectory: "xinyun-ai/tasks/.archive-transactions/",
|
|
1122
|
+
archiveTempDirectory: "xinyun-ai/tasks/.archive-tmp/",
|
|
1123
|
+
};
|
|
1124
|
+
for (const [key, value] of Object.entries(taskingPaths)) {
|
|
1125
|
+
addCheck(`manifest v1.7.1 tasking 路径 ${key}`, manifestTemplate.tasking && manifestTemplate.tasking[key] === value, `manifest tasking.${key} 应为 ${value}`);
|
|
1126
|
+
addCheck(`project-index v1.7.1 tasking 路径 ${key}`, projectIndexTemplate.tasking && projectIndexTemplate.tasking[key] === value, `project-index tasking.${key} 应为 ${value}`);
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
addCheck("manifest taskTree enabled", manifestTemplate.taskTree && manifestTemplate.taskTree.enabled === true, "manifest.taskTree.enabled 应为 true");
|
|
1130
|
+
addCheck("project-index taskTree enabled", projectIndexTemplate.taskTree && projectIndexTemplate.taskTree.enabled === true, "project-index.taskTree.enabled 应为 true");
|
|
1131
|
+
addCheck("taskTree 主任务标题模式", manifestTemplate.taskTree && manifestTemplate.taskTree.mainTaskTitlePattern === "项目初始化:<项目显示名>", "主任务标题模式不一致");
|
|
1132
|
+
addCheck("taskTree 角色任务数为 5", manifestTemplate.taskTree && manifestTemplate.taskTree.roleTaskCount === 5, "roleTaskCount 应为 5");
|
|
1133
|
+
|
|
1134
|
+
addCheck("task-index activeTaskIds 数组", Array.isArray(taskIndex.activeTaskIds), "activeTaskIds 必须是数组");
|
|
1135
|
+
addCheck("task-index executableTaskIds 数组", Array.isArray(taskIndex.executableTaskIds), "executableTaskIds 必须是数组");
|
|
1136
|
+
addCheck("task-index archivedTaskIds 数组", Array.isArray(taskIndex.archivedTaskIds), "archivedTaskIds 必须是数组");
|
|
1137
|
+
addCheck("task-index idle status", taskIndex.idleCurrentTask && taskIndex.idleCurrentTask.status === "idle", "idleCurrentTask.status 应为 idle");
|
|
1138
|
+
addCheck("task-index idle taskId null", taskIndex.idleCurrentTask && taskIndex.idleCurrentTask.taskId === null, "idleCurrentTask.taskId 应为 null");
|
|
1139
|
+
addCheck("task-index idle title", taskIndex.idleCurrentTask && taskIndex.idleCurrentTask.title === "暂无待执行任务", "idle 标题不一致");
|
|
1140
|
+
|
|
1141
|
+
const phases = ["prepared", "validated", "moved", "indexed", "committed", "recovery-required", "blocked"];
|
|
1142
|
+
addCheck("archive transaction phase prepared", archiveTransaction.phase === "prepared", "归档事务默认 phase 应为 prepared");
|
|
1143
|
+
addCheck("archive transaction phase enum 完整", phases.every((phase) => archiveTransaction.phaseEnum && archiveTransaction.phaseEnum.includes(phase)), "归档事务 phaseEnum 缺少必需状态");
|
|
1144
|
+
|
|
1145
|
+
const codeGraphStatuses = ["initialized", "healthy", "missing", "unavailable", "permission-denied", "failed", "unknown"];
|
|
1146
|
+
addCheck("manifest CodeGraph required", manifestTemplate.codeGraphRequired && manifestTemplate.codeGraphRequired.required === true, "manifest CodeGraph required 应为 true");
|
|
1147
|
+
addCheck("project-index CodeGraph required", projectIndexTemplate.codeGraphRequired && projectIndexTemplate.codeGraphRequired.required === true, "project-index CodeGraph required 应为 true");
|
|
1148
|
+
addCheck("manifest CodeGraph status enum 完整", codeGraphStatuses.every((status) => manifestTemplate.codeGraphRequired && manifestTemplate.codeGraphRequired.statusEnum.includes(status)), "CodeGraph statusEnum 缺少状态");
|
|
1149
|
+
addCheck("manifest CodeGraph command", manifestTemplate.codeGraphRequired && manifestTemplate.codeGraphRequired.command === "codegraph init -i", "CodeGraph command 应为 codegraph init -i");
|
|
1150
|
+
addCheck("init-result CodeGraph required", initResult.codeGraph && initResult.codeGraph.required === true, "init-result CodeGraph required 应为 true");
|
|
1151
|
+
addCheck("init-result CodeGraph command", initResult.codeGraph && initResult.codeGraph.command === "codegraph init -i", "init-result CodeGraph command 不一致");
|
|
1152
|
+
addCheck("init-result taskTree role count", initResult.taskTree && initResult.taskTree.roleTaskCount === 5, "init-result taskTree.roleTaskCount 应为 5");
|
|
1153
|
+
|
|
1154
|
+
requireIncludes("init/xinyun-ai-init/README.md", [
|
|
1155
|
+
"当前规则版本:`1.7.2`",
|
|
1156
|
+
"项目初始化:<项目显示名>",
|
|
1157
|
+
"xinyun-ai/tasks/task-index.json",
|
|
1158
|
+
"xinyun-ai/tasks/.archive-transactions/<archiveTransactionId>.json",
|
|
1159
|
+
"taskKind=initialization-record",
|
|
1160
|
+
"taskKind=role-execution",
|
|
1161
|
+
"status=idle",
|
|
1162
|
+
"taskId=null",
|
|
1163
|
+
"title=暂无待执行任务",
|
|
1164
|
+
"codeGraphRecordId",
|
|
1165
|
+
"codegraph init -i",
|
|
1166
|
+
"permission-denied",
|
|
1167
|
+
"MCP 未连接或健康状态无法确认=`unknown`",
|
|
1168
|
+
]);
|
|
1169
|
+
|
|
1170
|
+
requireIncludes("init/xinyun-ai-init/templates/core-rules.template.md", [
|
|
1171
|
+
"v1.7.1 初始化主任务、角色子任务与归档",
|
|
1172
|
+
"v1.7.1 CodeGraph 必备初始化与状态闭环",
|
|
1173
|
+
"项目初始化:<项目显示名>",
|
|
1174
|
+
"xinyun-ai/tasks/<taskId>/subtasks/<roleTaskId>.md",
|
|
1175
|
+
"executionEligible=true",
|
|
1176
|
+
"xinyun-ai/tasks/archive/<taskId>/",
|
|
1177
|
+
"prepared",
|
|
1178
|
+
"recovery-required",
|
|
1179
|
+
"codeGraphRecordId",
|
|
1180
|
+
"degradationAuthorized=true",
|
|
1181
|
+
]);
|
|
1182
|
+
|
|
1183
|
+
requireIncludes("init/xinyun-ai-init/templates/AGENTS.template.md", [
|
|
1184
|
+
"v1.7.1 初始化任务树与 CodeGraph",
|
|
1185
|
+
"项目初始化:<项目显示名>",
|
|
1186
|
+
"xinyun-ai/tasks/task-index.json",
|
|
1187
|
+
"xinyun-ai/tasks/.archive-transactions/<archiveTransactionId>.json",
|
|
1188
|
+
"codeGraphRecordId",
|
|
1189
|
+
"codegraph init -i",
|
|
1190
|
+
]);
|
|
1191
|
+
|
|
1192
|
+
requireIncludes("init/xinyun-ai-init/templates/current-task.template.md", [
|
|
1193
|
+
"初始化任务树",
|
|
1194
|
+
"任务归档",
|
|
1195
|
+
"CodeGraph 必备初始化",
|
|
1196
|
+
"currentTaskIdleStatus:status=idle, taskId=null, title=暂无待执行任务",
|
|
1197
|
+
"codeGraphRecordId",
|
|
1198
|
+
]);
|
|
1199
|
+
|
|
1200
|
+
requireIncludes("init/xinyun-ai-init/rules/init-rules.md", [
|
|
1201
|
+
"v1.7.1 初始化任务树与 CodeGraph",
|
|
1202
|
+
"xinyun-ai/tasks/task-index.json",
|
|
1203
|
+
"codegraph init -i",
|
|
1204
|
+
]);
|
|
1205
|
+
requireIncludes("init/xinyun-ai-init/rules/upgrade-rules.md", ["v1.7.1 升级补齐", "CodeGraph 状态闭环"]);
|
|
1206
|
+
requireIncludes("init/xinyun-ai-init/rules/directory-self-completion.md", ["v1.7.1 任务树、归档与 CodeGraph 目录"]);
|
|
1207
|
+
requireIncludes("init/xinyun-ai-init/rules/session-workbench.md", ["v1.7.1 任务单补充字段"]);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1073
1210
|
function verifyJsonAndMarkdown() {
|
|
1074
1211
|
const jsonFiles = walkFiles(initRoot).filter((filePath) => filePath.endsWith(".json"));
|
|
1075
1212
|
const mdFiles = walkFiles(initRoot).filter((filePath) => filePath.endsWith(".md"));
|
|
@@ -1083,6 +1220,110 @@ function verifyJsonAndMarkdown() {
|
|
|
1083
1220
|
}
|
|
1084
1221
|
}
|
|
1085
1222
|
|
|
1223
|
+
function verifyV172Contracts() {
|
|
1224
|
+
const manifestTemplate = JSON.parse(readText("init/xinyun-ai-init/templates/manifest.template.json"));
|
|
1225
|
+
const projectIndexTemplate = JSON.parse(readText("init/xinyun-ai-init/templates/project-index.template.json"));
|
|
1226
|
+
const taskIndex = JSON.parse(readText("init/xinyun-ai-init/templates/task-index.template.json"));
|
|
1227
|
+
const roleExecution = readText("init/xinyun-ai-init/templates/role-execution.template.md");
|
|
1228
|
+
const expectedPriority = {
|
|
1229
|
+
"project-owner": 10,
|
|
1230
|
+
"project-product": 20,
|
|
1231
|
+
"chief-engineer": 30,
|
|
1232
|
+
"programmer": 40,
|
|
1233
|
+
"test-reviewer": 50,
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1236
|
+
requireFile("init/xinyun-ai-init/templates/role-execution.template.md");
|
|
1237
|
+
requireFile("test-scenarios/v1.7.2-scenarios.md");
|
|
1238
|
+
addCheck(
|
|
1239
|
+
"manifest v1.7.2 roleExecutionVisibility",
|
|
1240
|
+
manifestTemplate.capabilities && manifestTemplate.capabilities.roleExecutionVisibility === true,
|
|
1241
|
+
"manifest 缺少 roleExecutionVisibility 能力"
|
|
1242
|
+
);
|
|
1243
|
+
addCheck(
|
|
1244
|
+
"manifest roleExecutionDirectory",
|
|
1245
|
+
manifestTemplate.tasking && manifestTemplate.tasking.roleExecutionDirectory === "xinyun-ai/tasks/role-execution/",
|
|
1246
|
+
"manifest roleExecutionDirectory 不一致"
|
|
1247
|
+
);
|
|
1248
|
+
addCheck(
|
|
1249
|
+
"project-index roleExecutionDirectory",
|
|
1250
|
+
projectIndexTemplate.tasking && projectIndexTemplate.tasking.roleExecutionDirectory === "xinyun-ai/tasks/role-execution/",
|
|
1251
|
+
"project-index roleExecutionDirectory 不一致"
|
|
1252
|
+
);
|
|
1253
|
+
addCheck(
|
|
1254
|
+
"manifest roleExecution path pattern",
|
|
1255
|
+
manifestTemplate.taskTree && manifestTemplate.taskTree.roleExecutionPathPattern === "xinyun-ai/tasks/role-execution/<roleTaskId>.md",
|
|
1256
|
+
"manifest roleExecution path pattern 不一致"
|
|
1257
|
+
);
|
|
1258
|
+
addCheck(
|
|
1259
|
+
"task-index roleExecutionDirectory",
|
|
1260
|
+
taskIndex.roleExecutionDirectory === "xinyun-ai/tasks/role-execution/",
|
|
1261
|
+
"task-index roleExecutionDirectory 不一致"
|
|
1262
|
+
);
|
|
1263
|
+
addCheck("task-index roleExecutionTaskIds array", Array.isArray(taskIndex.roleExecutionTaskIds), "roleExecutionTaskIds 必须是数组");
|
|
1264
|
+
addCheck(
|
|
1265
|
+
"task-index roleExecution status enum",
|
|
1266
|
+
JSON.stringify(taskIndex.roleExecutionStatusEnum) === JSON.stringify(["pending", "assigned", "accepted", "executing", "paused", "blocked", "completed", "cancelled"]),
|
|
1267
|
+
"roleExecutionStatusEnum 不完整"
|
|
1268
|
+
);
|
|
1269
|
+
addCheck(
|
|
1270
|
+
"task-index task sort order",
|
|
1271
|
+
JSON.stringify(taskIndex.taskSortOrder) === JSON.stringify(["priority", "createdAt", "roleId", "taskId"]),
|
|
1272
|
+
"任务稳定排序字段不一致"
|
|
1273
|
+
);
|
|
1274
|
+
addCheck(
|
|
1275
|
+
"task-index current task idle policy",
|
|
1276
|
+
taskIndex.currentTaskPolicy && taskIndex.currentTaskPolicy.idleWhenActiveTaskIdsEmpty === true && taskIndex.currentTaskPolicy.idleTaskId === null,
|
|
1277
|
+
"current-task idle policy 不完整"
|
|
1278
|
+
);
|
|
1279
|
+
addCheck(
|
|
1280
|
+
"task-index role idempotency fields",
|
|
1281
|
+
taskIndex.idempotency && JSON.stringify(taskIndex.idempotency.keyFields) === JSON.stringify(["sourceTaskId", "roleId", "taskKind", "targetVersion"]) && taskIndex.idempotency.algorithm === "JCS-SHA-256" && taskIndex.idempotency.duplicatePolicy === "reuse",
|
|
1282
|
+
"逐角色幂等契约不完整"
|
|
1283
|
+
);
|
|
1284
|
+
for (const [roleId, priority] of Object.entries(expectedPriority)) {
|
|
1285
|
+
addCheck(
|
|
1286
|
+
`task-index priority ${roleId}`,
|
|
1287
|
+
taskIndex.roleExecutionPriority && taskIndex.roleExecutionPriority[roleId] === priority,
|
|
1288
|
+
`${roleId} 默认优先级不一致`
|
|
1289
|
+
);
|
|
1290
|
+
addCheck(
|
|
1291
|
+
`manifest priority ${roleId}`,
|
|
1292
|
+
manifestTemplate.taskTree && manifestTemplate.taskTree.roleExecutionPriority && manifestTemplate.taskTree.roleExecutionPriority[roleId] === priority,
|
|
1293
|
+
`${roleId} manifest 默认优先级不一致`
|
|
1294
|
+
);
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
const requiredRoleFields = [
|
|
1298
|
+
"taskId", "roleTaskId", "parentTaskId", "roleId", "taskKind", "title", "priority", "status",
|
|
1299
|
+
"assignmentStatus", "understandingStatus", "confirmationStatus", "memberId", "sessionId",
|
|
1300
|
+
"executionEligible", "blockedReason", "nextAction", "sourceTaskId", "idempotencyKey", "createdAt", "updatedAt",
|
|
1301
|
+
];
|
|
1302
|
+
for (const field of requiredRoleFields) {
|
|
1303
|
+
addCheck(`role-execution template field ${field}`, roleExecution.includes(`- ${field}:`), `role-execution 模板缺少 ${field}`);
|
|
1304
|
+
}
|
|
1305
|
+
requireIncludes("init/xinyun-ai-init/README.md", [
|
|
1306
|
+
"当前规则版本:`1.7.2`",
|
|
1307
|
+
"xinyun-ai/tasks/role-execution/<roleTaskId>.md",
|
|
1308
|
+
"activeTaskIds",
|
|
1309
|
+
"executableTaskIds",
|
|
1310
|
+
"priority ASC",
|
|
1311
|
+
"JCS-SHA-256",
|
|
1312
|
+
"blockedReason=write-failed",
|
|
1313
|
+
]);
|
|
1314
|
+
requireIncludes("init/xinyun-ai-init/templates/core-rules.template.md", [
|
|
1315
|
+
"v1.7.2 初始化后角色任务可见性与执行任务分离",
|
|
1316
|
+
"xinyun-ai/tasks/role-execution/<roleTaskId>.md",
|
|
1317
|
+
"activeTaskIds",
|
|
1318
|
+
"executableTaskIds",
|
|
1319
|
+
"JCS-SHA-256",
|
|
1320
|
+
]);
|
|
1321
|
+
requireIncludes("init/xinyun-ai-init/rules/init-rules.md", ["v1.7.2 角色后续任务可见性", "role-execution"]);
|
|
1322
|
+
requireIncludes("init/xinyun-ai-init/rules/upgrade-rules.md", ["v1.7.2 升级补建角色后续任务", "write-failed"]);
|
|
1323
|
+
requireIncludes("init/xinyun-ai-init/rules/directory-self-completion.md", ["v1.7.2 任务可见性目录", "role-execution"]);
|
|
1324
|
+
requireIncludes("init/xinyun-ai-init/rules/session-workbench.md", ["v1.7.2 角色执行任务补充字段", "roleExecutionResult"]);
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1086
1327
|
function main() {
|
|
1087
1328
|
requireFile("bin/xinyun-ai-init.js");
|
|
1088
1329
|
requireFile("init/xinyun-ai-init/README.md");
|
|
@@ -1095,6 +1336,8 @@ function main() {
|
|
|
1095
1336
|
verifyTeamTemplates();
|
|
1096
1337
|
verifyV16Contracts();
|
|
1097
1338
|
verifyV17Contracts();
|
|
1339
|
+
verifyV171Contracts();
|
|
1340
|
+
verifyV172Contracts();
|
|
1098
1341
|
verifyTestScenarios();
|
|
1099
1342
|
verifyJsonAndMarkdown();
|
|
1100
1343
|
|
|
@@ -1117,3 +1360,4 @@ function main() {
|
|
|
1117
1360
|
}
|
|
1118
1361
|
|
|
1119
1362
|
main();
|
|
1363
|
+
|
|
@@ -5,7 +5,7 @@ const os = require("os");
|
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const { spawnSync } = require("child_process");
|
|
7
7
|
|
|
8
|
-
const VERSION = "1.7.
|
|
8
|
+
const VERSION = "1.7.2";
|
|
9
9
|
const checks = [];
|
|
10
10
|
|
|
11
11
|
function parseArgs(argv) {
|
|
@@ -148,7 +148,8 @@ function validatePackageFiles(root, target, isTarball) {
|
|
|
148
148
|
"test-scenarios/README.md",
|
|
149
149
|
"test-scenarios/review-template.md",
|
|
150
150
|
"test-scenarios/scenarios.md",
|
|
151
|
-
"test-scenarios/v1.7.
|
|
151
|
+
"test-scenarios/v1.7.1-scenarios.md",
|
|
152
|
+
"test-scenarios/v1.7.2-scenarios.md",
|
|
152
153
|
"init/xinyun-ai-init/README.md",
|
|
153
154
|
"init/xinyun-ai-init/rules/frameworks/README.md",
|
|
154
155
|
"init/xinyun-ai-init/rules/frameworks/backend/php/thinkphp.md",
|
|
@@ -168,12 +169,17 @@ function validatePackageFiles(root, target, isTarball) {
|
|
|
168
169
|
"init/xinyun-ai-init/templates/html-migration-pilot-plan.template.md",
|
|
169
170
|
"init/xinyun-ai-init/templates/html-migration-open-issues.template.md",
|
|
170
171
|
"init/xinyun-ai-init/templates/html-migration-record.template.json",
|
|
172
|
+
"init/xinyun-ai-init/templates/task-index.template.json",
|
|
173
|
+
"init/xinyun-ai-init/templates/task-main.template.md",
|
|
174
|
+
"init/xinyun-ai-init/templates/role-subtask.template.md",
|
|
175
|
+
"init/xinyun-ai-init/templates/archive-transaction.template.json",
|
|
176
|
+
"init/xinyun-ai-init/templates/role-execution.template.md",
|
|
171
177
|
];
|
|
172
178
|
|
|
173
179
|
for (const file of requiredFiles) requireFile(root, target, file);
|
|
174
180
|
|
|
175
181
|
if (isTarball) {
|
|
176
|
-
const sourceOnly = "version-plans/releases/v1.7.
|
|
182
|
+
const sourceOnly = "version-plans/releases/v1.7.2.md";
|
|
177
183
|
addCheck(target, "package.source-only", "package", !existsPath(root, sourceOnly) ? "pass" : "warn", sourceOnly, null, "not required in tarball", existsPath(root, sourceOnly) ? "present" : "not present", "source-only version-plans is not required in tarball.", "No action required unless package policy changes.", "optional");
|
|
178
184
|
}
|
|
179
185
|
}
|
|
@@ -201,7 +207,16 @@ function validateRegistries(root, target) {
|
|
|
201
207
|
const projectIndex = readJson(root, "init/xinyun-ai-init/templates/project-index.template.json");
|
|
202
208
|
const capabilities = manifest.capabilities || {};
|
|
203
209
|
|
|
204
|
-
for (const flag of [
|
|
210
|
+
for (const flag of [
|
|
211
|
+
"rulePackageConsistencyCheck",
|
|
212
|
+
"technologyStackProfile",
|
|
213
|
+
"thinkphpDeepProfile",
|
|
214
|
+
"htmlToClientMigrationPreparation",
|
|
215
|
+
"namedInitializationTaskTree",
|
|
216
|
+
"taskArchiveTransactions",
|
|
217
|
+
"codeGraphRequiredInitialization",
|
|
218
|
+
"roleExecutionVisibility",
|
|
219
|
+
]) {
|
|
205
220
|
addCheck(target, "registry.manifest", "manifest", capabilities[flag] === true ? "pass" : "fail", "init/xinyun-ai-init/templates/manifest.template.json", `capabilities.${flag}`, true, capabilities[flag], "Manifest capability registered.", "Register the missing capability.");
|
|
206
221
|
}
|
|
207
222
|
|
|
@@ -238,6 +253,30 @@ function validateRegistries(root, target) {
|
|
|
238
253
|
|
|
239
254
|
addCheck(target, "registry.project-index", "project-index", projectIndex.frameworkProfile && projectIndex.frameworkProfile.enabled === true ? "pass" : "fail", "init/xinyun-ai-init/templates/project-index.template.json", "frameworkProfile.enabled", true, projectIndex.frameworkProfile && projectIndex.frameworkProfile.enabled, "Project-index framework profile registered.", "Register frameworkProfile.");
|
|
240
255
|
addCheck(target, "registry.project-index", "project-index", projectIndex.htmlMigration && projectIndex.htmlMigration.enabled === true ? "pass" : "fail", "init/xinyun-ai-init/templates/project-index.template.json", "htmlMigration.enabled", true, projectIndex.htmlMigration && projectIndex.htmlMigration.enabled, "Project-index HTML migration registered.", "Register htmlMigration.");
|
|
256
|
+
addCheck(target, "registry.manifest", "manifest", manifest.taskTree && manifest.taskTree.enabled === true ? "pass" : "fail", "init/xinyun-ai-init/templates/manifest.template.json", "taskTree.enabled", true, manifest.taskTree && manifest.taskTree.enabled, "Manifest task tree registered.", "Register taskTree.");
|
|
257
|
+
addCheck(target, "registry.project-index", "project-index", projectIndex.taskTree && projectIndex.taskTree.enabled === true ? "pass" : "fail", "init/xinyun-ai-init/templates/project-index.template.json", "taskTree.enabled", true, projectIndex.taskTree && projectIndex.taskTree.enabled, "Project-index task tree registered.", "Register taskTree.");
|
|
258
|
+
addCheck(target, "registry.manifest", "manifest", manifest.codeGraphRequired && manifest.codeGraphRequired.required === true ? "pass" : "fail", "init/xinyun-ai-init/templates/manifest.template.json", "codeGraphRequired.required", true, manifest.codeGraphRequired && manifest.codeGraphRequired.required, "Manifest CodeGraph required record registered.", "Register codeGraphRequired.");
|
|
259
|
+
addCheck(target, "registry.project-index", "project-index", projectIndex.codeGraphRequired && projectIndex.codeGraphRequired.required === true ? "pass" : "fail", "init/xinyun-ai-init/templates/project-index.template.json", "codeGraphRequired.required", true, projectIndex.codeGraphRequired && projectIndex.codeGraphRequired.required, "Project-index CodeGraph required record registered.", "Register codeGraphRequired.");
|
|
260
|
+
|
|
261
|
+
const v171TaskingPaths = {
|
|
262
|
+
"tasking.taskIndex": manifest.tasking && manifest.tasking.taskIndex,
|
|
263
|
+
"tasking.archiveDirectory": manifest.tasking && manifest.tasking.archiveDirectory,
|
|
264
|
+
"tasking.archiveTransactionsDirectory": manifest.tasking && manifest.tasking.archiveTransactionsDirectory,
|
|
265
|
+
"tasking.archiveTempDirectory": manifest.tasking && manifest.tasking.archiveTempDirectory,
|
|
266
|
+
"tasking.roleExecutionDirectory": manifest.tasking && manifest.tasking.roleExecutionDirectory,
|
|
267
|
+
};
|
|
268
|
+
const v171ExpectedPaths = {
|
|
269
|
+
"tasking.taskIndex": "xinyun-ai/tasks/task-index.json",
|
|
270
|
+
"tasking.archiveDirectory": "xinyun-ai/tasks/archive/",
|
|
271
|
+
"tasking.archiveTransactionsDirectory": "xinyun-ai/tasks/.archive-transactions/",
|
|
272
|
+
"tasking.archiveTempDirectory": "xinyun-ai/tasks/.archive-tmp/",
|
|
273
|
+
"tasking.roleExecutionDirectory": "xinyun-ai/tasks/role-execution/",
|
|
274
|
+
};
|
|
275
|
+
for (const [field, expected] of Object.entries(v171ExpectedPaths)) {
|
|
276
|
+
addCheck(target, "registry.manifest", "manifest", v171TaskingPaths[field] === expected ? "pass" : "fail", "init/xinyun-ai-init/templates/manifest.template.json", field, expected, v171TaskingPaths[field], "Manifest v1.7.1 tasking path checked.", "Register v1.7.1 tasking path.");
|
|
277
|
+
}
|
|
278
|
+
addCheck(target, "registry.manifest", "manifest", manifest.taskTree && manifest.taskTree.roleExecutionPathPattern === "xinyun-ai/tasks/role-execution/<roleTaskId>.md" ? "pass" : "fail", "init/xinyun-ai-init/templates/manifest.template.json", "taskTree.roleExecutionPathPattern", "xinyun-ai/tasks/role-execution/<roleTaskId>.md", manifest.taskTree && manifest.taskTree.roleExecutionPathPattern, "Manifest role execution path checked.", "Register the role execution path.");
|
|
279
|
+
addCheck(target, "registry.project-index", "project-index", projectIndex.taskTree && projectIndex.taskTree.roleExecutionPathPattern === "xinyun-ai/tasks/role-execution/<roleTaskId>.md" ? "pass" : "fail", "init/xinyun-ai-init/templates/project-index.template.json", "taskTree.roleExecutionPathPattern", "xinyun-ai/tasks/role-execution/<roleTaskId>.md", projectIndex.taskTree && projectIndex.taskTree.roleExecutionPathPattern, "Project-index role execution path checked.", "Register the role execution path.");
|
|
241
280
|
}
|
|
242
281
|
|
|
243
282
|
function validateV17Content(root, target) {
|
|
@@ -259,21 +298,73 @@ function validateV17Content(root, target) {
|
|
|
259
298
|
"scope/unverifiedScope",
|
|
260
299
|
"pauseReason=out-of-scope",
|
|
261
300
|
];
|
|
262
|
-
requireIncludes(root, target, "init/xinyun-ai-init/README.md", ["当前规则版本:`1.7.
|
|
301
|
+
requireIncludes(root, target, "init/xinyun-ai-init/README.md", ["当前规则版本:`1.7.2`", ...common]);
|
|
263
302
|
requireIncludes(root, target, "init/xinyun-ai-init/templates/core-rules.template.md", common);
|
|
264
303
|
requireIncludes(root, target, "init/xinyun-ai-init/templates/AGENTS.template.md", ["v1.7 规则包一致性、技术栈 profile 与 HTML 迁移准备", "`verify:rules` 只读", "ThinkPHP 不得误套其他项目", ...common.slice(5)]);
|
|
265
304
|
requireIncludes(root, target, "init/xinyun-ai-init/templates/current-task.template.md", ["verify:rules.status", "language", "runtime", "platform", "framework", ...common.slice(5)]);
|
|
266
305
|
requireIncludes(root, target, "init/xinyun-ai-init/templates/project-guide.template.md", ["verify:rules", "language / runtime / platform / framework", "migration-record.json", ...common.slice(5)]);
|
|
267
306
|
requireIncludes(root, target, "init/xinyun-ai-init/templates/project-check.template.md", ["`npm run verify:rules`", "source-only version-plans", "migration-record.json", ...common.slice(5)]);
|
|
268
307
|
requireIncludes(root, target, "init/xinyun-ai-init/rules/init-rules.md", ["v1.7 初始化补齐", "xinyun-ai/frameworks/", "xinyun-ai/migrations/html-to-client/", "`verify:rules` 为只读校验"]);
|
|
269
|
-
requireIncludes(root, target, "init/xinyun-ai-init/rules/upgrade-rules.md", ["v1.7 规则包升级检查", "test-scenarios/v1.7.
|
|
308
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/upgrade-rules.md", ["v1.7 规则包升级检查", "test-scenarios/v1.7.1-scenarios.md", "source-only version-plans", "frameworkProfile", "htmlMigration"]);
|
|
270
309
|
requireIncludes(root, target, "init/xinyun-ai-init/rules/directory-self-completion.md", ["v1.7 按需目录补齐", "framework-profile.json", "migration-record.json", "首次极速初始化不强制创建上述目录"]);
|
|
271
310
|
requireIncludes(root, target, "init/xinyun-ai-init/rules/session-workbench.md", ["v1.7 任务单补充字段", "verifyRulesStatus", "migrationStatus", "HTML 迁移只允许评估和单页面 / 区块试点计划"]);
|
|
272
311
|
requireIncludes(root, target, "init/xinyun-ai-init/rules/frameworks/README.md", ["v1.7 技术栈 profile", "coverage=partial", ...common.slice(5, 10)]);
|
|
273
312
|
requireIncludes(root, target, "init/xinyun-ai-init/rules/frameworks/backend/php/thinkphp.md", ["v1.7 ThinkPHP 深化模块", "frameworkStatus=confirmed", "moduleStatus=loaded", "Controller", "Request/Validate", "Service", "Model/ORM", "Middleware", "队列"]);
|
|
274
|
-
requireIncludes(root, target, "test-scenarios/scenarios.md", ["当前必测场景为 1-
|
|
275
|
-
requireIncludes(root, target, "test-scenarios/review-template.md", ["55. verify:rules 正常通过", "69. verify:rules JSON schema 和重复执行", "
|
|
276
|
-
requireIncludes(root, target, "test-scenarios/README.md", ["npm run verify:rules", "pm_zhousl-xinyun-ai-init-1.7.
|
|
313
|
+
requireIncludes(root, target, "test-scenarios/scenarios.md", ["当前必测场景为 1-87", "当前观察场景为 88", "## 55. verify:rules 正常通过", "## 69. verify:rules JSON schema 和重复执行"]);
|
|
314
|
+
requireIncludes(root, target, "test-scenarios/review-template.md", ["55. verify:rules 正常通过", "69. verify:rules JSON schema 和重复执行", "88. Skill 触发测试"]);
|
|
315
|
+
requireIncludes(root, target, "test-scenarios/README.md", ["npm run verify:rules", "pm_zhousl-xinyun-ai-init-1.7.2.tgz", "v1.7.2-scenarios.md", "当前必测场景为 `scenarios.md` 的 1-87", "当前观察场景为 `scenarios.md` 的 88"]);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function validateV171Content(root, target) {
|
|
319
|
+
const snippets = [
|
|
320
|
+
"项目初始化:<项目显示名>",
|
|
321
|
+
"xinyun-ai/tasks/task-index.json",
|
|
322
|
+
"xinyun-ai/tasks/.archive-transactions/<archiveTransactionId>.json",
|
|
323
|
+
"taskKind=initialization-record",
|
|
324
|
+
"taskKind=role-execution",
|
|
325
|
+
"executionEligible",
|
|
326
|
+
"status=idle",
|
|
327
|
+
"taskId=null",
|
|
328
|
+
"title=暂无待执行任务",
|
|
329
|
+
"codeGraphRecordId",
|
|
330
|
+
"codegraph init -i",
|
|
331
|
+
"permission-denied",
|
|
332
|
+
"degradationAuthorized",
|
|
333
|
+
];
|
|
334
|
+
requireIncludes(root, target, "init/xinyun-ai-init/README.md", ["v1.7.1 初始化主任务、角色子任务与归档", "v1.7.1 CodeGraph 必备初始化与状态闭环", ...snippets]);
|
|
335
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/core-rules.template.md", ["v1.7.1 初始化主任务、角色子任务与归档", "v1.7.1 CodeGraph 必备初始化与状态闭环", ...snippets]);
|
|
336
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/AGENTS.template.md", ["v1.7.1 初始化任务树与 CodeGraph", ...snippets.slice(0, 11)]);
|
|
337
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/current-task.template.md", ["初始化任务树", "任务归档", "CodeGraph 必备初始化", "currentTaskIdleStatus:status=idle, taskId=null, title=暂无待执行任务"]);
|
|
338
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/project-guide.template.md", ["v1.7.1 初始化任务树、归档与 CodeGraph"]);
|
|
339
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/project-check.template.md", ["v1.7.1 检查", "CodeGraph 失败矩阵"]);
|
|
340
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/init-rules.md", ["v1.7.1 初始化任务树与 CodeGraph"]);
|
|
341
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/upgrade-rules.md", ["v1.7.1 升级补齐"]);
|
|
342
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/directory-self-completion.md", ["v1.7.1 任务树、归档与 CodeGraph 目录"]);
|
|
343
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/session-workbench.md", ["v1.7.1 任务单补充字段"]);
|
|
344
|
+
requireIncludes(root, target, "test-scenarios/scenarios.md", ["当前必测场景为 1-87", "当前观察场景为 88", "## 71. v1.7.1 主任务命名", "## 87. v1.7.1 普通咨询和版本回归"]);
|
|
345
|
+
requireIncludes(root, target, "test-scenarios/v1.7.1-scenarios.md", ["主任务命名", "CodeGraph记录与失败矩阵", "普通咨询边界"]);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
function validateV172Content(root, target) {
|
|
349
|
+
const snippets = [
|
|
350
|
+
"v1.7.2 初始化后角色任务可见性与执行任务分离",
|
|
351
|
+
"xinyun-ai/tasks/role-execution/<roleTaskId>.md",
|
|
352
|
+
"taskKind=initialization-main",
|
|
353
|
+
"taskKind=initialization-record",
|
|
354
|
+
"taskKind=role-execution",
|
|
355
|
+
"activeTaskIds",
|
|
356
|
+
"executableTaskIds",
|
|
357
|
+
"priority ASC",
|
|
358
|
+
"JCS-SHA-256",
|
|
359
|
+
"blockedReason=write-failed",
|
|
360
|
+
];
|
|
361
|
+
requireIncludes(root, target, "init/xinyun-ai-init/README.md", ["当前规则版本:`1.7.2`", ...snippets]);
|
|
362
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/core-rules.template.md", snippets);
|
|
363
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/init-rules.md", ["v1.7.2 角色后续任务可见性", "role-execution"]);
|
|
364
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/upgrade-rules.md", ["v1.7.2 升级补建角色后续任务", "write-failed"]);
|
|
365
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/directory-self-completion.md", ["v1.7.2 任务可见性目录", "role-execution"]);
|
|
366
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/session-workbench.md", ["v1.7.2 角色执行任务补充字段", "roleExecutionResult"]);
|
|
367
|
+
requireIncludes(root, target, "test-scenarios/v1.7.2-scenarios.md", ["固定优先级", "幂等补建", "补建失败和索引恢复"]);
|
|
277
368
|
}
|
|
278
369
|
|
|
279
370
|
function validateJsonFiles(root, target) {
|
|
@@ -284,6 +375,8 @@ function validateJsonFiles(root, target) {
|
|
|
284
375
|
"init/xinyun-ai-init/templates/project-index.template.json",
|
|
285
376
|
"init/xinyun-ai-init/templates/framework-profile.template.json",
|
|
286
377
|
"init/xinyun-ai-init/templates/html-migration-record.template.json",
|
|
378
|
+
"init/xinyun-ai-init/templates/task-index.template.json",
|
|
379
|
+
"init/xinyun-ai-init/templates/archive-transaction.template.json",
|
|
287
380
|
];
|
|
288
381
|
|
|
289
382
|
for (const file of jsonFiles) {
|
|
@@ -309,6 +402,8 @@ function validateRoot(root, target, isTarball = false) {
|
|
|
309
402
|
validateTarballSecurityContract(root, target);
|
|
310
403
|
validateRegistries(root, target);
|
|
311
404
|
validateV17Content(root, target);
|
|
405
|
+
validateV171Content(root, target);
|
|
406
|
+
validateV172Content(root, target);
|
|
312
407
|
validateJsonFiles(root, target);
|
|
313
408
|
}
|
|
314
409
|
|
|
@@ -494,3 +589,4 @@ function main() {
|
|
|
494
589
|
}
|
|
495
590
|
|
|
496
591
|
main();
|
|
592
|
+
|
package/test-scenarios/README.md
CHANGED
|
@@ -37,7 +37,7 @@ npm pack
|
|
|
37
37
|
随后在临时项目中使用 tarball 测试。注意不要直接执行 `npx <tarball> --force`,该形式可能不会正确调用 bin。推荐:
|
|
38
38
|
|
|
39
39
|
```powershell
|
|
40
|
-
npx --yes --package E:\ai-fabu-xiangmu\AI开发初始化脚本\xinyun-ai-init-npm\pm_zhousl-xinyun-ai-init-1.7.
|
|
40
|
+
npx --yes --package E:\ai-fabu-xiangmu\AI开发初始化脚本\xinyun-ai-init-npm\pm_zhousl-xinyun-ai-init-1.7.2.tgz xinyun-ai-init --force --no-version-check
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### 3. 线上回归测试
|
|
@@ -59,9 +59,9 @@ npx --yes @pm_zhousl/xinyun-ai-init@latest --force
|
|
|
59
59
|
- 必测场景:用于判断当前版本是否可以发布。
|
|
60
60
|
- 观察场景:用于收集后续优化建议,不作为当前版本发布阻断项。
|
|
61
61
|
|
|
62
|
-
当前必测场景为 `scenarios.md` 的 1-
|
|
62
|
+
当前必测场景为 `scenarios.md` 的 1-87。
|
|
63
63
|
|
|
64
|
-
当前观察场景为 `scenarios.md` 的
|
|
64
|
+
当前观察场景为 `scenarios.md` 的 88。Skill 触发机制仍在后续候选池中,不进入当前可发布范围。
|
|
65
65
|
|
|
66
66
|
## v1.7 规则包一致性校验
|
|
67
67
|
|
|
@@ -70,7 +70,7 @@ npx --yes @pm_zhousl/xinyun-ai-init@latest --force
|
|
|
70
70
|
```powershell
|
|
71
71
|
npm run verify:rules
|
|
72
72
|
npm run verify:rules -- --json
|
|
73
|
-
npm run verify:rules -- --tarball .\pm_zhousl-xinyun-ai-init-1.7.
|
|
73
|
+
npm run verify:rules -- --tarball .\pm_zhousl-xinyun-ai-init-1.7.2.tgz
|
|
74
74
|
npm run verify:rules:security
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -85,6 +85,10 @@ npm run verify:init
|
|
|
85
85
|
|
|
86
86
|
自动校验负责检查包体文件、模板关键规则、JSON 可解析、Markdown 代码块闭合和 CLI 边界。人工场景负责验证 AI 在真实项目里的行为。
|
|
87
87
|
|
|
88
|
+
## v1.7.2 角色任务可见性回归
|
|
89
|
+
|
|
90
|
+
除 `scenarios.md` 外,发布前必须逐条执行 `v1.7.2-scenarios.md`。重点验证已归档的 v1.7.1 项目能补建 5 个 `role-execution` 任务,活动任务不被错误显示为 idle,重复升级按逐角色幂等键复用,索引中断后可恢复。
|
|
91
|
+
|
|
88
92
|
## 审查原则
|
|
89
93
|
|
|
90
94
|
- 重点看 AI 行为是否符合规则,不只看文件是否生成。
|
|
@@ -94,3 +98,5 @@ npm run verify:init
|
|
|
94
98
|
- 普通聊天、无关问题、被否定方向不能沉淀。
|
|
95
99
|
- 观察场景可以记录问题和建议,但不要因为观察场景未完全满足而判定当前版本不可发布。
|
|
96
100
|
- 本地待发布版本、打包版本、线上 `@latest` 要分开测试,避免把线上旧版本误判为本地整改结果。
|
|
101
|
+
|
|
102
|
+
|