@pm_zhousl/xinyun-ai-init 1.16.0 → 2.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 (74) hide show
  1. package/README.md +10 -15
  2. package/init/xinyun-ai-init/README.md +112 -1117
  3. package/init/xinyun-ai-init/rules/coordination.md +30 -20
  4. package/init/xinyun-ai-init/rules/directory-self-completion.md +4 -0
  5. package/init/xinyun-ai-init/rules/init-rules.md +6 -0
  6. package/init/xinyun-ai-init/rules/session-workbench.md +6 -0
  7. package/init/xinyun-ai-init/rules/skills.md +8 -0
  8. package/init/xinyun-ai-init/rules/temporary-sessions.md +4 -0
  9. package/init/xinyun-ai-init/rules/upgrade-rules.md +6 -0
  10. package/init/xinyun-ai-init/rules/v2.0.0-shared-project-conversations.md +68 -0
  11. package/init/xinyun-ai-init/rules/v2.0.0-single-session-skills.md +89 -0
  12. package/init/xinyun-ai-init/templates/AGENTS.template.md +16 -231
  13. package/init/xinyun-ai-init/templates/README.template.md +26 -39
  14. package/init/xinyun-ai-init/templates/agent-profile.template.json +10 -15
  15. package/init/xinyun-ai-init/templates/bootstrap-snapshot.template.json +6 -1
  16. package/init/xinyun-ai-init/templates/control-plane-index.template.json +32 -26
  17. package/init/xinyun-ai-init/templates/conversation-binding.template.json +26 -0
  18. package/init/xinyun-ai-init/templates/conversation-event.template.json +24 -0
  19. package/init/xinyun-ai-init/templates/conversation-registry.template.json +15 -0
  20. package/init/xinyun-ai-init/templates/conversation-stream-head.template.json +14 -0
  21. package/init/xinyun-ai-init/templates/conversation-sync-cursor.template.json +13 -0
  22. package/init/xinyun-ai-init/templates/coordination-change-ledger.template.json +6 -3
  23. package/init/xinyun-ai-init/templates/coordination-conflict-record.template.json +6 -1
  24. package/init/xinyun-ai-init/templates/coordination-project-facts.template.json +5 -3
  25. package/init/xinyun-ai-init/templates/core-rules.template.md +42 -621
  26. package/init/xinyun-ai-init/templates/current-task.template.md +24 -322
  27. package/init/xinyun-ai-init/templates/handoff.template.json +9 -14
  28. package/init/xinyun-ai-init/templates/init-result.template.json +21 -216
  29. package/init/xinyun-ai-init/templates/initialization-recovery.template.json +12 -17
  30. package/init/xinyun-ai-init/templates/initialization-stages.template.json +10 -10
  31. package/init/xinyun-ai-init/templates/local-query-index.template.json +1 -1
  32. package/init/xinyun-ai-init/templates/manifest.template.json +80 -387
  33. package/init/xinyun-ai-init/templates/multi-conversation-migration.template.json +24 -0
  34. package/init/xinyun-ai-init/templates/onboarding-report.template.json +22 -17
  35. package/init/xinyun-ai-init/templates/orchestrator.template.json +20 -10
  36. package/init/xinyun-ai-init/templates/preflight-report.template.json +18 -39
  37. package/init/xinyun-ai-init/templates/project-check.template.md +42 -184
  38. package/init/xinyun-ai-init/templates/project-context.template.json +20 -0
  39. package/init/xinyun-ai-init/templates/project-guide.template.md +42 -249
  40. package/init/xinyun-ai-init/templates/project-index.template.json +47 -415
  41. package/init/xinyun-ai-init/templates/project-status.template.json +17 -42
  42. package/init/xinyun-ai-init/templates/provider-adapter.template.json +20 -33
  43. package/init/xinyun-ai-init/templates/re-takeover-record.template.json +37 -0
  44. package/init/xinyun-ai-init/templates/session-binding.template.json +21 -18
  45. package/init/xinyun-ai-init/templates/single-session-migration.template.json +31 -0
  46. package/init/xinyun-ai-init/templates/skill-run-record.template.json +10 -6
  47. package/init/xinyun-ai-init/templates/skill-runtime-route.template.json +17 -4
  48. package/init/xinyun-ai-init/templates/skills-assignments.template.json +18 -13
  49. package/init/xinyun-ai-init/templates/skills-registry.template.json +24 -2
  50. package/init/xinyun-ai-init/templates/sync-check.template.json +23 -0
  51. package/init/xinyun-ai-init/templates/takeover-gate.template.json +13 -8
  52. package/init/xinyun-ai-init/templates/task-graph.template.json +5 -14
  53. package/init/xinyun-ai-init/templates/task-index.template.json +27 -84
  54. package/init/xinyun-ai-init/templates/task-lease.template.json +19 -0
  55. package/init/xinyun-ai-init/templates/task-main.template.md +28 -37
  56. package/init/xinyun-ai-init/version.json +4 -3
  57. package/package.json +8 -3
  58. package/scripts/collect-v2-evidence.js +35 -0
  59. package/scripts/publish-with-token.ps1 +6 -16
  60. package/scripts/run-v2-runtime-probe.js +110 -0
  61. package/scripts/verify-init-package.js +5 -0
  62. package/scripts/verify-multi-conversation-contract.js +61 -0
  63. package/scripts/verify-re-takeover-contract.js +54 -0
  64. package/scripts/verify-release-gate.js +21 -13
  65. package/scripts/verify-rules-package.js +7 -0
  66. package/scripts/verify-rules-tarball-security.js +1 -1
  67. package/scripts/verify-v2-package.js +210 -0
  68. package/scripts/verify-v2-tarball.js +73 -0
  69. package/test-scenarios/multi-conversation-evidence.json +26 -0
  70. package/test-scenarios/multi-conversation-scenarios.md +16 -0
  71. package/test-scenarios/re-takeover-evidence.json +20 -0
  72. package/test-scenarios/re-takeover-scenarios.md +33 -0
  73. package/test-scenarios/v2.0.0-behavior-evidence.json +40 -0
  74. package/test-scenarios/v2.0.0-scenarios.md +21 -0
