@rosenfan/matrix 0.1.4 → 0.1.6
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/LICENSE +21 -21
- package/README.md +41 -40
- package/README.zh-CN.md +39 -38
- package/{.claude → assets}/skills/matrix/SKILL.md +79 -78
- package/{.claude → assets}/skills/matrix/agents/openai.yaml +4 -4
- package/{.claude → assets}/skills/matrix/scripts/matrix_claude.py +11 -11
- package/{.claude → assets}/skills/matrix/scripts/matrix_state.py +49 -49
- package/assets/skills/matrix/scripts/test_matrix_claude.py +69 -0
- package/assets/skills/matrix/scripts/test_matrix_state.py +69 -0
- package/{.claude → assets}/skills/matrix-archive/SKILL.md +36 -36
- package/{.claude/skills/matrix-hotfix → assets/skills/matrix-archive}/agents/openai.yaml +4 -4
- package/{.claude → assets}/skills/matrix-build/SKILL.md +41 -41
- package/{.claude/skills/matrix-archive → assets/skills/matrix-build}/agents/openai.yaml +4 -4
- package/{.claude → assets}/skills/matrix-design/SKILL.md +71 -65
- package/{.claude → assets}/skills/matrix-design/agents/openai.yaml +4 -4
- package/assets/skills/matrix-handoff/SKILL.md +89 -0
- package/{.claude/skills/matrix-claude → assets/skills/matrix-handoff}/agents/openai.yaml +4 -4
- package/{.claude → assets}/skills/matrix-hotfix/SKILL.md +8 -8
- package/{.claude/skills/matrix-build → assets/skills/matrix-hotfix}/agents/openai.yaml +4 -4
- package/{.claude → assets}/skills/matrix-open/SKILL.md +51 -40
- package/assets/skills/matrix-open/agents/openai.yaml +4 -0
- package/{.claude → assets}/skills/matrix-status/SKILL.md +15 -15
- package/{.claude → assets}/skills/matrix-status/agents/openai.yaml +4 -4
- package/{.claude → assets}/skills/matrix-tweak/SKILL.md +8 -8
- package/assets/skills/matrix-tweak/agents/openai.yaml +4 -0
- package/{.claude → assets}/skills/matrix-verify/SKILL.md +62 -62
- package/assets/skills/matrix-verify/agents/openai.yaml +4 -0
- package/assets/skills-zh-CN/matrix/SKILL.md +72 -71
- package/assets/skills-zh-CN/matrix-build/SKILL.md +4 -4
- package/assets/skills-zh-CN/matrix-design/SKILL.md +37 -20
- package/assets/skills-zh-CN/matrix-handoff/SKILL.md +79 -0
- package/assets/skills-zh-CN/matrix-open/SKILL.md +38 -28
- package/assets/skills-zh-CN/matrix-verify/SKILL.md +19 -19
- package/bin/matrix.js +15 -15
- package/package.json +4 -13
- package/src/catalog.js +79 -72
- package/src/cli.js +211 -141
- package/src/distribution.js +182 -179
- package/src/installer.js +10 -10
- package/src/matt-catalog.mjs +1 -1
- package/src/matt.js +9 -14
- package/src/messages.js +32 -23
- package/src/npm-invocation.js +23 -0
- package/src/project-index.js +43 -0
- package/src/runtime-resolver.js +76 -76
- package/src/self-update.js +88 -81
- package/src/ui.js +97 -89
- package/src/workflow-transaction.js +13 -13
- package/src/workflow.js +734 -705
- package/.claude/skills/matrix-claude/SKILL.md +0 -98
- package/.claude/skills/matrix-open/agents/openai.yaml +0 -4
- package/.claude/skills/matrix-tweak/agents/openai.yaml +0 -4
- package/.claude/skills/matrix-verify/agents/openai.yaml +0 -4
- package/assets/skills-zh-CN/matrix-claude/SKILL.md +0 -33
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Rosen
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rosen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -93,10 +93,10 @@ matrix init
|
|
|
93
93
|
|
|
94
94
|
The interactive setup lets you:
|
|
95
95
|
|
|
96
|
-
- Choose English or Chinese, project or global Matrix discovery scope, and Claude Code, Codex, or both
|
|
96
|
+
- Choose English or Chinese, project or global Matrix discovery scope, and Claude Code, Codex, or both
|
|
97
97
|
- Copy skills (recommended) or symlink them for local development
|
|
98
98
|
- Safely reconfigure an existing installation with an automatic backup
|
|
99
|
-
- Review all 25 official Matt Skills v1.2.3 roles and install the 23 compatible Skills into the target project
|
|
99
|
+
- Review all 25 official Matt Skills v1.2.3 roles and install the 23 compatible Skills into the target project
|
|
100
100
|
- Choose **Prim** or **Arch** as the project default without disabling the other available mode
|
|
101
101
|
|
|
102
102
|
For automation and CI:
|
|
@@ -105,17 +105,17 @@ For automation and CI:
|
|
|
105
105
|
# Safe non-interactive installation for both verified platforms
|
|
106
106
|
matrix init --yes --platform claude-code --platform codex --with-mattpocock
|
|
107
107
|
|
|
108
|
-
# Explicitly select the project default
|
|
109
|
-
matrix init --yes --with-mattpocock --default-orchestration arch
|
|
110
|
-
|
|
111
|
-
# Replace locally modified Matt Skills only after an explicit backup authorization
|
|
112
|
-
matrix init --yes --with-mattpocock --force-matt
|
|
108
|
+
# Explicitly select the project default
|
|
109
|
+
matrix init --yes --with-mattpocock --default-orchestration arch
|
|
110
|
+
|
|
111
|
+
# Replace locally modified Matt Skills only after an explicit backup authorization
|
|
112
|
+
matrix init --yes --with-mattpocock --force-matt
|
|
113
113
|
|
|
114
114
|
# Preview exactly what would change (including backups) without writing
|
|
115
115
|
matrix init --platform codex --dry-run --json
|
|
116
116
|
|
|
117
|
-
# Inspect Matrix ownership, project-local Matt compatibility, and the selected platform
|
|
118
|
-
matrix doctor --platform codex
|
|
117
|
+
# Inspect Matrix ownership, project-local Matt compatibility, and the selected platform
|
|
118
|
+
matrix doctor --platform codex
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
Update an initialized project:
|
|
@@ -131,9 +131,9 @@ matrix update --skip-self-update
|
|
|
131
131
|
matrix update --yes
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
`matrix update` preserves the installation's scope, platforms, language, mode, and orchestration. It first validates a newer npm package in isolation, then re-runs the new CLI to refresh Matrix assets.
|
|
135
|
-
|
|
136
|
-
Matrix 0.1.
|
|
134
|
+
`matrix update` preserves the installation's scope, platforms, language, mode, and orchestration. It first validates a newer npm package in isolation, then re-runs the new CLI to refresh Matrix assets. When the local Matt Skills are incomplete or outdated, an interactive `matrix update` asks once and repairs them to the supported release in the same run — CLI upgrade, asset refresh, and Matt repair complete in a single command (`--with-mattpocock` gives non-interactive/CI the same behavior; `--force-matt` additionally replaces locally modified Matt Skills and requires that flag; Matt Skills are never removed by `matrix update`). `--all` extends the run to every indexed project (`~/.matrix/projects.json`); each project updates in isolation and missing directories are pruned from the index. npm and project assets are separate transactions: if asset refresh fails after a CLI upgrade, run `matrix update --skip-self-update` to retry. On Windows the self-update chain runs npm through Node (no shell), so one-command upgrades work without manual steps.
|
|
135
|
+
|
|
136
|
+
Matrix 0.1.6 is bound to Matt Skills v1.2.3 at commit `6acc160e4e0cd062dbbbd7a1b26ae92855edf07e`. `matrix init --with-mattpocock` always uses that exact archive and its reviewed 23-Skill compatible manifest, even if upstream has a newer release. The two official but incompatible Skills, `implement` and raw `resolving-merge-conflicts`, are not Matrix-managed or installed. Matrix scope controls Matrix Skill discovery only: Matt Skills and `.matrix/matt-installation.json` are always project-local. Global Matt copies are preserved but never used to complete project readiness.
|
|
137
137
|
|
|
138
138
|
The language selected by `matrix init` controls the prose in new Matrix artifacts. Markdown headings required by Matrix guards remain stable English tokens; the artifact body is Chinese for `zh-CN` and English for `en`. A change freezes this language at creation time.
|
|
139
139
|
|
|
@@ -153,7 +153,7 @@ Matrix installs:
|
|
|
153
153
|
- `matrix-hotfix/` — Shortcut for small bugs
|
|
154
154
|
- `matrix-tweak/` — Shortcut for bounded changes
|
|
155
155
|
- `matrix-status/` — Check current state
|
|
156
|
-
- `matrix-
|
|
156
|
+
- `matrix-handoff/` — Optional: export to any implementation agent (Claude Code, opencode, ...)
|
|
157
157
|
|
|
158
158
|
---
|
|
159
159
|
|
|
@@ -179,9 +179,9 @@ Matrix will:
|
|
|
179
179
|
| Phase | Arch capabilities (triggered, not a fixed sequence) | Deliverables | Guard Condition |
|
|
180
180
|
|-------|------------------------------------------------------|--------------|-----------------|
|
|
181
181
|
| **open** | `/grilling`, `/domain-modeling` | `proposal.md`; optional repository-standard context/ADR evidence | Goal, Scope, Non-goals, Acceptance, Risks present |
|
|
182
|
-
| **design** | `/domain-modeling`, `/research`, `/prototype`, `/codebase-design`, conditional `/writing-for-agents` | `design.md`, `plan.md` | Decisions, Test seams, Steps documented |
|
|
183
|
-
| **build** | `/tdd`, `/diagnosing-bugs`, conditional `/writing-for-agents` and generate-only `/wizard` | Code, `verification.md` | Exact approved Contract matches; build evidence recorded |
|
|
184
|
-
| **verify** | `/code-review` | Test evidence, two-axis review, Arch receipt | Evidence is substantive; Arch receipt matches the current Contract, review, and workspace |
|
|
182
|
+
| **design** | `/domain-modeling`, `/research`, `/prototype`, `/codebase-design`, conditional `/writing-for-agents` | `design.md`, `plan.md` | Decisions, Test seams, Steps documented |
|
|
183
|
+
| **build** | `/tdd`, `/diagnosing-bugs`, conditional `/writing-for-agents` and generate-only `/wizard` | Code, `verification.md` | Exact approved Contract matches; build evidence recorded |
|
|
184
|
+
| **verify** | `/code-review` | Test evidence, two-axis review, Arch receipt | Evidence is substantive; Arch receipt matches the current Contract, review, and workspace |
|
|
185
185
|
| **archive** | None; Matrix-owned in both modes | Archive record | Verify guard passed |
|
|
186
186
|
|
|
187
187
|
---
|
|
@@ -255,28 +255,29 @@ Hotfix and tweak reference the same internal `lightweight` transition profile. T
|
|
|
255
255
|
|
|
256
256
|
---
|
|
257
257
|
|
|
258
|
-
## Special Feature: matrix-
|
|
258
|
+
## Special Feature: matrix-handoff
|
|
259
259
|
|
|
260
|
-
**Default usage**: Just use the main workflow (`$matrix`). Whether you're using Codex
|
|
260
|
+
**Default usage**: Just use the main workflow (`$matrix`). Whether you're using Codex, Claude Code, zcode, or opencode, the standard flow works for all of them:
|
|
261
261
|
|
|
262
262
|
```
|
|
263
263
|
$matrix → open → design → build → verify → archive
|
|
264
264
|
```
|
|
265
265
|
|
|
266
|
-
**When to use `$matrix-
|
|
266
|
+
**When to use `$matrix-handoff`**: Only when you want to **split the work across tools** — design in one agent, implement in another.
|
|
267
267
|
|
|
268
268
|
| Scenario | What to Do |
|
|
269
269
|
|----------|------------|
|
|
270
270
|
| Use one tool for everything (default) | Just use `$matrix`, no extra steps |
|
|
271
|
-
|
|
|
272
|
-
| Codex designs + Claude Code implements | design → `$matrix-claude` → Claude Code → verify |
|
|
271
|
+
| Same agent designs and implements | Standard flow: design → build → verify |
|
|
272
|
+
| Codex designs + Claude Code implements | design → `$matrix-handoff` → `export --agent claude-code` → Claude Code → verify |
|
|
273
|
+
| zcode designs + opencode implements | design → `$matrix-handoff` → `export --agent opencode` → opencode → verify |
|
|
273
274
|
|
|
274
|
-
### How matrix-
|
|
275
|
+
### How matrix-handoff Works
|
|
275
276
|
|
|
276
|
-
1. Design phase completes, guard passes
|
|
277
|
-
2. Run `$matrix-
|
|
278
|
-
3.
|
|
279
|
-
4.
|
|
277
|
+
1. Design phase completes, guard passes, and you choose the implementation agent at the Design -> Build decision point
|
|
278
|
+
2. Run `$matrix-handoff` → exports the frozen contract as `artifacts/handoff-task-<task-id>.md` (`export --agent <agent-id>`; `--target generic` remains as the legacy Claude Code form, `artifacts/claude-task.md`)
|
|
279
|
+
3. The implementation agent reads the task package and implements
|
|
280
|
+
4. The implementation agent produces evidence in `artifacts/verification.md`
|
|
280
281
|
5. Return to Matrix: build guard → verify → archive
|
|
281
282
|
|
|
282
283
|
The sidecar does NOT change Matrix state. It's a pure export — like taking a snapshot of the design for another tool to consume.
|
|
@@ -285,26 +286,26 @@ The sidecar does NOT change Matrix state. It's a pure export — like taking a s
|
|
|
285
286
|
|
|
286
287
|
## Integration with Matt Pocock's Skills
|
|
287
288
|
|
|
288
|
-
Prim uses Matrix's own capability. Matrix reviews all 25 official Matt v1.2.3 roles, installs the 23 compatible Skills, and lets Arch automatically invoke only this reviewed ten-capability cohort:
|
|
289
|
+
Prim uses Matrix's own capability. Matrix reviews all 25 official Matt v1.2.3 roles, installs the 23 compatible Skills, and lets Arch automatically invoke only this reviewed ten-capability cohort:
|
|
289
290
|
|
|
290
291
|
| Phase | Capability | Trigger |
|
|
291
292
|
|---|---|---|
|
|
292
293
|
| open | `/grilling` | Material ambiguity or explicit stress-test request |
|
|
293
294
|
| open/design | `/domain-modeling` | Unclear vocabulary, invariants, or architectural decisions |
|
|
294
295
|
| design | `/research` | Required external facts are unavailable in the repository |
|
|
295
|
-
| design | `/prototype` | A material design question needs disposable evidence |
|
|
296
|
-
| design | `/codebase-design` | A deep-module, interface, or test-seam decision remains |
|
|
297
|
-
| design/build | `/writing-for-agents` | The Contract changes agent-facing instructions or pointer-reached documents |
|
|
298
|
-
| build | `/tdd` | Observable behavior changes at a testable seam |
|
|
299
|
-
| build | `/diagnosing-bugs` | An actual failure exists and root cause is unknown |
|
|
300
|
-
| build | `/wizard` | The Contract requires generated human-run shell steps; Matrix never runs them end-to-end |
|
|
301
|
-
| verify | `/code-review` | Standards and Spec review evidence is required |
|
|
302
|
-
|
|
303
|
-
Matrix may recommend but never nest these user-invoked handoffs: `setup-matt-pocock-skills`, `improve-codebase-architecture`, `wayfinder`, `handoff`, and `to-questionnaire`. The user explicitly runs them outside the active phase; selected output may enter a governed Change.
|
|
304
|
-
|
|
305
|
-
Arch records a Runtime-managed review receipt after `code-review`, binding its fixed point and committed HEAD diff to the current Contract, review evidence, and workspace. A normal `code-review` receipt requires a clean candidate worktree outside Matrix-managed assets. When Git has no usable baseline, the committed diff is empty, staged/unstaged/untracked candidate files still exist, or the correctly installed capability fails, Matrix may perform one explicitly labelled same-capability fallback for that revision. The `uncommitted-worktree` fallback binds both the fixed point and a content hash of the complete worktree candidate. Installation-integrity failures never fall back. A heading or self-description without the matching receipt cannot advance Verify.
|
|
306
|
-
|
|
307
|
-
Installed standalone Skills are `ask-matt`, `grill-with-docs`, `triage`, `to-spec`, `to-tickets`, `grill-me`, `teach`, and `wait-what`. `implement` and raw `resolving-merge-conflicts` are incompatible because they can take over TDD/review/staging/commit effects owned by Matrix, so 0.1.
|
|
296
|
+
| design | `/prototype` | A material design question needs disposable evidence |
|
|
297
|
+
| design | `/codebase-design` | A deep-module, interface, or test-seam decision remains |
|
|
298
|
+
| design/build | `/writing-for-agents` | The Contract changes agent-facing instructions or pointer-reached documents |
|
|
299
|
+
| build | `/tdd` | Observable behavior changes at a testable seam |
|
|
300
|
+
| build | `/diagnosing-bugs` | An actual failure exists and root cause is unknown |
|
|
301
|
+
| build | `/wizard` | The Contract requires generated human-run shell steps; Matrix never runs them end-to-end |
|
|
302
|
+
| verify | `/code-review` | Standards and Spec review evidence is required |
|
|
303
|
+
|
|
304
|
+
Matrix may recommend but never nest these user-invoked handoffs: `setup-matt-pocock-skills`, `improve-codebase-architecture`, `wayfinder`, `handoff`, and `to-questionnaire`. The user explicitly runs them outside the active phase; selected output may enter a governed Change.
|
|
305
|
+
|
|
306
|
+
Arch records a Runtime-managed review receipt after `code-review`, binding its fixed point and committed HEAD diff to the current Contract, review evidence, and workspace. A normal `code-review` receipt requires a clean candidate worktree outside Matrix-managed assets. When Git has no usable baseline, the committed diff is empty, staged/unstaged/untracked candidate files still exist, or the correctly installed capability fails, Matrix may perform one explicitly labelled same-capability fallback for that revision. The `uncommitted-worktree` fallback binds both the fixed point and a content hash of the complete worktree candidate. Installation-integrity failures never fall back. A heading or self-description without the matching receipt cannot advance Verify.
|
|
307
|
+
|
|
308
|
+
Installed standalone Skills are `ask-matt`, `grill-with-docs`, `triage`, `to-spec`, `to-tickets`, `grill-me`, `teach`, and `wait-what`. `implement` and raw `resolving-merge-conflicts` are incompatible because they can take over TDD/review/staging/commit effects owned by Matrix, so 0.1.5 neither installs nor manages them. Pre-existing copies are preserved and reported as unmanaged extras. Installation never grants automatic invocation, and no companion may transition, commit, archive, recover, or write Matrix state.
|
|
308
309
|
|
|
309
310
|
---
|
|
310
311
|
|
package/README.zh-CN.md
CHANGED
|
@@ -93,10 +93,10 @@ matrix init
|
|
|
93
93
|
|
|
94
94
|
交互式初始化支持:
|
|
95
95
|
|
|
96
|
-
- 选择 Matrix Skill 发现入口安装到当前项目或全局
|
|
96
|
+
- 选择 Matrix Skill 发现入口安装到当前项目或全局
|
|
97
97
|
- 复制 skills(推荐)或为本地开发创建符号链接
|
|
98
98
|
- 安全地重新配置已有安装,并自动备份被替换的 Matrix 文件
|
|
99
|
-
- 审查 Matt Skills v1.2.3 官方 25 项角色,并在目标项目安装其中 23 项兼容 Skill
|
|
99
|
+
- 审查 Matt Skills v1.2.3 官方 25 项角色,并在目标项目安装其中 23 项兼容 Skill
|
|
100
100
|
- 选择 Prim 或 Arch 作为项目默认值,且不禁用另一种可用模式
|
|
101
101
|
|
|
102
102
|
自动化或 CI 环境可以使用:
|
|
@@ -105,11 +105,11 @@ matrix init
|
|
|
105
105
|
# 使用推荐的项目级默认值,不显示交互问题
|
|
106
106
|
matrix init --yes --with-mattpocock
|
|
107
107
|
|
|
108
|
-
# 显式选择项目默认编排
|
|
109
|
-
matrix init --yes --with-mattpocock --default-orchestration arch
|
|
110
|
-
|
|
111
|
-
# 只有明确授权备份后才替换被本地修改的 Matt Skills
|
|
112
|
-
matrix init --yes --with-mattpocock --force-matt
|
|
108
|
+
# 显式选择项目默认编排
|
|
109
|
+
matrix init --yes --with-mattpocock --default-orchestration arch
|
|
110
|
+
|
|
111
|
+
# 只有明确授权备份后才替换被本地修改的 Matt Skills
|
|
112
|
+
matrix init --yes --with-mattpocock --force-matt
|
|
113
113
|
|
|
114
114
|
# 检查安装完整性和运行环境
|
|
115
115
|
matrix doctor
|
|
@@ -128,9 +128,9 @@ matrix update --skip-self-update
|
|
|
128
128
|
matrix update --yes
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
`matrix update` 会保留既有安装的 scope、平台、语言、mode 与 orchestration。它先隔离验证 npm 新包,再由新 CLI 同步 Matrix
|
|
132
|
-
|
|
133
|
-
Matrix 0.1.
|
|
131
|
+
`matrix update` 会保留既有安装的 scope、平台、语言、mode 与 orchestration。它先隔离验证 npm 新包,再由新 CLI 同步 Matrix 资产。当本地 Matt Skills 不完整或过期时,交互式 `matrix update` 会询问一次,并在同一轮把 Matt 修复到受支持 release——CLI 升级、资产刷新、Matt 修复一条命令完成(`--with-mattpocock` 为自动化/CI 提供等价的非交互行为;`--force-matt` 可额外替换被本地修改的 Matt Skills,且必须与 `--with-mattpocock` 同传;`matrix update` 绝不删除 Matt Skills)。`--all` 可将更新扩展到全部已索引项目(`~/.matrix/projects.json`),各项目隔离更新,失效目录自动从索引清理。npm 与项目资产是两个事务:若 CLI 已更新但资产同步失败,可运行 `matrix update --skip-self-update` 重试。Windows 上自升级链路经 Node 调用 npm(不经 shell),一条命令升级无需手动步骤。
|
|
132
|
+
|
|
133
|
+
Matrix 0.1.6 固定对应 Matt Skills v1.2.3,commit 为 `6acc160e4e0cd062dbbbd7a1b26ae92855edf07e`。即使上游已有新版,`matrix init --with-mattpocock` 仍使用该确切 archive 与经过审查的 23 项兼容 manifest。官方角色中的 `implement` 与 raw `resolving-merge-conflicts` 不兼容,因此 Matrix 不安装也不管理它们。Matrix scope 只控制 Matrix Skill 的发现位置;Matt Skills 与 `.matrix/matt-installation.json` 始终属于目标项目。全局 Matt 副本会保留,但绝不用于补齐项目 readiness。
|
|
134
134
|
|
|
135
135
|
`matrix init` 选择的语言决定新 Matrix 产物的正文语言:`zh-CN` 使用中文、`en` 使用英文。Runtime 守卫依赖的 Markdown 英文标题 token 保持不变;每个 change 在创建时冻结该语言。
|
|
136
136
|
|
|
@@ -150,7 +150,7 @@ Matrix 将安装:
|
|
|
150
150
|
- `matrix-hotfix/` — 小型 Bug 快捷方式
|
|
151
151
|
- `matrix-tweak/` — 有界变更快捷方式
|
|
152
152
|
- `matrix-status/` — 检查当前状态
|
|
153
|
-
- `matrix-
|
|
153
|
+
- `matrix-handoff/` — 可选:导出给任意实现 agent(Claude Code、opencode 等)
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
@@ -176,9 +176,9 @@ Matrix 将会:
|
|
|
176
176
|
| 阶段 | Arch 能力(按事实触发,不是固定序列) | 交付物 | 守卫条件 |
|
|
177
177
|
|------|----------------------------------------|--------|----------|
|
|
178
178
|
| **open** | `/grilling`、`/domain-modeling` | `proposal.md`;可选仓库约定的 context/ADR 证据 | 目标、范围、验收标准、风险存在 |
|
|
179
|
-
| **design** | `/domain-modeling`、`/research`、`/prototype`、`/codebase-design`、条件触发的 `/writing-for-agents` | `design.md`、`plan.md` | 决策、测试点、步骤已记录 |
|
|
180
|
-
| **build** | `/tdd`、`/diagnosing-bugs`、条件触发的 `/writing-for-agents` 与仅生成的 `/wizard` | 代码、`verification.md` | 已批准的精确 Contract 匹配,且已记录构建证据 |
|
|
181
|
-
| **verify** | `/code-review` | 测试证据、双轴审查、Arch 回执 | 证据内容充分;Arch 回执匹配当前 Contract、审查正文和工作区 |
|
|
179
|
+
| **design** | `/domain-modeling`、`/research`、`/prototype`、`/codebase-design`、条件触发的 `/writing-for-agents` | `design.md`、`plan.md` | 决策、测试点、步骤已记录 |
|
|
180
|
+
| **build** | `/tdd`、`/diagnosing-bugs`、条件触发的 `/writing-for-agents` 与仅生成的 `/wizard` | 代码、`verification.md` | 已批准的精确 Contract 匹配,且已记录构建证据 |
|
|
181
|
+
| **verify** | `/code-review` | 测试证据、双轴审查、Arch 回执 | 证据内容充分;Arch 回执匹配当前 Contract、审查正文和工作区 |
|
|
182
182
|
| **archive** | 无;两种模式均由 Matrix 拥有 | 归档记录 | 验证守卫通过 |
|
|
183
183
|
|
|
184
184
|
---
|
|
@@ -252,28 +252,29 @@ hotfix 与 tweak 引用同一个内部 `lightweight` 迁移 profile,只在入
|
|
|
252
252
|
|
|
253
253
|
---
|
|
254
254
|
|
|
255
|
-
## 特别功能:matrix-
|
|
255
|
+
## 特别功能:matrix-handoff
|
|
256
256
|
|
|
257
|
-
**默认用法**:直接使用主流程即可。无论你用 Codex 还是
|
|
257
|
+
**默认用法**:直接使用主流程即可。无论你用 Codex、Claude Code、zcode 还是 opencode,标准流程都适用:
|
|
258
258
|
|
|
259
259
|
```
|
|
260
260
|
$matrix → open → design → build → verify → archive
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
-
**何时使用 `$matrix-
|
|
263
|
+
**何时使用 `$matrix-handoff`**:仅当你想**跨工具拆分工作**时 —— 用一个 agent 设计,交给另一个 agent 实现。
|
|
264
264
|
|
|
265
265
|
| 场景 | 操作 |
|
|
266
266
|
|------|------|
|
|
267
267
|
| 一个工具完成所有工作(默认) | 直接用 `$matrix`,无需额外步骤 |
|
|
268
|
-
|
|
|
269
|
-
| Codex 设计 + Claude Code 实现 | design → build(批准 Contract)→ `$matrix-claude` → Claude Code → verify |
|
|
268
|
+
| 同一 agent 设计 + 实现 | 标准流程:design → build → verify |
|
|
269
|
+
| Codex 设计 + Claude Code 实现 | design → build(批准 Contract)→ `$matrix-handoff` → `export --agent claude-code` → Claude Code → verify |
|
|
270
|
+
| zcode 设计 + opencode 实现 | design → build(批准 Contract)→ `$matrix-handoff` → `export --agent opencode` → opencode → verify |
|
|
270
271
|
|
|
271
|
-
### matrix-
|
|
272
|
+
### matrix-handoff 工作原理
|
|
272
273
|
|
|
273
|
-
1.
|
|
274
|
-
2. 运行 `$matrix-
|
|
275
|
-
3.
|
|
276
|
-
4.
|
|
274
|
+
1. 设计阶段完成,守卫通过,并在 design→build 决策点选择实现 agent
|
|
275
|
+
2. 运行 `$matrix-handoff` → 导出冻结 Contract 为 `artifacts/handoff-task-<task-id>.md`(`export --agent <agent-id>`;`--target generic` 为兼容的 Claude Code 旧形态,产出 `artifacts/claude-task.md`)
|
|
276
|
+
3. 实现 agent 读取任务包并实现
|
|
277
|
+
4. 实现 agent 在 `artifacts/verification.md` 中产生证据
|
|
277
278
|
5. 返回 Matrix:构建守卫 → 验证 → 归档
|
|
278
279
|
|
|
279
280
|
此 sidecar 不会改变 Matrix 状态。它只是纯粹的导出 —— 就像为另一个工具拍一张设计快照。
|
|
@@ -282,26 +283,26 @@ $matrix → open → design → build → verify → archive
|
|
|
282
283
|
|
|
283
284
|
## 与 Matt Pocock Skills 的集成
|
|
284
285
|
|
|
285
|
-
Prim 使用 Matrix 自身能力。Matrix 会审查 Matt v1.2.3 官方 25 项角色,安装其中 23 项兼容 Skill,但 Arch 只自动调用以下十项经过审查的能力:
|
|
286
|
+
Prim 使用 Matrix 自身能力。Matrix 会审查 Matt v1.2.3 官方 25 项角色,安装其中 23 项兼容 Skill,但 Arch 只自动调用以下十项经过审查的能力:
|
|
286
287
|
|
|
287
288
|
| 阶段 | 能力 | 触发条件 |
|
|
288
289
|
|---|---|---|
|
|
289
290
|
| open | `/grilling` | 存在重大歧义或用户明确要求压力测试 |
|
|
290
291
|
| open/design | `/domain-modeling` | 词汇、不变量或架构决定不清晰 |
|
|
291
292
|
| design | `/research` | 仓库内无法获得必需的外部事实 |
|
|
292
|
-
| design | `/prototype` | 重大设计问题需要一次性实验证据 |
|
|
293
|
-
| design | `/codebase-design` | 深模块、接口或测试接缝决定尚未完成 |
|
|
294
|
-
| design/build | `/writing-for-agents` | Contract 修改 agent-facing 指令或指针可达文档 |
|
|
295
|
-
| build | `/tdd` | 可测试接缝上的可观察行为发生变化 |
|
|
296
|
-
| build | `/diagnosing-bugs` | 存在真实失败且根因未知 |
|
|
297
|
-
| build | `/wizard` | Contract 需要生成人工执行的 shell 步骤;Matrix 不端到端运行 |
|
|
298
|
-
| verify | `/code-review` | 需要 Standards 与 Spec 双轴证据 |
|
|
299
|
-
|
|
300
|
-
Matrix 可以推荐但绝不嵌套以下 user-invoked handoff:`setup-matt-pocock-skills`、`improve-codebase-architecture`、`wayfinder`、`handoff`、`to-questionnaire`。它们由用户在活动阶段外显式运行,选中的结果可以再进入受治理 Change。
|
|
301
|
-
|
|
302
|
-
Arch 在 `code-review` 后记录由 Runtime 管理的审查回执,把 fixed point 与已提交的 HEAD diff 绑定到当前 Contract、审查正文和工作区。正常的 `code-review` 回执要求 Matrix 管理资产之外的候选工作区是干净的。无可用 Git 基线、已提交 diff 为空、仍存在 staged/unstaged/untracked 候选,或正确安装的 capability 真实失败时,Matrix 可为该 revision 执行一次明确标记的同能力 fallback;其中 `uncommitted-worktree` 会同时绑定 fixed point 与完整工作区候选的内容 hash。安装完整性失败不得 fallback。只有标题或自述、但没有匹配回执时,Verify 不能推进。
|
|
303
|
-
|
|
304
|
-
安装但保持 standalone 的 Skill 是 `ask-matt`、`grill-with-docs`、`triage`、`to-spec`、`to-tickets`、`grill-me`、`teach`、`wait-what`。`implement` 与 raw `resolving-merge-conflicts` 可能接管 Matrix 所有的 TDD、review、stage 或 commit 副作用,因此 0.1.
|
|
293
|
+
| design | `/prototype` | 重大设计问题需要一次性实验证据 |
|
|
294
|
+
| design | `/codebase-design` | 深模块、接口或测试接缝决定尚未完成 |
|
|
295
|
+
| design/build | `/writing-for-agents` | Contract 修改 agent-facing 指令或指针可达文档 |
|
|
296
|
+
| build | `/tdd` | 可测试接缝上的可观察行为发生变化 |
|
|
297
|
+
| build | `/diagnosing-bugs` | 存在真实失败且根因未知 |
|
|
298
|
+
| build | `/wizard` | Contract 需要生成人工执行的 shell 步骤;Matrix 不端到端运行 |
|
|
299
|
+
| verify | `/code-review` | 需要 Standards 与 Spec 双轴证据 |
|
|
300
|
+
|
|
301
|
+
Matrix 可以推荐但绝不嵌套以下 user-invoked handoff:`setup-matt-pocock-skills`、`improve-codebase-architecture`、`wayfinder`、`handoff`、`to-questionnaire`。它们由用户在活动阶段外显式运行,选中的结果可以再进入受治理 Change。
|
|
302
|
+
|
|
303
|
+
Arch 在 `code-review` 后记录由 Runtime 管理的审查回执,把 fixed point 与已提交的 HEAD diff 绑定到当前 Contract、审查正文和工作区。正常的 `code-review` 回执要求 Matrix 管理资产之外的候选工作区是干净的。无可用 Git 基线、已提交 diff 为空、仍存在 staged/unstaged/untracked 候选,或正确安装的 capability 真实失败时,Matrix 可为该 revision 执行一次明确标记的同能力 fallback;其中 `uncommitted-worktree` 会同时绑定 fixed point 与完整工作区候选的内容 hash。安装完整性失败不得 fallback。只有标题或自述、但没有匹配回执时,Verify 不能推进。
|
|
304
|
+
|
|
305
|
+
安装但保持 standalone 的 Skill 是 `ask-matt`、`grill-with-docs`、`triage`、`to-spec`、`to-tickets`、`grill-me`、`teach`、`wait-what`。`implement` 与 raw `resolving-merge-conflicts` 可能接管 Matrix 所有的 TDD、review、stage 或 commit 副作用,因此 0.1.5 不安装也不管理它们;已有副本会被保留并报告为未管理额外项。安装不代表自动调用;任何 companion 都不得推进、提交、归档、恢复或写 Matrix 状态。
|
|
305
306
|
|
|
306
307
|
---
|
|
307
308
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: matrix
|
|
3
|
-
description: Route, initialize, resume, and govern a persistent Matrix development workflow. Use when the user starts a feature, change, bug fix, or asks to resume managed development.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Matrix
|
|
7
|
-
|
|
8
|
-
Use Matrix as the development-workflow entrypoint. Its source of truth is the current repository's `.matrix/`; never infer a phase from chat history.
|
|
9
|
-
|
|
10
|
-
Read `artifact_language` from `node <matrix-skill-directory>/scripts/matrix-runtime.mjs inspect`. Keep required Markdown heading tokens unchanged, but write every user-facing artifact body, explanation, and handoff in that language: English for `en`, Chinese for `zh-CN`.
|
|
11
|
-
|
|
12
|
-
## Route
|
|
13
|
-
|
|
1
|
+
---
|
|
2
|
+
name: matrix
|
|
3
|
+
description: Route, initialize, resume, and govern a persistent Matrix development workflow. Use when the user starts a feature, change, bug fix, or asks to resume managed development.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Matrix
|
|
7
|
+
|
|
8
|
+
Use Matrix as the development-workflow entrypoint. Its source of truth is the current repository's `.matrix/`; never infer a phase from chat history.
|
|
9
|
+
|
|
10
|
+
Read `artifact_language` from `node <matrix-skill-directory>/scripts/matrix-runtime.mjs inspect`. Keep required Markdown heading tokens unchanged, but write every user-facing artifact body, explanation, and handoff in that language: English for `en`, Chinese for `zh-CN`.
|
|
11
|
+
|
|
12
|
+
## Route
|
|
13
|
+
|
|
14
14
|
For every workflow command, run the Runtime bundled with this project Skill so the project compatibility authority wins over a different global launcher:
|
|
15
15
|
|
|
16
16
|
```powershell
|
|
@@ -18,70 +18,71 @@ node <matrix-skill-directory>/scripts/matrix-runtime.mjs inspect
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Use the global `matrix` command for `init`, `update`, and bootstrap only. A trusted 0.1.4 launcher auto-delegates only to an exact, hash-verified 0.1.4 project Runtime. A different or unidentified project release remains authoritative but must be invoked through the exact direct command returned by the launcher. Older launchers cannot provide this cross-release check and must not be used as the project workflow entrypoint.
|
|
21
|
-
|
|
22
|
-
- If an active change exists, show its phase and frozen `orchestration`, report any Arch installation-integrity failure, and enter the returned `next_skill` only when the Runtime permits continuation.
|
|
23
|
-
- If no active change exists, classify the request: reproducible small bug → `$matrix-hotfix` with workflow `hotfix`; bounded small change with no public API/schema/architecture impact → `$matrix-tweak` with workflow `tweak`; otherwise full Matrix with workflow `full`.
|
|
24
|
-
- Do not create Matrix state for questions, read-only investigation, or requests outside software development.
|
|
25
|
-
- Before `init`, derive a short kebab-case change id and an accurate title. Start with `full` unless a shortcut clearly applies.
|
|
26
|
-
|
|
27
|
-
```powershell
|
|
28
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs init <change-id> --workflow <full|hotfix|tweak> --orchestration <prim|arch> --title "<title>"
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
An explicit mode wins; otherwise Runtime uses the project `default_orchestration`. The resolved value is immutable for the change and is shown in init, inspect, and the initialized Event. Then enter `$matrix-open`.
|
|
32
|
-
|
|
33
|
-
## Orchestration
|
|
34
|
-
|
|
35
|
-
- **Prim** uses Matrix's own capability in every phase and never requires Matt Skills.
|
|
21
|
+
|
|
22
|
+
- If an active change exists, show its phase and frozen `orchestration`, report any Arch installation-integrity failure, and enter the returned `next_skill` only when the Runtime permits continuation.
|
|
23
|
+
- If no active change exists, classify the request: reproducible small bug → `$matrix-hotfix` with workflow `hotfix`; bounded small change with no public API/schema/architecture impact → `$matrix-tweak` with workflow `tweak`; otherwise full Matrix with workflow `full`.
|
|
24
|
+
- Do not create Matrix state for questions, read-only investigation, or requests outside software development.
|
|
25
|
+
- Before `init`, derive a short kebab-case change id and an accurate title. Start with `full` unless a shortcut clearly applies.
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs init <change-id> --workflow <full|hotfix|tweak> --orchestration <prim|arch> --title "<title>"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
An explicit mode wins; otherwise Runtime uses the project `default_orchestration`. The resolved value is immutable for the change and is shown in init, inspect, and the initialized Event. Then enter `$matrix-open`.
|
|
32
|
+
|
|
33
|
+
## Orchestration
|
|
34
|
+
|
|
35
|
+
- **Prim** uses Matrix's own capability in every phase and never requires Matt Skills.
|
|
36
36
|
- **Arch** conditionally invokes the ten reviewed automatic capabilities frozen by the active Change. Matrix 0.1.4 reviews all 25 official Matt Skills v1.2.3 roles and installs only the 23 compatible Skills project-locally; `implement` and raw `resolving-merge-conflicts` are excluded.
|
|
37
|
-
|
|
38
|
-
Both orchestration modes use the same selected workflow profile. `full` uses `open → design → build → verify → archive`; `hotfix` and `tweak` share one internal `lightweight` profile, `open → build → verify → archive`, with different evidence policies. Companion Skills never write Matrix state, transition, commit, archive, or create competing workflow artifacts.
|
|
39
|
-
|
|
40
|
-
A correctly installed Arch capability that fails gets at most one Matrix-owned fallback for the same bounded capability, with failure and evidence recorded. A missing, modified, or incomplete Arch installation must be repaired with `matrix init --with-mattpocock`; never switch the active change to Prim.
|
|
41
|
-
|
|
42
|
-
## Recovery
|
|
43
|
-
|
|
44
|
-
Use Runtime commands instead of editing Matrix state:
|
|
45
|
-
|
|
46
|
-
```powershell
|
|
47
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs return design --reason design-gap
|
|
48
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs return build --reason verification-failed
|
|
49
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs return design --reason acceptance-or-design-gap
|
|
50
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs return design --reason acceptance-or-design-gap # from Archive, before terminal archive
|
|
51
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs abort --reason <requirement-cancelled|superseded|no-longer-valuable|blocked|other>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Return preserves the change but moves the current `verification.md` into revisioned evidence history, so the returned phase must produce fresh current evidence. Abort preserves the last phase and moves the terminal change into `.matrix/archive/`; it never undoes worktree changes.
|
|
55
|
-
|
|
56
|
-
If any mutation reports `WORKFLOW_RECOVERY_REQUIRED`, stop normal phase work and run the read-only diagnosis:
|
|
57
|
-
|
|
58
|
-
```powershell
|
|
59
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs doctor
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Never infer a repair target or strategy. Use only the exact command returned by doctor:
|
|
63
|
-
|
|
64
|
-
```powershell
|
|
65
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs doctor --repair --transaction <id> --strategy <continue|rollback>
|
|
66
|
-
node <matrix-skill-directory>/scripts/matrix-runtime.mjs doctor --repair --lock <id>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Optional
|
|
70
|
-
|
|
71
|
-
`$matrix-
|
|
72
|
-
Use it only when the user explicitly chooses
|
|
73
|
-
|
|
74
|
-
## Cross-Cutting Skills
|
|
75
|
-
|
|
37
|
+
|
|
38
|
+
Both orchestration modes use the same selected workflow profile. `full` uses `open → design → build → verify → archive`; `hotfix` and `tweak` share one internal `lightweight` profile, `open → build → verify → archive`, with different evidence policies. Companion Skills never write Matrix state, transition, commit, archive, or create competing workflow artifacts.
|
|
39
|
+
|
|
40
|
+
A correctly installed Arch capability that fails gets at most one Matrix-owned fallback for the same bounded capability, with failure and evidence recorded. A missing, modified, or incomplete Arch installation must be repaired with `matrix init --with-mattpocock`; never switch the active change to Prim.
|
|
41
|
+
|
|
42
|
+
## Recovery
|
|
43
|
+
|
|
44
|
+
Use Runtime commands instead of editing Matrix state:
|
|
45
|
+
|
|
46
|
+
```powershell
|
|
47
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs return design --reason design-gap
|
|
48
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs return build --reason verification-failed
|
|
49
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs return design --reason acceptance-or-design-gap
|
|
50
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs return design --reason acceptance-or-design-gap # from Archive, before terminal archive
|
|
51
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs abort --reason <requirement-cancelled|superseded|no-longer-valuable|blocked|other>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Return preserves the change but moves the current `verification.md` into revisioned evidence history, so the returned phase must produce fresh current evidence. Abort preserves the last phase and moves the terminal change into `.matrix/archive/`; it never undoes worktree changes.
|
|
55
|
+
|
|
56
|
+
If any mutation reports `WORKFLOW_RECOVERY_REQUIRED`, stop normal phase work and run the read-only diagnosis:
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs doctor
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Never infer a repair target or strategy. Use only the exact command returned by doctor:
|
|
63
|
+
|
|
64
|
+
```powershell
|
|
65
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs doctor --repair --transaction <id> --strategy <continue|rollback>
|
|
66
|
+
node <matrix-skill-directory>/scripts/matrix-runtime.mjs doctor --repair --lock <id>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Optional implementation handoff
|
|
70
|
+
|
|
71
|
+
`$matrix-handoff` is an optional sidecar command used after the approved Design -> Build transition. It exports the matching approved contract as a bounded task package for the implementation agent the user chooses (`export --agent <agent-id>`, for example Codex designing and Claude Code implementing, or zcode designing and opencode implementing). It never changes the Matrix phase, workflow, guard result, or runtime state.
|
|
72
|
+
Use it only when the user explicitly chooses a different implementation agent; never inject it into the standard path.
|
|
73
|
+
|
|
74
|
+
## Cross-Cutting Skills
|
|
75
|
+
|
|
76
76
|
Matrix never nests user-invoked Matt Skills. When relevant, explain the reason and ask the user to invoke one explicitly: `setup-matt-pocock-skills` for one-time setup, `improve-codebase-architecture` for an out-of-band scan, `wayfinder` for generating a separate large-effort candidate, `handoff` at a context boundary, or `to-questionnaire` when another person owns blocking facts. `ask-matt`, `grill-with-docs`, `triage`, `to-spec`, `to-tickets`, `grill-me`, `teach`, and `wait-what` remain standalone. Matrix does not install or manage `implement` or raw `resolving-merge-conflicts`; preserve pre-existing copies as unmanaged extras and never suggest them inside an active Change.
|
|
77
|
-
|
|
78
|
-
## Rules
|
|
79
|
-
|
|
80
|
-
- A phase can advance only through `node <matrix-skill-directory>/scripts/matrix-runtime.mjs transition`; run its guard first.
|
|
81
|
-
- A phase can move backward only through one of the documented `node <matrix-skill-directory>/scripts/matrix-runtime.mjs return` intents.
|
|
82
|
-
- Full Build approval binds proposal, design, and plan. Lightweight Build approval binds its compact proposal, requires `transition build --confirmed`, and rejects project implementation changes made after initialization but before approval.
|
|
83
|
-
- A successful Archive is always a two-step optimistic commit: run `node <matrix-skill-directory>/scripts/matrix-runtime.mjs archive --dry-run`, then pass its exact hash to `node <matrix-skill-directory>/scripts/matrix-runtime.mjs archive --expect-preflight <sha256>`. Never bypass the preflight.
|
|
84
|
-
- `node <matrix-skill-directory>/scripts/matrix-runtime.mjs doctor` is read-only. Every transaction or stale-lock repair must explicitly bind the identity reported by doctor; do not edit or delete `.matrix/transactions/` or `.matrix/workflow.lock`.
|
|
85
|
-
- Do not replace required evidence with an assertion that work is complete.
|
|
86
|
-
- Pause for user confirmation at material architecture/scope decisions and before archive/commit.
|
|
87
|
-
-
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
- A phase can advance only through `node <matrix-skill-directory>/scripts/matrix-runtime.mjs transition`; run its guard first.
|
|
81
|
+
- A phase can move backward only through one of the documented `node <matrix-skill-directory>/scripts/matrix-runtime.mjs return` intents.
|
|
82
|
+
- Full Build approval binds proposal, design, and plan. Lightweight Build approval binds its compact proposal, requires `transition build --confirmed`, and rejects project implementation changes made after initialization but before approval.
|
|
83
|
+
- A successful Archive is always a two-step optimistic commit: run `node <matrix-skill-directory>/scripts/matrix-runtime.mjs archive --dry-run`, then pass its exact hash to `node <matrix-skill-directory>/scripts/matrix-runtime.mjs archive --expect-preflight <sha256>`. Never bypass the preflight.
|
|
84
|
+
- `node <matrix-skill-directory>/scripts/matrix-runtime.mjs doctor` is read-only. Every transaction or stale-lock repair must explicitly bind the identity reported by doctor; do not edit or delete `.matrix/transactions/` or `.matrix/workflow.lock`.
|
|
85
|
+
- Do not replace required evidence with an assertion that work is complete.
|
|
86
|
+
- Pause for user confirmation at material architecture/scope decisions and before archive/commit.
|
|
87
|
+
- Before entering Build (full: after the design guard; lightweight: merged into the `transition build --confirmed` pause), present the implementation-actor choice — continue with the current agent/model, switch the model in the user's client, or switch the implementation agent via `$matrix-handoff` — and record the decision with the Contract.
|
|
88
|
+
- On shortcut scope expansion, run `node <matrix-skill-directory>/scripts/matrix-runtime.mjs return design --reason design-gap`; Runtime upgrades the change to `full`. Never silently continue the old contract.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Matrix"
|
|
3
|
-
short_description: "Route, resume, and govern development changes"
|
|
4
|
-
default_prompt: "Use $matrix to start or resume a development change."
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Matrix"
|
|
3
|
+
short_description: "Route, resume, and govern development changes"
|
|
4
|
+
default_prompt: "Use $matrix to start or resume a development change."
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Compatibility adapter for the authoritative Node workflow exporter."""
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import sys
|
|
6
|
-
|
|
7
|
-
from matrix_state import run_runtime
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if __name__ == "__main__":
|
|
11
|
-
raise SystemExit(run_runtime(sys.argv[1:]))
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Compatibility adapter for the authoritative Node workflow exporter."""
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
from matrix_state import run_runtime
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
if __name__ == "__main__":
|
|
11
|
+
raise SystemExit(run_runtime(sys.argv[1:]))
|