@pm_zhousl/xinyun-ai-init 1.3.0 → 1.5.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 (39) hide show
  1. package/init/xinyun-ai-init/README.md +240 -6
  2. package/init/xinyun-ai-init/rules/directory-self-completion.md +7 -0
  3. package/init/xinyun-ai-init/rules/frameworks/README.md +16 -0
  4. package/init/xinyun-ai-init/rules/frameworks/backend/php/thinkphp.md +5 -0
  5. package/init/xinyun-ai-init/rules/frameworks/frontend/uni-app.md +5 -0
  6. package/init/xinyun-ai-init/rules/frameworks/frontend/wechat-miniprogram.md +5 -0
  7. package/init/xinyun-ai-init/rules/init-rules.md +7 -0
  8. package/init/xinyun-ai-init/rules/session-workbench.md +73 -0
  9. package/init/xinyun-ai-init/rules/upgrade-rules.md +9 -0
  10. package/init/xinyun-ai-init/templates/AGENTS.template.md +27 -1
  11. package/init/xinyun-ai-init/templates/core-rules.template.md +172 -1
  12. package/init/xinyun-ai-init/templates/current-task.template.md +68 -0
  13. package/init/xinyun-ai-init/templates/manifest.template.json +17 -2
  14. package/init/xinyun-ai-init/templates/project-check.template.md +19 -0
  15. package/init/xinyun-ai-init/templates/project-guide.template.md +47 -1
  16. package/init/xinyun-ai-init/templates/project-index.template.json +50 -0
  17. package/init/xinyun-ai-init/templates/team/README.md +40 -0
  18. package/init/xinyun-ai-init/templates/team/assignments.json +33 -0
  19. package/init/xinyun-ai-init/templates/team/confirmations/chief-engineer.md +24 -0
  20. package/init/xinyun-ai-init/templates/team/confirmations/programmer.md +24 -0
  21. package/init/xinyun-ai-init/templates/team/confirmations/project-owner.md +24 -0
  22. package/init/xinyun-ai-init/templates/team/confirmations/project-product.md +24 -0
  23. package/init/xinyun-ai-init/templates/team/confirmations/test-reviewer.md +24 -0
  24. package/init/xinyun-ai-init/templates/team/file-ownership.json +32 -0
  25. package/init/xinyun-ai-init/templates/team/members.json +61 -0
  26. package/init/xinyun-ai-init/templates/team/responsibility-matrix.json +81 -0
  27. package/init/xinyun-ai-init/templates/team/roles.json +71 -0
  28. package/init/xinyun-ai-init/templates/team/understandings/chief-engineer.md +23 -0
  29. package/init/xinyun-ai-init/templates/team/understandings/programmer.md +23 -0
  30. package/init/xinyun-ai-init/templates/team/understandings/project-owner.md +23 -0
  31. package/init/xinyun-ai-init/templates/team/understandings/project-product.md +23 -0
  32. package/init/xinyun-ai-init/templates/team/understandings/test-reviewer.md +23 -0
  33. package/init/xinyun-ai-init/templates/workstreams-readme.template.md +15 -0
  34. package/init/xinyun-ai-init/version.json +1 -1
  35. package/package.json +1 -1
  36. package/scripts/verify-init-package.js +360 -8
  37. package/test-scenarios/README.md +3 -3
  38. package/test-scenarios/review-template.md +19 -2
  39. package/test-scenarios/scenarios.md +258 -4