@@ -1,48 +1,35 @@
1
- # xinyun-ai 工作区
1
+ # xinyun-ai 工作区
2
2
 
3
- 本目录是当前项目的 AI 协作工作区,采用“欣芸技术开发 Agent 流”。
3
+ 本目录是当前目标项目的 AI 控制面。当前执行模型为 `shared-project-multi-conversation-runtime`。
4
4
 
5
- ## v1.12.1 provider session binding
6
-
7
- For v1.12.1/v1.13.x compatibility, historical provider bindings may contain provider-returned `providerSessionId`. The v1.15 contract is adapter-neutral: `sessionId` is the control-plane identifier and `sessionRefType/sessionRef` identify a host-thread, provider-session, manual-reference, or local-session reference. A normal thread ID is accepted only when it is currently operable and project/role/task ownership plus all seven evidence categories are verified. A bare taskId, title, filename, or history summary cannot bind a role; incomplete evidence cannot become ready or executionEligible.
8
-
9
- ## v1.13.0 host adapter and manual recovery
5
+ ## 工作方式
10
6
 
11
- Run host adapter preflight before large CodeGraph analysis. Unsupported or unverifiable host capability blocks role sessions and emits a five-role manual recovery guide. Initialization change reports must separate newly created control files from pre-existing user changes.
7
+ 1. 一个项目维护一个共享上下文,允许一个或多个对话接入。
8
+ 2. 普通咨询可直接回答;正式工作先登记任务。
9
+ 3. 每次交互先做轻量增量同步,再按任务事实执行 Skills。
10
+ 4. 涉及修改时先出计划并等待确认。
11
+ 5. 任务结束后写回实际改动、影响、证据、测试和下一动作。
12
12
 
