@pm_zhousl/xinyun-ai-init 1.12.1 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/init/xinyun-ai-init/README.md +3 -3
- package/init/xinyun-ai-init/rules/directory-self-completion.md +1 -0
- package/init/xinyun-ai-init/rules/init-rules.md +7 -3
- package/init/xinyun-ai-init/rules/session-workbench.md +7 -1
- package/init/xinyun-ai-init/rules/upgrade-rules.md +7 -3
- package/init/xinyun-ai-init/rules/v1.10.2-contract.md +1 -1
- package/init/xinyun-ai-init/rules/v1.13.0-host-adapter.md +43 -0
- package/init/xinyun-ai-init/templates/AGENTS.template.md +4 -3
- package/init/xinyun-ai-init/templates/README.template.md +4 -0
- package/init/xinyun-ai-init/templates/core-rules.template.md +7 -1
- package/init/xinyun-ai-init/templates/current-task.template.md +1 -1
- package/init/xinyun-ai-init/templates/database-authorization.template.json +15 -1
- package/init/xinyun-ai-init/templates/host-preflight.template.json +2 -0
- package/init/xinyun-ai-init/templates/init-result.template.json +54 -3
- package/init/xinyun-ai-init/templates/initialization-change-report.template.json +14 -0
- package/init/xinyun-ai-init/templates/manifest.template.json +50 -5
- package/init/xinyun-ai-init/templates/manual-session-binding.template.json +12 -2
- package/init/xinyun-ai-init/templates/manual-session-recovery.template.json +49 -0
- package/init/xinyun-ai-init/templates/preflight-report.template.json +17 -1
- package/init/xinyun-ai-init/templates/project-check.template.md +1 -1
- package/init/xinyun-ai-init/templates/project-guide.template.md +4 -1
- package/init/xinyun-ai-init/templates/project-index.template.json +41 -2
- package/init/xinyun-ai-init/templates/provider-adapter.template.json +32 -0
- package/init/xinyun-ai-init/templates/provider-session-binding.template.json +17 -0
- package/init/xinyun-ai-init/templates/role-execution.template.md +6 -0
- package/init/xinyun-ai-init/templates/role-session-binding.template.json +8 -3
- package/init/xinyun-ai-init/templates/role-subtask.template.md +8 -0
- package/init/xinyun-ai-init/templates/task-index.template.json +20 -0
- package/init/xinyun-ai-init/templates/team/assignments.json +11 -1
- package/init/xinyun-ai-init/version.json +1 -1
- package/package.json +1 -1
- package/scripts/verify-init-package.js +109 -4
- package/scripts/verify-rules-package.js +84 -9
- package/test-scenarios/v1.13.0-behavior-evidence.json +650 -0
- package/test-scenarios/v1.13.0-scenarios.md +94 -0
- package/test-scenarios/v1.9.0-scenarios.md +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
本目录是“欣芸技术开发 Agent 流”的初始化包,负责把完整 AI 执行要求下发到目标项目。
|
|
4
4
|
|
|
5
|
-
当前规则版本:`1.
|
|
5
|
+
当前规则版本:`1.13.1`。
|
|
6
6
|
|
|
7
7
|
## Codex 一句话入口
|
|
8
8
|
|
|
@@ -1137,7 +1137,7 @@ CodeGraph 唯一状态源为 `xinyun-ai/manifest.json` 的 `codeGraphRequired`
|
|
|
1137
1137
|
|
|
1138
1138
|
`projectStatus` 固定为 `not-started/initializing/partial/blocked/ready`。只有全部 `requiredGates` 通过且无高风险阻塞时才允许 `executionEligible=true`。缺少真实角色会话时必须 `blocked + blockedReason=required-role-session-not-created`,不得伪造 `sessionId`。
|
|
1139
1139
|
|
|
1140
|
-
Git none、无测试框架和工具链未检测只登记 `not-available/not-detected`、证据和 `unverifiedScope`,不伪造通过且不自动安装依赖。数据库默认 `authorization=not-requested`、`executionStatus=needs-confirmation`、`redactionStatus=verified
|
|
1140
|
+
Git none、无测试框架和工具链未检测只登记 `not-available/not-detected`、证据和 `unverifiedScope`,不伪造通过且不自动安装依赖。数据库默认 `authorization=not-requested`、`executionStatus=needs-confirmation`、`redactionStatus=verified`;普通初始化不扫描数据库文件。数据库相关任务只读项目内受限的 SQL/schema/migration/model 文本文件,不连接本地或线上数据库、不查询真实数据、不执行 SQL。所有敏感信息不得写入任务、日志、交接单、JSON、Markdown 或 stdout/stderr。
|
|
1141
1141
|
|
|
1142
1142
|
## v1.9 项目会话隔离、总工全景与数据库授权
|
|
1143
1143
|
|
|
@@ -1149,6 +1149,6 @@ Git none、无测试框架和工具链未检测只登记 `not-available/not-dete
|
|
|
1149
1149
|
|
|
1150
1150
|
总工维护 `xinyun-ai/technical-landscape.json`,主会话维护 `xinyun-ai/packets/requirement-packet.json`,总工返回 `xinyun-ai/packets/technical-impact-packet.json`。技术全景只有 `coverageStatus=full`、`unverifiedScope=[]` 且核心对象都有有效证据时才可 `ready`;`partial/unknown` 不得写成 ready。两个 packet 必须关联同一 requirementId、taskId、projectRootHash 和 version,使用 RFC 8785 JCS-SHA-256;关联内容变化时写入 `blockedReason=packet-stale` 并重新确认。
|
|
1151
1151
|
|
|
1152
|
-
|
|
1152
|
+
数据库正式模式为 `databaseAccessMode=local-files-read-only`,`legacyDatabaseAccessMode=sql-only` 仅为兼容标识;`sqlExecutionMode=generate-only`。只有数据库相关任务才读取项目内 `*.sql`、`*.ddl`、`*.schema`、`*.migration` 以及 `database/`、`migrations/`、`schema/`、`models/` 下的文本文件。严禁连接本地或线上数据库、打开 SQLite/数据库服务、查询真实数据、执行 SQL、migration、seed 或修改数据,也不自动安装驱动。连接、只读查询、结构变更和数据修改权限仍独立记录;四类授权状态固定为 `not-requested/requested/authorized/denied/expired/failed/unknown`,脱敏状态固定为 `verified/unverified/failed`。SQL 只作为 review 计划输出,需校验规范化 SQL、参数、方言、targetEnvironment、授权范围和 `statementHash`;授权过期或输入变化时回到 `executionStatus=needs-confirmation`,受影响授权进入 `expired` 并追加 audit。
|
|
1153
1153
|
|
|
1154
1154
|
v1.9 不自动复用其他项目会话、不自动连接或修改数据库、不扩大 HTML 迁移范围,不执行 Git 写操作或 npm publish。
|
|
@@ -62,6 +62,7 @@ When takeover initialization is authorized, create `host-preflight.json`, `index
|
|
|
62
62
|
- 绑定目录只保存 Codex 宿主返回的真实 `sessionId` 摘要、onboarding 状态、失败原因和 audit,不保存伪造 sessionId。
|
|
63
63
|
- 宿主不支持创建子会话时,仍可补齐本地目录和降级记录,状态使用 `local-degraded-no-fake-session-id`。
|
|
64
64
|
- v1.12.1 provider 绑定记录固定写入 `xinyun-ai/sessions/provider-session-bindings.json`,模板来源为 `xinyun-ai-init/templates/provider-session-binding.template.json`。只有宿主 canonical `providerSessionId`、身份/交互证据和独占占用均通过时才可绑定;未知或普通线程 ID 保持 blocked/pending。
|
|
65
|
+
- v1.13.0 按需补齐 `provider-adapter.json`、`manual-session-recovery.json` 和 `index/initialization-change-report.json`;宿主预检失败时只生成恢复引导和阻断记录,不先执行大规模 CodeGraph 扫描。
|
|
65
66
|
|
|
66
67
|
## v1.8 按需目录
|
|
67
68
|
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
Use the provider-specific binding contract before role-session work. `providerSessionId` must be a provider canonical session value, not a normal thread ID. Identity and interaction evidence are required for binding; missing evidence remains pending or blocked.
|
|
6
6
|
|
|
7
|
+
v1.13.0 preflight is a hard early gate. Check all adapter operations before large CodeGraph analysis; on host failure preserve tasks, emit manual recovery prompts, and record `codeGraphDeferred=true`.
|
|
8
|
+
|
|
9
|
+
After an automatic role-session failure, the user decision gate offers `manual-create`, `defer`, and `redetect` exactly once. No decision means blocked state with no fake binding and no repeated prompt. Manual recovery requires the explicit confirmation `已创建,继续绑定`; defer preserves all task, snapshot, CodeGraph and recovery IDs; redetect runs only host preflight. Ready requires all five real role bindings and onboarding.
|
|
10
|
+
|
|
7
11
|
- 首次只创建最小 `xinyun-ai/` 骨架和极简 `AGENTS.md`。
|
|
8
12
|
- 首次不创建大量规则、模板、脚本和业务沉淀目录。
|
|
9
13
|
- 首次不执行语言级语法检查、lint、typecheck、测试或构建命令。
|
|
@@ -107,7 +111,7 @@ Run the seven-capability host preflight before role sessions. Materialize the ma
|
|
|
107
111
|
- 接管基线记录业务文件哈希、控制文件哈希、未提交 Git、已有任务/会话和旧 AI 文档。旧沉淀必须分类为 adopted/pending-confirmation/not-adopted,敏感原文不得落盘。
|
|
108
112
|
- 五个角色和主任务必须有父子任务、状态、下一步和真实 sessionId;缺失角色会话固定 `blockedReason=required-role-session-not-created`,不得伪造 sessionId。
|
|
109
113
|
- `projectStatus` 只有在所有 requiredGates 通过、敏感扫描通过且无高风险阻塞时才可为 ready;executionEligible 必须同时为 true。
|
|
110
|
-
- Git none、无测试框架、工具链未检测只记录 not-available/not-detected 和 unverifiedScope;数据库默认 `authorization=not-requested`、`executionStatus=needs-confirmation`、`redactionStatus=verified
|
|
114
|
+
- Git none、无测试框架、工具链未检测只记录 not-available/not-detected 和 unverifiedScope;数据库默认 `authorization=not-requested`、`executionStatus=needs-confirmation`、`redactionStatus=verified`。普通初始化不扫描数据库文件;数据库相关任务仅只读项目内 SQL/schema/migration/model 文本,不连接本地或线上数据库、不查询真实数据、不执行 SQL。
|
|
111
115
|
|
|
112
116
|
## v1.9 初始化项目身份与联合门禁
|
|
113
117
|
|
|
@@ -115,7 +119,7 @@ Run the seven-capability host preflight before role sessions. Materialize the ma
|
|
|
115
119
|
|
|
116
120
|
会话候选状态固定为 `reusable/renamed/duplicate-not-primary/other-project/unknown/not-reusable/requires-confirmation`,只有 reusable 或有完整改名 audit 的 renamed 才能绑定。其他项目会话不得展示或复用,中文展示名使用项目简称、角色中文名和职责名称。
|
|
117
121
|
|
|
118
|
-
技术全景只有 full coverage、空 unverifiedScope 和核心证据完整时才可 ready;partial/unknown 不得 ready。requirementPacket 与 technicalImpactPacket 必须同项目、task、版本和 hash;失效时进入 `packet-stale`
|
|
119
|
-
- v1.9 fields: `sessionMatchStatus`、`selectionEvidence`、`项目简称|角色中文名|职责名称`、`coverageStatus=full`、`databaseAccessMode=sql-only`、`targetEnvironment`。
|
|
122
|
+
技术全景只有 full coverage、空 unverifiedScope 和核心证据完整时才可 ready;partial/unknown 不得 ready。requirementPacket 与 technicalImpactPacket 必须同项目、task、版本和 hash;失效时进入 `packet-stale` 并阻断执行。数据库正式为 `local-files-read-only`,`sql-only` 仅为兼容标识;只读本地数据库相关文本文件,SQL 仅生成供审阅,连接、查询、结构变更和数据修改均禁止,每条 SQL 必须校验 statementHash 和目标环境。
|
|
123
|
+
- v1.9 fields: `sessionMatchStatus`、`selectionEvidence`、`项目简称|角色中文名|职责名称`、`coverageStatus=full`、`databaseAccessMode=local-files-read-only`、`legacyDatabaseAccessMode=sql-only`、`targetEnvironment`。
|
|
120
124
|
|
|
121
125
|
共享事实和 Skill 文件使用临时文件、完整校验和原子重命名。前端审计默认只读;临时会话只有用户确认的代码任务才可创建。不得修改业务代码、数据库、API、依赖、Git 或发布配置。
|
|
@@ -6,6 +6,12 @@ Read `v1.12.1-provider-session-binding.md` before role-session work. `providerSe
|
|
|
6
6
|
|
|
7
7
|
Recovery reuses taskId and roleTaskId, increments attempt, and enters `recovery-required` after a writeback failure without creating duplicates. Unsupported hosts use `local-degraded` with `providerSessionId=null`; never fabricate a session ID.
|
|
8
8
|
|
|
9
|
+
## v1.13.0 host adapter preflight
|
|
10
|
+
|
|
11
|
+
Automatic session failure enters a one-time user decision gate: `manual-create`, `defer`, or `redetect`. Manual creation outputs all five role prompts and binds only after `已创建,继续绑定` plus canonical provider ID and identity/interaction evidence. Defer preserves task and snapshot IDs; redetect does host preflight only. Until all five role sessions complete onboarding, keep the project blocked.
|
|
12
|
+
|
|
13
|
+
Run the provider adapter preflight for create/reuse/send/receive/query-status/recover/close/control-file access before broad CodeGraph work. Any required unknown, unavailable, permission-denied, failed, not-verified, or dependency-gated capability blocks the role-session stage and defers the expensive scan. Unsupported hosts emit the five-role manual recovery guide and preserve original task IDs.
|
|
14
|
+
|
|
9
15
|
首次初始化不创建会话工作台。复杂任务中可按需创建:
|
|
10
16
|
|
|
11
17
|
```md
|
|
@@ -313,5 +319,5 @@ Record all seven host capabilities before role sessions. `available-with-depende
|
|
|
313
319
|
|
|
314
320
|
总工交接必须引用 technical-landscape、requirementPacket 和 technicalImpactPacket 的 ID、版本、sourceRevision 和 RFC8785 JCS-SHA-256 hash;任一 hash 失效时状态为 blocked、原因 packet-stale。技术全景 partial/unknown 不得写为 ready。
|
|
315
321
|
|
|
316
|
-
数据库交接必须记录 `databaseAccessMode=sql-only`、四类授权、授权状态 `not-requested/requested/authorized/denied/expired/failed/unknown`、`statementHash`、targetEnvironment、`executionStatus`、`redactionStatus=verified/unverified/failed` 和完整 audit;授权变化后不得继续执行旧 SQL,执行状态回到 `needs-confirmation`。
|
|
322
|
+
数据库交接必须记录 `databaseAccessMode=local-files-read-only`、`legacyDatabaseAccessMode=sql-only`、`sqlExecutionMode=generate-only`、四类授权、授权状态 `not-requested/requested/authorized/denied/expired/failed/unknown`、`statementHash`、targetEnvironment、`executionStatus`、`redactionStatus=verified/unverified/failed` 和完整 audit。仅允许按需读取本地 SQL/schema/migration/model 文本文件,严禁连接数据库或执行 SQL;授权变化后不得继续执行旧 SQL,执行状态回到 `needs-confirmation`。
|
|
317
323
|
- v1.9 fields: `lexical-fallback`、`duplicate-not-primary`、`项目简称|角色中文名|职责名称`、`coverageStatus=full`、`RFC 8785 JCS-SHA-256`。
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
Validate provider canonical session identity, project identity, role/task, title/cwd, interaction evidence, and exclusive occupancy before reuse. Unknown or missing evidence is blocked; ordinary thread IDs cannot be reused. Writeback recovery reuses the original task IDs, increments attempt, and cannot create duplicate sessions.
|
|
6
6
|
|
|
7
|
+
v1.13.0 upgrades must compare initialization and pre-existing user changes by before/after hashes. Never replace an unverified old session or roll back pre-existing admin, supplier, uniapp, SQL, configuration, or business files.
|
|
8
|
+
|
|
9
|
+
If automatic role-session creation fails, write `decisionStatus=awaiting-user` and offer `manual-create`, `defer`, or `redetect` once. `manual-create` waits for `已创建,继续绑定` before canonical provider binding; `defer` reuses the original task, snapshot, CodeGraph and recovery records; `redetect` performs host preflight only. Missing decisions and missing role bindings remain blocked and never become ready.
|
|
10
|
+
|
|
7
11
|
如果项目已存在 `xinyun-ai/`,不要重复初始化,应进入升级检查模式。
|
|
8
12
|
|
|
9
13
|
升级流程:
|
|
@@ -135,13 +139,13 @@ Before upgrade role-session work, read `xinyun-ai/index/initialization-recovery.
|
|
|
135
139
|
- 升级时不得读取未注册的 `codegraph-status.json`;统一从 manifest 的 `codeGraphRequired` 恢复,并校验 project-index、preflight、onboarding、current-task、init-result 的 codeGraphRecordId 和摘要一致。
|
|
136
140
|
- `available-with-dependency` 必须等待依赖授权;必要能力处于 unknown、unavailable、permission-denied、failed、not-checked、not-verified 或依赖未授权时保持 blocked/partial,不得 ready。
|
|
137
141
|
- Git none、测试框架未发现和工具链未检测不单独阻塞,但必须写入 status、evidence 和 unverifiedScope;禁止自动安装依赖。
|
|
138
|
-
- 数据库状态升级默认保持 `not-requested/needs-confirmation/verified
|
|
142
|
+
- 数据库状态升级默认保持 `not-requested/needs-confirmation/verified`;普通升级不扫描数据库文件,数据库相关任务只读本地 SQL/schema/migration/model 文本。没有新授权不得连接本地或线上数据库、查询真实数据、执行 SQL、migration、seed 或修改数据。
|
|
139
143
|
|
|
140
144
|
## v1.9 升级兼容与失效处理
|
|
141
145
|
|
|
142
146
|
升级前按当前项目身份的 realpath/lexical-fallback 结果计算 projectRootHash,按排序 repository scope 计算 repositoryScopeHash。只有八字段身份/任务键、权限和 RFC8785 JCS-SHA-256 复用键一致时复用会话;其他项目、重复非主会话和身份未知会话不得复用。保留 v1.7.3 sessionId、旧创建索引、v1.8 共享事实和双会话文件契约。
|
|
143
147
|
|
|
144
|
-
技术全景、requirementPacket 或 technicalImpactPacket 的 contentHash、版本、项目身份或 sourceRevision 变化时,相关任务进入 blocked + blockedReason=packet-stale,不得静默使用旧结果。数据库默认仍为 sql-only
|
|
145
|
-
- v1.9 fields: `sessionMatchStatus`、`duplicate-not-primary`、`selectionEvidence`、`项目简称|角色中文名|职责名称`、`technical-landscape`、`coverageStatus=full`、`RFC 8785 JCS-SHA-256`、`databaseAccessMode=sql-only`、`targetEnvironment`。
|
|
148
|
+
技术全景、requirementPacket 或 technicalImpactPacket 的 contentHash、版本、项目身份或 sourceRevision 变化时,相关任务进入 blocked + blockedReason=packet-stale,不得静默使用旧结果。数据库默认仍为 local-files-read-only(sql-only 仅为兼容标识),授权、目标环境、参数、方言或 statementHash 变化时追加 audit 并回到 needs-confirmation。
|
|
149
|
+
- v1.9 fields: `sessionMatchStatus`、`duplicate-not-primary`、`selectionEvidence`、`项目简称|角色中文名|职责名称`、`technical-landscape`、`coverageStatus=full`、`RFC 8785 JCS-SHA-256`、`databaseAccessMode=local-files-read-only`、`legacyDatabaseAccessMode=sql-only`、`targetEnvironment`。
|
|
146
150
|
|
|
147
151
|
同一 taskId + changeDomain 不得重复创建临时会话;容量不足进入 `queued`,unknown occupancy 保持占用,失败不得自动重试。升级不自动安装 Skill 依赖,不执行业务代码、数据库、API 或 Git 写操作。
|
|
@@ -27,4 +27,4 @@ An illegal combination is `blocked`, stops further writes, and creates a recover
|
|
|
27
27
|
|
|
28
28
|
The project cannot become `ready` until the orchestrator and all five required role sessions have valid identity evidence, authorization, onboarding, and execution eligibility. Missing host capability stays `blocked`; local degradation may document the task but cannot authorize business-code execution or invent a session ID.
|
|
29
29
|
|
|
30
|
-
Database access
|
|
30
|
+
Database access is `local-files-read-only`; `sql-only` is a legacy compatibility label. Read only database-related SQL/schema/migration/model text files for database-related tasks. Without explicit user authorization, output SQL and a plan only; never connect to a local or online database, open a database driver, install a driver, query real data, or execute a statement.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# v1.13.0 host adapter and manual recovery
|
|
2
|
+
|
|
3
|
+
## Session identity contract
|
|
4
|
+
|
|
5
|
+
The host identity fields are not interchangeable. `hostThreadId` identifies a host UI thread, `hostSessionId` identifies a host-side session record, `providerSessionId` is the only canonical provider session identity, `projectSessionId` is the local project binding identity, `sessionId` is a compatibility alias, and `orchestratorSessionId` identifies the parent orchestrator session. A host thread, task ID, filename, title, history summary or user statement must never be copied into `providerSessionId`.
|
|
6
|
+
|
|
7
|
+
For one role binding, `sessionId` and `projectSessionId` remain null until a provider canonical ID has been verified. They may then be written only according to the binding record's mapping rule, with `sessionId=providerSessionId`. The same `roleId`, `taskId`, project identity, provider ID, attempt and status must agree in role-session-binding, provider-session-binding, assignments, the role task, task-index and init-result. A project identity mismatch, a second verified binding for the same role/task, or an occupied provider session blocks the binding and records an audit entry.
|
|
8
|
+
|
|
9
|
+
Binding requires independently recorded evidence for all six provider operations: create-or-reuse, send, receive, query-status, recover and close. Missing evidence keeps the binding pending/blocked and `executionEligible=false`.
|
|
10
|
+
|
|
11
|
+
## Task-first session confirmation
|
|
12
|
+
|
|
13
|
+
Initialization first creates the named main task and five role-execution tasks. It must not create, reuse, or complete a provider session before the user chooses `create-and-onboard`. The initial control files record `sessionCreationDecision.status=awaiting-confirmation`, keep every `sessionId` and `providerSessionId` null, and remain `projectStatus=blocked` with `executionEligible=false`.
|
|
14
|
+
|
|
15
|
+
The user may choose `create-and-onboard` to enter provider create/reuse and read-only onboarding, or `defer` to preserve the task tree, snapshot, CodeGraph record and recovery record for later. A deferred run reuses the original task IDs and does not rescan or create duplicates. A missing decision does not auto-select either branch and does not repeatedly prompt.
|
|
16
|
+
|
|
17
|
+
## Preflight first
|
|
18
|
+
|
|
19
|
+
Before CodeGraph or broad project analysis, check the provider adapter for create, reuse, send, receive, query status, recover, close, and local control-file read/write. If a required host capability is unavailable, unknown, permission-denied, failed, not-verified, or dependency-gated, stop at preflight, keep project initialization blocked, and do not start a large CodeGraph scan.
|
|
20
|
+
|
|
21
|
+
## Adapter identity
|
|
22
|
+
|
|
23
|
+
The adapter must return the provider canonical `providerSessionId` through a supported provider API. Ordinary `threadId`, `taskId`, filename, title, history summary, or user statement cannot be used as a provider session ID. Automatic create/reuse validates projectRootHash, workspaceScope, roleId, taskId, title, cwd, identityEvidence, interactionEvidence, occupancy, and the original idempotency key.
|
|
24
|
+
|
|
25
|
+
## Manual recovery
|
|
26
|
+
|
|
27
|
+
When the host is unsupported, create only the local manual recovery guide for the five named roles. The guide contains the Chinese session title, responsibility, cwd and first read-only task prompt. After the user creates sessions, record the provider canonical ID and evidence; missing or unverifiable evidence remains pending/unknown/blocked. Recovery reuses taskId and roleTaskId, increments attempt, preserves the old binding, and never creates duplicate tasks or replaces an unverified session.
|
|
28
|
+
|
|
29
|
+
## Change isolation
|
|
30
|
+
|
|
31
|
+
Capture business, control-plane, Git and existing-task/session baselines before initialization. Classify every after-change path as initialization-created, initialization-updated, pre-existing-user-change, or control-plane-only. Never roll back or attribute pre-existing admin, supplier, uniapp, SQL, configuration or other business changes to initialization.
|
|
32
|
+
|
|
33
|
+
No provider login/install, dependency install, database connection, SQL, Git write, business-code change, or npm publish is allowed.
|
|
34
|
+
|
|
35
|
+
## Failure decision and manual recovery
|
|
36
|
+
|
|
37
|
+
When automatic role-session creation fails, record one decision record and present exactly three choices: `manual-create`, `defer`, or `redetect`. Until the user chooses, keep `projectStatus=blocked`, `decisionStatus=awaiting-user`, `executionEligible=false`, and all missing provider IDs null. Do not silently skip, fabricate a binding, or repeat the prompt.
|
|
38
|
+
|
|
39
|
+
`manual-create` emits the five standard role names, responsibilities, working directory and first read-only task prompts. Only the explicit phrase `已创建,继续绑定` starts binding. The host must return a real canonical `providerSessionId`; validate project identity, role, task, cwd, title, occupancy and send/receive evidence before binding. Reuse the original task IDs and increment `attempt`.
|
|
40
|
+
|
|
41
|
+
`defer` preserves the main task, five role tasks, project snapshot, CodeGraph record and recovery record. A later run must reuse them and must not rescan or create duplicate tasks. `redetect` runs host preflight only and does not repeat project initialization. All five roles must be bound and complete read-only onboarding before `projectStatus=ready`.
|
|
42
|
+
|
|
43
|
+
Each decision is one immutable record with `decisionId`, `userDecision`, `actor`, `source`, `decidedAt` and `decisionEvidence` containing `inputHash` and `evidenceHash`. The same decision fields must be equal in manual-session-recovery and init-result. Only one of `manual-create`, `defer`, or `redetect` may be selected; an absent choice remains blocked without a repeated prompt. Record `userDecision`, `requiredRoleCount`, `createdRoleCount`, `remainingRoleIds`, `decisionStatus`, `decidedAt`, `nextAction` and `decisionEvidence` in the recovery record and mirror them in `init-result.json`. Recovery reuses the original task IDs and increments `attempt`.
|
|
@@ -196,6 +196,7 @@ CodeGraph 为必需能力时,只有 `initialized` 或 `healthy` 才能将结
|
|
|
196
196
|
- 创建后的角色会话先进入只读 `onboarding`;只有职责理解、职责确认、成员 / 会话绑定、确认门禁和执行资格都满足后才允许 `sessionStatus=ready`。
|
|
197
197
|
- 创建成功不等于业务代码修改授权;普通咨询不创建角色会话,不写绑定文件,不创建外部账号或第三个会话。
|
|
198
198
|
- v1.12.1 起,角色会话必须另外记录 provider canonical `providerSessionId`;普通线程 ID、taskId、标题或历史摘要不得直接绑定。绑定前必须验证项目身份、roleId、taskId、title、cwd、独占占用、`identityEvidence` 和 `interactionEvidence`;证据不全时保持 pending/blocked。
|
|
199
|
+
- v1.13.0 起先执行 provider adapter preflight;宿主必要能力失败或未知时快速 blocked,设置 `codeGraphDeferred=true`,只生成五角色人工恢复引导,不先做大规模 CodeGraph 扫描。初始化变更必须与项目原有 admin、supplier、uniapp、SQL 等改动分开归因,不回滚用户内容。
|
|
199
200
|
|
|
200
201
|
AI 接手本项目时,请先读取:
|
|
201
202
|
|
|
@@ -220,7 +221,7 @@ AI 接手本项目时,请先读取:
|
|
|
220
221
|
- `projectStatus` 固定为 `not-started/initializing/partial/blocked/ready`;只有身份、CodeGraph、基线、团队、任务、控制面、旧沉淀、宿主能力、敏感扫描和无高风险阻塞全部通过,才允许 `ready` 和 `executionEligible=true`。
|
|
221
222
|
- 初始化冲突、旧任务、锁异常或用户修改控制文件时必须暂停/阻塞,不覆盖、不强制解锁;所有控制面写入使用临时文件、原子重命名、revision、幂等和恢复记录。
|
|
222
223
|
- Git none、无测试框架和未检测到工具链只记录 `not-available/not-detected` 及未验证范围,不得伪造通过,也不得自动安装依赖。
|
|
223
|
-
- 数据库初始化固定为 `authorization=not-requested`、`executionStatus=needs-confirmation`、`redactionStatus=verified
|
|
224
|
+
- 数据库初始化固定为 `authorization=not-requested`、`executionStatus=needs-confirmation`、`redactionStatus=verified`;普通初始化不扫描数据库文件。数据库相关任务仅只读项目内 SQL/schema/migration/model 文本,未经明确授权不得连接本地或线上数据库、查询真实数据或执行 SQL,只输出 SQL 计划。
|
|
224
225
|
|
|
225
226
|
## v1.9 当前项目会话隔离与联合门禁
|
|
226
227
|
|
|
@@ -229,8 +230,8 @@ AI 接手本项目时,请先读取:
|
|
|
229
230
|
- 其他项目会话不得展示完整路径、任务内容或 sessionId;重复会话保留历史,只选择一个主会话。中文标题使用 `项目简称|角色中文名|职责名称`。
|
|
230
231
|
- 总工维护 `technical-landscape.json`,主会话维护 `requirement-packet.json`,总工输出 `technical-impact-packet.json`。技术全景只有 full coverage、空 unverifiedScope 和完整核心证据才可 ready;partial/unknown 不得 ready。
|
|
231
232
|
- 两个 packet 必须同 requirementId、taskId、projectRootHash、version,并使用 RFC8785 JCS-SHA-256。关联内容变化后进入 `blockedReason=packet-stale`,程序员不得执行。
|
|
232
|
-
- 数据库默认 `sql-only`;连接、查询、结构变更、数据修改分别授权,四类授权状态固定为 `not-requested/requested/authorized/denied/expired/failed/unknown`,`redactionStatus` 固定为 `verified/unverified/failed
|
|
233
|
-
- v1.9 fields: `selectionEvidence`、`coverageStatus=full`、`RFC 8785 JCS-SHA-256`、`databaseAccessMode=sql-only`。
|
|
233
|
+
- 数据库默认 `databaseAccessMode=local-files-read-only`,`sql-only` 仅为兼容标识,`sqlExecutionMode=generate-only`;连接、查询、结构变更、数据修改分别授权,四类授权状态固定为 `not-requested/requested/authorized/denied/expired/failed/unknown`,`redactionStatus` 固定为 `verified/unverified/failed`。数据库相关任务只读本地 SQL/schema/migration/model 文本,严禁连接数据库、查询真实数据或执行 SQL。每条 SQL 仅作为 review 计划,需校验规范化 `statementHash`、targetEnvironment 和权限状态,过期或变化必须进入 `needs-confirmation` 并追加 audit。
|
|
234
|
+
- v1.9 fields: `selectionEvidence`、`coverageStatus=full`、`RFC 8785 JCS-SHA-256`、`databaseAccessMode=local-files-read-only`、`legacyDatabaseAccessMode=sql-only`。
|
|
234
235
|
## v1.7 machine-readable enum anchors
|
|
235
236
|
|
|
236
237
|
- decision=direct-map/rewrite-required/backend-required/unsupported/pending/unknown
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
The canonical external identity of a role session is the provider-returned `providerSessionId`. A normal thread ID, taskId, title, or history summary cannot bind a role. Binding requires project identity, roleId, taskId, title, cwd, exclusive occupancy, and real send/receive evidence; incomplete evidence cannot become ready or executionEligible.
|
|
8
8
|
|
|
9
|
+
## v1.13.0 host adapter and manual recovery
|
|
10
|
+
|
|
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.
|
|
12
|
+
|
|
9
13
|
## v1.10 接管门禁
|
|
10
14
|
|
|
11
15
|
当前项目必须先完成 `preflight-report.json` 和 `onboarding-report.json`,再进入业务代码开发。`project-status.json` 只有在项目身份、CodeGraph、基线、团队职责、五个真实角色会话、本地控制面、旧沉淀、宿主能力和敏感扫描全部通过时才可为 `ready`;缺失真实角色会话必须为 `blocked + required-role-session-not-created`。CLI 只创建 `xinyun-ai-init/`,AI 获得授权后才创建项目控制面。
|
|
@@ -610,7 +610,13 @@ Skill 分配使用 `assignmentStatus`,使用记录使用 `usageStatus`。固
|
|
|
610
610
|
|
|
611
611
|
角色会话的外部身份只能是 provider 返回的 canonical `providerSessionId`。普通线程 ID、taskId、标题、历史摘要或用户口述不能直接绑定。绑定前必须验证项目身份、roleId、taskId、title、cwd、独占占用和真实发送/接收交互证据;证据不全保持 `bindingStatus=pending/blocked`,不得 ready 或 executionEligible。创建回写失败复用原 taskId/roleTaskId、递增 attempt,不创建重复会话;宿主不可用时 `providerSessionId=null`,不得伪造。
|
|
612
612
|
|
|
613
|
-
|
|
613
|
+
## v1.13.0 host adapter and change isolation
|
|
614
|
+
|
|
615
|
+
宿主 adapter 必须先检测 create/reuse/send/receive/query-status/recover/close/control-file 读写。任一必要能力为 unknown、unavailable、permission-denied、failed、not-verified 或依赖未授权时,先 blocked 并设置 `codeGraphDeferred=true`,不得先做大规模 CodeGraph 扫描。宿主不可用时只生成五角色人工恢复引导。
|
|
616
|
+
|
|
617
|
+
初始化结果必须按 before/after hash 区分 `initialization-created`、`initialization-updated`、`pre-existing-user-change` 和 `control-plane-only`;不得回滚或归因用户已有业务改动。
|
|
618
|
+
|
|
619
|
+
数据库正式 databaseAccessMode=local-files-read-only,legacyDatabaseAccessMode=sql-only 仅为兼容标识,sqlExecutionMode=generate-only。普通初始化不读取数据库文件;数据库相关任务仅可读取项目内受限的 SQL/schema/migration/model 文本文件。严禁连接本地或线上数据库、查询真实数据、执行 SQL、migration、seed 或数据修改。连接、只读查询、结构变更、数据修改分别授权,四类授权状态固定为 not-requested/requested/authorized/denied/expired/failed/unknown,redactionStatus 固定为 verified/unverified/failed;SQL 仅用于 review 计划,需校验规范化 SQL、参数、方言、targetEnvironment、授权范围生成的 statementHash。授权或输入变化时回到 needs-confirmation,并追加包含 auditId、action、actorType、actorId、authorizationType、statementHash、targetEnvironment、resultStatus、redactionStatus、evidence、at 的 audit。
|
|
614
620
|
|
|
615
621
|
## 自我学习
|
|
616
622
|
|
|
@@ -311,5 +311,5 @@
|
|
|
311
311
|
- requirementPacketId / technicalImpactPacketId / 两个 contentHash:待填写
|
|
312
312
|
- packet 状态:captured / clarifying / proposed / confirmed / in-progress / blocked / completed / cancelled;技术影响:not-started / assessing / ready / partial / blocked
|
|
313
313
|
- packet 失效原因:packet-stale / 待填写
|
|
314
|
-
- databaseAccessMode:sql-only
|
|
314
|
+
- databaseAccessMode:local-files-read-only(legacyDatabaseAccessMode=sql-only;sqlExecutionMode=generate-only)
|
|
315
315
|
- 数据库连接、查询、结构变更、数据修改授权状态:待填写
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"databaseAccessMode": "
|
|
3
|
+
"databaseAccessMode": "local-files-read-only",
|
|
4
|
+
"databaseAccessModeEnum": ["local-files-read-only", "sql-only"],
|
|
5
|
+
"legacyDatabaseAccessMode": "sql-only",
|
|
6
|
+
"databaseAccessModePolicy": "local database-related source files only; never connect to a local or online database",
|
|
7
|
+
"sqlExecutionMode": "generate-only",
|
|
8
|
+
"sqlExecutionModeEnum": ["generate-only", "forbidden"],
|
|
4
9
|
"connectionStatus": "not-requested",
|
|
10
|
+
"connected": false,
|
|
11
|
+
"sqlExecuted": false,
|
|
12
|
+
"localFileReadStatus": "not-checked",
|
|
13
|
+
"localFileReadStatusEnum": ["not-checked", "not-needed", "read-only", "blocked", "failed"],
|
|
14
|
+
"localDatabaseFileScope": ["*.sql", "*.ddl", "*.schema", "*.migration", "database/", "migrations/", "schema/", "models/"],
|
|
15
|
+
"localFileReadPolicy": "database-related-task-only",
|
|
16
|
+
"localFilesRead": [],
|
|
17
|
+
"unverifiedScope": [],
|
|
18
|
+
"forbiddenOperations": ["database-connection", "database-query", "sql-execution", "migration-execution", "seed-execution", "data-mutation"],
|
|
5
19
|
"connectionStatusEnum": ["not-requested", "requested", "authorized", "denied", "expired", "failed", "unknown"],
|
|
6
20
|
"queryAuthorization": "not-requested",
|
|
7
21
|
"queryAuthorizationEnum": ["not-requested", "requested", "authorized", "denied", "expired", "failed", "unknown"],
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"reuseExistingSession",
|
|
9
9
|
"sendTask",
|
|
10
10
|
"receiveResult",
|
|
11
|
+
"querySessionStatus",
|
|
11
12
|
"recoverSession",
|
|
12
13
|
"closeSession",
|
|
13
14
|
"controlFileReadWrite"
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
"reuseExistingSession": {"capabilityId": "reuseExistingSession", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "blocked; query existing binding only", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
20
21
|
"sendTask": {"capabilityId": "sendTask", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "blocked; preserve task for resume", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
21
22
|
"receiveResult": {"capabilityId": "receiveResult", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "blocked; preserve task for resume", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
23
|
+
"querySessionStatus": {"capabilityId": "querySessionStatus", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "blocked; require manual provider verification", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
22
24
|
"recoverSession": {"capabilityId": "recoverSession", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "manual binding with evidence", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
23
25
|
"closeSession": {"capabilityId": "closeSession", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "manual host close", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
24
26
|
"controlFileReadWrite": {"capabilityId": "controlFileReadWrite", "detectionMethod": "filesystem", "status": "not-checked", "evidence": [], "dependencyStatus": "not-required", "fallbackPlan": "blocked on control-file write failure", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"statusEnum": ["pending", "initializing", "completed", "partial", "blocked", "unknown", "failed", "cancelled"],
|
|
10
10
|
"statusSource": "xinyun-ai/current-task.md",
|
|
11
11
|
"currentVersion": null,
|
|
12
|
-
"targetVersion": "1.
|
|
12
|
+
"targetVersion": "1.13.1",
|
|
13
13
|
"idempotencyKey": null,
|
|
14
14
|
"createdFiles": [],
|
|
15
15
|
"updatedFiles": [],
|
|
@@ -49,11 +49,15 @@
|
|
|
49
49
|
"identityMapping": {
|
|
50
50
|
"hostThreadId": null,
|
|
51
51
|
"hostSessionId": null,
|
|
52
|
+
"providerSessionId": null,
|
|
52
53
|
"projectSessionId": null,
|
|
54
|
+
"sessionId": null,
|
|
53
55
|
"orchestratorSessionId": null,
|
|
54
56
|
"mappingStatus": "pending",
|
|
55
57
|
"identityEvidence": [],
|
|
56
|
-
"creationEvidence": []
|
|
58
|
+
"creationEvidence": [],
|
|
59
|
+
"equivalenceRule": "sessionId equals providerSessionId only after canonical provider evidence is verified",
|
|
60
|
+
"requiredHostEvidence": ["create-or-reuse", "send", "receive", "query-status", "recover", "close"]
|
|
57
61
|
},
|
|
58
62
|
"realAiSessionVerified": false,
|
|
59
63
|
"hostCapability": "unknown",
|
|
@@ -85,6 +89,41 @@
|
|
|
85
89
|
"fakeProviderSessionIdProhibited": true,
|
|
86
90
|
"unverifiedScope": ["provider-specific host session evidence"]
|
|
87
91
|
},
|
|
92
|
+
"v113": {
|
|
93
|
+
"providerAdapterPath": "xinyun-ai/sessions/provider-adapter.json",
|
|
94
|
+
"manualSessionRecoveryPath": "xinyun-ai/sessions/manual-session-recovery.json",
|
|
95
|
+
"initializationChangeReportPath": "xinyun-ai/index/initialization-change-report.json",
|
|
96
|
+
"preflightStatus": "not-checked",
|
|
97
|
+
"codeGraphDeferred": false,
|
|
98
|
+
"changeOriginStatus": "not-checked",
|
|
99
|
+
"realProviderSessionRequired": true,
|
|
100
|
+
"userDecision": null,
|
|
101
|
+
"decisionId": null,
|
|
102
|
+
"actor": null,
|
|
103
|
+
"source": "user-confirmation",
|
|
104
|
+
"requiredRoleCount": 5,
|
|
105
|
+
"createdRoleCount": 0,
|
|
106
|
+
"remainingRoleIds": ["project-owner", "project-product", "chief-engineer", "programmer", "test-reviewer"],
|
|
107
|
+
"decisionStatus": "not-asked",
|
|
108
|
+
"decidedAt": null,
|
|
109
|
+
"nextAction": "present-choice-once",
|
|
110
|
+
"decisionEvidence": [],
|
|
111
|
+
"decisionEvidenceSchema": ["decisionId", "userDecision", "actor", "source", "decidedAt", "inputHash", "evidenceHash"],
|
|
112
|
+
"sessionCreationDecision": {
|
|
113
|
+
"decision": null,
|
|
114
|
+
"decisionId": null,
|
|
115
|
+
"status": "awaiting-confirmation",
|
|
116
|
+
"statusEnum": ["not-asked", "awaiting-confirmation", "approved", "deferred", "processing", "completed", "blocked"],
|
|
117
|
+
"actor": null,
|
|
118
|
+
"source": "user-confirmation",
|
|
119
|
+
"decidedAt": null,
|
|
120
|
+
"decisionEvidence": [],
|
|
121
|
+
"nextAction": "ask-create-or-defer",
|
|
122
|
+
"mainTaskCreatedBeforeSession": true,
|
|
123
|
+
"roleTasksCreatedBeforeSession": true,
|
|
124
|
+
"sessionIdsRemainNullUntilDecision": true
|
|
125
|
+
}
|
|
126
|
+
},
|
|
88
127
|
"v19": {
|
|
89
128
|
"projectIdentityPath": "xinyun-ai/project-identity.json",
|
|
90
129
|
"technicalLandscapePath": "xinyun-ai/technical-landscape.json",
|
|
@@ -92,13 +131,25 @@
|
|
|
92
131
|
"technicalImpactPacketPath": "xinyun-ai/packets/technical-impact-packet.json",
|
|
93
132
|
"databaseAuthorizationPath": "xinyun-ai/database/authorization.json",
|
|
94
133
|
"packetHashAlgorithm": "RFC8785-JCS-SHA-256",
|
|
95
|
-
"databaseAccessMode": "
|
|
134
|
+
"databaseAccessMode": "local-files-read-only",
|
|
135
|
+
"legacyDatabaseAccessMode": "sql-only",
|
|
136
|
+
"sqlExecutionMode": "generate-only"
|
|
96
137
|
},
|
|
97
138
|
"databaseAuthorization": {
|
|
98
139
|
"authorization": "not-requested",
|
|
99
140
|
"executionStatus": "needs-confirmation",
|
|
100
141
|
"redactionStatus": "verified",
|
|
142
|
+
"databaseAccessMode": "local-files-read-only",
|
|
143
|
+
"legacyDatabaseAccessMode": "sql-only",
|
|
144
|
+
"sqlExecutionMode": "generate-only",
|
|
101
145
|
"connected": false,
|
|
146
|
+
"sqlExecuted": false,
|
|
147
|
+
"localFileReadStatus": "not-checked",
|
|
148
|
+
"localFileReadStatusEnum": ["not-checked", "not-needed", "read-only", "blocked", "failed"],
|
|
149
|
+
"localDatabaseFileScope": ["*.sql", "*.ddl", "*.schema", "*.migration", "database/", "migrations/", "schema/", "models/"],
|
|
150
|
+
"localFileReadPolicy": "database-related-task-only",
|
|
151
|
+
"localFilesRead": [],
|
|
152
|
+
"unverifiedScope": [],
|
|
102
153
|
"evidence": []
|
|
103
154
|
},
|
|
104
155
|
"sensitiveScan": {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"reportId": "initialization-change-report-template",
|
|
4
|
+
"status": "not-checked",
|
|
5
|
+
"changeOriginEnum": ["initialization-created", "initialization-updated", "pre-existing-user-change", "control-plane-only"],
|
|
6
|
+
"baseline": {"businessFilesHash": null, "controlFilesHash": null, "gitStatusHash": null, "capturedAt": null},
|
|
7
|
+
"changes": [],
|
|
8
|
+
"classificationRule": "Compare before and after file hashes; never attribute pre-existing user changes to initialization and never roll them back.",
|
|
9
|
+
"requiredChangeFields": ["path", "origin", "beforeHash", "afterHash", "changedBy", "checkedAt", "evidence"],
|
|
10
|
+
"businessCodeChanged": {"value": "unknown", "evidence": []},
|
|
11
|
+
"sensitiveScan": {"status": "not-checked", "matches": []},
|
|
12
|
+
"createdAt": null,
|
|
13
|
+
"updatedAt": null
|
|
14
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"projectName": "",
|
|
3
|
-
"xinyunAiVersion": "1.
|
|
3
|
+
"xinyunAiVersion": "1.13.1",
|
|
4
4
|
"scriptVersion": "2026.07.23",
|
|
5
5
|
"schemaVersion": "1",
|
|
6
6
|
"initializationMode": "fast",
|
|
@@ -93,7 +93,10 @@
|
|
|
93
93
|
"onboardingReport": "xinyun-ai/onboarding-report.json",
|
|
94
94
|
"hostCapabilities": "xinyun-ai/host-capabilities.json",
|
|
95
95
|
"takeoverBaseline": "xinyun-ai/index/takeover-baseline.json",
|
|
96
|
-
"controlPlaneIndex": "xinyun-ai/index/control-plane-index.json"
|
|
96
|
+
"controlPlaneIndex": "xinyun-ai/index/control-plane-index.json",
|
|
97
|
+
"providerAdapter": "xinyun-ai/sessions/provider-adapter.json",
|
|
98
|
+
"manualSessionRecovery": "xinyun-ai/sessions/manual-session-recovery.json",
|
|
99
|
+
"initializationChangeReport": "xinyun-ai/index/initialization-change-report.json"
|
|
97
100
|
},
|
|
98
101
|
"roleSessions": {
|
|
99
102
|
"enabled": true,
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
"providerSessionBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
|
|
105
108
|
"providerSessionBindings": "xinyun-ai/sessions/provider-session-bindings.json",
|
|
106
109
|
"parentSessionId": null,
|
|
107
|
-
"targetVersion": "1.
|
|
110
|
+
"targetVersion": "1.13.1",
|
|
108
111
|
"requiredRoleCount": 5,
|
|
109
112
|
"statusEnum": [
|
|
110
113
|
"pending",
|
|
@@ -246,7 +249,16 @@
|
|
|
246
249
|
"technicalImpactPacket": "xinyun-ai/packets/technical-impact-packet.json",
|
|
247
250
|
"databaseAuthorization": "xinyun-ai/database/authorization.json",
|
|
248
251
|
"packetHashAlgorithm": "RFC8785-JCS-SHA-256",
|
|
249
|
-
"databaseAccessModeDefault": "
|
|
252
|
+
"databaseAccessModeDefault": "local-files-read-only",
|
|
253
|
+
"legacyDatabaseAccessMode": "sql-only",
|
|
254
|
+
"sqlExecutionMode": "generate-only",
|
|
255
|
+
"databaseLocalFilePolicy": {
|
|
256
|
+
"scope": ["*.sql", "*.ddl", "*.schema", "*.migration", "database/", "migrations/", "schema/", "models/"],
|
|
257
|
+
"readOnly": true,
|
|
258
|
+
"taskTriggeredOnly": true,
|
|
259
|
+
"connectionAllowed": false,
|
|
260
|
+
"sqlExecutionAllowed": false
|
|
261
|
+
}
|
|
250
262
|
},
|
|
251
263
|
"v110": {
|
|
252
264
|
"projectStatus": "xinyun-ai/project-status.json",
|
|
@@ -269,7 +281,7 @@
|
|
|
269
281
|
"sharedProjectSnapshot": "xinyun-ai/index/shared-project-snapshot.json",
|
|
270
282
|
"initializationTiming": "xinyun-ai/index/initialization-timing.json",
|
|
271
283
|
"hostCapabilityStatusEnum": ["available", "available-with-dependency", "unavailable", "permission-denied", "unknown", "not-checked", "not-verified", "failed"],
|
|
272
|
-
"preflightRequiredCapabilities": ["createRealSession", "reuseExistingSession", "sendTask", "receiveResult", "recoverSession", "closeSession", "controlFileReadWrite"],
|
|
284
|
+
"preflightRequiredCapabilities": ["createRealSession", "reuseExistingSession", "sendTask", "receiveResult", "querySessionStatus", "recoverSession", "closeSession", "controlFileReadWrite"],
|
|
273
285
|
"resumeConfirmationPhrases": ["确认执行", "确认继续初始化"],
|
|
274
286
|
"codeGraphReuseStatuses": ["healthy", "initialized"],
|
|
275
287
|
"projectSnapshotReusePolicy": "reuse-until-business-or-codegraph-hash-changes",
|
|
@@ -285,9 +297,42 @@
|
|
|
285
297
|
"bindingStatusEnum": ["pending", "validating", "bound", "blocked", "rejected", "released", "conflict", "recovery-required"],
|
|
286
298
|
"identityEvidenceRequired": ["providerSessionId", "projectRootHash", "workspaceScope", "roleId", "taskId", "title", "cwd", "source", "verifiedAt", "evidenceHash"],
|
|
287
299
|
"interactionEvidenceRequired": ["sendReceipt", "receiveReceipt", "transcriptHash", "messageCount", "recordedAt", "evidenceHash"],
|
|
300
|
+
"sessionIdentityFields": ["hostThreadId", "hostSessionId", "providerSessionId", "projectSessionId", "sessionId", "orchestratorSessionId"],
|
|
301
|
+
"canonicalSessionIdentity": "providerSessionId",
|
|
302
|
+
"sessionCompatibilityAlias": "sessionId",
|
|
303
|
+
"sessionIdentityMappingRule": "sessionId equals providerSessionId only after canonical provider evidence is verified; hostThreadId and hostSessionId are evidence only",
|
|
304
|
+
"requiredHostEvidence": ["create-or-reuse", "send", "receive", "query-status", "recover", "close"],
|
|
305
|
+
"crossFileSessionConsistency": "role-session-binding, provider-session-binding, assignments, task, task-index and init-result must agree on roleId, taskId, projectRootHash, providerSessionId, sessionId, attempt and status",
|
|
288
306
|
"bindingGate": "provider canonical ID + identity evidence + interaction evidence + exclusive occupancy",
|
|
289
307
|
"unsupportedHostPolicy": "blocked-without-fake-provider-session-id"
|
|
290
308
|
},
|
|
309
|
+
"v113": {
|
|
310
|
+
"status": "implemented-in-package",
|
|
311
|
+
"capability": "hostAdapterAndManualRecovery",
|
|
312
|
+
"providerAdapter": "xinyun-ai/sessions/provider-adapter.json",
|
|
313
|
+
"manualSessionRecovery": "xinyun-ai/sessions/manual-session-recovery.json",
|
|
314
|
+
"initializationChangeReport": "xinyun-ai/index/initialization-change-report.json",
|
|
315
|
+
"preflightRequiredCapabilities": ["createRealSession", "reuseExistingSession", "sendTask", "receiveResult", "querySessionStatus", "recoverSession", "closeSession", "controlFileReadWrite"],
|
|
316
|
+
"fastBlockBeforeCodeGraph": true,
|
|
317
|
+
"sessionIdentityFields": ["hostThreadId", "hostSessionId", "providerSessionId", "projectSessionId", "sessionId", "orchestratorSessionId"],
|
|
318
|
+
"canonicalSessionIdentity": "providerSessionId",
|
|
319
|
+
"sessionCompatibilityAlias": "sessionId",
|
|
320
|
+
"sessionIdentityMappingRule": "sessionId equals providerSessionId only after canonical provider evidence is verified; hostThreadId and hostSessionId are evidence only",
|
|
321
|
+
"requiredHostEvidence": ["create-or-reuse", "send", "receive", "query-status", "recover", "close"],
|
|
322
|
+
"crossFileSessionConsistency": "role-session-binding, provider-session-binding, assignments, task, task-index and init-result must agree on roleId, taskId, projectRootHash, providerSessionId, sessionId, attempt and status",
|
|
323
|
+
"changeOriginEnum": ["initialization-created", "initialization-updated", "pre-existing-user-change", "control-plane-only"],
|
|
324
|
+
"manualRecoveryRoles": ["project-owner", "project-product", "chief-engineer", "programmer", "test-reviewer"],
|
|
325
|
+
"userDecisionEnum": ["manual-create", "defer", "redetect"],
|
|
326
|
+
"decisionStatusEnum": ["not-asked", "awaiting-user", "selected", "processing", "completed", "blocked"],
|
|
327
|
+
"decisionRequiredFields": ["decisionId", "userDecision", "actor", "source", "requiredRoleCount", "createdRoleCount", "remainingRoleIds", "decisionStatus", "decidedAt", "nextAction", "decisionEvidence"],
|
|
328
|
+
"decisionEvidenceFields": ["decisionId", "userDecision", "actor", "source", "decidedAt", "inputHash", "evidenceHash"],
|
|
329
|
+
"sessionCreationDecisionEnum": ["create-and-onboard", "defer"],
|
|
330
|
+
"sessionCreationStatusEnum": ["not-asked", "awaiting-confirmation", "approved", "deferred", "processing", "completed", "blocked"],
|
|
331
|
+
"sessionCreationDecisionRequiredFields": ["decision", "decisionId", "status", "actor", "source", "decidedAt", "decisionEvidence", "nextAction"],
|
|
332
|
+
"taskFirstSessionGate": "create main task and five role tasks first; ask user before creating or completing role sessions",
|
|
333
|
+
"manualBindingConfirmationPhrase": "已创建,继续绑定",
|
|
334
|
+
"noChoicePolicy": "remain-blocked-without-repeat-prompt"
|
|
335
|
+
},
|
|
291
336
|
"v111": {
|
|
292
337
|
"status": "implemented-in-package",
|
|
293
338
|
"capability": "initializationAcceleration",
|
|
@@ -10,17 +10,27 @@
|
|
|
10
10
|
"workspaceScope": null,
|
|
11
11
|
"title": null,
|
|
12
12
|
"cwd": null,
|
|
13
|
-
"sessionIdType": "
|
|
13
|
+
"sessionIdType": "legacy-project-compatibility-alias",
|
|
14
|
+
"sessionIdSemantics": "legacy compatibility field; it cannot be bound from hostThreadId, hostSessionId, ordinary threadId, taskId, title or history summary",
|
|
15
|
+
"canonicalSessionIdField": "providerSessionId",
|
|
16
|
+
"canonicalSessionIdSource": "provider-supported-session-api-response",
|
|
17
|
+
"hostIdentityFields": ["hostThreadId", "hostSessionId", "projectSessionId", "orchestratorSessionId"],
|
|
18
|
+
"hostThreadId": null,
|
|
19
|
+
"hostSessionId": null,
|
|
20
|
+
"projectSessionId": null,
|
|
21
|
+
"orchestratorSessionId": null,
|
|
14
22
|
"provider": "codex",
|
|
15
23
|
"bindingMode": "manual",
|
|
16
24
|
"boundBy": null,
|
|
17
25
|
"boundAt": null,
|
|
18
26
|
"evidence": [],
|
|
19
27
|
"evidenceRequiredFields": ["evidenceType", "source", "sessionId", "providerSessionId", "projectRootHash", "workspaceScope", "roleId", "taskId", "title", "cwd", "interactionHash", "beforeSnapshotHash", "afterSnapshotHash", "recordedAt"],
|
|
28
|
+
"requiredHostEvidence": ["create-or-reuse", "send", "receive", "query-status", "recover", "close"],
|
|
29
|
+
"identityMappingRule": "sessionId and projectSessionId remain null until providerSessionId and all requiredHostEvidence are verified; then sessionId=providerSessionId",
|
|
20
30
|
"bindingStatus": "pending",
|
|
21
31
|
"bindingStatusEnum": ["pending", "bound", "rejected", "blocked", "released"],
|
|
22
32
|
"executionEligible": false,
|
|
23
|
-
"eligibilityRule": "bound +
|
|
33
|
+
"eligibilityRule": "bound + verified providerSessionId + all requiredHostEvidence + identity evidence + interaction evidence + role onboarding ready",
|
|
24
34
|
"fakeSessionIdProhibited": true,
|
|
25
35
|
"rejectionReason": null,
|
|
26
36
|
"audit": [],
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"recoveryId": "manual-session-recovery-template",
|
|
4
|
+
"provider": "codex",
|
|
5
|
+
"status": "not-started",
|
|
6
|
+
"statusEnum": ["not-started", "guided", "awaiting-user", "validating", "recovered", "blocked", "failed"],
|
|
7
|
+
"userDecisionEnum": ["manual-create", "defer", "redetect"],
|
|
8
|
+
"decisionStatusEnum": ["not-asked", "awaiting-user", "selected", "processing", "completed", "blocked"],
|
|
9
|
+
"reuseContract": {"reuseTaskId": true, "reuseRoleTaskId": true, "incrementAttempt": true, "createDuplicateTasks": false, "replaceUnverifiedSession": false},
|
|
10
|
+
"taskFirstSessionGate": {
|
|
11
|
+
"mainTaskCreatedBeforeSession": true,
|
|
12
|
+
"roleTasksCreatedBeforeSession": true,
|
|
13
|
+
"sessionIdsRemainNullUntilDecision": true,
|
|
14
|
+
"sessionCreationDecisionEnum": ["create-and-onboard", "defer"],
|
|
15
|
+
"sessionCreationStatusEnum": ["not-asked", "awaiting-confirmation", "approved", "deferred", "processing", "completed", "blocked"],
|
|
16
|
+
"sessionCreationDecision": null,
|
|
17
|
+
"status": "awaiting-confirmation",
|
|
18
|
+
"decisionId": null,
|
|
19
|
+
"actor": null,
|
|
20
|
+
"source": "user-confirmation",
|
|
21
|
+
"decidedAt": null,
|
|
22
|
+
"decisionEvidence": [],
|
|
23
|
+
"nextAction": "ask-create-or-defer"
|
|
24
|
+
},
|
|
25
|
+
"roles": [
|
|
26
|
+
{"roleId":"project-owner","sessionTitle":"项目负责人|项目接管|项目范围与授权","responsibility":"项目范围、授权边界和最终项目确认","firstTaskPrompt":"请只读确认项目身份、接管范围、禁止操作和当前阻断,不修改业务代码。","providerSessionId":null,"bindingStatus":"pending"},
|
|
27
|
+
{"roleId":"project-product","sessionTitle":"产品负责人|项目接管|需求与验收","responsibility":"需求、验收标准和用户目标","firstTaskPrompt":"请只读整理项目目标、需求边界和验收条件,不修改业务代码。","providerSessionId":null,"bindingStatus":"pending"},
|
|
28
|
+
{"roleId":"chief-engineer","sessionTitle":"总工程师|项目接管|技术全景与影响","responsibility":"技术全景、架构影响和风险门禁","firstTaskPrompt":"请只读检查技术栈、架构、CodeGraph 状态和影响范围,不修改业务代码。","providerSessionId":null,"bindingStatus":"pending"},
|
|
29
|
+
{"roleId":"programmer","sessionTitle":"程序员|项目接管|实现准备","responsibility":"实现准备、文件责任和执行边界","firstTaskPrompt":"请只读确认实现范围、预计文件和禁止操作,不修改业务代码。","providerSessionId":null,"bindingStatus":"pending"},
|
|
30
|
+
{"roleId":"test-reviewer","sessionTitle":"测试审查员|项目接管|验证与发布门禁","responsibility":"测试证据、回归范围和发布门禁","firstTaskPrompt":"请只读确认验证命令、行为证据要求和发布阻断,不修改业务代码。","providerSessionId":null,"bindingStatus":"pending"}
|
|
31
|
+
],
|
|
32
|
+
"userDecision": null,
|
|
33
|
+
"decisionId": null,
|
|
34
|
+
"actor": null,
|
|
35
|
+
"source": "user-confirmation",
|
|
36
|
+
"requiredRoleCount": 5,
|
|
37
|
+
"createdRoleCount": 0,
|
|
38
|
+
"remainingRoleIds": ["project-owner", "project-product", "chief-engineer", "programmer", "test-reviewer"],
|
|
39
|
+
"decisionStatus": "not-asked",
|
|
40
|
+
"decidedAt": null,
|
|
41
|
+
"nextAction": "present-choice-once",
|
|
42
|
+
"decisionEvidence": [],
|
|
43
|
+
"noChoicePolicy": "remain-blocked-without-repeat-prompt",
|
|
44
|
+
"bindingRequiredFields": ["provider", "providerSessionId", "projectRootHash", "workspaceScope", "roleId", "taskId", "title", "cwd", "boundBy", "boundAt", "identityEvidence", "interactionEvidence"],
|
|
45
|
+
"decisionEvidenceSchema": ["decisionId", "userDecision", "actor", "source", "decidedAt", "inputHash", "evidenceHash"],
|
|
46
|
+
"fakeProviderSessionIdProhibited": true,
|
|
47
|
+
"createdAt": null,
|
|
48
|
+
"updatedAt": null
|
|
49
|
+
}
|