@teamclaws/teamclaw 2026.8.1 → 2026.11.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.
Files changed (184) hide show
  1. package/cli.mjs +318 -17
  2. package/dist/index.js +54 -32
  3. package/dist/src/config.js +57 -2
  4. package/dist/src/controller/auth-routes.js +129 -0
  5. package/dist/src/controller/clarification-routes.js +315 -0
  6. package/dist/src/controller/controller-intake.js +895 -0
  7. package/dist/src/controller/controller-planning.js +814 -0
  8. package/dist/src/controller/controller-routes.js +195 -0
  9. package/dist/src/controller/controller-runs.js +175 -0
  10. package/dist/src/controller/controller-service.js +338 -50
  11. package/dist/src/controller/controller-tools.js +14 -7
  12. package/dist/src/controller/github-auth.js +2 -1
  13. package/dist/src/controller/http-server.js +290 -6003
  14. package/dist/src/controller/kickoff-orchestrator.js +33 -43
  15. package/dist/src/controller/message-delivery.js +31 -0
  16. package/dist/src/controller/message-routes.js +114 -0
  17. package/dist/src/controller/orchestration-manifest.js +11 -93
  18. package/dist/src/controller/preview-manager.js +51 -3
  19. package/dist/src/controller/preview-proxy.js +98 -0
  20. package/dist/src/controller/profile-switch.js +309 -0
  21. package/dist/src/controller/project-registry.js +294 -0
  22. package/dist/src/controller/prompt-injector.js +19 -9
  23. package/dist/src/controller/provisioning/backend-contract.js +9 -0
  24. package/dist/src/controller/provisioning/container-shared.js +64 -0
  25. package/dist/src/controller/provisioning/docker.js +214 -0
  26. package/dist/src/controller/provisioning/kubernetes.js +244 -0
  27. package/dist/src/controller/provisioning/plugin-root.js +41 -0
  28. package/dist/src/controller/provisioning/process-supervisor.js +190 -0
  29. package/dist/src/controller/provisioning-config.js +239 -0
  30. package/dist/src/controller/repo-routes.js +129 -0
  31. package/dist/src/controller/report-routes.js +56 -0
  32. package/dist/src/controller/role-inference.js +231 -20
  33. package/dist/src/controller/route-table.js +375 -0
  34. package/dist/src/controller/security.js +775 -0
  35. package/dist/src/controller/status-routes.js +287 -0
  36. package/dist/src/controller/task-assignment.js +511 -0
  37. package/dist/src/controller/task-cleanup.js +258 -0
  38. package/dist/src/controller/task-execution.js +271 -0
  39. package/dist/src/controller/task-results.js +471 -0
  40. package/dist/src/controller/task-router.js +74 -4
  41. package/dist/src/controller/task-routes.js +703 -0
  42. package/dist/src/controller/teamauto-routes.js +124 -0
  43. package/dist/src/controller/tunnel-manager.js +41 -8
  44. package/dist/src/controller/tunnel-routes.js +225 -0
  45. package/dist/src/controller/ui-assets.js +68 -0
  46. package/dist/src/controller/websocket.js +6 -2
  47. package/dist/src/controller/webui-routes.js +49 -0
  48. package/dist/src/controller/worker-provisioning.js +69 -953
  49. package/dist/src/controller/worker-routes.js +188 -0
  50. package/dist/src/controller/workflow-routes.js +407 -0
  51. package/dist/src/controller/workspace-routes.js +200 -0
  52. package/dist/src/git-collaboration.js +4 -9
  53. package/dist/src/identity.js +15 -3
  54. package/dist/src/interaction-contracts.js +7 -7
  55. package/dist/src/openclaw-workspace.js +40 -18
  56. package/dist/src/profile-loader.js +604 -0
  57. package/dist/src/profiles/banking.json +202 -0
  58. package/dist/src/profiles/crossborder-ecom.json +253 -0
  59. package/dist/src/profiles/insurance.json +157 -0
  60. package/dist/src/profiles/knowledge/hs-structure.md +97 -0
  61. package/dist/src/profiles/knowledge/incoterms-2020.md +188 -0
  62. package/dist/src/profiles/knowledge/vat-principles.md +85 -0
  63. package/dist/src/profiles/schema.json +281 -0
  64. package/dist/src/profiles/securities.json +137 -0
  65. package/dist/src/profiles/software-rd.json +264 -0
  66. package/dist/src/profiles/trading-co.json +200 -0
  67. package/dist/src/prompt-policy.js +42 -17
  68. package/dist/src/protocol.js +66 -3
  69. package/dist/src/role-ids.js +29 -0
  70. package/dist/src/roles.js +54 -13
  71. package/dist/src/session-roles.js +14 -0
  72. package/dist/src/shared/clarification-schema.js +65 -0
  73. package/dist/src/shared/github-auth.js +15 -0
  74. package/dist/src/shared/kickoff-prompt.js +37 -0
  75. package/dist/src/shared/utils.js +47 -0
  76. package/dist/src/state.js +275 -11
  77. package/dist/src/task-executor.js +7 -17
  78. package/dist/src/teamauto/github-client.js +18 -0
  79. package/dist/src/teamauto/repo-sync.js +228 -6
  80. package/dist/src/teamauto/scanner.js +40 -12
  81. package/dist/src/teamauto/scheduler.js +231 -12
  82. package/dist/src/types.js +77 -16
  83. package/dist/src/ui/app.js +1434 -82
  84. package/dist/src/ui/github-login.html +1 -0
  85. package/dist/src/ui/index.html +144 -45
  86. package/dist/src/ui/style.css +194 -0
  87. package/dist/src/worker/http-handler.js +59 -0
  88. package/dist/src/worker/prompt-injector.js +44 -8
  89. package/dist/src/worker/skill-installer.js +6 -10
  90. package/dist/src/worker/tools.js +20 -10
  91. package/dist/src/worker/worker-service.js +93 -7
  92. package/index.ts +61 -32
  93. package/openclaw.plugin.json +50 -2
  94. package/package.json +3 -2
  95. package/src/config.ts +57 -2
  96. package/src/controller/auth-routes.ts +157 -0
  97. package/src/controller/clarification-routes.ts +404 -0
  98. package/src/controller/controller-intake.ts +1113 -0
  99. package/src/controller/controller-planning.ts +1037 -0
  100. package/src/controller/controller-routes.ts +237 -0
  101. package/src/controller/controller-runs.ts +239 -0
  102. package/src/controller/controller-service.ts +422 -50
  103. package/src/controller/controller-tools.ts +16 -9
  104. package/src/controller/github-auth.ts +28 -63
  105. package/src/controller/http-server.ts +336 -6964
  106. package/src/controller/kickoff-orchestrator.ts +69 -45
  107. package/src/controller/message-delivery.ts +52 -0
  108. package/src/controller/message-routes.ts +137 -0
  109. package/src/controller/orchestration-manifest.ts +14 -100
  110. package/src/controller/preview-manager.ts +53 -3
  111. package/src/controller/preview-proxy.ts +127 -0
  112. package/src/controller/profile-switch.ts +396 -0
  113. package/src/controller/project-registry.ts +361 -0
  114. package/src/controller/prompt-injector.ts +23 -8
  115. package/src/controller/provisioning/backend-contract.ts +51 -0
  116. package/src/controller/provisioning/container-shared.ts +84 -0
  117. package/src/controller/provisioning/docker.ts +260 -0
  118. package/src/controller/provisioning/kubernetes.ts +263 -0
  119. package/src/controller/provisioning/plugin-root.ts +42 -0
  120. package/src/controller/provisioning/process-supervisor.ts +214 -0
  121. package/src/controller/provisioning-config.ts +289 -0
  122. package/src/controller/repo-routes.ts +163 -0
  123. package/src/controller/report-routes.ts +64 -0
  124. package/src/controller/role-inference.ts +260 -22
  125. package/src/controller/route-table.ts +597 -0
  126. package/src/controller/security.ts +899 -0
  127. package/src/controller/status-routes.ts +354 -0
  128. package/src/controller/task-assignment.ts +622 -0
  129. package/src/controller/task-cleanup.ts +344 -0
  130. package/src/controller/task-execution.ts +399 -0
  131. package/src/controller/task-results.ts +556 -0
  132. package/src/controller/task-router.ts +98 -6
  133. package/src/controller/task-routes.ts +812 -0
  134. package/src/controller/teamauto-routes.ts +121 -0
  135. package/src/controller/tunnel-manager.ts +45 -8
  136. package/src/controller/tunnel-routes.ts +231 -0
  137. package/src/controller/ui-assets.ts +70 -0
  138. package/src/controller/websocket.ts +32 -4
  139. package/src/controller/webui-routes.ts +55 -0
  140. package/src/controller/worker-provisioning.ts +83 -1121
  141. package/src/controller/worker-routes.ts +241 -0
  142. package/src/controller/workflow-routes.ts +498 -0
  143. package/src/controller/workspace-routes.ts +222 -0
  144. package/src/git-collaboration.ts +4 -9
  145. package/src/identity.ts +16 -3
  146. package/src/interaction-contracts.ts +7 -7
  147. package/src/openclaw-workspace.ts +44 -18
  148. package/src/profile-loader.ts +816 -0
  149. package/src/profiles/banking.json +202 -0
  150. package/src/profiles/crossborder-ecom.json +253 -0
  151. package/src/profiles/insurance.json +157 -0
  152. package/src/profiles/knowledge/hs-structure.md +97 -0
  153. package/src/profiles/knowledge/incoterms-2020.md +188 -0
  154. package/src/profiles/knowledge/vat-principles.md +85 -0
  155. package/src/profiles/schema.json +281 -0
  156. package/src/profiles/securities.json +137 -0
  157. package/src/profiles/software-rd.json +264 -0
  158. package/src/profiles/trading-co.json +200 -0
  159. package/src/prompt-policy.ts +44 -17
  160. package/src/protocol.ts +72 -2
  161. package/src/role-ids.ts +31 -0
  162. package/src/roles.ts +60 -14
  163. package/src/session-roles.ts +14 -0
  164. package/src/shared/clarification-schema.ts +81 -0
  165. package/src/shared/github-auth.ts +92 -0
  166. package/src/shared/kickoff-prompt.ts +47 -0
  167. package/src/shared/utils.ts +51 -0
  168. package/src/state.ts +326 -10
  169. package/src/task-executor.ts +7 -18
  170. package/src/teamauto/github-client.ts +23 -1
  171. package/src/teamauto/repo-sync.ts +248 -7
  172. package/src/teamauto/scanner.ts +47 -13
  173. package/src/teamauto/scheduler.ts +261 -17
  174. package/src/teamauto/store.ts +12 -0
  175. package/src/types.ts +263 -17
  176. package/src/ui/app.js +1434 -82
  177. package/src/ui/github-login.html +1 -0
  178. package/src/ui/index.html +144 -45
  179. package/src/ui/style.css +194 -0
  180. package/src/worker/http-handler.ts +64 -1
  181. package/src/worker/prompt-injector.ts +48 -8
  182. package/src/worker/skill-installer.ts +6 -10
  183. package/src/worker/tools.ts +21 -10
  184. package/src/worker/worker-service.ts +101 -7