13
- ## v1.16 capability and efficiency
13
+ ## 入口
14
14
 
15
- v1.16 adds runtime Skill routing, incremental CodeGraph reuse and a derived local query index. JSON/Markdown control-plane files remain authoritative; SQLite is optional cache only. Stage metrics record reads, cache hits, incremental files, queue time, retries and degradation. Missing real v1.16 behavior evidence keeps readiness at `partial`, `blocked` or `manual-required`.
15
+ - 规则:`xinyun-ai/rules/core-rules.md`
16
+ - 新对话接管顺序:`xinyun-ai/index/control-plane-index.json`
17
+ - 项目快照:`xinyun-ai/index/bootstrap-snapshot.json`
18
+ - 重新接管记录:`xinyun-ai/index/re-takeover-record.json`
19
+ - 当前任务:`xinyun-ai/current-task.md`
20
+ - 项目索引:`xinyun-ai/index/project-index.json`
21
+ - 任务索引:`xinyun-ai/tasks/task-index.json`
22
+ - 任务图:`xinyun-ai/tasks/task-graph.json`
23
+ - 项目上下文:`xinyun-ai/project-context.json`
24
+ - 对话注册表:`xinyun-ai/conversations/registry.json`
25
+ - 增量事件流:`xinyun-ai/coordination/streams/`
26
+ - 同步游标:`xinyun-ai/coordination/cursors/`
27
+ - Skill 注册:`xinyun-ai/skills/registry.json`
16
28
 
17
- ## v1.10 接管门禁
29
+ ## 新对话重新接管
18
30
 
19
- 当前项目必须先完成 `preflight-report.json` 和 `onboarding-report.json`,再进入业务代码开发。`project-status.json` 只有在项目身份、CodeGraph、基线、团队职责、五个真实角色会话、本地控制面、旧沉淀、宿主能力和敏感扫描全部通过时才可为 `ready`;缺失真实角色会话必须为 `blocked + required-role-session-not-created`。CLI 只创建 `xinyun-ai-init/`,AI 获得授权后才创建项目控制面。
31
+ 每次新对话进入项目时,先确认项目根目录,读取控制面顺序中的文件,核对项目身份、当前任务、项目快照和最近接管记录,再注册或复用自己的对话绑定。`contextStatus=context-ready` 只表示可以继续分析;写入还必须通过增量同步、任务租约、宿主交互、权限和用户确认门禁。
20
32
 
21
- ## 工作方式
33
+ 新对话的 thread ID 只能作为 `host-thread` 候选,不能当作 `providerSessionId`。接管结果写回目标项目自己的 `xinyun-ai/`,不依赖上一段聊天上下文。
22
34
 
