@pm_zhousl/xinyun-ai-init 1.7.0 → 1.7.1
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 +59 -3
- package/init/xinyun-ai-init/rules/directory-self-completion.md +9 -0
- package/init/xinyun-ai-init/rules/init-rules.md +17 -0
- package/init/xinyun-ai-init/rules/session-workbench.md +24 -0
- package/init/xinyun-ai-init/rules/upgrade-rules.md +12 -0
- package/init/xinyun-ai-init/templates/AGENTS.template.md +19 -1
- package/init/xinyun-ai-init/templates/archive-transaction.template.json +15 -0
- package/init/xinyun-ai-init/templates/core-rules.template.md +32 -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 +38 -3
- package/init/xinyun-ai-init/templates/project-check.template.md +25 -0
- package/init/xinyun-ai-init/templates/project-guide.template.md +19 -0
- package/init/xinyun-ai-init/templates/project-index.template.json +34 -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 +16 -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 +1 -1
- package/scripts/verify-init-package.js +151 -22
- package/scripts/verify-rules-package.js +75 -9
- package/test-scenarios/README.md +6 -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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"activeTaskIds": [],
|
|
4
|
+
"executableTaskIds": [],
|
|
5
|
+
"archivedTaskIds": [],
|
|
6
|
+
"currentTaskId": null,
|
|
7
|
+
"tasks": [],
|
|
8
|
+
"archiveTransactions": [],
|
|
9
|
+
"statusEnum": ["pending", "executing", "partial", "blocked", "completed", "cancelled"],
|
|
10
|
+
"idleCurrentTask": {
|
|
11
|
+
"status": "idle",
|
|
12
|
+
"taskId": null,
|
|
13
|
+
"title": "暂无待执行任务"
|
|
14
|
+
},
|
|
15
|
+
"updatedAt": "2026-07-20T00:00:00.000Z"
|
|
16
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# 项目初始化主任务
|
|
2
|
+
|
|
3
|
+
- taskId:task-template
|
|
4
|
+
- title:项目初始化:当前项目
|
|
5
|
+
- taskType:workspace-initialization
|
|
6
|
+
- projectName:当前项目
|
|
7
|
+
- status:pending
|
|
8
|
+
- taskKind:initialization-main
|
|
9
|
+
- roleCount:5
|
|
10
|
+
- childTaskIds:[]
|
|
11
|
+
- createdFiles:[]
|
|
12
|
+
- nextAction:
|
|
13
|
+
- codeGraphRecordId:null
|
|
14
|
+
- codeGraphStatus:unknown
|
|
15
|
+
- archiveTransactionId:null
|
|
16
|
+
- createdAt:2026-07-20T00:00:00.000Z
|
|
17
|
+
- updatedAt:2026-07-20T00:00:00.000Z
|
|
18
|
+
|
|
19
|
+
## 子任务汇总
|
|
20
|
+
|
|
21
|
+
- project-owner:
|
|
22
|
+
- project-product:
|
|
23
|
+
- chief-engineer:
|
|
24
|
+
- programmer:
|
|
25
|
+
- test-reviewer:
|
|
26
|
+
|
|
27
|
+
## 归档摘要
|
|
28
|
+
|
|
29
|
+
- archivePath:
|
|
30
|
+
- archiveReason:
|
|
31
|
+
- completedAt:
|
|
32
|
+
- historyPreserved:true
|
package/package.json
CHANGED
|
@@ -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.1",
|
|
107
|
+
packageJson.version === "1.7.1",
|
|
108
108
|
`当前版本为 ${packageJson.version}`
|
|
109
109
|
);
|
|
110
110
|
addCheck(
|
|
111
|
-
"version.json 版本为 1.
|
|
112
|
-
versionJson.version === "1.7.
|
|
111
|
+
"version.json 版本为 1.7.1",
|
|
112
|
+
versionJson.version === "1.7.1",
|
|
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.1",
|
|
117
|
+
manifestTemplate.xinyunAiVersion === "1.7.1",
|
|
118
118
|
`当前版本为 ${manifestTemplate.xinyunAiVersion}`
|
|
119
119
|
);
|
|
120
120
|
}
|
|
@@ -469,23 +469,34 @@ 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.1.tgz",
|
|
487
|
+
"1-87",
|
|
488
|
+
"88",
|
|
487
489
|
"npm run verify:rules",
|
|
488
490
|
]);
|
|
491
|
+
|
|
492
|
+
requireIncludes("test-scenarios/v1.7.1-scenarios.md", [
|
|
493
|
+
"主任务命名",
|
|
494
|
+
"角色登记与执行资格分离",
|
|
495
|
+
"归档原子性和任务索引",
|
|
496
|
+
"CodeGraph初始化授权边界",
|
|
497
|
+
"CodeGraph记录与失败矩阵",
|
|
498
|
+
"普通咨询边界",
|
|
499
|
+
]);
|
|
489
500
|
}
|
|
490
501
|
function verifyFrameworkRules() {
|
|
491
502
|
const required = [
|
|
@@ -730,7 +741,7 @@ function verifyV16Contracts() {
|
|
|
730
741
|
]);
|
|
731
742
|
|
|
732
743
|
requireIncludes("init/xinyun-ai-init/README.md", [
|
|
733
|
-
"当前规则版本:`1.7.
|
|
744
|
+
"当前规则版本:`1.7.1`",
|
|
734
745
|
"v1.6 初始化任务、幂等恢复与结果记录",
|
|
735
746
|
"xinyun-ai/tasks/.idempotency/",
|
|
736
747
|
"xinyun-ai/init-result.json",
|
|
@@ -930,7 +941,7 @@ function verifyV16Contracts() {
|
|
|
930
941
|
}
|
|
931
942
|
|
|
932
943
|
addCheck("init-result mode 为 initialization", initResult.mode === "initialization");
|
|
933
|
-
addCheck("init-result targetVersion=1.7.
|
|
944
|
+
addCheck("init-result targetVersion=1.7.1", initResult.targetVersion === "1.7.1");
|
|
934
945
|
addCheck("init-result businessCodeChanged 初始为 unknown", initResult.businessCodeChanged && initResult.businessCodeChanged.value === "unknown");
|
|
935
946
|
addCheck("task-lock scope=xinyun-ai-control", taskLock.scope === "xinyun-ai-control");
|
|
936
947
|
addCheck("task-lock audit 包含 released", Array.isArray(taskLock.audit) && taskLock.audit.some((item) => item.action === "released"));
|
|
@@ -966,7 +977,7 @@ function verifyV17Contracts() {
|
|
|
966
977
|
"init/xinyun-ai-init/templates/html-migration-open-issues.template.md",
|
|
967
978
|
"init/xinyun-ai-init/templates/html-migration-record.template.json",
|
|
968
979
|
"scripts/verify-rules-package.js",
|
|
969
|
-
"test-scenarios/v1.7.
|
|
980
|
+
"test-scenarios/v1.7.1-scenarios.md",
|
|
970
981
|
];
|
|
971
982
|
|
|
972
983
|
for (const file of requiredTemplates) {
|
|
@@ -1036,7 +1047,7 @@ function verifyV17Contracts() {
|
|
|
1036
1047
|
addCheck("html migration pilot requires separate confirmation", htmlMigration.pilotPlan && htmlMigration.pilotPlan.requiresSeparateConfirmation === true);
|
|
1037
1048
|
|
|
1038
1049
|
requireIncludes("init/xinyun-ai-init/README.md", [
|
|
1039
|
-
"当前规则版本:`1.7.
|
|
1050
|
+
"当前规则版本:`1.7.1`",
|
|
1040
1051
|
"v1.7 规则包一致性检查与 verify:rules",
|
|
1041
1052
|
"frameworkStatus=confirmed/inferred/not-found/unknown/detected-unsupported",
|
|
1042
1053
|
"v1.7 深化预算:5 层目录、80 个关键文件、100 条证据",
|
|
@@ -1055,21 +1066,137 @@ function verifyV17Contracts() {
|
|
|
1055
1066
|
]);
|
|
1056
1067
|
|
|
1057
1068
|
requireIncludes("test-scenarios/scenarios.md", [
|
|
1058
|
-
"当前必测场景为 1-
|
|
1059
|
-
"当前观察场景为
|
|
1069
|
+
"当前必测场景为 1-87",
|
|
1070
|
+
"当前观察场景为 88",
|
|
1060
1071
|
"## 55. verify:rules 正常通过",
|
|
1061
1072
|
"## 69. verify:rules JSON schema 和重复执行",
|
|
1062
|
-
"##
|
|
1073
|
+
"## 88. Skill 触发测试",
|
|
1063
1074
|
]);
|
|
1064
1075
|
|
|
1065
1076
|
requireIncludes("test-scenarios/README.md", [
|
|
1066
|
-
"pm_zhousl-xinyun-ai-init-1.7.
|
|
1067
|
-
"当前必测场景为 `scenarios.md` 的 1-
|
|
1068
|
-
"当前观察场景为 `scenarios.md` 的
|
|
1077
|
+
"pm_zhousl-xinyun-ai-init-1.7.1.tgz",
|
|
1078
|
+
"当前必测场景为 `scenarios.md` 的 1-87",
|
|
1079
|
+
"当前观察场景为 `scenarios.md` 的 88",
|
|
1069
1080
|
"npm run verify:rules",
|
|
1070
1081
|
]);
|
|
1071
1082
|
}
|
|
1072
1083
|
|
|
1084
|
+
function verifyV171Contracts() {
|
|
1085
|
+
const manifestTemplate = JSON.parse(readText("init/xinyun-ai-init/templates/manifest.template.json"));
|
|
1086
|
+
const projectIndexTemplate = JSON.parse(readText("init/xinyun-ai-init/templates/project-index.template.json"));
|
|
1087
|
+
const initResult = JSON.parse(readText("init/xinyun-ai-init/templates/init-result.template.json"));
|
|
1088
|
+
const taskIndex = JSON.parse(readText("init/xinyun-ai-init/templates/task-index.template.json"));
|
|
1089
|
+
const archiveTransaction = JSON.parse(readText("init/xinyun-ai-init/templates/archive-transaction.template.json"));
|
|
1090
|
+
|
|
1091
|
+
const requiredTemplates = [
|
|
1092
|
+
"init/xinyun-ai-init/templates/task-index.template.json",
|
|
1093
|
+
"init/xinyun-ai-init/templates/task-main.template.md",
|
|
1094
|
+
"init/xinyun-ai-init/templates/role-subtask.template.md",
|
|
1095
|
+
"init/xinyun-ai-init/templates/archive-transaction.template.json",
|
|
1096
|
+
"test-scenarios/v1.7.1-scenarios.md",
|
|
1097
|
+
];
|
|
1098
|
+
for (const file of requiredTemplates) requireFile(file);
|
|
1099
|
+
|
|
1100
|
+
for (const flag of ["namedInitializationTaskTree", "taskArchiveTransactions", "codeGraphRequiredInitialization"]) {
|
|
1101
|
+
addCheck(
|
|
1102
|
+
`manifest capabilities 包含 ${flag}`,
|
|
1103
|
+
manifestTemplate.capabilities && manifestTemplate.capabilities[flag] === true,
|
|
1104
|
+
`manifest.template.json 未声明 ${flag}`
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
const taskingPaths = {
|
|
1109
|
+
taskIndex: "xinyun-ai/tasks/task-index.json",
|
|
1110
|
+
archiveDirectory: "xinyun-ai/tasks/archive/",
|
|
1111
|
+
archiveTransactionsDirectory: "xinyun-ai/tasks/.archive-transactions/",
|
|
1112
|
+
archiveTempDirectory: "xinyun-ai/tasks/.archive-tmp/",
|
|
1113
|
+
};
|
|
1114
|
+
for (const [key, value] of Object.entries(taskingPaths)) {
|
|
1115
|
+
addCheck(`manifest v1.7.1 tasking 路径 ${key}`, manifestTemplate.tasking && manifestTemplate.tasking[key] === value, `manifest tasking.${key} 应为 ${value}`);
|
|
1116
|
+
addCheck(`project-index v1.7.1 tasking 路径 ${key}`, projectIndexTemplate.tasking && projectIndexTemplate.tasking[key] === value, `project-index tasking.${key} 应为 ${value}`);
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
addCheck("manifest taskTree enabled", manifestTemplate.taskTree && manifestTemplate.taskTree.enabled === true, "manifest.taskTree.enabled 应为 true");
|
|
1120
|
+
addCheck("project-index taskTree enabled", projectIndexTemplate.taskTree && projectIndexTemplate.taskTree.enabled === true, "project-index.taskTree.enabled 应为 true");
|
|
1121
|
+
addCheck("taskTree 主任务标题模式", manifestTemplate.taskTree && manifestTemplate.taskTree.mainTaskTitlePattern === "项目初始化:<项目显示名>", "主任务标题模式不一致");
|
|
1122
|
+
addCheck("taskTree 角色任务数为 5", manifestTemplate.taskTree && manifestTemplate.taskTree.roleTaskCount === 5, "roleTaskCount 应为 5");
|
|
1123
|
+
|
|
1124
|
+
addCheck("task-index activeTaskIds 数组", Array.isArray(taskIndex.activeTaskIds), "activeTaskIds 必须是数组");
|
|
1125
|
+
addCheck("task-index executableTaskIds 数组", Array.isArray(taskIndex.executableTaskIds), "executableTaskIds 必须是数组");
|
|
1126
|
+
addCheck("task-index archivedTaskIds 数组", Array.isArray(taskIndex.archivedTaskIds), "archivedTaskIds 必须是数组");
|
|
1127
|
+
addCheck("task-index idle status", taskIndex.idleCurrentTask && taskIndex.idleCurrentTask.status === "idle", "idleCurrentTask.status 应为 idle");
|
|
1128
|
+
addCheck("task-index idle taskId null", taskIndex.idleCurrentTask && taskIndex.idleCurrentTask.taskId === null, "idleCurrentTask.taskId 应为 null");
|
|
1129
|
+
addCheck("task-index idle title", taskIndex.idleCurrentTask && taskIndex.idleCurrentTask.title === "暂无待执行任务", "idle 标题不一致");
|
|
1130
|
+
|
|
1131
|
+
const phases = ["prepared", "validated", "moved", "indexed", "committed", "recovery-required", "blocked"];
|
|
1132
|
+
addCheck("archive transaction phase prepared", archiveTransaction.phase === "prepared", "归档事务默认 phase 应为 prepared");
|
|
1133
|
+
addCheck("archive transaction phase enum 完整", phases.every((phase) => archiveTransaction.phaseEnum && archiveTransaction.phaseEnum.includes(phase)), "归档事务 phaseEnum 缺少必需状态");
|
|
1134
|
+
|
|
1135
|
+
const codeGraphStatuses = ["initialized", "healthy", "missing", "unavailable", "permission-denied", "failed", "unknown"];
|
|
1136
|
+
addCheck("manifest CodeGraph required", manifestTemplate.codeGraphRequired && manifestTemplate.codeGraphRequired.required === true, "manifest CodeGraph required 应为 true");
|
|
1137
|
+
addCheck("project-index CodeGraph required", projectIndexTemplate.codeGraphRequired && projectIndexTemplate.codeGraphRequired.required === true, "project-index CodeGraph required 应为 true");
|
|
1138
|
+
addCheck("manifest CodeGraph status enum 完整", codeGraphStatuses.every((status) => manifestTemplate.codeGraphRequired && manifestTemplate.codeGraphRequired.statusEnum.includes(status)), "CodeGraph statusEnum 缺少状态");
|
|
1139
|
+
addCheck("manifest CodeGraph command", manifestTemplate.codeGraphRequired && manifestTemplate.codeGraphRequired.command === "codegraph init -i", "CodeGraph command 应为 codegraph init -i");
|
|
1140
|
+
addCheck("init-result CodeGraph required", initResult.codeGraph && initResult.codeGraph.required === true, "init-result CodeGraph required 应为 true");
|
|
1141
|
+
addCheck("init-result CodeGraph command", initResult.codeGraph && initResult.codeGraph.command === "codegraph init -i", "init-result CodeGraph command 不一致");
|
|
1142
|
+
addCheck("init-result taskTree role count", initResult.taskTree && initResult.taskTree.roleTaskCount === 5, "init-result taskTree.roleTaskCount 应为 5");
|
|
1143
|
+
|
|
1144
|
+
requireIncludes("init/xinyun-ai-init/README.md", [
|
|
1145
|
+
"当前规则版本:`1.7.1`",
|
|
1146
|
+
"项目初始化:<项目显示名>",
|
|
1147
|
+
"xinyun-ai/tasks/task-index.json",
|
|
1148
|
+
"xinyun-ai/tasks/.archive-transactions/<archiveTransactionId>.json",
|
|
1149
|
+
"taskKind=initialization-record",
|
|
1150
|
+
"taskKind=role-execution",
|
|
1151
|
+
"status=idle",
|
|
1152
|
+
"taskId=null",
|
|
1153
|
+
"title=暂无待执行任务",
|
|
1154
|
+
"codeGraphRecordId",
|
|
1155
|
+
"codegraph init -i",
|
|
1156
|
+
"permission-denied",
|
|
1157
|
+
"MCP 未连接或健康状态无法确认=`unknown`",
|
|
1158
|
+
]);
|
|
1159
|
+
|
|
1160
|
+
requireIncludes("init/xinyun-ai-init/templates/core-rules.template.md", [
|
|
1161
|
+
"v1.7.1 初始化主任务、角色子任务与归档",
|
|
1162
|
+
"v1.7.1 CodeGraph 必备初始化与状态闭环",
|
|
1163
|
+
"项目初始化:<项目显示名>",
|
|
1164
|
+
"xinyun-ai/tasks/<taskId>/subtasks/<roleTaskId>.md",
|
|
1165
|
+
"executionEligible=true",
|
|
1166
|
+
"xinyun-ai/tasks/archive/<taskId>/",
|
|
1167
|
+
"prepared",
|
|
1168
|
+
"recovery-required",
|
|
1169
|
+
"codeGraphRecordId",
|
|
1170
|
+
"degradationAuthorized=true",
|
|
1171
|
+
]);
|
|
1172
|
+
|
|
1173
|
+
requireIncludes("init/xinyun-ai-init/templates/AGENTS.template.md", [
|
|
1174
|
+
"v1.7.1 初始化任务树与 CodeGraph",
|
|
1175
|
+
"项目初始化:<项目显示名>",
|
|
1176
|
+
"xinyun-ai/tasks/task-index.json",
|
|
1177
|
+
"xinyun-ai/tasks/.archive-transactions/<archiveTransactionId>.json",
|
|
1178
|
+
"codeGraphRecordId",
|
|
1179
|
+
"codegraph init -i",
|
|
1180
|
+
]);
|
|
1181
|
+
|
|
1182
|
+
requireIncludes("init/xinyun-ai-init/templates/current-task.template.md", [
|
|
1183
|
+
"初始化任务树",
|
|
1184
|
+
"任务归档",
|
|
1185
|
+
"CodeGraph 必备初始化",
|
|
1186
|
+
"currentTaskIdleStatus:status=idle, taskId=null, title=暂无待执行任务",
|
|
1187
|
+
"codeGraphRecordId",
|
|
1188
|
+
]);
|
|
1189
|
+
|
|
1190
|
+
requireIncludes("init/xinyun-ai-init/rules/init-rules.md", [
|
|
1191
|
+
"v1.7.1 初始化任务树与 CodeGraph",
|
|
1192
|
+
"xinyun-ai/tasks/task-index.json",
|
|
1193
|
+
"codegraph init -i",
|
|
1194
|
+
]);
|
|
1195
|
+
requireIncludes("init/xinyun-ai-init/rules/upgrade-rules.md", ["v1.7.1 升级补齐", "CodeGraph 状态闭环"]);
|
|
1196
|
+
requireIncludes("init/xinyun-ai-init/rules/directory-self-completion.md", ["v1.7.1 任务树、归档与 CodeGraph 目录"]);
|
|
1197
|
+
requireIncludes("init/xinyun-ai-init/rules/session-workbench.md", ["v1.7.1 任务单补充字段"]);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1073
1200
|
function verifyJsonAndMarkdown() {
|
|
1074
1201
|
const jsonFiles = walkFiles(initRoot).filter((filePath) => filePath.endsWith(".json"));
|
|
1075
1202
|
const mdFiles = walkFiles(initRoot).filter((filePath) => filePath.endsWith(".md"));
|
|
@@ -1095,6 +1222,7 @@ function main() {
|
|
|
1095
1222
|
verifyTeamTemplates();
|
|
1096
1223
|
verifyV16Contracts();
|
|
1097
1224
|
verifyV17Contracts();
|
|
1225
|
+
verifyV171Contracts();
|
|
1098
1226
|
verifyTestScenarios();
|
|
1099
1227
|
verifyJsonAndMarkdown();
|
|
1100
1228
|
|
|
@@ -1117,3 +1245,4 @@ function main() {
|
|
|
1117
1245
|
}
|
|
1118
1246
|
|
|
1119
1247
|
main();
|
|
1248
|
+
|
|
@@ -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.1";
|
|
9
9
|
const checks = [];
|
|
10
10
|
|
|
11
11
|
function parseArgs(argv) {
|
|
@@ -148,7 +148,7 @@ 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
152
|
"init/xinyun-ai-init/README.md",
|
|
153
153
|
"init/xinyun-ai-init/rules/frameworks/README.md",
|
|
154
154
|
"init/xinyun-ai-init/rules/frameworks/backend/php/thinkphp.md",
|
|
@@ -168,12 +168,16 @@ function validatePackageFiles(root, target, isTarball) {
|
|
|
168
168
|
"init/xinyun-ai-init/templates/html-migration-pilot-plan.template.md",
|
|
169
169
|
"init/xinyun-ai-init/templates/html-migration-open-issues.template.md",
|
|
170
170
|
"init/xinyun-ai-init/templates/html-migration-record.template.json",
|
|
171
|
+
"init/xinyun-ai-init/templates/task-index.template.json",
|
|
172
|
+
"init/xinyun-ai-init/templates/task-main.template.md",
|
|
173
|
+
"init/xinyun-ai-init/templates/role-subtask.template.md",
|
|
174
|
+
"init/xinyun-ai-init/templates/archive-transaction.template.json",
|
|
171
175
|
];
|
|
172
176
|
|
|
173
177
|
for (const file of requiredFiles) requireFile(root, target, file);
|
|
174
178
|
|
|
175
179
|
if (isTarball) {
|
|
176
|
-
const sourceOnly = "version-plans/releases/v1.7.
|
|
180
|
+
const sourceOnly = "version-plans/releases/v1.7.1.md";
|
|
177
181
|
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
182
|
}
|
|
179
183
|
}
|
|
@@ -201,7 +205,15 @@ function validateRegistries(root, target) {
|
|
|
201
205
|
const projectIndex = readJson(root, "init/xinyun-ai-init/templates/project-index.template.json");
|
|
202
206
|
const capabilities = manifest.capabilities || {};
|
|
203
207
|
|
|
204
|
-
for (const flag of [
|
|
208
|
+
for (const flag of [
|
|
209
|
+
"rulePackageConsistencyCheck",
|
|
210
|
+
"technologyStackProfile",
|
|
211
|
+
"thinkphpDeepProfile",
|
|
212
|
+
"htmlToClientMigrationPreparation",
|
|
213
|
+
"namedInitializationTaskTree",
|
|
214
|
+
"taskArchiveTransactions",
|
|
215
|
+
"codeGraphRequiredInitialization",
|
|
216
|
+
]) {
|
|
205
217
|
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
218
|
}
|
|
207
219
|
|
|
@@ -238,6 +250,26 @@ function validateRegistries(root, target) {
|
|
|
238
250
|
|
|
239
251
|
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
252
|
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.");
|
|
253
|
+
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.");
|
|
254
|
+
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.");
|
|
255
|
+
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.");
|
|
256
|
+
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.");
|
|
257
|
+
|
|
258
|
+
const v171TaskingPaths = {
|
|
259
|
+
"tasking.taskIndex": manifest.tasking && manifest.tasking.taskIndex,
|
|
260
|
+
"tasking.archiveDirectory": manifest.tasking && manifest.tasking.archiveDirectory,
|
|
261
|
+
"tasking.archiveTransactionsDirectory": manifest.tasking && manifest.tasking.archiveTransactionsDirectory,
|
|
262
|
+
"tasking.archiveTempDirectory": manifest.tasking && manifest.tasking.archiveTempDirectory,
|
|
263
|
+
};
|
|
264
|
+
const v171ExpectedPaths = {
|
|
265
|
+
"tasking.taskIndex": "xinyun-ai/tasks/task-index.json",
|
|
266
|
+
"tasking.archiveDirectory": "xinyun-ai/tasks/archive/",
|
|
267
|
+
"tasking.archiveTransactionsDirectory": "xinyun-ai/tasks/.archive-transactions/",
|
|
268
|
+
"tasking.archiveTempDirectory": "xinyun-ai/tasks/.archive-tmp/",
|
|
269
|
+
};
|
|
270
|
+
for (const [field, expected] of Object.entries(v171ExpectedPaths)) {
|
|
271
|
+
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.");
|
|
272
|
+
}
|
|
241
273
|
}
|
|
242
274
|
|
|
243
275
|
function validateV17Content(root, target) {
|
|
@@ -259,21 +291,51 @@ function validateV17Content(root, target) {
|
|
|
259
291
|
"scope/unverifiedScope",
|
|
260
292
|
"pauseReason=out-of-scope",
|
|
261
293
|
];
|
|
262
|
-
requireIncludes(root, target, "init/xinyun-ai-init/README.md", ["当前规则版本:`1.7.
|
|
294
|
+
requireIncludes(root, target, "init/xinyun-ai-init/README.md", ["当前规则版本:`1.7.1`", ...common]);
|
|
263
295
|
requireIncludes(root, target, "init/xinyun-ai-init/templates/core-rules.template.md", common);
|
|
264
296
|
requireIncludes(root, target, "init/xinyun-ai-init/templates/AGENTS.template.md", ["v1.7 规则包一致性、技术栈 profile 与 HTML 迁移准备", "`verify:rules` 只读", "ThinkPHP 不得误套其他项目", ...common.slice(5)]);
|
|
265
297
|
requireIncludes(root, target, "init/xinyun-ai-init/templates/current-task.template.md", ["verify:rules.status", "language", "runtime", "platform", "framework", ...common.slice(5)]);
|
|
266
298
|
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
299
|
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
300
|
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.
|
|
301
|
+
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
302
|
requireIncludes(root, target, "init/xinyun-ai-init/rules/directory-self-completion.md", ["v1.7 按需目录补齐", "framework-profile.json", "migration-record.json", "首次极速初始化不强制创建上述目录"]);
|
|
271
303
|
requireIncludes(root, target, "init/xinyun-ai-init/rules/session-workbench.md", ["v1.7 任务单补充字段", "verifyRulesStatus", "migrationStatus", "HTML 迁移只允许评估和单页面 / 区块试点计划"]);
|
|
272
304
|
requireIncludes(root, target, "init/xinyun-ai-init/rules/frameworks/README.md", ["v1.7 技术栈 profile", "coverage=partial", ...common.slice(5, 10)]);
|
|
273
305
|
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.
|
|
306
|
+
requireIncludes(root, target, "test-scenarios/scenarios.md", ["当前必测场景为 1-87", "当前观察场景为 88", "## 55. verify:rules 正常通过", "## 69. verify:rules JSON schema 和重复执行"]);
|
|
307
|
+
requireIncludes(root, target, "test-scenarios/review-template.md", ["55. verify:rules 正常通过", "69. verify:rules JSON schema 和重复执行", "88. Skill 触发测试"]);
|
|
308
|
+
requireIncludes(root, target, "test-scenarios/README.md", ["npm run verify:rules", "pm_zhousl-xinyun-ai-init-1.7.1.tgz", "当前必测场景为 `scenarios.md` 的 1-87", "当前观察场景为 `scenarios.md` 的 88"]);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
function validateV171Content(root, target) {
|
|
312
|
+
const snippets = [
|
|
313
|
+
"项目初始化:<项目显示名>",
|
|
314
|
+
"xinyun-ai/tasks/task-index.json",
|
|
315
|
+
"xinyun-ai/tasks/.archive-transactions/<archiveTransactionId>.json",
|
|
316
|
+
"taskKind=initialization-record",
|
|
317
|
+
"taskKind=role-execution",
|
|
318
|
+
"executionEligible",
|
|
319
|
+
"status=idle",
|
|
320
|
+
"taskId=null",
|
|
321
|
+
"title=暂无待执行任务",
|
|
322
|
+
"codeGraphRecordId",
|
|
323
|
+
"codegraph init -i",
|
|
324
|
+
"permission-denied",
|
|
325
|
+
"degradationAuthorized",
|
|
326
|
+
];
|
|
327
|
+
requireIncludes(root, target, "init/xinyun-ai-init/README.md", ["v1.7.1 初始化主任务、角色子任务与归档", "v1.7.1 CodeGraph 必备初始化与状态闭环", ...snippets]);
|
|
328
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/core-rules.template.md", ["v1.7.1 初始化主任务、角色子任务与归档", "v1.7.1 CodeGraph 必备初始化与状态闭环", ...snippets]);
|
|
329
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/AGENTS.template.md", ["v1.7.1 初始化任务树与 CodeGraph", ...snippets.slice(0, 11)]);
|
|
330
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/current-task.template.md", ["初始化任务树", "任务归档", "CodeGraph 必备初始化", "currentTaskIdleStatus:status=idle, taskId=null, title=暂无待执行任务"]);
|
|
331
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/project-guide.template.md", ["v1.7.1 初始化任务树、归档与 CodeGraph"]);
|
|
332
|
+
requireIncludes(root, target, "init/xinyun-ai-init/templates/project-check.template.md", ["v1.7.1 检查", "CodeGraph 失败矩阵"]);
|
|
333
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/init-rules.md", ["v1.7.1 初始化任务树与 CodeGraph"]);
|
|
334
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/upgrade-rules.md", ["v1.7.1 升级补齐"]);
|
|
335
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/directory-self-completion.md", ["v1.7.1 任务树、归档与 CodeGraph 目录"]);
|
|
336
|
+
requireIncludes(root, target, "init/xinyun-ai-init/rules/session-workbench.md", ["v1.7.1 任务单补充字段"]);
|
|
337
|
+
requireIncludes(root, target, "test-scenarios/scenarios.md", ["当前必测场景为 1-87", "当前观察场景为 88", "## 71. v1.7.1 主任务命名", "## 87. v1.7.1 普通咨询和版本回归"]);
|
|
338
|
+
requireIncludes(root, target, "test-scenarios/v1.7.1-scenarios.md", ["主任务命名", "CodeGraph记录与失败矩阵", "普通咨询边界"]);
|
|
277
339
|
}
|
|
278
340
|
|
|
279
341
|
function validateJsonFiles(root, target) {
|
|
@@ -284,6 +346,8 @@ function validateJsonFiles(root, target) {
|
|
|
284
346
|
"init/xinyun-ai-init/templates/project-index.template.json",
|
|
285
347
|
"init/xinyun-ai-init/templates/framework-profile.template.json",
|
|
286
348
|
"init/xinyun-ai-init/templates/html-migration-record.template.json",
|
|
349
|
+
"init/xinyun-ai-init/templates/task-index.template.json",
|
|
350
|
+
"init/xinyun-ai-init/templates/archive-transaction.template.json",
|
|
287
351
|
];
|
|
288
352
|
|
|
289
353
|
for (const file of jsonFiles) {
|
|
@@ -309,6 +373,7 @@ function validateRoot(root, target, isTarball = false) {
|
|
|
309
373
|
validateTarballSecurityContract(root, target);
|
|
310
374
|
validateRegistries(root, target);
|
|
311
375
|
validateV17Content(root, target);
|
|
376
|
+
validateV171Content(root, target);
|
|
312
377
|
validateJsonFiles(root, target);
|
|
313
378
|
}
|
|
314
379
|
|
|
@@ -494,3 +559,4 @@ function main() {
|
|
|
494
559
|
}
|
|
495
560
|
|
|
496
561
|
main();
|
|
562
|
+
|
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.1.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.1.tgz
|
|
74
74
|
npm run verify:rules:security
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -94,3 +94,5 @@ npm run verify:init
|
|
|
94
94
|
- 普通聊天、无关问题、被否定方向不能沉淀。
|
|
95
95
|
- 观察场景可以记录问题和建议,但不要因为观察场景未完全满足而判定当前版本不可发布。
|
|
96
96
|
- 本地待发布版本、打包版本、线上 `@latest` 要分开测试,避免把线上旧版本误判为本地整改结果。
|
|
97
|
+
|
|
98
|
+
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
| 51. v1.6-D 输入可信边界测试 | 待填写 | 待填写 | 待填写 |
|
|
74
74
|
| 52. v1.6-D 敏感信息脱敏测试 | 待填写 | 待填写 | 待填写 |
|
|
75
75
|
| 53. v1.6 tarball 自包含与 CLI 边界测试 | 待填写 | 待填写 | 待填写 |
|
|
76
|
-
| 54. Skill
|
|
76
|
+
| 54. Skill 触发测试(历史观察项,不阻断发布) | 待填写 | 待填写 | 待填写 |
|
|
77
77
|
|
|
78
78
|
## 详细问题
|
|
79
79
|
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
- 可以后续优化:
|
|
92
92
|
- 不建议纳入本版本:
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
说明:历史 Skill 触发测试是观察项。当前版本发布阻断以 1-87 必测场景为准。
|
|
95
95
|
## v1.7 审查增量行
|
|
96
96
|
|
|
97
97
|
| 场景 | 结果 | 证据 | 是否阻断 |
|
|
@@ -111,6 +111,25 @@
|
|
|
111
111
|
| 67. HTML 任务级 schema | 待填写 | 待填写 | 待填写 |
|
|
112
112
|
| 68. 试点越界暂停 | 待填写 | 待填写 | 待填写 |
|
|
113
113
|
| 69. verify:rules JSON schema 和重复执行 | 待填写 | 待填写 | 待填写 |
|
|
114
|
-
|
|
|
114
|
+
| 71. v1.7.1 主任务命名 | 待填写 | 待填写 | 待填写 |
|
|
115
|
+
| 72. v1.7.1 主任务字段一致性 | 待填写 | 待填写 | 待填写 |
|
|
116
|
+
| 73. v1.7.1 五个角色子任务 | 待填写 | 待填写 | 待填写 |
|
|
117
|
+
| 74. v1.7.1 角色任务字段和空绑定 | 待填写 | 待填写 | 待填写 |
|
|
118
|
+
| 75. v1.7.1 角色登记与执行资格分离 | 待填写 | 待填写 | 待填写 |
|
|
119
|
+
| 76. v1.7.1 初始化任务归档 | 待填写 | 待填写 | 待填写 |
|
|
120
|
+
| 77. v1.7.1 归档原子性和任务索引 | 待填写 | 待填写 | 待填写 |
|
|
121
|
+
| 78. v1.7.1 归档事务异常裁决 | 待填写 | 待填写 | 待填写 |
|
|
122
|
+
| 79. v1.7.1 子任务状态与主任务聚合 | 待填写 | 待填写 | 待填写 |
|
|
123
|
+
| 80. v1.7.1 当前任务清理 | 待填写 | 待填写 | 待填写 |
|
|
124
|
+
| 81. v1.7.1 初始化失败不归档 | 待填写 | 待填写 | 待填写 |
|
|
125
|
+
| 82. v1.7.1 归档幂等 | 待填写 | 待填写 | 待填写 |
|
|
126
|
+
| 83. v1.7.1 CodeGraph 首次初始化与授权边界 | 待填写 | 待填写 | 待填写 |
|
|
127
|
+
| 84. v1.7.1 CodeGraph 健康复用 | 待填写 | 待填写 | 待填写 |
|
|
128
|
+
| 85. v1.7.1 CodeGraph 失败矩阵 | 待填写 | 待填写 | 待填写 |
|
|
129
|
+
| 86. v1.7.1 CodeGraph 状态登记与去重 | 待填写 | 待填写 | 待填写 |
|
|
130
|
+
| 87. v1.7.1 普通咨询和版本回归 | 待填写 | 待填写 | 待填写 |
|
|
131
|
+
| 88. Skill 触发测试(观察项,不阻断发布) | 待填写 | 待填写 | 待填写 |
|
|
115
132
|
|
|
116
|
-
说明:Skill 触发测试是观察项。除非它影响 1-
|
|
133
|
+
说明:Skill 触发测试是观察项。除非它影响 1-87 的必测场景,否则不作为当前版本不可发布的理由。
|
|
134
|
+
|
|
135
|
+
|