open-multi-agent-kit 0.96.0 → 0.96.2

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 (351) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +34 -6
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +1 -0
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/commands/doctor-provider.d.ts.map +1 -1
  7. package/dist/commands/doctor-provider.js +15 -20
  8. package/dist/commands/doctor-provider.js.map +1 -1
  9. package/dist/commands/resource-doctor-cli.d.ts +22 -0
  10. package/dist/commands/resource-doctor-cli.d.ts.map +1 -0
  11. package/dist/commands/resource-doctor-cli.js +98 -0
  12. package/dist/commands/resource-doctor-cli.js.map +1 -0
  13. package/dist/commands/sdk-session-cli.d.ts +24 -0
  14. package/dist/commands/sdk-session-cli.d.ts.map +1 -0
  15. package/dist/commands/sdk-session-cli.js +225 -0
  16. package/dist/commands/sdk-session-cli.js.map +1 -0
  17. package/dist/core/advisory-judge-model.d.ts +18 -0
  18. package/dist/core/advisory-judge-model.d.ts.map +1 -0
  19. package/dist/core/advisory-judge-model.js +168 -0
  20. package/dist/core/advisory-judge-model.js.map +1 -0
  21. package/dist/core/advisory-judge-response.d.ts +8 -0
  22. package/dist/core/advisory-judge-response.d.ts.map +1 -0
  23. package/dist/core/advisory-judge-response.js +61 -0
  24. package/dist/core/advisory-judge-response.js.map +1 -0
  25. package/dist/core/advisory-judge-types.d.ts +53 -0
  26. package/dist/core/advisory-judge-types.d.ts.map +1 -0
  27. package/dist/core/advisory-judge-types.js +2 -0
  28. package/dist/core/advisory-judge-types.js.map +1 -0
  29. package/dist/core/advisory-judge.d.ts +8 -0
  30. package/dist/core/advisory-judge.d.ts.map +1 -0
  31. package/dist/core/advisory-judge.js +178 -0
  32. package/dist/core/advisory-judge.js.map +1 -0
  33. package/dist/core/agent-session-services.d.ts +1 -0
  34. package/dist/core/agent-session-services.d.ts.map +1 -1
  35. package/dist/core/agent-session-services.js +1 -0
  36. package/dist/core/agent-session-services.js.map +1 -1
  37. package/dist/core/agent-session.d.ts +41 -2
  38. package/dist/core/agent-session.d.ts.map +1 -1
  39. package/dist/core/agent-session.js +396 -179
  40. package/dist/core/agent-session.js.map +1 -1
  41. package/dist/core/auth-storage.d.ts.map +1 -1
  42. package/dist/core/auth-storage.js +28 -4
  43. package/dist/core/auth-storage.js.map +1 -1
  44. package/dist/core/compaction-gate.d.ts +28 -0
  45. package/dist/core/compaction-gate.d.ts.map +1 -0
  46. package/dist/core/compaction-gate.js +34 -0
  47. package/dist/core/compaction-gate.js.map +1 -0
  48. package/dist/core/completion-sound.d.ts +109 -0
  49. package/dist/core/completion-sound.d.ts.map +1 -0
  50. package/dist/core/completion-sound.js +165 -0
  51. package/dist/core/completion-sound.js.map +1 -0
  52. package/dist/core/context-budget-system-prompt-items.d.ts.map +1 -1
  53. package/dist/core/context-budget-system-prompt-items.js +5 -3
  54. package/dist/core/context-budget-system-prompt-items.js.map +1 -1
  55. package/dist/core/domain-loadouts.d.ts.map +1 -1
  56. package/dist/core/domain-loadouts.js +2 -2
  57. package/dist/core/domain-loadouts.js.map +1 -1
  58. package/dist/core/durable-goal-checkpoint.d.ts +6 -0
  59. package/dist/core/durable-goal-checkpoint.d.ts.map +1 -0
  60. package/dist/core/durable-goal-checkpoint.js +195 -0
  61. package/dist/core/durable-goal-checkpoint.js.map +1 -0
  62. package/dist/core/durable-goal-parse.d.ts +3 -0
  63. package/dist/core/durable-goal-parse.d.ts.map +1 -0
  64. package/dist/core/durable-goal-parse.js +86 -0
  65. package/dist/core/durable-goal-parse.js.map +1 -0
  66. package/dist/core/durable-goal-reducer.d.ts +3 -0
  67. package/dist/core/durable-goal-reducer.d.ts.map +1 -0
  68. package/dist/core/durable-goal-reducer.js +175 -0
  69. package/dist/core/durable-goal-reducer.js.map +1 -0
  70. package/dist/core/durable-goal-store.d.ts +19 -0
  71. package/dist/core/durable-goal-store.d.ts.map +1 -0
  72. package/dist/core/durable-goal-store.js +126 -0
  73. package/dist/core/durable-goal-store.js.map +1 -0
  74. package/dist/core/durable-goal.d.ts +92 -0
  75. package/dist/core/durable-goal.d.ts.map +1 -0
  76. package/dist/core/durable-goal.js +62 -0
  77. package/dist/core/durable-goal.js.map +1 -0
  78. package/dist/core/extensions/builtin/goal-controller.d.ts +3 -0
  79. package/dist/core/extensions/builtin/goal-controller.d.ts.map +1 -0
  80. package/dist/core/extensions/builtin/goal-controller.js +125 -0
  81. package/dist/core/extensions/builtin/goal-controller.js.map +1 -0
  82. package/dist/core/extensions/builtin/identical-loop.d.ts +3 -0
  83. package/dist/core/extensions/builtin/identical-loop.d.ts.map +1 -0
  84. package/dist/core/extensions/builtin/identical-loop.js +31 -0
  85. package/dist/core/extensions/builtin/identical-loop.js.map +1 -0
  86. package/dist/core/extensions/builtin/prompt-preset.d.ts +3 -0
  87. package/dist/core/extensions/builtin/prompt-preset.d.ts.map +1 -0
  88. package/dist/core/extensions/builtin/prompt-preset.js +13 -0
  89. package/dist/core/extensions/builtin/prompt-preset.js.map +1 -0
  90. package/dist/core/extensions/builtin/tool-pair-repair.d.ts +3 -0
  91. package/dist/core/extensions/builtin/tool-pair-repair.d.ts.map +1 -0
  92. package/dist/core/extensions/builtin/tool-pair-repair.js +12 -0
  93. package/dist/core/extensions/builtin/tool-pair-repair.js.map +1 -0
  94. package/dist/core/extensions/types.d.ts +6 -2
  95. package/dist/core/extensions/types.d.ts.map +1 -1
  96. package/dist/core/extensions/types.js.map +1 -1
  97. package/dist/core/goal-continuation.d.ts +13 -0
  98. package/dist/core/goal-continuation.d.ts.map +1 -0
  99. package/dist/core/goal-continuation.js +10 -0
  100. package/dist/core/goal-continuation.js.map +1 -0
  101. package/dist/core/grok-harness.d.ts +1 -1
  102. package/dist/core/grok-harness.d.ts.map +1 -1
  103. package/dist/core/grok-harness.js +1 -1
  104. package/dist/core/grok-harness.js.map +1 -1
  105. package/dist/core/grok-playbook.d.ts +1 -1
  106. package/dist/core/grok-playbook.d.ts.map +1 -1
  107. package/dist/core/grok-playbook.js +1 -1
  108. package/dist/core/grok-playbook.js.map +1 -1
  109. package/dist/core/host-resource-probe.d.ts +63 -0
  110. package/dist/core/host-resource-probe.d.ts.map +1 -0
  111. package/dist/core/host-resource-probe.js +126 -0
  112. package/dist/core/host-resource-probe.js.map +1 -0
  113. package/dist/core/host-resource-snapshot.d.ts +54 -0
  114. package/dist/core/host-resource-snapshot.d.ts.map +1 -0
  115. package/dist/core/host-resource-snapshot.js +139 -0
  116. package/dist/core/host-resource-snapshot.js.map +1 -0
  117. package/dist/core/identical-loop.d.ts +15 -0
  118. package/dist/core/identical-loop.d.ts.map +1 -0
  119. package/dist/core/identical-loop.js +34 -0
  120. package/dist/core/identical-loop.js.map +1 -0
  121. package/dist/core/index.d.ts +1 -1
  122. package/dist/core/index.d.ts.map +1 -1
  123. package/dist/core/index.js +1 -1
  124. package/dist/core/index.js.map +1 -1
  125. package/dist/core/model-prompt-policy.d.ts +11 -0
  126. package/dist/core/model-prompt-policy.d.ts.map +1 -0
  127. package/dist/core/model-prompt-policy.js +17 -0
  128. package/dist/core/model-prompt-policy.js.map +1 -0
  129. package/dist/core/model-registry.d.ts.map +1 -1
  130. package/dist/core/model-registry.js +16 -4
  131. package/dist/core/model-registry.js.map +1 -1
  132. package/dist/core/model-resolver.d.ts.map +1 -1
  133. package/dist/core/model-resolver.js +2 -2
  134. package/dist/core/model-resolver.js.map +1 -1
  135. package/dist/core/prompt-budget.d.ts +21 -0
  136. package/dist/core/prompt-budget.d.ts.map +1 -0
  137. package/dist/core/prompt-budget.js +51 -0
  138. package/dist/core/prompt-budget.js.map +1 -0
  139. package/dist/core/prompt-cache.d.ts +14 -0
  140. package/dist/core/prompt-cache.d.ts.map +1 -0
  141. package/dist/core/prompt-cache.js +16 -0
  142. package/dist/core/prompt-cache.js.map +1 -0
  143. package/dist/core/prompt-preset.d.ts +8 -0
  144. package/dist/core/prompt-preset.d.ts.map +1 -0
  145. package/dist/core/prompt-preset.js +56 -0
  146. package/dist/core/prompt-preset.js.map +1 -0
  147. package/dist/core/prompt-settlement.d.ts +81 -0
  148. package/dist/core/prompt-settlement.d.ts.map +1 -0
  149. package/dist/core/prompt-settlement.js +84 -0
  150. package/dist/core/prompt-settlement.js.map +1 -0
  151. package/dist/core/provider-resilience.d.ts +16 -0
  152. package/dist/core/provider-resilience.d.ts.map +1 -1
  153. package/dist/core/provider-resilience.js +24 -2
  154. package/dist/core/provider-resilience.js.map +1 -1
  155. package/dist/core/provider-retry.d.ts +36 -0
  156. package/dist/core/provider-retry.d.ts.map +1 -0
  157. package/dist/core/provider-retry.js +73 -0
  158. package/dist/core/provider-retry.js.map +1 -0
  159. package/dist/core/provider-usage.d.ts +16 -2
  160. package/dist/core/provider-usage.d.ts.map +1 -1
  161. package/dist/core/provider-usage.js +150 -8
  162. package/dist/core/provider-usage.js.map +1 -1
  163. package/dist/core/reasoning-router-resolver.d.ts.map +1 -1
  164. package/dist/core/reasoning-router-resolver.js +1 -1
  165. package/dist/core/reasoning-router-resolver.js.map +1 -1
  166. package/dist/core/resource-admission-config.d.ts +55 -0
  167. package/dist/core/resource-admission-config.d.ts.map +1 -0
  168. package/dist/core/resource-admission-config.js +97 -0
  169. package/dist/core/resource-admission-config.js.map +1 -0
  170. package/dist/core/resource-admission.d.ts +81 -0
  171. package/dist/core/resource-admission.d.ts.map +1 -0
  172. package/dist/core/resource-admission.js +128 -0
  173. package/dist/core/resource-admission.js.map +1 -0
  174. package/dist/core/resource-governor-format.d.ts +50 -0
  175. package/dist/core/resource-governor-format.d.ts.map +1 -0
  176. package/dist/core/resource-governor-format.js +113 -0
  177. package/dist/core/resource-governor-format.js.map +1 -0
  178. package/dist/core/resource-governor-settings.d.ts +56 -0
  179. package/dist/core/resource-governor-settings.d.ts.map +1 -0
  180. package/dist/core/resource-governor-settings.js +89 -0
  181. package/dist/core/resource-governor-settings.js.map +1 -0
  182. package/dist/core/resource-loader.d.ts.map +1 -1
  183. package/dist/core/resource-loader.js +32 -0
  184. package/dist/core/resource-loader.js.map +1 -1
  185. package/dist/core/resource-observation-journal.d.ts +74 -0
  186. package/dist/core/resource-observation-journal.d.ts.map +1 -0
  187. package/dist/core/resource-observation-journal.js +198 -0
  188. package/dist/core/resource-observation-journal.js.map +1 -0
  189. package/dist/core/resource-safety-gate.d.ts +54 -0
  190. package/dist/core/resource-safety-gate.d.ts.map +1 -0
  191. package/dist/core/resource-safety-gate.js +51 -0
  192. package/dist/core/resource-safety-gate.js.map +1 -0
  193. package/dist/core/run-journal.d.ts.map +1 -1
  194. package/dist/core/run-journal.js +13 -1
  195. package/dist/core/run-journal.js.map +1 -1
  196. package/dist/core/run-resource-lease.d.ts +73 -0
  197. package/dist/core/run-resource-lease.d.ts.map +1 -0
  198. package/dist/core/run-resource-lease.js +78 -0
  199. package/dist/core/run-resource-lease.js.map +1 -0
  200. package/dist/core/sandbox/backend.d.ts +12 -0
  201. package/dist/core/sandbox/backend.d.ts.map +1 -1
  202. package/dist/core/sandbox/backend.js +52 -42
  203. package/dist/core/sandbox/backend.js.map +1 -1
  204. package/dist/core/sandbox/policy.d.ts +2 -0
  205. package/dist/core/sandbox/policy.d.ts.map +1 -1
  206. package/dist/core/sandbox/policy.js +2 -1
  207. package/dist/core/sandbox/policy.js.map +1 -1
  208. package/dist/core/sdk.d.ts +2 -0
  209. package/dist/core/sdk.d.ts.map +1 -1
  210. package/dist/core/sdk.js +1 -0
  211. package/dist/core/sdk.js.map +1 -1
  212. package/dist/core/session-bash-service.d.ts +12 -0
  213. package/dist/core/session-bash-service.d.ts.map +1 -1
  214. package/dist/core/session-bash-service.js +14 -0
  215. package/dist/core/session-bash-service.js.map +1 -1
  216. package/dist/core/session-system-prompt.d.ts +30 -0
  217. package/dist/core/session-system-prompt.d.ts.map +1 -0
  218. package/dist/core/session-system-prompt.js +39 -0
  219. package/dist/core/session-system-prompt.js.map +1 -0
  220. package/dist/core/session-termination.d.ts +7 -2
  221. package/dist/core/session-termination.d.ts.map +1 -1
  222. package/dist/core/session-termination.js +29 -1
  223. package/dist/core/session-termination.js.map +1 -1
  224. package/dist/core/settings-manager.d.ts +12 -0
  225. package/dist/core/settings-manager.d.ts.map +1 -1
  226. package/dist/core/settings-manager.js +36 -0
  227. package/dist/core/settings-manager.js.map +1 -1
  228. package/dist/core/slash-commands.d.ts.map +1 -1
  229. package/dist/core/slash-commands.js +1 -0
  230. package/dist/core/slash-commands.js.map +1 -1
  231. package/dist/core/strict-record.d.ts +2 -0
  232. package/dist/core/strict-record.d.ts.map +1 -0
  233. package/dist/core/strict-record.js +9 -0
  234. package/dist/core/strict-record.js.map +1 -0
  235. package/dist/core/subagent-lane-launcher.d.ts +64 -0
  236. package/dist/core/subagent-lane-launcher.d.ts.map +1 -0
  237. package/dist/core/subagent-lane-launcher.js +107 -0
  238. package/dist/core/subagent-lane-launcher.js.map +1 -0
  239. package/dist/core/system-cpu-sampler.d.ts +45 -0
  240. package/dist/core/system-cpu-sampler.d.ts.map +1 -0
  241. package/dist/core/system-cpu-sampler.js +95 -0
  242. package/dist/core/system-cpu-sampler.js.map +1 -0
  243. package/dist/core/system-prompt.d.ts.map +1 -1
  244. package/dist/core/system-prompt.js +5 -8
  245. package/dist/core/system-prompt.js.map +1 -1
  246. package/dist/core/tool-pair-repair.d.ts +11 -0
  247. package/dist/core/tool-pair-repair.d.ts.map +1 -0
  248. package/dist/core/tool-pair-repair.js +38 -0
  249. package/dist/core/tool-pair-repair.js.map +1 -0
  250. package/dist/core/tools/artifact-spill.d.ts +13 -0
  251. package/dist/core/tools/artifact-spill.d.ts.map +1 -0
  252. package/dist/core/tools/artifact-spill.js +26 -0
  253. package/dist/core/tools/artifact-spill.js.map +1 -0
  254. package/dist/core/tools/bash.d.ts +7 -4
  255. package/dist/core/tools/bash.d.ts.map +1 -1
  256. package/dist/core/tools/bash.js +8 -7
  257. package/dist/core/tools/bash.js.map +1 -1
  258. package/dist/core/tools/index.d.ts +1 -1
  259. package/dist/core/tools/index.d.ts.map +1 -1
  260. package/dist/core/tools/index.js.map +1 -1
  261. package/dist/core/tools/read.d.ts +1 -0
  262. package/dist/core/tools/read.d.ts.map +1 -1
  263. package/dist/core/tools/read.js +10 -1
  264. package/dist/core/tools/read.js.map +1 -1
  265. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  266. package/dist/core/tools/tool-definition-wrapper.js +2 -0
  267. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  268. package/dist/core/workload-classifier.d.ts +32 -0
  269. package/dist/core/workload-classifier.d.ts.map +1 -0
  270. package/dist/core/workload-classifier.js +66 -0
  271. package/dist/core/workload-classifier.js.map +1 -0
  272. package/dist/core/workload-family-matcher.d.ts +3 -0
  273. package/dist/core/workload-family-matcher.d.ts.map +1 -0
  274. package/dist/core/workload-family-matcher.js +126 -0
  275. package/dist/core/workload-family-matcher.js.map +1 -0
  276. package/dist/core/workload-permit-pool.d.ts +78 -0
  277. package/dist/core/workload-permit-pool.d.ts.map +1 -0
  278. package/dist/core/workload-permit-pool.js +138 -0
  279. package/dist/core/workload-permit-pool.js.map +1 -0
  280. package/dist/core/workload-shard-executor.d.ts +68 -0
  281. package/dist/core/workload-shard-executor.d.ts.map +1 -0
  282. package/dist/core/workload-shard-executor.js +156 -0
  283. package/dist/core/workload-shard-executor.js.map +1 -0
  284. package/dist/core/workload-shard-plan.d.ts +81 -0
  285. package/dist/core/workload-shard-plan.d.ts.map +1 -0
  286. package/dist/core/workload-shard-plan.js +183 -0
  287. package/dist/core/workload-shard-plan.js.map +1 -0
  288. package/dist/core/workload-shard-runner.d.ts +11 -0
  289. package/dist/core/workload-shard-runner.d.ts.map +1 -0
  290. package/dist/core/workload-shard-runner.js +98 -0
  291. package/dist/core/workload-shard-runner.js.map +1 -0
  292. package/dist/core/workload-shard-store.d.ts +44 -0
  293. package/dist/core/workload-shard-store.d.ts.map +1 -0
  294. package/dist/core/workload-shard-store.js +189 -0
  295. package/dist/core/workload-shard-store.js.map +1 -0
  296. package/dist/core/workload-sharders.d.ts +47 -0
  297. package/dist/core/workload-sharders.d.ts.map +1 -0
  298. package/dist/core/workload-sharders.js +162 -0
  299. package/dist/core/workload-sharders.js.map +1 -0
  300. package/dist/core/workload-shell-scan.d.ts +12 -0
  301. package/dist/core/workload-shell-scan.d.ts.map +1 -0
  302. package/dist/core/workload-shell-scan.js +79 -0
  303. package/dist/core/workload-shell-scan.js.map +1 -0
  304. package/dist/index.d.ts +18 -1
  305. package/dist/index.d.ts.map +1 -1
  306. package/dist/index.js +18 -0
  307. package/dist/index.js.map +1 -1
  308. package/dist/main.d.ts.map +1 -1
  309. package/dist/main.js +14 -0
  310. package/dist/main.js.map +1 -1
  311. package/dist/modes/interactive/interactive-mode.d.ts +4 -0
  312. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  313. package/dist/modes/interactive/interactive-mode.js +81 -0
  314. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  315. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  316. package/dist/modes/interactive/theme/theme.js +14 -3
  317. package/dist/modes/interactive/theme/theme.js.map +1 -1
  318. package/docs/adaptorch-preview-spec.md +1 -1
  319. package/docs/adaptorch-preview.md +2 -2
  320. package/docs/book-to-skill.md +1 -1
  321. package/docs/containerization.md +9 -0
  322. package/docs/docs.json +11 -3
  323. package/docs/environment-variables.md +11 -4
  324. package/docs/extensions.md +14 -1
  325. package/docs/grok-harness.md +35 -12
  326. package/docs/index.md +7 -6
  327. package/docs/loadout-domains/grok-harness.md +2 -2
  328. package/docs/models.md +10 -9
  329. package/docs/provider-resilience.md +9 -3
  330. package/docs/providers.md +9 -4
  331. package/docs/run-protocol.md +32 -0
  332. package/docs/sdk.md +100 -3
  333. package/docs/security.md +22 -32
  334. package/docs/sessions.md +14 -0
  335. package/docs/settings.md +64 -2
  336. package/docs/skills.md +16 -0
  337. package/docs/usage.md +37 -15
  338. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  339. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  340. package/examples/extensions/custom-provider-gitlab-duo/index.ts +6 -1
  341. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  342. package/examples/extensions/gondolin/package-lock.json +2 -2
  343. package/examples/extensions/gondolin/package.json +1 -1
  344. package/examples/extensions/sandbox/package-lock.json +2 -2
  345. package/examples/extensions/sandbox/package.json +1 -1
  346. package/examples/extensions/subagent/agent-capability-router.test.ts +7 -0
  347. package/examples/extensions/subagent/domain-profiles.ts +0 -1
  348. package/examples/extensions/with-deps/package-lock.json +2 -2
  349. package/examples/extensions/with-deps/package.json +1 -1
  350. package/npm-shrinkwrap.json +18 -18
  351. package/package.json +7 -9
