@pm_zhousl/xinyun-ai-init 2.0.0 → 3.0.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.
Files changed (199) hide show
  1. package/README.md +29 -39
  2. package/bin/xinyun-ai-init.js +121 -175
  3. package/init/xinyun-ai-init/README.md +26 -144
  4. package/init/xinyun-ai-init/rules/v3-skill-runtime.md +45 -0
  5. package/init/xinyun-ai-init/runtime/migrate-v3.js +115 -0
  6. package/init/xinyun-ai-init/runtime/route-skill.js +69 -0
  7. package/init/xinyun-ai-init/runtime-manifest.json +26 -0
  8. package/init/xinyun-ai-init/skills/registry.json +112 -0
  9. package/init/xinyun-ai-init/templates/AGENTS.template.md +4 -27
  10. package/init/xinyun-ai-init/templates/README.template.md +3 -31
  11. package/init/xinyun-ai-init/templates/control-plane-index.template.json +5 -24
  12. package/init/xinyun-ai-init/templates/core-rules.template.md +9 -57
  13. package/init/xinyun-ai-init/templates/current-task.template.md +3 -19
  14. package/init/xinyun-ai-init/templates/manifest.template.json +13 -67
  15. package/init/xinyun-ai-init/templates/project-context.template.json +3 -11
  16. package/init/xinyun-ai-init/templates/project-index.template.json +5 -51
  17. package/init/xinyun-ai-init/templates/skill-run-record.template.json +4 -16
  18. package/init/xinyun-ai-init/templates/skill-runtime-route.template.json +3 -24
  19. package/init/xinyun-ai-init/templates/skills-assignments.template.json +3 -21
  20. package/init/xinyun-ai-init/templates/skills-registry.template.json +5 -29
  21. package/init/xinyun-ai-init/templates/task-graph.template.json +3 -5
  22. package/init/xinyun-ai-init/templates/task-index.template.json +3 -31
  23. package/init/xinyun-ai-init/version.json +8 -8
  24. package/package.json +8 -14
  25. package/scripts/run-v3-runtime-probe.js +8 -0
  26. package/scripts/verify-legacy-cleanup.js +24 -0
  27. package/scripts/verify-release-gate.js +10 -23
  28. package/scripts/verify-rules-tarball-security.js +1 -1
  29. package/scripts/verify-skill-runtime.js +33 -0
  30. package/scripts/verify-tarball.js +42 -0
  31. package/scripts/verify-v3-package.js +70 -0
  32. package/test-scenarios/v3.0.0-behavior-evidence.json +25 -0
  33. package/test-scenarios/v3.0.0-scenarios.md +41 -0
  34. package/init/xinyun-ai-init/prompt.md +0 -1
  35. package/init/xinyun-ai-init/rules/coordination.md +0 -43
  36. package/init/xinyun-ai-init/rules/directory-self-completion.md +0 -100
  37. package/init/xinyun-ai-init/rules/frameworks/README.md +0 -56
  38. package/init/xinyun-ai-init/rules/frameworks/backend/php/thinkphp.md +0 -42
  39. package/init/xinyun-ai-init/rules/frameworks/frontend/uni-app.md +0 -36
  40. package/init/xinyun-ai-init/rules/frameworks/frontend/wechat-miniprogram.md +0 -36
  41. package/init/xinyun-ai-init/rules/frontend-audit.md +0 -9
  42. package/init/xinyun-ai-init/rules/init-rules.md +0 -145
  43. package/init/xinyun-ai-init/rules/self-learning-rules.md +0 -16
  44. package/init/xinyun-ai-init/rules/session-workbench.md +0 -333
  45. package/init/xinyun-ai-init/rules/skills.md +0 -23
  46. package/init/xinyun-ai-init/rules/temporary-sessions.md +0 -13
  47. package/init/xinyun-ai-init/rules/upgrade-rules.md +0 -161
  48. package/init/xinyun-ai-init/rules/v1.10.2-contract.md +0 -30
  49. package/init/xinyun-ai-init/rules/v1.11.0-acceleration.md +0 -27
  50. package/init/xinyun-ai-init/rules/v1.12.0-recovery.md +0 -34
  51. package/init/xinyun-ai-init/rules/v1.12.1-provider-session-binding.md +0 -25
  52. package/init/xinyun-ai-init/rules/v1.13.0-host-adapter.md +0 -43
  53. package/init/xinyun-ai-init/rules/v1.14.0-agent-core.md +0 -35
  54. package/init/xinyun-ai-init/rules/v1.15.0-session-binding.md +0 -44
  55. package/init/xinyun-ai-init/rules/v1.16.0-capability-efficiency.md +0 -23
  56. package/init/xinyun-ai-init/rules/v2.0.0-shared-project-conversations.md +0 -68
  57. package/init/xinyun-ai-init/rules/v2.0.0-single-session-skills.md +0 -89
  58. package/init/xinyun-ai-init/scripts/README.md +0 -16
  59. package/init/xinyun-ai-init/templates/agent-capabilities.template.json +0 -27
  60. package/init/xinyun-ai-init/templates/agent-profile.template.json +0 -21
  61. package/init/xinyun-ai-init/templates/archive-transaction.template.json +0 -15
  62. package/init/xinyun-ai-init/templates/bootstrap-snapshot.template.json +0 -22
  63. package/init/xinyun-ai-init/templates/capabilities.template.json +0 -19
  64. package/init/xinyun-ai-init/templates/codegraph-incremental-record.template.json +0 -21
  65. package/init/xinyun-ai-init/templates/conversation-binding.template.json +0 -26
  66. package/init/xinyun-ai-init/templates/conversation-event.template.json +0 -24
  67. package/init/xinyun-ai-init/templates/conversation-registry.template.json +0 -15
  68. package/init/xinyun-ai-init/templates/conversation-stream-head.template.json +0 -14
  69. package/init/xinyun-ai-init/templates/conversation-sync-cursor.template.json +0 -13
  70. package/init/xinyun-ai-init/templates/coordination-change-ledger.template.json +0 -15
  71. package/init/xinyun-ai-init/templates/coordination-conflict-record.template.json +0 -18
  72. package/init/xinyun-ai-init/templates/coordination-contract-snapshot.template.json +0 -9
  73. package/init/xinyun-ai-init/templates/coordination-project-facts.template.json +0 -20
  74. package/init/xinyun-ai-init/templates/coordination-transaction.template.json +0 -16
  75. package/init/xinyun-ai-init/templates/database-authorization.template.json +0 -53
  76. package/init/xinyun-ai-init/templates/final-delivery.template.json +0 -22
  77. package/init/xinyun-ai-init/templates/fixed-materialization.template.json +0 -12
  78. package/init/xinyun-ai-init/templates/framework-profile.template.json +0 -48
  79. package/init/xinyun-ai-init/templates/framework-profile.template.md +0 -39
  80. package/init/xinyun-ai-init/templates/frontend-audit.template.json +0 -27
  81. package/init/xinyun-ai-init/templates/handoff.template.json +0 -27
  82. package/init/xinyun-ai-init/templates/host-capabilities.template.json +0 -37
  83. package/init/xinyun-ai-init/templates/host-preflight.template.json +0 -33
  84. package/init/xinyun-ai-init/templates/html-migration-asset-map.template.md +0 -6
  85. package/init/xinyun-ai-init/templates/html-migration-compatibility-matrix.template.md +0 -6
  86. package/init/xinyun-ai-init/templates/html-migration-open-issues.template.md +0 -12
  87. package/init/xinyun-ai-init/templates/html-migration-pilot-plan.template.md +0 -21
  88. package/init/xinyun-ai-init/templates/html-migration-record.template.json +0 -36
  89. package/init/xinyun-ai-init/templates/html-migration-route-map.template.md +0 -6
  90. package/init/xinyun-ai-init/templates/html-migration-scope.template.md +0 -28
  91. package/init/xinyun-ai-init/templates/init-result.template.json +0 -25
  92. package/init/xinyun-ai-init/templates/initialization-cache.template.json +0 -13
  93. package/init/xinyun-ai-init/templates/initialization-change-report.template.json +0 -14
  94. package/init/xinyun-ai-init/templates/initialization-recovery.template.json +0 -24
  95. package/init/xinyun-ai-init/templates/initialization-stages.template.json +0 -18
  96. package/init/xinyun-ai-init/templates/initialization-timing.template.json +0 -16
  97. package/init/xinyun-ai-init/templates/local-query-index.template.json +0 -15
  98. package/init/xinyun-ai-init/templates/managed-baseline.template.json +0 -17
  99. package/init/xinyun-ai-init/templates/manual-session-binding.template.json +0 -45
  100. package/init/xinyun-ai-init/templates/manual-session-recovery.template.json +0 -53
  101. package/init/xinyun-ai-init/templates/multi-conversation-migration.template.json +0 -24
  102. package/init/xinyun-ai-init/templates/onboarding-report.template.json +0 -30
  103. package/init/xinyun-ai-init/templates/orchestrator.template.json +0 -28
  104. package/init/xinyun-ai-init/templates/parallelism.template.json +0 -13
  105. package/init/xinyun-ai-init/templates/performance-metrics.template.json +0 -17
  106. package/init/xinyun-ai-init/templates/preflight-report.template.json +0 -25
  107. package/init/xinyun-ai-init/templates/project-check.template.md +0 -56
  108. package/init/xinyun-ai-init/templates/project-guide.template.md +0 -57
  109. package/init/xinyun-ai-init/templates/project-identity.template.json +0 -23
  110. package/init/xinyun-ai-init/templates/project-status.template.json +0 -28
  111. package/init/xinyun-ai-init/templates/provider-adapter.template.json +0 -25
  112. package/init/xinyun-ai-init/templates/provider-session-binding.template.json +0 -77
  113. package/init/xinyun-ai-init/templates/re-takeover-record.template.json +0 -37
  114. package/init/xinyun-ai-init/templates/requirement-packet.template.json +0 -23
  115. package/init/xinyun-ai-init/templates/role-execution.template.md +0 -72
  116. package/init/xinyun-ai-init/templates/role-session-binding.template.json +0 -105
  117. package/init/xinyun-ai-init/templates/role-subtask.template.md +0 -36
  118. package/init/xinyun-ai-init/templates/session-binding.template.json +0 -38
  119. package/init/xinyun-ai-init/templates/session-candidates.template.json +0 -19
  120. package/init/xinyun-ai-init/templates/shared-project-snapshot.template.json +0 -24
  121. package/init/xinyun-ai-init/templates/single-session-migration.template.json +0 -31
  122. package/init/xinyun-ai-init/templates/sync-check.template.json +0 -23
  123. package/init/xinyun-ai-init/templates/takeover-baseline.template.json +0 -17
  124. package/init/xinyun-ai-init/templates/takeover-gate.template.json +0 -22
  125. package/init/xinyun-ai-init/templates/task-history.template.md +0 -35
  126. package/init/xinyun-ai-init/templates/task-lease.template.json +0 -19
  127. package/init/xinyun-ai-init/templates/task-lock.template.json +0 -31
  128. package/init/xinyun-ai-init/templates/task-main.template.md +0 -38
  129. package/init/xinyun-ai-init/templates/task-result.template.json +0 -23
  130. package/init/xinyun-ai-init/templates/team/README.md +0 -51
  131. package/init/xinyun-ai-init/templates/team/assignments.json +0 -49
  132. package/init/xinyun-ai-init/templates/team/confirmations/chief-engineer.md +0 -24
  133. package/init/xinyun-ai-init/templates/team/confirmations/programmer.md +0 -24
  134. package/init/xinyun-ai-init/templates/team/confirmations/project-owner.md +0 -24
  135. package/init/xinyun-ai-init/templates/team/confirmations/project-product.md +0 -24
  136. package/init/xinyun-ai-init/templates/team/confirmations/test-reviewer.md +0 -24
  137. package/init/xinyun-ai-init/templates/team/file-ownership.json +0 -32
  138. package/init/xinyun-ai-init/templates/team/members.json +0 -61
  139. package/init/xinyun-ai-init/templates/team/responsibility-matrix.json +0 -81
  140. package/init/xinyun-ai-init/templates/team/roles.json +0 -71
  141. package/init/xinyun-ai-init/templates/team/understandings/chief-engineer.md +0 -23
  142. package/init/xinyun-ai-init/templates/team/understandings/programmer.md +0 -23
  143. package/init/xinyun-ai-init/templates/team/understandings/project-owner.md +0 -23
  144. package/init/xinyun-ai-init/templates/team/understandings/project-product.md +0 -23
  145. package/init/xinyun-ai-init/templates/team/understandings/test-reviewer.md +0 -23
  146. package/init/xinyun-ai-init/templates/technical-impact-packet.template.json +0 -31
  147. package/init/xinyun-ai-init/templates/technical-landscape.template.json +0 -41
  148. package/init/xinyun-ai-init/templates/temporary-session.template.json +0 -32
  149. package/init/xinyun-ai-init/templates/workstreams-readme.template.md +0 -36
  150. package/scripts/collect-v1.10-evidence.js +0 -159
  151. package/scripts/collect-v1.14-local-evidence.js +0 -66
  152. package/scripts/collect-v1.15-real-evidence.js +0 -114
  153. package/scripts/collect-v1.16-evidence.js +0 -48
  154. package/scripts/collect-v2-evidence.js +0 -35
  155. package/scripts/run-v1.16-runtime-probe.js +0 -91
  156. package/scripts/run-v2-runtime-probe.js +0 -110
  157. package/scripts/verify-init-package.js +0 -2297
  158. package/scripts/verify-multi-conversation-contract.js +0 -61
  159. package/scripts/verify-re-takeover-contract.js +0 -54
  160. package/scripts/verify-rules-package.js +0 -1287
  161. package/scripts/verify-v2-package.js +0 -210
  162. package/scripts/verify-v2-tarball.js +0 -73
  163. package/test-scenarios/README.md +0 -130
  164. package/test-scenarios/fixtures/v1.10.0-takeover-gate-fixture/README.md +0 -23
  165. package/test-scenarios/fixtures/v1.10.0-takeover-gate-fixture/after/project-status.json +0 -7
  166. package/test-scenarios/fixtures/v1.10.0-takeover-gate-fixture/before/project-status.json +0 -7
  167. package/test-scenarios/fixtures/v1.9.0-behavior-fixture/README.md +0 -9
  168. package/test-scenarios/multi-conversation-evidence.json +0 -26
  169. package/test-scenarios/multi-conversation-scenarios.md +0 -16
  170. package/test-scenarios/re-takeover-evidence.json +0 -20
  171. package/test-scenarios/re-takeover-scenarios.md +0 -33
  172. package/test-scenarios/review-template.md +0 -165
  173. package/test-scenarios/scenarios.md +0 -1273
  174. package/test-scenarios/v1.10.0-behavior-evidence.json +0 -31
  175. package/test-scenarios/v1.10.0-scenarios.md +0 -96
  176. package/test-scenarios/v1.10.2-scenarios.md +0 -38
  177. package/test-scenarios/v1.11.0-scenarios.md +0 -30
  178. package/test-scenarios/v1.12.0-behavior-evidence.json +0 -29
  179. package/test-scenarios/v1.12.0-scenarios.md +0 -51
  180. package/test-scenarios/v1.12.1-behavior-evidence.json +0 -27
  181. package/test-scenarios/v1.12.1-scenarios.md +0 -42
  182. package/test-scenarios/v1.13.0-behavior-evidence.json +0 -650
  183. package/test-scenarios/v1.13.0-scenarios.md +0 -94
  184. package/test-scenarios/v1.14.0-behavior-evidence.json +0 -780
  185. package/test-scenarios/v1.14.0-scenarios.md +0 -63
  186. package/test-scenarios/v1.15.0-behavior-evidence.json +0 -476
  187. package/test-scenarios/v1.15.0-scenarios.md +0 -57
  188. package/test-scenarios/v1.16.0-behavior-evidence.json +0 -46
  189. package/test-scenarios/v1.16.0-real-host-probe.json +0 -132
  190. package/test-scenarios/v1.16.0-scenarios.md +0 -19
  191. package/test-scenarios/v1.7.0-scenarios.md +0 -91
  192. package/test-scenarios/v1.7.1-scenarios.md +0 -130
  193. package/test-scenarios/v1.7.2-scenarios.md +0 -51
  194. package/test-scenarios/v1.7.3-scenarios.md +0 -79
  195. package/test-scenarios/v1.8.0-scenarios.md +0 -39
  196. package/test-scenarios/v1.9.0-behavior-evidence.json +0 -269
  197. package/test-scenarios/v1.9.0-scenarios.md +0 -55
  198. package/test-scenarios/v2.0.0-behavior-evidence.json +0 -40
  199. package/test-scenarios/v2.0.0-scenarios.md +0 -21
