@pm_zhousl/xinyun-ai-init 1.7.2 → 1.8.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/README.md +1 -1
- package/init/xinyun-ai-init/README.md +33 -1
- package/init/xinyun-ai-init/rules/coordination.md +33 -0
- package/init/xinyun-ai-init/rules/directory-self-completion.md +15 -0
- package/init/xinyun-ai-init/rules/frontend-audit.md +9 -0
- package/init/xinyun-ai-init/rules/init-rules.md +17 -0
- package/init/xinyun-ai-init/rules/session-workbench.md +27 -0
- package/init/xinyun-ai-init/rules/skills.md +15 -0
- package/init/xinyun-ai-init/rules/temporary-sessions.md +9 -0
- package/init/xinyun-ai-init/rules/upgrade-rules.md +16 -0
- package/init/xinyun-ai-init/templates/AGENTS.template.md +17 -0
- package/init/xinyun-ai-init/templates/coordination-change-ledger.template.json +10 -0
- package/init/xinyun-ai-init/templates/coordination-conflict-record.template.json +13 -0
- package/init/xinyun-ai-init/templates/coordination-contract-snapshot.template.json +9 -0
- package/init/xinyun-ai-init/templates/coordination-project-facts.template.json +9 -0
- package/init/xinyun-ai-init/templates/coordination-transaction.template.json +16 -0
- package/init/xinyun-ai-init/templates/core-rules.template.md +33 -0
- package/init/xinyun-ai-init/templates/current-task.template.md +37 -0
- package/init/xinyun-ai-init/templates/frontend-audit.template.json +27 -0
- package/init/xinyun-ai-init/templates/init-result.template.json +14 -1
- package/init/xinyun-ai-init/templates/managed-baseline.template.json +2 -2
- package/init/xinyun-ai-init/templates/manifest.template.json +85 -7
- package/init/xinyun-ai-init/templates/project-check.template.md +23 -0
- package/init/xinyun-ai-init/templates/project-guide.template.md +20 -0
- package/init/xinyun-ai-init/templates/project-index.template.json +58 -0
- package/init/xinyun-ai-init/templates/role-execution.template.md +18 -0
- package/init/xinyun-ai-init/templates/role-session-binding.template.json +43 -0
- package/init/xinyun-ai-init/templates/skills-assignments.template.json +19 -0
- package/init/xinyun-ai-init/templates/skills-registry.template.json +10 -0
- package/init/xinyun-ai-init/templates/task-index.template.json +8 -0
- package/init/xinyun-ai-init/templates/team/README.md +10 -0
- package/init/xinyun-ai-init/templates/team/assignments.json +6 -1
- package/init/xinyun-ai-init/templates/temporary-session.template.json +32 -0
- package/init/xinyun-ai-init/version.json +2 -2
- package/package.json +1 -1
- package/scripts/verify-init-package.js +237 -23
- package/scripts/verify-rules-package.js +119 -8
- package/test-scenarios/README.md +14 -4
- package/test-scenarios/review-template.md +23 -3
- package/test-scenarios/scenarios.md +112 -4
- package/test-scenarios/v1.7.3-scenarios.md +79 -0
- package/test-scenarios/v1.8.0-scenarios.md +39 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"projectName": "",
|
|
3
|
-
"xinyunAiVersion": "1.
|
|
4
|
-
"scriptVersion": "2026.07.
|
|
3
|
+
"xinyunAiVersion": "1.8.0",
|
|
4
|
+
"scriptVersion": "2026.07.23",
|
|
5
5
|
"schemaVersion": "1",
|
|
6
6
|
"initializationMode": "fast",
|
|
7
7
|
"expansionMode": "triggered",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"htmlToClientMigrationPreparation": true,
|
|
45
45
|
"namedInitializationTaskTree": true,
|
|
46
46
|
"taskArchiveTransactions": true,
|
|
47
|
-
"codeGraphRequiredInitialization": true
|
|
48
|
-
|
|
47
|
+
"codeGraphRequiredInitialization": true,
|
|
48
|
+
"roleExecutionVisibility": true,
|
|
49
|
+
"codexRoleSessionOrchestration": true,
|
|
50
|
+
"sharedProjectFactsCoordination": true,
|
|
51
|
+
"skillRouting": true,
|
|
52
|
+
"frontendCouplingAudit": true,
|
|
53
|
+
"temporaryProgrammerSessions": true
|
|
49
54
|
},
|
|
50
55
|
"tasking": {
|
|
51
56
|
"currentTask": "xinyun-ai/current-task.md",
|
|
@@ -62,9 +67,82 @@
|
|
|
62
67
|
"mainTaskTemplate": "xinyun-ai-init/templates/task-main.template.md",
|
|
63
68
|
"roleSubtaskTemplate": "xinyun-ai-init/templates/role-subtask.template.md",
|
|
64
69
|
"taskIndexTemplate": "xinyun-ai-init/templates/task-index.template.json",
|
|
65
|
-
"archiveTransactionTemplate": "xinyun-ai-init/templates/archive-transaction.template.json"
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
"archiveTransactionTemplate": "xinyun-ai-init/templates/archive-transaction.template.json",
|
|
71
|
+
"roleExecutionDirectory": "xinyun-ai/tasks/role-execution/",
|
|
72
|
+
"roleExecutionTemplate": "xinyun-ai-init/templates/role-execution.template.md",
|
|
73
|
+
"roleSessionBindings": "xinyun-ai/sessions/role-session-bindings.json",
|
|
74
|
+
"roleSessionBindingTemplate": "xinyun-ai-init/templates/role-session-binding.template.json"
|
|
75
|
+
},
|
|
76
|
+
"roleSessions": {
|
|
77
|
+
"enabled": true,
|
|
78
|
+
"provider": "codex",
|
|
79
|
+
"directory": "xinyun-ai/sessions/roles/",
|
|
80
|
+
"bindings": "xinyun-ai/sessions/role-session-bindings.json",
|
|
81
|
+
"bindingTemplate": "xinyun-ai-init/templates/role-session-binding.template.json",
|
|
82
|
+
"parentSessionId": null,
|
|
83
|
+
"targetVersion": "1.8.0",
|
|
84
|
+
"requiredRoleCount": 5,
|
|
85
|
+
"statusEnum": [
|
|
86
|
+
"pending",
|
|
87
|
+
"creating",
|
|
88
|
+
"created",
|
|
89
|
+
"onboarding",
|
|
90
|
+
"ready",
|
|
91
|
+
"blocked",
|
|
92
|
+
"failed",
|
|
93
|
+
"closed"
|
|
94
|
+
],
|
|
95
|
+
"idempotency": {
|
|
96
|
+
"keyFields": [
|
|
97
|
+
"taskId",
|
|
98
|
+
"roleId",
|
|
99
|
+
"provider",
|
|
100
|
+
"targetVersion"
|
|
101
|
+
],
|
|
102
|
+
"algorithm": "JCS-SHA-256",
|
|
103
|
+
"duplicatePolicy": "reuse"
|
|
104
|
+
},
|
|
105
|
+
"hostUnsupportedPolicy": "local-degraded-no-fake-session-id",
|
|
106
|
+
"readyPolicy": "created session enters onboarding first; ready requires role understanding, responsibility confirmation, and execution eligibility gates."
|
|
107
|
+
},
|
|
108
|
+
"coordination": {
|
|
109
|
+
"enabled": true,
|
|
110
|
+
"directory": "xinyun-ai/coordination/",
|
|
111
|
+
"projectFacts": "xinyun-ai/coordination/project-facts.json",
|
|
112
|
+
"changeLedger": "xinyun-ai/coordination/change-ledger.json",
|
|
113
|
+
"contractSnapshots": "xinyun-ai/coordination/contract-snapshots/",
|
|
114
|
+
"conflictRecords": "xinyun-ai/coordination/conflict-records/",
|
|
115
|
+
"transactions": "xinyun-ai/coordination/.transactions/",
|
|
116
|
+
"statusSources": {
|
|
117
|
+
"taskStatus": "xinyun-ai/tasks/task-index.json",
|
|
118
|
+
"changeStatus": "xinyun-ai/coordination/change-ledger.json",
|
|
119
|
+
"conflictStatus": "xinyun-ai/coordination/conflict-records/<conflictId>.json",
|
|
120
|
+
"refreshStatus": "affected task record"
|
|
121
|
+
},
|
|
122
|
+
"transactionPhaseEnum": ["prepared", "validated", "renamed", "revision-updated", "committed", "recovery-required", "blocked"]
|
|
123
|
+
},
|
|
124
|
+
"skills": {
|
|
125
|
+
"enabled": true,
|
|
126
|
+
"directory": "xinyun-ai/skills/",
|
|
127
|
+
"registry": "xinyun-ai/skills/registry.json",
|
|
128
|
+
"assignments": "xinyun-ai/skills/assignments.json",
|
|
129
|
+
"usageRecords": "xinyun-ai/skills/usage-records/",
|
|
130
|
+
"assignmentStatusField": "assignmentStatus",
|
|
131
|
+
"usageStatusField": "usageStatus"
|
|
132
|
+
},
|
|
133
|
+
"frontendAudit": {
|
|
134
|
+
"enabled": true,
|
|
135
|
+
"directory": "xinyun-ai/frontend-audits/",
|
|
136
|
+
"recordTemplate": "xinyun-ai-init/templates/frontend-audit.template.json",
|
|
137
|
+
"defaultDecision": "audit-only"
|
|
138
|
+
},
|
|
139
|
+
"temporarySessions": {
|
|
140
|
+
"enabled": true,
|
|
141
|
+
"directory": "xinyun-ai/sessions/temporary/",
|
|
142
|
+
"recordTemplate": "xinyun-ai-init/templates/temporary-session.template.json",
|
|
143
|
+
"maxConcurrent": 3,
|
|
144
|
+
"sessionStatusField": "status",
|
|
145
|
+
"occupancyStatusEnum": ["occupied", "released", "unknown"]
|
|
68
146
|
},
|
|
69
147
|
"taskTree": {
|
|
70
148
|
"enabled": true,
|
|
@@ -124,6 +124,21 @@
|
|
|
124
124
|
- 重复升级是否按逐角色 JCS-SHA-256 幂等键复用:待填写
|
|
125
125
|
- 单角色失败是否为 blocked/write-failed,索引中断是否可恢复:待填写
|
|
126
126
|
|
|
127
|
+
## v1.7.3 checks
|
|
128
|
+
|
|
129
|
+
- 是否创建或复用 5 个 Codex 真实角色会话:待填写
|
|
130
|
+
- `provider=codex` 是否一致:待填写
|
|
131
|
+
- `xinyun-ai/sessions/role-session-bindings.json` 是否可解析:待填写
|
|
132
|
+
- `xinyun-ai/sessions/roles/` 是否登记五个角色入口:待填写
|
|
133
|
+
- `sessionStatus` 是否只使用 pending / creating / created / onboarding / ready / blocked / failed / closed:待填写
|
|
134
|
+
- `roleSessionIdempotency` 是否为 taskId + roleId + provider + targetVersion:待填写
|
|
135
|
+
- 真实 `sessionId` 是否来自宿主返回值:待填写
|
|
136
|
+
- 是否不存在伪造 sessionId:待填写
|
|
137
|
+
- 创建后是否先进入只读 onboarding,未直接 ready:待填写
|
|
138
|
+
- 宿主不支持时是否记录 local-degraded-no-fake-session-id 且 sessionId=null:待填写
|
|
139
|
+
- created-but-writeback-failed 是否可恢复:待填写
|
|
140
|
+
- 普通咨询是否未创建角色会话或第三个会话:待填写
|
|
141
|
+
|
|
127
142
|
- frameworkStatus=confirmed/inferred/not-found/unknown/detected-unsupported
|
|
128
143
|
- moduleStatus=loaded/not-loaded
|
|
129
144
|
- activation=loaded/not-loaded
|
|
@@ -131,3 +146,11 @@
|
|
|
131
146
|
- decision=direct-map/rewrite-required/backend-required/unsupported/pending/unknown
|
|
132
147
|
- status=planned/assessing/partial/blocked/paused/completed
|
|
133
148
|
- coverage=full/partial/unknown
|
|
149
|
+
|
|
150
|
+
## v1.8 检查
|
|
151
|
+
|
|
152
|
+
- `xinyun-ai/coordination/` 的事实、台账、冲突和事务文件是否可追溯。
|
|
153
|
+
- 是否统一使用 `assignmentStatus`,且与 `usageStatus` 合法映射。
|
|
154
|
+
- 前端 audit-only 是否零 diff,refactor-now 是否有确认、哈希、diff 和测试证据。
|
|
155
|
+
- 临时会话是否遵守单变更域、并发上限 3、unknown occupancy 和 releaseAudit。
|
|
156
|
+
- 是否未执行自动安装依赖、业务代码修改、数据库/API改动或 Git 写操作。
|
|
@@ -209,9 +209,29 @@
|
|
|
209
209
|
- idempotencyKey:JCS-SHA-256(sourceTaskId, roleId, taskKind, targetVersion)
|
|
210
210
|
- activeTaskIds 非空时 current-task 不得为 idle/null
|
|
211
211
|
|
|
212
|
+
## v1.7.3 Codex role session anchors
|
|
213
|
+
|
|
214
|
+
- role session provider:provider=codex
|
|
215
|
+
- role session bindings:xinyun-ai/sessions/role-session-bindings.json
|
|
216
|
+
- role session directory:xinyun-ai/sessions/roles/
|
|
217
|
+
- sessionStatus:pending / creating / created / onboarding / ready / blocked / failed / closed
|
|
218
|
+
- roleSessionIdempotency:JCS-SHA-256(taskId, roleId, provider, targetVersion)
|
|
219
|
+
- parentSessionId:待填写
|
|
220
|
+
- real sessionId:待填写;不得伪造 sessionId
|
|
221
|
+
- onboarding:created 后先只读 onboarding,不能直接 ready
|
|
222
|
+
- host unsupported:local-degraded-no-fake-session-id
|
|
223
|
+
- created-but-writeback-failed:待填写恢复线索
|
|
224
|
+
|
|
212
225
|
- frameworkStatus=confirmed/inferred/not-found/unknown/detected-unsupported
|
|
213
226
|
- moduleStatus=loaded/not-loaded
|
|
214
227
|
- activation=loaded/not-loaded
|
|
215
228
|
- decision=direct-map/rewrite-required/backend-required/unsupported/pending/unknown
|
|
216
229
|
- status=planned/assessing/partial/blocked/paused/completed
|
|
217
230
|
- coverage=full/partial/unknown
|
|
231
|
+
|
|
232
|
+
## v1.8 协作能力
|
|
233
|
+
|
|
234
|
+
- 共享事实与冲突协调:`xinyun-ai/coordination/`;状态字段按 fact/change/conflict/task/refresh 分域。
|
|
235
|
+
- Skill 路由:`xinyun-ai/skills/`;正式字段为 `assignmentStatus` 与 `usageStatus`。
|
|
236
|
+
- 前端耦合审计:`xinyun-ai/frontend-audits/`;audit-only 零 diff。
|
|
237
|
+
- 临时程序员会话:最多 3 个并行运行额度;unknown occupancy 不自动释放。
|
|
@@ -133,6 +133,64 @@
|
|
|
133
133
|
"sortOrder": ["priority", "createdAt", "roleId", "taskId"]
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
+
"roleSessions": {
|
|
137
|
+
"enabled": true,
|
|
138
|
+
"provider": "codex",
|
|
139
|
+
"directory": "xinyun-ai/sessions/roles/",
|
|
140
|
+
"bindings": "xinyun-ai/sessions/role-session-bindings.json",
|
|
141
|
+
"bindingTemplate": "xinyun-ai-init/templates/role-session-binding.template.json",
|
|
142
|
+
"requiredRoleCount": 5,
|
|
143
|
+
"statusEnum": [
|
|
144
|
+
"pending",
|
|
145
|
+
"creating",
|
|
146
|
+
"created",
|
|
147
|
+
"onboarding",
|
|
148
|
+
"ready",
|
|
149
|
+
"blocked",
|
|
150
|
+
"failed",
|
|
151
|
+
"closed"
|
|
152
|
+
],
|
|
153
|
+
"records": []
|
|
154
|
+
},
|
|
155
|
+
"coordination": {
|
|
156
|
+
"enabled": true,
|
|
157
|
+
"directory": "xinyun-ai/coordination/",
|
|
158
|
+
"projectFacts": "xinyun-ai/coordination/project-facts.json",
|
|
159
|
+
"changeLedger": "xinyun-ai/coordination/change-ledger.json",
|
|
160
|
+
"contractSnapshots": "xinyun-ai/coordination/contract-snapshots/",
|
|
161
|
+
"conflictRecords": "xinyun-ai/coordination/conflict-records/",
|
|
162
|
+
"transactions": "xinyun-ai/coordination/.transactions/",
|
|
163
|
+
"statusSources": {
|
|
164
|
+
"taskStatus": "xinyun-ai/tasks/task-index.json",
|
|
165
|
+
"changeStatus": "xinyun-ai/coordination/change-ledger.json",
|
|
166
|
+
"conflictStatus": "xinyun-ai/coordination/conflict-records/<conflictId>.json",
|
|
167
|
+
"refreshStatus": "affected task record"
|
|
168
|
+
},
|
|
169
|
+
"transactionPhaseEnum": ["prepared", "validated", "renamed", "revision-updated", "committed", "recovery-required", "blocked"]
|
|
170
|
+
},
|
|
171
|
+
"skills": {
|
|
172
|
+
"enabled": true,
|
|
173
|
+
"directory": "xinyun-ai/skills/",
|
|
174
|
+
"registry": "xinyun-ai/skills/registry.json",
|
|
175
|
+
"assignments": "xinyun-ai/skills/assignments.json",
|
|
176
|
+
"usageRecords": "xinyun-ai/skills/usage-records/",
|
|
177
|
+
"assignmentStatusField": "assignmentStatus",
|
|
178
|
+
"usageStatusField": "usageStatus"
|
|
179
|
+
},
|
|
180
|
+
"frontendAudit": {
|
|
181
|
+
"enabled": true,
|
|
182
|
+
"directory": "xinyun-ai/frontend-audits/",
|
|
183
|
+
"recordTemplate": "xinyun-ai-init/templates/frontend-audit.template.json",
|
|
184
|
+
"defaultDecision": "audit-only"
|
|
185
|
+
},
|
|
186
|
+
"temporarySessions": {
|
|
187
|
+
"enabled": true,
|
|
188
|
+
"directory": "xinyun-ai/sessions/temporary/",
|
|
189
|
+
"recordTemplate": "xinyun-ai-init/templates/temporary-session.template.json",
|
|
190
|
+
"maxConcurrent": 3,
|
|
191
|
+
"sessionStatusField": "status",
|
|
192
|
+
"occupancyStatusEnum": ["occupied", "released", "unknown"]
|
|
193
|
+
},
|
|
136
194
|
"codeGraphRequired": {
|
|
137
195
|
"codeGraphRecordId": null,
|
|
138
196
|
"required": true,
|
|
@@ -13,11 +13,17 @@
|
|
|
13
13
|
- confirmationStatus:pending
|
|
14
14
|
- memberId:null
|
|
15
15
|
- sessionId:null
|
|
16
|
+
- parentSessionId:null
|
|
17
|
+
- provider:codex
|
|
18
|
+
- sessionStatus:pending
|
|
19
|
+
- sessionBindingId:
|
|
20
|
+
- sessionBindingPath:xinyun-ai/sessions/role-session-bindings.json
|
|
16
21
|
- executionEligible:false
|
|
17
22
|
- blockedReason:member-unassigned
|
|
18
23
|
- nextAction:绑定成员、完成职责确认和项目理解后再执行
|
|
19
24
|
- sourceTaskId:task-template
|
|
20
25
|
- idempotencyKey:
|
|
26
|
+
- sessionIdempotencyKey:
|
|
21
27
|
- createdAt:2026-07-21T00:00:00.000Z
|
|
22
28
|
- updatedAt:2026-07-21T00:00:00.000Z
|
|
23
29
|
|
|
@@ -29,7 +35,19 @@
|
|
|
29
35
|
- 待分配任务使用 `status=pending`;权限、冲突、写入失败或不可恢复错误使用 `status=blocked`,并填写 `blockedReason` 和 `nextAction`。
|
|
30
36
|
- `sourceTaskId` 指向已经归档的初始化主任务;角色任务完成前不得加入 `archivedTaskIds`。
|
|
31
37
|
|
|
38
|
+
## Codex 真实角色会话绑定
|
|
39
|
+
|
|
40
|
+
- v1.7.3 中,Codex 主会话在 5 个 `role-execution` 本地任务创建或恢复后,可以为 `project-owner`、`project-product`、`chief-engineer`、`programmer`、`test-reviewer` 固定创建 5 个真实角色子会话。
|
|
41
|
+
- 真实 `sessionId` 只能来自 Codex 宿主创建子会话后的返回值;不得使用 `taskId`、`roleTaskId`、随机占位字符串或本地模拟值冒充。
|
|
42
|
+
- 会话绑定字段至少包含 `taskId`、`roleId`、`sessionId`、`parentSessionId`、`provider`、`sessionStatus`、`createdAt`、`updatedAt`。
|
|
43
|
+
- 会话状态固定为 `pending/creating/created/onboarding/ready/blocked/failed/closed`。
|
|
44
|
+
- 会话创建成功后先进入 `sessionStatus=onboarding`,只读职责范围内资料并生成角色理解记录;不得因会话创建成功直接把任务标为 `ready` 或获得业务代码修改授权。
|
|
45
|
+
- 只有角色理解完成、职责确认完成、成员/会话绑定满足、确认人关系无冲突且执行门禁满足时,才允许 `sessionStatus=ready` 与 `executionEligible=true`。
|
|
46
|
+
- Codex 宿主不支持创建子会话、权限不足或创建失败时,必须保留 `sessionId=null`,记录 `sessionStatus=blocked/failed`、失败原因和本地降级说明,不得伪造会话。
|
|
47
|
+
|
|
32
48
|
## 幂等
|
|
33
49
|
|
|
34
50
|
- `idempotencyKey` 是对 `{sourceTaskId, roleId, taskKind, targetVersion}` 使用 v1.6 JCS 规范化 JSON 后计算的 SHA-256。
|
|
35
51
|
- 同一幂等键只允许对应一个角色后续任务;重复升级必须复用任务并补齐索引。
|
|
52
|
+
- `sessionIdempotencyKey` 是对 `{taskId, roleId, provider, targetVersion}` 使用 JCS 规范化 JSON 后计算的 SHA-256。
|
|
53
|
+
- 同一 `sessionIdempotencyKey` 只允许绑定一个有效真实角色会话;会话已创建但本地回写失败时,下次升级必须按该键查询并补齐绑定,不得创建第二个会话。
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"bindingId": "role-session-binding-template",
|
|
4
|
+
"taskId": "role-execution-task-template",
|
|
5
|
+
"roleId": "project-owner",
|
|
6
|
+
"sessionId": null,
|
|
7
|
+
"parentSessionId": null,
|
|
8
|
+
"provider": "codex",
|
|
9
|
+
"targetVersion": "1.8.0",
|
|
10
|
+
"sessionStatus": "pending",
|
|
11
|
+
"understandingStatus": "pending",
|
|
12
|
+
"confirmationStatus": "pending",
|
|
13
|
+
"executionEligible": false,
|
|
14
|
+
"idempotencyKey": null,
|
|
15
|
+
"hostCapability": "unknown",
|
|
16
|
+
"createdAt": "2026-07-22T00:00:00.000Z",
|
|
17
|
+
"updatedAt": "2026-07-22T00:00:00.000Z",
|
|
18
|
+
"createdBy": "main-session",
|
|
19
|
+
"onboarding": {
|
|
20
|
+
"readOnly": true,
|
|
21
|
+
"startedAt": null,
|
|
22
|
+
"completedAt": null,
|
|
23
|
+
"understandingRecord": null,
|
|
24
|
+
"readyRequires": [
|
|
25
|
+
"real sessionId returned by host",
|
|
26
|
+
"role understanding ready",
|
|
27
|
+
"responsibility confirmation confirmed",
|
|
28
|
+
"execution eligibility gates satisfied"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"failure": {
|
|
32
|
+
"blockedReason": null,
|
|
33
|
+
"failureReason": null,
|
|
34
|
+
"retryCount": 0,
|
|
35
|
+
"nextAction": null
|
|
36
|
+
},
|
|
37
|
+
"degradation": {
|
|
38
|
+
"localOnly": false,
|
|
39
|
+
"reason": null,
|
|
40
|
+
"fakeSessionIdProhibited": true
|
|
41
|
+
},
|
|
42
|
+
"audit": []
|
|
43
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"assignments": [],
|
|
4
|
+
"recordContract": {
|
|
5
|
+
"requiredFields": ["assignmentId", "skillId", "roleId", "taskId", "workstream", "matchReason", "permittedPaths", "assignmentStatus", "usageRecordId", "createdAt", "updatedAt"],
|
|
6
|
+
"assignmentStatusEnum": ["pending", "selected", "running", "completed", "fallback", "blocked", "cancelled"],
|
|
7
|
+
"usageStatusEnum": ["selected", "running", "completed", "failed", "skipped", "fallback", "blocked"],
|
|
8
|
+
"statusMapping": {
|
|
9
|
+
"pending": ["selected"],
|
|
10
|
+
"selected": ["selected", "running"],
|
|
11
|
+
"running": ["running"],
|
|
12
|
+
"completed": ["completed"],
|
|
13
|
+
"fallback": ["fallback"],
|
|
14
|
+
"blocked": ["failed", "blocked"],
|
|
15
|
+
"cancelled": ["skipped"]
|
|
16
|
+
},
|
|
17
|
+
"failedRule": "usageStatus=failed requires assignmentStatus=blocked, failureReason and nextAction"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"skills": [],
|
|
4
|
+
"recordContract": {
|
|
5
|
+
"requiredFields": ["skillId", "name", "version", "source", "digest", "description", "priority", "availabilityStatus", "trustStatus", "reviewedAt", "allowedRoles", "frameworks", "platforms", "dependencies", "permissions", "evidence", "fallbackPlan", "createdAt", "updatedAt"],
|
|
6
|
+
"availabilityStatusEnum": ["available", "unavailable", "disabled", "unknown"],
|
|
7
|
+
"trustStatusEnum": ["unreviewed", "reviewed", "blocked", "expired"]
|
|
8
|
+
},
|
|
9
|
+
"selectionOrder": ["project-binding", "framework-specific", "generic", "fallback"]
|
|
10
|
+
}
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
"currentTaskId": null,
|
|
7
7
|
"roleExecutionDirectory": "xinyun-ai/tasks/role-execution/",
|
|
8
8
|
"roleExecutionTaskIds": [],
|
|
9
|
+
"roleSessionBindingIds": [],
|
|
9
10
|
"roleExecutionStatusEnum": ["pending", "assigned", "accepted", "executing", "paused", "blocked", "completed", "cancelled"],
|
|
11
|
+
"roleSessionStatusEnum": ["pending", "creating", "created", "onboarding", "ready", "blocked", "failed", "closed"],
|
|
10
12
|
"roleExecutionPriority": {
|
|
11
13
|
"project-owner": 10,
|
|
12
14
|
"project-product": 20,
|
|
@@ -25,7 +27,13 @@
|
|
|
25
27
|
"algorithm": "JCS-SHA-256",
|
|
26
28
|
"duplicatePolicy": "reuse"
|
|
27
29
|
},
|
|
30
|
+
"roleSessionIdempotency": {
|
|
31
|
+
"keyFields": ["taskId", "roleId", "provider", "targetVersion"],
|
|
32
|
+
"algorithm": "JCS-SHA-256",
|
|
33
|
+
"duplicatePolicy": "reuse"
|
|
34
|
+
},
|
|
28
35
|
"tasks": [],
|
|
36
|
+
"roleSessionBindings": [],
|
|
29
37
|
"archiveTransactions": [],
|
|
30
38
|
"statusEnum": ["pending", "executing", "partial", "blocked", "completed", "cancelled"],
|
|
31
39
|
"idleCurrentTask": {
|
|
@@ -9,6 +9,16 @@
|
|
|
9
9
|
- `confirmations/<roleId>.md` 和 `understandings/<roleId>.md` 的 `createdAt`、`updatedAt` 必须存在且为 ISO 8601 时间;首次落盘可使用模板初始时间或替换为当前时间,但不得留空。
|
|
10
10
|
- `xinyun-ai/team/**` 属于 AI 工作区控制文件,不授权修改业务代码、数据库、API、依赖、构建脚本或执行发布操作。
|
|
11
11
|
|
|
12
|
+
## Codex 角色会话绑定
|
|
13
|
+
|
|
14
|
+
- v1.7.3 起,在 Codex 宿主支持创建子会话时,主会话可以为五个默认角色自动创建真实角色子会话,并把真实 `sessionId` 回写到角色任务、`assignments.json`、`task-index.json`、`manifest.json`、`project-index.json` 和 `xinyun-ai/sessions/role-session-bindings.json`。
|
|
15
|
+
- 固定角色为 `project-owner`、`project-product`、`chief-engineer`、`programmer`、`test-reviewer`,不得因为初始化或升级创建超过 5 个角色会话。
|
|
16
|
+
- `sessionId` 必须来自 Codex 宿主返回值,不得使用任务 ID、随机占位字符串、本地文件名或历史会话记忆冒充。
|
|
17
|
+
- 会话绑定最小字段为 `taskId`、`roleId`、`sessionId`、`parentSessionId`、`provider`、`sessionStatus`、`createdAt`、`updatedAt`。
|
|
18
|
+
- 会话状态固定为 `pending/creating/created/onboarding/ready/blocked/failed/closed`。
|
|
19
|
+
- 创建成功后先进入 `onboarding`,只允许只读理解职责范围和项目资料;职责理解、确认关系和执行门禁满足后才允许 `ready`。
|
|
20
|
+
- Codex 宿主不支持创建子会话、权限不足或创建失败时,必须进入本地降级:保留 `sessionId=null`,记录 `sessionStatus=blocked/failed`、失败原因和下一步动作,不得伪造会话。
|
|
21
|
+
|
|
12
22
|
## 默认角色
|
|
13
23
|
|
|
14
24
|
- `project-owner`:项目负责人,负责需求最终确认、业务验收和发布授权。
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"assignmentId",
|
|
11
11
|
"taskId",
|
|
12
12
|
"roleId",
|
|
13
|
+
"sessionId",
|
|
14
|
+
"parentSessionId",
|
|
15
|
+
"provider",
|
|
16
|
+
"sessionStatus",
|
|
13
17
|
"memberId",
|
|
14
18
|
"workstream",
|
|
15
19
|
"scope",
|
|
@@ -27,7 +31,8 @@
|
|
|
27
31
|
],
|
|
28
32
|
"pausedRule": "status=paused requires pauseReason; other statuses require pauseReason=null.",
|
|
29
33
|
"blockedRule": "status=blocked requires blockedReason=approver-unavailable or member-conflict.",
|
|
30
|
-
"executionEligibility": "member bound, role ready, responsibility confirmed, understanding ready, and executor memberId not equal to final approver member IDs."
|
|
34
|
+
"executionEligibility": "member bound, role ready, sessionStatus=ready, responsibility confirmed, understanding ready, and executor memberId not equal to final approver member IDs.",
|
|
35
|
+
"sessionBindingRule": "sessionId must be a real host-returned value when provider=codex; if the host cannot create sessions, sessionId remains null and sessionStatus=blocked or failed with a local degradation reason."
|
|
31
36
|
},
|
|
32
37
|
"updatedAt": ""
|
|
33
38
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"taskId": "",
|
|
3
|
+
"parentTaskId": "",
|
|
4
|
+
"moduleId": "",
|
|
5
|
+
"moduleOwnerTaskId": "",
|
|
6
|
+
"executorType": "temporary-programmer",
|
|
7
|
+
"provider": "codex",
|
|
8
|
+
"sessionId": null,
|
|
9
|
+
"parentSessionId": null,
|
|
10
|
+
"planId": "",
|
|
11
|
+
"userConfirmationId": "",
|
|
12
|
+
"permittedPaths": [],
|
|
13
|
+
"changeDomain": [],
|
|
14
|
+
"autoCreated": true,
|
|
15
|
+
"autoClose": true,
|
|
16
|
+
"status": "pending",
|
|
17
|
+
"occupancyStatus": "released",
|
|
18
|
+
"leaseId": null,
|
|
19
|
+
"attempt": 1,
|
|
20
|
+
"failureReason": null,
|
|
21
|
+
"nextAction": "awaiting-confirmation",
|
|
22
|
+
"closeEvidence": null,
|
|
23
|
+
"createdAt": "",
|
|
24
|
+
"updatedAt": "",
|
|
25
|
+
"closedAt": null,
|
|
26
|
+
"closedBy": null,
|
|
27
|
+
"releaseAudit": null,
|
|
28
|
+
"statusEnum": ["pending", "creating", "onboarding", "queued", "executing", "waiting-review", "completed", "blocked", "failed", "closed", "cancelled"],
|
|
29
|
+
"occupancyStatusEnum": ["occupied", "released", "unknown"],
|
|
30
|
+
"maxConcurrent": 3,
|
|
31
|
+
"unknownPolicy": "unknown occupancy continues to consume capacity until complete releaseAudit is recorded"
|
|
32
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "xinyun-ai-init",
|
|
3
3
|
"displayName": "欣芸技术开发 Agent 流初始化包",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"scriptVersion": "2026.07.
|
|
4
|
+
"version": "1.8.0",
|
|
5
|
+
"scriptVersion": "2026.07.23",
|
|
6
6
|
"schemaVersion": "1",
|
|
7
7
|
"defaultMode": "fast-init",
|
|
8
8
|
"targetWorkspace": "xinyun-ai",
|