@@ -1 +1 @@
1
- {"version":3,"file":"domain-loadouts.d.ts","sourceRoot":"","sources":["../../src/core/domain-loadouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAmC,cAAc,EAAY,MAAM,eAAe,CAAC;AAE/F,yCAAyC;AACzC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;AAErE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB;AAED,6EAA6E;AAC7E,MAAM,WAAW,aAAc,SAAQ,cAAc;IACpD,sEAAsE;IACtE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAC/B;AAeD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAw+BnE,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAkE,CAAC;AAE3G,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAE1D;AAED,sFAAsF;AACtF,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAOhF","sourcesContent":["/**\n * Domain capability profiles — domain-aware \"inherited documents\" for the OMK\n * control plane.\n *\n * OMK ships role-based loadouts (`loadouts.ts`: inspect/plan/code/test/review/\n * security/package-maintainer/none). This module adds an orthogonal, **domain**\n * layer: each domain profile is a curated capability bundle (skills + MCP +\n * hooks + tool gate + authority + command mode) tuned for one class of work,\n * plus a very detailed English `routingPrompt` and deterministic `triggers`\n * used by `domain-router.ts` to pick the right bundle for an incoming task.\n *\n * A `DomainProfile` is a `LoadoutProfile` augmented with routing metadata, so it\n * composes with the existing `applyLoadoutProfile()` runtime: the router selects\n * a domain, the domain profile gates which skills/MCP/hooks are active, and the\n * caller still picks the role authority. This keeps the new layer purely\n * additive — no existing loadout behavior changes.\n *\n * This module is I/O-free and side-effect-free. All resource names (skills,\n * MCP servers, hooks) reference canonical identifiers discovered by\n * `resource-loader.ts`, `mcp-inventory.ts`, and `hook-inventory.ts`.\n *\n * Erasable TypeScript only (no enum/namespace/parameter properties).\n */\n\nimport type { CapabilityGate, LoadoutCommands, LoadoutProfile, ToolGate } from \"./loadouts.ts\";\n\n/** Signal kinds the router evaluates. */\nexport type TriggerKind = \"keyword\" | \"regex\" | \"extension\" | \"path\";\n\n/**\n * One routing signal for a domain.\n *\n * - `keyword`: case-insensitive, word-boundary substring of the task text.\n * Multi-word phrases are matched literally. Matched occurrences are counted\n * (capped) so repeated mentions raise confidence.\n * - `regex`: matched against the lowercased task text via RegExp. Use for\n * intent clusters that keywords cannot express compactly (e.g. `cve-\\d`).\n * - `extension`: matched against the suffix of any provided path hint.\n * - `path`: glob fragment matched against any provided path hint.\n */\nexport interface TriggerSpec {\n\treadonly kind: TriggerKind;\n\treadonly pattern: string;\n\treadonly weight: number;\n}\n\n/** Domain routing + identity metadata layered on top of a LoadoutProfile. */\nexport interface DomainProfile extends LoadoutProfile {\n\t/** Stable domain id, e.g. \"frontend-ui\". Used as the registry key. */\n\treadonly id: string;\n\t/** Human label, e.g. \"Frontend & UI\". */\n\treadonly label: string;\n\t/** Deterministic routing signals consumed by `domain-router.ts`. */\n\treadonly triggers: readonly TriggerSpec[];\n\t/**\n\t * Detailed English routing prompt. When the router selects this domain, the\n\t * orchestrator prepends this to the lane's task prompt so the model knows\n\t * exactly which capabilities to lean on and how to sequence the work.\n\t */\n\treadonly routingPrompt: string;\n}\n\nconst READ_TOOLS: ToolGate = { allow: [\"read\", \"grep\", \"find\", \"ls\"] };\nconst WRITE_TOOLS: ToolGate = { allow: [\"read\", \"grep\", \"find\", \"ls\", \"edit\", \"write\", \"bash\"] };\nconst TEST_TOOLS: ToolGate = { allow: [\"read\", \"grep\", \"find\", \"ls\", \"bash\"] };\nconst SECURITY_TOOLS: ToolGate = { allow: [\"read\", \"grep\", \"find\", \"ls\", \"bash\"] };\n\nfunction gate(kind: \"skill\" | \"mcp\" | \"hook\", names: readonly string[]): CapabilityGate {\n\treturn { allow: [{ kind, names }] };\n}\n\nfunction commands(mode: LoadoutCommands[\"mode\"], extras?: Partial<LoadoutCommands>): LoadoutCommands {\n\treturn { mode, ...extras };\n}\n\n/**\n * All domain profiles, keyed by id. Order is intentional only for human reading;\n * the router scores every entry independently.\n *\n * Each profile curates real, currently-available resources. When a referenced\n * resource is not present in a given install, `applyLoadoutProfile()` simply\n * omits it (allow-lists are permissive intersections with inventory), so\n * profiles degrade gracefully on minimal installs.\n */\nexport const DOMAIN_PROFILES: Readonly<Record<string, DomainProfile>> = {\n\t\"frontend-ui\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"frontend-ui\",\n\t\tname: \"frontend-ui\",\n\t\tlabel: \"Frontend & UI\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"frontend-design\",\n\t\t\t\"frontend-ui-engineering\",\n\t\t\t\"frontend-patterns\",\n\t\t\t\"baseline-ui\",\n\t\t\t\"impeccable\",\n\t\t\t\"shape\",\n\t\t\t\"make-interfaces-feel-better\",\n\t\t\t\"transitions-dev\",\n\t\t\t\"animate\",\n\t\t\t\"polish\",\n\t\t\t\"layout\",\n\t\t\t\"typeset\",\n\t\t\t\"colorize\",\n\t\t\t\"oklch-skill\",\n\t\t\t\"high-end-visual-design\",\n\t\t\t\"minimalist-ui\",\n\t\t\t\"design-taste-frontend\",\n\t\t\t\"design-taste-frontend-v1\",\n\t\t\t\"redesign-existing-projects\",\n\t\t\t\"brandkit\",\n\t\t\t\"imagegen-frontend-web\",\n\t\t\t\"imagegen-frontend-mobile\",\n\t\t\t\"web-design-guidelines\",\n\t\t\t\"fixing-accessibility\",\n\t\t\t\"contrast-checker\",\n\t\t\t\"use-of-color\",\n\t\t\t\"fixing-motion-performance\",\n\t\t\t\"12-principles-of-animation\",\n\t\t\t\"to-spring-or-not-to-spring\",\n\t\t\t\"mastering-animate-presence\",\n\t\t\t\"pseudo-elements\",\n\t\t\t\"shadcn\",\n\t\t\t\"next-best-practices\",\n\t\t\t\"next-cache-components\",\n\t\t\t\"vercel-react-best-practices\",\n\t\t\t\"vercel-composition-patterns\",\n\t\t\t\"vue-best-practices\",\n\t\t\t\"vue\",\n\t\t\t\"svelte-code-writer\",\n\t\t\t\"react-pdf\",\n\t\t\t\"remotion-best-practices\",\n\t\t\t\"web-quality-audit\",\n\t\t\t\"audit-and-fix\",\n\t\t\t\"browser-qa\",\n\t\t\t\"webapp-testing\",\n\t\t\t\"e2e-testing\",\n\t\t\t\"playwright-cli\",\n\t\t\t\"image-to-code\",\n\t\t\t\"visual-ralph\",\n\t\t\t\"visual-regression\",\n\t\t\t\"visual-diff\",\n\t\t\t\"gstack-design-review\",\n\t\t\t\"gstack-design-html\",\n\t\t\t\"gstack-design-shotgun\",\n\t\t\t\"clone-website\",\n\t\t\t\"ui-design-brain\",\n\t\t\t\"interface-design\",\n\t\t\t\"emil-design-eng\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"chrome-devtools\", \"playwright\", \"filesystem\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\n\t\t\t\"typecheck-after-edit\",\n\t\t\t\"pre-shell-guard\",\n\t\t\t\"protect-secrets\",\n\t\t\t\"component-spec-before-build\",\n\t\t\t\"visual-diff-after-edit\",\n\t\t\t\"bounded-evidence\",\n\t\t]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"ui\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"frontend\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"component\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"컴포넌트\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"디자인\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"css\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"tailwind\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"responsive\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"layout\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"design\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"accessibility\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"a11y\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"animation\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"pixel-perfect\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"landing page\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"redesign\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"button\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"modal\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"shadcn\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"clone\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"website clone\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"clone website\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"rebuild website\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"recreate website\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"pixel-perfect clone\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"visual diff\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"design tokens\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"component spec\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"getcomputedstyle\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"reconnaissance\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"클론\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"스크린샷\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(react|vue|svelte|next\\\\.?js|nuxt)\\\\b\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(tailwind|css|styled|emotion|radix)\\\\b\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(visual qa|responsive sweep|interaction sweep|computed styles?)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".vue\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".tsx\", weight: 4 },\n\t\t\t{ kind: \"extension\", pattern: \".jsx\", weight: 4 },\n\t\t\t{ kind: \"extension\", pattern: \".css\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"components/\", weight: 4 },\n\t\t\t{ kind: \"path\", pattern: \"app/page\", weight: 3 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Frontend & UI. You are operating in a frontend/UI capability lane.\nPrioritize visual craft, correct component composition, and accessibility.\n\nSEQUENCE:\n1. Read the target component(s)/page(s) in full before editing. Do not edit blind from search snippets.\n2. Identify the design system in use (Tailwind v4 / shadcn/ui / CSS modules / vanilla). Match it exactly; never introduce a second system. Use context7 for current framework/library docs before changing unfamiliar APIs.\n3. Website clone / visual QA work follows the ai-website-cloner-template gate contract:\n Reconnaissance -> Design-Token Foundation -> Component Specs -> Asset Gate -> Build Gate -> QA Gate.\n Reconnaissance uses Chrome/Playwright: chrome-devtools first for live inspection, playwright when deterministic multi-viewport screenshots or scripted interaction sweeps are needed. Capture screenshots at responsive sizes 1440/768/390, getComputedStyle design-token samples, assets, page topology, hover/click/scroll/time-driven behavior, and responsive breakpoints.\n4. Design-Token Foundation is sequential: fonts, oklch/shadcn-compatible tokens, global CSS, page-level motion primitives, icon extraction, downloaded assets, and typed content structures. Do not dispatch component builders until the foundation exists.\n5. Component Specs are contracts: component-spec-before-build requires a spec artifact before implementation. Specs include exact getComputedStyle values, DOM structure, interaction model, all states, assets, verbatim content, and responsive behavior. Split anything whose builder prompt would exceed ~150 lines.\n6. Asset Gate: real extractable assets are downloaded, named, and referenced before build; no mock assets when source assets are available.\n7. Build Gate: one builder per section or sub-component receives the full spec inline plus screenshot path, target file, imports, breakpoint behavior, and a typecheck/build requirement. Assembly wires sections into page-level layout and behaviors.\n8. QA Gate: visual-diff-after-edit requires side-by-side visual diff artifacts against the reference at 1440/768/390. Test interactions with Chrome/Playwright; run web-quality-audit for perf/a11y/SEO/best-practices and typecheck-after-edit before done.\n9. Evidence must include screenshots, getComputedStyle captures, responsive sizes 1440/768/390, side-by-side visual diff artifacts, Chrome/Playwright command/tool results, changed files, and known discrepancies.\n10. Accessibility: run the fixing-accessibility + contrast-checker + use-of-color skills. Every interactive element needs a reachable name, visible focus, and AA contrast.\n11. Motion: prefer the transitions-dev / animate / 12-principles-of-animation skills; gate heavy effects behind fix-motion-performance so animation never blocks the main thread.\n12. Prefer composition over boolean-prop sprawl (vercel-composition-patterns). Keep components small and spec-driven.\n\nHARD RULES: no inline styles when a token/utility exists; oklch tokens for color; mobile-first responsive; real content over placeholders; pixel-match the target first, customize later; no visual claim without bounded screenshot/diff evidence.`,\n\t},\n\n\t\"visual-qa\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"visual-qa\",\n\t\tname: \"visual-qa\",\n\t\tlabel: \"Visual QA & Website Cloning\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"clone-website\",\n\t\t\t\"browser-qa\",\n\t\t\t\"webapp-testing\",\n\t\t\t\"e2e-testing\",\n\t\t\t\"playwright-cli\",\n\t\t\t\"web-quality-audit\",\n\t\t\t\"audit-and-fix\",\n\t\t\t\"visual-regression\",\n\t\t\t\"visual-diff\",\n\t\t\t\"visual-ralph\",\n\t\t\t\"image-to-code\",\n\t\t\t\"frontend-ui-engineering\",\n\t\t\t\"frontend-design\",\n\t\t\t\"fixing-accessibility\",\n\t\t\t\"contrast-checker\",\n\t\t\t\"use-of-color\",\n\t\t\t\"fix-motion-performance\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"chrome-devtools\", \"playwright\", \"filesystem\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\n\t\t\t\"component-spec-before-build\",\n\t\t\t\"visual-diff-after-edit\",\n\t\t\t\"typecheck-after-edit\",\n\t\t\t\"pre-shell-guard\",\n\t\t\t\"protect-secrets\",\n\t\t\t\"bounded-evidence\",\n\t\t\t\"stop-verify\",\n\t\t]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"visual qa\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"visual diff\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"screenshot diff\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"website clone\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"clone website\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"pixel-perfect clone\", weight: 9 },\n\t\t\t{ kind: \"keyword\", pattern: \"responsive sweep\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"interaction sweep\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"component spec\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"getcomputedstyle\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"design tokens\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"assembly qa\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"reconnaissance\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"클론\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"스크린샷\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(pixel[ -]?perfect|visual regression|viewport sweep)\\\\b\", weight: 7 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(recreate|rebuild|reverse-engineer)\\\\b.*\\\\b(website|page|site)\\\\b\", weight: 7 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Visual QA & Website Cloning. You are operating in a browser-driven UI reconstruction and verification lane.\nThis domain carries the ai-website-cloner-template workflow inside OMK loadouts without copying its project scaffold.\nPipeline: Reconnaissance -> Design-Token Foundation -> Component Specs -> Asset Gate -> Build Gate -> QA Gate.\n\nSEQUENCE:\n1. Pre-flight: browser automation is required. Prefer Chrome/Playwright: chrome-devtools for live inspection, playwright for deterministic screenshot, viewport, and interaction replay. Use context7 for current framework and Playwright docs before coding against unfamiliar APIs.\n2. Reconnaissance: capture full-page screenshots at responsive sizes 1440/768/390, getComputedStyle color/type/spacing tokens, assets, page topology, z-index/sticky overlays, scroll/click/hover/time behavior, and responsive breakpoints. Save bounded artifacts and behavior notes.\n3. Design-Token Foundation: update only the target project's existing frontend foundation: fonts, globals, tokens, icon extraction, downloaded assets, typed content structures, and page-level motion primitives. Foundation is sequential.\n4. Component Specs: component-spec-before-build requires one spec per section/sub-component before implementation. Specs include exact getComputedStyle values, DOM structure, all states, interaction model, assets, verbatim text, screenshots, and responsive behavior. Split specs that would create a builder prompt over ~150 lines.\n5. Asset Gate: real extractable assets are downloaded, named, and referenced before build; no mock assets when source assets are available.\n6. Build Gate: dispatch or implement one section/sub-component at a time from its spec; builders receive the full spec inline, not a pointer. Require typecheck-after-edit and the target project's build/smoke command before merging/assembling.\n7. QA Gate: wire sections into page layout, then visual-diff-after-edit requires side-by-side visual diff artifacts against the reference at 1440/768/390. Re-test scroll, hover, click, tab, carousel, modal, and animation behavior with Chrome/Playwright.\n8. Evidence: bounded-evidence records screenshots, getComputedStyle captures, responsive sizes 1440/768/390, side-by-side visual diff paths, Chrome/Playwright command/tool results, changed files, known discrepancies, and any remaining fidelity gaps.\n\nHARD RULES: no guessed CSS values; no builder without a spec artifact; no mock assets when real assets are extractable; no completion claim without visual diff evidence; general Playwright test failures without visual/reconstruction intent stay in qa-testing.`,\n\t},\n\n\t\"korean-document\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"korean-document\",\n\t\tname: \"korean-document\",\n\t\tlabel: \"Korean Document (HWP/HWPX)\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"rhwp\",\n\t\t\t\"rhwp-edit\",\n\t\t\t\"rhwp-advanced\",\n\t\t\t\"hwp\",\n\t\t\t\"kordoc\",\n\t\t\t\"document-conversion\",\n\t\t\t\"document-extraction\",\n\t\t\t\"pdf\",\n\t\t\t\"react-pdf\",\n\t\t\t\"verification-loop\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"context7\", \"chrome-devtools\", \"playwright\"]),\n\t\thooks: gate(\"hook\", [\n\t\t\t\"pre-shell-guard\",\n\t\t\t\"protect-secrets\",\n\t\t\t\"bounded-evidence\",\n\t\t\t\"document-artifact-guard\",\n\t\t\t\"stop-verify\",\n\t\t]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"hwp\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"hwpx\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"rhwp\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"hancom\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"hangul document\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"한글 문서\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"아래아한글\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"한컴\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"hwp to markdown\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"hwp to pdf\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"hwpx to pdf\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"svg export\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"document metadata\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(hwp|hwpx|rhwp|hancom)\\\\b\", weight: 7 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(extract|render|export|metadata)\\\\b.*\\\\b(hwp|hwpx)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".hwp\", weight: 9 },\n\t\t\t{ kind: \"extension\", pattern: \".hwpx\", weight: 9 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Korean Document (HWP/HWPX). You are operating in a document extraction/rendering/export lane for Korean Hangul documents.\nUse OMK skills, MCP, and hooks to orchestrate rhwp-style capability without vendoring Rust, WASM, or CLI binaries into the repo.\n\nSEQUENCE:\n1. Detection first: identify HWP/HWPX by extension plus container sniffing. HWP is normally OLE Compound File Binary; HWPX is normally ZIP/XML package content. Never trust extension alone. Record filename, byte size, hash, detected format, and whether the file appears encrypted/protected.\n2. Load current docs with context7 before coding against @rhwp/core, rhwp APIs, pdf rendering packages, or browser automation APIs. Use project-installed tools when present; do not add or vendor rhwp Rust/WASM/CLI artifacts unless the user explicitly requests dependency work.\n3. Extraction path: produce bounded text and markdown outputs, structured metadata, section/page outline, tables, images/assets references, equations/charts notes, and warnings for unsupported controls. Keep private document content bounded: short excerpts, counts, hashes, and output paths rather than dumping whole documents.\n4. Render path: use rhwp-oriented skills for layout/page fidelity. Use chrome-devtools/playwright only to render or capture web/WASM/canvas/SVG views that already exist in the project. Capture SVG/page snapshots and PNG evidence with viewport/page labels.\n5. Export path: support text, markdown, svg, png, and pdf outputs. Prefer native/project export APIs when available; otherwise assemble via browser-rendered SVG/canvas/PDF flows. Always write artifacts to an explicit output directory and report a manifest.\n6. Metadata path: collect page count, section count, dimensions, fonts, embedded images, tables, headers/footers, footnotes/endnotes, equations/charts, fields, protection/encryption status, and conversion warnings.\n7. Evidence: bounded-evidence and document-artifact-guard require an artifact manifest containing input hash, detected format, commands/tools used, output paths, output byte sizes, page/sample counts, warnings, and at most small redacted excerpts. stop-verify must pass before done.\n\nHARD RULES: no vendored rhwp binaries; no fake conversion claims; no full private document dump in chat; output artifacts must be traceable; every render/export claim needs bounded evidence.`,\n\t},\n\n\t\"backend-api\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"backend-api\",\n\t\tname: \"backend-api\",\n\t\tlabel: \"Backend & API\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"backend-patterns\",\n\t\t\t\"api-design\",\n\t\t\t\"postgres-patterns\",\n\t\t\t\"supabase\",\n\t\t\t\"supabase-postgres-best-practices\",\n\t\t\t\"database-migrations\",\n\t\t\t\"clickhouse-io\",\n\t\t\t\"redis\",\n\t\t\t\"django-patterns\",\n\t\t\t\"django-tdd\",\n\t\t\t\"django-verification\",\n\t\t\t\"laravel-patterns\",\n\t\t\t\"laravel-tdd\",\n\t\t\t\"laravel-verification\",\n\t\t\t\"springboot-patterns\",\n\t\t\t\"springboot-tdd\",\n\t\t\t\"springboot-verification\",\n\t\t\t\"jpa-patterns\",\n\t\t\t\"python-patterns\",\n\t\t\t\"python-testing\",\n\t\t\t\"golang-patterns\",\n\t\t\t\"golang-testing\",\n\t\t\t\"kotlin-patterns\",\n\t\t\t\"rust-patterns\",\n\t\t\t\"java-coding-standards\",\n\t\t\t\"cpp-coding-standards\",\n\t\t\t\"perl-patterns\",\n\t\t\t\"mcp-server-patterns\",\n\t\t\t\"mcp-build-mcp\",\n\t\t\t\"claude-api\",\n\t\t\t\"codex-api\",\n\t\t\t\"security-review\",\n\t\t\t\"verification-loop\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"supabase\", \"github\", \"context7\", \"memory\"]),\n\t\thooks: gate(\"hook\", [\"pre-shell-guard\", \"protect-secrets\", \"typecheck-after-edit\", \"npm-audit-summary\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"backend\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"api\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"endpoint\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"database\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"query performance\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"query\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"migration\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"schema\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"server\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"auth\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"postgres\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"supabase\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"sql\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"rest\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"graphql\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"orm\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"django\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"spring\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"laravel\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(route|controller|service|repository|model|dto)\\\\b\", weight: 3 },\n\t\t\t{ kind: \"extension\", pattern: \".py\", weight: 3 },\n\t\t\t{ kind: \"extension\", pattern: \".go\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".rs\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".java\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".kt\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"api/\", weight: 4 },\n\t\t\t{ kind: \"path\", pattern: \"server/\", weight: 4 },\n\t\t\t{ kind: \"path\", pattern: \"migrations/\", weight: 6 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Backend & API. You are operating in a backend/API capability lane.\nPrioritize correct data modeling, transactional integrity, and idiomatic framework patterns.\n\nSEQUENCE:\n1. Read the affected route/controller/service/repo and the schema in full first.\n2. For data changes: prefer the database-migrations skill (additive + backfill + expand/contract); never destructive in a single step. Validate with the framework verification skill (django-verification / laravel-verification / springboot-verification).\n3. Query work: apply postgres-patterns / supabase-postgres-best-practices (indexes, EXPLAIN, RLS). ClickHouse analytics use clickhouse-io.\n4. API shape: api-design skill for resource naming, status codes, pagination, error envelopes, versioning.\n5. Integrating LLMs: claude-api / codex-api skills for correct model ids, streaming, tool use, caching. Building an MCP server: mcp-server-patterns + mcp-build-mcp.\n6. Language idiom: use the matching *-patterns skill (python/golang/rust/kotlin/perl/cpp). Type-strict, no \\`any\\`.\n7. Security baseline: run security-review before claiming done; secrets never logged (protect-secrets hook enforces).\n\nHARD RULES: parameterized queries only; migrations are reversible; no silent catch-and-swallow; new endpoints get the matching framework test (django-tdd / laravel-tdd / springboot-tdd).`,\n\t},\n\n\t\"data-science\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"data-science\",\n\t\tname: \"data-science\",\n\t\tlabel: \"Data Science & Analysis\",\n\t\tauthority: \"execute-tests\",\n\t\ttools: TEST_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"exploratory-data-analysis\",\n\t\t\t\"polars\",\n\t\t\t\"dask\",\n\t\t\t\"matplotlib\",\n\t\t\t\"seaborn\",\n\t\t\t\"plotly\",\n\t\t\t\"scientific-visualization\",\n\t\t\t\"scikit-learn\",\n\t\t\t\"pytorch-lightning\",\n\t\t\t\"transformers\",\n\t\t\t\"networkx\",\n\t\t\t\"pymc\",\n\t\t\t\"statsmodels\",\n\t\t\t\"sympy\",\n\t\t\t\"statistical-analysis\",\n\t\t\t\"shap\",\n\t\t\t\"rdkit\",\n\t\t\t\"biopython\",\n\t\t\t\"scanpy\",\n\t\t\t\"astropy\",\n\t\t\t\"qiskit\",\n\t\t\t\"deepchem\",\n\t\t\t\"molecular-dynamics\",\n\t\t\t\"hypothesis-generation\",\n\t\t\t\"literature-review\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"memory\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\"pre-shell-guard\", \"protect-secrets\", \"stop-verify\"]),\n\t\tcommands: commands(\"tests-only\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"data\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"analysis\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"dataframe\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"model\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"training\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"dataset\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"vector search\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"statistics\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"regression\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"classification\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"visualization\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"plot\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"notebook\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"pandas\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"polars\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"numpy\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"pytorch\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"tensorflow\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"scikit\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"bayesian\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(eda|ml|machine learning|inference|embeddings?)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".ipynb\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"notebooks/\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \"models/\", weight: 3 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Data Science & Analysis. You are operating in an analysis/modeling capability lane.\nPrioritize correct statistical reasoning, reproducibility, and honest uncertainty.\n\nSEQUENCE:\n1. Start with exploratory-data-analysis: shape, dtypes, missingness, distributions, basic sanity checks — never skip straight to modeling.\n2. Pick the dataframe engine by size: polars for in-memory speed, dask for larger-than-RAM. Do not reach for pandas by reflex.\n3. Visualization: seaborn/plotly for exploration, scientific-visualization for publication figures (colorblind-safe, correct error bars, journal styling).\n4. Modeling: scikit-learn for classical, pytorch-lightning for DL. State assumptions, then validate with statistical-analysis (right test, assumption checks, power). Bayesian work uses pymc; report with statsmodels.\n5. Interpretability: shap for global/local explanations; do not ship a black box without them.\n6. Reproducibility: fix seeds, pin versions, commit the exact data hash. Prefer scripts/functions over ad-hoc notebook cells for anything reused.\n\nHARD RULES: report effect size + CI, not just p-values; never train on test; never impute silently; notebooks are for exploration, modules are for production.`,\n\t},\n\n\t\"security-audit\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"security-audit\",\n\t\tname: \"security-audit\",\n\t\tlabel: \"Security Audit\",\n\t\tauthority: \"security-review\",\n\t\ttools: SECURITY_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"security-review\",\n\t\t\t\"security-scan\",\n\t\t\t\"differential-review\",\n\t\t\t\"semgrep\",\n\t\t\t\"codeql\",\n\t\t\t\"sarif-parsing\",\n\t\t\t\"semgrep-rule-creator\",\n\t\t\t\"sharp-edges\",\n\t\t\t\"supply-chain-risk-auditor\",\n\t\t\t\"spec-to-code-compliance\",\n\t\t\t\"entry-point-analyzer\",\n\t\t\t\"audit-context-building\",\n\t\t\t\"fp-check\",\n\t\t\t\"constant-time-analysis\",\n\t\t\t\"zeroize-audit\",\n\t\t\t\"agentic-actions-auditor\",\n\t\t\t\"insecure-defaults\",\n\t\t\t\"property-based-testing\",\n\t\t\t\"variant-analysis\",\n\t\t\t\"yara-rule-authoring\",\n\t\t\t\"code-maturity-assessor\",\n\t\t\t\"django-security\",\n\t\t\t\"springboot-security\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"github\", \"memory\"]),\n\t\thooks: gate(\"hook\", [\"pre-shell-guard\", \"protect-secrets\", \"stop-verify\", \"subagent-stop-audit\"]),\n\t\tcommands: commands(\"read-only-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"security\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"vulnerability\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"vuln\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"exploit\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"audit\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"cve\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"xss\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"csrf\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"injection\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"secret\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"leak\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"crypto\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"hardening\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"threat model\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"threat\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"penetration\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"malware\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"supply chain\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"sql[ -]?inj|command[ -]?inj|path[ -]?traversal\", weight: 7 },\n\t\t\t{ kind: \"regex\", pattern: \"cve-\\\\d{4}-\\\\d+\", weight: 8 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(authz|rbac|privilege escalation|idor)\\\\b\", weight: 6 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Security Audit. You are operating in a security-review lane (read-biased, evidence-bound).\nPrioritize true-positive findings with proof, exact locations, and remediation.\n\nSEQUENCE:\n1. Scope the audit: read entry-point-analyzer output (externally callable, state-changing surfaces) before reading internals.\n2. Build deep context with audit-context-building; shallow reads miss cross-file data flow.\n3. Run static analysis: semgrep (custom rules via semgrep-rule-creator) + codeql for inter-procedural taint. Parse results with sarif-parsing and dedupe.\n4. Verify every candidate with fp-check — return TRUE/FALSE POSITIVE with evidence, never a bare \"might be vulnerable\".\n5. Differential scope: differential-review on the diff/PR, not just the whole tree, to catch regressions.\n6. Domain lenses: constant-time-analysis + zeroize-audit for crypto; supply-chain-risk-auditor for deps; agentic-actions-auditor for CI/LLM-agent workflows; sharp-edges + insecure-defaults for misuse-prone APIs.\n7. After fixes: variant-analysis to find the same bug class elsewhere.\n\nHARD RULES: read-only by default; every finding needs file:line + exploit sketch + fix; rank by real exploitability not CWE count; secrets are reported, never printed (protect-secrets hook).`,\n\t},\n\n\t\"devops-infra\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"devops-infra\",\n\t\tname: \"devops-infra\",\n\t\tlabel: \"DevOps & Infrastructure\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"deployment-patterns\",\n\t\t\t\"docker-patterns\",\n\t\t\t\"database-migrations\",\n\t\t\t\"continuous-agent-loop\",\n\t\t\t\"enterprise-agent-ops\",\n\t\t\t\"plankton-code-quality\",\n\t\t\t\"verification-loop\",\n\t\t\t\"deploy-to-vercel\",\n\t\t\t\"vercel-cli-with-tokens\",\n\t\t\t\"e2e-testing\",\n\t\t\t\"clickhouse-io\",\n\t\t\t\"security-review\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"github\", \"filesystem\", \"powershell-admin\"]),\n\t\thooks: gate(\"hook\", [\"npm-audit-summary\", \"pre-shell-guard\", \"protect-secrets\", \"stop-verify\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"deploy\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"배포\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"deployment\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"docker\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"container\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"kubernetes\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"k8s\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"ci\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"pipeline\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"infrastructure\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"terraform\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"vercel\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"build\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"release\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"observability\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(github actions|workflow|runner|helm|istio|nginx)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"docker-?compose|\\\\.ya?ml\", weight: 3 },\n\t\t\t{ kind: \"path\", pattern: \"Dockerfile\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \".github/workflows/\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"docker-compose\", weight: 7 },\n\t\t\t{ kind: \"extension\", pattern: \".tf\", weight: 7 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: DevOps & Infrastructure. You are operating in a delivery/infra capability lane.\nPrioritize reproducible, reversible, observable changes.\n\nSEQUENCE:\n1. Read the Dockerfile / compose / workflow / IaC in full before editing.\n2. Containers: docker-patterns — pin base images, non-root user, multi-stage build, .dockerignore, healthchecks, least network egress.\n3. CI/CD: deployment-patterns for staging->prod, rollback strategy, secret handling. GitHub Actions touching LLM/agent steps must pass agentic-actions-auditor (you are in security-adjacent territory).\n4. Deploys: deploy-to-vercel / vercel-cli-with-tokens for Vercel; verification-loop after every deploy (health, smoke, rollback trigger).\n5. Database ops: database-migrations (expand/contract, zero-downtime) — coordinate with backend-api lane if schema semantics are unclear.\n6. Supply chain: npm-audit-summary hook surfaces dep risk; do not add lifecycle-script deps silently.\n\nHARD RULES: every deploy is reversible within one command; never bake secrets into images; lockfile/manifest changes are reviewed code; prefer idempotent steps. Read-only infra inspection uses read-only-shell; mutations stay scoped-shell.`,\n\t},\n\n\tresearch: {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"research\",\n\t\tname: \"research\",\n\t\tlabel: \"Research & Investigation\",\n\t\tauthority: \"read-only\",\n\t\ttools: READ_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"deep-research\",\n\t\t\t\"literature-review\",\n\t\t\t\"market-research\",\n\t\t\t\"exa-search\",\n\t\t\t\"best-practice-research\",\n\t\t\t\"arxiv-database\",\n\t\t\t\"pubmed-database\",\n\t\t\t\"scientific-brainstorming\",\n\t\t\t\"hypothesis-generation\",\n\t\t\t\"scientific-critical-thinking\",\n\t\t\t\"competitive-analysis\",\n\t\t\t\"content-strategy\",\n\t\t\t\"analyze\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"firecrawl\", \"fetch\", \"github\", \"memory\", \"obsidian\"]),\n\t\thooks: gate(\"hook\", [\"session-context\", \"precompact-checkpoint\"]),\n\t\tcommands: commands(\"read-only-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"research\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"investigate\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"literature\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"survey\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"compare\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"market\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"competitor\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"paper\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"arxiv\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"pubmed\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"summarize\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"sources\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"cite\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(state of the art|sota|benchmark|related work)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(find out|look up|what does|why does)\\\\b\", weight: 2 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Research & Investigation. You are operating in a read-only research lane.\nPrioritize sourced, cited, reproducible findings over speculation.\n\nSEQUENCE:\n1. Decompose the question into sub-queries. Gather with the right source: arxiv-database / pubmed-database for academic, exa-search + firecrawl + fetch for web/github, market-research for commercial intel.\n2. literature-review for systematic synthesis (PRISMA where applicable, verified citations, dedupe).\n3. Evaluate evidence quality with scientific-critical-thinking (GRADE / risk of bias) before trusting a source.\n4. Hypothesis generation when the goal is ideation; competitive-analysis when positioning a product.\n5. Persist durable findings to memory + obsidian with source URLs and access dates; never store secrets or private PII.\n\nHARD RULES: every claim has a citation; distinguish evidence vs inference explicitly; prefer primary/official sources; flag when evidence is thin rather than confabulating. Read-only: do not modify the codebase.`,\n\t},\n\n\tmobile: {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"mobile\",\n\t\tname: \"mobile\",\n\t\tlabel: \"Mobile (iOS / Android / KMP)\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"swiftui-patterns\",\n\t\t\t\"swiftui-ui-patterns\",\n\t\t\t\"swift-actor-persistence\",\n\t\t\t\"swift-concurrency-6-2\",\n\t\t\t\"swift-protocol-di-testing\",\n\t\t\t\"foundation-models-on-device\",\n\t\t\t\"liquid-glass-design\",\n\t\t\t\"android-clean-architecture\",\n\t\t\t\"compose-multiplatform-patterns\",\n\t\t\t\"kotlin-patterns\",\n\t\t\t\"kotlin-coroutines-flows\",\n\t\t\t\"kotlin-testing\",\n\t\t\t\"kotlin-exposed-patterns\",\n\t\t\t\"kotlin-ktor-patterns\",\n\t\t\t\"react-native-best-practices\",\n\t\t\t\"accessibility-audit\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"chrome-devtools\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\"typecheck-after-edit\", \"pre-shell-guard\", \"protect-secrets\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"ios\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"android\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"mobile\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"swift\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"swiftui\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"kotlin\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(jetpack compose|compose multiplatform|android compose)\\\\b\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"kmp\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"react native\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"expo\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"flutter\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(viewcontroller|uiview|jetpack|gradle|xcode)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".swift\", weight: 8 },\n\t\t\t{ kind: \"extension\", pattern: \".kt\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"android/app\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \"ios/\", weight: 6 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Mobile (iOS / Android / KMP). You are operating in a mobile capability lane.\nPrioritize platform idiom, main-thread performance, and on-device correctness.\n\nSEQUENCE:\n1. Identify the stack (SwiftUI / UIKit / Jetpack Compose / KMP / React Native / Flutter) and follow its idioms strictly.\n2. iOS: swiftui-patterns + swift-concurrency-6-2 (structured concurrency, actor isolation). Persistence via swift-actor-persistence; testing via swift-protocol-di-testing. Use liquid-glass-design + foundation-models-on-device for iOS 26 features.\n3. Android/KMP: android-clean-architecture (module boundaries, UseCase/Repository), compose-multiplatform-patterns, kotlin-coroutines-flows for async. Verify with kotlin-testing.\n4. Performance: react-native-best-practices for RN (Hermes, FlashList, JS-thread); profile jank, never block the main thread, hoist heavy work off-thread.\n5. Accessibility: accessibility-audit — Dynamic Type / VoiceOver / TalkBack, hit-target sizes, labeled controls.\n6. Build gate: typecheck-after-edit must pass; prefer the platform's native test runner over ad-hoc scripts.\n\nHARD RULES: no main-thread blocking; respect safe areas / insets / notches; lifecycle-aware state; pin toolchain versions (gradle/xcode) explicitly.`,\n\t},\n\n\t\"docs-writing\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"docs-writing\",\n\t\tname: \"docs-writing\",\n\t\tlabel: \"Docs & Technical Writing\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"article-writing\",\n\t\t\t\"doc-coauthoring\",\n\t\t\t\"write-concisely\",\n\t\t\t\"ux-writing\",\n\t\t\t\"copywriting\",\n\t\t\t\"copy-editing\",\n\t\t\t\"scientific-writing\",\n\t\t\t\"latex-posters\",\n\t\t\t\"academic-pptx\",\n\t\t\t\"slides-grab\",\n\t\t\t\"frontend-slides\",\n\t\t\t\"presentation-deck\",\n\t\t\t\"case-study\",\n\t\t\t\"design-rationale\",\n\t\t\t\"internal-comms\",\n\t\t\t\"docs-update-docs\",\n\t\t\t\"brand-voice\",\n\t\t\t\"brand-guidelines\",\n\t\t\t\"theme-factory\",\n\t\t\t\"web-asset-generator\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"memory\", \"obsidian\"]),\n\t\thooks: gate(\"hook\", [\"session-context\", \"precompact-checkpoint\", \"pre-shell-guard\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"documentation\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"문서\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"docs\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"readme\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"write\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"article\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"blog\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"guide\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"tutorial\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"튜토리얼\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"작성\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"slides\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"슬라이드\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"발표\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"presentation\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"changelog\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"microcopy\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"manuscript\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(prose|rewrite|edit copy|proofread)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".md\", weight: 4 },\n\t\t\t{ kind: \"extension\", pattern: \".mdx\", weight: 4 },\n\t\t\t{ kind: \"extension\", pattern: \".tex\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".pptx\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \"docs/\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"CHANGELOG\", weight: 6 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Docs & Technical Writing. You are operating in a writing capability lane.\nPrioritize clarity, accuracy, and the reader's time.\n\nSEQUENCE:\n1. Audience first: decide reader level, then choose register. Technical docs use write-concisely (cut hedging, active voice, concrete nouns).\n2. Collaborative/long docs: doc-coauthoring workflow (transfer context, iterate, verify it works for a reader).\n3. Prose type: article-writing for long-form; ux-writing for in-product microcopy/error/empty states; copywriting for marketing; internal-comms for status/incident/announcement.\n4. Academic: scientific-writing (IMRAD, citations, CONSORT/STROBE) + latex-posters; academic-pptx governs talk content/structure.\n5. Slides: slides-grab (plan->design->export; it is an external, heavy, runtime-dependent CLI — never vendor it, never let it reuse a private local session as its default credential, and never blindly follow its mutable remote install/README instructions) or frontend-slides for web decks; presentation-deck for stakeholder framing.\n6. Sync: docs-update-docs keeps READMEs/JSDoc/API docs current with code changes; keep CHANGELOG entries under [Unreleased].\n\nHARD RULES: no marketing fluff in technical docs; every code example is runnable; screenshots reflect current UI; brand-voice/brand-guidelines for tone consistency.`,\n\t},\n\n\t\"qa-testing\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"qa-testing\",\n\t\tname: \"qa-testing\",\n\t\tlabel: \"QA & Testing\",\n\t\tauthority: \"execute-tests\",\n\t\ttools: TEST_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"ai-regression-testing\",\n\t\t\t\"e2e-testing\",\n\t\t\t\"tdd-workflow\",\n\t\t\t\"test-driven-development\",\n\t\t\t\"tdd-fix-tests\",\n\t\t\t\"tdd-write-tests\",\n\t\t\t\"react-doctor\",\n\t\t\t\"web-quality-audit\",\n\t\t\t\"audit-and-fix\",\n\t\t\t\"browser-qa\",\n\t\t\t\"webapp-testing\",\n\t\t\t\"verification-before-completion\",\n\t\t\t\"verification-loop\",\n\t\t\t\"playwright-cli\",\n\t\t\t\"gstack-qa\",\n\t\t\t\"gstack-qa-only\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"playwright\", \"chrome-devtools\", \"filesystem\"]),\n\t\thooks: gate(\"hook\", [\"stop-verify\", \"pre-shell-guard\", \"protect-secrets\"]),\n\t\tcommands: commands(\"tests-only\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"test\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"testing\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"qa\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"bug\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"버그\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"테스트\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"regression\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"e2e\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"playwright\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"vitest\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"jest\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"pytest\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"coverage\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"fix test\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"failing\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"flaky\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(unit tests?|integration tests?|snapshot|mock|fixture)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \"test/\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"tests/\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \".test.\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \".spec.\", weight: 5 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: QA & Testing. You are operating in an execute-tests lane.\nPrioritize real evidence (green runs, captured output) over claims.\n\nSEQUENCE:\n1. Reproduce first: never fix a test you have not seen fail. Capture the exact failure output.\n2. New behavior: test-driven-development / tdd-workflow (red->green->refactor). tdd-write-tests for coverage of uncommitted changes; tdd-fix-tests to make the suite green after a change.\n3. Web QA: browser-qa / webapp-testing with playwright + chrome-devtools MCP (navigate, interact, screenshot, assert). e2e-testing for Page Object Model + CI wiring + flake strategy.\n4. React: react-doctor (lint/a11y/bundle/arch + regression check) before declaring healthy.\n5. Regression safety: ai-regression-testing for sandbox-mode API tests without DB deps; verification-before-completion requires a passing command before any \"done\" claim.\n6. Flakiness: quarantine or fix, never disable silently; record the root cause.\n\nHARD RULES: tests-only command mode (no arbitrary shell); every fix is re-verified by a green run; coverage gaps are reported, not hidden; flaky tests are rooted, not retried blindly.`,\n\t},\n\n\t\"grok-harness\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"grok-harness\",\n\t\tname: \"grok-harness\",\n\t\tlabel: \"Grok xAI Harness\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"packages\",\n\t\t\t\"headroom\",\n\t\t\t\"programming\",\n\t\t\t\"debugging\",\n\t\t\t\"adaptorch-route\",\n\t\t\t\"adaptorch-synthesize\",\n\t\t\t\"understand-anything\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"adaptorch\", \"fetch\", \"understand-anything\", \"playwright\"]),\n\t\thooks: gate(\"hook\", [\n\t\t\t\"pre-shell-guard\",\n\t\t\t\"protect-secrets\",\n\t\t\t\"typecheck-after-edit\",\n\t\t\t\"stop-verify\",\n\t\t\t\"session-context\",\n\t\t]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"grok\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"xai\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"grok-oauth\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"grok oauth\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"imagine\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"composer\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"adaptorch\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"adaptorch-route\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"adaptorch-synthesize\", weight: 8 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(grok(?:[- ]oauth)?|xai|imagine|composer)\\\\b\", weight: 7 },\n\t\t\t{\n\t\t\t\tkind: \"regex\",\n\t\t\t\tpattern: \"\\\\badapt\\\\s*orch\\\\b|\\\\badaptorch[- ]?(route|routing|synthes(?:is|ize))\\\\b\",\n\t\t\t\tweight: 8,\n\t\t\t},\n\t\t],\n\t\troutingPrompt: `DOMAIN: Grok xAI Harness. You are operating in a Grok/xAI integration lane.\nPrioritize the Grok operational playbook, small capability loadouts, and evidence-bound provider/tool routing.\n\nSEQUENCE:\n1. Before implementing or routing Grok/xAI provider work, read and enforce ~/.omk/agent/grok.md. Treat it as the required Grok playbook for chat models vs Imagine tools, proxy health, tool-use/loop discipline, and Telegram parity unless higher-priority instructions conflict.\n2. Keep text chat flows and Imagine/media tool flows separate. Text work uses Grok chat/OAuth/provider surfaces; image/video/Imagine work routes through explicit Imagine tools only. Never conflate model ids with Imagine tool names.\n3. Capability discipline: load at most 2-3 skills for any lane. The allowed skill gate is packages, headroom, programming, debugging, adaptorch-route, adaptorch-synthesize, and understand-anything; choose the smallest subset and add headroom only under context pressure.\n4. Adaptorch is advisory only. Use adaptorch-route for routing/decomposition advice and adaptorch-synthesize for evidence synthesis, but do not treat Adaptorch as an automatic executor, source of truth, permission grant, or substitute for explicit tests.\n5. Use minimal MCP: adaptorch for advice/synthesis, fetch for bounded public retrieval, understand-anything for repo comprehension, and playwright only when browser or Imagine UI behavior needs real verification.\n6. Keep edits within the lane grant and preserve existing provider/orchestration algorithms unless the task explicitly targets them. Never route through legacy KIMICLI or deleted wrappers.\n7. Verification: run the narrowest relevant test/typecheck after edits. Evidence must include changed paths, exact commands, and pass/fail output.\n\nHARD RULES: grok.md is mandatory context for Grok/xAI harness work; text chat surfaces and Imagine tools are distinct; maximum 2-3 active skills; Adaptorch is advisory route/synthesis support only; never log OAuth tokens, cookies, or proxy credentials; protect-secrets applies.`,\n\t},\n\n\t\"ai-agent-ops\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"ai-agent-ops\",\n\t\tname: \"ai-agent-ops\",\n\t\tlabel: \"AI Agent Engineering & Ops\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"agent-harness-construction\",\n\t\t\t\"agentic-engineering\",\n\t\t\t\"ai-first-engineering\",\n\t\t\t\"autonomous-loops\",\n\t\t\t\"continuous-agent-loop\",\n\t\t\t\"enterprise-agent-ops\",\n\t\t\t\"eval-harness\",\n\t\t\t\"agent-self-evaluation\",\n\t\t\t\"agent-eval\",\n\t\t\t\"mcp-builder\",\n\t\t\t\"mcp-server-patterns\",\n\t\t\t\"prompt-optimizer\",\n\t\t\t\"context-engineering\",\n\t\t\t\"create-agent\",\n\t\t\t\"create-skill\",\n\t\t\t\"create-hook\",\n\t\t\t\"iterative-retrieval\",\n\t\t\t\"nanoclaw-repl\",\n\t\t\t\"blueprint\",\n\t\t\t\"ralphinho-rfc-pipeline\",\n\t\t\t\"harness\",\n\t\t\t\"subagent-driven-development\",\n\t\t\t\"dispatching-parallel-agents\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"memory\", \"github\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\"session-context\", \"precompact-checkpoint\", \"stop-verify\", \"subagent-stop-audit\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"agent\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"mcp\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"prompt\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"skill\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"hook\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"훅\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"harness\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\borchestrat\\\\w*\\\\b\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"eval\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"subagent\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"tool\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"loop\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"context engineering\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(model context protocol|llm agent|multi-?agent|agentic)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(token budget|context window|compaction|retrieval)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \".claude/agents\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \".omk/\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"SKILL.md\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"correctness wall\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"patch safety\", weight: 8 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\bpatch[- ]safety\\\\b\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"correctness-wall\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"adaptorch-wpl\", weight: 5 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: AI Agent Engineering & Ops. You are operating in an agent-systems capability lane.\nPrioritize eval-driven design, correct context engineering, and safe autonomy.\n\nSEQUENCE:\n1. Frame the system: agentic-engineering (eval-first, decomposition, cost-aware routing) + ai-first-engineering operating model.\n2. Context: context-engineering for prompt/command/skill/sub-agent construction; iterative-retrieval to solve the subagent context problem; prompt-optimizer before shipping prompts (test with a fresh subagent, RED-GREEN-REFACTOR).\n3. Build artifacts: create-agent / create-skill / create-hook for the harness; mcp-builder + mcp-server-patterns for MCP servers (correct tool schemas, Zod, stdio vs HTTP).\n4. Autonomy: autonomous-loops / continuous-agent-loop with quality gates + recovery; enterprise-agent-ops for long-lived workloads (observability, boundaries, lifecycle).\n5. Evaluate: eval-harness + agent-eval + agent-self-evaluation — never ship an agent change without a measured eval delta. nanoclaw-repl for interactive iteration.\n6. Orchestration: harness (team-architecture factory) for multi-agent topology; dispatching-parallel-agents / subagent-driven-development for parallel lanes; ralphinho-rfc-pipeline for DAG + merge queue.\n\nHARD RULES: every agent/skill change has an eval; prompts are versioned and tested, not vibe-edited; MCP servers validate inputs; autonomy is bounded by explicit stop conditions + stop-verify hook.\n\nPATCH SAFETY (B2C Correctness Wall): for pre-apply patch screening, load the correctness-wall extension explicitly (not in default preset). Read packages/coding-agent/docs/correctness-wall.md and examples/extensions/correctness-wall/README.md. Roll out shadow → soft → hard; never claim formal correctness proof.`,\n\t},\n\n\tgeneral: {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"general\",\n\t\tname: \"general\",\n\t\tlabel: \"General (fallback)\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"coding-standards\",\n\t\t\t\"verification-before-completion\",\n\t\t\t\"systematic-debugging\",\n\t\t\t\"receiving-code-review\",\n\t\t\t\"context-engineering\",\n\t\t\t\"understand-chat\",\n\t\t\t\"brainstorming\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"context7\", \"memory\"]),\n\t\thooks: gate(\"hook\", [\"pre-shell-guard\", \"protect-secrets\", \"stop-verify\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"refactor\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"fix\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"implement\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"function\", weight: 1 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: General. No specific domain scored above threshold, so apply broad engineering hygiene.\n\nSEQUENCE:\n1. understand-chat / brainstorming to confirm intent if ambiguous; otherwise read the target in full.\n2. coding-standards for idiom; systematic-debugging for any defect (reproduce -> isolate -> fix -> verify, never guess).\n3. verification-before-completion: run the real check command and show output before claiming done.\n4. receiving-code-review: treat feedback technically, verify before applying.\n\nHARD RULES: read before edit; smallest safe change; verify with evidence; ask one concise question if truly blocked.`,\n\t},\n};\n\n/** Ordered list of non-fallback domain ids (excludes \"general\"). */\nexport const DOMAIN_IDS: readonly string[] = Object.keys(DOMAIN_PROFILES).filter((id) => id !== \"general\");\n\n/** The fallback profile used when no domain clears the confidence threshold. */\nexport const FALLBACK_DOMAIN_ID = \"general\";\n\n/** Look up a domain profile by id. Returns the fallback profile if missing. */\nexport function getDomainProfile(id: string): DomainProfile {\n\treturn DOMAIN_PROFILES[id] ?? DOMAIN_PROFILES[FALLBACK_DOMAIN_ID];\n}\n\n/** Convenience: map domain ids to their loadout profile (for applyLoadoutProfile). */\nexport function domainLoadoutProfiles(): Readonly<Record<string, LoadoutProfile>> {\n\tconst out: Record<string, LoadoutProfile> = {};\n\tfor (const [id, profile] of Object.entries(DOMAIN_PROFILES)) {\n\t\tconst { id: _id, label: _label, triggers: _triggers, routingPrompt: _routingPrompt, ...loadout } = profile;\n\t\tout[id] = loadout;\n\t}\n\treturn out;\n}\n"]}
1
+ {"version":3,"file":"domain-loadouts.d.ts","sourceRoot":"","sources":["../../src/core/domain-loadouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAmC,cAAc,EAAY,MAAM,eAAe,CAAC;AAE/F,yCAAyC;AACzC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;AAErE;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB;AAED,6EAA6E;AAC7E,MAAM,WAAW,aAAc,SAAQ,cAAc;IACpD,sEAAsE;IACtE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAC/B;AAeD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAw+BnE,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAkE,CAAC;AAE3G,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAE1D;AAED,sFAAsF;AACtF,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAOhF","sourcesContent":["/**\n * Domain capability profiles — domain-aware \"inherited documents\" for the OMK\n * control plane.\n *\n * OMK ships role-based loadouts (`loadouts.ts`: inspect/plan/code/test/review/\n * security/package-maintainer/none). This module adds an orthogonal, **domain**\n * layer: each domain profile is a curated capability bundle (skills + MCP +\n * hooks + tool gate + authority + command mode) tuned for one class of work,\n * plus a very detailed English `routingPrompt` and deterministic `triggers`\n * used by `domain-router.ts` to pick the right bundle for an incoming task.\n *\n * A `DomainProfile` is a `LoadoutProfile` augmented with routing metadata, so it\n * composes with the existing `applyLoadoutProfile()` runtime: the router selects\n * a domain, the domain profile gates which skills/MCP/hooks are active, and the\n * caller still picks the role authority. This keeps the new layer purely\n * additive — no existing loadout behavior changes.\n *\n * This module is I/O-free and side-effect-free. All resource names (skills,\n * MCP servers, hooks) reference canonical identifiers discovered by\n * `resource-loader.ts`, `mcp-inventory.ts`, and `hook-inventory.ts`.\n *\n * Erasable TypeScript only (no enum/namespace/parameter properties).\n */\n\nimport type { CapabilityGate, LoadoutCommands, LoadoutProfile, ToolGate } from \"./loadouts.ts\";\n\n/** Signal kinds the router evaluates. */\nexport type TriggerKind = \"keyword\" | \"regex\" | \"extension\" | \"path\";\n\n/**\n * One routing signal for a domain.\n *\n * - `keyword`: case-insensitive, word-boundary substring of the task text.\n * Multi-word phrases are matched literally. Matched occurrences are counted\n * (capped) so repeated mentions raise confidence.\n * - `regex`: matched against the lowercased task text via RegExp. Use for\n * intent clusters that keywords cannot express compactly (e.g. `cve-\\d`).\n * - `extension`: matched against the suffix of any provided path hint.\n * - `path`: glob fragment matched against any provided path hint.\n */\nexport interface TriggerSpec {\n\treadonly kind: TriggerKind;\n\treadonly pattern: string;\n\treadonly weight: number;\n}\n\n/** Domain routing + identity metadata layered on top of a LoadoutProfile. */\nexport interface DomainProfile extends LoadoutProfile {\n\t/** Stable domain id, e.g. \"frontend-ui\". Used as the registry key. */\n\treadonly id: string;\n\t/** Human label, e.g. \"Frontend & UI\". */\n\treadonly label: string;\n\t/** Deterministic routing signals consumed by `domain-router.ts`. */\n\treadonly triggers: readonly TriggerSpec[];\n\t/**\n\t * Detailed English routing prompt. When the router selects this domain, the\n\t * orchestrator prepends this to the lane's task prompt so the model knows\n\t * exactly which capabilities to lean on and how to sequence the work.\n\t */\n\treadonly routingPrompt: string;\n}\n\nconst READ_TOOLS: ToolGate = { allow: [\"read\", \"grep\", \"find\", \"ls\"] };\nconst WRITE_TOOLS: ToolGate = { allow: [\"read\", \"grep\", \"find\", \"ls\", \"edit\", \"write\", \"bash\"] };\nconst TEST_TOOLS: ToolGate = { allow: [\"read\", \"grep\", \"find\", \"ls\", \"bash\"] };\nconst SECURITY_TOOLS: ToolGate = { allow: [\"read\", \"grep\", \"find\", \"ls\", \"bash\"] };\n\nfunction gate(kind: \"skill\" | \"mcp\" | \"hook\", names: readonly string[]): CapabilityGate {\n\treturn { allow: [{ kind, names }] };\n}\n\nfunction commands(mode: LoadoutCommands[\"mode\"], extras?: Partial<LoadoutCommands>): LoadoutCommands {\n\treturn { mode, ...extras };\n}\n\n/**\n * All domain profiles, keyed by id. Order is intentional only for human reading;\n * the router scores every entry independently.\n *\n * Each profile curates real, currently-available resources. When a referenced\n * resource is not present in a given install, `applyLoadoutProfile()` simply\n * omits it (allow-lists are permissive intersections with inventory), so\n * profiles degrade gracefully on minimal installs.\n */\nexport const DOMAIN_PROFILES: Readonly<Record<string, DomainProfile>> = {\n\t\"frontend-ui\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"frontend-ui\",\n\t\tname: \"frontend-ui\",\n\t\tlabel: \"Frontend & UI\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"frontend-design\",\n\t\t\t\"frontend-ui-engineering\",\n\t\t\t\"frontend-patterns\",\n\t\t\t\"baseline-ui\",\n\t\t\t\"impeccable\",\n\t\t\t\"shape\",\n\t\t\t\"make-interfaces-feel-better\",\n\t\t\t\"transitions-dev\",\n\t\t\t\"animate\",\n\t\t\t\"polish\",\n\t\t\t\"layout\",\n\t\t\t\"typeset\",\n\t\t\t\"colorize\",\n\t\t\t\"oklch-skill\",\n\t\t\t\"high-end-visual-design\",\n\t\t\t\"minimalist-ui\",\n\t\t\t\"design-taste-frontend\",\n\t\t\t\"design-taste-frontend-v1\",\n\t\t\t\"redesign-existing-projects\",\n\t\t\t\"brandkit\",\n\t\t\t\"imagegen-frontend-web\",\n\t\t\t\"imagegen-frontend-mobile\",\n\t\t\t\"web-design-guidelines\",\n\t\t\t\"fixing-accessibility\",\n\t\t\t\"contrast-checker\",\n\t\t\t\"use-of-color\",\n\t\t\t\"fixing-motion-performance\",\n\t\t\t\"12-principles-of-animation\",\n\t\t\t\"to-spring-or-not-to-spring\",\n\t\t\t\"mastering-animate-presence\",\n\t\t\t\"pseudo-elements\",\n\t\t\t\"shadcn\",\n\t\t\t\"next-best-practices\",\n\t\t\t\"next-cache-components\",\n\t\t\t\"vercel-react-best-practices\",\n\t\t\t\"vercel-composition-patterns\",\n\t\t\t\"vue-best-practices\",\n\t\t\t\"vue\",\n\t\t\t\"svelte-code-writer\",\n\t\t\t\"react-pdf\",\n\t\t\t\"remotion-best-practices\",\n\t\t\t\"web-quality-audit\",\n\t\t\t\"audit-and-fix\",\n\t\t\t\"browser-qa\",\n\t\t\t\"webapp-testing\",\n\t\t\t\"e2e-testing\",\n\t\t\t\"playwright-cli\",\n\t\t\t\"image-to-code\",\n\t\t\t\"visual-ralph\",\n\t\t\t\"visual-regression\",\n\t\t\t\"visual-diff\",\n\t\t\t\"gstack-design-review\",\n\t\t\t\"gstack-design-html\",\n\t\t\t\"gstack-design-shotgun\",\n\t\t\t\"clone-website\",\n\t\t\t\"ui-design-brain\",\n\t\t\t\"interface-design\",\n\t\t\t\"emil-design-eng\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"chrome-devtools\", \"playwright\", \"filesystem\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\n\t\t\t\"typecheck-after-edit\",\n\t\t\t\"pre-shell-guard\",\n\t\t\t\"protect-secrets\",\n\t\t\t\"component-spec-before-build\",\n\t\t\t\"visual-diff-after-edit\",\n\t\t\t\"bounded-evidence\",\n\t\t]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"ui\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"frontend\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"component\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"컴포넌트\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"디자인\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"css\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"tailwind\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"responsive\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"layout\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"design\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"accessibility\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"a11y\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"animation\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"pixel-perfect\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"landing page\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"redesign\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"button\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"modal\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"shadcn\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"clone\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"website clone\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"clone website\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"rebuild website\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"recreate website\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"pixel-perfect clone\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"visual diff\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"design tokens\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"component spec\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"getcomputedstyle\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"reconnaissance\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"클론\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"스크린샷\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(react|vue|svelte|next\\\\.?js|nuxt)\\\\b\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(tailwind|css|styled|emotion|radix)\\\\b\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(visual qa|responsive sweep|interaction sweep|computed styles?)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".vue\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".tsx\", weight: 4 },\n\t\t\t{ kind: \"extension\", pattern: \".jsx\", weight: 4 },\n\t\t\t{ kind: \"extension\", pattern: \".css\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"components/\", weight: 4 },\n\t\t\t{ kind: \"path\", pattern: \"app/page\", weight: 3 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Frontend & UI. You are operating in a frontend/UI capability lane.\nPrioritize visual craft, correct component composition, and accessibility.\n\nSEQUENCE:\n1. Read the target component(s)/page(s) in full before editing. Do not edit blind from search snippets.\n2. Identify the design system in use (Tailwind v4 / shadcn/ui / CSS modules / vanilla). Match it exactly; never introduce a second system. Use context7 for current framework/library docs before changing unfamiliar APIs.\n3. Website clone / visual QA work follows the ai-website-cloner-template gate contract:\n Reconnaissance -> Design-Token Foundation -> Component Specs -> Asset Gate -> Build Gate -> QA Gate.\n Reconnaissance uses Chrome/Playwright: chrome-devtools first for live inspection, playwright when deterministic multi-viewport screenshots or scripted interaction sweeps are needed. Capture screenshots at responsive sizes 1440/768/390, getComputedStyle design-token samples, assets, page topology, hover/click/scroll/time-driven behavior, and responsive breakpoints.\n4. Design-Token Foundation is sequential: fonts, oklch/shadcn-compatible tokens, global CSS, page-level motion primitives, icon extraction, downloaded assets, and typed content structures. Do not dispatch component builders until the foundation exists.\n5. Component Specs are contracts: component-spec-before-build requires a spec artifact before implementation. Specs include exact getComputedStyle values, DOM structure, interaction model, all states, assets, verbatim content, and responsive behavior. Split anything whose builder prompt would exceed ~150 lines.\n6. Asset Gate: real extractable assets are downloaded, named, and referenced before build; no mock assets when source assets are available.\n7. Build Gate: one builder per section or sub-component receives the full spec inline plus screenshot path, target file, imports, breakpoint behavior, and a typecheck/build requirement. Assembly wires sections into page-level layout and behaviors.\n8. QA Gate: visual-diff-after-edit requires side-by-side visual diff artifacts against the reference at 1440/768/390. Test interactions with Chrome/Playwright; run web-quality-audit for perf/a11y/SEO/best-practices and typecheck-after-edit before done.\n9. Evidence must include screenshots, getComputedStyle captures, responsive sizes 1440/768/390, side-by-side visual diff artifacts, Chrome/Playwright command/tool results, changed files, and known discrepancies.\n10. Accessibility: run the fixing-accessibility + contrast-checker + use-of-color skills. Every interactive element needs a reachable name, visible focus, and AA contrast.\n11. Motion: prefer the transitions-dev / animate / 12-principles-of-animation skills; gate heavy effects behind fix-motion-performance so animation never blocks the main thread.\n12. Prefer composition over boolean-prop sprawl (vercel-composition-patterns). Keep components small and spec-driven.\n\nHARD RULES: no inline styles when a token/utility exists; oklch tokens for color; mobile-first responsive; real content over placeholders; pixel-match the target first, customize later; no visual claim without bounded screenshot/diff evidence.`,\n\t},\n\n\t\"visual-qa\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"visual-qa\",\n\t\tname: \"visual-qa\",\n\t\tlabel: \"Visual QA & Website Cloning\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"clone-website\",\n\t\t\t\"browser-qa\",\n\t\t\t\"webapp-testing\",\n\t\t\t\"e2e-testing\",\n\t\t\t\"playwright-cli\",\n\t\t\t\"web-quality-audit\",\n\t\t\t\"audit-and-fix\",\n\t\t\t\"visual-regression\",\n\t\t\t\"visual-diff\",\n\t\t\t\"visual-ralph\",\n\t\t\t\"image-to-code\",\n\t\t\t\"frontend-ui-engineering\",\n\t\t\t\"frontend-design\",\n\t\t\t\"fixing-accessibility\",\n\t\t\t\"contrast-checker\",\n\t\t\t\"use-of-color\",\n\t\t\t\"fix-motion-performance\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"chrome-devtools\", \"playwright\", \"filesystem\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\n\t\t\t\"component-spec-before-build\",\n\t\t\t\"visual-diff-after-edit\",\n\t\t\t\"typecheck-after-edit\",\n\t\t\t\"pre-shell-guard\",\n\t\t\t\"protect-secrets\",\n\t\t\t\"bounded-evidence\",\n\t\t\t\"stop-verify\",\n\t\t]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"visual qa\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"visual diff\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"screenshot diff\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"website clone\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"clone website\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"pixel-perfect clone\", weight: 9 },\n\t\t\t{ kind: \"keyword\", pattern: \"responsive sweep\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"interaction sweep\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"component spec\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"getcomputedstyle\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"design tokens\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"assembly qa\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"reconnaissance\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"클론\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"스크린샷\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(pixel[ -]?perfect|visual regression|viewport sweep)\\\\b\", weight: 7 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(recreate|rebuild|reverse-engineer)\\\\b.*\\\\b(website|page|site)\\\\b\", weight: 7 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Visual QA & Website Cloning. You are operating in a browser-driven UI reconstruction and verification lane.\nThis domain carries the ai-website-cloner-template workflow inside OMK loadouts without copying its project scaffold.\nPipeline: Reconnaissance -> Design-Token Foundation -> Component Specs -> Asset Gate -> Build Gate -> QA Gate.\n\nSEQUENCE:\n1. Pre-flight: browser automation is required. Prefer Chrome/Playwright: chrome-devtools for live inspection, playwright for deterministic screenshot, viewport, and interaction replay. Use context7 for current framework and Playwright docs before coding against unfamiliar APIs.\n2. Reconnaissance: capture full-page screenshots at responsive sizes 1440/768/390, getComputedStyle color/type/spacing tokens, assets, page topology, z-index/sticky overlays, scroll/click/hover/time behavior, and responsive breakpoints. Save bounded artifacts and behavior notes.\n3. Design-Token Foundation: update only the target project's existing frontend foundation: fonts, globals, tokens, icon extraction, downloaded assets, typed content structures, and page-level motion primitives. Foundation is sequential.\n4. Component Specs: component-spec-before-build requires one spec per section/sub-component before implementation. Specs include exact getComputedStyle values, DOM structure, all states, interaction model, assets, verbatim text, screenshots, and responsive behavior. Split specs that would create a builder prompt over ~150 lines.\n5. Asset Gate: real extractable assets are downloaded, named, and referenced before build; no mock assets when source assets are available.\n6. Build Gate: dispatch or implement one section/sub-component at a time from its spec; builders receive the full spec inline, not a pointer. Require typecheck-after-edit and the target project's build/smoke command before merging/assembling.\n7. QA Gate: wire sections into page layout, then visual-diff-after-edit requires side-by-side visual diff artifacts against the reference at 1440/768/390. Re-test scroll, hover, click, tab, carousel, modal, and animation behavior with Chrome/Playwright.\n8. Evidence: bounded-evidence records screenshots, getComputedStyle captures, responsive sizes 1440/768/390, side-by-side visual diff paths, Chrome/Playwright command/tool results, changed files, known discrepancies, and any remaining fidelity gaps.\n\nHARD RULES: no guessed CSS values; no builder without a spec artifact; no mock assets when real assets are extractable; no completion claim without visual diff evidence; general Playwright test failures without visual/reconstruction intent stay in qa-testing.`,\n\t},\n\n\t\"korean-document\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"korean-document\",\n\t\tname: \"korean-document\",\n\t\tlabel: \"Korean Document (HWP/HWPX)\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"rhwp\",\n\t\t\t\"rhwp-edit\",\n\t\t\t\"rhwp-advanced\",\n\t\t\t\"hwp\",\n\t\t\t\"kordoc\",\n\t\t\t\"document-conversion\",\n\t\t\t\"document-extraction\",\n\t\t\t\"pdf\",\n\t\t\t\"react-pdf\",\n\t\t\t\"verification-loop\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"context7\", \"chrome-devtools\", \"playwright\"]),\n\t\thooks: gate(\"hook\", [\n\t\t\t\"pre-shell-guard\",\n\t\t\t\"protect-secrets\",\n\t\t\t\"bounded-evidence\",\n\t\t\t\"document-artifact-guard\",\n\t\t\t\"stop-verify\",\n\t\t]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"hwp\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"hwpx\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"rhwp\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"hancom\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"hangul document\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"한글 문서\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"아래아한글\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"한컴\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"hwp to markdown\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"hwp to pdf\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"hwpx to pdf\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"svg export\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"document metadata\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(hwp|hwpx|rhwp|hancom)\\\\b\", weight: 7 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(extract|render|export|metadata)\\\\b.*\\\\b(hwp|hwpx)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".hwp\", weight: 9 },\n\t\t\t{ kind: \"extension\", pattern: \".hwpx\", weight: 9 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Korean Document (HWP/HWPX). You are operating in a document extraction/rendering/export lane for Korean Hangul documents.\nUse OMK skills, MCP, and hooks to orchestrate rhwp-style capability without vendoring Rust, WASM, or CLI binaries into the repo.\n\nSEQUENCE:\n1. Detection first: identify HWP/HWPX by extension plus container sniffing. HWP is normally OLE Compound File Binary; HWPX is normally ZIP/XML package content. Never trust extension alone. Record filename, byte size, hash, detected format, and whether the file appears encrypted/protected.\n2. Load current docs with context7 before coding against @rhwp/core, rhwp APIs, pdf rendering packages, or browser automation APIs. Use project-installed tools when present; do not add or vendor rhwp Rust/WASM/CLI artifacts unless the user explicitly requests dependency work.\n3. Extraction path: produce bounded text and markdown outputs, structured metadata, section/page outline, tables, images/assets references, equations/charts notes, and warnings for unsupported controls. Keep private document content bounded: short excerpts, counts, hashes, and output paths rather than dumping whole documents.\n4. Render path: use rhwp-oriented skills for layout/page fidelity. Use chrome-devtools/playwright only to render or capture web/WASM/canvas/SVG views that already exist in the project. Capture SVG/page snapshots and PNG evidence with viewport/page labels.\n5. Export path: support text, markdown, svg, png, and pdf outputs. Prefer native/project export APIs when available; otherwise assemble via browser-rendered SVG/canvas/PDF flows. Always write artifacts to an explicit output directory and report a manifest.\n6. Metadata path: collect page count, section count, dimensions, fonts, embedded images, tables, headers/footers, footnotes/endnotes, equations/charts, fields, protection/encryption status, and conversion warnings.\n7. Evidence: bounded-evidence and document-artifact-guard require an artifact manifest containing input hash, detected format, commands/tools used, output paths, output byte sizes, page/sample counts, warnings, and at most small redacted excerpts. stop-verify must pass before done.\n\nHARD RULES: no vendored rhwp binaries; no fake conversion claims; no full private document dump in chat; output artifacts must be traceable; every render/export claim needs bounded evidence.`,\n\t},\n\n\t\"backend-api\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"backend-api\",\n\t\tname: \"backend-api\",\n\t\tlabel: \"Backend & API\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"backend-patterns\",\n\t\t\t\"api-design\",\n\t\t\t\"postgres-patterns\",\n\t\t\t\"supabase\",\n\t\t\t\"supabase-postgres-best-practices\",\n\t\t\t\"database-migrations\",\n\t\t\t\"clickhouse-io\",\n\t\t\t\"redis\",\n\t\t\t\"django-patterns\",\n\t\t\t\"django-tdd\",\n\t\t\t\"django-verification\",\n\t\t\t\"laravel-patterns\",\n\t\t\t\"laravel-tdd\",\n\t\t\t\"laravel-verification\",\n\t\t\t\"springboot-patterns\",\n\t\t\t\"springboot-tdd\",\n\t\t\t\"springboot-verification\",\n\t\t\t\"jpa-patterns\",\n\t\t\t\"python-patterns\",\n\t\t\t\"python-testing\",\n\t\t\t\"golang-patterns\",\n\t\t\t\"golang-testing\",\n\t\t\t\"kotlin-patterns\",\n\t\t\t\"rust-patterns\",\n\t\t\t\"java-coding-standards\",\n\t\t\t\"cpp-coding-standards\",\n\t\t\t\"perl-patterns\",\n\t\t\t\"mcp-server-patterns\",\n\t\t\t\"mcp-build-mcp\",\n\t\t\t\"claude-api\",\n\t\t\t\"codex-api\",\n\t\t\t\"security-review\",\n\t\t\t\"verification-loop\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"supabase\", \"github\", \"context7\", \"memory\"]),\n\t\thooks: gate(\"hook\", [\"pre-shell-guard\", \"protect-secrets\", \"typecheck-after-edit\", \"npm-audit-summary\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"backend\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"api\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"endpoint\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"database\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"query performance\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"query\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"migration\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"schema\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"server\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"auth\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"postgres\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"supabase\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"sql\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"rest\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"graphql\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"orm\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"django\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"spring\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"laravel\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(route|controller|service|repository|model|dto)\\\\b\", weight: 3 },\n\t\t\t{ kind: \"extension\", pattern: \".py\", weight: 3 },\n\t\t\t{ kind: \"extension\", pattern: \".go\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".rs\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".java\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".kt\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"api/\", weight: 4 },\n\t\t\t{ kind: \"path\", pattern: \"server/\", weight: 4 },\n\t\t\t{ kind: \"path\", pattern: \"migrations/\", weight: 6 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Backend & API. You are operating in a backend/API capability lane.\nPrioritize correct data modeling, transactional integrity, and idiomatic framework patterns.\n\nSEQUENCE:\n1. Read the affected route/controller/service/repo and the schema in full first.\n2. For data changes: prefer the database-migrations skill (additive + backfill + expand/contract); never destructive in a single step. Validate with the framework verification skill (django-verification / laravel-verification / springboot-verification).\n3. Query work: apply postgres-patterns / supabase-postgres-best-practices (indexes, EXPLAIN, RLS). ClickHouse analytics use clickhouse-io.\n4. API shape: api-design skill for resource naming, status codes, pagination, error envelopes, versioning.\n5. Integrating LLMs: claude-api / codex-api skills for correct model ids, streaming, tool use, caching. Building an MCP server: mcp-server-patterns + mcp-build-mcp.\n6. Language idiom: use the matching *-patterns skill (python/golang/rust/kotlin/perl/cpp). Type-strict, no \\`any\\`.\n7. Security baseline: run security-review before claiming done; secrets never logged (protect-secrets hook enforces).\n\nHARD RULES: parameterized queries only; migrations are reversible; no silent catch-and-swallow; new endpoints get the matching framework test (django-tdd / laravel-tdd / springboot-tdd).`,\n\t},\n\n\t\"data-science\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"data-science\",\n\t\tname: \"data-science\",\n\t\tlabel: \"Data Science & Analysis\",\n\t\tauthority: \"execute-tests\",\n\t\ttools: TEST_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"exploratory-data-analysis\",\n\t\t\t\"polars\",\n\t\t\t\"dask\",\n\t\t\t\"matplotlib\",\n\t\t\t\"seaborn\",\n\t\t\t\"plotly\",\n\t\t\t\"scientific-visualization\",\n\t\t\t\"scikit-learn\",\n\t\t\t\"pytorch-lightning\",\n\t\t\t\"transformers\",\n\t\t\t\"networkx\",\n\t\t\t\"pymc\",\n\t\t\t\"statsmodels\",\n\t\t\t\"sympy\",\n\t\t\t\"statistical-analysis\",\n\t\t\t\"shap\",\n\t\t\t\"rdkit\",\n\t\t\t\"biopython\",\n\t\t\t\"scanpy\",\n\t\t\t\"astropy\",\n\t\t\t\"qiskit\",\n\t\t\t\"deepchem\",\n\t\t\t\"molecular-dynamics\",\n\t\t\t\"hypothesis-generation\",\n\t\t\t\"literature-review\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"memory\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\"pre-shell-guard\", \"protect-secrets\", \"stop-verify\"]),\n\t\tcommands: commands(\"tests-only\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"data\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"analysis\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"dataframe\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"model\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"training\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"dataset\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"vector search\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"statistics\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"regression\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"classification\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"visualization\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"plot\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"notebook\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"pandas\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"polars\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"numpy\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"pytorch\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"tensorflow\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"scikit\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"bayesian\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(eda|ml|machine learning|inference|embeddings?)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".ipynb\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"notebooks/\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \"models/\", weight: 3 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Data Science & Analysis. You are operating in an analysis/modeling capability lane.\nPrioritize correct statistical reasoning, reproducibility, and honest uncertainty.\n\nSEQUENCE:\n1. Start with exploratory-data-analysis: shape, dtypes, missingness, distributions, basic sanity checks — never skip straight to modeling.\n2. Pick the dataframe engine by size: polars for in-memory speed, dask for larger-than-RAM. Do not reach for pandas by reflex.\n3. Visualization: seaborn/plotly for exploration, scientific-visualization for publication figures (colorblind-safe, correct error bars, journal styling).\n4. Modeling: scikit-learn for classical, pytorch-lightning for DL. State assumptions, then validate with statistical-analysis (right test, assumption checks, power). Bayesian work uses pymc; report with statsmodels.\n5. Interpretability: shap for global/local explanations; do not ship a black box without them.\n6. Reproducibility: fix seeds, pin versions, commit the exact data hash. Prefer scripts/functions over ad-hoc notebook cells for anything reused.\n\nHARD RULES: report effect size + CI, not just p-values; never train on test; never impute silently; notebooks are for exploration, modules are for production.`,\n\t},\n\n\t\"security-audit\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"security-audit\",\n\t\tname: \"security-audit\",\n\t\tlabel: \"Security Audit\",\n\t\tauthority: \"security-review\",\n\t\ttools: SECURITY_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"security-review\",\n\t\t\t\"security-scan\",\n\t\t\t\"differential-review\",\n\t\t\t\"semgrep\",\n\t\t\t\"codeql\",\n\t\t\t\"sarif-parsing\",\n\t\t\t\"semgrep-rule-creator\",\n\t\t\t\"sharp-edges\",\n\t\t\t\"supply-chain-risk-auditor\",\n\t\t\t\"spec-to-code-compliance\",\n\t\t\t\"entry-point-analyzer\",\n\t\t\t\"audit-context-building\",\n\t\t\t\"fp-check\",\n\t\t\t\"constant-time-analysis\",\n\t\t\t\"zeroize-audit\",\n\t\t\t\"agentic-actions-auditor\",\n\t\t\t\"insecure-defaults\",\n\t\t\t\"property-based-testing\",\n\t\t\t\"variant-analysis\",\n\t\t\t\"yara-rule-authoring\",\n\t\t\t\"code-maturity-assessor\",\n\t\t\t\"django-security\",\n\t\t\t\"springboot-security\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"github\", \"memory\"]),\n\t\thooks: gate(\"hook\", [\"pre-shell-guard\", \"protect-secrets\", \"stop-verify\", \"subagent-stop-audit\"]),\n\t\tcommands: commands(\"read-only-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"security\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"vulnerability\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"vuln\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"exploit\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"audit\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"cve\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"xss\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"csrf\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"injection\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"secret\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"leak\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"crypto\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"hardening\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"threat model\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"threat\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"penetration\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"malware\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"supply chain\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"sql[ -]?inj|command[ -]?inj|path[ -]?traversal\", weight: 7 },\n\t\t\t{ kind: \"regex\", pattern: \"cve-\\\\d{4}-\\\\d+\", weight: 8 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(authz|rbac|privilege escalation|idor)\\\\b\", weight: 6 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Security Audit. You are operating in a security-review lane (read-biased, evidence-bound).\nPrioritize true-positive findings with proof, exact locations, and remediation.\n\nSEQUENCE:\n1. Scope the audit: read entry-point-analyzer output (externally callable, state-changing surfaces) before reading internals.\n2. Build deep context with audit-context-building; shallow reads miss cross-file data flow.\n3. Run static analysis: semgrep (custom rules via semgrep-rule-creator) + codeql for inter-procedural taint. Parse results with sarif-parsing and dedupe.\n4. Verify every candidate with fp-check — return TRUE/FALSE POSITIVE with evidence, never a bare \"might be vulnerable\".\n5. Differential scope: differential-review on the diff/PR, not just the whole tree, to catch regressions.\n6. Domain lenses: constant-time-analysis + zeroize-audit for crypto; supply-chain-risk-auditor for deps; agentic-actions-auditor for CI/LLM-agent workflows; sharp-edges + insecure-defaults for misuse-prone APIs.\n7. After fixes: variant-analysis to find the same bug class elsewhere.\n\nHARD RULES: read-only by default; every finding needs file:line + exploit sketch + fix; rank by real exploitability not CWE count; secrets are reported, never printed (protect-secrets hook).`,\n\t},\n\n\t\"devops-infra\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"devops-infra\",\n\t\tname: \"devops-infra\",\n\t\tlabel: \"DevOps & Infrastructure\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"deployment-patterns\",\n\t\t\t\"docker-patterns\",\n\t\t\t\"database-migrations\",\n\t\t\t\"continuous-agent-loop\",\n\t\t\t\"enterprise-agent-ops\",\n\t\t\t\"plankton-code-quality\",\n\t\t\t\"verification-loop\",\n\t\t\t\"deploy-to-vercel\",\n\t\t\t\"vercel-cli-with-tokens\",\n\t\t\t\"e2e-testing\",\n\t\t\t\"clickhouse-io\",\n\t\t\t\"security-review\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"github\", \"filesystem\", \"powershell-admin\"]),\n\t\thooks: gate(\"hook\", [\"npm-audit-summary\", \"pre-shell-guard\", \"protect-secrets\", \"stop-verify\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"deploy\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"배포\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"deployment\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"docker\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"container\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"kubernetes\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"k8s\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"ci\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"pipeline\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"infrastructure\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"terraform\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"vercel\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"build\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"release\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"observability\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(github actions|workflow|runner|helm|istio|nginx)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"docker-?compose|\\\\.ya?ml\", weight: 3 },\n\t\t\t{ kind: \"path\", pattern: \"Dockerfile\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \".github/workflows/\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"docker-compose\", weight: 7 },\n\t\t\t{ kind: \"extension\", pattern: \".tf\", weight: 7 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: DevOps & Infrastructure. You are operating in a delivery/infra capability lane.\nPrioritize reproducible, reversible, observable changes.\n\nSEQUENCE:\n1. Read the Dockerfile / compose / workflow / IaC in full before editing.\n2. Containers: docker-patterns — pin base images, non-root user, multi-stage build, .dockerignore, healthchecks, least network egress.\n3. CI/CD: deployment-patterns for staging->prod, rollback strategy, secret handling. GitHub Actions touching LLM/agent steps must pass agentic-actions-auditor (you are in security-adjacent territory).\n4. Deploys: deploy-to-vercel / vercel-cli-with-tokens for Vercel; verification-loop after every deploy (health, smoke, rollback trigger).\n5. Database ops: database-migrations (expand/contract, zero-downtime) — coordinate with backend-api lane if schema semantics are unclear.\n6. Supply chain: npm-audit-summary hook surfaces dep risk; do not add lifecycle-script deps silently.\n\nHARD RULES: every deploy is reversible within one command; never bake secrets into images; lockfile/manifest changes are reviewed code; prefer idempotent steps. Read-only infra inspection uses read-only-shell; mutations stay scoped-shell.`,\n\t},\n\n\tresearch: {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"research\",\n\t\tname: \"research\",\n\t\tlabel: \"Research & Investigation\",\n\t\tauthority: \"read-only\",\n\t\ttools: READ_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"deep-research\",\n\t\t\t\"literature-review\",\n\t\t\t\"market-research\",\n\t\t\t\"exa-search\",\n\t\t\t\"best-practice-research\",\n\t\t\t\"arxiv-database\",\n\t\t\t\"pubmed-database\",\n\t\t\t\"scientific-brainstorming\",\n\t\t\t\"hypothesis-generation\",\n\t\t\t\"scientific-critical-thinking\",\n\t\t\t\"competitive-analysis\",\n\t\t\t\"content-strategy\",\n\t\t\t\"analyze\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"firecrawl\", \"fetch\", \"github\", \"memory\", \"obsidian\"]),\n\t\thooks: gate(\"hook\", [\"session-context\", \"precompact-checkpoint\"]),\n\t\tcommands: commands(\"read-only-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"research\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"investigate\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"literature\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"survey\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"compare\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"market\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"competitor\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"paper\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"arxiv\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"pubmed\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"summarize\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"sources\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"cite\", weight: 4 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(state of the art|sota|benchmark|related work)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(find out|look up|what does|why does)\\\\b\", weight: 2 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Research & Investigation. You are operating in a read-only research lane.\nPrioritize sourced, cited, reproducible findings over speculation.\n\nSEQUENCE:\n1. Decompose the question into sub-queries. Gather with the right source: arxiv-database / pubmed-database for academic, exa-search + firecrawl + fetch for web/github, market-research for commercial intel.\n2. literature-review for systematic synthesis (PRISMA where applicable, verified citations, dedupe).\n3. Evaluate evidence quality with scientific-critical-thinking (GRADE / risk of bias) before trusting a source.\n4. Hypothesis generation when the goal is ideation; competitive-analysis when positioning a product.\n5. Persist durable findings to memory + obsidian with source URLs and access dates; never store secrets or private PII.\n\nHARD RULES: every claim has a citation; distinguish evidence vs inference explicitly; prefer primary/official sources; flag when evidence is thin rather than confabulating. Read-only: do not modify the codebase.`,\n\t},\n\n\tmobile: {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"mobile\",\n\t\tname: \"mobile\",\n\t\tlabel: \"Mobile (iOS / Android / KMP)\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"swiftui-patterns\",\n\t\t\t\"swiftui-ui-patterns\",\n\t\t\t\"swift-actor-persistence\",\n\t\t\t\"swift-concurrency-6-2\",\n\t\t\t\"swift-protocol-di-testing\",\n\t\t\t\"foundation-models-on-device\",\n\t\t\t\"liquid-glass-design\",\n\t\t\t\"android-clean-architecture\",\n\t\t\t\"compose-multiplatform-patterns\",\n\t\t\t\"kotlin-patterns\",\n\t\t\t\"kotlin-coroutines-flows\",\n\t\t\t\"kotlin-testing\",\n\t\t\t\"kotlin-exposed-patterns\",\n\t\t\t\"kotlin-ktor-patterns\",\n\t\t\t\"react-native-best-practices\",\n\t\t\t\"accessibility-audit\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"chrome-devtools\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\"typecheck-after-edit\", \"pre-shell-guard\", \"protect-secrets\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"ios\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"android\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"mobile\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"swift\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"swiftui\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"kotlin\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(jetpack compose|compose multiplatform|android compose)\\\\b\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"kmp\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"react native\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"expo\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"flutter\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(viewcontroller|uiview|jetpack|gradle|xcode)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".swift\", weight: 8 },\n\t\t\t{ kind: \"extension\", pattern: \".kt\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"android/app\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \"ios/\", weight: 6 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Mobile (iOS / Android / KMP). You are operating in a mobile capability lane.\nPrioritize platform idiom, main-thread performance, and on-device correctness.\n\nSEQUENCE:\n1. Identify the stack (SwiftUI / UIKit / Jetpack Compose / KMP / React Native / Flutter) and follow its idioms strictly.\n2. iOS: swiftui-patterns + swift-concurrency-6-2 (structured concurrency, actor isolation). Persistence via swift-actor-persistence; testing via swift-protocol-di-testing. Use liquid-glass-design + foundation-models-on-device for iOS 26 features.\n3. Android/KMP: android-clean-architecture (module boundaries, UseCase/Repository), compose-multiplatform-patterns, kotlin-coroutines-flows for async. Verify with kotlin-testing.\n4. Performance: react-native-best-practices for RN (Hermes, FlashList, JS-thread); profile jank, never block the main thread, hoist heavy work off-thread.\n5. Accessibility: accessibility-audit — Dynamic Type / VoiceOver / TalkBack, hit-target sizes, labeled controls.\n6. Build gate: typecheck-after-edit must pass; prefer the platform's native test runner over ad-hoc scripts.\n\nHARD RULES: no main-thread blocking; respect safe areas / insets / notches; lifecycle-aware state; pin toolchain versions (gradle/xcode) explicitly.`,\n\t},\n\n\t\"docs-writing\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"docs-writing\",\n\t\tname: \"docs-writing\",\n\t\tlabel: \"Docs & Technical Writing\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"article-writing\",\n\t\t\t\"doc-coauthoring\",\n\t\t\t\"write-concisely\",\n\t\t\t\"ux-writing\",\n\t\t\t\"copywriting\",\n\t\t\t\"copy-editing\",\n\t\t\t\"scientific-writing\",\n\t\t\t\"latex-posters\",\n\t\t\t\"academic-pptx\",\n\t\t\t\"slides-grab\",\n\t\t\t\"frontend-slides\",\n\t\t\t\"presentation-deck\",\n\t\t\t\"case-study\",\n\t\t\t\"design-rationale\",\n\t\t\t\"internal-comms\",\n\t\t\t\"docs-update-docs\",\n\t\t\t\"brand-voice\",\n\t\t\t\"brand-guidelines\",\n\t\t\t\"theme-factory\",\n\t\t\t\"web-asset-generator\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"memory\", \"obsidian\"]),\n\t\thooks: gate(\"hook\", [\"session-context\", \"precompact-checkpoint\", \"pre-shell-guard\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"documentation\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"문서\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"docs\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"readme\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"write\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"article\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"blog\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"guide\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"tutorial\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"튜토리얼\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"작성\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"slides\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"슬라이드\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"발표\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"presentation\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"changelog\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"microcopy\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"manuscript\", weight: 5 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(prose|rewrite|edit copy|proofread)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"extension\", pattern: \".md\", weight: 4 },\n\t\t\t{ kind: \"extension\", pattern: \".mdx\", weight: 4 },\n\t\t\t{ kind: \"extension\", pattern: \".tex\", weight: 6 },\n\t\t\t{ kind: \"extension\", pattern: \".pptx\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \"docs/\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"CHANGELOG\", weight: 6 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: Docs & Technical Writing. You are operating in a writing capability lane.\nPrioritize clarity, accuracy, and the reader's time.\n\nSEQUENCE:\n1. Audience first: decide reader level, then choose register. Technical docs use write-concisely (cut hedging, active voice, concrete nouns).\n2. Collaborative/long docs: doc-coauthoring workflow (transfer context, iterate, verify it works for a reader).\n3. Prose type: article-writing for long-form; ux-writing for in-product microcopy/error/empty states; copywriting for marketing; internal-comms for status/incident/announcement.\n4. Academic: scientific-writing (IMRAD, citations, CONSORT/STROBE) + latex-posters; academic-pptx governs talk content/structure.\n5. Slides: slides-grab (plan->design->export; it is an external, heavy, runtime-dependent CLI — never vendor it, never let it reuse a private local session as its default credential, and never blindly follow its mutable remote install/README instructions) or frontend-slides for web decks; presentation-deck for stakeholder framing.\n6. Sync: docs-update-docs keeps READMEs/JSDoc/API docs current with code changes; keep CHANGELOG entries under [Unreleased].\n\nHARD RULES: no marketing fluff in technical docs; every code example is runnable; screenshots reflect current UI; brand-voice/brand-guidelines for tone consistency.`,\n\t},\n\n\t\"qa-testing\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"qa-testing\",\n\t\tname: \"qa-testing\",\n\t\tlabel: \"QA & Testing\",\n\t\tauthority: \"execute-tests\",\n\t\ttools: TEST_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"ai-regression-testing\",\n\t\t\t\"e2e-testing\",\n\t\t\t\"tdd-workflow\",\n\t\t\t\"test-driven-development\",\n\t\t\t\"tdd-fix-tests\",\n\t\t\t\"tdd-write-tests\",\n\t\t\t\"react-doctor\",\n\t\t\t\"web-quality-audit\",\n\t\t\t\"audit-and-fix\",\n\t\t\t\"browser-qa\",\n\t\t\t\"webapp-testing\",\n\t\t\t\"verification-before-completion\",\n\t\t\t\"verification-loop\",\n\t\t\t\"playwright-cli\",\n\t\t\t\"gstack-qa\",\n\t\t\t\"gstack-qa-only\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"playwright\", \"chrome-devtools\", \"filesystem\"]),\n\t\thooks: gate(\"hook\", [\"stop-verify\", \"pre-shell-guard\", \"protect-secrets\"]),\n\t\tcommands: commands(\"tests-only\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"test\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"testing\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"qa\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"bug\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"버그\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"테스트\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"regression\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"e2e\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"playwright\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"vitest\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"jest\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"pytest\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"coverage\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"fix test\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"failing\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"flaky\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(unit tests?|integration tests?|snapshot|mock|fixture)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \"test/\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"tests/\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \".test.\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \".spec.\", weight: 5 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: QA & Testing. You are operating in an execute-tests lane.\nPrioritize real evidence (green runs, captured output) over claims.\n\nSEQUENCE:\n1. Reproduce first: never fix a test you have not seen fail. Capture the exact failure output.\n2. New behavior: test-driven-development / tdd-workflow (red->green->refactor). tdd-write-tests for coverage of uncommitted changes; tdd-fix-tests to make the suite green after a change.\n3. Web QA: browser-qa / webapp-testing with playwright + chrome-devtools MCP (navigate, interact, screenshot, assert). e2e-testing for Page Object Model + CI wiring + flake strategy.\n4. React: react-doctor (lint/a11y/bundle/arch + regression check) before declaring healthy.\n5. Regression safety: ai-regression-testing for sandbox-mode API tests without DB deps; verification-before-completion requires a passing command before any \"done\" claim.\n6. Flakiness: quarantine or fix, never disable silently; record the root cause.\n\nHARD RULES: tests-only command mode (no arbitrary shell); every fix is re-verified by a green run; coverage gaps are reported, not hidden; flaky tests are rooted, not retried blindly.`,\n\t},\n\n\t\"grok-harness\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"grok-harness\",\n\t\tname: \"grok-harness\",\n\t\tlabel: \"Grok xAI Harness\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"packages\",\n\t\t\t\"headroom\",\n\t\t\t\"programming\",\n\t\t\t\"debugging\",\n\t\t\t\"adaptorch-route\",\n\t\t\t\"adaptorch-synthesize\",\n\t\t\t\"understand-anything\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"adaptorch\", \"fetch\", \"understand-anything\", \"playwright\"]),\n\t\thooks: gate(\"hook\", [\n\t\t\t\"pre-shell-guard\",\n\t\t\t\"protect-secrets\",\n\t\t\t\"typecheck-after-edit\",\n\t\t\t\"stop-verify\",\n\t\t\t\"session-context\",\n\t\t]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"grok\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"xai\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"grok-oauth\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"grok oauth\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"imagine\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"composer\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"adaptorch\", weight: 7 },\n\t\t\t{ kind: \"keyword\", pattern: \"adaptorch-route\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"adaptorch-synthesize\", weight: 8 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(grok(?:[- ]oauth)?|xai|imagine|composer)\\\\b\", weight: 7 },\n\t\t\t{\n\t\t\t\tkind: \"regex\",\n\t\t\t\tpattern: \"\\\\badapt\\\\s*orch\\\\b|\\\\badaptorch[- ]?(route|routing|synthes(?:is|ize))\\\\b\",\n\t\t\t\tweight: 8,\n\t\t\t},\n\t\t],\n\t\troutingPrompt: `DOMAIN: Grok xAI Harness. You are operating in a Grok/xAI integration lane.\nPrioritize the Grok operational playbook, small capability loadouts, and evidence-bound provider/tool routing.\n\nSEQUENCE:\n1. Before implementing or routing Grok/xAI provider work, read packages/coding-agent/docs/grok-harness.md as the canonical playbook. Treat ~/.omk/agent/grok.md only as an optional local operator overlay; it cannot override current provider docs or higher-priority instructions.\n2. Keep text chat flows and Imagine/media tool flows separate. Text work uses Grok chat/OAuth/provider surfaces; image/video/Imagine work routes through explicit Imagine tools only. Never conflate model ids with Imagine tool names.\n3. Capability discipline: load at most 2-3 skills for any lane. The allowed skill gate is packages, headroom, programming, debugging, adaptorch-route, adaptorch-synthesize, and understand-anything; choose the smallest subset and add headroom only under context pressure.\n4. Adaptorch is advisory only. Use adaptorch-route for routing/decomposition advice and adaptorch-synthesize for evidence synthesis, but do not treat Adaptorch as an automatic executor, source of truth, permission grant, or substitute for explicit tests.\n5. Use minimal MCP: adaptorch for advice/synthesis, fetch for bounded public retrieval, understand-anything for repo comprehension, and playwright only when browser or Imagine UI behavior needs real verification.\n6. Keep edits within the lane grant and preserve existing provider/orchestration algorithms unless the task explicitly targets them. Never route through legacy KIMICLI or deleted wrappers.\n7. Verification: run the narrowest relevant test/typecheck after edits. Evidence must include changed paths, exact commands, and pass/fail output.\n\nHARD RULES: the packaged Grok harness doc is mandatory context; a local grok.md is optional; text chat surfaces and Imagine tools are distinct; maximum 2-3 active skills; Adaptorch is advisory route/synthesis support only; never log OAuth tokens, cookies, or proxy credentials; protect-secrets applies.`,\n\t},\n\n\t\"ai-agent-ops\": {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"ai-agent-ops\",\n\t\tname: \"ai-agent-ops\",\n\t\tlabel: \"AI Agent Engineering & Ops\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"agent-harness-construction\",\n\t\t\t\"agentic-engineering\",\n\t\t\t\"ai-first-engineering\",\n\t\t\t\"autonomous-loops\",\n\t\t\t\"continuous-agent-loop\",\n\t\t\t\"enterprise-agent-ops\",\n\t\t\t\"eval-harness\",\n\t\t\t\"agent-self-evaluation\",\n\t\t\t\"agent-eval\",\n\t\t\t\"mcp-builder\",\n\t\t\t\"mcp-server-patterns\",\n\t\t\t\"prompt-optimizer\",\n\t\t\t\"context-engineering\",\n\t\t\t\"create-agent\",\n\t\t\t\"create-skill\",\n\t\t\t\"create-hook\",\n\t\t\t\"iterative-retrieval\",\n\t\t\t\"nanoclaw-repl\",\n\t\t\t\"blueprint\",\n\t\t\t\"ralphinho-rfc-pipeline\",\n\t\t\t\"harness\",\n\t\t\t\"subagent-driven-development\",\n\t\t\t\"dispatching-parallel-agents\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"memory\", \"github\", \"context7\"]),\n\t\thooks: gate(\"hook\", [\"session-context\", \"precompact-checkpoint\", \"stop-verify\", \"subagent-stop-audit\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"agent\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"mcp\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"prompt\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"skill\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"hook\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"훅\", weight: 4 },\n\t\t\t{ kind: \"keyword\", pattern: \"harness\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\borchestrat\\\\w*\\\\b\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"eval\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"subagent\", weight: 6 },\n\t\t\t{ kind: \"keyword\", pattern: \"tool\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"loop\", weight: 3 },\n\t\t\t{ kind: \"keyword\", pattern: \"context engineering\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(model context protocol|llm agent|multi-?agent|agentic)\\\\b\", weight: 6 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\b(token budget|context window|compaction|retrieval)\\\\b\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \".claude/agents\", weight: 6 },\n\t\t\t{ kind: \"path\", pattern: \".omk/\", weight: 5 },\n\t\t\t{ kind: \"path\", pattern: \"SKILL.md\", weight: 5 },\n\t\t\t{ kind: \"keyword\", pattern: \"correctness wall\", weight: 8 },\n\t\t\t{ kind: \"keyword\", pattern: \"patch safety\", weight: 8 },\n\t\t\t{ kind: \"regex\", pattern: \"\\\\bpatch[- ]safety\\\\b\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"correctness-wall\", weight: 7 },\n\t\t\t{ kind: \"path\", pattern: \"adaptorch-wpl\", weight: 5 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: AI Agent Engineering & Ops. You are operating in an agent-systems capability lane.\nPrioritize eval-driven design, correct context engineering, and safe autonomy.\n\nSEQUENCE:\n1. Frame the system: agentic-engineering (eval-first, decomposition, cost-aware routing) + ai-first-engineering operating model.\n2. Context: context-engineering for prompt/command/skill/sub-agent construction; iterative-retrieval to solve the subagent context problem; prompt-optimizer before shipping prompts (test with a fresh subagent, RED-GREEN-REFACTOR).\n3. Build artifacts: create-agent / create-skill / create-hook for the harness; mcp-builder + mcp-server-patterns for MCP servers (correct tool schemas, Zod, stdio vs HTTP).\n4. Autonomy: autonomous-loops / continuous-agent-loop with quality gates + recovery; enterprise-agent-ops for long-lived workloads (observability, boundaries, lifecycle).\n5. Evaluate: eval-harness + agent-eval + agent-self-evaluation — never ship an agent change without a measured eval delta. nanoclaw-repl for interactive iteration.\n6. Orchestration: harness (team-architecture factory) for multi-agent topology; dispatching-parallel-agents / subagent-driven-development for parallel lanes; ralphinho-rfc-pipeline for DAG + merge queue.\n\nHARD RULES: every agent/skill change has an eval; prompts are versioned and tested, not vibe-edited; MCP servers validate inputs; autonomy is bounded by explicit stop conditions + stop-verify hook.\n\nPATCH SAFETY (B2C Correctness Wall): for pre-apply patch screening, load the correctness-wall extension explicitly (not in default preset). Read packages/coding-agent/docs/correctness-wall.md and examples/extensions/correctness-wall/README.md. Roll out shadow → soft → hard; never claim formal correctness proof.`,\n\t},\n\n\tgeneral: {\n\t\tschemaVersion: \"omk.loadout.v1\",\n\t\tid: \"general\",\n\t\tname: \"general\",\n\t\tlabel: \"General (fallback)\",\n\t\tauthority: \"write-scoped\",\n\t\ttools: WRITE_TOOLS,\n\t\tskills: gate(\"skill\", [\n\t\t\t\"coding-standards\",\n\t\t\t\"verification-before-completion\",\n\t\t\t\"systematic-debugging\",\n\t\t\t\"receiving-code-review\",\n\t\t\t\"context-engineering\",\n\t\t\t\"understand-chat\",\n\t\t\t\"brainstorming\",\n\t\t]),\n\t\tmcp: gate(\"mcp\", [\"filesystem\", \"context7\", \"memory\"]),\n\t\thooks: gate(\"hook\", [\"pre-shell-guard\", \"protect-secrets\", \"stop-verify\"]),\n\t\tcommands: commands(\"scoped-shell\"),\n\t\ttriggers: [\n\t\t\t{ kind: \"keyword\", pattern: \"refactor\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"fix\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"implement\", weight: 2 },\n\t\t\t{ kind: \"keyword\", pattern: \"function\", weight: 1 },\n\t\t],\n\t\troutingPrompt: `DOMAIN: General. No specific domain scored above threshold, so apply broad engineering hygiene.\n\nSEQUENCE:\n1. understand-chat / brainstorming to confirm intent if ambiguous; otherwise read the target in full.\n2. coding-standards for idiom; systematic-debugging for any defect (reproduce -> isolate -> fix -> verify, never guess).\n3. verification-before-completion: run the real check command and show output before claiming done.\n4. receiving-code-review: treat feedback technically, verify before applying.\n\nHARD RULES: read before edit; smallest safe change; verify with evidence; ask one concise question if truly blocked.`,\n\t},\n};\n\n/** Ordered list of non-fallback domain ids (excludes \"general\"). */\nexport const DOMAIN_IDS: readonly string[] = Object.keys(DOMAIN_PROFILES).filter((id) => id !== \"general\");\n\n/** The fallback profile used when no domain clears the confidence threshold. */\nexport const FALLBACK_DOMAIN_ID = \"general\";\n\n/** Look up a domain profile by id. Returns the fallback profile if missing. */\nexport function getDomainProfile(id: string): DomainProfile {\n\treturn DOMAIN_PROFILES[id] ?? DOMAIN_PROFILES[FALLBACK_DOMAIN_ID];\n}\n\n/** Convenience: map domain ids to their loadout profile (for applyLoadoutProfile). */\nexport function domainLoadoutProfiles(): Readonly<Record<string, LoadoutProfile>> {\n\tconst out: Record<string, LoadoutProfile> = {};\n\tfor (const [id, profile] of Object.entries(DOMAIN_PROFILES)) {\n\t\tconst { id: _id, label: _label, triggers: _triggers, routingPrompt: _routingPrompt, ...loadout } = profile;\n\t\tout[id] = loadout;\n\t}\n\treturn out;\n}\n"]}
@@ -907,7 +907,7 @@ HARD RULES: tests-only command mode (no arbitrary shell); every fix is re-verifi
907
907
  Prioritize the Grok operational playbook, small capability loadouts, and evidence-bound provider/tool routing.
908
908
 
909
909
  SEQUENCE:
910
- 1. Before implementing or routing Grok/xAI provider work, read and enforce ~/.omk/agent/grok.md. Treat it as the required Grok playbook for chat models vs Imagine tools, proxy health, tool-use/loop discipline, and Telegram parity unless higher-priority instructions conflict.
910
+ 1. Before implementing or routing Grok/xAI provider work, read packages/coding-agent/docs/grok-harness.md as the canonical playbook. Treat ~/.omk/agent/grok.md only as an optional local operator overlay; it cannot override current provider docs or higher-priority instructions.
911
911
  2. Keep text chat flows and Imagine/media tool flows separate. Text work uses Grok chat/OAuth/provider surfaces; image/video/Imagine work routes through explicit Imagine tools only. Never conflate model ids with Imagine tool names.
912
912
  3. Capability discipline: load at most 2-3 skills for any lane. The allowed skill gate is packages, headroom, programming, debugging, adaptorch-route, adaptorch-synthesize, and understand-anything; choose the smallest subset and add headroom only under context pressure.
913
913
  4. Adaptorch is advisory only. Use adaptorch-route for routing/decomposition advice and adaptorch-synthesize for evidence synthesis, but do not treat Adaptorch as an automatic executor, source of truth, permission grant, or substitute for explicit tests.
@@ -915,7 +915,7 @@ SEQUENCE:
915
915
  6. Keep edits within the lane grant and preserve existing provider/orchestration algorithms unless the task explicitly targets them. Never route through legacy KIMICLI or deleted wrappers.
916
916
  7. Verification: run the narrowest relevant test/typecheck after edits. Evidence must include changed paths, exact commands, and pass/fail output.
917
917
 
918
- HARD RULES: grok.md is mandatory context for Grok/xAI harness work; text chat surfaces and Imagine tools are distinct; maximum 2-3 active skills; Adaptorch is advisory route/synthesis support only; never log OAuth tokens, cookies, or proxy credentials; protect-secrets applies.`,
918
+ HARD RULES: the packaged Grok harness doc is mandatory context; a local grok.md is optional; text chat surfaces and Imagine tools are distinct; maximum 2-3 active skills; Adaptorch is advisory route/synthesis support only; never log OAuth tokens, cookies, or proxy credentials; protect-secrets applies.`,
919
919
  },
920
920
  "ai-agent-ops": {
921
921
  schemaVersion: "omk.loadout.v1",