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

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 (432) 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 +15 -125
  5. package/README.md +7 -5
  6. package/README.zh.md +7 -5
  7. package/bin/cli.js +151 -46
  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/chat/web/index.yaml +168 -0
  13. package/knowledge-base/chat/web/path-d-signals.yaml +4 -0
  14. package/knowledge-base/conference/web/index.yaml +143 -0
  15. package/knowledge-base/docs/chat/debug/GenerateTestUserSig.js +23 -0
  16. package/knowledge-base/docs/chat/debug/lib-generate-test-usersig.min.js +1 -0
  17. package/knowledge-base/docs/chat/gen-usersig.md +129 -0
  18. package/knowledge-base/docs/chat/product.md +61 -0
  19. package/knowledge-base/docs/chat/restapi.md +227 -0
  20. package/knowledge-base/docs/chat/sdk/android/faq.md +7 -0
  21. package/knowledge-base/docs/chat/sdk/android/index.md +94 -0
  22. package/knowledge-base/docs/chat/sdk/flutter/faq.md +7 -0
  23. package/knowledge-base/docs/chat/sdk/flutter/index.md +83 -0
  24. package/knowledge-base/docs/chat/sdk/ios/faq.md +7 -0
  25. package/knowledge-base/docs/chat/sdk/ios/index.md +94 -0
  26. package/knowledge-base/docs/chat/sdk/web/faq.md +8 -0
  27. package/knowledge-base/docs/chat/sdk/web/index.md +97 -0
  28. package/knowledge-base/docs/chat/uikit/android/index.md +28 -0
  29. package/knowledge-base/docs/chat/uikit/flutter/index.md +17 -0
  30. package/knowledge-base/docs/chat/uikit/ios/index.md +28 -0
  31. package/knowledge-base/docs/chat/uikit/react/index.md +6 -0
  32. package/knowledge-base/docs/chat/uikit/uniapp/index.md +6 -0
  33. package/knowledge-base/docs/chat/uikit/vue3/index.md +6 -0
  34. package/knowledge-base/docs/chat/webhook.md +73 -0
  35. package/knowledge-base/platform-slice-template.md +1041 -133
  36. package/knowledge-base/products.yaml +76 -0
  37. package/knowledge-base/scenario-spec.md +1316 -115
  38. package/knowledge-base/scenarios/conference/base/general-conference.md +22 -2
  39. package/knowledge-base/scenarios/conference/base/webinar-conference.md +14 -0
  40. package/knowledge-base/scenarios/conference/medical/1v1-video-consultation.md +19 -0
  41. package/knowledge-base/scenarios/conference/medical/medical-multidoctor-consultation.md +13 -0
  42. package/knowledge-base/scenarios/live/entertainment-live-room.md +12 -0
  43. package/knowledge-base/slice-spec.md +2377 -299
  44. package/knowledge-base/slices/chat/web/at-mention.md +417 -0
  45. package/knowledge-base/slices/chat/web/conversation-actions.md +178 -0
  46. package/knowledge-base/slices/chat/web/conversation-list.md +368 -0
  47. package/knowledge-base/slices/chat/web/detect-integration.md +36 -0
  48. package/knowledge-base/slices/chat/web/detect-style.md +88 -0
  49. package/knowledge-base/slices/chat/web/direct-chat-entry.md +210 -0
  50. package/knowledge-base/slices/chat/web/login-auth.md +244 -0
  51. package/knowledge-base/slices/chat/web/message-base-actions.md +273 -0
  52. package/knowledge-base/slices/chat/web/message-input.md +209 -0
  53. package/knowledge-base/slices/chat/web/message-list.md +532 -0
  54. package/knowledge-base/slices/chat/web/send-custom-message.md +189 -0
  55. package/knowledge-base/slices/chat/web/send-media.md +214 -0
  56. package/knowledge-base/slices/chat/web/state-api-skeleton.md +60 -0
  57. package/knowledge-base/slices/chat/web/style-guide.md +210 -0
  58. package/knowledge-base/slices/conference/web/integration-audit.md +1 -1
  59. package/knowledge-base/slices/conference/web/login-auth.md +14 -1
  60. package/knowledge-base/tooling/aliases.yaml +92 -0
  61. package/knowledge-base/tooling/intent-signals.yaml +181 -0
  62. package/knowledge-base/tooling/symptom-keywords.yaml +21 -0
  63. package/package.json +4 -1
  64. package/skills/trtc/SKILL.md +249 -258
  65. package/skills/trtc/hooks/__pycache__/report_prompt.cpython-313.pyc +0 -0
  66. package/skills/{trtc-topic/guardrails → trtc/hooks}/gate_slice_read.py +12 -8
  67. package/skills/{trtc-topic/guardrails → trtc/hooks}/gate_slice_write.py +16 -12
  68. package/skills/{trtc-topic/guardrails → trtc/hooks}/stop_require_apply_evidence.py +22 -14
  69. package/skills/trtc/hooks/topic_phase_gate.py +166 -0
  70. package/skills/{trtc-topic → trtc}/runtime/README.md +2 -2
  71. package/skills/{trtc-onboarding/reference/reporting-protocol.md → trtc/runtime/REPORTING.md} +5 -5
  72. package/skills/{trtc-topic → trtc}/runtime/RUNTIME.md +5 -5
  73. package/skills/trtc/runtime/lib/__init__.py +0 -0
  74. package/skills/{trtc-topic → trtc}/runtime/package-lock.json +2 -2
  75. package/skills/{trtc-topic → trtc}/runtime/package.json +2 -2
  76. package/skills/{trtc-topic → trtc}/runtime/telemetry-bridge.mjs +1 -1
  77. package/skills/{trtc-topic/scripts → trtc/tools}/STATE-MACHINE-GUIDE.md +23 -23
  78. package/skills/trtc/tools/__init__.py +2 -0
  79. package/skills/trtc/tools/__pycache__/__init__.cpython-313.pyc +0 -0
  80. package/skills/trtc/tools/__pycache__/query_classifier.cpython-313.pyc +0 -0
  81. package/skills/trtc/tools/__pycache__/reporting.cpython-313.pyc +0 -0
  82. package/skills/trtc/tools/__pycache__/search.cpython-313.pyc +0 -0
  83. package/skills/trtc/tools/__pycache__/session.cpython-313.pyc +0 -0
  84. package/skills/trtc/tools/apply.py +540 -0
  85. package/skills/trtc/tools/docs.py +712 -0
  86. package/skills/trtc/tools/docsbot.py +182 -0
  87. package/skills/trtc/tools/entry/render_ai_instructions.py +92 -0
  88. package/skills/trtc/tools/flow.py +1089 -0
  89. package/skills/{trtc-topic/scripts → trtc/tools}/init_slice_queue.py +5 -4
  90. package/skills/trtc/tools/kb.py +130 -0
  91. package/skills/{trtc-topic/scripts → trtc/tools}/next_slice.py +5 -4
  92. package/skills/trtc/tools/query_classifier.py +301 -0
  93. package/skills/trtc/tools/reporting.py +468 -0
  94. package/skills/trtc/tools/reporting_v2.py +263 -0
  95. package/skills/trtc/tools/search.py +817 -0
  96. package/skills/trtc/tools/session.py +1261 -0
  97. package/skills/trtc/tools/state_machine.py +690 -0
  98. package/skills/trtc-ai-service/README.ja.md +199 -0
  99. package/skills/trtc-ai-service/README.md +199 -0
  100. package/skills/trtc-ai-service/README.zh-CN.md +197 -0
  101. package/skills/trtc-ai-service/SKILL.md +945 -0
  102. package/skills/trtc-ai-service/auto_adapters/README.md +40 -0
  103. package/skills/trtc-ai-service/auto_adapters/frontend-spa/README.md +27 -0
  104. package/skills/trtc-ai-service/auto_adapters/frontend-spa/angular/voice-agent.component.ts.tpl +131 -0
  105. package/skills/trtc-ai-service/auto_adapters/frontend-spa/manifest.yaml +57 -0
  106. package/skills/trtc-ai-service/auto_adapters/frontend-spa/react/VoiceAgent.tsx.tpl +142 -0
  107. package/skills/trtc-ai-service/auto_adapters/frontend-spa/vue/VoiceAgent.vue.tpl +121 -0
  108. package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-backend.md +45 -0
  109. package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-frontend.md +51 -0
  110. package/skills/trtc-ai-service/auto_adapters/integration_templates/generic-rest-api.md +93 -0
  111. package/skills/trtc-ai-service/auto_adapters/java-backend/README.md +25 -0
  112. package/skills/trtc-ai-service/auto_adapters/java-backend/manifest.yaml +30 -0
  113. package/skills/trtc-ai-service/auto_adapters/java-backend/quarkus/VoiceAgentFilter.java.tpl +64 -0
  114. package/skills/trtc-ai-service/auto_adapters/java-backend/springboot/VoiceAgentFilter.java.tpl +91 -0
  115. package/skills/trtc-ai-service/auto_adapters/manifest.yaml +43 -0
  116. package/skills/trtc-ai-service/auto_adapters/node-backend/README.md +25 -0
  117. package/skills/trtc-ai-service/auto_adapters/node-backend/express.js.tpl +40 -0
  118. package/skills/trtc-ai-service/auto_adapters/node-backend/fastify.js.tpl +27 -0
  119. package/skills/trtc-ai-service/auto_adapters/node-backend/koa.js.tpl +31 -0
  120. package/skills/trtc-ai-service/auto_adapters/node-backend/manifest.yaml +47 -0
  121. package/skills/trtc-ai-service/auto_adapters/python-backend/README.md +22 -0
  122. package/skills/trtc-ai-service/auto_adapters/python-backend/django.py.tpl +32 -0
  123. package/skills/trtc-ai-service/auto_adapters/python-backend/fastapi.py.tpl +35 -0
  124. package/skills/trtc-ai-service/auto_adapters/python-backend/flask.py.tpl +31 -0
  125. package/skills/trtc-ai-service/auto_adapters/python-backend/manifest.yaml +45 -0
  126. package/skills/trtc-ai-service/capabilities/__init__.py +43 -0
  127. package/skills/trtc-ai-service/capabilities/conversation-core/.env.example +29 -0
  128. package/skills/trtc-ai-service/capabilities/conversation-core/INTEGRATION.md +134 -0
  129. package/skills/trtc-ai-service/capabilities/conversation-core/INTERFACE_ADAPT.md +111 -0
  130. package/skills/trtc-ai-service/capabilities/conversation-core/QUICK_START.md +62 -0
  131. package/skills/trtc-ai-service/capabilities/conversation-core/manifest.yaml +250 -0
  132. package/skills/trtc-ai-service/capabilities/conversation-core/requirements.txt +6 -0
  133. package/skills/trtc-ai-service/capabilities/conversation-core/src/__init__.py +10 -0
  134. package/skills/trtc-ai-service/capabilities/conversation-core/src/_capability_loader.py +218 -0
  135. package/skills/trtc-ai-service/capabilities/conversation-core/src/agent.py +231 -0
  136. package/skills/trtc-ai-service/capabilities/conversation-core/src/credentials.py +132 -0
  137. package/skills/trtc-ai-service/capabilities/conversation-core/src/health.py +355 -0
  138. package/skills/trtc-ai-service/capabilities/conversation-core/src/log_filter.py +76 -0
  139. package/skills/trtc-ai-service/capabilities/conversation-core/src/modality.py +109 -0
  140. package/skills/trtc-ai-service/capabilities/conversation-core/src/server.py +312 -0
  141. package/skills/trtc-ai-service/capabilities/conversation-core/src/trtc_client.py +315 -0
  142. package/skills/trtc-ai-service/capabilities/conversation-core/src/usersig.py +90 -0
  143. package/skills/trtc-ai-service/capabilities/conversation-core/tests/test_skeleton.py +216 -0
  144. package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/README.md +48 -0
  145. package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/app.js +415 -0
  146. package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/index.html +68 -0
  147. package/skills/trtc-ai-service/capabilities/conversation-core/web-demo/styles.css +136 -0
  148. package/skills/trtc-ai-service/capabilities/digital-human/README.md +31 -0
  149. package/skills/trtc-ai-service/capabilities/digital-human/manifest.yaml +64 -0
  150. package/skills/trtc-ai-service/capabilities/digital-human/src/__init__.py +2 -0
  151. package/skills/trtc-ai-service/capabilities/digital-human/src/router.py +43 -0
  152. package/skills/trtc-ai-service/capabilities/human-handoff/INTERFACE_ADAPT.md +353 -0
  153. package/skills/trtc-ai-service/capabilities/human-handoff/README.md +44 -0
  154. package/skills/trtc-ai-service/capabilities/human-handoff/manifest.yaml +227 -0
  155. package/skills/trtc-ai-service/capabilities/human-handoff/src/__init__.py +2 -0
  156. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/__init__.py +9 -0
  157. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/default_rest.py +242 -0
  158. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/factory.py +89 -0
  159. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/local_queue.py +258 -0
  160. package/skills/trtc-ai-service/capabilities/human-handoff/src/adapters/mock.py +132 -0
  161. package/skills/trtc-ai-service/capabilities/human-handoff/src/core/__init__.py +25 -0
  162. package/skills/trtc-ai-service/capabilities/human-handoff/src/core/intent_detector.py +75 -0
  163. package/skills/trtc-ai-service/capabilities/human-handoff/src/core/models.py +163 -0
  164. package/skills/trtc-ai-service/capabilities/human-handoff/src/core/service.py +192 -0
  165. package/skills/trtc-ai-service/capabilities/human-handoff/src/feedback_store.py +54 -0
  166. package/skills/trtc-ai-service/capabilities/human-handoff/src/ports/__init__.py +4 -0
  167. package/skills/trtc-ai-service/capabilities/human-handoff/src/ports/handoff_client.py +86 -0
  168. package/skills/trtc-ai-service/capabilities/human-handoff/src/queue.py +62 -0
  169. package/skills/trtc-ai-service/capabilities/human-handoff/src/router.py +201 -0
  170. package/skills/trtc-ai-service/capabilities/human-handoff/src/summary_link.py +77 -0
  171. package/skills/trtc-ai-service/capabilities/human-handoff/src/trigger.py +25 -0
  172. package/skills/trtc-ai-service/capabilities/knowledge-base/INTERFACE_ADAPT.md +297 -0
  173. package/skills/trtc-ai-service/capabilities/knowledge-base/README.md +51 -0
  174. package/skills/trtc-ai-service/capabilities/knowledge-base/data/faq.json +20 -0
  175. package/skills/trtc-ai-service/capabilities/knowledge-base/manifest.yaml +211 -0
  176. package/skills/trtc-ai-service/capabilities/knowledge-base/src/__init__.py +8 -0
  177. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/__init__.py +9 -0
  178. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/default_rest.py +209 -0
  179. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/factory.py +86 -0
  180. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/local_json.py +172 -0
  181. package/skills/trtc-ai-service/capabilities/knowledge-base/src/adapters/mock.py +91 -0
  182. package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/__init__.py +12 -0
  183. package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/models.py +77 -0
  184. package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/scoring.py +73 -0
  185. package/skills/trtc-ai-service/capabilities/knowledge-base/src/core/service.py +78 -0
  186. package/skills/trtc-ai-service/capabilities/knowledge-base/src/ports/__init__.py +4 -0
  187. package/skills/trtc-ai-service/capabilities/knowledge-base/src/ports/kb_client.py +61 -0
  188. package/skills/trtc-ai-service/capabilities/knowledge-base/src/retriever.py +56 -0
  189. package/skills/trtc-ai-service/capabilities/knowledge-base/src/router.py +85 -0
  190. package/skills/trtc-ai-service/capabilities/session-summary/INTERFACE_ADAPT.md +99 -0
  191. package/skills/trtc-ai-service/capabilities/session-summary/README.md +47 -0
  192. package/skills/trtc-ai-service/capabilities/session-summary/data/test_session.json +18 -0
  193. package/skills/trtc-ai-service/capabilities/session-summary/manifest.yaml +165 -0
  194. package/skills/trtc-ai-service/capabilities/session-summary/src/__init__.py +2 -0
  195. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/__init__.py +5 -0
  196. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/base.py +31 -0
  197. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/default_rest.py +67 -0
  198. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/factory.py +51 -0
  199. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/local_json.py +42 -0
  200. package/skills/trtc-ai-service/capabilities/session-summary/src/adapters/mock.py +22 -0
  201. package/skills/trtc-ai-service/capabilities/session-summary/src/recorder.py +210 -0
  202. package/skills/trtc-ai-service/capabilities/session-summary/src/router.py +93 -0
  203. package/skills/trtc-ai-service/capabilities/session-summary/src/summarizer.py +163 -0
  204. package/skills/trtc-ai-service/capabilities/tool-calling/INTERFACE_ADAPT.md +158 -0
  205. package/skills/trtc-ai-service/capabilities/tool-calling/README.md +50 -0
  206. package/skills/trtc-ai-service/capabilities/tool-calling/data/tools.yaml +58 -0
  207. package/skills/trtc-ai-service/capabilities/tool-calling/examples/__init__.py +1 -0
  208. package/skills/trtc-ai-service/capabilities/tool-calling/examples/local_tools.py +101 -0
  209. package/skills/trtc-ai-service/capabilities/tool-calling/manifest.yaml +146 -0
  210. package/skills/trtc-ai-service/capabilities/tool-calling/src/__init__.py +8 -0
  211. package/skills/trtc-ai-service/capabilities/tool-calling/src/dispatcher.py +54 -0
  212. package/skills/trtc-ai-service/capabilities/tool-calling/src/registry.py +219 -0
  213. package/skills/trtc-ai-service/capabilities/tool-calling/src/router.py +50 -0
  214. package/skills/trtc-ai-service/references/business-contract-spec.md +263 -0
  215. package/skills/trtc-ai-service/scenarios/custom-builder/README.md +86 -0
  216. package/skills/trtc-ai-service/scenarios/custom-builder/output-templates/recipe.yaml.j2 +194 -0
  217. package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q1-business-scenario.md +43 -0
  218. package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q2-io-modality.md +57 -0
  219. package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q3-ui-form.md +55 -0
  220. package/skills/trtc-ai-service/scenarios/custom-builder/prompts/q4-capabilities.md +78 -0
  221. package/skills/trtc-ai-service/scenarios/customer-service/README.md +114 -0
  222. package/skills/trtc-ai-service/scenarios/customer-service/recipe.yaml +154 -0
  223. package/skills/trtc-ai-service/scenarios/customer-service/sample-data/README.md +32 -0
  224. package/skills/trtc-ai-service/scenarios/customer-service/sample-data/faq-sample.json +37 -0
  225. package/skills/trtc-ai-service/scenarios/customer-service/system-prompt.template.md +94 -0
  226. package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/app.js +347 -0
  227. package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/index.html +125 -0
  228. package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/styles.css +487 -0
  229. package/skills/trtc-ai-service/scenarios/customer-service/ui/admin-board/tokens.css +71 -0
  230. package/skills/trtc-ai-service/scenarios/customer-service/ui/design-system/DESIGN_GUIDELINES.md +370 -0
  231. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/README.md +68 -0
  232. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/app.js +1307 -0
  233. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/data.js +40 -0
  234. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/index.html +233 -0
  235. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/mock-shop.json +21 -0
  236. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/styles.css +603 -0
  237. package/skills/trtc-ai-service/scenarios/customer-service/ui/voice-customer-service/tokens.css +71 -0
  238. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/agent-link.js +323 -0
  239. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/app.js +458 -0
  240. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/index.html +109 -0
  241. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/styles.css +489 -0
  242. package/skills/trtc-ai-service/scenarios/customer-service/ui/widget-floating/tokens.css +59 -0
  243. package/skills/trtc-ai-service/scripts/add-capability.py +364 -0
  244. package/skills/trtc-ai-service/scripts/contract-adapt.py +334 -0
  245. package/skills/trtc-ai-service/scripts/detect-stack.py +40 -0
  246. package/skills/trtc-ai-service/scripts/lib/__init__.py +20 -0
  247. package/skills/trtc-ai-service/scripts/lib/adapter_codegen.py +509 -0
  248. package/skills/trtc-ai-service/scripts/lib/arbitrator.py +152 -0
  249. package/skills/trtc-ai-service/scripts/lib/contract_resolver.py +519 -0
  250. package/skills/trtc-ai-service/scripts/lib/credential_validators.py +253 -0
  251. package/skills/trtc-ai-service/scripts/lib/curl_parser.py +303 -0
  252. package/skills/trtc-ai-service/scripts/lib/degrader.py +140 -0
  253. package/skills/trtc-ai-service/scripts/lib/injector.py +347 -0
  254. package/skills/trtc-ai-service/scripts/lib/manifest_resolver.py +288 -0
  255. package/skills/trtc-ai-service/scripts/lib/openapi_parser.py +289 -0
  256. package/skills/trtc-ai-service/scripts/lib/stack_detector.py +159 -0
  257. package/skills/trtc-ai-service/scripts/lib/tokens_compile.py +204 -0
  258. package/skills/trtc-ai-service/scripts/post-install-patch.py +225 -0
  259. package/skills/trtc-ai-service/scripts/setup-credentials.py +393 -0
  260. package/skills/trtc-ai-service/scripts/verify-credentials.py +108 -0
  261. package/skills/trtc-ai-service/start.sh +111 -0
  262. package/skills/trtc-ai-service/tests/__init__.py +1 -0
  263. package/skills/trtc-ai-service/tests/test_arbitrator.py +64 -0
  264. package/skills/trtc-ai-service/tests/test_capability_overlay.py +85 -0
  265. package/skills/trtc-ai-service/tests/test_contract_resolver.py +190 -0
  266. package/skills/trtc-ai-service/tests/test_handoff_ports.py +195 -0
  267. package/skills/trtc-ai-service/tests/test_kb_ports.py +195 -0
  268. package/skills/trtc-ai-service/tests/test_manifest_resolver.py +95 -0
  269. package/skills/trtc-ai-service/tests/test_recipe_assembly.py +175 -0
  270. package/skills/trtc-ai-service/tests/test_stack_and_degrader.py +101 -0
  271. package/skills/trtc-ai-service/tests/test_verify_credentials.py +285 -0
  272. package/skills/trtc-ai-service/triggers.yaml +29 -0
  273. package/skills/trtc-chat/.docs-query.yaml +8 -0
  274. package/skills/trtc-chat/SKILL.md +186 -0
  275. package/skills/trtc-chat/docs/SKILL.md +31 -0
  276. package/skills/trtc-chat/flows/maintenance.md +19 -0
  277. package/skills/trtc-chat/flows/onboarding.md +79 -0
  278. package/skills/trtc-chat/references/01-detect-project.md +136 -0
  279. package/skills/trtc-chat/references/02-path-a-questions.md +182 -0
  280. package/skills/trtc-chat/references/02-path-a-scaffold-template.md +59 -0
  281. package/skills/trtc-chat/references/02-path-a-script.md +266 -0
  282. package/skills/trtc-chat/references/02-path-a-templates.md +159 -0
  283. package/skills/trtc-chat/references/03-path-b-script.md +226 -0
  284. package/skills/trtc-chat/references/04-path-c-script.md +95 -0
  285. package/skills/trtc-chat/references/04-uikit-redirect.md +32 -0
  286. package/skills/trtc-chat/references/05-path-d-script.md +647 -0
  287. package/skills/trtc-chat/references/05-slice-loading.md +139 -0
  288. package/skills/trtc-chat/references/06-a-defensive-coding.md +139 -0
  289. package/skills/trtc-chat/references/06-hard-rules.md +190 -0
  290. package/skills/trtc-chat/references/08-state-config.md +229 -0
  291. package/skills/trtc-chat/references/09-troubleshoot.md +91 -0
  292. package/skills/trtc-chat/references/10-references-index.md +63 -0
  293. package/skills/trtc-chat/references/11-what-to-do-next-template.md +338 -0
  294. package/skills/trtc-chat/references/12-page-composition.md +73 -0
  295. package/skills/trtc-chat/references/13-reporting.md +128 -0
  296. package/skills/trtc-chat/references/14-official-docs.md +169 -0
  297. package/skills/trtc-chat/references/execution-units.yaml +27 -0
  298. package/skills/trtc-chat/references/vue3.md +104 -0
  299. package/skills/trtc-chat/tests/test_chat_bundle_contract.py +293 -0
  300. package/skills/trtc-chat/tools/__init__.py +5 -0
  301. package/skills/trtc-chat/tools/_delegate.py +32 -0
  302. package/skills/trtc-chat/tools/flow.py +8 -0
  303. package/skills/trtc-chat/tools/kb.py +8 -0
  304. package/skills/trtc-chat/tools/reporting_v2.py +8 -0
  305. package/skills/trtc-chat/tools/session.py +8 -0
  306. package/skills/trtc-conference/SKILL.md +324 -0
  307. package/skills/trtc-conference/flows/onboarding.md +205 -0
  308. package/skills/trtc-conference/flows/topic.md +474 -0
  309. package/skills/trtc-conference/flows/troubleshoot.md +85 -0
  310. package/skills/trtc-conference/hooks/pretooluse_require_business_decisions.py +213 -0
  311. package/skills/trtc-conference/playbooks/medical-quickstart.md +84 -0
  312. package/skills/trtc-conference/playbooks/official-roomkit.md +97 -0
  313. package/skills/trtc-conference/references/local-usersig/basic-info-config.ts +39 -0
  314. package/skills/trtc-conference/references/usersig-handling.md +134 -0
  315. package/skills/trtc-conference/templates/medical-consultation/src/config/lib-generate-test-usersig-es.min.d.ts +4 -0
  316. package/skills/trtc-conference/templates/medical-consultation/src/config/lib-generate-test-usersig-es.min.js +2 -0
  317. package/skills/trtc-conference/tests/__pycache__/test_conference_onboarding_contract.cpython-313-pytest-9.0.2.pyc +0 -0
  318. package/skills/trtc-conference/tests/__pycache__/test_conference_topic_flow_contract.cpython-313-pytest-9.0.2.pyc +0 -0
  319. package/skills/trtc-conference/tests/test_conference_index_contract.py +43 -0
  320. package/skills/trtc-conference/tests/test_conference_onboarding_contract.py +103 -0
  321. package/skills/trtc-conference/tests/test_conference_template_contract.py +25 -0
  322. package/skills/trtc-conference/tests/test_conference_topic_flow_contract.py +132 -0
  323. package/skills/trtc-conference/tools/apply_checks.py +328 -0
  324. package/skills/trtc-conference/verify_lib/__init__.py +0 -0
  325. package/skills/{trtc-apply/guardrails/apply_lib → trtc-conference/verify_lib}/rule_parser.py +1 -1
  326. package/skills/trtc-docs/SKILL.md +91 -119
  327. package/.cursor/rules/ui-mode.mdc +0 -99
  328. package/ai-instructions/base.md +0 -13
  329. package/ai-instructions/ui-mode.md +0 -93
  330. package/knowledge-base/index.yaml +0 -462
  331. package/skills/trtc/room-builder/SKILL.md +0 -133
  332. package/skills/trtc/room-builder/templates/scenarios/medical-consultation/README.md +0 -108
  333. package/skills/trtc/room-builder/tools/render_ai_instructions.py +0 -226
  334. package/skills/trtc-apply/SKILL.md +0 -97
  335. package/skills/trtc-onboarding/SKILL.md +0 -841
  336. package/skills/trtc-onboarding/reference/path-a1-demo.md +0 -103
  337. package/skills/trtc-onboarding/reference/path-a2-integrate.md +0 -737
  338. package/skills/trtc-onboarding/reference/path-b-troubleshoot.md +0 -186
  339. package/skills/trtc-onboarding/reference/path-c-expand.md +0 -43
  340. package/skills/trtc-onboarding/reference/supported-matrix.md +0 -100
  341. package/skills/trtc-search/SKILL.md +0 -228
  342. package/skills/trtc-topic/SKILL.md +0 -622
  343. package/skills/trtc-topic/scripts/apply.py +0 -581
  344. package/skills/trtc-topic/scripts/lib/state_machine.py +0 -328
  345. package/skills/trtc-topic/tests/README.md +0 -70
  346. package/skills/trtc-topic/tests/conftest.py +0 -72
  347. package/skills/trtc-topic/tests/test_apply_cli.py +0 -480
  348. package/skills/trtc-topic/tests/test_end_to_end.py +0 -305
  349. package/skills/trtc-topic/tests/test_finalize_session.py +0 -51
  350. package/skills/trtc-topic/tests/test_gates.py +0 -316
  351. package/skills/trtc-topic/tests/test_session_resolver.py +0 -260
  352. package/skills/trtc-topic/tests/test_state_machine.py +0 -414
  353. package/skills/trtc-topic/tests/test_stop_require_apply.py +0 -99
  354. package/skills/trtc-topic/tests/test_topic_skill_invariants.py +0 -130
  355. /package/skills/{trtc-topic → trtc}/runtime/lib/platforms.py +0 -0
  356. /package/skills/{trtc-topic → trtc}/runtime/telemetry_collector.py +0 -0
  357. /package/skills/{trtc-onboarding/reference → trtc/runtime}/usersig-handling.md +0 -0
  358. /package/skills/{trtc-topic/scripts → trtc/tools}/finalize_session.py +0 -0
  359. /package/skills/{trtc-apply/guardrails/apply_lib → trtc-ai-service/capabilities/conversation-core/tests}/__init__.py +0 -0
  360. /package/skills/{trtc-topic → trtc-conference}/references/execution-units.yaml +0 -0
  361. /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
  362. /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
  363. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/backend-contract.zh-CN.md +0 -0
  364. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/integration.zh-CN.md +0 -0
  365. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/docs/theme.zh-CN.md +0 -0
  366. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/index.html +0 -0
  367. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/package.json +0 -0
  368. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/postcss.config.js +0 -0
  369. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/App.vue +0 -0
  370. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/ConsultationManagePanel.vue +0 -0
  371. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/LanguageSwitch.vue +0 -0
  372. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/LoadingSpinner.vue +0 -0
  373. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalAlert.vue +0 -0
  374. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalBusinessPanel.vue +0 -0
  375. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalButton.vue +0 -0
  376. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalConfirmDialog.vue +0 -0
  377. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalDataPanel.vue +0 -0
  378. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/MedicalRecordPanel.vue +0 -0
  379. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/components/PrescriptionPanel.vue +0 -0
  380. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/config/basic-info-config.ts +0 -0
  381. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/config/runtime-config.ts +0 -0
  382. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/env.d.ts +0 -0
  383. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationChatPanel.vue +0 -0
  384. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationMembersPanel.vue +0 -0
  385. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationTranscriptionPanel.vue +0 -0
  386. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/ConsultationVideoStage.vue +0 -0
  387. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/InviteDoctorDialog.vue +0 -0
  388. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/components/KickMemberConfirmDialog.vue +0 -0
  389. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/types.ts +0 -0
  390. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationChat.ts +0 -0
  391. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationDevices.ts +0 -0
  392. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationParticipants.ts +0 -0
  393. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/useConsultationPermissions.ts +0 -0
  394. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/features/consultation/utils.ts +0 -0
  395. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/en-US/index.ts +0 -0
  396. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/index.ts +0 -0
  397. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/medicalTranslate.ts +0 -0
  398. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/state.ts +0 -0
  399. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/i18n/zh-CN/index.ts +0 -0
  400. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/main.ts +0 -0
  401. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/mock/appointments.ts +0 -0
  402. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/mock/users.ts +0 -0
  403. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/router/index.ts +0 -0
  404. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/index.ts +0 -0
  405. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/appointmentService.ts +0 -0
  406. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/authService.ts +0 -0
  407. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/launchContext.ts +0 -0
  408. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/integration/userService.ts +0 -0
  409. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/appointmentService.ts +0 -0
  410. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/authService.ts +0 -0
  411. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/mock/userService.ts +0 -0
  412. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/services/adapters/types.ts +0 -0
  413. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/shared/icons.ts +0 -0
  414. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/index.css +0 -0
  415. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/tailwind.css +0 -0
  416. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/styles/theme.css +0 -0
  417. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/auth.ts +0 -0
  418. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/format.ts +0 -0
  419. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/navigation.ts +0 -0
  420. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/utils/session.ts +0 -0
  421. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/DoctorConsultationView.vue +0 -0
  422. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/DoctorDashboardView.vue +0 -0
  423. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/LoginView.vue +0 -0
  424. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientConsultationFinishedView.vue +0 -0
  425. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientConsultationView.vue +0 -0
  426. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientSelectDoctorView.vue +0 -0
  427. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/src/views/PatientWaitingView.vue +0 -0
  428. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/tsconfig.json +0 -0
  429. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/tsconfig.node.json +0 -0
  430. /package/skills/{trtc/room-builder/templates/scenarios → trtc-conference/templates}/medical-consultation/vite.config.ts +0 -0
  431. /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
  432. /package/skills/{trtc-topic/runtime/lib → trtc-conference/tools}/__init__.py +0 -0