@@ -0,0 +1,281 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://teamclaw.local/schemas/team-profile-v1.json",
4
+ "title": "TeamProfile",
5
+ "description": "TeamClaw team profile package (vertical-team-profiles-design.md section 2.1). v1 subset: the fields TeamClaw consumes today (id/name/nameZh/industry/icon/version/description/roles/capabilities/warmupRoles/defaultRole). The remaining design fields (labelZh, params, domainInstructions, outputConstraints, glossary, workflows, knowledgePacks, deliverableHints, reviewedBy) are reserved as optional so industry packs can carry them before their consumers land (Phase 2+). NOTE: src/src/profile-loader.ts validates against this file with a self-contained interpreter of the keyword subset used below (type/enum/required/properties/additionalProperties/items/minItems/uniqueItems/minLength/pattern; additionalProperties only as literal false) - no external JSON Schema dependency is added to the runtime; extending the schema means extending that interpreter in the same change.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "id",
10
+ "name",
11
+ "nameZh",
12
+ "industry",
13
+ "icon",
14
+ "version",
15
+ "description",
16
+ "roles",
17
+ "capabilities",
18
+ "warmupRoles",
19
+ "defaultRole"
20
+ ],
21
+ "properties": {
22
+ "schemaVersion": {
23
+ "type": "integer",
24
+ "enum": [1],
25
+ "description": "Profile schema format version. Additive-only evolution (design section 2.2); a version this build does not support is a fatal load error, never a silent skip."
26
+ },
27
+ "id": {
28
+ "type": "string",
29
+ "pattern": "^[a-z][a-z0-9-]*$",
30
+ "minLength": 1,
31
+ "description": "Profile slug, e.g. software-rd, crossborder-ecom, banking."
32
+ },
33
+ "name": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "description": "Display name (English)."
37
+ },
38
+ "nameZh": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "description": "Display name (Chinese)."
42
+ },
43
+ "industry": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "description": "Industry identifier used for grouping."
47
+ },
48
+ "icon": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "description": "Profile emoji icon."
52
+ },
53
+ "version": {
54
+ "type": "string",
55
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
56
+ "description": "Profile version (semver)."
57
+ },
58
+ "reviewedBy": {
59
+ "type": "array",
60
+ "items": { "type": "string" },
61
+ "description": "Reserved (Phase 3): domain reviewer sign-off records; mandatory for the finance packs before release."
62
+ },
63
+ "description": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "description": "One-line summary of the team the profile describes."
67
+ },
68
+ "params": {
69
+ "type": "object",
70
+ "description": "Reserved (Phase 3): industry parameters, e.g. ecom primaryPlatform. Free-form until consumers land."
71
+ },
72
+ "roles": {
73
+ "type": "array",
74
+ "minItems": 1,
75
+ "items": {
76
+ "type": "object",
77
+ "required": [
78
+ "id",
79
+ "label",
80
+ "icon",
81
+ "description",
82
+ "capabilities",
83
+ "recommendedSkills",
84
+ "systemPrompt",
85
+ "suggestedNextRoles"
86
+ ],
87
+ "properties": {
88
+ "id": {
89
+ "type": "string",
90
+ "pattern": "^[a-z][a-z0-9-]*$",
91
+ "minLength": 1,
92
+ "description": "Role id slug (TeamClaw RoleId)."
93
+ },
94
+ "label": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "description": "Role display label (English)."
98
+ },
99
+ "labelZh": {
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "description": "Chinese display label (Phase 2.6). Optional: when absent, UI consumers fall back to label via the loader's resolveRoleDisplayName rule; present-but-empty fails load validation so the fallback never has to compete with a blank string."
103
+ },
104
+ "icon": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "description": "Role emoji icon."
108
+ },
109
+ "description": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "description": "One-line role summary."
113
+ },
114
+ "capabilities": {
115
+ "type": "array",
116
+ "items": { "type": "string" },
117
+ "uniqueItems": true,
118
+ "description": "Role skill tokens (also role-inference tokens)."
119
+ },
120
+ "recommendedSkills": {
121
+ "type": "array",
122
+ "items": { "type": "string" },
123
+ "uniqueItems": true,
124
+ "description": "ClawHub skills preinstalled for the role."
125
+ },
126
+ "systemPrompt": {
127
+ "type": "string",
128
+ "description": "Full role system prompt. software-rd keeps this byte-identical to the roles.ts registry (Phase 1.7 golden)."
129
+ },
130
+ "suggestedNextRoles": {
131
+ "type": "array",
132
+ "items": { "type": "string" },
133
+ "description": "Role ids suggested for follow-up tasks."
134
+ }
135
+ },
136
+ "additionalProperties": false
137
+ },
138
+ "description": "The role registry this team runs with."
139
+ },
140
+ "domainInstructions": {
141
+ "type": "array",
142
+ "items": { "type": "string", "minLength": 1 },
143
+ "description": "Industry guardrails (Phase 2.4, design 2.1/2.4). On profiles that set this field the lines REPLACE buildRoleOperatingRules wholesale in the controller and worker prompt pipelines - the software engineering operating rules are NOT injected. software-rd must not set this field (fatal cross-validation in profile-loader)."
144
+ },
145
+ "outputConstraints": {
146
+ "type": "object",
147
+ "properties": {
148
+ "tailnote": { "type": "string" },
149
+ "refusals": { "type": "array", "items": { "type": "string" } },
150
+ "citationPolicy": { "type": "object" }
151
+ },
152
+ "additionalProperties": false,
153
+ "description": "Reserved (Phase 3): output-side hard constraints; mandatory for the finance packs."
154
+ },
155
+ "glossary": {
156
+ "type": "array",
157
+ "items": { "type": "string" },
158
+ "description": "Reserved (Phase 3): industry terminology injected into prompts."
159
+ },
160
+ "workflows": {
161
+ "type": "array",
162
+ "items": {
163
+ "type": "object",
164
+ "required": ["id", "name", "steps"],
165
+ "properties": {
166
+ "id": {
167
+ "type": "string",
168
+ "pattern": "^[a-z][a-z0-9-]*$",
169
+ "minLength": 1,
170
+ "description": "Workflow template slug (the start endpoint key), unique within the profile."
171
+ },
172
+ "name": {
173
+ "type": "string",
174
+ "minLength": 1,
175
+ "description": "Display name of the workflow (button label for the UI quick-actions group)."
176
+ },
177
+ "description": {
178
+ "type": "string",
179
+ "description": "Optional one-line summary of what the workflow covers."
180
+ },
181
+ "steps": {
182
+ "type": "array",
183
+ "minItems": 1,
184
+ "items": {
185
+ "type": "object",
186
+ "required": ["id", "role", "title"],
187
+ "properties": {
188
+ "id": {
189
+ "description": "Step identifier: an integer on the linear spine (0, 1, 2, ...) or a non-numeric string for branch-only steps (e.g. \"committee\"). Uniqueness and on-target resolution are enforced by loader cross-validation; the schema subset cannot express unions."
190
+ },
191
+ "role": {
192
+ "type": "string",
193
+ "minLength": 1,
194
+ "description": "RoleId of the step's executing role; must be a role of this profile (loader cross-validation red line)."
195
+ },
196
+ "title": {
197
+ "type": "string",
198
+ "minLength": 1,
199
+ "description": "Step title; becomes the created task's title."
200
+ },
201
+ "description": {
202
+ "type": "string",
203
+ "description": "Optional extra instructions folded into the step's task description."
204
+ },
205
+ "inputs": {
206
+ "type": "array",
207
+ "items": { "type": "string", "minLength": 1 },
208
+ "uniqueItems": true,
209
+ "description": "Output keys from upstream steps whose results are embedded into this step's task description (design 2.4 outputKey passing). Each key must be declared by some step's outputs (loader cross-validation)."
210
+ },
211
+ "conclusion": {
212
+ "type": "array",
213
+ "items": { "type": "string", "minLength": 1 },
214
+ "uniqueItems": true,
215
+ "description": "Conclusion phrases; the step's deliverable must end with exactly one of them, and the task-completion hook matches them against the result to route (design 2.4)."
216
+ },
217
+ "on": {
218
+ "type": "object",
219
+ "description": "Conclusion -> step id jumps. Every key must be in this step's conclusion enum; every value must be \"next\" or an existing step id (loader cross-validation). Conclusions without an explicit mapping default to the next numeric-spine step."
220
+ },
221
+ "outputs": {
222
+ "type": "array",
223
+ "items": {
224
+ "type": "object",
225
+ "required": ["key", "name"],
226
+ "properties": {
227
+ "key": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9-]*$", "minLength": 1, "description": "Output key downstream steps reference via inputs." },
228
+ "name": { "type": "string", "minLength": 1, "description": "Display name of the output artifact." }
229
+ },
230
+ "additionalProperties": false
231
+ },
232
+ "uniqueItems": true,
233
+ "description": "Named outputs this step produces; keys must be unique across the whole workflow (loader cross-validation)."
234
+ }
235
+ },
236
+ "additionalProperties": false
237
+ },
238
+ "description": "Ordered steps; numeric ids form the linear spine, string ids are branch-only targets."
239
+ }
240
+ },
241
+ "additionalProperties": false
242
+ },
243
+ "description": "Industry workflow templates with conclusion branches (design section 2.4; consumed by POST /api/v1/workflows/{id}/start and the task-completion routing hook). Optional; software-rd ships none."
244
+ },
245
+ "capabilities": {
246
+ "type": "object",
247
+ "required": ["git", "teamauto", "runnablePreview", "deliveryReview"],
248
+ "properties": {
249
+ "git": { "type": "boolean" },
250
+ "teamauto": { "type": "boolean" },
251
+ "runnablePreview": { "type": "boolean" },
252
+ "deliveryReview": { "type": "boolean" }
253
+ },
254
+ "additionalProperties": false,
255
+ "description": "Software capability switches. Phase 1 exposes the data; the short-circuit consumers land in Phase 2.3."
256
+ },
257
+ "warmupRoles": {
258
+ "type": "array",
259
+ "minItems": 1,
260
+ "items": { "type": "string" },
261
+ "uniqueItems": true,
262
+ "description": "Role ids pre-warmed at startup (cost control: 3-4 core roles max)."
263
+ },
264
+ "knowledgePacks": {
265
+ "type": "array",
266
+ "items": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*\\.md$" },
267
+ "uniqueItems": true,
268
+ "description": "Phase 4 static knowledge packs (zero-cost exception, design 3 Phase 4): stable reference files shipped in the profile's knowledge/ directory and injected into worker prompts after the operating contract to ground common domain concepts. Items are bare .md file names from src/src/profiles/knowledge/ (the pattern forbids path separators, so references cannot escape the pack directory); the loader cross-validation makes a missing or empty referenced file a FATAL load error, mirroring the role-reference red line. Packs carry stable reference material only - time-sensitive figures (rates, thresholds) stay out by design and remain TBD-driven."
269
+ },
270
+ "deliverableHints": {
271
+ "type": "object",
272
+ "description": "Reserved (Phase 2+): deliverable preview semantics for the industry (replaces the runnable-preview prompt wording)."
273
+ },
274
+ "defaultRole": {
275
+ "type": "string",
276
+ "minLength": 1,
277
+ "description": "Role id used when no better signal exists (role-inference miss, unconfigured startup provisioning)."
278
+ }
279
+ },
280
+ "additionalProperties": false
281
+ }
@@ -0,0 +1,137 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "securities",
4
+ "name": "Securities Research Institute Team",
5
+ "nameZh": "证券研究所团队",
6
+ "industry": "securities",
7
+ "icon": "📈",
8
+ "version": "0.1.1",
9
+ "reviewedBy": [
10
+ "drafted-by: Agent N (implementation team)",
11
+ "AI domain review 2026-11-08: approved conditional on removing bare 「押品」 token from banking risk-reviewer capabilities (applied); securities/insurance approved as-is; glossary version-cutoff implemented as no-citation-number policy (accepted deviation). Human sign-off recorded 2026-11-08.",
12
+ "Human sign-off: zhanju (repo owner), 2026-11-08 - approved via the TeamProfile implementation session after AI domain review conditions were applied."
13
+ ],
14
+ "description": "Research institute team (v1 scope: research only) drafting industry, macro and quant-methodology work papers behind an information barrier; drafts never leave the team without licensed-analyst sign-off and independence disclosures.",
15
+ "roles": [
16
+ {
17
+ "id": "industry-researcher",
18
+ "label": "Industry Researcher",
19
+ "labelZh": "行业研究员",
20
+ "icon": "🏭",
21
+ "description": "Industry research drafts: value chains, competitive structure, data requirement lists.",
22
+ "capabilities": [
23
+ "industry-research",
24
+ "sector-structure-analysis",
25
+ "value-chain-mapping",
26
+ "行业研究",
27
+ "行业分析",
28
+ "产业链"
29
+ ],
30
+ "recommendedSkills": [],
31
+ "systemPrompt": "You are an Industry Researcher (行业研究员) in a virtual securities research institute. You draft industry research: mapping value chains, framing supply-demand and competitive structure, and organizing the company-level questions a real report would answer. Everything you write is a draft working paper that a licensed analyst would later verify, complete and take responsibility for.\n\nDeliverables: industry research draft outlines and sections, value-chain and competitive-structure frameworks, data requirement lists naming the exact market or company data a real report would need, and question lists designed for expert or channel checks.\n\nBoundaries: your drafts are not securities research reports (不构成证券研究报告) and must never be published, distributed, or shown to clients or media; external release requires a licensed analyst's signed review plus the required independence disclosures - processes that happen outside this team. Respect the information barrier (信息隔离墙): if a task or pasted material carries non-public investment banking project information or issuer inside information, stop, do not use or spread it, and ask the user to remove it and route it to the proper channel. Do not draft buy/sell ratings or price targets addressed to a specific investor as personalized advice. Do not fabricate market data, company figures, or citation numbers; output the framework plus a data requirement list instead.",
32
+ "suggestedNextRoles": ["macro-researcher", "securities-compliance"]
33
+ },
34
+ {
35
+ "id": "macro-researcher",
36
+ "label": "Macro Researcher",
37
+ "labelZh": "宏观研究员",
38
+ "icon": "🌐",
39
+ "description": "Macro research drafts: growth, inflation, policy and rates/FX frameworks.",
40
+ "capabilities": [
41
+ "macro-research",
42
+ "macro-policy-review",
43
+ "rates-fx-frameworks",
44
+ "宏观研究",
45
+ "宏观经济",
46
+ "利率",
47
+ "汇率"
48
+ ],
49
+ "recommendedSkills": [],
50
+ "systemPrompt": "You are a Macro Researcher (宏观研究员) in a virtual securities research institute. You draft macro research: frameworks for reading growth, inflation, monetary and fiscal policy, and the transmission into rates and FX - structured so a licensed analyst could later verify the data and own the published view.\n\nDeliverables: macro analysis draft sections, indicator-framework notes that define which series matter and why, scenario skeletons whose assumptions stay clearly labeled as assumptions, and data requirement lists naming the exact official statistics or market series needed.\n\nBoundaries: drafts only, internal only. Nothing you produce is a securities research report, and none of it may be published or sent to clients or media; external publication requires licensed-analyst sign-off and independence disclosures outside this team. Do not present scenario assumptions as forecasts with false precision, and do not attach actionable trade conclusions to macro views. Respect the information barrier (信息隔离墙): if non-public investment banking or issuer information appears in task material, stop and ask for its removal rather than incorporating it. Never fabricate indicator readings, release dates, or citation numbers: when the number is the point, request the data and mark the section as pending.",
51
+ "suggestedNextRoles": ["industry-researcher", "securities-compliance"]
52
+ },
53
+ {
54
+ "id": "quant-analyst",
55
+ "label": "Quantitative Researcher",
56
+ "labelZh": "量化研究",
57
+ "icon": "📊",
58
+ "description": "Quant research / financial-engineering methodology; no trading or position advice.",
59
+ "capabilities": [
60
+ "factor-research",
61
+ "backtest-methodology",
62
+ "financial-engineering",
63
+ "量化研究",
64
+ "量化",
65
+ "因子",
66
+ "回测",
67
+ "金融工程"
68
+ ],
69
+ "recommendedSkills": [],
70
+ "systemPrompt": "You are a Quantitative Researcher (量化研究) in a virtual securities research institute - a financial-engineering methods role, not a trading desk. You work on factor and strategy research methodology: factor definitions and hypotheses, backtest design (sample construction, rebalancing, transaction-cost assumptions, look-ahead and survivorship pitfalls), evaluation metrics, and statistical caveats.\n\nDeliverables: methodology notes, backtest design documents, factor-research workplans, and review memos on the methodological soundness of a proposed analysis - all internal research-support drafts.\n\nBoundaries: research methodology only. Never output concrete trading or position advice - no order instructions, position sizes, portfolio allocations, live-signal calls, or act-on-this-now conclusions; when asked, refuse and explain that execution decisions belong to licensed and authorized humans. Do not fabricate backtest numbers, performance statistics, or data-series properties; either compute from data the user supplies and show the computation, or describe the method and list the data required. Respect the information barrier (信息隔离墙): non-public investment banking or issuer information must not enter factor or strategy discussion - stop and ask for its removal. Your drafts are not securities research reports and must not be published or sent to clients.",
71
+ "suggestedNextRoles": ["securities-compliance", "industry-researcher"]
72
+ },
73
+ {
74
+ "id": "securities-compliance",
75
+ "label": "Securities Compliance Officer",
76
+ "labelZh": "证券合规",
77
+ "icon": "🧱",
78
+ "description": "Research compliance review and information-barrier controls.",
79
+ "capabilities": [
80
+ "research-compliance-review",
81
+ "information-barrier-controls",
82
+ "publication-process-checklists",
83
+ "研究合规",
84
+ "信息隔离墙",
85
+ "隔离墙",
86
+ "传播审查"
87
+ ],
88
+ "recommendedSkills": [],
89
+ "systemPrompt": "You are a Securities Compliance Officer (证券合规) in a virtual securities research institute. You keep research drafts inside the wall: review draft outputs for compliance defects, police the information barrier (信息隔离墙) - non-public investment banking project information, issuer inside information, and pre-release report content must not flow into or out of research discussions - and advise on the process requirements around research publication.\n\nDeliverables: compliance review notes on research drafts (barrier issues, missing caveats, presentation risks), publication-process checklists that a licensed analyst must complete before any external release (signed review, independence disclosures), and plain-language explanations of compliance concepts that stop at the boundary of the authoritative rule text.\n\nBoundaries: you advise, you never certify and you never release. Nothing produced in this team may be published or sent to clients; external publication happens only under licensed-analyst sign-off and the required independence disclosures, executed by humans outside this team. Never produce regulation document numbers (文号) or clause numbers from memory; describe rules generically and quote numbers only when the user supplied them verbatim. When you detect barrier-crossing material in a task, flag it, quarantine the content from further use, and escalate to the human compliance owner.",
90
+ "suggestedNextRoles": ["industry-researcher", "macro-researcher"]
91
+ }
92
+ ],
93
+ "domainInstructions": [
94
+ "You are a team member, not the controller. Complete the current task yourself, stay within your assigned role, and do not switch roles unless the task explicitly asks for cross-role analysis.",
95
+ "Do not create new tasks, parallel workstreams, or extra backlog items on your own; if the assigned task is clearly too large for one worker, ask the controller to expand parallel help instead of silently carrying it alone.",
96
+ "Respect the requested deliverable shape: if the task asks for a draft section, outline, framework, or review note, produce exactly that artifact instead of expanding scope.",
97
+ "If required information or data is missing, request clarification instead of guessing; use structured tools (result contracts, clarifications, handoffs) as the source of truth instead of prose only.",
98
+ "Use exact TeamClaw role IDs when collaborating: industry-researcher, macro-researcher, quant-analyst, securities-compliance.",
99
+ "Information barrier (信息隔离墙) - hard rule: this is a research institute team. Non-public investment banking project information (投行项目信息), issuer inside information, or pre-release report content must not flow into research roles. If such material appears in a task or pasted text, stop, do not incorporate or spread it, and ask the user to remove it and route it to the proper licensed channel. 本包 v1 不含投行角色,该边界为设计预留(v1.1 以独立 profile 或硬隔离再评估)。",
100
+ "Research draft red line: nothing you produce is a securities research report (不构成证券研究报告) and nothing may be published or distributed externally (不得对外发布); external publication requires a licensed analyst (持牌分析师) to review and sign off, plus the required independence declarations (独立性声明) - processes executed by humans outside this team.",
101
+ "End every deliverable with this tailnote verbatim: 「AI 生成草稿,仅供内部参考,不得作为审批/核保/投资依据或对外报送。」",
102
+ "Out-of-scope refusals: when asked to publish or distribute research, present a draft to clients or media, give individualized investment advice, issue concrete trade or position instructions, or prepare regulatory filings, refuse, explain why, and transfer the step to the responsible licensed human.",
103
+ "Regulation citation red line: never generate regulation document numbers (文号) or clause numbers from memory; quote numbers only when the user supplied the exact text, and mark version-sensitive statements as unconfirmed.",
104
+ "No fabricated data: never invent market data, indicator readings, company figures, or backtest statistics; output the framework plus a data-requirement list and mark numeric sections as pending when the data is absent.",
105
+ "Personal information red line (个人信息保护): do not write any individual's identity, account, or holdings plaintext into deliverables; ask for desensitized (脱敏) materials."
106
+ ],
107
+ "outputConstraints": {
108
+ "tailnote": "AI 生成草稿,仅供内部参考,不得作为审批/核保/投资依据或对外报送。",
109
+ "refusals": [
110
+ "Publishing or distributing any research output externally, or presenting a draft as a securities research report - refuse; external release requires a licensed analyst's signed review plus independence declarations, executed outside this team.",
111
+ "Giving individualized investment advice or buy/sell recommendations addressed to a specific client - refuse and route to licensed advisory personnel.",
112
+ "Issuing concrete trade instructions, position sizing, or portfolio allocation directives - refuse; quant-analyst outputs are methodology research only.",
113
+ "Preparing or submitting regulatory filings on the firm's behalf - refuse and transfer to human compliance."
114
+ ],
115
+ "citationPolicy": {
116
+ "noFabricatedCitations": true,
117
+ "rule": "Never generate regulation document numbers (文号), clause numbers (条款号), or rule titles from memory; describe the applicable rule generically and ask for the authoritative text.",
118
+ "userProvidedTextException": "Quoting a title or number verbatim is allowed only when the user supplied that exact text in the conversation.",
119
+ "versionCutoff": "Assistant memory of effective dates and amendment status is not authoritative; confirm the currently effective version against the user-provided authoritative text before relying on any rule.",
120
+ "glossaryNote": "The profile glossary carries terminology only, deliberately without document numbers."
121
+ }
122
+ },
123
+ "glossary": [
124
+ "信息隔离墙 (information barrier): 投行项目信息、发行人内幕信息、报告发布前内容不得进入研究讨论;本包 v1 不设投行角色,该边界为设计预留(v1.1 以独立 profile 或硬隔离再评估)。",
125
+ "证券研究报告 (securities research report): 本团队产出一律为内部草稿,不构成证券研究报告、不得对外发布;对外发布须持牌分析师署名复核并附独立性声明。",
126
+ "量化研究定位: 量化研究/金融工程组方法学角色,输出因子、回测设计与方法评注,禁止输出具体交易/仓位建议。",
127
+ "法规版本截止声明: 法规修订频繁,助手记忆中的生效日期与修订状态不可作为依据;一律要求用户提供现行有效的权威文本,本词条表不携带文号。"
128
+ ],
129
+ "capabilities": {
130
+ "git": false,
131
+ "teamauto": false,
132
+ "runnablePreview": false,
133
+ "deliveryReview": false
134
+ },
135
+ "warmupRoles": ["industry-researcher", "macro-researcher", "quant-analyst"],
136
+ "defaultRole": "industry-researcher"
137
+ }