opencode-matrixx 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/dist/cli.js +40 -0
- package/dist/config/schema/context-mode.d.ts +7 -0
- package/dist/config/schema/hooks.d.ts +1 -0
- package/dist/config/schema/matrixx-config.d.ts +6 -0
- package/dist/config/schema.d.ts +1 -0
- package/dist/create-hooks.d.ts +1 -0
- package/dist/hooks/context-mode-enforcer/constants.d.ts +6 -0
- package/dist/hooks/context-mode-enforcer/hook.d.ts +3 -0
- package/dist/hooks/context-mode-enforcer/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/task-continuation-enforcer/countdown.test.d.ts +1 -0
- package/dist/hooks/task-continuation-enforcer/idle-event.test.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/countdown.test.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/idle-event.test.d.ts +1 -0
- package/dist/index.js +295 -199
- package/dist/matrixx.schema.json +31 -0
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[](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
|
-
**14 specialized agents.
|
|
16
|
+
**14 specialized agents. 64 lifecycle hooks. 22 tools. 36 skills. One plugin.**
|
|
17
17
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
@@ -43,7 +43,7 @@ Morpheus (Claude Opus) → Plans the implementation
|
|
|
43
43
|
| Problem | Matrixx Solution |
|
|
44
44
|
|---------|------------------|
|
|
45
45
|
| One model does everything poorly | **14 specialists** — right model for the right job |
|
|
46
|
-
| Agent forgets what it was doing | **
|
|
46
|
+
| Agent forgets what it was doing | **Task Continuation** — `task-continuation-enforcer` (file-backed `.matrixx/tasks`, survives `/clear`, project-scoped) — forces completion |
|
|
47
47
|
| Slow sequential tool calls | **Parallel background agents** — 5+ running simultaneously |
|
|
48
48
|
| AI-generated code looks like AI | **Comment Checker** — code indistinguishable from human-written |
|
|
49
49
|
| Context window fills up fast | **Aggressive delegation** — subagents carry the load |
|
|
@@ -160,7 +160,7 @@ Use `--json` for machine-readable output or `--category <name>` for a specific c
|
|
|
160
160
|
|
|
161
161
|
**Model:** Claude Opus 4.6 · `temperature: 0.1`
|
|
162
162
|
|
|
163
|
-
Plans, delegates, and executes. Fires background agents in parallel, leverages LSP and AST-Grep for surgical refactoring, and never stops until the
|
|
163
|
+
Plans, delegates, and executes. Fires background agents in parallel, leverages LSP and AST-Grep for surgical refactoring, and never stops until the task list is empty. Morpheus sees the code for what it truly is — and routes every task to the agent best suited for it.
|
|
164
164
|
|
|
165
165
|
---
|
|
166
166
|
|
|
@@ -355,10 +355,10 @@ Every agent, model, temperature, and permission is fully customizable. [**Meet t
|
|
|
355
355
|
|
|
356
356
|
| | |
|
|
357
357
|
|---|---|
|
|
358
|
-
| **Agent Orchestration** |
|
|
358
|
+
| **Agent Orchestration** | 14 agents (incl. **Mouse** task executor, **Sati** frontend specialist, **Sentinel** security auditor, **Cipher** DSL expert), parallel background execution, category-based routing (`source`/`deep-jack`/…), session continuity, file-backed tasks |
|
|
359
359
|
| **Developer Tools** | LSP (goto def, rename, diagnostics), AST-Grep (search & replace), Tmux terminal |
|
|
360
|
-
|
|
|
361
|
-
|
|
360
|
+
| **64 Lifecycle Hooks** | Context injection, think mode, comment checking, task/todo continuation enforcement, error recovery, quality gate, preemptive compaction, session recovery |
|
|
361
|
+
| **36 Built-in Skills** | DSL engineering (11), security (9), browser, git, frontend (7 via **Sati**), BDD (4: `bdd-contract`/`backend`/`frontend`/`tests` + pipeline), saturation research, AI slop detection, TDD (`tdd-enforcer` opt-in), software dev pipeline |
|
|
362
362
|
| **Curated MCPs** | Exa (web search), Context7 (official docs), Grep.app (GitHub code search), Document Reader |
|
|
363
363
|
| **Claude Code Compat** | Full compatibility — commands, agents, skills, MCPs, hooks from `settings.json` |
|
|
364
364
|
| **Software Dev Pipeline** | 6-phase TDD workflow (PLAN→BUILD→VERIFY→REVIEW→SECURE→SHIP), 5 team roles, adaptive phases |
|
|
@@ -379,9 +379,9 @@ Matrixx includes a structured **6-phase development pipeline** that coordinates
|
|
|
379
379
|
|
|
380
380
|
| Role | Agent | Skills | Purpose |
|
|
381
381
|
|------|-------|--------|---------|
|
|
382
|
-
| **Architect** | Oracle (
|
|
383
|
-
| **Developer** |
|
|
384
|
-
| **Tester** |
|
|
382
|
+
| **Architect** | Oracle (`claude-sonnet-4-6`) | — | System design, architecture decisions, plan (`/.matrixx/plans/*.md`) breakdown |
|
|
383
|
+
| **Developer** | `category="source"` (Mouse) | `git-master`, `tdd-enforcer` (opt-in `tdd_enforcer.enabled=true`) | Implementation — RED→GREEN→REFACTOR per task |
|
|
384
|
+
| **Tester** | `category="source"` (Mouse) | `tdd-enforcer`, `quality-gate` | Test authoring (`src/**/*.test.ts`, `//#given//#when//#then`), coverage |
|
|
385
385
|
| **Quality Evaluator** | Red-pill category | `quality-gate`, `review-work` | Lint, typecheck, 5-agent code review |
|
|
386
386
|
| **Security Expert** | Sentinel (Claude Opus) | `security-core`, `security-sast`, `security-api`, `security-dependencies` | Vulnerability scanning, CVE checks |
|
|
387
387
|
|
|
@@ -389,7 +389,7 @@ Matrixx includes a structured **6-phase development pipeline** that coordinates
|
|
|
389
389
|
|
|
390
390
|
| Phase | Skip? | Role | Exit Criteria |
|
|
391
391
|
|-------|-------|------|---------------|
|
|
392
|
-
| **PLAN** | Small tasks | Architect | Approach defined, files listed, edge cases documented |
|
|
392
|
+
| **PLAN** | Small tasks | Architect (Oracle) | Approach defined, files listed, edge cases + test decision (`TDD/tests-after/none`) documented |
|
|
393
393
|
| **BUILD** | Never | Developer | TDD (RED→GREEN→REFACTOR), `bun test` passes |
|
|
394
394
|
| **VERIFY** | Never | Quality | `lint` + `typecheck` + `test` + `build` — all pass |
|
|
395
395
|
| **REVIEW** | Small tasks | Quality (5-agent) | All reviewers PASS, no CRITICAL/MAJOR issues |
|
|
@@ -665,6 +665,8 @@ To disable, set `headroom.enabled: false` or run OpenCode without `headroom wrap
|
|
|
665
665
|
| [Orchestration](docs/orchestration-guide.md) | How agents coordinate, delegate, and recover |
|
|
666
666
|
| [Categories & Skills](docs/category-skill-guide.md) | Task categories, skill injection, delegation patterns |
|
|
667
667
|
| [Context Management](docs/context-management.md) | 5-layer context stack (Native, RTK, context-mode, DCP, Headroom) — setup, config, verification |
|
|
668
|
+
| [Task System](docs/task-system.md) | File-backed execution substrate (`.matrixx/tasks/T-{uuid}.json`), dependency graph, `task-continuation-enforcer` |
|
|
669
|
+
| [TDD](docs/tdd.md) | RED→GREEN→REFACTOR planning (Oracle) + enforcement (`tdd-enforcer` opt-in) |
|
|
668
670
|
|
|
669
671
|
---
|
|
670
672
|
|
package/dist/cli.js
CHANGED
|
@@ -15868,6 +15868,13 @@ var CommentCheckerConfigSchema = exports_external.object({
|
|
|
15868
15868
|
custom_prompt: exports_external.string().optional()
|
|
15869
15869
|
});
|
|
15870
15870
|
|
|
15871
|
+
// src/config/schema/context-mode.ts
|
|
15872
|
+
var ContextModeConfigSchema = exports_external.object({
|
|
15873
|
+
enabled: exports_external.boolean().default(true),
|
|
15874
|
+
enforce: exports_external.boolean().default(false),
|
|
15875
|
+
blocked_tools: exports_external.array(exports_external.string()).default(["read", "grep", "glob"])
|
|
15876
|
+
});
|
|
15877
|
+
|
|
15871
15878
|
// src/config/schema/dcp.ts
|
|
15872
15879
|
var DcpCompressOverrideSchema = exports_external.object({
|
|
15873
15880
|
maxContextLimit: exports_external.union([exports_external.number(), exports_external.string().regex(/^\d+%$/)]).optional(),
|
|
@@ -16190,6 +16197,8 @@ var HookNameSchema = exports_external.enum([
|
|
|
16190
16197
|
"evolution-compressor",
|
|
16191
16198
|
"evolution-quality-gate",
|
|
16192
16199
|
"evolution-hitl",
|
|
16200
|
+
"context-mode-enforcer",
|
|
16201
|
+
"task-edit-guard",
|
|
16193
16202
|
"task-edit-guard"
|
|
16194
16203
|
]);
|
|
16195
16204
|
|
|
@@ -16381,6 +16390,7 @@ var MatrixxConfigSchema = exports_external.object({
|
|
|
16381
16390
|
agent_definitions: AgentDefinitionsConfigSchema.optional(),
|
|
16382
16391
|
matrixx_self_config: MatrixxSelfConfigSkillConfigSchema.optional(),
|
|
16383
16392
|
headroom: HeadroomConfigSchema.optional(),
|
|
16393
|
+
context_mode: ContextModeConfigSchema.optional(),
|
|
16384
16394
|
rtk: RtkConfigSchema.optional(),
|
|
16385
16395
|
evolution: EvolutionConfigSchema.optional(),
|
|
16386
16396
|
_migrations: exports_external.array(exports_external.string()).optional()
|
|
@@ -16461,6 +16471,27 @@ var configValidationCheck = {
|
|
|
16461
16471
|
// src/cli/doctor/checks/context-mode.ts
|
|
16462
16472
|
import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
|
|
16463
16473
|
import { join as join7 } from "path";
|
|
16474
|
+
function loadContextModeConfig() {
|
|
16475
|
+
const dir = getOpenCodeConfigDir({ binary: "opencode" });
|
|
16476
|
+
const bases = [join7(dir, "matrixx"), join7(process.cwd(), ".opencode", "matrixx"), join7(process.cwd(), "matrixx")];
|
|
16477
|
+
for (const base of bases) {
|
|
16478
|
+
for (const ext of [".jsonc", ".json"]) {
|
|
16479
|
+
const p = `${base}${ext}`;
|
|
16480
|
+
if (!existsSync6(p))
|
|
16481
|
+
continue;
|
|
16482
|
+
try {
|
|
16483
|
+
const c = readFileSync5(p, "utf-8");
|
|
16484
|
+
const parsed = parseJsoncSafe(c);
|
|
16485
|
+
if (!parsed.data || parsed.errors.length > 0)
|
|
16486
|
+
continue;
|
|
16487
|
+
const cm = parsed.data.context_mode;
|
|
16488
|
+
if (cm && typeof cm.enabled === "boolean")
|
|
16489
|
+
return { enabled: cm.enabled };
|
|
16490
|
+
} catch {}
|
|
16491
|
+
}
|
|
16492
|
+
}
|
|
16493
|
+
return null;
|
|
16494
|
+
}
|
|
16464
16495
|
function hasContextModePlugin() {
|
|
16465
16496
|
const dir = getOpenCodeConfigDir({ binary: "opencode" });
|
|
16466
16497
|
for (const name of ["opencode.jsonc", "opencode.json"]) {
|
|
@@ -16489,6 +16520,15 @@ var contextModeCheck = {
|
|
|
16489
16520
|
name: "context-mode-integration",
|
|
16490
16521
|
category: "integrations",
|
|
16491
16522
|
check: () => {
|
|
16523
|
+
const cfg = loadContextModeConfig();
|
|
16524
|
+
if (cfg && !cfg.enabled) {
|
|
16525
|
+
return {
|
|
16526
|
+
name: "context-mode-integration",
|
|
16527
|
+
status: "pass",
|
|
16528
|
+
message: "context-mode disabled via matrixx.jsonc \u2014 skipping",
|
|
16529
|
+
detail: "Set context_mode.enabled:true in matrixx.jsonc to enable discipline and enforcer"
|
|
16530
|
+
};
|
|
16531
|
+
}
|
|
16492
16532
|
const hasPlugin = hasContextModePlugin();
|
|
16493
16533
|
const cacheDir = getOmoOpenCodeCacheDir();
|
|
16494
16534
|
const hasCache = existsSync6(cacheDir);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ContextModeConfigSchema: z.ZodObject<{
|
|
3
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4
|
+
enforce: z.ZodDefault<z.ZodBoolean>;
|
|
5
|
+
blocked_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type ContextModeConfig = z.infer<typeof ContextModeConfigSchema>;
|
|
@@ -62,6 +62,7 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
62
62
|
"mcp-startup-notification": "mcp-startup-notification";
|
|
63
63
|
"evolution-quality-gate": "evolution-quality-gate";
|
|
64
64
|
"evolution-hitl": "evolution-hitl";
|
|
65
|
+
"context-mode-enforcer": "context-mode-enforcer";
|
|
65
66
|
"task-edit-guard": "task-edit-guard";
|
|
66
67
|
}>;
|
|
67
68
|
export type HookName = z.infer<typeof HookNameSchema>;
|
|
@@ -130,6 +130,7 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
|
|
|
130
130
|
"mcp-startup-notification": "mcp-startup-notification";
|
|
131
131
|
"evolution-quality-gate": "evolution-quality-gate";
|
|
132
132
|
"evolution-hitl": "evolution-hitl";
|
|
133
|
+
"context-mode-enforcer": "context-mode-enforcer";
|
|
133
134
|
"task-edit-guard": "task-edit-guard";
|
|
134
135
|
}>>>;
|
|
135
136
|
disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -1912,6 +1913,11 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
|
|
|
1912
1913
|
project: z.ZodOptional<z.ZodString>;
|
|
1913
1914
|
backend: z.ZodOptional<z.ZodString>;
|
|
1914
1915
|
}, z.core.$strip>>;
|
|
1916
|
+
context_mode: z.ZodOptional<z.ZodObject<{
|
|
1917
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1918
|
+
enforce: z.ZodDefault<z.ZodBoolean>;
|
|
1919
|
+
blocked_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1920
|
+
}, z.core.$strip>>;
|
|
1915
1921
|
rtk: z.ZodOptional<z.ZodObject<{
|
|
1916
1922
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1917
1923
|
binary_path: z.ZodOptional<z.ZodString>;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./schema/browser-automation";
|
|
|
9
9
|
export * from "./schema/categories";
|
|
10
10
|
export * from "./schema/commands";
|
|
11
11
|
export * from "./schema/comment-checker";
|
|
12
|
+
export * from "./schema/context-mode";
|
|
12
13
|
export * from "./schema/dcp";
|
|
13
14
|
export * from "./schema/evolution";
|
|
14
15
|
export * from "./schema/experimental";
|
package/dist/create-hooks.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export declare function createHooks(args: {
|
|
|
45
45
|
envFileWriteGuard: ReturnType<typeof import("./hooks").createEnvFileWriteGuardHook> | null;
|
|
46
46
|
jsonErrorRecovery: ReturnType<typeof import("./hooks").createJsonErrorRecoveryHook> | null;
|
|
47
47
|
bashFileReadGuard: ReturnType<typeof import("./hooks").createBashFileReadGuardHook> | null;
|
|
48
|
+
contextModeEnforcer: ReturnType<typeof import("./hooks").createContextModeEnforcerHook> | null;
|
|
48
49
|
readImageResizer: ReturnType<typeof import("./hooks").createReadImageResizerHook> | null;
|
|
49
50
|
webfetchRedirectGuard: ReturnType<typeof import("./hooks").createWebFetchRedirectGuardHook> | null;
|
|
50
51
|
hashlineEditDiffEnhancer: ReturnType<typeof import("./hooks").createHashlineEditDiffEnhancerHook> | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const HOOK_NAME = "context-mode-enforcer";
|
|
2
|
+
export declare const WARN_MESSAGE_READ = "Use ctx_search / ctx_batch_execute / ctx_execute for analysis \u2014 raw read/grep/glob bypasses FTS5 sandbox and pollutes context. Use Read only with hashline IDs for Edit.";
|
|
3
|
+
export declare const BLOCK_MESSAGE_GREP_GLOB = "Blocked: raw grep/glob is forbidden when context-mode is enforced. Use ctx_search (indexed) \u2192 grep/glob fallback only when ctx_* unavailable, or ctx_batch_execute / ctx_execute for multi-file analysis.";
|
|
4
|
+
export declare const WARN_MESSAGE_BASH_READ = "Use ctx_* / Read tool instead of `cat`/`head`/`tail`/`grep` via bash for analysis. Raw bash file reads bypass sandbox.";
|
|
5
|
+
export declare const DEFAULT_BLOCKED_TOOLS: readonly ["grep", "glob"];
|
|
6
|
+
export declare const WARN_ONLY_TOOLS: readonly ["read"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createContextModeEnforcerHook } from "./hook";
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { createCategorySkillReminderHook } from "./category-skill-reminder";
|
|
|
9
9
|
export { createCommentCheckerHooks } from "./comment-checker";
|
|
10
10
|
export { createCompactionContextInjector } from "./compaction-context-injector";
|
|
11
11
|
export { createCompactionTodoPreserverHook } from "./compaction-todo-preserver";
|
|
12
|
+
export { createContextModeEnforcerHook } from "./context-mode-enforcer";
|
|
12
13
|
export { createContextWindowMonitorHook } from "./context-window-monitor";
|
|
13
14
|
export { createDelegateTaskRetryHook } from "./delegate-task-retry";
|
|
14
15
|
export { createDesignIntentPreserverHook } from "./design-intent-preserver";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|