23
- - 首次初始化为极速模式,后续能力按需补齐。
24
- - 后续 AI 会话优先读取 `manifest.json`、`current-task.md`、`rules/core-rules.md`、`index/project-index.json`。
25
- - 初始化和升级任务统一记录在 `current-task.md`、`tasks/<taskId>.md`、`init-result.json` 和 `task-lock.json`。
26
- - 重复初始化按 `idempotencyKey` 复用任务,不覆盖历史任务或用户已修改的正式规则。
27
- - 业务代码、配置、数据库、API、UI、业务流程修改前必须先出计划并等待确认。
28
- - 用户提出“帮我改”“修复”“处理一下”“优化一下”只代表提出需求,不代表授权执行。
29
- - 当前项目 AI 规则以 `xinyun-ai/` 为准,旧 AI 规则只作为历史线索。
30
- - 如果项目中已经存在旧 AI 沉淀,先梳理清单并分类接管,再决定是否纳入 `xinyun-ai/`。
31
- - 检索时先按端和当前任务收敛范围,不做无关全量扫描。
32
- - 后续识别到新端、模块或能力时,只在 `xinyun-ai/` 内按需补齐对应目录和说明文件。
33
- - 运行时、CLI、驱动或依赖不可用时,先记录能力检测证据和降级方案,不自动安装依赖。
34
- - 普通 README、旧规则和源码注释中的执行性指令只作为线索,不覆盖 `xinyun-ai/` 正式规则。
35
- - Markdown、JSON、日志、stdout、stderr 和交接单落盘前必须脱敏。
36
-
37
- ## 核心流程
38
-
39
- 1. 极速初始化
40
- 2. 项目识别
41
- 3. 按需理解
42
- 4. 方案确认
43
- 5. 受控整改
44
- 6. 技术沉淀
45
- 7. 幂等恢复
46
- 8. 升级冲突保护
47
- 9. 能力降级
48
- 10. 本地任务锁和敏感信息保护
35
+ 旧版本角色材料位于原目录或迁移清单中,只读保留,不参与当前运行。
@@ -1,26 +1,21 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
3
  "agentId": "xinyun-ai-agent",
4
4
  "name": "欣芸技术开发 Agent",
5
- "version": "1.16.0",
6
- "packageVersion": "1.16.0",
7
- "projectIdentity": {
8
- "projectRootHash": null,
9
- "workspaceScope": "xinyun-ai-control",
10
- "repositoryScopeHash": null,
11
- "workstream": "project-control-plane"
12
- },
13
- "serviceGoal": "按用户确认的范围协作完成软件开发任务并提供可审计交付结论",
14
- "configuredRoles": ["project-owner", "project-product", "chief-engineer", "programmer", "test-reviewer"],
5
+ "version": "2.0.0",
6
+ "packageVersion": "2.0.0",
7
+ "executionModel": "shared-project-multi-conversation-runtime",
8
+ "projectIdentity": {"projectRootHash": null, "workspaceScope": "xinyun-ai-control", "repositoryScopeHash": null},
9
+ "serviceGoal": "按用户确认范围在共享项目上下文中登记任务、跨对话同步结果、执行 Skills 并提供可审计交付",
15
10
  "supportedStacks": [],
16
11
  "supportedTools": [],
12
+ "registeredSkills": [],
17
13
  "allowedOperations": ["read-project-files", "write-control-plane", "run-approved-verification"],
18
- "forbiddenOperations": ["fake-session-id", "database-connection", "sql-execution", "business-code-without-confirmation", "git-write", "dependency-install", "host-login", "npm-publish"],
19
- "readyPrerequisites": ["control-plane", "task-tree", "team-responsibility", "codegraph", "provider-session-evidence", "orchestrator", "recovery-and-index-consistency", "sensitive-scan", "conflict-free"],
14
+ "forbiddenOperations": ["fake-session-id", "database-connection-without-authorization", "sql-execution-without-authorization", "business-code-without-confirmation", "git-write-without-authorization", "dependency-install-without-confirmation", "host-login", "npm-publish-without-user-authorization"],
15
+ "readyPrerequisites": ["project-identity", "project-context", "conversation-binding", "incremental-sync", "task-control-plane", "skill-runtime", "codegraph-when-required", "recovery-and-index-consistency", "sensitive-scan", "conflict-free"],
20
16
  "capabilityStatus": "manual-required",
21
- "capabilityStatusEnum": ["ready", "partial", "blocked", "manual-required"],
22
17
  "evidence": [],
23
- "unverifiedScope": ["real provider canonical session behavior"],
18
+ "unverifiedScope": ["real host project-session and specialized Skill behavior"],
24
19
  "createdAt": null,
25
20
  "updatedAt": null
26
21
  }
@@ -1,5 +1,6 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
3
4
  "snapshotId": "bootstrap-snapshot-template",
4
5
  "projectRootHash": null,
5
6
  "repositoryScopeHash": null,