package/bin/cli.js CHANGED
@@ -5,9 +5,9 @@
5
5
  /**
6
6
  * @tencent-rtc/trtc-agent-skills installer
7
7
  *
8
- * Installs the TRTC AI Integration skill suite (6 cross-referencing skills:
9
- * trtc + trtc-onboarding/docs/topic/search/apply) plus the shared
10
- * knowledge-base into your IDE's skills directory, and wires up the
8
+ * Installs the TRTC AI Integration skill suite (cross-referencing skills:
9
+ * trtc + trtc-onboarding/docs/topic/search/apply + trtc-ai-service) plus the
10
+ * shared knowledge-base into your IDE's skills directory, and wires up the
11
11
  * `tencent-rtc-skill-tool` MCP server (used for prompt / runtime telemetry).
12
12
  *
13
13
  * IMPORTANT — why skills are copied as SIBLING DIRECTORIES:
@@ -50,15 +50,33 @@ const SKILLS_SRC = path.join(PKG_ROOT, "skills");
50
50
  const KB_SRC = path.join(PKG_ROOT, "knowledge-base");
51
51
  const HOOKS_SRC = path.join(PKG_ROOT, "hooks");
52
52
 
53
- // The 6 skills that make up the suite. Order is cosmetic; `trtc` is the entry.
54
- const SKILL_NAMES = [
53
+ // Dynamically discover all skills under SKILLS_SRC. Each skill must be a
54
+ // directory containing a SKILL.md entry point. `trtc` is always listed first;
55
+ // the rest are sorted alphabetically. This avoids the stale-hardcoded-list
56
+ // problem — adding a new skill directory is enough to get it installed.
57
+ //
58
+ // Security: only skills in SKILL_ALLOWLIST are installed. This prevents
59
+ // draft / fork / debug directories from being silently picked up.
60
+ const SKILL_ALLOWLIST = new Set([
55
61
  "trtc",
56
- "trtc-onboarding",
57
62
  "trtc-docs",
58
- "trtc-topic",
59
- "trtc-search",
60
- "trtc-apply",
61
- ];
63
+ "trtc-conference",
64
+ "trtc-ai-service",
65
+ "trtc-chat",
66
+ ]);
67
+
68
+ function getSkillNames() {
69
+ return fs.readdirSync(SKILLS_SRC, { withFileTypes: true })
70
+ .filter(entry => entry.isDirectory())
71
+ .map(entry => entry.name)
72
+ .filter(name => SKILL_ALLOWLIST.has(name))
73
+ .filter(name => fs.existsSync(path.join(SKILLS_SRC, name, "SKILL.md")))
74
+ .sort((a, b) => {
75
+ if (a === "trtc") return -1;
76
+ if (b === "trtc") return 1;
77
+ return a.localeCompare(b);
78
+ });
79
+ }
62
80
 
63
81
  // IDE skill-install targets (project-level). Each IDE reads skills from a
64
82
  // different directory, but the layout inside is identical: one dir per skill.
@@ -94,9 +112,9 @@ const MCP_SERVER_ENTRY = "@tencent-rtc/skill-tool@latest";
94
112
  // The original hooks.json uses ${CLAUDE_PLUGIN_ROOT} / ${CODEBUDDY_PLUGIN_ROOT}
95
113
  // placeholders that get expanded by the IDE in plugin mode; in npx mode we
96
114
  // materialize them to absolute paths under the IDE's settings dir.
97
- // cursor: hooks-cursor.json is rewritten + merged into ~/.cursor/hooks.json
98
- // (USER-LEVEL — Cursor doesn't load project-level hooks). The
99
- // cursor-adapter.py is copied to <root>/.cursor/hooks/ and its hardcoded
115
+ // cursor: hooks-cursor.json is rewritten + merged into <root>/.cursor/hooks.json
116
+ // (project-level). cursor-adapter.py is copied to
117
+ // <root>/.cursor/hooks/trtc-agent-skills/ and its hardcoded
100
118
  // $HOME/.cursor/plugins/local/... reference is rewritten to the actual path.
101
119
  const HOOKS_TARGETS = {
102
120
  claude: {
@@ -119,22 +137,64 @@ const HOOKS_TARGETS = {
119
137
  hooksDir: ".codex/hooks",
120
138
  // Codex loads hooks from <repo>/.codex/hooks.json (or ~/.codex/hooks.json)
121
139
  // — NOT from .agents/settings.json. See https://developers.openai.com/codex/hooks
140
+ //
141
+ // Codex CLI ≥0.135 parses hooks.json with a strict serde schema that rejects
142
+ // unknown top-level fields ("unknown field `__trtc_agent_skills__`, expected
143
+ // `hooks`"). We therefore mark codex as `strictSchema: true` so the merge
144
+ // logic skips the marker injection (uninstall identifies our entries by
145
+ // hook command path substrings instead — see OWNED_COMMAND_HINTS).
122
146
  settingsFile: ".codex/hooks.json",
123
147
  sourceConfig: "hooks.json",
124
148
  rootPlaceholder: "${CLAUDE_PLUGIN_ROOT}",
125
149
  rootRewrite: ".codex",
126
150
  fallbackPlaceholder: "${CODEBUDDY_PLUGIN_ROOT}",
151
+ strictSchema: true,
127
152
  },
128
153
  cursor: {
129
- hooksDir: ".cursor/hooks",
130
- // user-level Cursor only loads ~/.cursor/hooks.json, not project-level.
131
- settingsFile: path.join(os.homedir(), ".cursor", "hooks.json"),
154
+ // Namespace under .cursor/hooks/trtc-agent-skills/ so we never collide
155
+ // with another skill's hooks/ contents. cursor-adapter.py auto-detects
156
+ // PLUGIN_ROOT by walking up to the nearest dir containing skills/, so
157
+ // this nested location still resolves correctly.
158
+ hooksDir: ".cursor/hooks/trtc-agent-skills",
159
+ hooksFiles: ["cursor-adapter.py"],
160
+ settingsFile: ".cursor/hooks.json",
132
161
  sourceConfig: "hooks-cursor.json",
133
162
  // The hardcoded path string we need to rewrite in hooks-cursor.json.
134
163
  cursorAdapterPlaceholder: "$HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py",
135
164
  },
136
165
  };
137
166
 
167
+ // For IDEs whose hook config schema rejects unknown fields (codex), we cannot
168
+ // embed our `__trtc_agent_skills__` ownership markers. Instead, uninstall
169
+ // detects "our" hook entries by checking whether any command string contains
170
+ // one of these path-segment hints — every guardrail script we ship lives under
171
+ // `skills/<skill>/hooks/` or `skills/<skill>/guardrails/`, and the cursor
172
+ // adapter under our namespaced hooks subdir.
173
+ const OWNED_COMMAND_HINTS = [
174
+ "/skills/trtc/hooks/",
175
+ "/skills/trtc/room-builder/guardrails/",
176
+ "/skills/trtc-topic/guardrails/",
177
+ "/skills/trtc-apply/guardrails/",
178
+ "/skills/trtc-conference/hooks/",
179
+ "/hooks/trtc-agent-skills/cursor-adapter.py",
180
+ ];
181
+
182
+ function isOwnedHookEntry(entry) {
183
+ if (!entry || typeof entry !== "object") return false;
184
+ if (entry.__trtc_agent_skills__) return true;
185
+ // Cursor-style: { command: "...", ... }
186
+ if (typeof entry.command === "string" && OWNED_COMMAND_HINTS.some(h => entry.command.includes(h))) {
187
+ return true;
188
+ }
189
+ // Claude/Codex-style: { matcher?, hooks: [{ command, ... }] }
190
+ if (Array.isArray(entry.hooks)) {
191
+ return entry.hooks.some(h => h && typeof h === "object"
192
+ && typeof h.command === "string"
193
+ && OWNED_COMMAND_HINTS.some(hint => h.command.includes(hint)));
194
+ }
195
+ return false;
196
+ }
197
+
138
198
  // AI instruction files distribution per IDE.
139
199
  // - root-md : project-root markdown files (CLAUDE.md / AGENTS.md / CODEBUDDY.md).
140
200
  // If the file already exists, our content is wrapped in HTML
@@ -290,13 +350,20 @@ function printHelp() {
290
350
  }
291
351
 
292
352
  function listSkills() {
353
+ const descriptions = {
354
+ "trtc": "Entry router — detects product/platform, routes to sub-skills",
355
+ "trtc-ai-service": "AI customer service scenarios (TRTC Conversational AI)",
356
+ "trtc-onboarding": "Get-started / integration / troubleshooting flow",
357
+ "trtc-docs": "Docs & error-code lookup",
358
+ "trtc-topic": "Step-by-step scenario walkthrough",
359
+ "trtc-search": "Internal slice lookup (AI-facing)",
360
+ "trtc-apply": "Internal compile/integration quality gate",
361
+ };
293
362
  console.log(`\n ${c.bold("Skills shipped in this package:")}\n`);
294
- console.log(` ${c.cyan("trtc/")} ${c.dim("Entry router detects product/platform, routes to sub-skills")}`);
295
- console.log(` ${c.cyan("trtc-onboarding/")} ${c.dim("Get-started / integration / troubleshooting flow")}`);
296
- console.log(` ${c.cyan("trtc-docs/")} ${c.dim("Docs & error-code lookup")}`);
297
- console.log(` ${c.cyan("trtc-topic/")} ${c.dim("Step-by-step scenario walkthrough")}`);
298
- console.log(` ${c.cyan("trtc-search/")} ${c.dim("Internal slice lookup (AI-facing)")}`);
299
- console.log(` ${c.cyan("trtc-apply/")} ${c.dim("Internal compile/integration quality gate")}`);
363
+ for (const name of getSkillNames()) {
364
+ const desc = descriptions[name] || "";
365
+ console.log(` ${c.cyan(name + "/")}` + (desc ? ` ${c.dim(desc)}` : ""));
366
+ }
300
367
  console.log("");
301
368
  }
302
369
 
@@ -304,7 +371,7 @@ function listSkills() {
304
371
  function cleanSkills(skillsRootAbs) {
305
372
  if (!fs.existsSync(skillsRootAbs)) return 0;
306
373
  let wiped = 0;
307
- for (const name of SKILL_NAMES) {
374
+ for (const name of getSkillNames()) {
308
375
  const target = path.join(skillsRootAbs, name);
309
376
  if (fs.existsSync(target)) { rmrf(target); wiped++; }
310
377
  }
@@ -345,9 +412,9 @@ function cleanAiInstructions(ideList, resolvedRoot) {
345
412
  }
346
413
  }
347
414
 
348
- // Strip our hook entries from each IDE's settings.json. We tag entries with
349
- // __trtc_agent_skills__ so we can filter precisely without disturbing the
350
- // user's own hook entries (relevant for cursor's user-level hooks.json).
415
+ // Strip our hook entries from each IDE's settings file. We tag entries with
416
+ // __trtc_agent_skills__ where the IDE schema allows (claude/codebuddy/cursor),
417
+ // and fall back to command-path matching for strict-schema IDEs (codex).
351
418
  function cleanHooksSettings(ideList, resolvedRoot) {
352
419
  for (const ide of ideList) {
353
420
  const target = HOOKS_TARGETS[ide];
@@ -369,23 +436,35 @@ function cleanHooksSettings(ideList, resolvedRoot) {
369
436
  for (const event of Object.keys(settings.hooks)) {
370
437
  const val = settings.hooks[event];
371
438
  if (Array.isArray(val)) {
372
- settings.hooks[event] = val.filter(e => !(e && typeof e === "object" && e.__trtc_agent_skills__));
439
+ settings.hooks[event] = val.filter(e => !isOwnedHookEntry(e));
373
440
  if (settings.hooks[event].length === 0) delete settings.hooks[event];
441
+ } else if (val && typeof val === "object" && Array.isArray(val.hooks)) {
442
+ // Some IDEs nest hooks under a single object per event instead of
443
+ // an array. Filter the inner hooks list.
444
+ val.hooks = val.hooks.filter(h => !isOwnedHookEntry(h));
445
+ if (val.hooks.length === 0) delete settings.hooks[event];
374
446
  } else {
375
- // Non-array (claude/codebuddy style) we own the whole event under our install.
376
- delete settings.hooks[event];
447
+ // Unknown shapeleave it alone rather than risk corrupting it.
377
448
  }
378
449
  }
379
450
  if (Object.keys(settings.hooks).length === 0) delete settings.hooks;
380
451
  }
381
452
 
453
+ // For strict-schema codex, if we cleared everything, remove the file so
454
+ // codex doesn't see a stale empty file.
455
+ const onlyHadOurState = !settings.hooks && Object.keys(settings).length === 0;
456
+ if (onlyHadOurState) {
457
+ rmrf(settingsPath);
458
+ continue;
459
+ }
460
+
382
461
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n", "utf8");
383
462
  }
384
463
  }
385
464
 
386
465
  function installSkills(skillsRootAbs) {
387
466
  ensureDir(skillsRootAbs);
388
- for (const name of SKILL_NAMES) {
467
+ for (const name of getSkillNames()) {
389
468
  const src = path.join(SKILLS_SRC, name);
390
469
  if (fs.existsSync(src)) {
391
470
  copyRecursive(src, path.join(skillsRootAbs, name));
@@ -409,7 +488,14 @@ function copyKnowledgeBase(skillsRootAbs) {
409
488
  // to the plugin install root. In npx mode there's no plugin root, so we
410
489
  // materialize those placeholders to absolute paths pointing at the IDE's
411
490
  // settings dir (where we put .{ide}/skills/, .{ide}/hooks/, etc).
412
- function rewriteHooksContent(content, target, ideAbsRoot) {
491
+ //
492
+ // `hooksDestAbs` is the absolute path the hooks/ source dir was actually
493
+ // copied to (e.g. <root>/.cursor/hooks/trtc-agent-skills for cursor, or
494
+ // <root>/.claude/hooks for claude). We use it to resolve cursor-adapter.py
495
+ // rather than reconstructing it from `ideAbsRoot + "hooks"`, because cursor
496
+ // nests its hooks one level deeper (under trtc-agent-skills/) for namespace
497
+ // isolation — see HOOKS_TARGETS.cursor.hooksDir.
498
+ function rewriteHooksContent(content, target, ideAbsRoot, hooksDestAbs) {
413
499
  let out = content;
414
500
  if (target.rootPlaceholder) {
415
501
  // Replace BOTH ${CLAUDE_PLUGIN_ROOT} and ${CODEBUDDY_PLUGIN_ROOT} — the
@@ -433,7 +519,12 @@ function rewriteHooksContent(content, target, ideAbsRoot) {
433
519
  // We need the resulting JSON string to evaluate to a shell-quoted path so
434
520
  // project paths with spaces don't break shell parsing — that means
435
521
  // emitting `\"<abs>\"` (JSON-escaped quotes) into the string.
436
- const cursorAdapterAbs = path.join(ideAbsRoot, "hooks", "cursor-adapter.py");
522
+ //
523
+ // Use hooksDestAbs (the actual copy destination) — NOT ideAbsRoot+"hooks"
524
+ // — because cursor's hooksDir is namespaced as
525
+ // .cursor/hooks/trtc-agent-skills, so the script lives one level deeper
526
+ // than the .cursor/hooks/ that ideAbsRoot+"hooks" would point at.
527
+ const cursorAdapterAbs = path.join(hooksDestAbs, "cursor-adapter.py");
437
528
  const replacement = `\\"${cursorAdapterAbs}\\"`;
438
529
  out = out.split(target.cursorAdapterPlaceholder).join(replacement);
439
530
  }
@@ -456,12 +547,12 @@ function copyHooksDir(target, resolvedRoot) {
456
547
  // ~/.cursor/hooks.json we merge per-event arrays so a previously-installed
457
548
  // project's adapter path gets replaced by ours but the user's own hook
458
549
  // entries (if any) are preserved.
459
- function mergeHooksConfig(target, resolvedRoot, ideAbsRoot) {
550
+ function mergeHooksConfig(target, resolvedRoot, ideAbsRoot, hooksDestAbs) {
460
551
  const srcPath = path.join(HOOKS_SRC, target.sourceConfig);
461
552
  if (!fs.existsSync(srcPath)) return null;
462
553
 
463
554
  const rawSrc = fs.readFileSync(srcPath, "utf8");
464
- const rewritten = rewriteHooksContent(rawSrc, target, ideAbsRoot);
555
+ const rewritten = rewriteHooksContent(rawSrc, target, ideAbsRoot, hooksDestAbs);
465
556
  let parsed;
466
557
  try { parsed = JSON.parse(rewritten); }
467
558
  catch (err) {
@@ -487,10 +578,16 @@ function mergeHooksConfig(target, resolvedRoot, ideAbsRoot) {
487
578
  const incomingHooks = parsed.hooks || {};
488
579
  if (!existing.hooks || typeof existing.hooks !== "object") existing.hooks = {};
489
580
 
490
- // Marker used inside user-level cursor hooks.json to identify our entries
491
- // when multiple projects install. Tagged on each individual hook entry so
492
- // a future uninstall can filter precisely.
581
+ // For strict-schema IDEs (codex) we MUST NOT embed any ownership marker —
582
+ // codex CLI ≥0.135 rejects the whole file with
583
+ // "unknown field `__trtc_agent_skills__`, expected `hooks`"
584
+ // and skips all hooks. Identify our entries on uninstall via command-path
585
+ // hints (see isOwnedHookEntry) instead.
586
+ const useMarker = !target.strictSchema;
587
+
588
+ // Marker to identify our entries so a future uninstall can filter precisely.
493
589
  const tagged = (entry) => {
590
+ if (!useMarker) return entry;
494
591
  if (entry && typeof entry === "object") {
495
592
  return Object.assign({}, entry, { __trtc_agent_skills__: true });
496
593
  }
@@ -501,24 +598,32 @@ function mergeHooksConfig(target, resolvedRoot, ideAbsRoot) {
501
598
  if (Array.isArray(eventValue)) {
502
599
  // Cursor format: hooks.<event> = [{command: ...}, ...]
503
600
  const stripped = (existing.hooks[eventName] || [])
504
- .filter(e => !(e && typeof e === "object" && e.__trtc_agent_skills__));
601
+ .filter(e => !isOwnedHookEntry(e));
505
602
  existing.hooks[eventName] = stripped.concat(eventValue.map(tagged));
506
603
  } else if (Array.isArray(existing.hooks[eventName])) {
507
604
  // existing is array (cursor-style), incoming is non-array (claude-style):
508
605
  // overwrite — this combination shouldn't happen in practice.
509
606
  existing.hooks[eventName] = eventValue;
510
607
  } else {
511
- // Claude/Codebuddy format: hooks.<event> = [{matcher, hooks: [...]}, ...]
512
- // The bundled hooks.json IS the only source for this key; just replace.
608
+ // Claude/Codebuddy/Codex format: hooks.<event> = [{matcher, hooks:[...]}, ...]
609
+ // For strict-schema codex, the bundled hooks.json IS the only source for
610
+ // this key and we own the file; just replace.
513
611
  existing.hooks[eventName] = eventValue;
514
612
  }
515
613
  }
516
614
 
517
615
  // Top-level marker so a future uninstall can detect our presence quickly.
518
- existing.__trtc_agent_skills__ = {
519
- version: PKG_VERSION,
520
- hookEvents: Object.keys(incomingHooks),
521
- };
616
+ // Skip for strict-schema IDEs (codex) — see useMarker above.
617
+ if (useMarker) {
618
+ existing.__trtc_agent_skills__ = {
619
+ version: PKG_VERSION,
620
+ hookEvents: Object.keys(incomingHooks),
621
+ };
622
+ } else if (existing.__trtc_agent_skills__) {
623
+ // Defensive: if a previous (buggy) install left this field behind, clean
624
+ // it up so codex doesn't keep failing schema validation.
625
+ delete existing.__trtc_agent_skills__;
626
+ }
522
627
 
523
628
  // Preserve / propagate top-level keys that the IDE expects (e.g. cursor
524
629
  // requires `"version": 1` at the root of ~/.cursor/hooks.json or it rejects
@@ -543,7 +648,7 @@ function installHooks(ideList, resolvedRoot) {
543
648
  const hooksDest = copyHooksDir(target, resolvedRoot);
544
649
  console.log(c.green(" ✓ ") + `${ide} hooks → ${hooksDest}/`);
545
650
 
546
- const merged = mergeHooksConfig(target, resolvedRoot, ideAbsRoot);
651
+ const merged = mergeHooksConfig(target, resolvedRoot, ideAbsRoot, hooksDest);
547
652
  if (merged) {
548
653
  const isUserLevel = path.isAbsolute(target.settingsFile);
549
654
  const prefix = isUserLevel ? c.yellow(" ⚠ ") : c.green(" ✓ ");
@@ -812,7 +917,7 @@ function main() {
812
917
  }
813
918
 
814
919
  installSkills(skillsRootAbs);
815
- for (const name of SKILL_NAMES) console.log(c.green(" ✓ ") + name + "/");
920
+ for (const name of getSkillNames()) console.log(c.green(" ✓ ") + name + "/");
816
921
 
817
922
  const kbDest = copyKnowledgeBase(skillsRootAbs);
818
923
  console.log(c.green(" ✓ ") + "knowledge-base/ " + c.dim("→ " + kbDest));
@@ -25,8 +25,8 @@ Cursor event mapping (see hooks-cursor.json):
25
25
  sessionStart -> trtc-prepare-ui
26
26
  beforeReadFile -> gate-slice-read
27
27
  preToolUse -> gate-slice-write (filtered to Write/Edit inside)
28
- afterFileEdit -> verify-ui-post-write, verify-slice-must
29
- stop -> stop-apply-evidence, trtc-verify-ui, verify-apply-project
28
+ afterFileEdit -> verify-ui-post-write
29
+ stop -> stop-apply-evidence, trtc-verify-ui
30
30
  (Claude Code's `Stop` event fires per agent loop
31
31
  iteration end. Cursor's `stop` event has the same
32
32
  semantic ("Called when the agent loop ends") and
@@ -42,10 +42,9 @@ Cursor event mapping (see hooks-cursor.json):
42
42
  firing. Empirically (Cursor 3.3.8) `stop` does
43
43
  fire reliably; the original "stop never fires"
44
44
  observation was caused by hooks not being loaded
45
- at all, not by the `stop` event itself. See
46
- install instructions in the README for the
47
- documented user-level `~/.cursor/hooks.json`
48
- install path — plugin-level hooks declared in
45
+ at all, not by the `stop` event itself. npx
46
+ installs to project-level `.cursor/hooks.json`;
47
+ plugin-level hooks declared in
49
48
  .cursor-plugin/plugin.json are NOT loaded by
50
49
  current Cursor versions.)
51
50
 
@@ -62,7 +61,24 @@ import sys
62
61
  from pathlib import Path
63
62
 
64
63
  ADAPTER_DIR = Path(__file__).resolve().parent
65
- PLUGIN_ROOT = ADAPTER_DIR.parent # plugin install root
64
+
65
+
66
+ def _find_plugin_root(start: Path) -> Path:
67
+ # Walk up until we find a directory that contains skills/. This makes the
68
+ # adapter location-independent: it works whether it lives at
69
+ # <plugin>/hooks/cursor-adapter.py (Cursor plugin install + the original
70
+ # npx layout) or under a namespaced subdir like
71
+ # <plugin>/hooks/trtc-agent-skills/cursor-adapter.py (current npx layout,
72
+ # chosen so multiple skill packages can co-exist under .cursor/hooks/).
73
+ # Falls back to the old `.parent` behaviour if no `skills/` is found, so
74
+ # we never regress an existing install.
75
+ for candidate in (start, *start.parents):
76
+ if (candidate / "skills").is_dir():
77
+ return candidate
78
+ return start.parent
79
+
80
+
81
+ PLUGIN_ROOT = _find_plugin_root(ADAPTER_DIR)
66
82
 
67
83
 
68
84
  # Optional debug logging — only writes when TRTC_HOOK_DEBUG_LOG is set to a
@@ -103,23 +119,20 @@ def _probe_log(key, payload) -> None:
103
119
 
104
120
  # Dispatch table: dispatch_key -> relative script path under PLUGIN_ROOT.
105
121
  DISPATCH = {
106
- "trtc-prepare-ui": "skills/trtc/room-builder/guardrails/trtc_prepare_ui.py",
107
- "gate-slice-read": "skills/trtc-topic/guardrails/gate_slice_read.py",
108
- "gate-slice-write": "skills/trtc-topic/guardrails/gate_slice_write.py",
109
- "verify-ui-post-write": "skills/trtc/room-builder/guardrails/verify_ui_post_write.sh",
110
- "verify-slice-must": "skills/trtc-apply/guardrails/verify_slice_must_rules.py",
111
- "stop-apply-evidence": "skills/trtc-topic/guardrails/stop_require_apply_evidence.py",
112
- "trtc-verify-ui": "skills/trtc/room-builder/guardrails/trtc_verify_ui.py",
113
- "verify-apply-project": "skills/trtc-apply/guardrails/verify_apply_project.py",
122
+ "gate-slice-read": "skills/trtc/hooks/gate_slice_read.py",
123
+ "topic-phase-gate": "skills/trtc/hooks/topic_phase_gate.py",
124
+ "gate-slice-write": "skills/trtc/hooks/gate_slice_write.py",
125
+ "stop-apply-evidence": "skills/trtc/hooks/stop_require_apply_evidence.py",
126
+ "pretooluse-require-business-decisions": "skills/trtc-conference/hooks/pretooluse_require_business_decisions.py",
114
127
  }
115
128
 
116
129
  # Dispatch keys whose underlying scripts read JSON from stdin.
117
130
  # Other keys are CLI-only and will receive empty stdin.
118
131
  STDIN_KEYS = {
119
132
  "gate-slice-read",
133
+ "topic-phase-gate",
120
134
  "gate-slice-write",
121
- "verify-ui-post-write",
122
- "verify-slice-must",
135
+ "pretooluse-require-business-decisions",
123
136
  }
124
137
 
125
138
 
@@ -164,7 +177,21 @@ def _translate_payload(key: str, cursor: dict) -> dict:
164
177
  tool_input = cursor.get("tool_input") or cursor.get("toolInput") or {}
165
178
  return {"tool_name": tool_name, "tool_input": tool_input}
166
179
 
167
- if key in ("verify-ui-post-write", "verify-slice-must"):
180
+ if key == "topic-phase-gate":
181
+ tool_name = cursor.get("tool_name") or cursor.get("toolName")
182
+ if tool_name not in ("Write", "Edit"):
183
+ return {}
184
+ tool_input = cursor.get("tool_input") or cursor.get("toolInput") or {}
185
+ return {"tool_name": tool_name, "tool_input": tool_input}
186
+
187
+ if key == "pretooluse-require-business-decisions":
188
+ tool_name = cursor.get("tool_name") or cursor.get("toolName")
189
+ if tool_name not in ("Write", "Edit"):
190
+ return {}
191
+ tool_input = cursor.get("tool_input") or cursor.get("toolInput") or {}
192
+ return {"tool_name": tool_name, "tool_input": tool_input}
193
+
194
+ if key in ("verify-ui-post-write",):
168
195
  # Cursor's afterFileEdit payload: {file_path, edits}
169
196
  file_path = cursor.get("file_path") or cursor.get("filePath")
170
197
  return {"tool_name": "Edit", "tool_input": {"file_path": file_path}}
@@ -1,38 +1,25 @@
1
1
  {
2
2
  "version": 1,
3
3
  "hooks": {
4
- "sessionStart": [
5
- {
6
- "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py trtc-prepare-ui"
7
- }
8
- ],
9
- "beforeReadFile": [
4
+ "beforeReadFile": [
10
5
  {
11
6
  "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py gate-slice-read"
12
7
  }
13
8
  ],
14
9
  "preToolUse": [
15
10
  {
16
- "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py gate-slice-write"
17
- }
18
- ],
19
- "afterFileEdit": [
11
+ "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py topic-phase-gate"
12
+ },
20
13
  {
21
- "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py verify-ui-post-write"
14
+ "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py gate-slice-write"
22
15
  },
23
16
  {
24
- "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py verify-slice-must"
17
+ "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py pretooluse-require-business-decisions"
25
18
  }
26
19
  ],
27
20
  "stop": [
28
21
  {
29
22
  "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py stop-apply-evidence"
30
- },
31
- {
32
- "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py trtc-verify-ui"
33
- },
34
- {
35
- "command": "python3 $HOME/.cursor/plugins/local/trtc-agent-skills/hooks/cursor-adapter.py verify-apply-project"
36
23
  }
37
24
  ]
38
25
  }
package/hooks/hooks.json CHANGED
@@ -1,22 +1,12 @@
1
1
  {
2
2
  "hooks": {
3
- "SessionStart": [
4
- {
5
- "hooks": [
6
- {
7
- "type": "command",
8
- "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/trtc_prepare_ui.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/trtc_prepare_ui.py\""
9
- }
10
- ]
11
- }
12
- ],
13
3
  "PreToolUse": [
14
4
  {
15
5
  "matcher": "Read",
16
6
  "hooks": [
17
7
  {
18
8
  "type": "command",
19
- "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-topic/guardrails/gate_slice_read.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-topic/guardrails/gate_slice_read.py\""
9
+ "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/gate_slice_read.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/gate_slice_read.py\""
20
10
  }
21
11
  ]
22
12
  },
@@ -25,22 +15,15 @@
25
15
  "hooks": [
26
16
  {
27
17
  "type": "command",
28
- "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-topic/guardrails/gate_slice_write.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-topic/guardrails/gate_slice_write.py\""
29
- }
30
- ]
31
- }
32
- ],
33
- "PostToolUse": [
34
- {
35
- "matcher": "Write|Edit",
36
- "hooks": [
18
+ "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/topic_phase_gate.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/topic_phase_gate.py\""
19
+ },
37
20
  {
38
21
  "type": "command",
39
- "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/verify_ui_post_write.sh\" ] || bash \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/verify_ui_post_write.sh\""
22
+ "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/gate_slice_write.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/gate_slice_write.py\""
40
23
  },
41
24
  {
42
25
  "type": "command",
43
- "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-apply/guardrails/verify_slice_must_rules.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-apply/guardrails/verify_slice_must_rules.py\""
26
+ "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-conference/hooks/pretooluse_require_business_decisions.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-conference/hooks/pretooluse_require_business_decisions.py\""
44
27
  }
45
28
  ]
46
29
  }
@@ -50,15 +33,7 @@
50
33
  "hooks": [
51
34
  {
52
35
  "type": "command",
53
- "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-topic/guardrails/stop_require_apply_evidence.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-topic/guardrails/stop_require_apply_evidence.py\""
54
- },
55
- {
56
- "type": "command",
57
- "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/trtc_verify_ui.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/room-builder/guardrails/trtc_verify_ui.py\""
58
- },
59
- {
60
- "type": "command",
61
- "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-apply/guardrails/verify_apply_project.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc-apply/guardrails/verify_apply_project.py\""
36
+ "command": "[ ! -f \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/stop_require_apply_evidence.py\" ] || python3 \"${CLAUDE_PLUGIN_ROOT:-${CODEBUDDY_PLUGIN_ROOT}}/skills/trtc/hooks/stop_require_apply_evidence.py\""
62
37
  }
63
38
  ]
64
39
  }