@tencent-rtc/trtc-agent-skills 0.1.3 → 0.1.4

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 (360) hide show
  1. package/.cursor/rules/main.mdc +12 -0
  2. package/AGENTS.md +14 -104
  3. package/CLAUDE.md +15 -127
  4. package/CODEBUDDY.md +32 -118
  5. package/README.md +7 -5
  6. package/README.zh.md +7 -5
  7. package/bin/cli.js +133 -41
  8. package/hooks/__pycache__/cursor-adapter.cpython-313.pyc +0 -0
  9. package/hooks/cursor-adapter.py +45 -18
  10. package/hooks/hooks-cursor.json +5 -18
  11. package/hooks/hooks.json +6 -31
  12. package/knowledge-base/conference/web/index.yaml +143 -0
  13. package/knowledge-base/platform-slice-template.md +1041 -133
  14. package/knowledge-base/products.yaml +76 -0
  15. package/knowledge-base/scenario-spec.md +1316 -115
  16. package/knowledge-base/scenarios/conference/base/general-conference.md +22 -2
  17. package/knowledge-base/scenarios/conference/base/webinar-conference.md +14 -0
  18. package/knowledge-base/scenarios/conference/medical/1v1-video-consultation.md +19 -0
  19. package/knowledge-base/scenarios/conference/medical/medical-multidoctor-consultation.md +13 -0
  20. package/knowledge-base/scenarios/live/entertainment-live-room.md +12 -0
  21. package/knowledge-base/slice-spec.md +2377 -299
  22. package/knowledge-base/slices/conference/web/integration-audit.md +1 -1
  23. package/knowledge-base/slices/conference/web/login-auth.md +14 -1
  24. package/knowledge-base/tooling/aliases.yaml +92 -0
  25. package/knowledge-base/tooling/intent-signals.yaml +181 -0
  26. package/knowledge-base/tooling/symptom-keywords.yaml +21 -0
  27. package/package.json +1 -1
  28. package/skills/trtc/SKILL.md +202 -245
  29. package/skills/trtc/hooks/__pycache__/report_prompt.cpython-313.pyc +0 -0
  30. package/skills/{trtc-topic/guardrails → trtc/hooks}/gate_slice_read.py +12 -8
  31. package/skills/{trtc-topic/guardrails → trtc/hooks}/gate_slice_write.py +16 -12
  32. package/skills/{trtc-topic/guardrails → trtc/hooks}/stop_require_apply_evidence.py +22 -14
  33. package/skills/trtc/hooks/topic_phase_gate.py +161 -0
  34. package/skills/{trtc-topic → trtc}/runtime/README.md +2 -2
  35. package/skills/{trtc-onboarding/reference/reporting-protocol.md → trtc/runtime/REPORTING.md} +5 -5
  36. package/skills/{trtc-topic → trtc}/runtime/RUNTIME.md +5 -5
  37. package/skills/trtc/runtime/lib/__init__.py +0 -0
  38. package/skills/{trtc-topic → trtc}/runtime/package-lock.json +2 -2
  39. package/skills/{trtc-topic → trtc}/runtime/package.json +2 -2
  40. package/skills/{trtc-topic → trtc}/runtime/telemetry-bridge.mjs +1 -1
  41. package/skills/{trtc-topic/scripts → trtc/tools}/STATE-MACHINE-GUIDE.md +23 -23
  42. package/skills/trtc/tools/__init__.py +2 -0
  43. package/skills/trtc/tools/__pycache__/__init__.cpython-313.pyc +0 -0
  44. package/skills/trtc/tools/__pycache__/query_classifier.cpython-313.pyc +0 -0
  45. package/skills/trtc/tools/__pycache__/reporting.cpython-313.pyc +0 -0
  46. package/skills/trtc/tools/__pycache__/search.cpython-313.pyc +0 -0
  47. package/skills/trtc/tools/__pycache__/session.cpython-313.pyc +0 -0
  48. package/skills/trtc/tools/apply.py +540 -0
  49. package/skills/trtc/tools/docs.py +712 -0
  50. package/skills/trtc/tools/docsbot.py +182 -0
  51. package/skills/trtc/tools/entry/render_ai_instructions.py +92 -0
  52. package/skills/trtc/tools/flow.py +1089 -0
  53. package/skills/{trtc-topic/scripts → trtc/tools}/init_slice_queue.py +5 -4
  54. package/skills/{trtc-topic/scripts → trtc/tools}/next_slice.py +5 -4
  55. package/skills/trtc/tools/query_classifier.py +301 -0
  56. package/skills/trtc/tools/reporting.py +447 -0
  57. package/skills/trtc/tools/search.py +817 -0
  58. package/skills/trtc/tools/session.py +1261 -0
  59. package/skills/trtc/tools/state_machine.py +690 -0
  60. package/skills/trtc-ai-service/README.md +195 -0
  61. package/skills/trtc-ai-service/README.zh-CN.md +193 -0
  62. package/skills/trtc-ai-service/SKILL.md +945 -0
  63. package/skills/trtc-ai-service/auto_adapters/README.md +40 -0
  64. package/skills/trtc-ai-service/auto_adapters/frontend-spa/README.md +27 -0
  65. package/skills/trtc-ai-service/auto_adapters/frontend-spa/angular/voice-agent.component.ts.tpl +131 -0
  66. package/skills/trtc-ai-service/auto_adapters/frontend-spa/manifest.yaml +57 -0
  67. package/skills/trtc-ai-service/auto_adapters/frontend-spa/react/VoiceAgent.tsx.tpl +142 -0
  68. package/skills/trtc-ai-service/auto_adapters/frontend-spa/vue/VoiceAgent.vue.tpl +121 -0
  69. package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-backend.md +45 -0
  70. package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-frontend.md +51 -0
  71. package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-rest-api.md +93 -0
  72. package/skills/trtc-ai-service/auto_adapters/java-backend/README.md +25 -0
  73. package/skills/trtc-ai-service/auto_adapters/java-backend/manifest.yaml +30 -0
  74. package/skills/trtc-ai-service/auto_adapters/java-backend/quarkus/VoiceAgentFilter.java.tpl +64 -0
  75. package/skills/trtc-ai-service/auto_adapters/java-backend/springboot/VoiceAgentFilter.java.tpl +91 -0
  76. package/skills/trtc-ai-service/auto_adapters/manifest.yaml +43 -0
  77. package/skills/trtc-ai-service/auto_adapters/node-backend/README.md +25 -0
  78. package/skills/trtc-ai-service/auto_adapters/node-backend/express.js.tpl +40 -0
  79. package/skills/trtc-ai-service/auto_adapters/node-backend/fastify.js.tpl +27 -0
  80. package/skills/trtc-ai-service/auto_adapters/node-backend/koa.js.tpl +31 -0
  81. package/skills/trtc-ai-service/auto_adapters/node-backend/manifest.yaml +47 -0
  82. package/skills/trtc-ai-service/auto_adapters/python-backend/README.md +22 -0
  83. package/skills/trtc-ai-service/auto_adapters/python-backend/django.py.tpl +32 -0
  84. package/skills/trtc-ai-service/auto_adapters/python-backend/fastapi.py.tpl +35 -0
  85. package/skills/trtc-ai-service/auto_adapters/python-backend/flask.py.tpl +31 -0
  86. package/skills/trtc-ai-service/auto_adapters/python-backend/manifest.yaml +45 -0
  87. package/skills/trtc-ai-service/capabilities/__init__.py +43 -0
  88. package/skills/trtc-ai-service/capabilities/conversation-core/.env.example +29 -0
  89. package/skills/trtc-ai-service/capabilities/conversation-core/INTEGRATION.md +134 -0
  90. package/skills/trtc-ai-service/capabilities/conversation-core/INTERFACE_ADAPT.md +111 -0
  91. package/skills/trtc-ai-service/capabilities/conversation-core/QUICK_START.md +62 -0
  92. package/skills/trtc-ai-service/capabilities/conversation-core/manifest.yaml +250 -0
  93. package/skills/trtc-ai-service/capabilities/conversation-core/requirements.txt +6 -0
  94. package/skills/trtc-ai-service/capabilities/conversation-core/src/__init__.py +10 -0
  95. package/skills/trtc-ai-service/capabilities/conversation-core/src/_capability_loader.py +218 -0
  96. package/skills/trtc-ai-service/capabilities/conversation-core/src/agent.py +231 -0
  97. package/skills/trtc-ai-service/capabilities/conversation-core/src/credentials.py +132 -0
  98. package/skills/trtc-ai-service/capabilities/conversation-core/src/health.py +355 -0
  99. package/skills/trtc-ai-service/capabilities/conversation-core/src/log_filter.py +76 -0
  100. package/skills/trtc-ai-service/capabilities/conversation-core/src/modality.py +109 -0
  101. package/skills/trtc-ai-service/capabilities/conversation-core/src/server.py +312 -0
  102. package/skills/trtc-ai-service/capabilities/conversation-core/src/trtc_client.py +315 -0
  103. package/skills/trtc-ai-service/capabilities/conversation-core/src/usersig.py +90 -0
  104. package/skills/trtc-ai-service/capabilities/conversation-core/tests/test_skeleton.py +216 -0
  105. package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/README.md +48 -0
  106. package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/app.js +415 -0
  107. package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/index.html +68 -0
  108. package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/styles.css +136 -0
  109. package/skills/trtc-ai-service/capabilities/digital-human/README.md +31 -0
  110. package/skills/trtc-ai-service/capabilities/digital-human/manifest.yaml +64 -0
  111. package/skills/trtc-ai-service/capabilities/digital-human/src/__init__.py +2 -0
  112. package/skills/trtc-ai-service/capabilities/digital-human/src/router.py +43 -0
  113. package/skills/trtc-ai-service/capabilities/human-handoff/INTERFACE_ADAPT.md +353 -0
  114. package/skills/trtc-ai-service/capabilities/human-handoff/README.md +44 -0
  115. package/skills/trtc-ai-service/capabilities/human-handoff/manifest.yaml +227 -0
  116. package/skills/trtc-ai-service/capabilities/human-handoff/src/__init__.py +2 -0
  117. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/__init__.py +9 -0
  118. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/default_rest.py +242 -0
  119. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/factory.py +89 -0
  120. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/local_queue.py +258 -0
  121. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/mock.py +132 -0
  122. package/skills/trtc-ai-service/capabilities/human-handoff/src/core/__init__.py +25 -0
  123. package/skills/trtc-ai-service/capabilities/human-handoff/src/core/intent_detector.py +75 -0
  124. package/skills/trtc-ai-service/capabilities/human-handoff/src/core/models.py +163 -0
  125. package/skills/trtc-ai-service/capabilities/human-handoff/src/core/service.py +192 -0
  126. package/skills/trtc-ai-service/capabilities/human-handoff/src/feedback_store.py +54 -0
  127. package/skills/trtc-ai-service/capabilities/human-handoff/src/ports/__init__.py +4 -0
  128. package/skills/trtc-ai-service/capabilities/human-handoff/src/ports/handoff_client.py +86 -0
  129. package/skills/trtc-ai-service/capabilities/human-handoff/src/queue.py +62 -0
  130. package/skills/trtc-ai-service/capabilities/human-handoff/src/router.py +201 -0
  131. package/skills/trtc-ai-service/capabilities/human-handoff/src/summary_link.py +77 -0
  132. package/skills/trtc-ai-service/capabilities/human-handoff/src/trigger.py +25 -0
  133. package/skills/trtc-ai-service/capabilities/knowledge-base/INTERFACE_ADAPT.md +297 -0
  134. package/skills/trtc-ai-service/capabilities/knowledge-base/README.md +51 -0
  135. package/skills/trtc-ai-service/capabilities/knowledge-base/data/faq.json +20 -0
  136. package/skills/trtc-ai-service/capabilities/knowledge-base/manifest.yaml +211 -0
  137. package/skills/trtc-ai-service/capabilities/knowledge-base/src/__init__.py +8 -0
  138. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/__init__.py +9 -0
  139. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/default_rest.py +209 -0
  140. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/factory.py +86 -0
  141. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/local_json.py +172 -0
  142. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/mock.py +91 -0
  143. package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/__init__.py +12 -0
  144. package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/models.py +77 -0
  145. package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/scoring.py +73 -0
  146. package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/service.py +78 -0
  147. package/skills/trtc-ai-service/capabilities/knowledge-base/src/ports/__init__.py +4 -0
  148. package/skills/trtc-ai-service/capabilities/knowledge-base/src/ports/kb_client.py +61 -0
  149. package/skills/trtc-ai-service/capabilities/knowledge-base/src/retriever.py +56 -0
  150. package/skills/trtc-ai-service/capabilities/knowledge-base/src/router.py +85 -0
  151. package/skills/trtc-ai-service/capabilities/session-summary/INTERFACE_ADAPT.md +99 -0
  152. package/skills/trtc-ai-service/capabilities/session-summary/README.md +47 -0
  153. package/skills/trtc-ai-service/capabilities/session-summary/data/test_session.json +18 -0
  154. package/skills/trtc-ai-service/capabilities/session-summary/manifest.yaml +165 -0
  155. package/skills/trtc-ai-service/capabilities/session-summary/src/__init__.py +2 -0
  156. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/__init__.py +5 -0
  157. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/base.py +31 -0
  158. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/default_rest.py +67 -0
  159. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/factory.py +51 -0
  160. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/local_json.py +42 -0
  161. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/mock.py +22 -0
  162. package/skills/trtc-ai-service/capabilities/session-summary/src/recorder.py +210 -0
  163. package/skills/trtc-ai-service/capabilities/session-summary/src/router.py +93 -0
  164. package/skills/trtc-ai-service/capabilities/session-summary/src/summarizer.py +163 -0
  165. package/skills/trtc-ai-service/capabilities/tool-calling/INTERFACE_ADAPT.md +158 -0
  166. package/skills/trtc-ai-service/capabilities/tool-calling/README.md +50 -0
  167. package/skills/trtc-ai-service/capabilities/tool-calling/data/tools.yaml +58 -0
  168. package/skills/trtc-ai-service/capabilities/tool-calling/examples/__init__.py +1 -0
  169. package/skills/trtc-ai-service/capabilities/tool-calling/examples/local_tools.py +101 -0
  170. package/skills/trtc-ai-service/capabilities/tool-calling/manifest.yaml +146 -0
  171. package/skills/trtc-ai-service/capabilities/tool-calling/src/__init__.py +8 -0
  172. package/skills/trtc-ai-service/capabilities/tool-calling/src/dispatcher.py +54 -0
  173. package/skills/trtc-ai-service/capabilities/tool-calling/src/registry.py +219 -0
  174. package/skills/trtc-ai-service/capabilities/tool-calling/src/router.py +50 -0
  175. package/skills/trtc-ai-service/references/business-contract-spec.md +263 -0
  176. package/skills/trtc-ai-service/scenarios/custom-builder/README.md +86 -0
  177. package/skills/trtc-ai-service/scenarios/custom-builder/output-templates/recipe.yaml.j2 +194 -0
  178. package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q1-business-scenario.md +43 -0
  179. package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q2-io-modality.md +57 -0
  180. package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q3-ui-form.md +55 -0
  181. package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q4-capabilities.md +78 -0
  182. package/skills/trtc-ai-service/scenarios/customer-service/README.md +114 -0
  183. package/skills/trtc-ai-service/scenarios/customer-service/recipe.yaml +154 -0
  184. package/skills/trtc-ai-service/scenarios/customer-service/sample-data/README.md +32 -0
  185. package/skills/trtc-ai-service/scenarios/customer-service/sample-data/faq-sample.json +37 -0
  186. package/skills/trtc-ai-service/scenarios/customer-service/system-prompt.template.md +94 -0
  187. package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/app.js +347 -0
  188. package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/index.html +125 -0
  189. package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/styles.css +487 -0
  190. package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/tokens.css +71 -0
  191. package/skills/trtc-ai-service/scenarios/customer-service/ui/design-system/DESIGN_GUIDELINES.md +370 -0
  192. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/README.md +68 -0
  193. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/app.js +1307 -0
  194. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/data.js +40 -0
  195. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/index.html +233 -0
  196. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/mock-shop.json +21 -0
  197. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/styles.css +603 -0
  198. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/tokens.css +71 -0
  199. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/agent-link.js +323 -0
  200. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/app.js +458 -0
  201. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/index.html +109 -0
  202. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/styles.css +489 -0
  203. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/tokens.css +59 -0
  204. package/skills/trtc-ai-service/scripts/add-capability.py +364 -0
  205. package/skills/trtc-ai-service/scripts/contract-adapt.py +334 -0
  206. package/skills/trtc-ai-service/scripts/detect-stack.py +40 -0
  207. package/skills/trtc-ai-service/scripts/lib/__init__.py +20 -0
  208. package/skills/trtc-ai-service/scripts/lib/adapter_codegen.py +509 -0
  209. package/skills/trtc-ai-service/scripts/lib/arbitrator.py +152 -0
  210. package/skills/trtc-ai-service/scripts/lib/contract_resolver.py +519 -0
  211. package/skills/trtc-ai-service/scripts/lib/credential_validators.py +253 -0
  212. package/skills/trtc-ai-service/scripts/lib/curl_parser.py +303 -0
  213. package/skills/trtc-ai-service/scripts/lib/degrader.py +140 -0
  214. package/skills/trtc-ai-service/scripts/lib/injector.py +347 -0
  215. package/skills/trtc-ai-service/scripts/lib/manifest_resolver.py +288 -0
  216. package/skills/trtc-ai-service/scripts/lib/openapi_parser.py +289 -0
  217. package/skills/trtc-ai-service/scripts/lib/stack_detector.py +159 -0
  218. package/skills/trtc-ai-service/scripts/lib/tokens_compile.py +204 -0
  219. package/skills/trtc-ai-service/scripts/post-install-patch.py +225 -0
  220. package/skills/trtc-ai-service/scripts/setup-credentials.py +393 -0
  221. package/skills/trtc-ai-service/scripts/verify-credentials.py +108 -0
  222. package/skills/trtc-ai-service/start.sh +111 -0
  223. package/skills/trtc-ai-service/tests/__init__.py +1 -0
  224. package/skills/trtc-ai-service/tests/test_arbitrator.py +64 -0
  225. package/skills/trtc-ai-service/tests/test_capability_overlay.py +85 -0
  226. package/skills/trtc-ai-service/tests/test_contract_resolver.py +190 -0
  227. package/skills/trtc-ai-service/tests/test_handoff_ports.py +195 -0
  228. package/skills/trtc-ai-service/tests/test_kb_ports.py +195 -0
  229. package/skills/trtc-ai-service/tests/test_manifest_resolver.py +95 -0
  230. package/skills/trtc-ai-service/tests/test_recipe_assembly.py +175 -0
  231. package/skills/trtc-ai-service/tests/test_stack_and_degrader.py +101 -0
  232. package/skills/trtc-ai-service/tests/test_verify_credentials.py +285 -0
  233. package/skills/trtc-ai-service/triggers.yaml +29 -0
  234. package/skills/trtc-conference/SKILL.md +324 -0
  235. package/skills/trtc-conference/flows/onboarding.md +205 -0
  236. package/skills/trtc-conference/flows/topic.md +474 -0
  237. package/skills/trtc-conference/flows/troubleshoot.md +85 -0
  238. package/skills/trtc-conference/hooks/pretooluse_require_business_decisions.py +213 -0
  239. package/skills/trtc-conference/playbooks/medical-quickstart.md +84 -0
  240. package/skills/trtc-conference/playbooks/official-roomkit.md +97 -0
  241. package/skills/trtc-conference/references/local-usersig/basic-info-config.ts +39 -0
  242. package/skills/trtc-conference/references/usersig-handling.md +134 -0
  243. package/skills/trtc-conference/templates/medical-consultation/src/config/lib-generate-test-usersig-es.min.d.ts +4 -0
  244. package/skills/trtc-conference/templates/medical-consultation/src/config/lib-generate-test-usersig-es.min.js +2 -0
  245. package/skills/trtc-conference/tests/__pycache__/test_conference_onboarding_contract.cpython-313-pytest-9.0.2.pyc +0 -0
  246. package/skills/trtc-conference/tests/__pycache__/test_conference_topic_flow_contract.cpython-313-pytest-9.0.2.pyc +0 -0
  247. package/skills/trtc-conference/tests/test_conference_index_contract.py +43 -0
  248. package/skills/trtc-conference/tests/test_conference_onboarding_contract.py +103 -0
  249. package/skills/trtc-conference/tests/test_conference_template_contract.py +25 -0
  250. package/skills/trtc-conference/tests/test_conference_topic_flow_contract.py +132 -0
  251. package/skills/trtc-conference/tools/apply_checks.py +328 -0
  252. package/skills/trtc-conference/verify_lib/__init__.py +0 -0
  253. package/skills/{trtc-apply/guardrails/apply_lib → trtc-conference/verify_lib}/rule_parser.py +1 -1
  254. package/skills/trtc-docs/SKILL.md +91 -119
  255. package/.cursor/rules/ui-mode.mdc +0 -99
  256. package/ai-instructions/base.md +0 -13
  257. package/ai-instructions/ui-mode.md +0 -93
  258. package/knowledge-base/index.yaml +0 -462
  259. package/skills/trtc/room-builder/SKILL.md +0 -133
  260. package/skills/trtc/room-builder/templates/scenarios/medical-consultation/README.md +0 -108
  261. package/skills/trtc/room-builder/tools/render_ai_instructions.py +0 -226
  262. package/skills/trtc-apply/SKILL.md +0 -97
  263. package/skills/trtc-onboarding/SKILL.md +0 -841
  264. package/skills/trtc-onboarding/reference/path-a1-demo.md +0 -103
  265. package/skills/trtc-onboarding/reference/path-a2-integrate.md +0 -737
  266. package/skills/trtc-onboarding/reference/path-b-troubleshoot.md +0 -186
  267. package/skills/trtc-onboarding/reference/path-c-expand.md +0 -43
  268. package/skills/trtc-onboarding/reference/supported-matrix.md +0 -100
  269. package/skills/trtc-search/SKILL.md +0 -228
  270. package/skills/trtc-topic/SKILL.md +0 -622
  271. package/skills/trtc-topic/scripts/apply.py +0 -581
  272. package/skills/trtc-topic/scripts/lib/state_machine.py +0 -328
  273. package/skills/trtc-topic/tests/README.md +0 -70
  274. package/skills/trtc-topic/tests/conftest.py +0 -72
  275. package/skills/trtc-topic/tests/test_apply_cli.py +0 -480
  276. package/skills/trtc-topic/tests/test_end_to_end.py +0 -305
  277. package/skills/trtc-topic/tests/test_finalize_session.py +0 -51
  278. package/skills/trtc-topic/tests/test_gates.py +0 -316
  279. package/skills/trtc-topic/tests/test_session_resolver.py +0 -260
  280. package/skills/trtc-topic/tests/test_state_machine.py +0 -414
  281. package/skills/trtc-topic/tests/test_stop_require_apply.py +0 -99
  282. package/skills/trtc-topic/tests/test_topic_skill_invariants.py +0 -130
  283. /package/skills/{trtc-topic → trtc}/runtime/lib/platforms.py +0 -0
  284. /package/skills/{trtc-topic → trtc}/runtime/telemetry_collector.py +0 -0
  285. /package/skills/{trtc-onboarding/reference → trtc/runtime}/usersig-handling.md +0 -0
  286. /package/skills/{trtc-topic/scripts → trtc/tools}/finalize_session.py +0 -0
  287. /package/skills/{trtc-apply/guardrails/apply_lib → trtc-ai-service/capabilities/conversation-core/tests}/__init__.py +0 -0
  288. /package/skills/{trtc-topic → trtc-conference}/references/execution-units.yaml +0 -0
  289. /package/skills/{trtc/room-builder/templates/scenarios/medical-consultation/src/config → trtc-conference/references/local-usersig}/lib-generate-test-usersig-es.min.d.ts +0 -0
  290. /package/skills/{trtc/room-builder/templates/scenarios/medical-consultation/src/config → trtc-conference/references/local-usersig}/lib-generate-test-usersig-es.min.js +0 -0
  291. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/backend-contract.zh-CN.md +0 -0
  292. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/integration.zh-CN.md +0 -0
  293. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/theme.zh-CN.md +0 -0
  294. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/index.html +0 -0
  295. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/package.json +0 -0
  296. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/postcss.config.js +0 -0
  297. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/App.vue +0 -0
  298. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/ConsultationManagePanel.vue +0 -0
  299. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/LanguageSwitch.vue +0 -0
  300. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/LoadingSpinner.vue +0 -0
  301. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalAlert.vue +0 -0
  302. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalBusinessPanel.vue +0 -0
  303. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalButton.vue +0 -0
  304. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalConfirmDialog.vue +0 -0
  305. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalDataPanel.vue +0 -0
  306. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalRecordPanel.vue +0 -0
  307. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/PrescriptionPanel.vue +0 -0
  308. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/config/basic-info-config.ts +0 -0
  309. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/config/runtime-config.ts +0 -0
  310. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/env.d.ts +0 -0
  311. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationChatPanel.vue +0 -0
  312. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationMembersPanel.vue +0 -0
  313. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationTranscriptionPanel.vue +0 -0
  314. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationVideoStage.vue +0 -0
  315. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/InviteDoctorDialog.vue +0 -0
  316. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/KickMemberConfirmDialog.vue +0 -0
  317. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/types.ts +0 -0
  318. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationChat.ts +0 -0
  319. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationDevices.ts +0 -0
  320. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationParticipants.ts +0 -0
  321. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationPermissions.ts +0 -0
  322. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/utils.ts +0 -0
  323. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/en-US/index.ts +0 -0
  324. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/index.ts +0 -0
  325. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/medicalTranslate.ts +0 -0
  326. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/state.ts +0 -0
  327. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/zh-CN/index.ts +0 -0
  328. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/main.ts +0 -0
  329. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/mock/appointments.ts +0 -0
  330. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/mock/users.ts +0 -0
  331. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/router/index.ts +0 -0
  332. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/index.ts +0 -0
  333. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/appointmentService.ts +0 -0
  334. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/authService.ts +0 -0
  335. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/launchContext.ts +0 -0
  336. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/userService.ts +0 -0
  337. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/appointmentService.ts +0 -0
  338. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/authService.ts +0 -0
  339. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/userService.ts +0 -0
  340. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/types.ts +0 -0
  341. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/shared/icons.ts +0 -0
  342. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/index.css +0 -0
  343. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/tailwind.css +0 -0
  344. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/theme.css +0 -0
  345. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/auth.ts +0 -0
  346. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/format.ts +0 -0
  347. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/navigation.ts +0 -0
  348. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/session.ts +0 -0
  349. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/DoctorConsultationView.vue +0 -0
  350. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/DoctorDashboardView.vue +0 -0
  351. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/LoginView.vue +0 -0
  352. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientConsultationFinishedView.vue +0 -0
  353. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientConsultationView.vue +0 -0
  354. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientSelectDoctorView.vue +0 -0
  355. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientWaitingView.vue +0 -0
  356. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/tsconfig.json +0 -0
  357. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/tsconfig.node.json +0 -0
  358. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/vite.config.ts +0 -0
  359. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation//346/216/245/345/205/245/350/257/264/346/230/216.md" +0 -0
  360. /package/skills/{trtc-topic/runtime/lib → trtc-conference/tools}/__init__.py +0 -0
