open-multi-agent-kit 0.90.5 → 0.90.7
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.
- package/CHANGELOG.md +39 -1
- package/README.md +9 -9
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/codexbar-cli.d.ts +39 -0
- package/dist/codexbar-cli.d.ts.map +1 -0
- package/dist/codexbar-cli.js +230 -0
- package/dist/codexbar-cli.js.map +1 -0
- package/dist/commands/doctor-provider.d.ts.map +1 -1
- package/dist/commands/doctor-provider.js +16 -3
- package/dist/commands/doctor-provider.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +30 -8
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/codexbar-adapter.d.ts +44 -0
- package/dist/core/codexbar-adapter.d.ts.map +1 -0
- package/dist/core/codexbar-adapter.js +211 -0
- package/dist/core/codexbar-adapter.js.map +1 -0
- package/dist/core/command-safety.d.ts.map +1 -1
- package/dist/core/command-safety.js +7 -0
- package/dist/core/command-safety.js.map +1 -1
- package/dist/core/compaction/index.d.ts +2 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +2 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/compaction/model-policy.d.ts +9 -0
- package/dist/core/compaction/model-policy.d.ts.map +1 -0
- package/dist/core/compaction/model-policy.js +37 -0
- package/dist/core/compaction/model-policy.js.map +1 -0
- package/dist/core/compaction/resume-policy.d.ts +6 -0
- package/dist/core/compaction/resume-policy.d.ts.map +1 -0
- package/dist/core/compaction/resume-policy.js +8 -0
- package/dist/core/compaction/resume-policy.js.map +1 -0
- package/dist/core/domain-loadouts.d.ts.map +1 -1
- package/dist/core/domain-loadouts.js +68 -1
- package/dist/core/domain-loadouts.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +12 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +3 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +15 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/grok-harness-dispatch.d.ts +22 -0
- package/dist/core/grok-harness-dispatch.d.ts.map +1 -0
- package/dist/core/grok-harness-dispatch.js +44 -0
- package/dist/core/grok-harness-dispatch.js.map +1 -0
- package/dist/core/grok-harness.d.ts +25 -0
- package/dist/core/grok-harness.d.ts.map +1 -0
- package/dist/core/grok-harness.js +61 -0
- package/dist/core/grok-harness.js.map +1 -0
- package/dist/core/grok-playbook.d.ts +7 -0
- package/dist/core/grok-playbook.d.ts.map +1 -0
- package/dist/core/grok-playbook.js +34 -0
- package/dist/core/grok-playbook.js.map +1 -0
- package/dist/core/reasoning-router-v4-normalize.d.ts +11 -0
- package/dist/core/reasoning-router-v4-normalize.d.ts.map +1 -0
- package/dist/core/reasoning-router-v4-normalize.js +224 -0
- package/dist/core/reasoning-router-v4-normalize.js.map +1 -0
- package/dist/core/reasoning-router-v4-weights.d.ts +13 -5
- package/dist/core/reasoning-router-v4-weights.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4-weights.js +8 -4
- package/dist/core/reasoning-router-v4-weights.js.map +1 -1
- package/dist/core/reasoning-router-v4.d.ts +3 -3
- package/dist/core/reasoning-router-v4.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4.js +394 -58
- package/dist/core/reasoning-router-v4.js.map +1 -1
- package/dist/core/router-feedback-collector.d.ts +1 -1
- package/dist/core/router-feedback-collector.d.ts.map +1 -1
- package/dist/core/router-feedback-collector.js +9 -1
- package/dist/core/router-feedback-collector.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +31 -12
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -3
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +4 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +1 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +1 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +2 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +3 -2
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +42 -17
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/adaptorch-preview.md +84 -0
- package/docs/correctness-wall.md +117 -0
- package/docs/grok-harness.md +63 -0
- package/docs/loadout-domains/README.md +2 -1
- package/docs/loadout-domains/ai-agent-ops.md +8 -1
- package/docs/loadout-domains/frontend-ui.md +5 -1
- package/docs/loadout-domains/grok-harness.md +74 -0
- package/docs/providers.md +4 -0
- package/examples/extensions/correctness-wall/LOADOUT.md +87 -0
- package/examples/extensions/correctness-wall/README.md +111 -0
- package/examples/extensions/correctness-wall/adjudication-fixture.ts +151 -0
- package/examples/extensions/correctness-wall/index.ts +470 -0
- package/examples/extensions/correctness-wall/repair-state.ts +77 -0
- package/examples/extensions/correctness-wall/wall-cache.ts +81 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/preset.ts +2 -2
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-loadouts.js","sourceRoot":"","sources":["../../src/core/domain-loadouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAwCH,MAAM,UAAU,GAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;AACvE,MAAM,WAAW,GAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;AACjG,MAAM,UAAU,GAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;AAC/E,MAAM,cAAc,GAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;AAEnF,SAAS,IAAI,CAAC,IAA8B,EAAE,KAAwB,EAAkB;IACvF,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAAA,CACpC;AAED,SAAS,QAAQ,CAAC,IAA6B,EAAE,MAAiC,EAAmB;IACpG,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;AAAA,CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAA4C;IACvE,aAAa,EAAE;QACd,aAAa,EAAE,gBAAgB;QAC/B,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,aAAa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AAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE;SACnD;QACD,aAAa,EAAE;;;;;;;;qHAQoG;KACnH;CACD,CAAC;AAEF,oEAAoE;AACpE,MAAM,CAAC,MAAM,UAAU,GAAsB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;AAE3G,gFAAgF;AAChF,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAE5C,+EAA+E;AAC/E,MAAM,UAAU,gBAAgB,CAAC,EAAU,EAAiB;IAC3D,OAAO,eAAe,CAAC,EAAE,CAAC,IAAI,eAAe,CAAC,kBAAkB,CAAC,CAAC;AAAA,CAClE;AAED,sFAAsF;AACtF,MAAM,UAAU,qBAAqB,GAA6C;IACjF,MAAM,GAAG,GAAmC,EAAE,CAAC;IAC/C,KAAK,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC7D,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC;QAC3G,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AAAA,CACX","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\"redesign-existing-projects\",\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\"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],\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\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.js","sourceRoot":"","sources":["../../src/core/domain-loadouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAwCH,MAAM,UAAU,GAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;AACvE,MAAM,WAAW,GAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;AACjG,MAAM,UAAU,GAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;AAC/E,MAAM,cAAc,GAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;AAEnF,SAAS,IAAI,CAAC,IAA8B,EAAE,KAAwB,EAAkB;IACvF,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAAA,CACpC;AAED,SAAS,QAAQ,CAAC,IAA6B,EAAE,MAAiC,EAAmB;IACpG,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;AAAA,CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAA4C;IACvE,aAAa,EAAE;QACd,aAAa,EAAE,gBAAgB;QAC/B,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,WAAW;QAClB,MAAM,EAA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C;AAAA,CAClE;AAED,sFAAsF;AACtF,MAAM,UAAU,qBAAqB,GAA6C;IACjF,MAAM,GAAG,GAAmC,EAAE,CAAC;IAC/C,KAAK,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC7D,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC;QAC3G,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AAAA,CACX","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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhE,OAAO,KAAK,EACX,SAAS,EAET,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EAKpB,MAAM,YAAY,CAAC;AA+FpB;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CA8CzD;AA4OD;;GAEG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,gBAAgB,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,gBAAgB,EACzB,aAAa,SAAa,GACxB,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAyBrH;AA6GD;;GAEG;AACH,wBAAsB,yBAAyB,CAC9C,eAAe,EAAE,MAAM,EAAE,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,MAAsB,EAChC,QAAQ,CAAC,EAAE,QAAQ,GACjB,OAAO,CAAC,oBAAoB,CAAC,CA2C/B","sourcesContent":["/**\n * Extension loader - loads TypeScript extension modules using jiti.\n *\n */\n\nimport * as fs from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { createJiti } from \"jiti/static\";\nimport * as _bundledOmkAgentCore from \"omk-agent-core\";\nimport * as _bundledOmkAi from \"omk-ai\";\nimport * as _bundledOmkAiOauth from \"omk-ai/oauth\";\nimport type { KeyId } from \"omk-tui\";\nimport * as _bundledOmkTui from \"omk-tui\";\n// Static imports of packages that extensions may use.\n// These MUST be static so Bun bundles them into the compiled binary.\n// The virtualModules option then makes them available to extensions.\nimport * as _bundledTypebox from \"typebox\";\nimport * as _bundledTypeboxCompile from \"typebox/compile\";\nimport * as _bundledTypeboxValue from \"typebox/value\";\nimport { CONFIG_DIR_NAME, getAgentDir, isBunBinary } from \"../../config.ts\";\n// NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,\n// avoiding a circular dependency. Extensions can import from open-multi-agent-kit.\nimport * as _bundledOmkCodingAgent from \"../../index.ts\";\nimport { resolvePath } from \"../../utils/paths.ts\";\nimport { createEventBus, type EventBus } from \"../event-bus.ts\";\nimport type { ExecOptions } from \"../exec.ts\";\nimport { execCommand } from \"../exec.ts\";\nimport { createSyntheticSourceInfo } from \"../source-info.ts\";\nimport type {\n\tExtension,\n\tExtensionAPI,\n\tExtensionFactory,\n\tExtensionRuntime,\n\tLoadExtensionsResult,\n\tMessageRenderer,\n\tProviderConfig,\n\tRegisteredCommand,\n\tToolDefinition,\n} from \"./types.ts\";\n\n/** Modules available to extensions via virtualModules (for compiled Bun binary) */\nconst VIRTUAL_MODULES: Record<string, unknown> = {\n\ttypebox: _bundledTypebox,\n\t\"typebox/compile\": _bundledTypeboxCompile,\n\t\"typebox/value\": _bundledTypeboxValue,\n\t\"@sinclair/typebox\": _bundledTypebox,\n\t\"@sinclair/typebox/compile\": _bundledTypeboxCompile,\n\t\"@sinclair/typebox/value\": _bundledTypeboxValue,\n\t\"omk-agent-core\": _bundledOmkAgentCore,\n\t\"omk-tui\": _bundledOmkTui,\n\t\"omk-ai\": _bundledOmkAi,\n\t\"omk-ai/oauth\": _bundledOmkAiOauth,\n\t\"open-multi-agent-kit\": _bundledOmkCodingAgent,\n};\n\nconst require = createRequire(import.meta.url);\n\n/**\n * Get aliases for jiti (used in Node.js/development mode).\n * In Bun binary mode, virtualModules is used instead.\n */\nlet _aliases: Record<string, string> | null = null;\n\nfunction getAliases(): Record<string, string> {\n\tif (_aliases) return _aliases;\n\n\tconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\tconst packageIndex = path.resolve(__dirname, \"../..\", \"index.js\");\n\n\tconst typeboxEntry = require.resolve(\"typebox\");\n\tconst typeboxCompileEntry = require.resolve(\"typebox/compile\");\n\tconst typeboxValueEntry = require.resolve(\"typebox/value\");\n\n\tconst packagesRoot = path.resolve(__dirname, \"../../../../\");\n\tconst findPackageJsonPath = (specifier: string): string => {\n\t\ttry {\n\t\t\treturn require.resolve(`${specifier}/package.json`);\n\t\t} catch {\n\t\t\tlet current = __dirname;\n\t\t\twhile (true) {\n\t\t\t\tconst candidate = path.join(current, \"node_modules\", ...specifier.split(\"/\"), \"package.json\");\n\t\t\t\tif (fs.existsSync(candidate)) {\n\t\t\t\t\treturn candidate;\n\t\t\t\t}\n\t\t\t\tconst parent = path.dirname(current);\n\t\t\t\tif (parent === current) {\n\t\t\t\t\tthrow new Error(`Unable to resolve package.json for ${specifier}`);\n\t\t\t\t}\n\t\t\t\tcurrent = parent;\n\t\t\t}\n\t\t}\n\t};\n\tconst resolvePackageFile = (specifier: string, packageRelativePath: string): string => {\n\t\tconst packageJsonPath = findPackageJsonPath(specifier);\n\t\treturn path.join(path.dirname(packageJsonPath), packageRelativePath);\n\t};\n\tconst resolveWorkspaceOrPackageFile = (\n\t\tworkspaceRelativePath: string,\n\t\tspecifier: string,\n\t\tpackageRelativePath: string,\n\t): string => {\n\t\tconst workspacePath = path.join(packagesRoot, workspaceRelativePath);\n\t\tif (fs.existsSync(workspacePath)) {\n\t\t\treturn workspacePath;\n\t\t}\n\t\treturn resolvePackageFile(specifier, packageRelativePath);\n\t};\n\n\tconst omkCodingAgentEntry = packageIndex;\n\tconst omkAgentCoreEntry = resolveWorkspaceOrPackageFile(\"agent/dist/index.js\", \"omk-agent-core\", \"dist/index.js\");\n\tconst omkTuiEntry = resolveWorkspaceOrPackageFile(\"tui/dist/index.js\", \"omk-tui\", \"dist/index.js\");\n\tconst omkAiEntry = resolveWorkspaceOrPackageFile(\"ai/dist/index.js\", \"omk-ai\", \"dist/index.js\");\n\tconst omkAiOauthEntry = resolveWorkspaceOrPackageFile(\"ai/dist/oauth.js\", \"omk-ai\", \"dist/oauth.js\");\n\n\t_aliases = {\n\t\t\"open-multi-agent-kit\": omkCodingAgentEntry,\n\t\t\"omk-agent-core\": omkAgentCoreEntry,\n\t\t\"omk-tui\": omkTuiEntry,\n\t\t\"omk-ai\": omkAiEntry,\n\t\t\"omk-ai/oauth\": omkAiOauthEntry,\n\t\ttypebox: typeboxEntry,\n\t\t\"typebox/compile\": typeboxCompileEntry,\n\t\t\"typebox/value\": typeboxValueEntry,\n\t\t\"@sinclair/typebox\": typeboxEntry,\n\t\t\"@sinclair/typebox/compile\": typeboxCompileEntry,\n\t\t\"@sinclair/typebox/value\": typeboxValueEntry,\n\t};\n\n\treturn _aliases;\n}\n\ntype HandlerFn = (...args: unknown[]) => Promise<unknown>;\n\n/**\n * Create a runtime with throwing stubs for action methods.\n * Runner.bindCore() replaces these with real implementations.\n */\nexport function createExtensionRuntime(): ExtensionRuntime {\n\tconst notInitialized = () => {\n\t\tthrow new Error(\"Extension runtime not initialized. Action methods cannot be called during extension loading.\");\n\t};\n\tconst state: { staleMessage?: string } = {};\n\tconst assertActive = () => {\n\t\tif (state.staleMessage) {\n\t\t\tthrow new Error(state.staleMessage);\n\t\t}\n\t};\n\n\tconst runtime: ExtensionRuntime = {\n\t\tsendMessage: notInitialized,\n\t\tsendUserMessage: notInitialized,\n\t\tappendEntry: notInitialized,\n\t\tsetSessionName: notInitialized,\n\t\tgetSessionName: notInitialized,\n\t\tsetLabel: notInitialized,\n\t\tgetActiveTools: notInitialized,\n\t\tgetAllTools: notInitialized,\n\t\tsetActiveTools: notInitialized,\n\t\t// registerTool() is valid during extension load; refresh is only needed post-bind.\n\t\trefreshTools: () => {},\n\t\tgetCommands: notInitialized,\n\t\tsetModel: () => Promise.reject(new Error(\"Extension runtime not initialized\")),\n\t\tgetThinkingLevel: notInitialized,\n\t\tsetThinkingLevel: notInitialized,\n\t\tflagValues: new Map(),\n\t\tpendingProviderRegistrations: [],\n\t\tassertActive,\n\t\tinvalidate: (message) => {\n\t\t\tstate.staleMessage ??=\n\t\t\t\tmessage ??\n\t\t\t\t\"This extension ctx is stale after session replacement or reload. Do not use a captured extension API or command ctx after ctx.newSession(), ctx.fork(), ctx.switchSession(), or ctx.reload(). For newSession, fork, and switchSession, move post-replacement work into withSession and use the ctx passed to withSession. For reload, do not use the old ctx after await ctx.reload().\";\n\t\t},\n\t\t// Pre-bind: queue registrations so bindCore() can flush them once the\n\t\t// model registry is available. bindCore() replaces both with direct calls.\n\t\tregisterProvider: (name, config, extensionPath = \"<unknown>\") => {\n\t\t\truntime.pendingProviderRegistrations.push({ name, config, extensionPath });\n\t\t},\n\t\tunregisterProvider: (name) => {\n\t\t\truntime.pendingProviderRegistrations = runtime.pendingProviderRegistrations.filter((r) => r.name !== name);\n\t\t},\n\t};\n\n\treturn runtime;\n}\n\n/**\n * Create the ExtensionAPI for an extension.\n * Registration methods write to the extension object.\n * Action methods delegate to the shared runtime.\n */\nfunction createExtensionAPI(\n\textension: Extension,\n\truntime: ExtensionRuntime,\n\tcwd: string,\n\teventBus: EventBus,\n): ExtensionAPI {\n\tconst api = {\n\t\t// Registration methods - write to extension\n\t\ton(event: string, handler: HandlerFn): void {\n\t\t\truntime.assertActive();\n\t\t\tconst list = extension.handlers.get(event) ?? [];\n\t\t\tlist.push(handler);\n\t\t\textension.handlers.set(event, list);\n\t\t},\n\n\t\tregisterTool(tool: ToolDefinition): void {\n\t\t\truntime.assertActive();\n\t\t\textension.tools.set(tool.name, {\n\t\t\t\tdefinition: tool,\n\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t});\n\t\t\truntime.refreshTools();\n\t\t},\n\n\t\tregisterCommand(name: string, options: Omit<RegisteredCommand, \"name\" | \"sourceInfo\">): void {\n\t\t\truntime.assertActive();\n\t\t\textension.commands.set(name, {\n\t\t\t\tname,\n\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\n\t\tregisterShortcut(\n\t\t\tshortcut: KeyId,\n\t\t\toptions: {\n\t\t\t\tdescription?: string;\n\t\t\t\thandler: (ctx: import(\"./types.ts\").ExtensionContext) => Promise<void> | void;\n\t\t\t},\n\t\t): void {\n\t\t\truntime.assertActive();\n\t\t\textension.shortcuts.set(shortcut, { shortcut, extensionPath: extension.path, ...options });\n\t\t},\n\n\t\tregisterFlag(\n\t\t\tname: string,\n\t\t\toptions: { description?: string; type: \"boolean\" | \"string\"; default?: boolean | string },\n\t\t): void {\n\t\t\truntime.assertActive();\n\t\t\textension.flags.set(name, { name, extensionPath: extension.path, ...options });\n\t\t\tif (options.default !== undefined && !runtime.flagValues.has(name)) {\n\t\t\t\truntime.flagValues.set(name, options.default);\n\t\t\t}\n\t\t},\n\n\t\tregisterMessageRenderer<T>(customType: string, renderer: MessageRenderer<T>): void {\n\t\t\truntime.assertActive();\n\t\t\textension.messageRenderers.set(customType, renderer as MessageRenderer);\n\t\t},\n\n\t\t// Flag access - checks extension registered it, reads from runtime\n\t\tgetFlag(name: string): boolean | string | undefined {\n\t\t\truntime.assertActive();\n\t\t\tif (!extension.flags.has(name)) return undefined;\n\t\t\treturn runtime.flagValues.get(name);\n\t\t},\n\n\t\t// Action methods - delegate to shared runtime\n\t\tsendMessage(message, options): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.sendMessage(message, options);\n\t\t},\n\n\t\tsendUserMessage(content, options): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.sendUserMessage(content, options);\n\t\t},\n\n\t\tappendEntry(customType: string, data?: unknown): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.appendEntry(customType, data);\n\t\t},\n\n\t\tsetSessionName(name: string): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.setSessionName(name);\n\t\t},\n\n\t\tgetSessionName(): string | undefined {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getSessionName();\n\t\t},\n\n\t\tsetLabel(entryId: string, label: string | undefined): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.setLabel(entryId, label);\n\t\t},\n\n\t\texec(command: string, args: string[], options?: ExecOptions) {\n\t\t\truntime.assertActive();\n\t\t\treturn execCommand(command, args, options?.cwd ?? cwd, options);\n\t\t},\n\n\t\tgetActiveTools(): string[] {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getActiveTools();\n\t\t},\n\n\t\tgetAllTools() {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getAllTools();\n\t\t},\n\n\t\tsetActiveTools(toolNames: string[]): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.setActiveTools(toolNames);\n\t\t},\n\n\t\tgetCommands() {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getCommands();\n\t\t},\n\n\t\tsetModel(model) {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.setModel(model);\n\t\t},\n\n\t\tgetThinkingLevel() {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getThinkingLevel();\n\t\t},\n\n\t\tsetThinkingLevel(level) {\n\t\t\truntime.assertActive();\n\t\t\truntime.setThinkingLevel(level);\n\t\t},\n\n\t\tregisterProvider(name: string, config: ProviderConfig) {\n\t\t\truntime.assertActive();\n\t\t\truntime.registerProvider(name, config, extension.path);\n\t\t},\n\n\t\tunregisterProvider(name: string) {\n\t\t\truntime.assertActive();\n\t\t\truntime.unregisterProvider(name, extension.path);\n\t\t},\n\n\t\t// Track extension event subscriptions so they can be\n\t\t// unsubscribed on reload instead of stacking duplicate listeners\n\t\t// on the shared event bus.\n\t\tevents: {\n\t\t\temit: (channel, data) => {\n\t\t\t\teventBus.emit(channel, data);\n\t\t\t},\n\t\t\ton: (channel, handler) => {\n\t\t\t\tconst unsubscribe = eventBus.on(channel, handler);\n\t\t\t\textension.eventBusSubscriptions?.push(unsubscribe);\n\t\t\t\treturn unsubscribe;\n\t\t\t},\n\t\t},\n\t} as ExtensionAPI;\n\n\treturn api;\n}\n\nasync function loadExtensionModule(extensionPath: string) {\n\tconst jiti = createJiti(import.meta.url, {\n\t\tmoduleCache: false,\n\t\t// In Bun binary: use virtualModules for bundled packages (no filesystem resolution)\n\t\t// Also disable tryNative so jiti handles ALL imports (not just the entry point)\n\t\t// In Node.js/dev: use aliases to resolve to node_modules paths\n\t\t...(isBunBinary ? { virtualModules: VIRTUAL_MODULES, tryNative: false } : { alias: getAliases() }),\n\t});\n\n\tconst module = await jiti.import(extensionPath, { default: true });\n\tconst factory = module as ExtensionFactory;\n\treturn typeof factory !== \"function\" ? undefined : factory;\n}\n\n/**\n * Create an Extension object with empty collections.\n */\nfunction createExtension(extensionPath: string, resolvedPath: string): Extension {\n\tconst source =\n\t\textensionPath.startsWith(\"<\") && extensionPath.endsWith(\">\")\n\t\t\t? extensionPath.slice(1, -1).split(\":\")[0] || \"temporary\"\n\t\t\t: \"local\";\n\tconst baseDir = extensionPath.startsWith(\"<\") ? undefined : path.dirname(resolvedPath);\n\n\treturn {\n\t\tpath: extensionPath,\n\t\tresolvedPath,\n\t\tsourceInfo: createSyntheticSourceInfo(extensionPath, { source, baseDir }),\n\t\thandlers: new Map(),\n\t\ttools: new Map(),\n\t\tmessageRenderers: new Map(),\n\t\tcommands: new Map(),\n\t\tflags: new Map(),\n\t\tshortcuts: new Map(),\n\t\teventBusSubscriptions: [],\n\t};\n}\n\nasync function loadExtension(\n\textensionPath: string,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n): Promise<{ extension: Extension | null; error: string | null }> {\n\tconst resolvedPath = resolvePath(extensionPath, cwd, { normalizeUnicodeSpaces: true });\n\n\ttry {\n\t\tconst factory = await loadExtensionModule(resolvedPath);\n\t\tif (!factory) {\n\t\t\treturn { extension: null, error: `Extension does not export a valid factory function: ${extensionPath}` };\n\t\t}\n\n\t\tconst extension = createExtension(extensionPath, resolvedPath);\n\t\tconst api = createExtensionAPI(extension, runtime, cwd, eventBus);\n\t\tawait factory(api);\n\n\t\treturn { extension, error: null };\n\t} catch (err) {\n\t\tconst message = err instanceof Error ? err.message : String(err);\n\t\treturn { extension: null, error: `Failed to load extension: ${message}` };\n\t}\n}\n\n/**\n * Create an Extension from an inline factory function.\n */\nexport async function loadExtensionFromFactory(\n\tfactory: ExtensionFactory,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n\textensionPath = \"<inline>\",\n): Promise<Extension> {\n\tconst extension = createExtension(extensionPath, extensionPath);\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst api = createExtensionAPI(extension, runtime, resolvedCwd, eventBus);\n\tawait factory(api);\n\treturn extension;\n}\n\n/**\n * Load extensions from paths.\n */\nexport async function loadExtensions(paths: string[], cwd: string, eventBus?: EventBus): Promise<LoadExtensionsResult> {\n\tconst extensions: Extension[] = [];\n\tconst errors: Array<{ path: string; error: string }> = [];\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedEventBus = eventBus ?? createEventBus();\n\tconst runtime = createExtensionRuntime();\n\n\tfor (const extPath of paths) {\n\t\tconst { extension, error } = await loadExtension(extPath, resolvedCwd, resolvedEventBus, runtime);\n\n\t\tif (error) {\n\t\t\terrors.push({ path: extPath, error });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (extension) {\n\t\t\textensions.push(extension);\n\t\t}\n\t}\n\n\treturn {\n\t\textensions,\n\t\terrors,\n\t\truntime,\n\t};\n}\n\ninterface OmkManifest {\n\textensions?: string[];\n\tthemes?: string[];\n\tskills?: string[];\n\tprompts?: string[];\n}\n\nfunction readOmkManifest(packageJsonPath: string): OmkManifest | null {\n\ttry {\n\t\tconst content = fs.readFileSync(packageJsonPath, \"utf-8\");\n\t\tconst pkg = JSON.parse(content) as { omk?: unknown };\n\t\tconst manifest = pkg.omk;\n\t\treturn manifest && typeof manifest === \"object\" ? (manifest as OmkManifest) : null;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction isExtensionFile(name: string): boolean {\n\treturn name.endsWith(\".ts\") || name.endsWith(\".js\");\n}\n\n/**\n * Resolve extension entry points from a directory.\n *\n * Checks for:\n * 1. package.json with \"omk.extensions\" field -> returns declared paths\n * 2. index.ts or index.js -> returns the index file\n *\n * Returns resolved paths or null if no entry points found.\n */\nfunction resolveExtensionEntries(dir: string): string[] | null {\n\t// Check for package.json with \"omk\" field first\n\tconst packageJsonPath = path.join(dir, \"package.json\");\n\tif (fs.existsSync(packageJsonPath)) {\n\t\tconst manifest = readOmkManifest(packageJsonPath);\n\t\tif (manifest?.extensions?.length) {\n\t\t\tconst entries: string[] = [];\n\t\t\tfor (const extPath of manifest.extensions) {\n\t\t\t\tconst resolvedExtPath = path.resolve(dir, extPath);\n\t\t\t\tif (fs.existsSync(resolvedExtPath)) {\n\t\t\t\t\tentries.push(resolvedExtPath);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (entries.length > 0) {\n\t\t\t\treturn entries;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check for index.ts or index.js\n\tconst indexTs = path.join(dir, \"index.ts\");\n\tconst indexJs = path.join(dir, \"index.js\");\n\tif (fs.existsSync(indexTs)) {\n\t\treturn [indexTs];\n\t}\n\tif (fs.existsSync(indexJs)) {\n\t\treturn [indexJs];\n\t}\n\n\treturn null;\n}\n\n/**\n * Discover extensions in a directory.\n *\n * Discovery rules:\n * 1. Direct files: `extensions/*.ts` or `*.js` → load\n * 2. Subdirectory with index: `extensions/* /index.ts` or `index.js` → load\n * 3. Subdirectory with package.json: `extensions/* /package.json` with OMK manifest → load what it declares\n *\n * No recursion beyond one level. Complex packages must use package.json manifest.\n */\nfunction discoverExtensionsInDir(dir: string): string[] {\n\tif (!fs.existsSync(dir)) {\n\t\treturn [];\n\t}\n\n\tconst discovered: string[] = [];\n\n\ttry {\n\t\tconst entries = fs.readdirSync(dir, { withFileTypes: true });\n\n\t\tfor (const entry of entries) {\n\t\t\tconst entryPath = path.join(dir, entry.name);\n\n\t\t\t// 1. Direct files: *.ts or *.js\n\t\t\tif ((entry.isFile() || entry.isSymbolicLink()) && isExtensionFile(entry.name)) {\n\t\t\t\tdiscovered.push(entryPath);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// 2 & 3. Subdirectories\n\t\t\tif (entry.isDirectory() || entry.isSymbolicLink()) {\n\t\t\t\tconst entries = resolveExtensionEntries(entryPath);\n\t\t\t\tif (entries) {\n\t\t\t\t\tdiscovered.push(...entries);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch {\n\t\treturn [];\n\t}\n\n\treturn discovered;\n}\n\n/**\n * Discover and load extensions from standard locations.\n */\nexport async function discoverAndLoadExtensions(\n\tconfiguredPaths: string[],\n\tcwd: string,\n\tagentDir: string = getAgentDir(),\n\teventBus?: EventBus,\n): Promise<LoadExtensionsResult> {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedAgentDir = resolvePath(agentDir);\n\tconst allPaths: string[] = [];\n\tconst seen = new Set<string>();\n\n\tconst addPaths = (paths: string[]) => {\n\t\tfor (const p of paths) {\n\t\t\tconst resolved = path.resolve(p);\n\t\t\tif (!seen.has(resolved)) {\n\t\t\t\tseen.add(resolved);\n\t\t\t\tallPaths.push(p);\n\t\t\t}\n\t\t}\n\t};\n\n\t// 1. Project-local extensions: cwd/${CONFIG_DIR_NAME}/extensions/\n\tconst localExtDir = path.join(resolvedCwd, CONFIG_DIR_NAME, \"extensions\");\n\taddPaths(discoverExtensionsInDir(localExtDir));\n\n\t// 2. Global extensions: agentDir/extensions/\n\tconst globalExtDir = path.join(resolvedAgentDir, \"extensions\");\n\taddPaths(discoverExtensionsInDir(globalExtDir));\n\n\t// 3. Explicitly configured paths\n\tfor (const p of configuredPaths) {\n\t\tconst resolved = resolvePath(p, resolvedCwd, { normalizeUnicodeSpaces: true });\n\t\tif (fs.existsSync(resolved) && fs.statSync(resolved).isDirectory()) {\n\t\t\t// Check for package.json with omk manifest or index.ts\n\t\t\tconst entries = resolveExtensionEntries(resolved);\n\t\t\tif (entries) {\n\t\t\t\taddPaths(entries);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// No explicit entries - discover individual files in directory\n\t\t\taddPaths(discoverExtensionsInDir(resolved));\n\t\t\tcontinue;\n\t\t}\n\n\t\taddPaths([resolved]);\n\t}\n\n\treturn loadExtensions(allPaths, resolvedCwd, eventBus);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhE,OAAO,KAAK,EACX,SAAS,EAET,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EAKpB,MAAM,YAAY,CAAC;AA+FpB;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAgDzD;AAyPD;;GAEG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,gBAAgB,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,gBAAgB,EACzB,aAAa,SAAa,GACxB,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAyBrH;AA6GD;;GAEG;AACH,wBAAsB,yBAAyB,CAC9C,eAAe,EAAE,MAAM,EAAE,EACzB,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,MAAsB,EAChC,QAAQ,CAAC,EAAE,QAAQ,GACjB,OAAO,CAAC,oBAAoB,CAAC,CA2C/B","sourcesContent":["/**\n * Extension loader - loads TypeScript extension modules using jiti.\n *\n */\n\nimport * as fs from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { createJiti } from \"jiti/static\";\nimport * as _bundledOmkAgentCore from \"omk-agent-core\";\nimport * as _bundledOmkAi from \"omk-ai\";\nimport * as _bundledOmkAiOauth from \"omk-ai/oauth\";\nimport type { KeyId } from \"omk-tui\";\nimport * as _bundledOmkTui from \"omk-tui\";\n// Static imports of packages that extensions may use.\n// These MUST be static so Bun bundles them into the compiled binary.\n// The virtualModules option then makes them available to extensions.\nimport * as _bundledTypebox from \"typebox\";\nimport * as _bundledTypeboxCompile from \"typebox/compile\";\nimport * as _bundledTypeboxValue from \"typebox/value\";\nimport { CONFIG_DIR_NAME, getAgentDir, isBunBinary } from \"../../config.ts\";\n// NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,\n// avoiding a circular dependency. Extensions can import from open-multi-agent-kit.\nimport * as _bundledOmkCodingAgent from \"../../index.ts\";\nimport { resolvePath } from \"../../utils/paths.ts\";\nimport { createEventBus, type EventBus } from \"../event-bus.ts\";\nimport type { ExecOptions } from \"../exec.ts\";\nimport { execCommand } from \"../exec.ts\";\nimport { createSyntheticSourceInfo } from \"../source-info.ts\";\nimport type {\n\tExtension,\n\tExtensionAPI,\n\tExtensionFactory,\n\tExtensionRuntime,\n\tLoadExtensionsResult,\n\tMessageRenderer,\n\tProviderConfig,\n\tRegisteredCommand,\n\tToolDefinition,\n} from \"./types.ts\";\n\n/** Modules available to extensions via virtualModules (for compiled Bun binary) */\nconst VIRTUAL_MODULES: Record<string, unknown> = {\n\ttypebox: _bundledTypebox,\n\t\"typebox/compile\": _bundledTypeboxCompile,\n\t\"typebox/value\": _bundledTypeboxValue,\n\t\"@sinclair/typebox\": _bundledTypebox,\n\t\"@sinclair/typebox/compile\": _bundledTypeboxCompile,\n\t\"@sinclair/typebox/value\": _bundledTypeboxValue,\n\t\"omk-agent-core\": _bundledOmkAgentCore,\n\t\"omk-tui\": _bundledOmkTui,\n\t\"omk-ai\": _bundledOmkAi,\n\t\"omk-ai/oauth\": _bundledOmkAiOauth,\n\t\"open-multi-agent-kit\": _bundledOmkCodingAgent,\n};\n\nconst require = createRequire(import.meta.url);\n\n/**\n * Get aliases for jiti (used in Node.js/development mode).\n * In Bun binary mode, virtualModules is used instead.\n */\nlet _aliases: Record<string, string> | null = null;\n\nfunction getAliases(): Record<string, string> {\n\tif (_aliases) return _aliases;\n\n\tconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\tconst packageIndex = path.resolve(__dirname, \"../..\", \"index.js\");\n\n\tconst typeboxEntry = require.resolve(\"typebox\");\n\tconst typeboxCompileEntry = require.resolve(\"typebox/compile\");\n\tconst typeboxValueEntry = require.resolve(\"typebox/value\");\n\n\tconst packagesRoot = path.resolve(__dirname, \"../../../../\");\n\tconst findPackageJsonPath = (specifier: string): string => {\n\t\ttry {\n\t\t\treturn require.resolve(`${specifier}/package.json`);\n\t\t} catch {\n\t\t\tlet current = __dirname;\n\t\t\twhile (true) {\n\t\t\t\tconst candidate = path.join(current, \"node_modules\", ...specifier.split(\"/\"), \"package.json\");\n\t\t\t\tif (fs.existsSync(candidate)) {\n\t\t\t\t\treturn candidate;\n\t\t\t\t}\n\t\t\t\tconst parent = path.dirname(current);\n\t\t\t\tif (parent === current) {\n\t\t\t\t\tthrow new Error(`Unable to resolve package.json for ${specifier}`);\n\t\t\t\t}\n\t\t\t\tcurrent = parent;\n\t\t\t}\n\t\t}\n\t};\n\tconst resolvePackageFile = (specifier: string, packageRelativePath: string): string => {\n\t\tconst packageJsonPath = findPackageJsonPath(specifier);\n\t\treturn path.join(path.dirname(packageJsonPath), packageRelativePath);\n\t};\n\tconst resolveWorkspaceOrPackageFile = (\n\t\tworkspaceRelativePath: string,\n\t\tspecifier: string,\n\t\tpackageRelativePath: string,\n\t): string => {\n\t\tconst workspacePath = path.join(packagesRoot, workspaceRelativePath);\n\t\tif (fs.existsSync(workspacePath)) {\n\t\t\treturn workspacePath;\n\t\t}\n\t\treturn resolvePackageFile(specifier, packageRelativePath);\n\t};\n\n\tconst omkCodingAgentEntry = packageIndex;\n\tconst omkAgentCoreEntry = resolveWorkspaceOrPackageFile(\"agent/dist/index.js\", \"omk-agent-core\", \"dist/index.js\");\n\tconst omkTuiEntry = resolveWorkspaceOrPackageFile(\"tui/dist/index.js\", \"omk-tui\", \"dist/index.js\");\n\tconst omkAiEntry = resolveWorkspaceOrPackageFile(\"ai/dist/index.js\", \"omk-ai\", \"dist/index.js\");\n\tconst omkAiOauthEntry = resolveWorkspaceOrPackageFile(\"ai/dist/oauth.js\", \"omk-ai\", \"dist/oauth.js\");\n\n\t_aliases = {\n\t\t\"open-multi-agent-kit\": omkCodingAgentEntry,\n\t\t\"omk-agent-core\": omkAgentCoreEntry,\n\t\t\"omk-tui\": omkTuiEntry,\n\t\t\"omk-ai\": omkAiEntry,\n\t\t\"omk-ai/oauth\": omkAiOauthEntry,\n\t\ttypebox: typeboxEntry,\n\t\t\"typebox/compile\": typeboxCompileEntry,\n\t\t\"typebox/value\": typeboxValueEntry,\n\t\t\"@sinclair/typebox\": typeboxEntry,\n\t\t\"@sinclair/typebox/compile\": typeboxCompileEntry,\n\t\t\"@sinclair/typebox/value\": typeboxValueEntry,\n\t};\n\n\treturn _aliases;\n}\n\ntype HandlerFn = (...args: unknown[]) => Promise<unknown>;\n\n/**\n * Create a runtime with throwing stubs for action methods.\n * Runner.bindCore() replaces these with real implementations.\n */\nexport function createExtensionRuntime(): ExtensionRuntime {\n\tconst notInitialized = () => {\n\t\tthrow new Error(\"Extension runtime not initialized. Action methods cannot be called during extension loading.\");\n\t};\n\tconst state: { staleMessage?: string } = {};\n\tconst assertActive = () => {\n\t\tif (state.staleMessage) {\n\t\t\tthrow new Error(state.staleMessage);\n\t\t}\n\t};\n\n\tconst runtime: ExtensionRuntime = {\n\t\tsendMessage: notInitialized,\n\t\tsendUserMessage: notInitialized,\n\t\tappendEntry: notInitialized,\n\t\tsetSessionName: notInitialized,\n\t\tgetSessionName: notInitialized,\n\t\tsetLabel: notInitialized,\n\t\tgetActiveTools: notInitialized,\n\t\tgetAllTools: notInitialized,\n\t\tsetActiveTools: notInitialized,\n\t\t// registerTool() is valid during extension load; refresh is only needed post-bind.\n\t\trefreshTools: () => {},\n\t\tgetCommands: notInitialized,\n\t\tsetModel: () => Promise.reject(new Error(\"Extension runtime not initialized\")),\n\t\tgetThinkingLevel: notInitialized,\n\t\tsetThinkingLevel: notInitialized,\n\t\t// Optional; replaced by bindCore when the session provides a handler.\n\t\tcallMcpTool: undefined,\n\t\tflagValues: new Map(),\n\t\tpendingProviderRegistrations: [],\n\t\tassertActive,\n\t\tinvalidate: (message) => {\n\t\t\tstate.staleMessage ??=\n\t\t\t\tmessage ??\n\t\t\t\t\"This extension ctx is stale after session replacement or reload. Do not use a captured extension API or command ctx after ctx.newSession(), ctx.fork(), ctx.switchSession(), or ctx.reload(). For newSession, fork, and switchSession, move post-replacement work into withSession and use the ctx passed to withSession. For reload, do not use the old ctx after await ctx.reload().\";\n\t\t},\n\t\t// Pre-bind: queue registrations so bindCore() can flush them once the\n\t\t// model registry is available. bindCore() replaces both with direct calls.\n\t\tregisterProvider: (name, config, extensionPath = \"<unknown>\") => {\n\t\t\truntime.pendingProviderRegistrations.push({ name, config, extensionPath });\n\t\t},\n\t\tunregisterProvider: (name) => {\n\t\t\truntime.pendingProviderRegistrations = runtime.pendingProviderRegistrations.filter((r) => r.name !== name);\n\t\t},\n\t};\n\n\treturn runtime;\n}\n\n/**\n * Create the ExtensionAPI for an extension.\n * Registration methods write to the extension object.\n * Action methods delegate to the shared runtime.\n */\nfunction createExtensionAPI(\n\textension: Extension,\n\truntime: ExtensionRuntime,\n\tcwd: string,\n\teventBus: EventBus,\n): ExtensionAPI {\n\tconst api = {\n\t\t// Registration methods - write to extension\n\t\ton(event: string, handler: HandlerFn): void {\n\t\t\truntime.assertActive();\n\t\t\tconst list = extension.handlers.get(event) ?? [];\n\t\t\tlist.push(handler);\n\t\t\textension.handlers.set(event, list);\n\t\t},\n\n\t\tregisterTool(tool: ToolDefinition): void {\n\t\t\truntime.assertActive();\n\t\t\textension.tools.set(tool.name, {\n\t\t\t\tdefinition: tool,\n\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t});\n\t\t\truntime.refreshTools();\n\t\t},\n\n\t\tregisterCommand(name: string, options: Omit<RegisteredCommand, \"name\" | \"sourceInfo\">): void {\n\t\t\truntime.assertActive();\n\t\t\textension.commands.set(name, {\n\t\t\t\tname,\n\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t\t...options,\n\t\t\t});\n\t\t},\n\n\t\tregisterShortcut(\n\t\t\tshortcut: KeyId,\n\t\t\toptions: {\n\t\t\t\tdescription?: string;\n\t\t\t\thandler: (ctx: import(\"./types.ts\").ExtensionContext) => Promise<void> | void;\n\t\t\t},\n\t\t): void {\n\t\t\truntime.assertActive();\n\t\t\textension.shortcuts.set(shortcut, { shortcut, extensionPath: extension.path, ...options });\n\t\t},\n\n\t\tregisterFlag(\n\t\t\tname: string,\n\t\t\toptions: { description?: string; type: \"boolean\" | \"string\"; default?: boolean | string },\n\t\t): void {\n\t\t\truntime.assertActive();\n\t\t\textension.flags.set(name, { name, extensionPath: extension.path, ...options });\n\t\t\tif (options.default !== undefined && !runtime.flagValues.has(name)) {\n\t\t\t\truntime.flagValues.set(name, options.default);\n\t\t\t}\n\t\t},\n\n\t\tregisterMessageRenderer<T>(customType: string, renderer: MessageRenderer<T>): void {\n\t\t\truntime.assertActive();\n\t\t\textension.messageRenderers.set(customType, renderer as MessageRenderer);\n\t\t},\n\n\t\t// Flag access - checks extension registered it, reads from runtime\n\t\tgetFlag(name: string): boolean | string | undefined {\n\t\t\truntime.assertActive();\n\t\t\tif (!extension.flags.has(name)) return undefined;\n\t\t\treturn runtime.flagValues.get(name);\n\t\t},\n\n\t\t// Action methods - delegate to shared runtime\n\t\tsendMessage(message, options): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.sendMessage(message, options);\n\t\t},\n\n\t\tsendUserMessage(content, options): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.sendUserMessage(content, options);\n\t\t},\n\n\t\tappendEntry(customType: string, data?: unknown): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.appendEntry(customType, data);\n\t\t},\n\n\t\tsetSessionName(name: string): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.setSessionName(name);\n\t\t},\n\n\t\tgetSessionName(): string | undefined {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getSessionName();\n\t\t},\n\n\t\tsetLabel(entryId: string, label: string | undefined): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.setLabel(entryId, label);\n\t\t},\n\n\t\texec(command: string, args: string[], options?: ExecOptions) {\n\t\t\truntime.assertActive();\n\t\t\treturn execCommand(command, args, options?.cwd ?? cwd, options);\n\t\t},\n\n\t\t// Always expose the method so load-time factories can capture it (typeof === \"function\").\n\t\t// The bound handler is resolved at call time after bindCore; until then callers get a clear error.\n\t\tasync callMcpTool(server: string, name: string, args: Record<string, unknown>): Promise<unknown> {\n\t\t\truntime.assertActive();\n\t\t\tconst handler = runtime.callMcpTool;\n\t\t\tif (typeof handler !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Extension callMcpTool is not bound. The session must provide a callMcpTool handler via bindCore.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn handler(server, name, args);\n\t\t},\n\n\t\tgetActiveTools(): string[] {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getActiveTools();\n\t\t},\n\n\t\tgetAllTools() {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getAllTools();\n\t\t},\n\n\t\tsetActiveTools(toolNames: string[]): void {\n\t\t\truntime.assertActive();\n\t\t\truntime.setActiveTools(toolNames);\n\t\t},\n\n\t\tgetCommands() {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getCommands();\n\t\t},\n\n\t\tsetModel(model) {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.setModel(model);\n\t\t},\n\n\t\tgetThinkingLevel() {\n\t\t\truntime.assertActive();\n\t\t\treturn runtime.getThinkingLevel();\n\t\t},\n\n\t\tsetThinkingLevel(level) {\n\t\t\truntime.assertActive();\n\t\t\truntime.setThinkingLevel(level);\n\t\t},\n\n\t\tregisterProvider(name: string, config: ProviderConfig) {\n\t\t\truntime.assertActive();\n\t\t\truntime.registerProvider(name, config, extension.path);\n\t\t},\n\n\t\tunregisterProvider(name: string) {\n\t\t\truntime.assertActive();\n\t\t\truntime.unregisterProvider(name, extension.path);\n\t\t},\n\n\t\t// Track extension event subscriptions so they can be\n\t\t// unsubscribed on reload instead of stacking duplicate listeners\n\t\t// on the shared event bus.\n\t\tevents: {\n\t\t\temit: (channel, data) => {\n\t\t\t\teventBus.emit(channel, data);\n\t\t\t},\n\t\t\ton: (channel, handler) => {\n\t\t\t\tconst unsubscribe = eventBus.on(channel, handler);\n\t\t\t\textension.eventBusSubscriptions?.push(unsubscribe);\n\t\t\t\treturn unsubscribe;\n\t\t\t},\n\t\t},\n\t} as ExtensionAPI;\n\n\treturn api;\n}\n\nasync function loadExtensionModule(extensionPath: string) {\n\tconst jiti = createJiti(import.meta.url, {\n\t\tmoduleCache: false,\n\t\t// In Bun binary: use virtualModules for bundled packages (no filesystem resolution)\n\t\t// Also disable tryNative so jiti handles ALL imports (not just the entry point)\n\t\t// In Node.js/dev: use aliases to resolve to node_modules paths\n\t\t...(isBunBinary ? { virtualModules: VIRTUAL_MODULES, tryNative: false } : { alias: getAliases() }),\n\t});\n\n\tconst module = await jiti.import(extensionPath, { default: true });\n\tconst factory = module as ExtensionFactory;\n\treturn typeof factory !== \"function\" ? undefined : factory;\n}\n\n/**\n * Create an Extension object with empty collections.\n */\nfunction createExtension(extensionPath: string, resolvedPath: string): Extension {\n\tconst source =\n\t\textensionPath.startsWith(\"<\") && extensionPath.endsWith(\">\")\n\t\t\t? extensionPath.slice(1, -1).split(\":\")[0] || \"temporary\"\n\t\t\t: \"local\";\n\tconst baseDir = extensionPath.startsWith(\"<\") ? undefined : path.dirname(resolvedPath);\n\n\treturn {\n\t\tpath: extensionPath,\n\t\tresolvedPath,\n\t\tsourceInfo: createSyntheticSourceInfo(extensionPath, { source, baseDir }),\n\t\thandlers: new Map(),\n\t\ttools: new Map(),\n\t\tmessageRenderers: new Map(),\n\t\tcommands: new Map(),\n\t\tflags: new Map(),\n\t\tshortcuts: new Map(),\n\t\teventBusSubscriptions: [],\n\t};\n}\n\nasync function loadExtension(\n\textensionPath: string,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n): Promise<{ extension: Extension | null; error: string | null }> {\n\tconst resolvedPath = resolvePath(extensionPath, cwd, { normalizeUnicodeSpaces: true });\n\n\ttry {\n\t\tconst factory = await loadExtensionModule(resolvedPath);\n\t\tif (!factory) {\n\t\t\treturn { extension: null, error: `Extension does not export a valid factory function: ${extensionPath}` };\n\t\t}\n\n\t\tconst extension = createExtension(extensionPath, resolvedPath);\n\t\tconst api = createExtensionAPI(extension, runtime, cwd, eventBus);\n\t\tawait factory(api);\n\n\t\treturn { extension, error: null };\n\t} catch (err) {\n\t\tconst message = err instanceof Error ? err.message : String(err);\n\t\treturn { extension: null, error: `Failed to load extension: ${message}` };\n\t}\n}\n\n/**\n * Create an Extension from an inline factory function.\n */\nexport async function loadExtensionFromFactory(\n\tfactory: ExtensionFactory,\n\tcwd: string,\n\teventBus: EventBus,\n\truntime: ExtensionRuntime,\n\textensionPath = \"<inline>\",\n): Promise<Extension> {\n\tconst extension = createExtension(extensionPath, extensionPath);\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst api = createExtensionAPI(extension, runtime, resolvedCwd, eventBus);\n\tawait factory(api);\n\treturn extension;\n}\n\n/**\n * Load extensions from paths.\n */\nexport async function loadExtensions(paths: string[], cwd: string, eventBus?: EventBus): Promise<LoadExtensionsResult> {\n\tconst extensions: Extension[] = [];\n\tconst errors: Array<{ path: string; error: string }> = [];\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedEventBus = eventBus ?? createEventBus();\n\tconst runtime = createExtensionRuntime();\n\n\tfor (const extPath of paths) {\n\t\tconst { extension, error } = await loadExtension(extPath, resolvedCwd, resolvedEventBus, runtime);\n\n\t\tif (error) {\n\t\t\terrors.push({ path: extPath, error });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (extension) {\n\t\t\textensions.push(extension);\n\t\t}\n\t}\n\n\treturn {\n\t\textensions,\n\t\terrors,\n\t\truntime,\n\t};\n}\n\ninterface OmkManifest {\n\textensions?: string[];\n\tthemes?: string[];\n\tskills?: string[];\n\tprompts?: string[];\n}\n\nfunction readOmkManifest(packageJsonPath: string): OmkManifest | null {\n\ttry {\n\t\tconst content = fs.readFileSync(packageJsonPath, \"utf-8\");\n\t\tconst pkg = JSON.parse(content) as { omk?: unknown };\n\t\tconst manifest = pkg.omk;\n\t\treturn manifest && typeof manifest === \"object\" ? (manifest as OmkManifest) : null;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction isExtensionFile(name: string): boolean {\n\treturn name.endsWith(\".ts\") || name.endsWith(\".js\");\n}\n\n/**\n * Resolve extension entry points from a directory.\n *\n * Checks for:\n * 1. package.json with \"omk.extensions\" field -> returns declared paths\n * 2. index.ts or index.js -> returns the index file\n *\n * Returns resolved paths or null if no entry points found.\n */\nfunction resolveExtensionEntries(dir: string): string[] | null {\n\t// Check for package.json with \"omk\" field first\n\tconst packageJsonPath = path.join(dir, \"package.json\");\n\tif (fs.existsSync(packageJsonPath)) {\n\t\tconst manifest = readOmkManifest(packageJsonPath);\n\t\tif (manifest?.extensions?.length) {\n\t\t\tconst entries: string[] = [];\n\t\t\tfor (const extPath of manifest.extensions) {\n\t\t\t\tconst resolvedExtPath = path.resolve(dir, extPath);\n\t\t\t\tif (fs.existsSync(resolvedExtPath)) {\n\t\t\t\t\tentries.push(resolvedExtPath);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (entries.length > 0) {\n\t\t\t\treturn entries;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check for index.ts or index.js\n\tconst indexTs = path.join(dir, \"index.ts\");\n\tconst indexJs = path.join(dir, \"index.js\");\n\tif (fs.existsSync(indexTs)) {\n\t\treturn [indexTs];\n\t}\n\tif (fs.existsSync(indexJs)) {\n\t\treturn [indexJs];\n\t}\n\n\treturn null;\n}\n\n/**\n * Discover extensions in a directory.\n *\n * Discovery rules:\n * 1. Direct files: `extensions/*.ts` or `*.js` → load\n * 2. Subdirectory with index: `extensions/* /index.ts` or `index.js` → load\n * 3. Subdirectory with package.json: `extensions/* /package.json` with OMK manifest → load what it declares\n *\n * No recursion beyond one level. Complex packages must use package.json manifest.\n */\nfunction discoverExtensionsInDir(dir: string): string[] {\n\tif (!fs.existsSync(dir)) {\n\t\treturn [];\n\t}\n\n\tconst discovered: string[] = [];\n\n\ttry {\n\t\tconst entries = fs.readdirSync(dir, { withFileTypes: true });\n\n\t\tfor (const entry of entries) {\n\t\t\tconst entryPath = path.join(dir, entry.name);\n\n\t\t\t// 1. Direct files: *.ts or *.js\n\t\t\tif ((entry.isFile() || entry.isSymbolicLink()) && isExtensionFile(entry.name)) {\n\t\t\t\tdiscovered.push(entryPath);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// 2 & 3. Subdirectories\n\t\t\tif (entry.isDirectory() || entry.isSymbolicLink()) {\n\t\t\t\tconst entries = resolveExtensionEntries(entryPath);\n\t\t\t\tif (entries) {\n\t\t\t\t\tdiscovered.push(...entries);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch {\n\t\treturn [];\n\t}\n\n\treturn discovered;\n}\n\n/**\n * Discover and load extensions from standard locations.\n */\nexport async function discoverAndLoadExtensions(\n\tconfiguredPaths: string[],\n\tcwd: string,\n\tagentDir: string = getAgentDir(),\n\teventBus?: EventBus,\n): Promise<LoadExtensionsResult> {\n\tconst resolvedCwd = resolvePath(cwd);\n\tconst resolvedAgentDir = resolvePath(agentDir);\n\tconst allPaths: string[] = [];\n\tconst seen = new Set<string>();\n\n\tconst addPaths = (paths: string[]) => {\n\t\tfor (const p of paths) {\n\t\t\tconst resolved = path.resolve(p);\n\t\t\tif (!seen.has(resolved)) {\n\t\t\t\tseen.add(resolved);\n\t\t\t\tallPaths.push(p);\n\t\t\t}\n\t\t}\n\t};\n\n\t// 1. Project-local extensions: cwd/${CONFIG_DIR_NAME}/extensions/\n\tconst localExtDir = path.join(resolvedCwd, CONFIG_DIR_NAME, \"extensions\");\n\taddPaths(discoverExtensionsInDir(localExtDir));\n\n\t// 2. Global extensions: agentDir/extensions/\n\tconst globalExtDir = path.join(resolvedAgentDir, \"extensions\");\n\taddPaths(discoverExtensionsInDir(globalExtDir));\n\n\t// 3. Explicitly configured paths\n\tfor (const p of configuredPaths) {\n\t\tconst resolved = resolvePath(p, resolvedCwd, { normalizeUnicodeSpaces: true });\n\t\tif (fs.existsSync(resolved) && fs.statSync(resolved).isDirectory()) {\n\t\t\t// Check for package.json with omk manifest or index.ts\n\t\t\tconst entries = resolveExtensionEntries(resolved);\n\t\t\tif (entries) {\n\t\t\t\taddPaths(entries);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// No explicit entries - discover individual files in directory\n\t\t\taddPaths(discoverExtensionsInDir(resolved));\n\t\t\tcontinue;\n\t\t}\n\n\t\taddPaths([resolved]);\n\t}\n\n\treturn loadExtensions(allPaths, resolvedCwd, eventBus);\n}\n"]}
|