@@ -0,0 +1,24 @@
1
+ # 职责确认记录:test-reviewer
2
+
3
+ - schemaVersion:1
4
+ - recordId:confirmation-test-reviewer
5
+ - roleId:test-reviewer
6
+ - memberId:null
7
+ - status:pending
8
+ - responsibilityScope:独立测试、发布阻断判断、测试结论
9
+ - readScope:test-scenarios, acceptance-criteria, permissions, dangerous-actions
10
+ - writeScope:xinyun-ai/handoffs/, xinyun-ai/team/understandings/test-reviewer.md
11
+ - forbiddenActions:modify-business-code, execute-sql, git-push, npm-publish
12
+ - reviewerRoleId:null
13
+ - technicalApproverRoleId:chief-engineer
14
+ - businessApproverRoleId:project-owner
15
+ - publishAuthorizerRoleId:project-owner
16
+ - confirmedBy:null
17
+ - confirmedAt:null
18
+ - createdAt:2026-07-19T00:00:00.000Z
19
+ - updatedAt:2026-07-19T00:00:00.000Z
20
+
21
+ ## 待确认
22
+
23
+ - 测试审查员只测试和输出结论,不直接修改代码。
24
+ - 发布阻断结论不等同于发布授权。
@@ -0,0 +1,32 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "ownerships": [],
4
+ "pathTypeEnum": ["file", "directory", "glob"],
5
+ "fileCategoryEnum": ["business-code", "control-file", "test", "config", "database", "api", "ui", "documentation", "generated"],
6
+ "pathRule": "path must be a forward-slash path relative to repoRoot and must not contain ..",
7
+ "recordContract": {
8
+ "requiredFields": [
9
+ "ownershipId",
10
+ "pathType",
11
+ "path",
12
+ "repoRoot",
13
+ "workstream",
14
+ "fileCategory",
15
+ "ownerRoleId",
16
+ "executorRoleId",
17
+ "reviewerRoleId",
18
+ "technicalApproverRoleId",
19
+ "businessApproverRoleId",
20
+ "createdAt",
21
+ "updatedAt"
22
+ ],
23
+ "controlFiles": [
24
+ "xinyun-ai/team/**",
25
+ "xinyun-ai/current-task.md",
26
+ "xinyun-ai/index/session-current.md",
27
+ "xinyun-ai/handoffs/**"
28
+ ],
29
+ "outOfScopeRule": "Actual diff outside expected paths requires status=paused and pauseReason=out-of-scope."
30
+ },
31
+ "updatedAt": ""
32
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "members": [
4
+ {
5
+ "memberId": "member-project-owner",
6
+ "displayName": "项目负责人(待绑定)",
7
+ "memberType": "logical-slot",
8
+ "roleIds": ["project-owner"],
9
+ "personId": null,
10
+ "sessionId": null,
11
+ "status": "unassigned",
12
+ "createdAt": "",
13
+ "updatedAt": ""
14
+ },
15
+ {
16
+ "memberId": "member-project-product",
17
+ "displayName": "项目产品(待绑定)",
18
+ "memberType": "logical-slot",
19
+ "roleIds": ["project-product"],
20
+ "personId": null,
21
+ "sessionId": null,
22
+ "status": "unassigned",
23
+ "createdAt": "",
24
+ "updatedAt": ""
25
+ },
26
+ {
27
+ "memberId": "member-chief-engineer",
28
+ "displayName": "总工(待绑定)",
29
+ "memberType": "logical-slot",
30
+ "roleIds": ["chief-engineer"],
31
+ "personId": null,
32
+ "sessionId": null,
33
+ "status": "unassigned",
34
+ "createdAt": "",
35
+ "updatedAt": ""
36
+ },
37
+ {
38
+ "memberId": "member-programmer",
39
+ "displayName": "程序员(待绑定)",
40
+ "memberType": "logical-slot",
41
+ "roleIds": ["programmer"],
42
+ "personId": null,
43
+ "sessionId": null,
44
+ "status": "unassigned",
45
+ "createdAt": "",
46
+ "updatedAt": ""
47
+ },
48
+ {
49
+ "memberId": "member-test-reviewer",
50
+ "displayName": "测试审查员(待绑定)",
51
+ "memberType": "logical-slot",
52
+ "roleIds": ["test-reviewer"],
53
+ "personId": null,
54
+ "sessionId": null,
55
+ "status": "unassigned",
56
+ "createdAt": "",
57
+ "updatedAt": ""
58
+ }
59
+ ],
60
+ "updatedAt": ""
61
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "matrix": [
4
+ {
5
+ "matrixId": "matrix-project-owner",
6
+ "roleId": "project-owner",
7
+ "responsibilities": ["需求最终确认", "业务验收", "发布授权"],
8
+ "readScope": ["requirements", "delivery", "release", "business-acceptance"],
9
+ "writeScope": [],
10
+ "forbiddenActions": ["modify-business-code", "execute-sql", "git-push", "npm-publish"],
11
+ "reviewerRoleId": "test-reviewer",
12
+ "technicalApproverRoleId": "chief-engineer",
13
+ "businessApproverRoleId": null,
14
+ "publishAuthorizerRoleId": null,
15
+ "confirmationStatus": "pending",
16
+ "confirmedBy": null,
17
+ "confirmedAt": null
18
+ },
19
+ {
20
+ "matrixId": "matrix-project-product",
21
+ "roleId": "project-product",
22
+ "responsibilities": ["需求整理", "任务拆分", "产品验收建议"],
23
+ "readScope": ["requirements", "current-task", "project-guide"],
24
+ "writeScope": ["xinyun-ai/requirements/", "xinyun-ai/current-task.md"],
25
+ "forbiddenActions": ["technical-final-approval", "publish-authorization"],
26
+ "reviewerRoleId": "test-reviewer",
27
+ "technicalApproverRoleId": "chief-engineer",
28
+ "businessApproverRoleId": "project-owner",
29
+ "publishAuthorizerRoleId": "project-owner",
30
+ "confirmationStatus": "pending",
31
+ "confirmedBy": null,
32
+ "confirmedAt": null
33
+ },
34
+ {
35
+ "matrixId": "matrix-chief-engineer",
36
+ "roleId": "chief-engineer",
37
+ "responsibilities": ["技术方案", "架构风险", "技术最终确认"],
38
+ "readScope": ["architecture", "api", "database", "git", "workstreams", "rules"],
39
+ "writeScope": ["xinyun-ai/global-review/", "xinyun-ai/team/understandings/chief-engineer.md"],
40
+ "forbiddenActions": ["git-push", "npm-publish", "execute-sql-without-confirmation"],
41
+ "reviewerRoleId": "test-reviewer",
42
+ "technicalApproverRoleId": null,
43
+ "businessApproverRoleId": "project-owner",
44
+ "publishAuthorizerRoleId": "project-owner",
45
+ "confirmationStatus": "pending",
46
+ "confirmedBy": null,
47
+ "confirmedAt": null
48
+ },
49
+ {
50
+ "matrixId": "matrix-programmer",
51
+ "roleId": "programmer",
52
+ "responsibilities": ["按确认范围执行代码、配置和测试任务"],
53
+ "readScope": ["assigned-workstream", "framework-rules", "entry-files", "tests"],
54
+ "writeScope": ["confirmed-task-scope"],
55
+ "forbiddenActions": ["technical-final-approval", "business-final-approval", "publish-authorization"],
56
+ "reviewerRoleId": "test-reviewer",
57
+ "technicalApproverRoleId": "chief-engineer",
58
+ "businessApproverRoleId": "project-owner",
59
+ "publishAuthorizerRoleId": "project-owner",
60
+ "confirmationStatus": "pending",
61
+ "confirmedBy": null,
62
+ "confirmedAt": null
63
+ },
64
+ {
65
+ "matrixId": "matrix-test-reviewer",
66
+ "roleId": "test-reviewer",
67
+ "responsibilities": ["独立测试", "发布阻断判断", "测试结论"],
68
+ "readScope": ["test-scenarios", "acceptance-criteria", "permissions", "dangerous-actions"],
69
+ "writeScope": ["xinyun-ai/handoffs/", "xinyun-ai/team/understandings/test-reviewer.md"],
70
+ "forbiddenActions": ["modify-business-code", "execute-sql", "git-push", "npm-publish"],
71
+ "reviewerRoleId": null,
72
+ "technicalApproverRoleId": "chief-engineer",
73
+ "businessApproverRoleId": "project-owner",
74
+ "publishAuthorizerRoleId": "project-owner",
75
+ "confirmationStatus": "pending",
76
+ "confirmedBy": null,
77
+ "confirmedAt": null
78
+ }
79
+ ],
80
+ "updatedAt": ""
81
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "roles": [
4
+ {
5
+ "roleId": "project-owner",
6
+ "name": "项目负责人",
7
+ "roleType": "logical-role",
8
+ "lifecycleStatus": "unassigned",
9
+ "readScope": ["requirements", "delivery", "release", "business-acceptance"],
10
+ "writeScope": ["xinyun-ai/team/confirmations/project-owner.md"],
11
+ "forbiddenActions": ["modify-business-code", "execute-sql", "git-push", "npm-publish"],
12
+ "defaultReviewerRoleId": "test-reviewer",
13
+ "defaultTechnicalApproverRoleId": "chief-engineer",
14
+ "defaultBusinessApproverRoleId": null,
15
+ "defaultPublishAuthorizerRoleId": null
16
+ },
17
+ {
18
+ "roleId": "project-product",
19
+ "name": "项目产品",
20
+ "roleType": "logical-role",
21
+ "lifecycleStatus": "unassigned",
22
+ "readScope": ["requirements", "current-task", "project-guide", "business-notes"],
23
+ "writeScope": ["xinyun-ai/requirements/", "xinyun-ai/current-task.md", "xinyun-ai/team/understandings/project-product.md"],
24
+ "forbiddenActions": ["technical-final-approval", "publish-authorization", "git-push", "npm-publish"],
25
+ "defaultReviewerRoleId": "test-reviewer",
26
+ "defaultTechnicalApproverRoleId": "chief-engineer",
27
+ "defaultBusinessApproverRoleId": "project-owner",
28
+ "defaultPublishAuthorizerRoleId": "project-owner"
29
+ },
30
+ {
31
+ "roleId": "chief-engineer",
32
+ "name": "总工",
33
+ "roleType": "logical-role",
34
+ "lifecycleStatus": "unassigned",
35
+ "readScope": ["architecture", "api", "database", "git", "workstreams", "rules"],
36
+ "writeScope": ["xinyun-ai/team/understandings/chief-engineer.md", "xinyun-ai/global-review/"],
37
+ "forbiddenActions": ["git-push", "npm-publish", "execute-sql-without-confirmation"],
38
+ "defaultReviewerRoleId": "test-reviewer",
39
+ "defaultTechnicalApproverRoleId": null,
40
+ "defaultBusinessApproverRoleId": "project-owner",
41
+ "defaultPublishAuthorizerRoleId": "project-owner"
42
+ },
43
+ {
44
+ "roleId": "programmer",
45
+ "name": "程序员",
46
+ "roleType": "logical-role",
47
+ "lifecycleStatus": "unassigned",
48
+ "readScope": ["assigned-workstream", "framework-rules", "entry-files", "tests"],
49
+ "writeScope": ["confirmed-task-scope"],
50
+ "forbiddenActions": ["technical-final-approval", "business-final-approval", "publish-authorization", "git-push", "npm-publish"],
51
+ "defaultReviewerRoleId": "test-reviewer",
52
+ "defaultTechnicalApproverRoleId": "chief-engineer",
53
+ "defaultBusinessApproverRoleId": "project-owner",
54
+ "defaultPublishAuthorizerRoleId": "project-owner"
55
+ },
56
+ {
57
+ "roleId": "test-reviewer",
58
+ "name": "测试审查员",
59
+ "roleType": "logical-role",
60
+ "lifecycleStatus": "unassigned",
61
+ "readScope": ["test-scenarios", "acceptance-criteria", "permissions", "dangerous-actions"],
62
+ "writeScope": ["xinyun-ai/team/understandings/test-reviewer.md", "xinyun-ai/handoffs/"],
63
+ "forbiddenActions": ["modify-business-code", "execute-sql", "git-push", "npm-publish"],
64
+ "defaultReviewerRoleId": null,
65
+ "defaultTechnicalApproverRoleId": "chief-engineer",
66
+ "defaultBusinessApproverRoleId": "project-owner",
67
+ "defaultPublishAuthorizerRoleId": "project-owner"
68
+ }
69
+ ],
70
+ "updatedAt": ""
71
+ }
@@ -0,0 +1,23 @@
1
+ # 角色理解记录:chief-engineer
2
+
3
+ - recordId:understanding-chief-engineer
4
+ - roleId:chief-engineer
5
+ - memberId:null
6
+ - status:pending
7
+ - readScope:项目结构、端口、框架、接口、数据库、Git、构建线索
8
+ - readBudget:按任务触发读取,不全量扫描业务代码
9
+ - unreadablePaths:
10
+ - confirmedFacts:
11
+ - inferences:
12
+ - pendingQuestions:
13
+ - risks:
14
+ - evidence:
15
+ - coverage:
16
+ - executionEligible:false
17
+ - createdAt:2026-07-19T00:00:00.000Z
18
+ - updatedAt:2026-07-19T00:00:00.000Z
19
+
20
+ ## 后续动作
21
+
22
+ - 绑定总工成员。
23
+ - 完成技术范围理解和职责确认后才能技术确认。
@@ -0,0 +1,23 @@
1
+ # 角色理解记录:programmer
2
+
3
+ - recordId:understanding-programmer
4
+ - roleId:programmer
5
+ - memberId:null
6
+ - status:pending
7
+ - readScope:被分配端口、框架规则、入口文件、已有封装、测试方式
8
+ - readBudget:仅读取确认任务范围内文件
9
+ - unreadablePaths:
10
+ - confirmedFacts:
11
+ - inferences:
12
+ - pendingQuestions:
13
+ - risks:
14
+ - evidence:
15
+ - coverage:
16
+ - executionEligible:false
17
+ - createdAt:2026-07-19T00:00:00.000Z
18
+ - updatedAt:2026-07-19T00:00:00.000Z
19
+
20
+ ## 后续动作
21
+
22
+ - 绑定执行成员。
23
+ - 等待已确认任务单和允许修改范围。
@@ -0,0 +1,23 @@
1
+ # 角色理解记录:project-owner
2
+
3
+ - recordId:understanding-project-owner
4
+ - roleId:project-owner
5
+ - memberId:null
6
+ - status:pending
7
+ - readScope:审批流程、交付结论、发布授权规则
8
+ - readBudget:首次初始化不全量扫描业务代码
9
+ - unreadablePaths:
10
+ - confirmedFacts:
11
+ - inferences:
12
+ - pendingQuestions:
13
+ - risks:
14
+ - evidence:
15
+ - coverage:
16
+ - executionEligible:false
17
+ - createdAt:2026-07-19T00:00:00.000Z
18
+ - updatedAt:2026-07-19T00:00:00.000Z
19
+
20
+ ## 后续动作
21
+
22
+ - 绑定实际确认成员。
23
+ - 确认业务验收和发布授权边界。
@@ -0,0 +1,23 @@
1
+ # 角色理解记录:project-product
2
+
3
+ - recordId:understanding-project-product
4
+ - roleId:project-product
5
+ - memberId:null
6
+ - status:pending
7
+ - readScope:项目导读、需求沉淀、当前任务、业务说明
8
+ - readBudget:首次初始化只读关键文档,不全量扫描业务代码
9
+ - unreadablePaths:
10
+ - confirmedFacts:
11
+ - inferences:
12
+ - pendingQuestions:
13
+ - risks:
14
+ - evidence:
15
+ - coverage:
16
+ - executionEligible:false
17
+ - createdAt:2026-07-19T00:00:00.000Z
18
+ - updatedAt:2026-07-19T00:00:00.000Z
19
+
20
+ ## 后续动作
21
+
22
+ - 绑定产品成员。
23
+ - 梳理当前需求和产品验收建议。
@@ -0,0 +1,23 @@
1
+ # 角色理解记录:test-reviewer
2
+
3
+ - recordId:understanding-test-reviewer
4
+ - roleId:test-reviewer
5
+ - memberId:null
6
+ - status:pending
7
+ - readScope:测试场景、验收标准、权限边界、危险操作规则
8
+ - readBudget:优先读取测试材料和交付证据
9
+ - unreadablePaths:
10
+ - confirmedFacts:
11
+ - inferences:
12
+ - pendingQuestions:
13
+ - risks:
14
+ - evidence:
15
+ - coverage:
16
+ - executionEligible:false
17
+ - createdAt:2026-07-19T00:00:00.000Z
18
+ - updatedAt:2026-07-19T00:00:00.000Z
19
+
20
+ ## 后续动作
21
+
22
+ - 绑定测试审查成员。
23
+ - 独立复核测试结果和发布阻断项。
@@ -19,3 +19,18 @@
19
19
  ## 端口 Git 仓库