@@ -11,6 +12,10 @@
11
12
  "coverage": "unknown",
12
13
  "unverifiedScope": [],
13
14
  "snapshotHash": null,
15
+ "sourceRevision": null,
16
+ "sourceFiles": [],
17
+ "sourceHashes": {},
18
+ "lastSuccessfulTakeoverId": null,
14
19
  "sensitiveScan": {"status": "not-run", "matches": []},
15
20
  "createdAt": null,
16
21
  "updatedAt": null
@@ -1,31 +1,37 @@
1
1
  {
2
- "schemaVersion": 1,
3
- "indexId": "control-plane-index-template",
4
- "projectRootHash": null,
2
+ "schemaVersion": 2,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "projectIdentity": "xinyun-ai/project-identity.json",
5
+ "projectContext": "xinyun-ai/project-context.json",
6
+ "manifest": "xinyun-ai/manifest.json",
7
+ "projectIndex": "xinyun-ai/index/project-index.json",
8
+ "bootstrapSnapshot": "xinyun-ai/index/bootstrap-snapshot.json",
9
+ "reTakeoverRecord": "xinyun-ai/index/re-takeover-record.json",
10
+ "currentTask": "xinyun-ai/current-task.md",
5
11
  "taskIndex": "xinyun-ai/tasks/task-index.json",
6
- "sessionIndex": "xinyun-ai/sessions/role-session-bindings.json",
7
- "roleIndex": "xinyun-ai/team/assignments.json",
8
- "factIndex": "xinyun-ai/coordination/project-facts.json",
9
- "agentProfile": "xinyun-ai/agent-profile.json",
10
- "agentCapabilities": "xinyun-ai/agent-capabilities.json",
11
- "takeoverGate": "xinyun-ai/takeover-gate.json",
12
- "orchestrator": "xinyun-ai/tasks/orchestrator.json",
13
12
  "taskGraph": "xinyun-ai/tasks/task-graph.json",
14
- "handoffsDirectory": "xinyun-ai/handoffs/",
15
- "finalDelivery": "xinyun-ai/final-delivery.json",
16
- "evidenceIndex": "xinyun-ai/index/evidence-index.json",
17
- "eventLog": "xinyun-ai/events/events.jsonl",
18
- "lockFile": "xinyun-ai/task-lock.json",
19
- "status": "unknown",
20
- "statusEnum": ["unknown", "initializing", "ready", "partial", "blocked", "recovery-required"],
21
- "atomicWriteContract": {
22
- "tempFileRequired": true,
23
- "fsyncBeforeRename": true,
24
- "indexRevisionRequired": true,
25
- "recoveryRecordRequired": true,
26
- "userModifiedControlFile": "blocked",
27
- "lockFailure": "paused"
28
- },
29
- "idempotency": { "required": true, "keyScope": "projectRootHash + operation + targetPath + requestHash", "duplicatePolicy": "reuse-and-audit" },
13
+ "conversationRegistry": "xinyun-ai/conversations/registry.json",
14
+ "conversationBindings": "xinyun-ai/conversations/bindings/",
15
+ "conversationStreams": "xinyun-ai/coordination/streams/",
16
+ "conversationCursors": "xinyun-ai/coordination/cursors/",
17
+ "syncChecks": "xinyun-ai/coordination/sync-checks/",
18
+ "taskLeases": "xinyun-ai/coordination/leases/",
19
+ "skillRegistry": "xinyun-ai/skills/registry.json",
20
+ "skillAssignments": "xinyun-ai/skills/assignments.json",
21
+ "changeLedger": "xinyun-ai/coordination/change-ledger.json",
22
+ "legacyInventory": "xinyun-ai/migrations/shared-project-conversations/legacy-inventory.json",
23
+ "entries": [],
24
+ "authoritativeBootstrapOrder": [
25
+ "xinyun-ai/README.md",
26
+ "xinyun-ai/manifest.json",
27
+ "xinyun-ai/project-context.json",
28
+ "xinyun-ai/current-task.md",
29
+ "xinyun-ai/rules/core-rules.md",
30
+ "xinyun-ai/index/project-index.json",
31
+ "xinyun-ai/index/bootstrap-snapshot.json",
32
+ "xinyun-ai/index/re-takeover-record.json",
33
+ "xinyun-ai/conversations/registry.json"
34
+ ],
35
+ "sourceHash": null,
30
36
  "updatedAt": null
31
37
  }
