@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
|
@@ -90,8 +90,40 @@
|
|
|
90
90
|
- coverage 是否为 full / partial / unknown:待填写
|
|
91
91
|
- scope/unverifiedScope 是否包含 itemId / path / itemType / reason / checkedAt:待填写
|
|
92
92
|
- 越界是否进入 `status=paused` + `pauseReason=out-of-scope`:待填写
|
|
93
|
+
|
|
94
|
+
## v1.7.1 检查
|
|
95
|
+
|
|
96
|
+
- 主任务标题是否为 `项目初始化:<项目显示名>`:待填写
|
|
97
|
+
- current-task、主任务、init-result、task-index 的 taskId/title/status 是否一致:待填写
|
|
98
|
+
- 是否生成 5 个角色子任务:待填写
|
|
99
|
+
- 子任务是否包含 roleTaskId、parentTaskId、taskKind、memberId、sessionId:待填写
|
|
100
|
+
- 未绑定成员或会话是否使用 null:待填写
|
|
101
|
+
- initialization-record 是否与 role-execution 分离:待填写
|
|
102
|
+
- executionEligible 是否未被伪造为 true:待填写
|
|
103
|
+
- `xinyun-ai/tasks/task-index.json` 是否可解析:待填写
|
|
104
|
+
- activeTaskIds / executableTaskIds / archivedTaskIds / currentTaskId 是否一致:待填写
|
|
105
|
+
- 初始化控制面完成后是否归档:待填写
|
|
106
|
+
- `xinyun-ai/tasks/.archive-transactions/<archiveTransactionId>.json` 是否存在:待填写
|
|
107
|
+
- archive phase 是否为 prepared / validated / moved / indexed / committed / recovery-required / blocked:待填写
|
|
108
|
+
- 归档中断恢复是否不丢历史、不重复移动:待填写
|
|
109
|
+
- 无任务时 current-task 是否为 status=idle、taskId=null、title=暂无待执行任务:待填写
|
|
110
|
+
- `.codegraph/` 是否按授权边界处理:待填写
|
|
111
|
+
- CodeGraph 首次缺失且命令可用时是否执行 `codegraph init -i`:待填写
|
|
112
|
+
- 健康 CodeGraph 索引是否复用:待填写
|
|
113
|
+
- CodeGraph 状态是否为 initialized / healthy / missing / unavailable / permission-denied / failed / unknown:待填写
|
|
114
|
+
- manifest 是否为 CodeGraph 状态源:待填写
|
|
115
|
+
- project-index/current-task/init-result 是否引用同一 codeGraphRecordId:待填写
|
|
116
|
+
- CodeGraph 失败矩阵是否正确进入 blocked 或明确授权 partial:待填写
|
|
117
|
+
- 是否未自动安装 CodeGraph、修改系统环境、业务代码、数据库、API、配置、依赖或 Git:待填写
|
|
93
118
|
## v1.7 machine-readable enum anchors
|
|
94
119
|
|
|
120
|
+
## v1.7.2 checks
|
|
121
|
+
|
|
122
|
+
- 归档后是否保留五个 role-execution 活动任务:待填写
|
|
123
|
+
- activeTaskIds 非空且 executableTaskIds 为空时是否指向最高优先级任务:待填写
|
|
124
|
+
- 重复升级是否按逐角色 JCS-SHA-256 幂等键复用:待填写
|
|
125
|
+
- 单角色失败是否为 blocked/write-failed,索引中断是否可恢复:待填写
|
|
126
|
+
|
|
95
127
|
- frameworkStatus=confirmed/inferred/not-found/unknown/detected-unsupported
|
|
96
128
|
- moduleStatus=loaded/not-loaded
|
|
97
129
|
- activation=loaded/not-loaded
|
|
@@ -179,9 +179,36 @@
|
|
|
179
179
|
- decision:direct-map / rewrite-required / backend-required / unsupported / pending / unknown。
|
|
180
180
|
- status:planned / assessing / partial / blocked / paused / completed。
|
|
181
181
|
- coverage:full / partial / unknown。
|
|
182
|
+
|
|
183
|
+
## v1.7.1 初始化任务树、归档与 CodeGraph
|
|
184
|
+
|
|
185
|
+
- 主任务标题:项目初始化:<项目显示名>
|
|
186
|
+
- 主任务文件:`xinyun-ai/tasks/<taskId>.md`
|
|
187
|
+
- 角色子任务目录:`xinyun-ai/tasks/<taskId>/subtasks/`
|
|
188
|
+
- 角色子任务数量:5
|
|
189
|
+
- taskKind:initialization-record / role-execution
|
|
190
|
+
- executionEligible:false / true
|
|
191
|
+
- task-index.json:`xinyun-ai/tasks/task-index.json`
|
|
192
|
+
- 当前任务空闲状态:status=idle, taskId=null, title=暂无待执行任务
|
|
193
|
+
- 归档目录:`xinyun-ai/tasks/archive/<taskId>/`
|
|
194
|
+
- 归档事务:`xinyun-ai/tasks/.archive-transactions/<archiveTransactionId>.json`
|
|
195
|
+
- archive phase:prepared / validated / moved / indexed / committed / recovery-required / blocked
|
|
196
|
+
- codeGraphRecordId:待填写
|
|
197
|
+
- CodeGraph required:true
|
|
198
|
+
- CodeGraph status:initialized / healthy / missing / unavailable / permission-denied / failed / unknown
|
|
199
|
+
- CodeGraph command:codegraph init -i
|
|
200
|
+
- CodeGraph 降级授权:degradationAuthorized=true / false
|
|
182
201
|
- scope/unverifiedScope:每项至少包含 itemId / path / itemType / reason / checkedAt。
|
|
183
202
|
## v1.7 machine-readable enum anchors
|
|
184
203
|
|
|
204
|
+
## v1.7.2 role execution anchors
|
|
205
|
+
|
|
206
|
+
- role-execution:xinyun-ai/tasks/role-execution/<roleTaskId>.md
|
|
207
|
+
- activeTaskIds / executableTaskIds:活动任务与可执行任务分离
|
|
208
|
+
- priority ASC / createdAt ASC / roleId Unicode / taskId:稳定排序
|
|
209
|
+
- idempotencyKey:JCS-SHA-256(sourceTaskId, roleId, taskKind, targetVersion)
|
|
210
|
+
- activeTaskIds 非空时 current-task 不得为 idle/null
|
|
211
|
+
|
|
185
212
|
- frameworkStatus=confirmed/inferred/not-found/unknown/detected-unsupported
|
|
186
213
|
- moduleStatus=loaded/not-loaded
|
|
187
214
|
- activation=loaded/not-loaded
|
|
@@ -88,6 +88,11 @@
|
|
|
88
88
|
"currentTask": "xinyun-ai/current-task.md",
|
|
89
89
|
"tasksDirectory": "xinyun-ai/tasks/",
|
|
90
90
|
"idempotencyDirectory": "xinyun-ai/tasks/.idempotency/",
|
|
91
|
+
"taskIndex": "xinyun-ai/tasks/task-index.json",
|
|
92
|
+
"archiveDirectory": "xinyun-ai/tasks/archive/",
|
|
93
|
+
"archiveTransactionsDirectory": "xinyun-ai/tasks/.archive-transactions/",
|
|
94
|
+
"archiveTempDirectory": "xinyun-ai/tasks/.archive-tmp/",
|
|
95
|
+
"roleExecutionDirectory": "xinyun-ai/tasks/role-execution/",
|
|
91
96
|
"initResult": "xinyun-ai/init-result.json",
|
|
92
97
|
"taskLock": "xinyun-ai/task-lock.json",
|
|
93
98
|
"managedBaseline": "xinyun-ai/index/managed-baseline.json",
|
|
@@ -100,6 +105,49 @@
|
|
|
100
105
|
"lockStatus": ["active", "waiting", "blocked", "unknown", "released"]
|
|
101
106
|
}
|
|
102
107
|
},
|
|
108
|
+
"taskTree": {
|
|
109
|
+
"enabled": true,
|
|
110
|
+
"mainTaskTitlePattern": "项目初始化:<项目显示名>",
|
|
111
|
+
"roleTaskCount": 5,
|
|
112
|
+
"taskIndex": "xinyun-ai/tasks/task-index.json",
|
|
113
|
+
"mainTaskPathPattern": "xinyun-ai/tasks/<taskId>.md",
|
|
114
|
+
"roleSubtaskPathPattern": "xinyun-ai/tasks/<taskId>/subtasks/<roleTaskId>.md",
|
|
115
|
+
"roleExecutionPathPattern": "xinyun-ai/tasks/role-execution/<roleTaskId>.md",
|
|
116
|
+
"archiveDirectory": "xinyun-ai/tasks/archive/",
|
|
117
|
+
"archiveTransactionsDirectory": "xinyun-ai/tasks/.archive-transactions/",
|
|
118
|
+
"currentTaskIdle": {
|
|
119
|
+
"status": "idle",
|
|
120
|
+
"taskId": null,
|
|
121
|
+
"title": "暂无待执行任务"
|
|
122
|
+
},
|
|
123
|
+
"roleExecution": {
|
|
124
|
+
"directory": "xinyun-ai/tasks/role-execution/",
|
|
125
|
+
"taskKind": "role-execution",
|
|
126
|
+
"priority": {
|
|
127
|
+
"project-owner": 10,
|
|
128
|
+
"project-product": 20,
|
|
129
|
+
"chief-engineer": 30,
|
|
130
|
+
"programmer": 40,
|
|
131
|
+
"test-reviewer": 50
|
|
132
|
+
},
|
|
133
|
+
"sortOrder": ["priority", "createdAt", "roleId", "taskId"]
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"codeGraphRequired": {
|
|
137
|
+
"codeGraphRecordId": null,
|
|
138
|
+
"required": true,
|
|
139
|
+
"status": "unknown",
|
|
140
|
+
"statusEnum": ["initialized", "healthy", "missing", "unavailable", "permission-denied", "failed", "unknown"],
|
|
141
|
+
"command": "codegraph init -i",
|
|
142
|
+
"version": null,
|
|
143
|
+
"indexPath": ".codegraph/",
|
|
144
|
+
"initializedAt": null,
|
|
145
|
+
"checkedAt": null,
|
|
146
|
+
"evidence": [],
|
|
147
|
+
"failureReason": null,
|
|
148
|
+
"degradationAuthorized": false,
|
|
149
|
+
"statusSource": "xinyun-ai/manifest.json"
|
|
150
|
+
},
|
|
103
151
|
"delivery": {
|
|
104
152
|
"confirmationGate": true,
|
|
105
153
|
"productionCopyMode": "restrained",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# 角色后续执行任务
|
|
2
|
+
|
|
3
|
+
- taskId:role-execution-task-template
|
|
4
|
+
- roleTaskId:role-task-template
|
|
5
|
+
- parentTaskId:task-template
|
|
6
|
+
- roleId:project-owner
|
|
7
|
+
- taskKind:role-execution
|
|
8
|
+
- title:角色后续执行:project-owner
|
|
9
|
+
- priority:10
|
|
10
|
+
- status:pending
|
|
11
|
+
- assignmentStatus:pending
|
|
12
|
+
- understandingStatus:pending
|
|
13
|
+
- confirmationStatus:pending
|
|
14
|
+
- memberId:null
|
|
15
|
+
- sessionId:null
|
|
16
|
+
- executionEligible:false
|
|
17
|
+
- blockedReason:member-unassigned
|
|
18
|
+
- nextAction:绑定成员、完成职责确认和项目理解后再执行
|
|
19
|
+
- sourceTaskId:task-template
|
|
20
|
+
- idempotencyKey:
|
|
21
|
+
- createdAt:2026-07-21T00:00:00.000Z
|
|
22
|
+
- updatedAt:2026-07-21T00:00:00.000Z
|
|
23
|
+
|
|
24
|
+
## 状态与可见性
|
|
25
|
+
|
|
26
|
+
- `taskKind=role-execution` 表示角色后续实际执行任务,不表示已经获得业务代码修改授权。
|
|
27
|
+
- 未绑定成员、职责确认待处理或理解未完成时,任务仍属于 `activeTaskIds`,但不得进入 `executableTaskIds`。
|
|
28
|
+
- `executionEligible=true` 必须同时满足成员绑定、角色 ready、职责 confirmed、理解 ready、确认人不冲突和 CodeGraph 必备条件。
|
|
29
|
+
- 待分配任务使用 `status=pending`;权限、冲突、写入失败或不可恢复错误使用 `status=blocked`,并填写 `blockedReason` 和 `nextAction`。
|
|
30
|
+
- `sourceTaskId` 指向已经归档的初始化主任务;角色任务完成前不得加入 `archivedTaskIds`。
|
|
31
|
+
|
|
32
|
+
## 幂等
|
|
33
|
+
|
|
34
|
+
- `idempotencyKey` 是对 `{sourceTaskId, roleId, taskKind, targetVersion}` 使用 v1.6 JCS 规范化 JSON 后计算的 SHA-256。
|
|
35
|
+
- 同一幂等键只允许对应一个角色后续任务;重复升级必须复用任务并补齐索引。
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 角色子任务
|
|
2
|
+
|
|
3
|
+
- taskId:role-task-template
|
|
4
|
+
- roleTaskId:role-task-template
|
|
5
|
+
- parentTaskId:task-template
|
|
6
|
+
- title:角色登记:project-owner
|
|
7
|
+
- roleId:project-owner
|
|
8
|
+
- memberId:null
|
|
9
|
+
- sessionId:null
|
|
10
|
+
- taskKind:initialization-record
|
|
11
|
+
- assignmentStatus:completed
|
|
12
|
+
- status:completed
|
|
13
|
+
- readScope:xinyun-ai/team/; xinyun-ai/project/; xinyun-ai/current-task.md
|
|
14
|
+
- understandingStatus:pending
|
|
15
|
+
- understandingRecordId:xinyun-ai/team/understandings/project-owner.md
|
|
16
|
+
- confirmationStatus:pending
|
|
17
|
+
- confirmationRecordId:xinyun-ai/team/confirmations/project-owner.md
|
|
18
|
+
- executionEligible:false
|
|
19
|
+
- blockedReason:null
|
|
20
|
+
- createdAt:2026-07-20T00:00:00.000Z
|
|
21
|
+
- updatedAt:2026-07-20T00:00:00.000Z
|
|
22
|
+
|
|
23
|
+
## 状态说明
|
|
24
|
+
|
|
25
|
+
- taskKind=initialization-record 只表示角色任务登记完成。
|
|
26
|
+
- taskKind=role-execution 才表示角色实际执行任务。
|
|
27
|
+
- memberId 或 sessionId 未绑定时必须使用 null,不得虚构人员或外部会话。
|
|
28
|
+
- 登记完成不等于职责确认完成、角色理解完成或 executionEligible=true。
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"activeTaskIds": [],
|
|
4
|
+
"executableTaskIds": [],
|
|
5
|
+
"archivedTaskIds": [],
|
|
6
|
+
"currentTaskId": null,
|
|
7
|
+
"roleExecutionDirectory": "xinyun-ai/tasks/role-execution/",
|
|
8
|
+
"roleExecutionTaskIds": [],
|
|
9
|
+
"roleExecutionStatusEnum": ["pending", "assigned", "accepted", "executing", "paused", "blocked", "completed", "cancelled"],
|
|
10
|
+
"roleExecutionPriority": {
|
|
11
|
+
"project-owner": 10,
|
|
12
|
+
"project-product": 20,
|
|
13
|
+
"chief-engineer": 30,
|
|
14
|
+
"programmer": 40,
|
|
15
|
+
"test-reviewer": 50
|
|
16
|
+
},
|
|
17
|
+
"taskSortOrder": ["priority", "createdAt", "roleId", "taskId"],
|
|
18
|
+
"currentTaskPolicy": {
|
|
19
|
+
"idleWhenActiveTaskIdsEmpty": true,
|
|
20
|
+
"activeButNotExecutableStatus": ["pending", "blocked"],
|
|
21
|
+
"idleTaskId": null
|
|
22
|
+
},
|
|
23
|
+
"idempotency": {
|
|
24
|
+
"keyFields": ["sourceTaskId", "roleId", "taskKind", "targetVersion"],
|
|
25
|
+
"algorithm": "JCS-SHA-256",
|
|
26
|
+
"duplicatePolicy": "reuse"
|
|
27
|
+
},
|
|
28
|
+
"tasks": [],
|
|
29
|
+
"archiveTransactions": [],
|
|
30
|
+
"statusEnum": ["pending", "executing", "partial", "blocked", "completed", "cancelled"],
|
|
31
|
+
"idleCurrentTask": {
|
|
32
|
+
"status": "idle",
|
|
33
|
+
"taskId": null,
|
|
34
|
+
"title": "暂无待执行任务"
|
|
35
|
+
},
|
|
36
|
+
"updatedAt": "2026-07-20T00:00:00.000Z"
|
|
37
|
+
}
|
|
@@ -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