opencode-matrixx 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/README.md +97 -25
  2. package/dist/agents/bdd-contract.d.ts +7 -0
  3. package/dist/agents/builtin-agents/architect-agent.d.ts +1 -0
  4. package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
  5. package/dist/agents/builtin-agents/{hephaestus-agent.d.ts → keymaker-agent.d.ts} +2 -0
  6. package/dist/agents/builtin-agents/model-resolution.d.ts +1 -0
  7. package/dist/agents/builtin-agents/morpheus-agent.d.ts +2 -0
  8. package/dist/agents/builtin-agents.d.ts +1 -1
  9. package/dist/agents/dynamic-agent-prompt-builder.d.ts +2 -1
  10. package/dist/agents/env-context.d.ts +1 -1
  11. package/dist/agents/mouse/agent.d.ts +5 -2
  12. package/dist/agents/mouse/deepseek.d.ts +16 -0
  13. package/dist/agents/mouse/index.d.ts +3 -0
  14. package/dist/agents/mouse/mimo.d.ts +15 -0
  15. package/dist/agents/mouse/qwen.d.ts +16 -0
  16. package/dist/agents/mouse/shared.d.ts +7 -0
  17. package/dist/agents/types.d.ts +4 -1
  18. package/dist/config/index.d.ts +1 -2
  19. package/dist/config/presets.d.ts +4 -0
  20. package/dist/config/resolve-tiers.d.ts +32 -0
  21. package/dist/config/schema/agent-names.d.ts +6 -0
  22. package/dist/config/schema/agent-overrides.d.ts +133 -0
  23. package/dist/config/schema/categories.d.ts +16 -0
  24. package/dist/config/schema/commands.d.ts +6 -0
  25. package/dist/config/schema/dcp.d.ts +16 -0
  26. package/dist/config/schema/hooks.d.ts +3 -0
  27. package/dist/config/schema/matrixx-config.d.ts +159 -18
  28. package/dist/config/schema/rtk.d.ts +7 -0
  29. package/dist/config/schema.d.ts +4 -1
  30. package/dist/create-hooks.d.ts +3 -0
  31. package/dist/features/bdd/schema.d.ts +434 -0
  32. package/dist/features/bdd/types.d.ts +2 -0
  33. package/dist/features/builtin-commands/templates/bdd-backend.d.ts +1 -0
  34. package/dist/features/builtin-commands/templates/bdd-contract.d.ts +1 -0
  35. package/dist/features/builtin-commands/templates/bdd-frontend.d.ts +1 -0
  36. package/dist/features/builtin-commands/templates/bdd-pipeline.d.ts +1 -0
  37. package/dist/features/builtin-commands/templates/bdd-tests.d.ts +1 -0
  38. package/dist/features/builtin-commands/templates/dcp-profile.d.ts +1 -0
  39. package/dist/features/builtin-commands/types.d.ts +2 -2
  40. package/dist/features/builtin-skills/lazy-skill-helper.d.ts +17 -0
  41. package/dist/features/builtin-skills/skills/bdd-backend.d.ts +3 -0
  42. package/dist/features/builtin-skills/skills/bdd-contract.d.ts +3 -0
  43. package/dist/features/builtin-skills/skills/bdd-frontend.d.ts +3 -0
  44. package/dist/features/builtin-skills/skills/bdd-tests.d.ts +3 -0
  45. package/dist/features/builtin-skills/skills/docker-master.d.ts +2 -0
  46. package/dist/features/builtin-skills/skills/index.d.ts +5 -0
  47. package/dist/features/{claude-code-command-loader → command-loader}/loader.d.ts +0 -2
  48. package/dist/features/mission-state/constants.d.ts +10 -0
  49. package/dist/features/mission-state/index.d.ts +2 -0
  50. package/dist/features/mission-state/plan-storage.d.ts +48 -0
  51. package/dist/features/mission-state/rehydrate.d.ts +21 -0
  52. package/dist/features/mission-state/types.d.ts +46 -0
  53. package/dist/features/opencode-skill-loader/loader.d.ts +1 -3
  54. package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +1 -1
  55. package/dist/features/opencode-skill-loader/types.d.ts +1 -1
  56. package/dist/features/skill-mcp-manager/connection-type.d.ts +2 -3
  57. package/dist/features/skill-mcp-manager/connection.d.ts +3 -4
  58. package/dist/features/skill-mcp-manager/manager.d.ts +2 -3
  59. package/dist/features/skill-mcp-manager/oauth-handler.d.ts +3 -3
  60. package/dist/features/skill-mcp-manager/types.d.ts +16 -4
  61. package/dist/hooks/env-context-injector/index.d.ts +23 -0
  62. package/dist/hooks/index.d.ts +3 -0
  63. package/dist/hooks/plan-persister/hook.d.ts +20 -0
  64. package/dist/hooks/plan-persister/index.d.ts +2 -0
  65. package/dist/hooks/rtk-bash-rewriter/constants.d.ts +3 -0
  66. package/dist/hooks/rtk-bash-rewriter/hook.d.ts +12 -0
  67. package/dist/hooks/rtk-bash-rewriter/hook.test.d.ts +1 -0
  68. package/dist/hooks/rtk-bash-rewriter/index.d.ts +1 -0
  69. package/dist/hooks/rtk-bash-rewriter/types.d.ts +11 -0
  70. package/dist/index.js +44995 -28387
  71. package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -1
  72. package/dist/plugin/hooks/create-core-hooks.d.ts +2 -0
  73. package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
  74. package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -1
  75. package/dist/plugin-config.d.ts +1 -1
  76. package/dist/plugin-handlers/agent-config-handler.d.ts +2 -0
  77. package/dist/plugin-handlers/plugin-components-loader.d.ts +1 -1
  78. package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -0
  79. package/dist/shared/index.d.ts +1 -1
  80. package/dist/shared/merge-categories.d.ts +4 -0
  81. package/dist/shared/model-resolution-types.d.ts +3 -0
  82. package/dist/shared/model-tiers.d.ts +31 -0
  83. package/dist/shared/tier-resolver.d.ts +26 -0
  84. package/dist/tools/bdd-create-contract/constants.d.ts +1 -0
  85. package/dist/tools/bdd-create-contract/index.d.ts +3 -0
  86. package/dist/tools/bdd-create-contract/tools.d.ts +3 -0
  87. package/dist/tools/bdd-create-contract/types.d.ts +12 -0
  88. package/dist/tools/bdd-parse-gherkin/constants.d.ts +1 -0
  89. package/dist/tools/bdd-parse-gherkin/index.d.ts +3 -0
  90. package/dist/tools/bdd-parse-gherkin/tools.d.ts +5 -0
  91. package/dist/tools/bdd-parse-gherkin/types.d.ts +9 -0
  92. package/dist/tools/bdd-pipeline/analysis-report-sections.d.ts +10 -0
  93. package/dist/tools/bdd-pipeline/analysis-report.d.ts +9 -0
  94. package/dist/tools/bdd-pipeline/constants.d.ts +4 -0
  95. package/dist/tools/bdd-pipeline/feature-resolver.d.ts +5 -0
  96. package/dist/tools/bdd-pipeline/index.d.ts +3 -0
  97. package/dist/tools/bdd-pipeline/pipeline-runner.d.ts +6 -0
  98. package/dist/tools/bdd-pipeline/subagent-runner.d.ts +14 -0
  99. package/dist/tools/bdd-pipeline/tools.d.ts +5 -0
  100. package/dist/tools/bdd-pipeline/types.d.ts +74 -0
  101. package/dist/tools/bdd-validate-contract/index.d.ts +1 -0
  102. package/dist/tools/bdd-validate-contract/tools.d.ts +21 -0
  103. package/dist/tools/delegate-task/categories.d.ts +7 -0
  104. package/dist/tools/delegate-task/category-resolver.d.ts +6 -0
  105. package/dist/tools/delegate-task/complexity-constants.d.ts +24 -0
  106. package/dist/tools/delegate-task/complexity-scorer.d.ts +31 -0
  107. package/dist/tools/delegate-task/complexity-types.d.ts +10 -0
  108. package/dist/tools/delegate-task/executor-types.d.ts +1 -0
  109. package/dist/tools/delegate-task/index.d.ts +3 -0
  110. package/dist/tools/delegate-task/types.d.ts +8 -0
  111. package/dist/tools/index.d.ts +4 -0
  112. package/dist/tools/task/todo-sync.d.ts +1 -1
  113. package/package.json +19 -4
  114. package/dist/agents/builtin-agents/environment-context.d.ts +0 -2
  115. package/dist/config/profiles.d.ts +0 -4
  116. package/dist/config/schema/claude-code.d.ts +0 -10
  117. package/dist/features/claude-code-mcp-loader/index.d.ts +0 -10
  118. package/dist/features/claude-code-mcp-loader/loader.d.ts +0 -3
  119. package/dist/features/claude-code-mcp-loader/transformer.d.ts +0 -2
  120. package/dist/features/claude-code-mcp-loader/types.d.ts +0 -39
  121. package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +0 -3
  122. package/dist/features/claude-code-plugin-loader/command-loader.d.ts +0 -3
  123. package/dist/features/claude-code-plugin-loader/discovery.d.ts +0 -2
  124. package/dist/features/claude-code-plugin-loader/hook-loader.d.ts +0 -2
  125. package/dist/features/claude-code-plugin-loader/index.d.ts +0 -10
  126. package/dist/features/claude-code-plugin-loader/loader.d.ts +0 -20
  127. package/dist/features/claude-code-plugin-loader/mcp-server-loader.d.ts +0 -3
  128. package/dist/features/claude-code-plugin-loader/plugin-path-resolver.d.ts +0 -1
  129. package/dist/features/claude-code-plugin-loader/skill-loader.d.ts +0 -3
  130. package/dist/features/claude-code-plugin-loader/types.d.ts +0 -187
  131. package/dist/shared/claude-config-dir.d.ts +0 -1
  132. /package/dist/features/{claude-code-agent-loader → agent-loader}/index.d.ts +0 -0
  133. /package/dist/features/{claude-code-agent-loader → agent-loader}/loader.d.ts +0 -0
  134. /package/dist/features/{claude-code-agent-loader → agent-loader}/types.d.ts +0 -0
  135. /package/dist/features/{claude-code-command-loader → command-loader}/index.d.ts +0 -0
  136. /package/dist/features/{claude-code-command-loader → command-loader}/types.d.ts +0 -0
  137. /package/dist/features/{claude-code-session-state → session-state}/index.d.ts +0 -0
  138. /package/dist/features/{claude-code-session-state → session-state}/state.d.ts +0 -0
  139. /package/dist/features/{claude-code-mcp-loader → skill-mcp-manager}/env-expander.d.ts +0 -0
  140. /package/dist/features/{claude-tasks → task-storage}/storage.d.ts +0 -0
  141. /package/dist/features/{claude-tasks → task-storage}/types.d.ts +0 -0
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  >
2
- > [![Matrixx](./.github/assets/orchestrator-architect.png?v=3)](https://github.com/klpanagi/matrixx)
2
+ > [![Matrixx](./.github/assets/orchestrator-architect.png?v=3)](https://github.com/klpanagi/opencode-matrixx)
3
3
  >
4
4
  > Matrixx is **highly inspired by** [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) — the project that pioneered the "oh-my-zsh for OpenCode" concept.
5
5
  > Full credit to [code-yeongyu](https://github.com/code-yeongyu) for the original vision.
@@ -10,7 +10,7 @@
10
10
  <h1>Matrixx</h1>
11
11
 
12
12
  [![npm](https://img.shields.io/npm/v/opencode-matrixx.svg)](https://www.npmjs.com/package/opencode-matrixx)
13
- [![License: SUL-1.0](https://img.shields.io/badge/license-SUL--1.0-blue.svg)](https://github.com/klpanagi/matrixx/blob/master/LICENSE)
13
+ [![License: SUL-1.0](https://img.shields.io/badge/license-SUL--1.0-blue.svg)](https://github.com/klpanagi/opencode-matrixx/blob/master/LICENSE)
14
14
 
15
15
  **Multi-model agent orchestration for [OpenCode](https://github.com/sst/opencode).**<br/>
16
16
  **14 specialized agents. ~52 lifecycle hooks. 28 tools. One plugin.**
@@ -73,8 +73,8 @@ Create `matrixx.jsonc` in your project root:
73
73
 
74
74
  ```jsonc
75
75
  {
76
- "$schema": "https://raw.githubusercontent.com/klpanagi/matrixx/refs/heads/dev/dist/matrixx.schema.json",
77
- "profile": "balanced"
76
+ "$schema": "https://raw.githubusercontent.com/klpanagi/opencode-matrixx/refs/heads/dev/dist/matrixx.schema.json",
77
+ "agents": {}
78
78
  }
79
79
  ```
80
80
 
@@ -86,32 +86,13 @@ Open OpenCode and start coding. Matrixx activates automatically.
86
86
 
87
87
  ```
88
88
  Install and configure matrixx by following the instructions here:
89
- https://raw.githubusercontent.com/klpanagi/matrixx/refs/heads/dev/docs/guide/installation.md
89
+ https://raw.githubusercontent.com/klpanagi/opencode-matrixx/refs/heads/dev/docs/guide/installation.md
90
90
  ```
91
91
 
92
92
  [Manual installation guide →](docs/guide/installation.md) · [Uninstall →](docs/guide/uninstallation.md)
93
93
 
94
94
  ---
95
95
 
96
- ## Profiles
97
-
98
- Profiles assign models to every agent — one setting, full model lineup.
99
-
100
- | Profile | Best For | Daily Cost |
101
- |---------|----------|------------|
102
- | **free** | Experimentation, prototyping | $0 |
103
- | **budget** | Personal projects, light use | ~$1–3 |
104
- | **economy** | Active development with cost control | ~$3–8 |
105
- | **balanced** | Professional development | ~$8–20 |
106
- | **performance** | Maximum capability | ~$20–50 |
107
- | **go** | OpenCode Go subscription | Go quota |
108
- | **go-duo** | Duo subscription, two users | Go Duo quota |
109
- | **go-trio** | Trio subscription, three users | Go Trio quota |
110
- | **go-ultimate** | Unlimited Go access | Go Ultimate quota |
111
- | **xiaomi-ultimate** | Xiaomi-optimized ultimate | Xiaomi quota |
112
-
113
- Profile defaults merge first; any `agents` or `categories` override takes precedence.
114
-
115
96
  ---
116
97
 
117
98
  ## The Agent Team
@@ -298,6 +279,21 @@ Analyzes media files that require interpretation beyond raw text. Extracts speci
298
279
 
299
280
  ---
300
281
 
282
+ ### 14. Mouse — *The Task Executor*
283
+
284
+ *Small, fast, and disposable — the hands that do the work.*
285
+
286
+ **Role:** Category-spawned delegated executor
287
+
288
+ **Model:** Claude Sonnet 4.6 · `temperature: 0.1`
289
+
290
+ Mouse is the worker layer in Matrixx's 3-tier architecture. Spawned automatically when you
291
+ use `task(category="...")`, Mouse executes the task directly without delegating further.
292
+ It cannot spawn sub-agents (`task` tool blocked) — implementation is always done in-house.
293
+ Model-specific prompt variants optimize behavior for Claude, GPT, DeepSeek, Mimo, and Qwen.
294
+
295
+ ---
296
+
301
297
  Every agent, model, temperature, and permission is fully customizable. [**Meet the full team →**](docs/agents.md)
302
298
 
303
299
  ---
@@ -306,7 +302,7 @@ Every agent, model, temperature, and permission is fully customizable. [**Meet t
306
302
 
307
303
  | | |
308
304
  |---|---|
309
- | **Agent Orchestration** | 14 agents (incl. **Sati** frontend specialist, **Sentinel** security auditor, **Cipher** DSL expert), parallel background execution, category-based routing, session continuity |
305
+ || **Agent Orchestration** | 15 agents (incl. **Mouse** dedicated executor, **Sati** frontend specialist, **Sentinel** security auditor, **Cipher** DSL expert), parallel background execution, category-based routing, session continuity |
310
306
  | **Developer Tools** | LSP (goto def, rename, diagnostics), AST-Grep (search & replace), Tmux terminal |
311
307
  | **~52 Lifecycle Hooks** | Context injection, think mode, comment checking, todo enforcement, error recovery, quality gate |
312
308
  || **33 Built-in Skills** | DSL engineering (11), security (9), browser, git, frontend (7 via **Sati**), saturation research, AI slop detection, software dev pipeline |
@@ -405,6 +401,82 @@ Sentinel never modifies code — it reports findings with CWE IDs, exact locatio
405
401
 
406
402
  ---
407
403
 
404
+ ## RTK Integration — Token Compression
405
+
406
+ Matrixx integrates [RTK](https://github.com/rtk-ai/rtk) for automatic bash command compression, reducing LLM token consumption by **60-90%** on tool outputs.
407
+
408
+ ### What is RTK?
409
+
410
+ RTK is a Rust CLI binary that intelligently rewrites bash commands to compress their output before it reaches the LLM. It recognizes 70+ command patterns (git, npm, cargo, test runners, linters, build tools) and applies smart filtering, grouping, and deduplication strategies.
411
+
412
+ ```
413
+ # Without RTK: 2000 tokens
414
+ $ git status
415
+ On branch main
416
+ Changes not staged for commit:
417
+ modified: src/config.ts
418
+ modified: src/hooks/index.ts
419
+ ... (50 more lines)
420
+
421
+ # With RTK: 200 tokens
422
+ $ rtk git status
423
+ 2 files changed: src/config.ts, src/hooks/index.ts
424
+ ```
425
+
426
+ ### How It Works
427
+
428
+ The RTK hook intercepts bash commands **before execution** and rewrites them to use RTK's compression:
429
+
430
+ 1. LLM requests: `git status`
431
+ 2. RTK hook rewrites to: `rtk git status`
432
+ 3. RTK binary executes and compresses output
433
+ 4. Compressed output (60-90% smaller) reaches the LLM
434
+
435
+ The hook runs **silently** — no configuration needed beyond enabling it. RTK's pattern matching handles the rest.
436
+
437
+ ### Configuration
438
+
439
+ RTK is **disabled by default** (opt-in). Enable it in `matrixx.jsonc`:
440
+
441
+ ```jsonc
442
+ {
443
+ "rtk": {
444
+ "enabled": true,
445
+ "binary_path": "/usr/local/bin/rtk", // optional — defaults to "rtk" in PATH
446
+ "timeout_ms": 5000 // optional — subprocess timeout
447
+ }
448
+ }
449
+ ```
450
+
451
+ ### Installation
452
+
453
+ Install RTK from [rtk-ai/rtk](https://github.com/rtk-ai/rtk):
454
+
455
+ ```bash
456
+ # macOS
457
+ brew install rtk-ai/tap/rtk
458
+
459
+ # Linux (curl)
460
+ curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/main/install.sh | bash
461
+
462
+ # Verify installation
463
+ rtk --version
464
+ ```
465
+
466
+ ### Performance Impact
467
+
468
+ | Metric | Value |
469
+ |--------|-------|
470
+ | **Overhead** | ~10-20ms per bash command |
471
+ | **Token savings** | 60-90% reduction on compressed commands |
472
+ | **Net benefit** | Significant for projects with frequent bash commands |
473
+
474
+ The 10-20ms subprocess overhead is negligible compared to command execution time and LLM context savings.
475
+
476
+
477
+ ---
478
+
479
+
408
480
  ## Documentation
409
481
 
410
482
  | | |
@@ -0,0 +1,7 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ import type { AgentPromptMetadata } from "./types";
3
+ export declare const BDD_CONTRACT_PROMPT_METADATA: AgentPromptMetadata;
4
+ export declare function createBddContractAgent(model: string): AgentConfig;
5
+ export declare namespace createBddContractAgent {
6
+ var mode: "all";
7
+ }
@@ -5,6 +5,7 @@ import type { AgentOverrides } from "../types";
5
5
  export declare function maybeCreateArchitectConfig(input: {
6
6
  disabledAgents: string[];
7
7
  agentOverrides: AgentOverrides;
8
+ globalOverrideModel?: string;
8
9
  uiSelectedModel?: string;
9
10
  availableModels: Set<string>;
10
11
  systemDefaultModel?: string;
@@ -7,6 +7,7 @@ export declare function collectPendingBuiltinAgents(input: {
7
7
  agentMetadata: Partial<Record<BuiltinAgentName, AgentPromptMetadata>>;
8
8
  disabledAgents: string[];
9
9
  agentOverrides: AgentOverrides;
10
+ globalOverrideModel?: string;
10
11
  directory?: string;
11
12
  systemDefaultModel?: string;
12
13
  mergedCategories: Record<string, CategoryConfig>;
@@ -5,6 +5,7 @@ import type { AgentOverrides } from "../types";
5
5
  export declare function maybeCreateKeymakerConfig(input: {
6
6
  disabledAgents: string[];
7
7
  agentOverrides: AgentOverrides;
8
+ globalOverrideModel?: string;
8
9
  availableModels: Set<string>;
9
10
  systemDefaultModel?: string;
10
11
  isFirstRunNoCache: boolean;
@@ -14,4 +15,5 @@ export declare function maybeCreateKeymakerConfig(input: {
14
15
  mergedCategories: Record<string, CategoryConfig>;
15
16
  directory?: string;
16
17
  useTaskSystem: boolean;
18
+ availableToolNames: string[];
17
19
  }): AgentConfig | undefined;
@@ -1,4 +1,5 @@
1
1
  export declare function applyModelResolution(input: {
2
+ globalOverrideModel?: string;
2
3
  uiSelectedModel?: string;
3
4
  userModel?: string;
4
5
  requirement?: {
@@ -5,6 +5,7 @@ import type { AgentOverrides } from "../types";
5
5
  export declare function maybeCreateMorpheusConfig(input: {
6
6
  disabledAgents: string[];
7
7
  agentOverrides: AgentOverrides;
8
+ globalOverrideModel?: string;
8
9
  uiSelectedModel?: string;
9
10
  availableModels: Set<string>;
10
11
  systemDefaultModel?: string;
@@ -16,4 +17,5 @@ export declare function maybeCreateMorpheusConfig(input: {
16
17
  directory?: string;
17
18
  userCategories?: CategoriesConfig;
18
19
  useTaskSystem: boolean;
20
+ availableToolNames: string[];
19
21
  }): AgentConfig | undefined;
@@ -2,4 +2,4 @@ import type { AgentConfig } from "@opencode-ai/sdk";
2
2
  import type { BrowserAutomationProvider, CategoriesConfig } from "../config/schema";
3
3
  import type { LoadedSkill } from "../features/opencode-skill-loader/types";
4
4
  import type { AgentOverrides } from "./types";
5
- export declare function createBuiltinAgents(disabledAgents?: string[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string, categories?: CategoriesConfig, discoveredSkills?: LoadedSkill[], customAgentSummaries?: unknown, browserProvider?: BrowserAutomationProvider, uiSelectedModel?: string, disabledSkills?: Set<string>, useTaskSystem?: boolean): Promise<Record<string, AgentConfig>>;
5
+ export declare function createBuiltinAgents(disabledAgents?: string[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string, categories?: CategoriesConfig, discoveredSkills?: LoadedSkill[], customAgentSummaries?: unknown, browserProvider?: BrowserAutomationProvider, uiSelectedModel?: string, disabledSkills?: Set<string>, useTaskSystem?: boolean, globalModel?: string, availableToolNames?: string[]): Promise<Record<string, AgentConfig>>;
@@ -6,7 +6,7 @@ export interface AvailableAgent {
6
6
  }
7
7
  export interface AvailableTool {
8
8
  name: string;
9
- category: "lsp" | "ast" | "search" | "session" | "command" | "other";
9
+ category: "lsp" | "ast" | "search" | "session" | "command" | "sandbox" | "other";
10
10
  }
11
11
  export interface AvailableSkill {
12
12
  name: string;
@@ -33,4 +33,5 @@ export declare function buildCategorySkillsDelegationGuide(categories: Available
33
33
  export declare function buildOracleSection(agents: AvailableAgent[]): string;
34
34
  export declare function buildHardBlocksSection(): string;
35
35
  export declare function buildAntiPatternsSection(): string;
36
+ export declare function buildContextDisciplineSection(hasContextMode?: boolean): string;
36
37
  export declare function buildUltraworkSection(agents: AvailableAgent[], categories: AvailableCategory[], skills: AvailableSkill[]): string;
@@ -2,6 +2,6 @@
2
2
  * Creates Matrixx-specific environment context (time, timezone, locale).
3
3
  * Note: Working directory, platform, and date are already provided by OpenCode's system.ts,
4
4
  * so we only include fields that OpenCode doesn't provide to avoid duplication.
5
- * See: https://github.com/klpanagi/matrixx/issues/379
5
+ * See: https://github.com/klpanagi/opencode-matrixx/issues/379
6
6
  */
7
7
  export declare function createEnvContext(): string;
@@ -6,7 +6,10 @@
6
6
  *
7
7
  * Routing:
8
8
  * 1. GPT models (openai/*, github-copilot/gpt-*) -> gpt.ts (GPT-5.2 optimized)
9
- * 2. Default (Claude, etc.) -> default.ts (Claude-optimized)
9
+ * 2. DeepSeek models (opencode-go/deepseek-*) -> deepseek.ts (DeepSeek-optimized)
10
+ * 3. Mimo models (opencode-go/mimo-*) -> mimo.ts (Mimo-optimized)
11
+ * 4. Qwen models (opencode-go/qwen-*) -> qwen.ts (Qwen-optimized)
12
+ * 5. Default (Anthropic/Claude, etc.) -> default.ts (Claude-optimized)
10
13
  */
11
14
  import type { AgentConfig } from "@opencode-ai/sdk";
12
15
  import type { AgentOverrideConfig } from "../../config/schema";
@@ -14,7 +17,7 @@ export declare const MOUSE_DEFAULTS: {
14
17
  readonly model: "anthropic/claude-sonnet-4-6";
15
18
  readonly temperature: 0.1;
16
19
  };
17
- export type MousePromptSource = "default" | "gpt";
20
+ export type MousePromptSource = "default" | "gpt" | "deepseek" | "mimo" | "qwen";
18
21
  /**
19
22
  * Determines which Mouse prompt to use based on model.
20
23
  */
@@ -0,0 +1,16 @@
1
+ /**
2
+ * DeepSeek-Optimized Mouse System Prompt
3
+ *
4
+ * Optimized for DeepSeek model characteristics:
5
+ * - Strong instruction following — explicit constraints work well
6
+ * - Efficient at code generation — prefers clear, direct instructions
7
+ * - Not overly verbose by default — moderate verbosity controls suffice
8
+ * - Responds well to XML-style structure
9
+ *
10
+ * Key differences from default (Claude) prompt:
11
+ * - No "you're too helpful" framing (not needed for DeepSeek)
12
+ * - More structured, table-based sections (DeepSeek handles tables well)
13
+ * - Moderate verbosity guidance
14
+ * - Verification table for clarity
15
+ */
16
+ export declare function buildDeepSeekMousePrompt(useTaskSystem: boolean, promptAppend?: string): string;
@@ -1,4 +1,7 @@
1
1
  export type { MousePromptSource } from "./agent";
2
2
  export { buildMousePrompt, createMouseAgentWithOverrides, getMousePromptSource, MOUSE_DEFAULTS, } from "./agent";
3
+ export { buildDeepSeekMousePrompt } from "./deepseek";
3
4
  export { buildDefaultMousePrompt } from "./default";
4
5
  export { buildGptMousePrompt } from "./gpt";
6
+ export { buildMimoMousePrompt } from "./mimo";
7
+ export { buildQwenMousePrompt } from "./qwen";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Mimo-Optimized Mouse System Prompt
3
+ *
4
+ * Optimized for Mimo model characteristics:
5
+ * - Lightweight, cost-efficient model — concise prompts reduce token waste
6
+ * - Fast inference — direct instructions maximize throughput
7
+ * - Good at following explicit, compact instructions
8
+ *
9
+ * Key differences from other prompts:
10
+ * - Extra concise — minimal prose, maximum signal
11
+ * - No extended reasoning sections (Mimo does not deep-reason)
12
+ * - Strong emphasis on tool-first approach
13
+ * - Simple, direct structure
14
+ */
15
+ export declare function buildMimoMousePrompt(useTaskSystem: boolean, promptAppend?: string): string;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Qwen-Optimized Mouse System Prompt
3
+ *
4
+ * Optimized for Qwen model characteristics:
5
+ * - Strong reasoning capabilities — benefits from structured, detailed prompts
6
+ * - Good instruction following with explicit XML-style structure
7
+ * - Works well with specification tables and clear formatting
8
+ * - Benefits from explicit output formatting guidance
9
+ *
10
+ * Key differences from other prompts:
11
+ * - More structured specification sections (Qwen handles detailed specs well)
12
+ * - Explicit output format guidance
13
+ * - Reasoning-first approach: think → verify → act
14
+ * - Balanced verbosity controls
15
+ */
16
+ export declare function buildQwenMousePrompt(useTaskSystem: boolean, promptAppend?: string): string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shared utility functions for Mouse prompt variants.
3
+ * Extracted to avoid duplication across model-specific prompt files.
4
+ */
5
+ export declare function buildConstraintsSection(useTaskSystem: boolean): string;
6
+ export declare function buildTodoDisciplineSection(useTaskSystem: boolean): string;
7
+ export declare function buildVerificationTable(useTaskSystem: boolean): string;
@@ -58,7 +58,10 @@ export declare function isGptModel(model: string): boolean;
58
58
  * Matches: "anthropic/claude-*", "google-vertex-anthropic/claude-*", etc.
59
59
  */
60
60
  export declare function isAnthropicModel(model: string): boolean;
61
- export type BuiltinAgentName = "morpheus" | "keymaker" | "oracle" | "merovingian" | "operator" | "trinity" | "construct" | "seraph" | "smith" | "architect" | "cipher" | "sentinel" | "sati";
61
+ export declare function isQwenModel(model: string): boolean;
62
+ export declare function isMimoModel(model: string): boolean;
63
+ export declare function isDeepSeekModel(model: string): boolean;
64
+ export type BuiltinAgentName = "morpheus" | "keymaker" | "oracle" | "merovingian" | "operator" | "trinity" | "construct" | "seraph" | "smith" | "architect" | "cipher" | "sentinel" | "sati" | "bdd-contract";
62
65
  type OverridableAgentName = "build" | BuiltinAgentName;
63
66
  export type AgentName = BuiltinAgentName;
64
67
  export type AgentOverrideConfig = Partial<AgentConfig> & {
@@ -1,4 +1,3 @@
1
- export type { ProfileName } from "./profiles";
2
- export { expandProfile, PROFILE_NAMES } from "./profiles";
1
+ export { expandPreset, PRESET_NAMES, type PresetName } from "./presets";
3
2
  export type { AgentDefinitions, AgentName, AgentOverrideConfig, AgentOverrides, BuiltinCommandName, EnvFileGuardConfig, ExperimentalConfig, HookName, MatrixLoopConfig, MatrixxConfig, McpName, ModelCapabilitiesConfig, MorpheusAgentConfig, MorpheusConfig, MorpheusTasksConfig, RuntimeFallbackConfig, SecretScanningConfig, SecurityConfig, TmuxConfig, TmuxLayout, } from "./schema";
4
3
  export { AgentOverrideConfigSchema, AgentOverridesSchema, BuiltinCommandNameSchema, ExperimentalConfigSchema, HookNameSchema, MatrixLoopConfigSchema, MatrixxConfigSchema, McpNameSchema, MorpheusAgentConfigSchema, RuntimeFallbackConfigSchema, SecurityConfigSchema, TmuxConfigSchema, TmuxLayoutSchema, } from "./schema";
@@ -0,0 +1,4 @@
1
+ import type { MatrixxConfig } from "./schema/matrixx-config";
2
+ export declare const PRESET_NAMES: readonly ["minimal", "balanced", "performance", "frontier"];
3
+ export type PresetName = (typeof PRESET_NAMES)[number];
4
+ export declare function expandPreset(preset: PresetName): MatrixxConfig;
@@ -0,0 +1,32 @@
1
+ import { type TierResolverContext } from "../shared/tier-resolver";
2
+ import type { MatrixxConfig } from "./schema/matrixx-config";
3
+ interface WithTier {
4
+ model?: string;
5
+ tier?: string;
6
+ }
7
+ /**
8
+ * Walk a merged MatrixxConfig and resolve any `tier: "..."` fields to concrete
9
+ * `model: "..."` strings. The result is a new config object with the `tier`
10
+ * fields cleared (so downstream code never re-resolves them).
11
+ *
12
+ * Precedence (per agent/category):
13
+ * 1. Explicit `model` — kept as-is.
14
+ * 2. Explicit `tier` — resolved against the live provider list.
15
+ * 3. `default_tier` (top-level) — applied to any agent/category without
16
+ * a `model` or `tier` override, then resolved.
17
+ *
18
+ * If a tier cannot be resolved, the entry is left with `tier` set and `model`
19
+ * undefined. The downstream `resolveModelPipeline` will fall through to
20
+ * category defaults and the system default as a last resort.
21
+ */
22
+ export declare function resolveTiersInConfig(config: MatrixxConfig, ctx: TierResolverContext): MatrixxConfig;
23
+ /**
24
+ * Resolve tier fields in a category registry (e.g. `DEFAULT_CATEGORIES`) and
25
+ * return a new object with `tier` cleared and `model` set where the tier
26
+ * resolved. Entries that already have a concrete `model` are passed through.
27
+ * Used at config load time to pre-resolve the built-in defaults so that
28
+ * downstream code (createBuiltinAgents, buildAgent) only ever sees model
29
+ * strings.
30
+ */
31
+ export declare function resolveTiersInCategoryRegistry(registry: Record<string, WithTier | undefined>, ctx: TierResolverContext): Record<string, WithTier>;
32
+ export {};
@@ -13,13 +13,16 @@ export declare const BuiltinAgentNameSchema: z.ZodEnum<{
13
13
  cipher: "cipher";
14
14
  sentinel: "sentinel";
15
15
  sati: "sati";
16
+ "bdd-contract": "bdd-contract";
16
17
  }>;
17
18
  export declare const BuiltinSkillNameSchema: z.ZodEnum<{
19
+ "bdd-contract": "bdd-contract";
18
20
  playwright: "playwright";
19
21
  "agent-browser": "agent-browser";
20
22
  "dev-browser": "dev-browser";
21
23
  "frontend-ui-ux": "frontend-ui-ux";
22
24
  "git-master": "git-master";
25
+ "docker-master": "docker-master";
23
26
  "dsl-core": "dsl-core";
24
27
  "dsl-grammar": "dsl-grammar";
25
28
  "dsl-codegen": "dsl-codegen";
@@ -47,5 +50,8 @@ export declare const BuiltinSkillNameSchema: z.ZodEnum<{
47
50
  "matrixx-self-config": "matrixx-self-config";
48
51
  "ulw-research": "ulw-research";
49
52
  "remove-ai-slops": "remove-ai-slops";
53
+ "bdd-backend": "bdd-backend";
54
+ "bdd-frontend": "bdd-frontend";
55
+ "bdd-tests": "bdd-tests";
50
56
  }>;
51
57
  export type AgentName = z.infer<typeof BuiltinAgentNameSchema>;