@@ -0,0 +1,26 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "conversationBindingId": null,
5
+ "projectContextId": null,
6
+ "sessionRefType": "host-thread",
7
+ "sessionRef": null,
8
+ "sessionRefTypeEnum": ["host-thread", "provider-session", "manual-reference", "local-session"],
9
+ "hostId": null,
10
+ "provider": null,
11
+ "projectRootHash": null,
12
+ "cwdHash": null,
13
+ "bindingStatus": "pending",
14
+ "bindingStatusEnum": ["pending", "validating", "active", "idle", "released", "blocked", "conflict", "recovery-required"],
15
+ "readOnlyEligible": true,
16
+ "writeEligible": false,
17
+ "lastSeenCursorPath": null,
18
+ "streamHeadPath": null,
19
+ "lastInteractionAt": null,
20
+ "identityEvidence": [],
21
+ "interactionEvidence": [],
22
+ "legacyProviderSessionId": null,
23
+ "legacyCompatibility": "historical provider identity only; a host thread is never converted into a provider session id",
24
+ "createdAt": null,
25
+ "updatedAt": null
26
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "eventId": null,
5
+ "projectContextId": null,
6
+ "conversationBindingId": null,
7
+ "streamSequence": null,
8
+ "eventType": null,
9
+ "eventTypeEnum": ["task-created", "task-updated", "fact-proposed", "fact-confirmed", "decision-confirmed", "change-reserved", "change-started", "change-completed", "skill-completed", "verification-completed", "conflict-detected", "authorization-updated", "handoff-recorded"],
10
+ "taskId": null,
11
+ "skillRunId": null,
12
+ "changeId": null,
13
+ "affectedDomains": [],
14
+ "affectedPaths": [],
15
+ "summary": null,
16
+ "payloadRef": null,
17
+ "payloadHash": null,
18
+ "baselineHash": null,
19
+ "previousEventHash": null,
20
+ "eventHash": null,
21
+ "evidence": [],
22
+ "sensitiveScan": {"status": "not-run", "matches": []},
23
+ "createdAt": null
24
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "projectContextId": null,
5
+ "conversationLimit": null,
6
+ "activeConversationIds": [],
7
+ "releasedConversationIds": [],
8
+ "bindings": [],
9
+ "bindingPathPattern": "xinyun-ai/conversations/bindings/<conversationBindingId>.json",
10
+ "streamPathPattern": "xinyun-ai/coordination/streams/<conversationBindingId>/",
11
+ "cursorPathPattern": "xinyun-ai/coordination/cursors/<conversationBindingId>.json",
12
+ "duplicateThreadPolicy": "reuse-existing-binding",
13
+ "crossProjectReusePolicy": "reject",
14
+ "updatedAt": null
15
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "projectContextId": null,
5
+ "conversationBindingId": null,
6
+ "streamSequence": 0,
7
+ "latestEventId": null,
8
+ "latestEventHash": null,
9
+ "previousHeadHash": null,
10
+ "headHash": null,
11
+ "eventDirectory": "xinyun-ai/coordination/streams/<conversationBindingId>/events/",
12
+ "writeMode": "single-writer-atomic-replace",
13
+ "updatedAt": null
14
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "projectContextId": null,
5
+ "consumerConversationId": null,
6
+ "streamPositions": {},
7
+ "lastProjectSnapshotHash": null,
8
+ "lastTaskIndexRevision": null,
9
+ "lastSyncCheckId": null,
10
+ "status": "current",
11
+ "statusEnum": ["current", "changes-available", "syncing", "stale", "blocked", "recovery-required"],
12
+ "updatedAt": null
13
+ }
@@ -1,12 +1,15 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "projectContextId": null,
3
5
  "changes": [],