@@ -1,57 +0,0 @@
1
- # 项目导读
2
-
3
- ## 项目概览
4
-
5
- - 项目名称:待填写
6
- - 项目根身份:待填写
7
- - 主要目标:待填写
8
- - 当前执行模型:`shared-project-multi-conversation-runtime`
9
- - 项目共享上下文:待建立
10
- - 活动对话:待登记
11
-
12
- ## 入口与端
13
-
14
- - 主要入口:待填写
15
- - 工作流/端:待填写
16
- - 技术栈:待填写
17
- - 启动和验证线索:待填写
18
-
19
- ## AI 控制面
20
-
21
- - 当前任务:`xinyun-ai/current-task.md`
22
- - 任务目录:`xinyun-ai/tasks/`
23
- - 任务索引:`xinyun-ai/tasks/task-index.json`
24
- - 任务图:`xinyun-ai/tasks/task-graph.json`
25
- - 项目上下文:`xinyun-ai/project-context.json`
26
- - 对话注册表:`xinyun-ai/conversations/registry.json`
27
- - 对话事件流:`xinyun-ai/coordination/streams/`
28
- - 同步游标:`xinyun-ai/coordination/cursors/`
29
- - Skill 注册:`xinyun-ai/skills/registry.json`
30
- - Skill 分配:`xinyun-ai/skills/assignments.json`
31
- - 共享事实:`xinyun-ai/coordination/project-facts.json`
32
- - 变更台账:`xinyun-ai/coordination/change-ledger.json`
33
-
34
- 每个项目维护一个共享上下文,多个对话通过独立绑定和事件流交换结果。每次交互只在检测到新事件时增量刷新;正式任务先登记,再按任务事实执行 Skills。
35
-
36
- ## 授权边界
37
-
38
- - 业务修改计划确认:待填写
39
- - 数据库授权:not-requested
40
- - Git 写授权:not-requested
41
- - npm 发布授权:not-requested
42
-
43
- 任务登记和 Skill 选择都不构成业务修改或发布授权。
44
-
45
- ## 旧项目迁移
46
-
47
- - 旧角色材料:未发现 / 已登记为 legacy/read-only / 待检查
48
- - 迁移事务:待填写
49
- - 冲突与未验证范围:待填写
50
-
51
- 旧角色、角色任务和角色会话材料不得自动删除,也不得继续参与新任务运行。
52
-
53
- ## 当前风险与下一步
54
-
55
- - 风险:待填写
56
- - 未验证范围:待填写
57
- - 下一动作:待填写
@@ -1,23 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "projectRootHash": null,
4
- "workspaceScope": {
5
- "scopeType": "project-root",
6
- "scopePathHashes": [],
7
- "scopeRevision": null
8
- },
9
- "repositoryScopeHash": null,
10
- "workstream": null,
11
- "identityEvidence": [],
12
- "normalization": {
13
- "resolutionMode": "unknown",
14
- "pathSeparators": "/",
15
- "unicodeNormalization": "NFC",
16
- "windowsDriveCase": "upper",
17
- "windowsCaseSensitivity": "insensitive",
18
- "unixCaseSensitivity": "sensitive",
19
- "excludedFields": ["mtime", "inode", "temporaryPath"]
20
- },
21
- "createdAt": "2026-07-24T00:00:00.000Z",
22
- "updatedAt": "2026-07-24T00:00:00.000Z"
23
- }
@@ -1,28 +0,0 @@
1
- {
2
- "schemaVersion": 2,
3
- "executionModel": "shared-project-multi-conversation-runtime",
4
- "projectStatus": "not-started",
5
- "projectStatusEnum": ["not-started", "initializing", "partial", "blocked", "manual-required", "ready"],
6
- "executionEligible": false,
7
- "takeoverGateStatus": "blocked",
8
- "takeoverGatePath": "xinyun-ai/takeover-gate.json",
9
- "blockedReasons": [],
10
- "requiredGates": ["projectIdentity", "projectContext", "conversationRegistry", "incrementalSync", "hostInteractions", "taskControlPlane", "skillRuntime", "codeGraph", "localControlPlane", "legacyMigration", "sensitiveScan", "noHighRiskBlocker"],
11
- "gates": {
12
- "projectIdentity": {"status": "unknown", "passed": false},
13
- "projectContext": {"status": "unknown", "passed": false},
14
- "conversationRegistry": {"status": "unknown", "passed": false},
15
- "incrementalSync": {"status": "unknown", "passed": false},
16
- "hostInteractions": {"status": "unknown", "passed": false},
17
- "taskControlPlane": {"status": "unknown", "passed": false},
18
- "skillRuntime": {"status": "unknown", "passed": false},
19
- "codeGraph": {"status": "unknown", "passed": false},
20
- "localControlPlane": {"status": "unknown", "passed": false},
21
- "legacyMigration": {"status": "not-required", "passed": true},
22
- "sensitiveScan": {"status": "unknown", "passed": false},
23
- "noHighRiskBlocker": {"status": "unknown", "passed": false}
24
- },
25
- "readyPolicy": {"allRequiredGatesMustPass": true, "executionEligibleRequiresProjectStatusReady": true, "threadReferenceAloneNeverReady": true, "skillSelectionNeverAuthorizesChanges": true},
26
- "statusEvidence": [],
27
- "updatedAt": null
28
- }
@@ -1,25 +0,0 @@
1
- {
2
- "schemaVersion": 2,
3
- "adapterId": "host-adapter-template",
4
- "adapterVersion": "2.0.0",
5
- "executionModel": "shared-project-multi-conversation-runtime",
6
- "conversationBindingContract": "adapter-neutral-v2",
7
- "sessionRefTypeEnum": ["host-thread", "provider-session", "manual-reference", "local-session"],
8
- "controlPlaneProjectContextIdField": "projectContextId",
9
- "conversationBindingIdField": "conversationBindingId",
10
- "sessionReferenceFields": ["sessionRefType", "sessionRef", "hostId", "provider"],
11
- "status": "not-checked",
12
- "operations": {
13
- "createOrReuse": {"status": "not-checked", "evidence": [], "failureReason": null},
14
- "send": {"status": "not-checked", "evidence": [], "failureReason": null},
15
- "receive": {"status": "not-checked", "evidence": [], "failureReason": null},
16
- "queryStatus": {"status": "not-checked", "evidence": [], "failureReason": null},
17
- "recover": {"status": "not-checked", "evidence": [], "failureReason": null},
18
- "close": {"status": "not-checked", "evidence": [], "failureReason": null},
19
- "controlFileReadWrite": {"status": "not-checked", "evidence": [], "failureReason": null}
20
- },
21
- "identityValidation": ["projectContextId", "conversationBindingId", "sessionRefType", "sessionRef", "projectRootHash", "workspaceScope", "repositoryScope", "cwdHash", "identityEvidence"],
22
- "legacyProviderSessionIdPolicy": "compatibility-only; never derive from a host thread",
23
- "unverifiedScope": ["real host adapter behavior"],
24
- "checkedAt": null
25
- }
@@ -1,77 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "bindingId": "provider-session-binding-template",
4
- "provider": "codex",
5
- "hostThreadId": null,
6
- "hostSessionId": null,
7
- "projectSessionId": null,
8
- "sessionId": null,
9
- "orchestratorSessionId": null,
10
- "providerSessionId": null,
11
- "providerSessionIdType": "provider-canonical-session",
12
- "roleId": null,
13
- "taskId": null,
14
- "projectRootHash": null,
15
- "workspaceScope": null,
16
- "repositoryScopeHash": null,
17
- "workstream": null,
18
- "title": null,
19
- "cwd": null,
20
- "createdAt": null,
21
- "identityEvidence": {
22
- "providerSessionId": null,
23
- "projectRootHash": null,
24
- "workspaceScope": null,
25
- "roleId": null,
26
- "taskId": null,
27
- "title": null,
28
- "cwd": null,
29
- "source": null,
30
- "verifiedAt": null,
31
- "evidenceHash": null
32
- },
33
- "identityMapping": {
34
- "hostThreadId": null,
35
- "hostSessionId": null,
36
- "providerSessionId": null,
37
- "projectSessionId": null,
38
- "sessionId": null,
39
- "orchestratorSessionId": null,
40
- "mappingStatus": "pending",
41
- "equivalenceRule": "sessionId equals providerSessionId only after canonical provider evidence is verified",
42
- "evidence": []
43
- },
44
- "interactionEvidence": {
45
- "sendReceipt": null,
46
- "receiveReceipt": null,
47
- "transcriptHash": null,
48
- "messageCount": 0,
49
- "recordedAt": null,
50
- "evidenceHash": null
51
- },
52
- "bindingMode": "auto-created",
53
- "bindingStatus": "pending",
54
- "executionEligible": false,
55
- "bindingStatusEnum": ["pending", "validating", "bound", "blocked", "rejected", "released", "conflict", "recovery-required"],
56
- "requiredHostEvidence": ["create-or-reuse", "send", "receive", "query-status", "recover", "close"],
57
- "boundBy": null,
58
- "boundAt": null,
59
- "attempt": 1,
60
- "recovery": {
61
- "reuseTaskId": true,
62
- "reuseRoleTaskId": true,
63
- "incrementAttempt": true,
64
- "createdDuplicateSession": false,
65
- "recoveryReason": null,
66
- "nextAction": null
67
- },
68
- "occupancy": {
69
- "occupancyStatus": "unknown",
70
- "occupiedByProjectRootHash": null,
71
- "occupiedByRoleId": null,
72
- "checkedAt": null
73
- },
74
- "blockedReason": null,
75
- "audit": [],
76
- "fakeProviderSessionIdProhibited": true
77
- }
@@ -1,37 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "executionModel": "shared-project-multi-conversation-runtime",
4
- "takeoverId": "re-takeover-template",
5
- "mode": "read-project-then-validate-execution",
6
- "projectRootHash": null,
7
- "repositoryScopeHash": null,
8
- "cwdHash": null,
9
- "sourceRevision": null,
10
- "sourceFiles": [],
11
- "sourceHashes": {},
12
- "previousSnapshotHash": null,
13
- "currentSnapshotHash": null,
14
- "changedPaths": [],
15
- "scanMode": "full",
16
- "scanModeEnum": ["full", "incremental", "control-plane-only"],
17
- "contextStatus": "unknown",
18
- "contextStatusEnum": ["unknown", "assessing", "context-ready", "partial", "stale", "blocked"],
19
- "understandingStatus": "unknown",
20
- "understandingStatusEnum": ["unknown", "quick", "expanded", "verified", "stale"],
21
- "executionEligible": false,
22
- "conversationBindingDecision": "not-assessed",
23
- "conversationBindingDecisionEnum": ["not-assessed", "reuse-existing", "register-new", "manual-required", "blocked"],
24
- "syncCursorStatus": "unknown",
25
- "newEventIds": [],
26
- "controlPlaneChecks": [],
27
- "architectureEvidence": [],
28
- "projectFactsEvidence": [],
29
- "conflicts": [],
30
- "unknowns": [],
31
- "unverifiedScope": [],
32
- "sensitiveScan": {"status": "not-run", "matches": []},
33
- "nextAction": null,
34
- "startedAt": null,
35
- "completedAt": null,
36
- "evidence": []
37
- }
@@ -1,23 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "packetId": "requirement-packet-template",
4
- "requirementId": null,
5
- "taskId": null,
6
- "projectRootHash": null,
7
- "version": "1.11.0",
8
- "status": "captured",
9
- "content": {
10
- "userQuote": null,
11
- "goal": null,
12
- "acceptanceCriteria": [],
13
- "priority": null,
14
- "allowedScope": [],
15
- "forbiddenScope": [],
16
- "pendingQuestions": []
17
- },
18
- "evidence": [],
19
- "sourceRevision": null,
20
- "contentHash": null,
21
- "createdAt": "2026-07-24T00:00:00.000Z",
22
- "updatedAt": "2026-07-24T00:00:00.000Z"
23
- }
@@ -1,72 +0,0 @@
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
- - statusCode:pending
12
- - statusLabel:待分配
13
- - goal:在已确认范围内完成角色职责
14
- - parentTaskId:task-template
15
- - dependencies:[]
16
- - technologyStacks:[]
17
- - affectedPorts:[]
18
- - affectedRepositories:[]
19
- - expectedFiles:[]
20
- - acceptanceReviewer:test-reviewer
21
- - resultId:null
22
- - evidence:[]
23
- - assignmentStatus:pending
24
- - understandingStatus:pending
25
- - confirmationStatus:pending
26
- - memberId:null
27
- - sessionId:null
28
- - providerSessionId:null
29
- - hostThreadId:null(宿主线程证据,不可作为角色会话 ID)
30
- - hostSessionId:null(宿主会话证据,不可作为角色会话 ID)
31
- - projectSessionId:null
32
- - orchestratorSessionId:null
33
- - parentSessionId:null
34
- - provider:codex
35
- - sessionStatus:pending
36
- - sessionBindingId:
37
- - sessionBindingPath:xinyun-ai/sessions/role-session-bindings.json
38
- - executionEligible:false
39
- - blockedReason:member-unassigned
40
- - nextAction:绑定成员、完成职责确认和项目理解后再执行
41
- - sourceTaskId:task-template
42
- - idempotencyKey:
43
- - sessionIdempotencyKey:
44
- - createdAt:2026-07-21T00:00:00.000Z
45
- - updatedAt:2026-07-21T00:00:00.000Z
46
-
47
- ## 状态与可见性
48
-
49
- - `taskKind=role-execution` 表示角色后续实际执行任务,不表示已经获得业务代码修改授权。
50
- - 未绑定成员、职责确认待处理或理解未完成时,任务仍属于 `activeTaskIds`,但不得进入 `executableTaskIds`。
51
- - `executionEligible=true` 必须同时满足成员绑定、角色 ready、职责 confirmed、理解 ready、确认人不冲突和 CodeGraph 必备条件。
52
- - 待分配任务使用 `status=pending`;权限、冲突、写入失败或不可恢复错误使用 `status=blocked`,并填写 `blockedReason` 和 `nextAction`。
53
- - `sourceTaskId` 指向已经归档的初始化主任务;角色任务完成前不得加入 `archivedTaskIds`。
54
-
55
- ## Codex 真实角色会话绑定
56
-
57
- - v1.7.3 中,Codex 主会话在 5 个 `role-execution` 本地任务创建或恢复后,可以为 `project-owner`、`project-product`、`chief-engineer`、`programmer`、`test-reviewer` 固定创建 5 个真实角色子会话。
58
- - 真实 `sessionId` 只能来自 Codex 宿主创建子会话后的返回值;不得使用 `taskId`、`roleTaskId`、随机占位字符串或本地模拟值冒充。
59
- - 会话绑定字段至少包含 `taskId`、`roleId`、`sessionId`、`parentSessionId`、`provider`、`sessionStatus`、`createdAt`、`updatedAt`。
60
- - `providerSessionId` 是唯一可绑定的 provider canonical 会话标识;`sessionId` 只有在创建/复用、发送、接收、状态查询、恢复、关闭六类宿主证据全部验证后才能与其相等。
61
- - 会话状态固定为 `pending/creating/created/onboarding/ready/blocked/failed/closed`。
62
- - 会话创建成功后先进入 `sessionStatus=onboarding`,只读职责范围内资料并生成角色理解记录;不得因会话创建成功直接把任务标为 `ready` 或获得业务代码修改授权。
63
- - 只有角色理解完成、职责确认完成、成员/会话绑定满足、确认人关系无冲突且执行门禁满足时,才允许 `sessionStatus=ready` 与 `executionEligible=true`。
64
- - Codex 宿主不支持创建子会话、权限不足或创建失败时,必须保留 `sessionId=null`,记录 `sessionStatus=blocked/failed`、失败原因和本地降级说明,不得伪造会话。
65
- - v1.12.1 起,`providerSessionId` 必须是 Codex 宿主 canonical session API 返回值;普通线程 ID、taskId、标题或历史摘要不得直接绑定。绑定前需验证项目身份、roleId、taskId、title、cwd、独占占用、`identityEvidence` 和 `interactionEvidence`。
66
-
67
- ## 幂等
68
-
69
- - `idempotencyKey` 是对 `{sourceTaskId, roleId, taskKind, targetVersion}` 使用 v1.6 JCS 规范化 JSON 后计算的 SHA-256。
70
- - 同一幂等键只允许对应一个角色后续任务;重复升级必须复用任务并补齐索引。
71
- - `sessionIdempotencyKey` 必须按 v1.9 `{projectRootHash, workspaceScope, repositoryScopeHash, workstream, taskId, roleId, provider, targetVersion}` 使用 RFC8785-JCS-SHA-256 计算;v1.7.3 四字段仅作创建兼容索引,不得参与候选选择、复用或跨项目身份判定。
72
- - 同一 `sessionIdempotencyKey` 只允许绑定一个有效真实角色会话;会话已创建但本地回写失败时,下次升级必须按该键查询并补齐绑定,不得创建第二个会话。
@@ -1,105 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "bindingId": "role-session-binding-template",
4
- "identityType": "project-session",
5
- "taskId": "role-execution-task-template",
6
- "roleId": "project-owner",
7
- "sessionId": null,
8
- "sessionIdSemantics": "project compatibility alias; null until providerSessionId is verified",
9
- "adapterNeutralContract": "v1.15.0 uses sessionId as the control-plane ID and sessionRefType/sessionRef as the host reference; providerSessionId is compatibility-only",
10
- "sessionRefType": "host-thread",
11
- "sessionRef": null,
12
- "sessionRefTypeEnum": ["host-thread", "provider-session", "manual-reference", "local-session"],
13
- "hostId": null,
14
- "localSessionId": null,
15
- "sessionIdentityMode": "provider-canonical",
16
- "sessionIdentityModeEnum": ["provider-canonical", "local-degraded"],
17
- "localSessionIdSemantics": "control-plane correlation ID only; it never authorizes ready or substitutes for providerSessionId",
18
- "providerSessionId": null,
19
- "providerSessionIdType": "provider-canonical-session",
20
- "parentSessionId": null,
21
- "provider": "codex",
22
- "bindingMode": "auto-created",
23
- "bindingStatus": "pending",
24
- "bindingStatusEnum": ["pending", "validating", "bound", "blocked", "rejected", "released", "conflict", "recovery-required"],
25
- "boundBy": null,
26
- "boundAt": null,
27
- "title": null,
28
- "cwd": null,
29
- "interactionEvidence": {
30
- "sendReceipt": null,
31
- "receiveReceipt": null,
32
- "transcriptHash": null,
33
- "messageCount": 0,
34
- "recordedAt": null,
35
- "evidenceHash": null
36
- },
37
- "identityMapping": {
38
- "hostThreadId": null,
39
- "hostSessionId": null,
40
- "projectSessionId": null,
41
- "orchestratorSessionId": null,
42
- "providerSessionId": null,
43
- "sessionId": null,
44
- "mappingStatus": "pending",
45
- "equivalenceRule": "sessionId equals providerSessionId only after canonical provider evidence is verified",
46
- "identityEvidence": [],
47
- "creationEvidence": [],
48
- "requiredHostEvidence": ["create-or-reuse", "send", "receive", "query-status", "recover", "close"]
49
- },
50
- "targetVersion": "1.16.0",
51
- "projectRootHash": null,
52
- "workspaceScope": {"scopeType": "project-root", "scopePathHashes": [], "scopeRevision": null},
53
- "repositoryScopeHash": null,
54
- "workstream": null,
55
- "permissionScope": [],
56
- "sessionMatchStatus": "unknown",
57
- "hostRecoveryAvailable": false,
58
- "hostRecoveryEvidence": [],
59
- "selectionEvidence": null,
60
- "sessionStatus": "pending",
61
- "understandingStatus": "pending",
62
- "confirmationStatus": "pending",
63
- "executionEligible": false,
64
- "idempotencyKey": null,
65
- "hostCapability": "unknown",
66
- "createdAt": "2026-07-22T00:00:00.000Z",
67
- "updatedAt": "2026-07-22T00:00:00.000Z",
68
- "createdBy": "main-session",
69
- "onboarding": {
70
- "readOnly": true,
71
- "startedAt": null,
72
- "completedAt": null,
73
- "understandingRecord": null,
74
- "readyRequires": [
75
- "real sessionId returned by host",
76
- "role understanding ready",
77
- "responsibility confirmation confirmed",
78
- "execution eligibility gates satisfied"
79
- ]
80
- },
81
- "failure": {
82
- "blockedReason": null,
83
- "failureReason": null,
84
- "retryCount": 0,
85
- "nextAction": null
86
- },
87
- "degradation": {
88
- "localOnly": false,
89
- "reason": null,
90
- "readyEligible": false,
91
- "fakeSessionIdProhibited": true,
92
- "localSessionIdAllowed": true
93
- },
94
- "audit": [],
95
- "behaviorEvidence": [],
96
- "renameAudit": null,
97
- "displayName": null,
98
- "displayNamePattern": "项目名|角色|职责或工作流",
99
- "v115ReadyGate": "operable sessionRef + project/role/task identity + seven evidence categories + no conflict",
100
- "projectDisplayName": null,
101
- "roleDisplayName": null,
102
- "responsibilityLabel": null,
103
- "titleSource": "role-contract",
104
- "titleVersion": "1.15.0"
105
- }
@@ -1,36 +0,0 @@
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
- - providerSessionId:null
11
- - projectSessionId:null
12
- - hostThreadId:null
13
- - hostSessionId:null
14
- - orchestratorSessionId:null
15
- - sessionIdentityStatus:pending
16
- - requiredHostEvidence:create-or-reuse / send / receive / query-status / recover / close
17
- - taskKind:initialization-record
18
- - assignmentStatus:completed
19
- - status:completed
20
- - readScope:xinyun-ai/team/; xinyun-ai/project/; xinyun-ai/current-task.md
21
- - understandingStatus:pending
22
- - understandingRecordId:xinyun-ai/team/understandings/project-owner.md
23
- - confirmationStatus:pending
24
- - confirmationRecordId:xinyun-ai/team/confirmations/project-owner.md
25
- - executionEligible:false
26
- - blockedReason:null
27
- - createdAt:2026-07-20T00:00:00.000Z
28
- - updatedAt:2026-07-20T00:00:00.000Z
29
-
30
- ## 状态说明
31
-
32
- - taskKind=initialization-record 只表示角色任务登记完成。
33
- - taskKind=role-execution 才表示角色实际执行任务。
34
- - memberId 或 sessionId 未绑定时必须使用 null,不得虚构人员或外部会话。
35
- - `providerSessionId` 只能来自 provider canonical API;`sessionId` 只有在六类宿主操作证据齐全后才能与 `providerSessionId` 相等。项目身份、角色、任务或占用冲突时必须 blocked,不得复用。
36
- - 登记完成不等于职责确认完成、角色理解完成或 executionEligible=true。
@@ -1,38 +0,0 @@
1
- {
2
- "schemaVersion": 2,
3
- "executionModel": "single-session-skill-runtime",
4
- "bindingId": "project-session-binding-template",
5
- "sessionId": null,
6
- "sessionRefType": null,
7
- "sessionRef": null,
8
- "sessionRefTypeEnum": ["host-thread", "provider-session", "manual-reference", "local-session"],
9
- "hostId": null,
10
- "provider": null,
11
- "projectRootHash": null,
12
- "workspaceScope": {"scopeType": "project-root", "scopePathHashes": [], "scopeRevision": null},
13
- "repositoryScope": [],
14
- "cwdHash": null,
15
- "identityEvidence": [],
16
- "interactionEvidence": [],
17
- "requiredEvidenceCategories": [
18
- "create-or-reuse",
19
- "send",
20
- "receive",
21
- "query-status",
22
- "recover",
23
- "close",
24
- "control-file-read-write"
25
- ],
26
- "bindingStatus": "pending",
27
- "bindingStatusEnum": ["pending", "validating", "bound", "blocked", "manual-required", "conflict", "released", "recovery-required"],
28
- "bindingMode": null,
29
- "reuseDecision": "not-assessed",
30
- "reuseDecisionEnum": ["not-assessed", "reuse-existing", "new-candidate", "manual-required", "blocked"],
31
- "contextOnlyAllowed": true,
32
- "executionEligible": false,
33
- "legacyProviderSessionId": null,
34
- "legacyCompatibility": "historical provider identity only; a thread reference is never converted into a provider session id",
35
- "createdAt": null,
36
- "updatedAt": null,
37
- "audit": []
38
- }
@@ -1,19 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "candidates": [],
4
- "sessionMatchStatusEnum": ["reusable", "renamed", "duplicate-not-primary", "other-project", "unknown", "not-reusable", "requires-confirmation"],
5
- "reusableSessionStatusEnum": ["created", "onboarding", "ready"],
6
- "selectionEvidence": {
7
- "selectedSessionId": null,
8
- "candidateSessionIds": [],
9
- "ruleOrder": ["valid-binding", "reusable", "identity-complete", "ready", "updatedAt-desc", "sessionId-unicode-asc"],
10
- "reason": null,
11
- "checkedAt": null
12
- },
13
- "candidateRequiredFields": ["sessionId", "provider", "projectRootHash", "workspaceScope", "repositoryScopeHash", "workstream", "roleId", "taskId", "sessionStatus", "permissionScope", "updatedAt", "identityEvidence", "hostRecoveryAvailable", "hostRecoveryEvidence", "sessionMatchStatus"],
14
- "reuseIdempotency": {
15
- "keyFields": ["projectRootHash", "workspaceScope", "repositoryScopeHash", "workstream", "taskId", "roleId", "provider", "targetVersion"],
16
- "algorithm": "RFC8785-JCS-SHA-256",
17
- "duplicatePolicy": "reuse-one-primary-preserve-history"
18
- }
19
- }
@@ -1,24 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "snapshotId": "shared-project-snapshot-template",
4
- "projectRootHash": null,
5
- "businessBaselineHash": null,
6
- "controlPlaneHash": null,
7
- "codeGraphRecordId": null,
8
- "codeGraphIndexHash": null,
9
- "sourceRevision": null,
10
- "snapshotStatus": "not-checked",
11
- "snapshotStatusEnum": ["not-checked", "building", "ready", "stale", "partial", "blocked", "failed"],
12
- "reuseDecision": "unknown",
13
- "reuseDecisionEnum": ["reuse", "rebuild", "unknown", "blocked"],
14
- "reusedByRoleIds": [],
15
- "generatedOnce": false,
16
- "refreshTriggers": ["business-baseline-changed", "control-plane-conflict", "codegraph-index-hash-changed", "source-revision-changed", "snapshot-corrupt"],
17
- "coverage": "unknown",
18
- "unverifiedScope": [],
19
- "evidence": [],
20
- "snapshotHash": null,
21
- "sensitiveScan": {"status": "not-run", "matches": []},
22
- "createdAt": null,
23
- "updatedAt": null
24
- }
@@ -1,31 +0,0 @@
1
- {
2
- "schemaVersion": 2,
3
- "migrationId": "single-session-skills-migration-template",
4
- "executionModelFrom": null,
5
- "executionModelTo": "single-session-skill-runtime",
6
- "projectRootHash": null,
7
- "idempotencyKey": null,
8
- "phase": "inventory",
9
- "phaseEnum": ["inventory", "snapshotted", "transforming", "validating", "committed", "recovery-required", "blocked", "manual-required"],
10
- "beforeHash": null,
11
- "afterHash": null,
12
- "legacyInventory": {
13
- "teamFiles": [],
14
- "roleTaskFiles": [],
15
- "roleSessionBindings": [],
16
- "skillAssignments": [],
17
- "customRoleFiles": []
18
- },
19
- "taskMappings": [],
20
- "skillMappings": [],
21
- "preservedReadOnlyPaths": [],
22
- "createdPaths": [],
23
- "updatedPaths": [],
24
- "rollbackPaths": [],
25
- "conflicts": [],
26
- "unverifiedScope": [],
27
- "status": "pending",
28
- "createdAt": null,
29
- "updatedAt": null,
30
- "audit": []
31
- }
@@ -1,23 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "executionModel": "shared-project-multi-conversation-runtime",
4
- "syncCheckId": null,
5
- "projectContextId": null,
6
- "consumerConversationId": null,
7
- "trigger": null,
8
- "triggerEnum": ["user-message-received", "before-plan", "before-write", "before-verification", "before-delivery", "manual-recovery"],
9
- "headObservations": {},
10
- "cursorBefore": {},
11
- "cursorAfter": {},
12
- "newEventIds": [],
13
- "affectedTaskIds": [],
14
- "affectedDomains": [],
15
- "affectedPaths": [],
16
- "refreshActions": [],
17
- "result": "no-changes",
18
- "resultEnum": ["no-changes", "incremental-refreshed", "full-refresh-required", "conflict", "blocked", "recovery-required"],
19
- "silentWhenNoChanges": true,
20
- "userNotificationRequired": false,
21
- "evidence": [],
22
- "checkedAt": null
23
- }
@@ -1,17 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "baselineRecordId": "takeover-baseline-template",
4
- "hashAlgorithm": "SHA-256",
5
- "status": "unknown",
6
- "capturedAt": null,
7
- "projectRootHash": null,
8
- "businessFiles": { "root": null, "count": 0, "manifestHash": null, "fileHashes": [], "excludedPaths": [] },
9
- "controlFiles": { "root": "xinyun-ai/", "count": 0, "manifestHash": null, "fileHashes": [] },
10
- "git": { "kind": "unknown", "uncommittedChanges": [], "statusEvidence": [], "writePerformed": false },
11
- "existingTasks": [],
12
- "existingSessions": [],
13
- "legacyAiDocuments": [],
14
- "sensitiveScan": { "status": "unknown", "matches": [] },
15
- "evidence": [],
16
- "updatedAt": null
17
- }