@markus-global/cli 0.8.4 → 0.8.5-rc.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 (147) hide show
  1. package/dist/commands/agent.js +9 -9
  2. package/dist/commands/agent.js.map +1 -1
  3. package/dist/commands/doctor.d.ts +3 -1
  4. package/dist/commands/doctor.d.ts.map +1 -1
  5. package/dist/commands/doctor.js +27 -1
  6. package/dist/commands/doctor.js.map +1 -1
  7. package/dist/commands/models.d.ts.map +1 -1
  8. package/dist/commands/models.js +6 -7
  9. package/dist/commands/models.js.map +1 -1
  10. package/dist/commands/project.d.ts +3 -0
  11. package/dist/commands/project.d.ts.map +1 -0
  12. package/dist/commands/project.js +25 -0
  13. package/dist/commands/project.js.map +1 -0
  14. package/dist/commands/requirement.d.ts +3 -0
  15. package/dist/commands/requirement.d.ts.map +1 -0
  16. package/dist/commands/requirement.js +34 -0
  17. package/dist/commands/requirement.js.map +1 -0
  18. package/dist/commands/start.d.ts.map +1 -1
  19. package/dist/commands/start.js +42 -1
  20. package/dist/commands/start.js.map +1 -1
  21. package/dist/commands/task.d.ts +3 -0
  22. package/dist/commands/task.d.ts.map +1 -0
  23. package/dist/commands/task.js +110 -0
  24. package/dist/commands/task.js.map +1 -0
  25. package/dist/index.js +8 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/markus.mjs +3770 -965
  28. package/dist/output.d.ts +3 -1
  29. package/dist/output.d.ts.map +1 -1
  30. package/dist/output.js +34 -3
  31. package/dist/output.js.map +1 -1
  32. package/dist/web-ui/assets/arc-azDa9rNQ.js +1 -0
  33. package/dist/web-ui/assets/architectureDiagram-3BPJPVTR-CWoGp8TB.js +36 -0
  34. package/dist/web-ui/assets/blockDiagram-GPEHLZMM-C2Tq3zqo.js +132 -0
  35. package/dist/web-ui/assets/c4Diagram-AAUBKEIU-C2tj98or.js +10 -0
  36. package/dist/web-ui/assets/channel-D0Q-P9rQ.js +1 -0
  37. package/dist/web-ui/assets/chunk-2J33WTMH-DMhlyS99.js +1 -0
  38. package/dist/web-ui/assets/chunk-4BX2VUAB-C8hL0QFv.js +1 -0
  39. package/dist/web-ui/assets/chunk-55IACEB6-BPCe4caz.js +1 -0
  40. package/dist/web-ui/assets/chunk-727SXJPM-C5EAjSrN.js +206 -0
  41. package/dist/web-ui/assets/chunk-AQP2D5EJ-BLSz7iPE.js +231 -0
  42. package/dist/web-ui/assets/chunk-FMBD7UC4-Sk4yLzwq.js +15 -0
  43. package/dist/web-ui/assets/chunk-ND2GUHAM-DbuQgWyn.js +1 -0
  44. package/dist/web-ui/assets/chunk-QZHKN3VN-REM6PaDE.js +1 -0
  45. package/dist/web-ui/assets/classDiagram-4FO5ZUOK-BcOPwdcC.js +1 -0
  46. package/dist/web-ui/assets/classDiagram-v2-Q7XG4LA2-BcOPwdcC.js +1 -0
  47. package/dist/web-ui/assets/cose-bilkent-S5V4N54A-Chu2Y9EC.js +1 -0
  48. package/dist/web-ui/assets/cytoscape.esm-D3_iZ_3b.js +321 -0
  49. package/dist/web-ui/assets/dagre-BM42HDAG-BGQGbUMF.js +4 -0
  50. package/dist/web-ui/assets/defaultLocale-DX6XiGOO.js +1 -0
  51. package/dist/web-ui/assets/diagram-2AECGRRQ-DnZ1SQGN.js +43 -0
  52. package/dist/web-ui/assets/diagram-5GNKFQAL-B0S37NyM.js +10 -0
  53. package/dist/web-ui/assets/diagram-KO2AKTUF-BxDwUDuY.js +3 -0
  54. package/dist/web-ui/assets/diagram-LMA3HP47-5UC8M7Iq.js +24 -0
  55. package/dist/web-ui/assets/diagram-OG6HWLK6-C-eMeMRG.js +24 -0
  56. package/dist/web-ui/assets/erDiagram-TEJ5UH35-CVWhzHKv.js +85 -0
  57. package/dist/web-ui/assets/flowDiagram-I6XJVG4X-CMG-a-kh.js +162 -0
  58. package/dist/web-ui/assets/ganttDiagram-6RSMTGT7-DbVJ6VGB.js +292 -0
  59. package/dist/web-ui/assets/gitGraphDiagram-PVQCEYII-DcCuYR-R.js +106 -0
  60. package/dist/web-ui/assets/graph--OzhPTMs.js +1 -0
  61. package/dist/web-ui/assets/index-PVrVcpcl.css +1 -0
  62. package/dist/web-ui/assets/index-zJq4U9RT.js +776 -0
  63. package/dist/web-ui/assets/infoDiagram-5YYISTIA-CaY7gJ4a.js +2 -0
  64. package/dist/web-ui/assets/init-Gi6I4Gst.js +1 -0
  65. package/dist/web-ui/assets/ishikawaDiagram-YF4QCWOH-l4_2NV1P.js +70 -0
  66. package/dist/web-ui/assets/journeyDiagram-JHISSGLW-BVeQNwa5.js +139 -0
  67. package/dist/web-ui/assets/kanban-definition-UN3LZRKU-CtvPOV3r.js +89 -0
  68. package/dist/web-ui/assets/layout-SsrduOYp.js +1 -0
  69. package/dist/web-ui/assets/linear-B0DfGdNc.js +1 -0
  70. package/dist/web-ui/assets/mermaid.core-Bz3avYM5.js +303 -0
  71. package/dist/web-ui/assets/mindmap-definition-RKZ34NQL-1X-u7gPH.js +96 -0
  72. package/dist/web-ui/assets/ordinal-Cboi1Yqb.js +1 -0
  73. package/dist/web-ui/assets/pieDiagram-4H26LBE5-BO8LpJ1H.js +30 -0
  74. package/dist/web-ui/assets/plantuml-DezRDxd4.js +357 -0
  75. package/dist/web-ui/assets/quadrantDiagram-W4KKPZXB-BBYmPM7O.js +7 -0
  76. package/dist/web-ui/assets/requirementDiagram-4Y6WPE33-CUU8gZny.js +84 -0
  77. package/dist/web-ui/assets/sankeyDiagram-5OEKKPKP-k6GjcALi.js +40 -0
  78. package/dist/web-ui/assets/sequenceDiagram-3UESZ5HK-CScOE6Nf.js +162 -0
  79. package/dist/web-ui/assets/stateDiagram-AJRCARHV-BcvHRBZl.js +1 -0
  80. package/dist/web-ui/assets/stateDiagram-v2-BHNVJYJU-p321ujvX.js +1 -0
  81. package/dist/web-ui/assets/timeline-definition-PNZ67QCA-D7tGfjR6.js +120 -0
  82. package/dist/web-ui/assets/vennDiagram-CIIHVFJN-AU7MqjmN.js +34 -0
  83. package/dist/web-ui/assets/viz-global-C_AyN6D9.js +9 -0
  84. package/dist/web-ui/assets/wardley-L42UT6IY-DKQmSXOS.js +161 -0
  85. package/dist/web-ui/assets/wardleyDiagram-YWT4CUSO-DVMv24j_.js +78 -0
  86. package/dist/web-ui/assets/xychartDiagram-2RQKCTM6-CGQCKCak.js +7 -0
  87. package/dist/web-ui/index.html +2 -2
  88. package/package.json +2 -1
  89. package/templates/roles/SHARED.md +113 -8
  90. package/templates/roles/ai-engineer/ROLE.md +35 -0
  91. package/templates/roles/ai-engineer/agent.json +1 -1
  92. package/templates/roles/architect/ROLE.md +15 -0
  93. package/templates/roles/architect/agent.json +1 -1
  94. package/templates/roles/content-writer/HEARTBEAT.md +29 -0
  95. package/templates/roles/content-writer/POLICIES.md +30 -0
  96. package/templates/roles/content-writer/ROLE.md +235 -19
  97. package/templates/roles/data-engineer/ROLE.md +29 -0
  98. package/templates/roles/data-engineer/agent.json +1 -1
  99. package/templates/roles/developer/HEARTBEAT.md +25 -7
  100. package/templates/roles/developer/POLICIES.md +24 -6
  101. package/templates/roles/developer/ROLE.md +335 -55
  102. package/templates/roles/devops/HEARTBEAT.md +30 -0
  103. package/templates/roles/devops/POLICIES.md +30 -0
  104. package/templates/roles/devops/ROLE.md +126 -20
  105. package/templates/roles/org-manager/ROLE.md +15 -0
  106. package/templates/roles/product-manager/POLICIES.md +29 -0
  107. package/templates/roles/product-manager/ROLE.md +126 -17
  108. package/templates/roles/project-manager/HEARTBEAT.md +30 -0
  109. package/templates/roles/project-manager/POLICIES.md +29 -0
  110. package/templates/roles/project-manager/ROLE.md +18 -0
  111. package/templates/roles/qa-engineer/HEARTBEAT.md +29 -0
  112. package/templates/roles/qa-engineer/POLICIES.md +29 -0
  113. package/templates/roles/qa-engineer/ROLE.md +133 -26
  114. package/templates/roles/research-assistant/HEARTBEAT.md +29 -0
  115. package/templates/roles/research-assistant/POLICIES.md +29 -0
  116. package/templates/roles/research-assistant/ROLE.md +310 -48
  117. package/templates/roles/reviewer/POLICIES.md +29 -0
  118. package/templates/roles/reviewer/ROLE.md +49 -0
  119. package/templates/roles/scrum-master/ROLE.md +6 -0
  120. package/templates/roles/skill-architect/HEARTBEAT.md +29 -0
  121. package/templates/roles/skill-architect/POLICIES.md +29 -0
  122. package/templates/roles/skill-architect/ROLE.md +267 -20
  123. package/templates/roles/sre/agent.json +1 -1
  124. package/templates/roles/tech-writer/HEARTBEAT.md +29 -0
  125. package/templates/roles/tech-writer/POLICIES.md +28 -0
  126. package/templates/roles/tech-writer/ROLE.md +258 -21
  127. package/templates/skills/claude-code/SKILL.md +239 -0
  128. package/templates/skills/claude-code/skill.json +17 -0
  129. package/templates/skills/codex/SKILL.md +217 -0
  130. package/templates/skills/codex/skill.json +17 -0
  131. package/templates/skills/coding-tools/SKILL.md +300 -0
  132. package/templates/skills/coding-tools/skill.json +17 -0
  133. package/templates/skills/cursor-agent/SKILL.md +262 -0
  134. package/templates/skills/cursor-agent/skill.json +17 -0
  135. package/templates/skills/feishu-interaction/SKILL.md +103 -0
  136. package/templates/skills/feishu-interaction/skill.json +26 -0
  137. package/templates/skills/self-evolution/SKILL.md +31 -0
  138. package/templates/teams/content-team/NORMS.md +17 -0
  139. package/templates/teams/dev-squad/NORMS.md +26 -0
  140. package/templates/teams/dev-squad/team.json +4 -4
  141. package/templates/teams/engineering-pod/NORMS.md +33 -0
  142. package/templates/teams/engineering-pod/team.json +4 -4
  143. package/templates/teams/research-lab/NORMS.md +15 -0
  144. package/templates/teams/startup-team/NORMS.md +17 -0
  145. package/templates/teams/startup-team/team.json +1 -1
  146. package/dist/web-ui/assets/index-CZL1VHgy.css +0 -1
  147. package/dist/web-ui/assets/index-DZjXJ0HZ.js +0 -724
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: feishu-interaction
3
+ description: Feishu/Lark platform interaction via MCP - documents, tasks, calendar, Bitable, messaging
4
+ ---
5
+
6
+ # Feishu/Lark Platform Interaction
7
+
8
+ You have access to the Feishu/Lark platform via MCP tools (prefixed `feishu-lark__`).
9
+ This enables you to interact with the user's Feishu workspace: search and read documents,
10
+ manage tasks, create calendar events, operate Bitable databases, and send messages.
11
+
12
+ ## Available Capabilities
13
+
14
+ ### Documents (文档)
15
+ - `docx.v1.document.rawContent` — Read document content
16
+ - `docx.builtin.import` — Import documents (create new docs from content)
17
+ - `docx.builtin.search` — Search documents by keyword
18
+ - `wiki.v2.space.getNode` — Get Wiki node content
19
+ - `wiki.v1.node.search` — Search Wiki nodes
20
+
21
+ ### Tasks (任务)
22
+ - `task.v2.task.create` — Create a new task with title, description, due date
23
+ - `task.v2.task.patch` — Update an existing task
24
+ - `task.v2.task.addMembers` — Add members to a task
25
+ - `task.v2.task.addReminders` — Add reminders to a task
26
+
27
+ ### Calendar (日历)
28
+ - `calendar.v4.calendarEvent.create` — Create a calendar event
29
+ - `calendar.v4.calendarEvent.patch` — Modify a calendar event
30
+ - `calendar.v4.calendarEvent.get` — Get calendar event details
31
+ - `calendar.v4.freebusy.list` — Query free/busy status
32
+ - `calendar.v4.calendar.primary` — Get primary calendar info
33
+
34
+ ### Bitable (多维表格)
35
+ - `bitable.v1.appTable.list` — List tables in a base
36
+ - `bitable.v1.appTableField.list` — List fields in a table
37
+ - `bitable.v1.appTableRecord.search` — Search records
38
+ - `bitable.v1.appTableRecord.create` — Create records
39
+ - `bitable.v1.appTableRecord.update` — Update records
40
+
41
+ ### Messaging (消息)
42
+ - `im.v1.message.create` — Send a message to a chat or user
43
+ - `im.v1.message.list` — List messages in a chat
44
+ - `im.v1.chat.create` — Create a new group chat
45
+ - `im.v1.chat.list` — List chats the bot is in
46
+
47
+ ### Contacts (通讯录)
48
+ - `contact.v3.user.batchGetId` — Batch get user IDs by email/mobile
49
+
50
+ ## Best Practices
51
+
52
+ ### Document Operations
53
+ 1. **Search before read** — Always search for documents first to find the correct `document_id`
54
+ 2. **Prefer Wiki nodes** — If the user mentions "知识库" or "Wiki", use wiki APIs
55
+ 3. **Cite sources** — When referencing document content in replies, include the document title
56
+
57
+ ### Task Management
58
+ 1. **Match user intent** — When user says "帮我创建一个任务", use `task.v2.task.create`
59
+ 2. **Set due dates** — Always ask for or infer a due date when creating tasks
60
+ 3. **Add members** — If the user mentions specific people, resolve their user IDs via contacts API first
61
+
62
+ ### Calendar Events
63
+ 1. **Check availability** — Before creating an event, use `freebusy.list` to check conflicts
64
+ 2. **Time zones** — Default to Asia/Shanghai unless the user specifies otherwise
65
+ 3. **Include details** — Set description, location, and attendees when provided
66
+
67
+ ### Bitable Operations
68
+ 1. **Discover structure** — List tables and fields before searching records
69
+ 2. **Filter queries** — Use search with filter conditions rather than fetching all records
70
+ 3. **Batch operations** — For multiple records, prefer batch create/update when available
71
+
72
+ ### Messaging
73
+ 1. **Format appropriately** — Use markdown formatting for rich messages
74
+ 2. **Respect context** — Only send messages when the user explicitly asks to notify someone
75
+ 3. **Interactive cards** — For structured information, use `msg_type: 'interactive'` with card JSON
76
+
77
+ ## Important Notes
78
+
79
+ - Tool names are prefixed with `feishu-lark__` (e.g., `feishu-lark__docx.builtin.search`)
80
+ - Document editing is NOT supported — you can only read and import
81
+ - File upload/download is NOT supported via MCP
82
+ - Always handle API errors gracefully and report them to the user
83
+ - Respect rate limits: 1000 requests/minute per API endpoint
84
+
85
+ ## Permission Error Handling
86
+
87
+ When a tool call returns an error containing `code: 99991672` or "Access denied...scopes required",
88
+ it means the Feishu application has not been granted the necessary API permissions. In this case:
89
+
90
+ 1. **Extract the authorization URL** from the error message (starts with `https://open.feishu.cn/app/`)
91
+ 2. **Present the link to the user** clearly, explaining they need to click it to authorize the required permissions
92
+ 3. **Do NOT retry** the same tool call — it will continue to fail until permissions are granted
93
+ 4. **List the missing scopes** mentioned in the error so the user knows what to authorize
94
+
95
+ Example response format:
96
+ > The Feishu app needs additional permissions to perform this operation.
97
+ > Please open the following link to authorize, then try again:
98
+ >
99
+ > [https://open.feishu.cn/app/cli_xxx/auth?q=docs:doc,drive:drive,...](https://open.feishu.cn/app/cli_xxx/auth?q=docs:doc,drive:drive,...)
100
+ >
101
+ > Missing scopes: docs:doc, drive:drive
102
+
103
+ Always use the full URL as both the link text AND the href (i.e. `[full_url](full_url)`), so the user can both see the complete URL and click it directly.
@@ -0,0 +1,26 @@
1
+ {
2
+ "type": "skill",
3
+ "name": "feishu-interaction",
4
+ "displayName": "Feishu Interaction",
5
+ "version": "1.0.1",
6
+ "description": "Interact with Feishu/Lark platform - search documents, manage tasks, create calendar events, operate Bitable, and send messages",
7
+ "author": "markus",
8
+ "category": "integration",
9
+ "tags": ["feishu", "lark", "integration", "document", "calendar", "task", "mcp"],
10
+ "i18n": {
11
+ "zh-CN": {
12
+ "displayName": "飞书交互",
13
+ "description": "与飞书平台交互 - 搜索文档、管理任务、创建日历事件、操作多维表格、发送消息"
14
+ }
15
+ },
16
+ "skill": {
17
+ "skillFile": "SKILL.md",
18
+ "requiredPermissions": ["network"],
19
+ "isolation": "shared",
20
+ "mcpServers": {
21
+ "feishu-lark": {
22
+ "reuseGlobal": true
23
+ }
24
+ }
25
+ }
26
+ }
@@ -224,6 +224,37 @@ During heartbeat, check your revision rate:
224
224
  - Consider: would a ROLE.md rule or a HEARTBEAT.md check have prevented any recent failures?
225
225
  - Escalate recurring mistakes: insight → MEMORY.md procedure → ROLE.md rule or HEARTBEAT.md check
226
226
 
227
+ ## Team-Wide Pattern Recognition
228
+
229
+ When you notice patterns that affect the whole team — not just yourself:
230
+
231
+ | Signal | Action |
232
+ |--------|--------|
233
+ | Same bug type recurring across multiple agents | Create a skill with prevention guidelines |
234
+ | Common tool usage mistakes | Add to team NORMS.md or propose a skill |
235
+ | Repeated review feedback across the team | Propose a coding standard update |
236
+ | Process bottleneck affecting multiple tasks | Flag to manager with data |
237
+
238
+ Use `deliverable_create` to share patterns as team knowledge. Individual insights go to `memory_save`; team patterns deserve broader visibility.
239
+
240
+ ## The Ratchet Principle
241
+
242
+ Apply the keep-or-discard discipline to your own evolution:
243
+ - When you try a new approach and it works better, commit it to knowledge (`memory_save`, MEMORY.md, or ROLE.md).
244
+ - When an approach fails, record WHY it failed and move on — don't keep trying the same thing.
245
+ - Your ROLE.md, HEARTBEAT.md, and MEMORY.md are your "program.md" — they are the instructions that determine your effectiveness. Improving them IS your self-evolution.
246
+
247
+ ### Delete the Harness
248
+
249
+ Your accumulated knowledge exists to compensate for your limitations. As you improve — through practice, better tools, or model upgrades — some of that knowledge becomes overhead:
250
+
251
+ - Periodically re-read your MEMORY.md and HEARTBEAT.md. If a procedure or check is now something you do naturally (or the platform handles automatically), remove it.
252
+ - A growing MEMORY.md is not always a sign of progress. Prune entries that are no longer needed — the harness that grows monotonically is a harness you have stopped reading.
253
+ - After platform updates or model improvements, audit your procedures: delete anything the system now does for free.
254
+ - The goal is a lean, high-signal knowledge base — not an exhaustive archive.
255
+
256
+ ---
257
+
227
258
  ## Rules
228
259
 
229
260
  - **DO** save insights immediately while context is fresh
@@ -48,3 +48,20 @@
48
48
  - 所有内容成品通过 `deliverable_create` 登记,确保可追溯。
49
49
  - 紧急发布需求使用 `notify_user` 通知编辑。
50
50
  - 各平台数据表现定期通过 `task_note` 汇总。
51
+
52
+ ## 质量门禁
53
+
54
+ 每个内容环节的交接需通过对应的质量检查:
55
+
56
+ | 环节 | 质量要求 |
57
+ |------|---------|
58
+ | 选题 → 创作 | 选题有明确角度、目标平台、受众定义 |
59
+ | 创作 → 审核 | 初稿完整、事实可追溯、符合平台格式 |
60
+ | 审核 → 发布 | 编辑确认准确性、调性一致性、合规性 |
61
+ | 发布 → 复盘 | 发布链接已记录、数据追踪已配置 |
62
+
63
+ ## 错误恢复
64
+
65
+ - **事实错误**:发现后立即通知编辑,评估是否需要更正或撤回。在 `task_note` 中记录错误原因和修正方案。
66
+ - **平台违规**:内容被平台警告或删除时,分析原因,更新内容规范,避免再犯。
67
+ - **数据异常**:发布后数据表现远低于预期时,分析选题、标题、发布时间等因素,记录到团队知识库。
@@ -60,3 +60,29 @@ This is the most important rule for parallel development:
60
60
  - Document non-obvious decisions as `deliverable_create` (type: "architecture_decision").
61
61
  - Save reusable patterns and gotchas via `memory_save` with appropriate tags.
62
62
  - After completing a complex task, record lessons learned during the self-evolution reflection.
63
+
64
+ ## Quality Gates by Phase
65
+
66
+ Every phase transition requires passing its quality gate:
67
+
68
+ | Transition | Gate |
69
+ |------------|------|
70
+ | Plan → Implement | Tasks have clear acceptance criteria, file ownership defined, dependencies mapped |
71
+ | Implement → Review | Tests pass, changes within scope, no debug artifacts, summary in task notes |
72
+ | Review → Complete | Reviewer verified correctness, conventions, security, and scope. Branch merged. |
73
+ | Any → Blocked | Blocker documented with what was tried and why it failed |
74
+
75
+ ## Error Recovery
76
+
77
+ - **Build failures**: Developer fixes immediately. If systemic (dependency issue), Tech Lead coordinates.
78
+ - **Merge conflicts**: Developer resolves in their worktree. If conflict involves another developer's files, coordinate via `agent_send_message` before resolving.
79
+ - **Review rejection**: Developer addresses ALL feedback items — don't skip any. Re-submit when done.
80
+ - **Stale branches**: If a branch falls behind main by >10 commits, rebase before submitting for review.
81
+
82
+ ## Security Checklist
83
+
84
+ Before approving any task that touches these areas, the reviewer must verify:
85
+ - **Authentication/Authorization**: Proper token validation, permission checks, session management
86
+ - **User Input**: Input validation, parameterized queries, output encoding
87
+ - **Secrets**: No hardcoded credentials, proper secret management
88
+ - **Dependencies**: No known CVEs in new dependencies
@@ -35,28 +35,28 @@
35
35
  "role": "worker",
36
36
  "roleName": "developer",
37
37
  "count": 1,
38
- "skills": ["self-evolution"]
38
+ "skills": ["self-evolution", "coding-tools"]
39
39
  },