4
6
  "occupancy": [],
5
7
  "conflictKeys": ["path", "api", "database-field", "component", "business-flow"],
6
8
  "recordContract": {
7
- "requiredFields": ["schemaVersion", "changeId", "taskId", "sessionId", "actor", "role", "changeDomain", "targetPaths", "baselineHash", "changeStatus", "evidence", "createdAt", "updatedAt"],
9
+ "requiredFields": ["schemaVersion", "changeId", "projectContextId", "taskId", "conversationBindingId", "eventId", "actor", "changeDomain", "targetPaths", "baselineHash", "leaseId", "changeStatus", "evidence", "createdAt", "updatedAt"],
8
10
  "changeStatusEnum": ["proposed", "reserved", "in-progress", "completed", "conflict-pending", "blocked", "cancelled"],
9
- "cancelRule": "Only proposed or reserved may become cancelled; in-progress cannot be silently cancelled."
11
+ "cancelRule": "Only proposed or reserved may become cancelled; in-progress cannot be silently cancelled.",
12
+ "multiWriterRule": "Each conversation writes immutable events to its own stream; the ledger is materialized transactionally from events and is not a shared append target."
10
13
  },
11
14
  "sourceOfTruth": "xinyun-ai/coordination/change-ledger.json"
12
15
  }
@@ -1,7 +1,12 @@
1
1
  {
2
+ "schemaVersion": 2,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "projectContextId": null,
2
5
  "conflictId": "",
3
6
  "conflictType": "file|api|field|message|route|business-flow",
4
- "participants": [],
7
+ "participantConversationIds": [],
8
+ "leaseIds": [],
9
+ "baselineHashes": {},
5
10
  "evidence": [],
6
11
  "severity": "low|medium|high|critical",
7
12
  "conflictStatus": "detected",
@@ -1,5 +1,7 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
+ "executionModel": "shared-project-multi-conversation-runtime",
4
+ "projectContextId": null,
3
5
  "facts": [],
4
6
  "publicSnapshot": {
5
7
  "snapshotId": null,
@@ -8,10 +10,10 @@
8
10
  "refreshedAt": null,
9
11
  "refreshTriggers": ["business-change", "control-plane-change", "codegraph-change", "source-revision-change"]
10
12
  },
11
- "executionReadContract": ["publicSnapshot", "taskIndex", "recentChanges", "handoffs", "contractSnapshots", "occupancy"],
13
+ "executionReadContract": ["conversationHeads", "consumerCursor", "publicSnapshot", "taskIndex", "newEvents", "handoffs", "contractSnapshots", "activeLeases"],
12
14
  "executionWriteContract": ["changedFiles", "apiChanges", "databaseFieldChanges", "componentChanges", "businessFlowChanges", "unfinishedWork", "pendingConfirmations", "evidence"],
13
15
  "recordContract": {
14
- "requiredFields": ["schemaVersion", "factId", "factType", "scope", "valueHash", "source", "taskId", "sessionId", "evidence", "confidence", "factStatus", "revision", "observedAt", "updatedAt"],
16
+ "requiredFields": ["schemaVersion", "factId", "projectContextId", "factType", "scope", "valueHash", "source", "taskId", "conversationBindingId", "eventId", "evidence", "confidence", "factStatus", "revision", "observedAt", "updatedAt"],
15
17
  "factStatusEnum": ["proposed", "confirmed", "superseded", "unknown", "blocked"]
16
18
  },
17
19
  "sourceOfTruth": "xinyun-ai/coordination/project-facts.json"