@@ -0,0 +1,945 @@
1
+ ---
2
+ name: trtc-ai-service
3
+ description: >
4
+ AI customer service scenario skill for TRTC Conversational AI. Guide users
5
+ step-by-step through building an AI-powered customer service application —
6
+ from zero to a working demo, or integrate AI service capabilities into an
7
+ existing project. Use this skill when the user wants to "build an AI
8
+ customer service agent", "set up intelligent Q&A", "create a smart客服
9
+ system", or describes a complete AI service use case. This skill loads
10
+ scenario files that define the sequence of capabilities to implement and
11
+ guides the user through each step with code examples, UI components, and
12
+ verification checkpoints.
13
+ ---
14
+
15
+ # AI Customer Service Skill (v1.2)
16
+
17
+ > This document is the Coding Agent's execution SOP. It also serves as a user-friendly guide reference.
18
+ > For any natural-language intent involving "build / integrate AI customer service," the AI must **read this file first** before taking action.
19
+ > All script calls must strictly follow §12 Tool Whitelist.
20
+
21
+ ## Entry points
22
+
23
+ This skill is reached two ways:
24
+
25
+ 1. **Direct routing from `../trtc/SKILL.md`** — the primary path. The root skill has identified the user's intent as Conversational AI / AI customer service and routed here directly. No onboarding session is required; proceed to §0 below.
26
+
27
+ 2. **Handoff from `../trtc-topic/SKILL.md`** — when the user has gone through onboarding and explicitly selected an AI service scenario. In this case, the scenario id is already resolved; skip to the relevant path section.
28
+
29
+ ---
30
+
31
+ ## 0. Path Baseline (SKILL_ROOT / PROJECT_ROOT) —— 🔴 Top Priority — Read First
32
+
33
+ All runtime assets of this Skill (`capabilities/`, `scripts/`, `scenarios/`, `auto_adapters/`,
34
+ `start.sh`) reside in the **Skill's own directory** and are **not necessarily** at the user's workspace root.
35
+ The Skill can be installed in arbitrary locations: a project subdirectory, `.agents/skills/`, `.codebuddy/skills/`,
36
+ and will work across IDEs (Claude Code / Codex / Cursor) in the future. Therefore, **never assume "Skill root == Workspace root."**
37
+
38
+ ### 0.1 Definition of the Two Roots
39
+
40
+ | Variable | Meaning | How to Obtain |
41
+ |---|---|---|
42
+ | `SKILL_ROOT` | **Skill's own directory** (contains `SKILL.md` / `scripts/` / `capabilities/` …) | = The absolute path of the **Base directory** injected by the system when this Skill is loaded. The Agent must remember it. |
43
+ | `PROJECT_ROOT` | **User's current project root** (= workspace root; the integration target for Path B) | = The absolute path of the current workspace root. |
44
+
45
+ > Demo path (A) uses `SKILL_ROOT` (fetch capability sources + start core) and `PROJECT_ROOT` (where demo artifacts land);
46
+ > Integration path (B) uses `SKILL_ROOT` (fetch capability sources + start core) and `PROJECT_ROOT` (integration target).
47
+ > These two **may or may not be the same** — do not mix them up.
48
+
49
+ ### 0.2 Hard Rules for Path Usage
50
+
51
+ 1. **All commands that call Skill-bundled scripts / assets must use the absolute path of `SKILL_ROOT`**, e.g.:
52
+ ```bash
53
+ cd "$SKILL_ROOT" && python3 scripts/add-capability.py ...
54
+ # or
55
+ python3 "$SKILL_ROOT/scripts/add-capability.py" ...
56
+ ```
57
+ **Do not** write bare relative paths (e.g., `python3 scripts/...`) assuming they resolve against the workspace root — that was the root cause of bugs in previous versions.
58
+ 2. For all command templates in this document that contain `$SKILL_ROOT` / `$PROJECT_ROOT`, the Agent **must substitute them with actual absolute paths** before execution.
59
+ 3. The scripts themselves (`start.sh` / `add-capability.py` / `post-install-patch.py`) already self-locate
60
+ (via `__file__` / `BASH_SOURCE`), so as long as you invoke them with their **absolute path**, they work regardless of cwd.
61
+ 4. If `SKILL_ROOT` cannot be determined immediately, fall back to a one-shot detection (do not ask the user to move directories):
62
+ ```bash
63
+ find "$PWD" -maxdepth 4 -name SKILL.md -path '*ai-service*' 2>/dev/null | head -1
64
+ ```
65
+ If still not found, ask the user where the Skill is installed. **Never ask the user to move the Skill directory to the workspace top level.**
66
+
67
+ ---
68
+
69
+ ## 1. When to Use This Skill
70
+
71
+ **Trigger conditions** (activate this Skill if any match):
72
+ - The user message contains one of the §triggers.keywords
73
+ - The user message contains "TRTC" and refers to "customer service / after-sales / customer support"
74
+ - The user, in a session where this Skill is already loaded, explicitly expresses "let's start / run it / integrate it"
75
+
76
+ **Not applicable** (refuse and explain):
77
+ - Purely a general voice conversation demo (not customer service business) → direct to the conversation-core README
78
+ - Requires digital human / outbound phone calls → not in current scope
79
+ - User is in a non-TRTC ecosystem (Agora / Shengwang) → suggest the corresponding Skill
80
+
81
+ > **Product positioning note**: This Skill encapsulates **TRTC Conversational AI (voice)** capabilities. The selling point is "voice customer service."
82
+ > Therefore the demo scenario (Path A) is voice-first. If the user only wants plain text and merely reuses the RTC channel, advise them to configure it themselves.
83
+ > This Skill does **not** generate artifacts for text-only scenarios.
84
+
85
+ ---
86
+
87
+ ## 2. Interaction Language Detection (Hard Constraint Throughout the Process)
88
+
89
+ > **Purpose**: Throughout the setup process, all of the AI's guidance text, `ask_followup_question` questions / options,
90
+ > prompts, and summaries must **follow the natural language of the user's first prompt**. Do not hardcode Chinese.
91
+
92
+ **Detection rules** (complete after Skill start, before §3; store the result in the internal variable `interaction_lang`):
93
+ - Use the **message that triggered this Skill** as the basis for detection
94
+ - Predominantly Chinese → `interaction_lang = zh`
95
+ - Predominantly English (or other non-Chinese language) → `interaction_lang = en` (approximate other languages with English)
96
+ - If the user explicitly requests a language switch mid-session → update `interaction_lang` immediately and apply to all subsequent interactions
97
+
98
+ **Scope (must be followed)**:
99
+
100
+ | Scenario | Requirement |
101
+ |---|---|
102
+ | Path selection options | question and each option use `interaction_lang` |
103
+ | Path B Q&A dialogue | use `interaction_lang` |
104
+ | Three-Keys setup dialogue | use `interaction_lang` |
105
+ | Contract alignment options and checklist | use `interaction_lang` |
106
+ | Post-launch entry list / trial suggestions | use `interaction_lang` |
107
+ | Error recovery / warning messages | use `interaction_lang` |
108
+
109
+ **Relationship with artifact UI language** (only Path A involves UI):
110
+ - `interaction_lang` controls the language of the **setup process dialogue**.
111
+ - **Path A** artifact UI default language (`recipe.yaml metadata.language`) **defaults to following `interaction_lang`**,
112
+ unless the user specifies otherwise.
113
+ - **Path B** generates no UI, so there is only "dialogue language," not "artifact UI language." Delivered code comments / READMEs use `interaction_lang`.
114
+
115
+ > Do not default to Chinese in conversations just because SKILL.md itself is originally written in Chinese. **Follow the user's language.**
116
+
117
+ ---
118
+
119
+ ## 3. Environment Check (Fully Automatic — No User Action Needed)
120
+
121
+ > **AI guidance text** (output the following in `interaction_lang`):
122
+
123
+ Before we officially start, the system will automatically check if your runtime environment meets the requirements. You don't need to do anything for this step — just wait a moment.
124
+
125
+ **Checks performed**:
126
+ - Python version >= 3.9
127
+ - Skill directory files are intact
128
+ - Whether the three keys (cloud service credentials) have been configured
129
+
130
+ If all checks pass, we'll automatically move to the next step. If something fails, the system will tell you exactly what's missing and how to fix it.
131
+
132
+ ---
133
+
134
+ **AI execution actions** (substitute `$SKILL_ROOT` in all commands with the absolute path determined in §0 before execution):
135
+
136
+ ### 3.1 Python ≥ 3.9
137
+ ```bash
138
+ python3 -c "import sys; assert sys.version_info >= (3, 9), sys.version" && echo OK || echo BAD_PY
139
+ ```
140
+ Fail → tell the user:
141
+ > Your Python version is too old. You need version 3.9 or above. You can download the latest version at https://www.python.org/downloads/. Once installed, we'll continue.
142
+
143
+ **Do not proceed** until the Python version is satisfied.
144
+
145
+ ### 3.2 SKILL_ROOT Verification
146
+ ```bash
147
+ test -f "$SKILL_ROOT/capabilities/conversation-core/manifest.yaml" && echo OK || echo MISSING
148
+ ```
149
+ - OK → path baseline is correct. Continue.
150
+ - MISSING → `$SKILL_ROOT` was set incorrectly. Use the `find` fallback from §0.2 item 4 to re-determine `SKILL_ROOT`, then rerun this check. Only ask the user for the Skill install location if it still fails.
151
+
152
+ ### 3.3 .env Status
153
+ ```bash
154
+ test -f "$SKILL_ROOT/capabilities/conversation-core/.env" && echo OK || echo MISSING
155
+ ```
156
+ - OK → Indicates the three keys have been configured before. Tell the user:
157
+ > I see you've configured your keys before. We can reuse them directly. If you want to reconfigure, just let me know.
158
+ Can skip §5 (unless the user explicitly wants to "reconfigure keys").
159
+ - MISSING → The first step must be §5 Three-Keys Configuration.
160
+
161
+ ---
162
+
163
+ ## 4. Path Selection
164
+
165
+ > **AI guidance text**:
166
+
167
+ Environment check passed! Now let's make a choice — how would you like to get started?
168
+
169
+ ---
170
+
171
+ **First required action**: Use the `ask_followup_question` tool to present a **single-choice question**:
172
+
173
+ ```json
174
+ [{
175
+ "id": "path",
176
+ "question": "How would you like to set up your AI customer service?",
177
+ "options": [
178
+ "Quick Start — Get the agent running right away. You'll see the results in your browser (a web chat window + ticket management dashboard). You'll need to configure 3 keys, and the system will automatically install default capabilities. You should see results within 2-3 minutes. Best for first-timers who want to see 'what this thing looks like'",
179
+ "Integrate into My System (backend capabilities only) — If you already have your own website or app and want to plug in the AI customer service 'brain', choose this. The system will provide a set of API interfaces with no web UI generated. You'll need to configure 3 keys, then choose the interaction mode and additional capabilities"
180
+ ],
181
+ "multiSelect": false
182
+ }]
183
+ ```
184
+
185
+ - Choose A → Go to §6 (Path A: Quick Start)
186
+ - Choose B → Go to §7 (Path B: Integrate into My System)
187
+
188
+ > Fallback when Coding Agent does not support `ask_followup_question`:
189
+ > List both paths in natural language and collect the user's answer from the conversation. **Do not make assumptions.**
190
+
191
+ **Key boundaries the AI should proactively explain**:
192
+ > Whichever you choose, I'll walk you through it step by step. Here's a quick summary of the two paths:
193
+ > - Quick Start: I'll generate a complete customer service web interface for you. You'll be able to see and experience it right in your browser.
194
+ > - Integrate into My System: I'll give you the AI customer service backend capabilities only (API interfaces). The UI is yours — I'll hand you the API docs and sample code, and your developers can connect to them directly.
195
+
196
+ ---
197
+
198
+ ## 5. Three-Keys Configuration
199
+
200
+ > **Trigger condition**: §3.3 returned MISSING, or a key was subsequently judged as failed by verify-credentials.py.
201
+ > Substitute `$SKILL_ROOT` in commands with absolute paths before execution.
202
+
203
+ ---
204
+
205
+ > **AI guidance text**:
206
+
207
+ To get the customer service agent running, you'll need to configure 3 keys — they're the access passes for cloud services. Don't worry, I'll walk you through each one.
208
+
209
+ We'll go in this order: **first** register and create the voice agent on the TRTC standalone site (this is the "core"), **then** get the Tencent Cloud API Key (this is the "control plane" that issues temporary credentials), **last** the LLM API Key (this is the "brain").
210
+
211
+ ---
212
+
213
+ ### 5.1 Configuration Methods
214
+
215
+ You can configure keys in one of two ways:
216
+
217
+ **Method 1: Fill them in yourself**
218
+ In the `.env` file in the project root, find the corresponding configuration items and replace the values on the right side of the equals sign with your own. A complete configuration template is provided below — you can copy and paste the whole block into your `.env` file.
219
+
220
+ **Method 2: Send them to me and I'll fill them in**
221
+ Send each key's value through the chat, and I'll write them into the `.env` file for you. Your key information is only used for this configuration write. The system handles it securely — your keys will not be logged or leaked.
222
+
223
+ ---
224
+
225
+ ### 5.2 Complete Configuration Template (can be given to the user for copy-paste)
226
+
227
+ ```bash
228
+ # ==========================================
229
+ # AI Customer Service Skill - Environment Variable Template
230
+ # Copy the entire block into your .env file and replace the values on the right side of the equals sign
231
+ # ==========================================
232
+
233
+ # --- Key 1: TRTC Application Credentials ---
234
+ # Get them here: https://console.trtc.io/ (register & create a Conversational AI application)
235
+ # (China-region accounts use: https://console.cloud.tencent.com/trtc)
236
+ TRTC_SDK_APP_ID=yourSDKAppID (e.g., 1400000000)
237
+ TRTC_SDK_SECRET_KEY=yourSDKSecretKey (64-character string)
238
+
239
+ # --- Key 2: Tencent Cloud API Credentials ---
240
+ # Get them here: https://console.tencentcloud.com/cam/capi (your TRTC login session syncs automatically)
241
+ TENCENT_CLOUD_SECRET_ID=yourSecretId
242
+ TENCENT_CLOUD_SECRET_KEY=yourSecretKey
243
+
244
+ # --- Key 3: LLM API Key ---
245
+ # Enter the API Key for the AI language model service you're using
246
+ LLM_API_KEY=yourAPIKey
247
+ LLM_API_URL=yourAPIEndpoint (fill in if using a non-OpenAI service)
248
+ LLM_MODEL_NAME=yourModelName (e.g., gpt-4o / deepseek-chat / claude-3-opus)
249
+ ```
250
+
251
+ ---
252
+
253
+ ### 5.3 Key-by-Key Collection Process
254
+
255
+ #### Key 1: TRTC Application Credentials (SDKAppID / SDKSecretKey)
256
+
257
+ **The AI should say**:
258
+ > Let's start with Key 1 — TRTC Application Credentials. This is the foundation of the whole system: the application that powers the voice channel — it lets the customer service agent make voice calls and chat with voice.
259
+ >
260
+ > To get it, we'll go to the **TRTC standalone site** (Tencent RTC's international site) and create a Conversational AI application there:
261
+ > 1. Open this page: https://console.trtc.io/ and register an account / log in (China-region accounts can use https://console.cloud.tencent.com/trtc instead)
262
+ > 2. After logging in, create a **Conversational AI** application (this is the voice agent you'll be using)
263
+ > 3. Once the application is created, you'll find two pieces of information inside it:
264
+ > - **SDKAppID**: a string of numbers
265
+ > - **SDKSecretKey**: a long string of mixed letters and numbers (found in the "Server-side Integration" section)
266
+ > 4. ⚠️ Important: There may also be something called STSecretKey on the page — that one is for the client side. We don't want that. We need the **SDKSecretKey** (the server-side one)
267
+ >
268
+ > Fill the two values into the code block below. Make sure to replace the placeholder text (`yourSDKAppID` and `yourSDKSecretKey`), then **copy and send the entire block to me**:
269
+ >
270
+ > ```
271
+ > # My TRTC application credentials
272
+ > TRTC_SDK_APP_ID=yourSDKAppID
273
+ > TRTC_SDK_SECRET_KEY=yourSDKSecretKey
274
+ > ```
275
+
276
+ **After the user replies with the code block**, the AI must parse the values on the right side of the equals sign:
277
+ 1. Validate: SDKAppID is an integer; SDKSecretKey must be 64 characters `[0-9a-f]`
278
+ (**Special case**: if 128 characters detected and the first 64 equal the last 64 → auto-truncate to first 64 and inform the user)
279
+ 2. Tool: `write_to_file("$SKILL_ROOT/capabilities/conversation-core/.env", <write TRTC_SDK_APP_ID=... + TRTC_SDK_SECRET_KEY=...>)` (default international site; do not write TRTC_REGION)
280
+ 3. Do not echo the full key; only confirm "Received — length/format OK"
281
+ 4. Tool: `execute_command("cd \"$SKILL_ROOT\" && python3 scripts/verify-credentials.py --type trtc")`
282
+ > Note: At this point Tencent Cloud credentials are not yet configured, so the TRTC check runs in **local UserSig self-consistency mode** (no deep ownership check). The deep ownership check runs automatically after Key 2 (Tencent Cloud) is configured — see the re-verification step at the end of Key 2.
283
+ 5. Parse stdout JSON:
284
+ - `{"ok": true, ...}` → Tell the user "Key 1 verified successfully" and proceed to Key 2
285
+ - `{"ok": false, "error": "E002"}` → Respond per the §5.5 error code table; ask the user to retry
286
+ - `{"ok": false, "error": "E000"}` → Check if some value in the user's code block is still a placeholder; if so, prompt "I noticed a value still looks like a placeholder — please send the complete code block again with all values filled in"
287
+
288
+ #### Key 2: Tencent Cloud API Credentials (SecretId / SecretKey)
289
+
290
+ **The AI should say**:
291
+ > All set! Now Key 2 — Tencent Cloud API Credentials.
292
+ >
293
+ > **Why do we need this?** A quick note on the relationship between TRTC and Tencent Cloud:
294
+ > Tencent RTC (trtc.io) is Tencent Cloud's international Real-Time Communication brand. The TRTC Conversational AI service runs on top of Tencent Cloud's infrastructure. The **voice / media channel** is handled by TRTC (which you just configured in Key 1), but the **control plane** — issuing temporary credentials (STS), permission management (CAM), and billing — runs on Tencent Cloud. So we need a Tencent Cloud API Key to let the agent obtain short-lived access tokens securely.
295
+ >
296
+ > The good news: your TRTC account and Tencent Cloud account are connected through a unified login system. **You don't need to register again** — after registering on the TRTC standalone site in Key 1, your login state syncs automatically.
297
+ >
298
+ > To get it:
299
+ > 1. Open this page: https://console.tencentcloud.com/cam/capi (your TRTC login session will sync automatically — no separate signup needed)
300
+ > 2. You'll see a page called "API Key Management." There will be a **SecretId** and a **SecretKey** (you may need to click "Show" to see the full content)
301
+ >
302
+ > Fill the two values into the code block below. Make sure to replace the placeholder text (`yourSecretId` and `yourSecretKey`), then **copy and send the entire block to me**:
303
+ >
304
+ > ```
305
+ > # My Tencent Cloud API credentials
306
+ > TENCENT_CLOUD_SECRET_ID=yourSecretId
307
+ > TENCENT_CLOUD_SECRET_KEY=yourSecretKey
308
+ > ```
309
+
310
+ **After the user replies with the code block**, the AI must parse the values on the right side of the equals sign:
311
+ 1. Validate format: SecretId is typically 36 characters, `^[A-Za-z0-9]+$`; SecretKey is not empty
312
+ 2. Tool: `write_to_file` **append** `TENCENT_CLOUD_SECRET_ID=...` + `TENCENT_CLOUD_SECRET_KEY=...` + `TENCENT_CLOUD_REGION=ap-guangzhou` to the existing `.env` (do NOT overwrite Key 1's TRTC values)
313
+ 3. Do not echo the full key; only confirm "Received — length/format OK"
314
+ 4. Tool: `execute_command("cd \"$SKILL_ROOT\" && python3 scripts/verify-credentials.py --type tencent")`
315
+ 5. Parse stdout JSON:
316
+ - `{"ok": true, ...}` → Tell the user "Key 2 verified successfully"
317
+ - `{"ok": false, "error": "E001"}` → Respond per the §5.5 error code table; ask the user to retry
318
+ - `{"ok": false, "error": "E000"}` → Check if some value in the user's code block is still a placeholder; if so, prompt "I noticed a value still looks like a placeholder — please send the complete code block again with all values filled in"
319
+ 6. **Re-verify TRTC deep ownership check** (now that Tencent Cloud creds are available, do a full ownership check on Key 1):
320
+ - Tool: `execute_command("cd \"$SKILL_ROOT\" && python3 scripts/verify-credentials.py --type trtc")`
321
+ - `{"ok": true, ...}` → Tell the user "TRTC deep ownership check also passed" and proceed to Key 3
322
+ - `{"ok": false, "error": "E002"}` → Respond per §5.5 (e.g., SDKAppID may not belong to this account, or SDKSecretKey / STSecretKey mix-up); ask the user to go back and recheck Key 1's values
323
+ - If value is still a placeholder, prompt to resend
324
+
325
+ #### Key 3: LLM API Key
326
+
327
+ **The AI should say**:
328
+ > Great! Last one — the LLM API Key. This key lets the customer service agent "think" — understand customer questions and generate replies. You'll need an account with an AI language model service provider.
329
+ >
330
+ > If you don't have an LLM account yet, you can pick one from the providers below, sign up, and get an API Key. (The API Key page link is listed for each — just click to go directly):
331
+ >
332
+ | Provider | Model Series | Get your API Key here |
333
+ |----------|-------------|----------------------|
334
+ | OpenAI | GPT Series | https://platform.openai.com/api-keys |
335
+ | Anthropic | Claude Series | https://console.anthropic.com/settings/keys |
336
+ | Google AI | Gemini Series | https://aistudio.google.com/apikey |
337
+ | DeepSeek | DeepSeek Series (cost-effective, strong Chinese) | https://platform.deepseek.com/api_keys |
338
+ | Together AI | Open-source model hosting | https://api.together.ai/settings/api-keys |
339
+ | Groq | High-performance inference | https://console.groq.com/keys |
340
+ | Cohere | Enterprise AI | https://dashboard.cohere.com/api-keys |
341
+ | Mistral AI | Mistral Series (EU provider) | https://console.mistral.ai/api-keys |
342
+
343
+ > Once you've chosen a provider and gotten your API Key, fill it into the code block below (replace the placeholder text), then **copy and send the entire block to me**:
344
+ >
345
+ > ```
346
+ > # My LLM API configuration
347
+ > LLM_API_KEY=yourAPIKey
348
+ > LLM_API_URL=yourAPIEndpoint
349
+ > LLM_MODEL=yourModelName
350
+ > ```
351
+ >
352
+ > Things to keep in mind:
353
+ > - If you're using **OpenAI**, you can delete the `LLM_API_URL` line (the default is OpenAI's endpoint)
354
+ > - If you're using another provider (e.g., DeepSeek, Claude, Gemini, etc.), you must fill in both `LLM_API_URL` and `LLM_MODEL`. Check your provider's documentation for the exact values — search for "API Base URL" and "Model Name"
355
+
356
+ **After the user replies with the code block**, the AI must parse the values on the right side of the equals sign:
357
+ 1. Validate: `LLM_API_KEY` is not empty
358
+ 2. If `LLM_API_URL` is empty or is a placeholder, default to `https://api.openai.com/v1`
359
+ 3. If `LLM_MODEL` is empty or is a placeholder, default to `gpt-4o`
360
+ 4. Tool: `write_to_file` append `LLM_API_KEY=` + `LLM_API_URL=...` + `LLM_MODEL=...`
361
+ 5. Tool: `execute_command("cd \"$SKILL_ROOT\" && python3 scripts/verify-credentials.py --type llm")`
362
+ 6. Parse stdout JSON:
363
+ - `{"ok": true, ...}` → Tell the user "All three keys are ready — moving to the next step"
364
+ - `{"ok": false, "error": "E003"}` → Respond per §5.5 error code table with hints
365
+ - If value is still a Chinese placeholder, prompt "I see the code block still has placeholder text that hasn't been replaced — please fill in all values and resend"
366
+
367
+ ---
368
+
369
+ ### 5.4 Security Constraints (Red Lines — Violations Are Considered Defects)
370
+
371
+ | Red Line | Correct Approach |
372
+ |---|---|
373
+ | Do not pass keys as command-line arguments to any script | Write to .env via write_to_file, then call verify-credentials.py with no arguments |
374
+ | Do not echo the full key value in chat replies | Only confirm "Received + length/format OK" |
375
+ | Do not output keys to logs / stdout | verify-credentials.py automatically outputs only ok/error/message/latency_ms |
376
+ | Do not use `echo $SECRET` / `cat .env` | shell history / terminal logs will record it |
377
+ | After writing .env, its permissions must be 600 | execute_command("chmod 600 \"$SKILL_ROOT/capabilities/conversation-core/.env\"") |
378
+
379
+ ---
380
+
381
+ ### 5.5 Error Codes → AI Response Templates
382
+
383
+ | error | Meaning | What the AI should tell the user |
384
+ |---|---|---|
385
+ | E000 | Credential not configured / empty | "It looks like this entry in .env is empty or missing — please send it again" |
386
+ | E001 | Tencent Cloud API verification failed | "Tencent Cloud API verification failed. Common causes: ① Id/Key order might be swapped ② Key may have been disabled ③ STS service not enabled on your account. Please check at console.cloud.tencent.com/cam" |
387
+ | E002 | TRTC verification failed | "TRTC verification failed. Please double-check: ① Does the SDKAppID belong to your account ② Did you mix up SDKSecretKey and STSecretKey ③ China-region apps may need `TRTC_REGION=cn` added to .env" |
388
+ | E003 | LLM verification failed | "LLM verification failed. If you're using a non-OpenAI service, you may need to update the API endpoint. Which provider are you using?" |
389
+ | E004 | Network unreachable | "Cannot reach the verification server. Please check: ① Do you need a proxy ② Is there a corporate firewall ③ Is your network working. You can also skip deep verification and continue" |
390
+
391
+ ---
392
+
393
+ ## 6. Path A: Quick Start
394
+
395
+ > User selected A in §4.
396
+ > Default artifact: **Voice Customer Service UI** (TRTC real connection, FAQ silent RAG, handoff queue animation + simulated connection, product/order business panel).
397
+ > Substitute `$SKILL_ROOT` in all commands with absolute paths before execution.
398
+
399
+ ---
400
+
401
+ > **AI guidance text** (Path A entry point):
402
+ > Alright, going with the Quick Start path! I'll set up the entire customer service system for you. You don't need to do anything — just wait a moment.
403
+ >
404
+ > This path will automatically install the following capabilities:
405
+ > - **Conversation capability**: The agent can actually understand what you say and respond (because real AI keys are configured)
406
+ > - **Human handoff**: You'll see the handoff flow and UI (using demo data)
407
+ > - **Knowledge base**: You'll see KB search results in action (using demo documents)
408
+ > - **Session summary**: Default-installed in Path A — when a handoff ticket is created, an LLM-generated summary of the conversation is written into the ticket Description so agents see the context immediately
409
+ >
410
+ > Once set up, you'll open your browser and see a full customer service chat interface and a ticket management dashboard.
411
+
412
+ ---
413
+
414
+ ### 6.0 Deployment Parameters (Adjustable)
415
+
416
+ | Parameter | Default | Description |
417
+ |---|---|---|
418
+ | Deployment directory | `$PROJECT_ROOT/ai-customer-service-demo/` | Where the demo UI lands (independent of the Skill folder, easy for later customization); use a different directory if the user requests it |
419
+ | Port | `3000` | If occupied or user specifies a different one: `bash "$SKILL_ROOT/start.sh" --port <N>`, then sync the port in all subsequent health checks / URLs |
420
+
421
+ ---
422
+
423
+ ### 6.1 Step Sequence (6 Steps)
424
+
425
+ **Step 1: Configure the Three Keys**
426
+ - Tool: `execute_command("test -f \"$SKILL_ROOT/capabilities/conversation-core/.env\" && echo OK || echo MISSING")`
427
+ - Returns OK → Proceed to Step 2
428
+ - Returns MISSING → Enter §5 Three-Keys sub-flow, then return to Step 2 when done
429
+
430
+ **Step 2: Assemble Capability Packages**
431
+
432
+ > **AI should tell the user**:
433
+ > Installing dependencies and assembling default capabilities — this should take about 30-60 seconds...
434
+
435
+ - Tool: `execute_command("cd \"$SKILL_ROOT\" && python3 scripts/add-capability.py knowledge-base human-handoff --apply --json")`
436
+ - Expected: JSON output with all `reports[*].errors == []`, no fatal `injection.error`
437
+ - Failure handling:
438
+ - Circular dependency / version conflict → explain to user based on stderr output; stop
439
+ - L2 (templates) → installed to templates directory; tell user where to manually inject
440
+ - L3 (manual) → output the path `$SKILL_ROOT/auto_adapters/integration_templates/generic-frontend.md`
441
+
442
+ **Step 2.5: Post-Install Patch (Must Run)**
443
+ - Tool: `execute_command("cd \"$SKILL_ROOT\" && python3 scripts/post-install-patch.py")`
444
+ - Expected: returns `{"ok": true, ...}`
445
+ - This script does 3 things:
446
+ - Fixes stale extension point injection errors
447
+ - Appends recipe default capability config to `.env` (existing values untouched)
448
+ - Verifies `server.py`'s `StaticFiles(html=True)`
449
+
450
+ **Step 3: UI Overlay (Must Run — Path A Exclusive) —— Default Voice Customer Service UI**
451
+ - Artifacts deployed to `$PROJECT_ROOT/ai-customer-service-demo/` (independent of Skill directory, easy for later edits)
452
+ - Tool (one command to create directory and copy):
453
+ ```bash
454
+ execute_command(
455
+ "mkdir -p \"$PROJECT_ROOT\"/ai-customer-service-demo/admin && \
456
+ cp \"$SKILL_ROOT\"/scenarios/customer-service/ui/voice-customer-service/{index.html,app.js,styles.css,data.js,mock-shop.json,tokens.css} \
457
+ \"$PROJECT_ROOT\"/ai-customer-service-demo/ && \
458
+ cp -R \"$SKILL_ROOT\"/scenarios/customer-service/ui/admin-board/. \
459
+ \"$PROJECT_ROOT\"/ai-customer-service-demo/admin/ && \
460
+ echo \"WEB_DEMO_DIR=$PROJECT_ROOT/ai-customer-service-demo\" >> \"$SKILL_ROOT\"/capabilities/conversation-core/.env"
461
+ )
462
+ ```
463
+ - Expected: `$PROJECT_ROOT/ai-customer-service-demo/` contains `index.html / app.js / styles.css / data.js / mock-shop.json / tokens.css` + `admin/` subdirectory, and `WEB_DEMO_DIR` is written to `.env`
464
+ - Failure handling: check that `$SKILL_ROOT/scenarios/customer-service/ui/voice-customer-service/` is intact
465
+
466
+ **Step 4: Proactively List business_contract** (enter §9)
467
+
468
+ **Step 5: Start the Demo**
469
+
470
+ > **AI should tell the user**:
471
+ > Starting the customer service system. The first launch needs to install some dependency packages and may take 30-60 seconds. Please wait...
472
+
473
+ - Tool: `execute_command("cd \"$SKILL_ROOT\" && nohup bash start.sh > /tmp/ai-cs-start.log 2>&1 &")`
474
+ - Tool: `execute_command("sleep 8 && curl -sS http://localhost:3000/api/v1/health")`
475
+ - First launch creates venv + runs pip install, **typically takes 30-60s**
476
+ - If health check fails after sleep 8 → Tool: `execute_command("sleep 25 && curl -sS http://localhost:3000/api/v1/health")` try again
477
+ - Still fails → `tail -80 /tmp/ai-cs-start.log` check for pip install errors / port conflicts
478
+ - Health check returns `{"status":"ok",...}` → Proceed to Step 6
479
+
480
+ **Step 6: Output Entry List + Trial Suggestions**
481
+
482
+ > **The AI should say**:
483
+ > All done! Your AI customer service agent is up and running. Open the following URLs in your browser to see it in action:
484
+
485
+ | Page | URL | Description |
486
+ |---|---|---|
487
+ | AI Voice Agent | http://localhost:3000 | (customer service chat interface) |
488
+ | Admin board | http://localhost:3000/static/admin/ | (ticket management dashboard) |
489
+ | API docs (Swagger) | http://localhost:3000/docs | (API documentation) |
490
+ | Health probe | http://localhost:3000/api/v1/health | (health check) |
491
+
492
+ ```
493
+ Try saying / typing:
494
+ · "How do I get a refund" → AI replies; KB silently augments answer
495
+ · "Talk to agent" → handoff queue + 8s progress bar + simulated connect
496
+ · Click any product / order card → auto-asks the AI about that item
497
+ ```
498
+
499
+ > Note: The human handoff and knowledge base are using simulated data, so you won't see real business integration effects. If you want to connect to a real business system, you can start over and choose "B — Integrate into My System."
500
+
501
+ ---
502
+
503
+ ### 6.2 Don'ts
504
+
505
+ - ❌ Use bare relative paths to call scripts (must `cd "$SKILL_ROOT"` or use absolute paths — see §0)
506
+ - ❌ Skip .env check before assembling capability packages
507
+ - ❌ Pass any key via command-line arguments to scripts
508
+ - ❌ Modify `capabilities/*/src/core/` (this is the skeleton layer; do not touch)
509
+ - ❌ Skip Step 2.5 (not running post-install-patch.py leaves stale injection errors from add-capability → NameError on startup)
510
+ - ❌ Skip Step 3 (not running UI overlay leaves `/` at the conversation-core built-in voice self-check page → not the intended artifact)
511
+ - ❌ Say the admin board URL is `/admin/tickets` (**the correct path is `/static/admin/`**)
512
+ - ❌ Execute `git commit` / `git push` (unless the user explicitly requests it)
513
+ - ❌ Echo full key content in chat replies
514
+
515
+ ---
516
+
517
+ ## 7. Path B: Integrate into My System (Backend Capabilities Only)
518
+
519
+ > User selected B in §4.
520
+ > **Key positioning**: Integrate TRTC Conversational AI **backend capabilities** into the user's **existing project** (`PROJECT_ROOT`).
521
+ > - `conversation-core` is the core: must **end-to-end verify the voice conversation pipeline** (test until you can actually converse).
522
+ > - Other incremental capabilities (knowledge-base / human-handoff / session-summary / tool-calling):
523
+ > Only deliver **interface specifications + mock implementations + sample code**. The user replaces them with their own systems as needed.
524
+ > - **This path NEVER generates any frontend UI** — the UI is the user's own frontend/backend responsibility.
525
+
526
+ ---
527
+
528
+ > **AI guidance text** (Path B entry point — must explicitly state boundaries):
529
+ > Alright, going with the "Integrate into My System" path. This path will plug the AI customer service **backend capabilities** into your existing project.
530
+ >
531
+ > Here's what I'll do:
532
+ > - Install the voice conversation core (conversation-core) and run it end-to-end to confirm it can actually converse
533
+ > - For extra capabilities like knowledge base, human handoff, session summaries, etc., I'll only provide **interface specs + mock implementations + sample code**. You swap in your own real systems as needed
534
+ > - **I will not generate any web UI** — the UI is handled by your own project's frontend
535
+ >
536
+ > Now, let's walk through a few steps: first confirm your project, then pick capabilities, and finally choose the interaction mode for the agent.
537
+
538
+ ---
539
+
540
+ ### 7.1 Confirm Integration Target (PROJECT_ROOT & Tech Stack)
541
+
542
+ 1. Confirm `PROJECT_ROOT` (default = current workspace root). If the user's project is in a subdirectory, have them specify it as `--target-project`.
543
+ 2. Let the script auto-detect the project tech stack (no manual entry needed):
544
+ ```bash
545
+ cd "$SKILL_ROOT" && python3 scripts/add-capability.py --list --json
546
+ ```
547
+ Tech stack detection is triggered automatically by `--target-project` during Step 7.3 assembly (`stack_detector`).
548
+ If auto-detection is inaccurate, override with `--tech-stack <react|vue|node|python|java|...>`.
549
+
550
+ ### 7.2 Configure Three Keys
551
+ - Tool: `execute_command("test -f \"$SKILL_ROOT/capabilities/conversation-core/.env\" && echo OK || echo MISSING")`
552
+ - MISSING → Enter §5 to complete the three keys (voice core hard-depends on all three keys — all are mandatory).
553
+
554
+ ### 7.3 Capability Selection (Optional Incremental Capabilities — Multi-Select)
555
+
556
+ > **The AI should say** (using `ask_followup_question` multi-select mode):
557
+ > Now let's decide what extra capabilities the agent should have. Besides the built-in voice conversation capability, you can add the following. You can pick multiple, or none at all. Without any extras, the agent will only have basic conversation ability.
558
+
559
+ | # | Capability Package | Description | What you'll get |
560
+ |---|---|---|---|
561
+ | 1 | Knowledge Base | FAQ / KB search | Upload a return policy PDF — the agent automatically answers "How do I return this?" |
562
+ | 2 | Human Handoff | Auto-escalate to a human when the bot can't handle it | Complex issues (complaints, refund disputes) are automatically routed to a human agent, with a ticket dashboard |
563
+ | 3 | Tool Calling | Let the agent query your system's data | Customer asks "Where's my order?" → agent queries your database and returns shipping status |
564
+ | 4 | Session Summary | Auto-generate a summary after each conversation | After each chat, a summary is written so you can review what the customer said and archive it |
565
+
566
+ ```json
567
+ [{
568
+ "id": "capabilities",
569
+ "question": "Which additional capabilities do you need? (multi-select)",
570
+ "options": [
571
+ "① Knowledge Base — FAQ / KB search",
572
+ "② Human Handoff — Escalate to human + ticket flow",
573
+ "③ Tool Calling — Let AI call your business tools",
574
+ "④ Session Summary — Auto-generate summaries after sessions",
575
+ "(None — just basic conversation)"
576
+ ],
577
+ "multiSelect": true
578
+ }]
579
+ ```
580
+
581
+ > Made your choice? Just tell me the numbers (e.g., "1, 2, 3" or "all").
582
+
583
+ **Assembly command** (renders incremental capability adapters / samples into the user's project):
584
+ ```bash
585
+ cd "$SKILL_ROOT" && python3 scripts/add-capability.py <selected capabilities...> \
586
+ --target-project "$PROJECT_ROOT" --apply --json
587
+ # If none selected, skip this command (only runs voice core)
588
+ ```
589
+ - `--target-project` triggers `auto_adapters` three-tier fallback rendering:
590
+ - L1: Based on detected tech stack, renders **room-entry components / backend proxy route examples** into `$PROJECT_ROOT`
591
+ - L2: Renders to templates directory and lists TODOs
592
+ - L3: Outputs generic integration guide for manual connection
593
+ - Parse the returned JSON and tell the user where the files landed
594
+
595
+ **Post-install patch (must run)**:
596
+ ```bash
597
+ cd "$SKILL_ROOT" && python3 scripts/post-install-patch.py
598
+ ```
599
+
600
+ ### 7.4 I/O Modality Selection (Choose the Agent's "Communication Method")
601
+
602
+ > **The AI should say** (using `ask_followup_question` single-choice mode):
603
+ > Now let's decide the agent's "communication method" — how will your customer service agent interact with customers? Here are 4 options — **pick the one** that best fits your business:
604
+
605
+ | # | Modality | Plain Description | Best For |
606
+ |---|---|---|---|
607
+ | 1 | Text-only IM | Agent replies via text chat only | Web live chat, in-app messaging, WeChat customer service |
608
+ | 2 | Text + TTS | Agent replies in text, with text-to-speech read aloud to the customer | Need voice feedback but don't want a phone line — e.g., smart speakers, app voice assistants |
609
+ | 3 | Full Modality | Text and voice both available — the most complete interaction | High-end scenarios requiring both text and voice |
610
+ | 4 | Voice-only Call | Agent communicates only via voice call, no text interface | Call centers, 400-phone customer service, voice hotlines |
611
+
612
+ ```json
613
+ [{
614
+ "id": "modality",
615
+ "question": "Which communication method?",
616
+ "options": [
617
+ "① Text-only IM — Chat via text",
618
+ "② Text + TTS — Text replies + voice readout",
619
+ "③ Full Modality — Both text and voice",
620
+ "④ Voice-only Call — Voice call only"
621
+ ],
622
+ "multiSelect": false
623
+ }]
624
+ ```
625
+
626
+ > Made your choice? Just tell me the number.
627
+
628
+ ### 7.5 End-to-End Verification (Voice Core — No UI)
629
+
630
+ > Since no UI is provided, voice quality is verified by the user in their own frontend. The Skill-side acceptance criteria are as follows (all three passing = end-to-end verified):
631
+
632
+ 1. **Health self-check**: `GET /api/v1/health` — three LEDs (tencent_cloud / trtc / llm) all green
633
+ 2. **Control plane up**: `POST /api/v1/agent/start` returns `TaskId / SessionId` successfully
634
+ 3. **Integration sample delivered**: Room-entry / control sample code rendered per the user's tech stack has landed in `$PROJECT_ROOT`
635
+
636
+ Start core:
637
+ ```bash
638
+ cd "$SKILL_ROOT" && nohup bash start.sh > /tmp/ai-cs-start.log 2>&1 &
639
+ sleep 8 && curl -sS http://localhost:3000/api/v1/health
640
+ ```
641
+
642
+ ### 7.6 Final Deliverables
643
+
644
+ > **The AI should say**:
645
+ > Assembly complete! Your AI customer service backend capabilities are ready. Here's what has been delivered:
646
+
647
+ - `/api/v1/*` backend API contract (output in §9)
648
+ - Outbound contract checklist + mock descriptions + replacement guide for each incremental capability
649
+ - Integration sample code paths matching your tech stack
650
+ - Integration entry point: `/docs` (Swagger) after launch
651
+
652
+ > What you need to do next: hand the API checklist to your developers and have them follow the documentation to integrate the AI customer service capabilities into your website or app. If you run into issues during integration, come back anytime.
653
+
654
+ ### 7.7 Don'ts (Path B)
655
+ - ❌ Generate any frontend UI / apply voice-customer-service / widget-floating UI (those are Path A only)
656
+ - ❌ Use bare relative paths to call scripts (see §0)
657
+ - ❌ Replace mock implementations with real business systems on behalf of the user (only provide specs + adapters; the user decides when to swap)
658
+ - ❌ Modify `capabilities/*/src/core/` skeleton layer
659
+
660
+ ---
661
+
662
+ ## 8. Capability Linking: Human Handoff ↔ Session Summary (Implemented)
663
+
664
+ > When **human-handoff and session-summary are both installed** they automatically link up — no extra configuration by the AI needed.
665
+ > In Path A, session-summary is **default-installed** (see `recipe.yaml` `install:`), so the linkage is active out of the box. In Path B it links up only if the user selected session-summary.
666
+
667
+ **Behavior**: When human-handoff **creates a ticket**, it best-effort triggers session-summary to generate an **LLM one-paragraph summary** of the conversation (from AI connect → handoff trigger) and writes it into the ticket's **`Description`** field. When an agent opens the ticket details on the dashboard, they **directly see** this conversation summary under "Conversation summary" — no separate "Session Summary" block, no manual "Generate Summary" click needed.
668
+
669
+ **Implementation notes (for maintainers)**:
670
+ - Linkage entry point: `capabilities/human-handoff/src/summary_link.py` (`attach_summary_to_ticket`)
671
+ - Summary generation: `capabilities/session-summary/src/summarizer.py` → `summarize_paragraph(record)` (LLM, uses `LLM_API_KEY` / `LLM_API_URL` / `LLM_MODEL`). Falls back to leaving the description unchanged if LLM is not configured or the session has no recorded turns.
672
+ - **Soft dependency**: Dynamically loads session-summary via conversation-core's `_capability_loader`; not installed / any exception → silently skip, **does not affect the main handoff flow**
673
+ - Dashboard rendering (Path A): `admin-board/app.js` renders the ticket `description` as "Conversation summary"; the legacy structured `session_summary` block has been removed
674
+ - The transcript is uploaded by the frontend right before `/handoff/request` via `POST /api/v1/summary/{session_id}/record`, so the recorder has the turns to summarize
675
+
676
+ > The LLM summary call runs synchronously inside the ticket-creation chain and may take a few seconds. This is acceptable because the Path A frontend fires `/handoff/request` **without awaiting** it (the handoff animation plays in parallel); the ticket `Description` is populated by the time the agent refreshes the board.
677
+
678
+ ---
679
+
680
+ ## 9. API Contract Alignment
681
+
682
+ > Trigger condition: mandatory after assembly is complete. Substitute `$SKILL_ROOT` in commands with absolute paths before execution.
683
+
684
+ ### 9.1 List Outbound APIs for Current Capability Packages
685
+
686
+ Read `manifest.yaml.business_contract.external_apis` for each capability package.
687
+ **Only list entries where `direction == outbound`**, outputting in the following natural language format:
688
+
689
+ ```
690
+ ✓ Installed: conversation-core + knowledge-base + human-handoff.
691
+ This session uses mock / local implementations as demo data.
692
+
693
+ Our capability packages call the following external business APIs:
694
+
695
+ 1. POST /tickets ← human-handoff ticket creation
696
+ 2. GET /tickets/{ticket_id} ← human-handoff ticket status query
697
+ 3. POST /tickets/{ticket_id}/cancel ← human-handoff ticket cancellation
698
+ 4. POST /faq/search ← knowledge-base FAQ search
699
+ 5. GET /faq ← knowledge-base FAQ list
700
+ 6. POST /faq ← knowledge-base FAQ create/update
701
+ 7. DELETE /faq/{entry_id} ← knowledge-base FAQ delete
702
+ ```
703
+
704
+ > Path B reminder: The contract checklist is one of the **core deliverables** to the user. Even if the user chooses "run with mocks first," leave this checklist with them.
705
+
706
+ ### 9.2 Ask the User
707
+
708
+ > **The AI should say**:
709
+ > Do you want to switch to a real ticketing / knowledge base system?
710
+ > - Connect to my own system and adapt the interfaces accordingly
711
+ > - Run with mock data for now: skip interface adaptation and start directly
712
+
713
+ Use `ask_followup_question` single-choice:
714
+ - Connect own system → Enter §9.3
715
+ - Run with mocks → Jump to §10 (do not change adapter config)
716
+
717
+ ### 9.3 contract-adapt Flow
718
+
719
+ 1. AI asks "Which capability package to align?" (multi-select: human-handoff / knowledge-base)
720
+ 2. For each capability package:
721
+ - AI asks "Paste your API description: ① curl command ② OpenAPI YAML file path"
722
+ - After collecting, **write to temp files**:
723
+ - curl → `write_to_file(/tmp/adapt_<cap>.curl.txt, <user's text>)`
724
+ - OpenAPI → user already has a path; pass it directly
725
+ - Tool: `execute_command("cd \"$SKILL_ROOT\" && python3 scripts/contract-adapt.py <cap> --curl-file /tmp/adapt_<cap>.curl.txt --json")`
726
+ or `--openapi-file <path>`
727
+ 3. Parse returned JSON:
728
+ - `{"level":"L1","artifact":"<path>"}` → Tell the user "Generated user_custom.py — ready to enable"
729
+ - `{"level":"L2","artifact":"<path>","todos":[...]}` → List TODOs for the user to fill in
730
+ - `{"level":"L3","guide":"INTERFACE_ADAPT.md#section"}` → Have the user follow the documentation
731
+
732
+ ### 9.4 Enable user_custom
733
+
734
+ `write_to_file` append to `$SKILL_ROOT/capabilities/conversation-core/.env`:
735
+ ```
736
+ HH_ADAPTER=user_custom # or KB_ADAPTER=user_custom
737
+ HH_REST_BASE_URL=https://...
738
+ HH_REST_TOKEN=... # if applicable
739
+ ```
740
+
741
+ ---
742
+
743
+ ## 10. Launch & Verification
744
+
745
+ > Default port is 3000. Adjust with `--port <N>` if needed. If port is changed, sync all URLs / health checks below.
746
+ > Substitute `$SKILL_ROOT` in commands with absolute paths before execution.
747
+
748
+ ### 10.1 Launch
749
+ ```bash
750
+ cd "$SKILL_ROOT" && nohup bash start.sh > /tmp/ai-cs-start.log 2>&1 &
751
+ # Custom port: cd "$SKILL_ROOT" && nohup bash start.sh --port 8080 > /tmp/ai-cs-start.log 2>&1 &
752
+ ```
753
+
754
+ ### 10.2 Health Self-Check (first launch needs ≥30s — pip install)
755
+ ```bash
756
+ sleep 8 && curl -sS http://localhost:3000/api/v1/health
757
+ # If connection refused: wait longer
758
+ sleep 25 && curl -sS http://localhost:3000/api/v1/health
759
+ ```
760
+ Expected: response contains `"status":"ok"`, three LEDs (tencent_cloud / trtc / llm) all ok.
761
+
762
+ ### 10.3A Path A — All Green → Output Final Message
763
+ ```
764
+ Setup complete. Open the following URLs:
765
+
766
+ · AI Voice Agent http://localhost:3000 (default)
767
+ · Admin board http://localhost:3000/static/admin/
768
+ · API docs (Swagger) http://localhost:3000/docs
769
+ · Health probe http://localhost:3000/api/v1/health
770
+
771
+ To stop: lsof -ti :3000 -sTCP:LISTEN | xargs kill
772
+ ```
773
+
774
+ > **Correct entry**: The admin dashboard path is `/static/admin/` (**not** `/admin/tickets` — that route does not exist).
775
+
776
+ ### 10.3B Path B — Verification → Output Final Message (No UI)
777
+ ```
778
+ Backend capabilities integrated. Verification:
779
+
780
+ · Health probe http://localhost:3000/api/v1/health (3 LEDs green)
781
+ · Control-plane POST /api/v1/agent/start → returns TaskId / SessionId
782
+ · API docs (Swagger) http://localhost:3000/docs (integration entry point)
783
+
784
+ Delivered to your project ($PROJECT_ROOT):
785
+ · Integration sample code (room entry / control), invocation order: get_config → enter room → agent/start → agent/control → agent/stop
786
+ · Outbound contract checklist + mock descriptions for each incremental capability (swap with your real system as needed)
787
+
788
+ UI is implemented by your own frontend. Verify voice quality from your frontend after entering a room.
789
+ To stop: lsof -ti :3000 -sTCP:LISTEN | xargs kill
790
+ ```
791
+
792
+ ---
793
+
794
+ ## 11. Common Issues
795
+
796
+ If you encounter any of the following issues, here are the corresponding solutions:
797
+
798
+ | Issue | Cause | Solution |
799
+ |---|---|---|
800
+ | Key verification failed | Configured key expired or incorrect | Go back to §5 and recheck each key value. You can re-enter only the one that failed |
801
+ | Port is occupied | Port 3000 is in use by another program | Switch to a different port (e.g., `--port 8080`), or stop the program using port 3000 |
802
+ | Network unreachable | Corporate network or firewall restriction | Check if you need a proxy, or contact your network administrator to open the relevant domains |
803
+ | Python version too old | Python < 3.9 | Download the latest version from https://www.python.org/downloads/ |
804
+ | Error on startup | Dependency version conflict | The system will auto-fix it. If errors persist, send me the error message |
805
+ | Browser shows old UI (Path A) | Browser cached the old page | `Cmd+Shift+R` (Mac) or `Ctrl+Shift+R` (Windows) to force refresh |
806
+ | `/admin/tickets` returns 404 (Path A) | That route doesn't exist | The correct entry is `http://localhost:3000/static/admin/` |
807
+
808
+ ---
809
+
810
+ ### 11.1 Error Recovery Technical Details
811
+
812
+ #### Can't find assets / "No such file" / scripts won't run
813
+ - **Root cause**: Bare relative paths used; cwd is not `SKILL_ROOT` (most common issue in older versions).
814
+ - **Solution**: Re-determine the absolute `SKILL_ROOT` per §0. All commands must `cd "$SKILL_ROOT"` or use absolute paths. Rerun.
815
+ - **Never** ask the user to move the Skill directory to the workspace top level.
816
+
817
+ #### .env exists but keys are invalid
818
+ 1. AI proactively asks "Reconfigure? Keep old values or overwrite all?"
819
+ 2. Choose "reconfigure" → During §5 flow, only re-ask for the failed key (keep others)
820
+ 3. Choose "overwrite all" → Backup .env as .env.bak, start from §5 Key 1
821
+
822
+ #### Port is occupied
823
+ - Tool: `execute_command("lsof -ti :3000 -sTCP:LISTEN")`
824
+ - Ask the user "Kill process PID xxx? Or use a different port?"
825
+ - Change port: `cd "$SKILL_ROOT" && bash start.sh --port 8080`
826
+ - Kill process: `kill <PID>` (requires explicit user consent)
827
+
828
+ #### add-capability reports circular dependency
829
+ - Parse "circular dependency among: [...]" from stderr
830
+ - Tell the user which capabilities conflict; guide them to modify **manifest.yaml.dependencies** and retry
831
+ - Do not modify any manifest yourself
832
+
833
+ #### LLM verification failed but user is using a non-OpenAI service
834
+ - Ask which service the user is using (DeepSeek / Qwen / Moonshot / Anthropic, etc.)
835
+ - Guide them to update `LLM_API_URL` and `LLM_MODEL`:
836
+ - DeepSeek: `https://api.deepseek.com/chat/completions`, model: `deepseek-chat`
837
+ - Others: Have the user provide the official base_url + chat completions path
838
+ - Rerun: `cd "$SKILL_ROOT" && python3 scripts/verify-credentials.py --type llm`
839
+
840
+ #### verify-credentials.py returns E004 (network unreachable)
841
+ - Ask if behind a corporate network / need a proxy
842
+ - Quick fix: Have the user append `HTTPS_PROXY=...` to .env
843
+ - TRTC deep verification failure can be downgraded: `--no-deep` for local UserSig self-consistency check only
844
+
845
+ #### `NameError: name 'session_id' is not defined` after startup
846
+ - **Root cause**: Stale injection position from older version
847
+ - **Solution**: Run `cd "$SKILL_ROOT" && python3 scripts/post-install-patch.py`
848
+ - Do not manually edit agent.py — let the patch script handle it
849
+
850
+ #### contract-adapt.py parse failure
851
+ - Outputs `{"level":"L3", ...}` → Guide the user to read the corresponding capability package's INTERFACE_ADAPT.md
852
+ - Do not ask the user to repaste curl more than 2 times. On the 3rd attempt, go directly to L3 manual flow
853
+
854
+ ---
855
+
856
+ ## 12. AI Tool Whitelist (Mandatory)
857
+
858
+ > Substitute all `$SKILL_ROOT` / `$PROJECT_ROOT` with absolute paths before execution. Always `cd "$SKILL_ROOT"` or use absolute paths when calling scripts.
859
+
860
+ ### 12.1 Allowed Commands (execute_command)
861
+
862
+ | Command | Purpose |
863
+ |---|---|
864
+ | `python3 -c "import sys; assert sys.version_info >= (3,9)"` | Prerequisite check |
865
+ | `test -f "$SKILL_ROOT/<path>" && echo OK \|\| echo MISSING` | File existence check |
866
+ | `find "$PWD" -maxdepth 4 -name SKILL.md -path '*ai-service*'` | SKILL_ROOT fallback detection |
867
+ | `cd "$SKILL_ROOT" && python3 scripts/verify-credentials.py [--type tencent\|trtc\|llm] [--no-deep]` | Key verification |
868
+ | `cd "$SKILL_ROOT" && python3 scripts/add-capability.py <names> --apply --json [--target-project "$PROJECT_ROOT"] [--tech-stack ...]` | Capability assembly |
869
+ | `cd "$SKILL_ROOT" && python3 scripts/post-install-patch.py` | Post-install patch |
870
+ | `cd "$SKILL_ROOT" && python3 scripts/contract-adapt.py <name> [--curl-file ... \| --openapi-file ...] --json` | API contract adaptation |
871
+ | `cp "$SKILL_ROOT"/scenarios/customer-service/ui/voice-customer-service/{index.html,app.js,styles.css,data.js,mock-shop.json,tokens.css} "$PROJECT_ROOT"/ai-customer-service-demo/` | UI overlay (Path A only) |
872
+ | `cp -R "$SKILL_ROOT"/scenarios/customer-service/ui/admin-board/. "$PROJECT_ROOT"/ai-customer-service-demo/admin/` | Admin board mount (Path A only) |
873
+ | `mkdir -p "$PROJECT_ROOT"/ai-customer-service-demo/admin` | Create demo deployment directory (Path A only) |
874
+ | `echo "WEB_DEMO_DIR=<path>" >> "$SKILL_ROOT"/capabilities/conversation-core/.env` | Write demo directory path (Path A only) |
875
+ | `cd "$SKILL_ROOT" && bash start.sh [--port N] [--https]` | Launch |
876
+ | `cd "$SKILL_ROOT" && nohup bash start.sh > /tmp/ai-cs-start.log 2>&1 &` | Background launch |
877
+ | `sleep N && curl -sS http://localhost:3000/api/v1/health` | Health check |
878
+ | `tail -80 /tmp/ai-cs-start.log` | Startup failure diagnostics |
879
+ | `lsof -ti :3000 -sTCP:LISTEN` | Check port usage |
880
+ | `chmod 600 "$SKILL_ROOT/capabilities/conversation-core/.env"` | Tighten permissions |
881
+
882
+ ### 12.2 Forbidden Commands
883
+
884
+ | Command | Reason Prohibited |
885
+ |---|---|
886
+ | `python3 scripts/setup-credentials.py validate-tencent-cloud --secret-id ...` | Key passed via command line → shell history leak |
887
+ | `echo $TENCENT_CLOUD_SECRET_ID` | shell history leak |
888
+ | `cat "$SKILL_ROOT/capabilities/conversation-core/.env"` | May leak via terminal recording / screenshots |
889
+ | `git add . && git commit` | Credentials may be committed by mistake |
890
+ | Any command with plaintext keys as arguments | Same as above |
891
+ | Bare relative paths to call scripts (`python3 scripts/...` without `cd "$SKILL_ROOT"`) | Wrong cwd assumption → can't find assets |
892
+
893
+ ### 12.3 File Write Whitelist (write_to_file)
894
+
895
+ | Path | Purpose |
896
+ |---|---|
897
+ | `$SKILL_ROOT/capabilities/conversation-core/.env` | Key write |
898
+ | `$PROJECT_ROOT/<adapter rendered artifact>` | Path B: integration samples (written by script, not AI) |
899
+ | `$SKILL_ROOT/capabilities/<cap>/src/adapters/user_custom.py` | Generated by contract-adapt.py |
900
+ | `/tmp/adapt_<cap>.curl.txt` | Temporary storage for user's curl |
901
+ | `/tmp/ai-cs-start.log` | nohup startup log |
902
+
903
+ Other file writes require **explicit user confirmation** before writing.
904
+ **Special note**: `capabilities/conversation-core/src/agent.py` and `capabilities/conversation-core/src/server.py` are the skeleton layer. The AI should **not** directly edit them by hand.
905
+
906
+ ---
907
+
908
+ ## 13. Design Standards Reference (Path A UI Only)
909
+
910
+ > Path B generates no UI. This section does not apply to Path B.
911
+
912
+ Path A UI must follow `$SKILL_ROOT/scenarios/customer-service/ui/design-system/DESIGN_GUIDELINES.md`:
913
+
914
+ | Item | Mandatory Requirement |
915
+ |---|---|
916
+ | Theme | Light glassmorphism locked (soft purple + light pink + pale blue ambient over `#f7f3ff`; no dark mode toggle) |
917
+ | Colors | Everything via CSS variables from `tokens.css`; **no hardcoded hex values** |
918
+ | Font | `SF Pro / Inter / Helvetica Neue`, Chinese fallback to system default |
919
+ | Icons | Lucide / Phosphor style monoline SVG icons, sizes: 16/20/24/32 |
920
+ | Emoji | **Completely disabled** in the UI rendering layer (use SVG icons + text instead) |
921
+ | Glassmorphism panels | `backdrop-filter: blur(20px)` + `@supports` fallback |
922
+
923
+ ### 13.1 Top Bar LED Tooltip Convention
924
+
925
+ The 3 LEDs in the top right each show a tooltip on hover:
926
+
927
+ | LED | Title | Explanation |
928
+ |---|---|---|
929
+ | Cloud | Tencent Cloud API | Control-plane (CAM/STS); used to issue temporary credentials |
930
+ | TRTC | TRTC (Real-Time Communication) | Data-plane media channel; carries voice streams / subtitles / custom messages |
931
+ | LLM | LLM provider | Inference engine; OpenAI-compatible protocol; swappable with DeepSeek / GPT / Claude, etc. |
932
+
933
+ ---
934
+
935
+ > **Final Reminders** (for the Coding Agent to internalize):
936
+ > - 🔴 **Path baseline first**: Determine `SKILL_ROOT` (= injected Base directory) and `PROJECT_ROOT` per §0 before anything else.
937
+ > Always `cd "$SKILL_ROOT"` or use absolute paths for all script/asset commands. **Never ask the user to move directories.**
938
+ > - At each step, first call the tool to get facts, then explain to the user (don't answer from memory)
939
+ > - Tool call failure → give the user a stderr summary; **do not** hide errors
940
+ > - Uncertain field / path → use `read_file` to check the manifest, then answer
941
+ > - Strictly follow §12 Tool Whitelist and §5.4 Security Red Lines throughout
942
+ > - **This Skill's selling point is voice**; text-only requests → advise the user to configure it themselves; do not generate artifacts
943
+ > - **Path A** must run all 6 steps. Never skip Step 2.5 (post-install-patch) or Step 3 (UI overlay)
944
+ > - **Path B** never generates any UI; core end-to-end verified + incremental capabilities provide specs/mocks/samples only
945
+ > - human-handoff legacy API field is `state` (values: `waiting/connected/closed/canceled/timeout`), not `status`/`queued`/`cancelled`