20
20
 
21
21
  待填写。
22
+
23
+ ## 端口轻量框架识别
24
+
25
+ - 每个端口最多发现 3 层目录、读取 20 个关键文件。
26
+ - 正向识别记录证据路径和证据类型。
27
+ - 预算内无证据标注 `未在项目中发现`。
28
+ - 超预算、权限不足或路径不可读标注 `状态未知` 和 `覆盖范围:部分`。
29
+ - 不混用 uni-app 与原生微信小程序规则。
30
+
31
+ ## 端口字段影响审视
32
+
33
+ - 每个端口最多检查 300 个候选文件、1000 条匹配结果和 50 条证据记录。
34
+ - 字段分类:数据库字段 / API 字段 / 前端展示字段 / 未确认。
35
+ - 记录检索根目录、排除项、CodeGraph 状态、证据、覆盖范围、可能遗漏位置和兼容方案。
36
+ - 未确认前不得执行 SQL、migration、seed、批量数据修复或接口兼容改动。
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "packageName": "xinyun-ai-init",
3
3
  "displayName": "欣芸技术开发 Agent 流初始化包",
4
- "version": "1.3.0",
4
+ "version": "1.5.0",
5
5
  "scriptVersion": "2026.07.16",
6
6
  "schemaVersion": "1",
7
7
  "defaultMode": "fast-init",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pm_zhousl/xinyun-ai-init",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "欣芸技术开发 Agent 流初始化包",
5
5
  "bin": {
6
6
  "xinyun-ai-init": "bin/xinyun-ai-init.js"