40
40
  {
41
41
  "name": "Frontend Developer",
42
42
  "role": "worker",
43
43
  "roleName": "developer",
44
44
  "count": 1,
45
- "skills": ["chrome-devtools", "self-evolution"]
45
+ "skills": ["chrome-devtools", "self-evolution", "coding-tools"]
46
46
  },
47
47
  {
48
48
  "name": "Code Reviewer",
49
49
  "role": "worker",
50
50
  "roleName": "reviewer",
51
51
  "count": 1,
52
- "skills": ["self-evolution"]
52
+ "skills": ["self-evolution", "coding-tools"]
53
53
  },
54
54
  {
55
55
  "name": "QA Engineer",
56
56
  "role": "worker",
57
57
  "roleName": "qa-engineer",
58
58
  "count": 1,
59
- "skills": ["self-evolution"]
59
+ "skills": ["self-evolution", "coding-tools"]
60
60
  }
61
61
  ]
62
62
  }
@@ -76,3 +76,36 @@ Edit anything in the "Shared" column only after notifying the team via `agent_se
76
76
  - Frontend components must handle loading, error, and empty states.
77
77
  - Infra changes must be idempotent and rollback-safe.
78
78
  - Security-critical code (auth, permissions, data access) requires explicit review notes.
79
+
80
+ ## State Machine: Phase Transitions
81
+
82
+ ```
83
+ DESIGN ──[design brief approved]──> CONTRACT
84
+ CONTRACT ──[all contracts published]──> IMPLEMENT
85
+ IMPLEMENT ──[all subtasks done, tests pass]──> INTEGRATE
86
+ INTEGRATE ──[contracts verified]──> REVIEW
87
+ REVIEW ──[approved + merged]──> DEPLOY
88
+ DEPLOY ──[smoke tests pass]──> DONE
89
+
90
+ On failure at any phase:
91
+ IMPLEMENT ──[build fails]──> IMPLEMENT (fix and retry)
92
+ REVIEW ──[rejected]──> IMPLEMENT (address feedback)
93
+ DEPLOY ──[smoke fails]──> ROLLBACK ──> IMPLEMENT
94
+ ```
95
+
96
+ ## Integration Quality Gates
97
+
98
+ Before moving from IMPLEMENT to INTEGRATE:
99
+ - Each layer passes its own test suite independently
100
+ - API responses match published contract schemas
101
+ - No breaking changes to shared interfaces without team-wide notification
102
+ - Cross-layer error handling verified (what happens when Backend returns 500 to Frontend?)
103
+
104
+ ## Error Recovery Coordination
105
+
106
+ | Failure | Owner | Action |
107
+ |---------|-------|--------|
108
+ | Build failure in one layer | That layer's engineer | Fix and re-run; notify team if shared dependency |
109
+ | Contract violation | Architect | Mediate between layers; update contract if needed |
110
+ | Integration test failure | Architect + affected engineers | Identify which layer deviated; coordinate fix |
111
+ | Deployment failure | Infra Engineer | Rollback; create post-mortem task |
@@ -35,28 +35,28 @@
35
35
  "role": "worker",
36
36
  "roleName": "developer",
37
37
  "count": 1,
38
- "skills": ["self-evolution"]
38
+ "skills": ["self-evolution", "coding-tools"]
39
39
  },
40
40
  {
41
41
  "name": "Frontend Engineer",
42
42
  "role": "worker",
43
43
  "roleName": "developer",
44
44
  "count": 1,
45
- "skills": ["chrome-devtools", "self-evolution"]
45
+ "skills": ["chrome-devtools", "self-evolution", "coding-tools"]
46
46
  },
47
47
  {
48
48
  "name": "Infra Engineer",
49
49
  "role": "worker",
50
50
  "roleName": "devops",
51
51
  "count": 1,
52
- "skills": ["self-evolution"]
52
+ "skills": ["self-evolution", "coding-tools"]
53
53
  },
54
54
  {
55
55
  "name": "Senior Reviewer",
56
56
  "role": "worker",
57
57
  "roleName": "reviewer",
58
58
  "count": 1,
59
- "skills": ["self-evolution"]
59
+ "skills": ["self-evolution", "coding-tools"]
60
60
  }
61
61
  ]
62
62
  }
@@ -75,3 +75,18 @@
75
75
  - **建设性异议**:"我发现了与 X 矛盾的证据,因为..."而非"X 错了。"
76
76
  - **跟踪置信度**:使用显式级别(高/中/低),随证据变化更新。
77
77
  - 协调秘书确保关键沟通内容记录可追溯。
78
+
79
+ ## 质量门禁
80
+
81
+ | 阶段 | 质量要求 |
82
+ |------|---------|
83
+ | 框架 → 调研 | 研究问题精确、成功标准明确、假设可检验 |
84
+ | 调研 → 验证 | 每个发现有证据支持、置信度已标注、负证据已记录 |
85
+ | 验证 → 综合 | 所有交叉审查完成、分歧已解决或升级、质疑已回应 |
86
+ | 综合 → 交付 | 执行摘要完整、方法论透明、建议可操作 |
87
+
88
+ ## 错误恢复
89
+
90
+ - **研究方向错误**:及时止损,记录为"死胡同"发现(`memory_save` with tags: `["insight", "dead-end"]`),转向下一个假设。
91
+ - **来源冲突**:两个权威来源给出矛盾信息时,深入查证第三方来源,在报告中如实反映不确定性。
92
+ - **时间压力**:如果调研时间不足以完成所有角度,优先完成最高影响的调研线索,明确标注哪些角度未覆盖。
@@ -57,3 +57,20 @@ Adjust quality based on what you're building:
57
57
  - Save every experiment result via `memory_save` with `tags: ["experiment", "hypothesis"]`.
58
58
  - Document architecture decisions that constrain future work via `deliverable_create`.
59
59
  - Share customer insights with the whole team — everyone should know what users want.
60
+
61
+ ## Quality Calibration by Risk
62
+
63
+ | Category | Quality Level | Testing | Review |
64
+ |----------|--------------|---------|--------|
65
+ | Core product (revenue path) | High | Unit + integration tests required | Full review |
66
+ | Growth experiments | Medium | Happy path test, manual verification | Quick review |
67
+ | Internal tools | Medium | Basic tests, error handling | Self-review acceptable |
68
+ | One-off analysis | Low | Verify results make sense | No formal review |
69
+
70
+ Adjust quality investment based on what you're building. Over-engineering an experiment wastes time. Under-testing core product creates debt.
71
+
72
+ ## Error Recovery
73
+
74
+ - **Experiment fails**: Document what was tested and what was learned. Move on — don't fix failed experiments, learn from them.
75
+ - **Core product bug**: Fix immediately. Write regression test. Do post-mortem if user-facing.
76
+ - **Deployment issue**: Rollback first, investigate second. Never debug in production.
@@ -33,7 +33,7 @@
33
33
  "role": "worker",
34
34
  "roleName": "developer",
35
35
  "count": 2,
36
- "skills": ["chrome-devtools", "self-evolution"]
36
+ "skills": ["chrome-devtools", "self-evolution", "coding-tools"]
37
37
  },
38
38
  {
39
39
  "name": "Growth Lead",