@rosenfan/matrix 0.1.2 → 0.1.3
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/.claude/skills/matrix/SKILL.md +58 -56
- package/.claude/skills/matrix/scripts/matrix_claude.py +11 -11
- package/.claude/skills/matrix/scripts/matrix_state.py +60 -60
- package/.claude/skills/matrix-archive/SKILL.md +27 -24
- package/.claude/skills/matrix-build/SKILL.md +26 -24
- package/.claude/skills/matrix-claude/SKILL.md +11 -9
- package/.claude/skills/matrix-design/SKILL.md +31 -27
- package/.claude/skills/matrix-hotfix/SKILL.md +1 -1
- package/.claude/skills/matrix-open/SKILL.md +29 -19
- package/.claude/skills/matrix-status/SKILL.md +5 -5
- package/.claude/skills/matrix-tweak/SKILL.md +1 -1
- package/.claude/skills/matrix-verify/SKILL.md +23 -21
- package/README.md +123 -97
- package/README.zh-CN.md +122 -96
- package/assets/skills-zh-CN/matrix/SKILL.md +78 -75
- package/assets/skills-zh-CN/matrix-archive/SKILL.md +31 -28
- package/assets/skills-zh-CN/matrix-build/SKILL.md +37 -35
- package/assets/skills-zh-CN/matrix-claude/SKILL.md +31 -29
- package/assets/skills-zh-CN/matrix-design/SKILL.md +10 -6
- package/assets/skills-zh-CN/matrix-hotfix/SKILL.md +1 -1
- package/assets/skills-zh-CN/matrix-open/SKILL.md +19 -9
- package/assets/skills-zh-CN/matrix-status/SKILL.md +5 -5
- package/assets/skills-zh-CN/matrix-tweak/SKILL.md +1 -1
- package/assets/skills-zh-CN/matrix-verify/SKILL.md +17 -15
- package/package.json +2 -2
- package/src/catalog.js +16 -16
- package/src/cli.js +81 -28
- package/src/distribution.js +154 -123
- package/src/messages.js +4 -4
- package/src/self-update.js +81 -0
- package/src/ui.js +1 -1
- package/src/workflow-transaction.js +622 -622
- package/src/workflow.js +652 -420
|
@@ -8,8 +8,8 @@ description: Inspect the active Matrix workflow and report its disk-backed phase
|
|
|
8
8
|
Run the same Matrix state kernel used by the main entry and every phase Skill:
|
|
9
9
|
|
|
10
10
|
```powershell
|
|
11
|
-
matrix workflow inspect
|
|
12
|
-
matrix workflow doctor
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Report the returned change id, workflow, frozen `orchestration`, phase, guard result, `next_skill`, Workflow health, unfinished transactions, available strategies, and exact recovery commands. If Arch integrity fails, identify the affected platform/Skill facts and report `matrix init --with-mattpocock`; do not reinterpret the change as Prim. Both commands are read-only. Do not infer status from conversation history, run `--repair`, or modify state. If the guard is failing, name the missing evidence and direct the user to the current phase Skill.
|
|
11
|
+
matrix workflow inspect
|
|
12
|
+
matrix workflow doctor
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Report the returned change id, workflow, `profile`, `evidence_policy`, frozen `orchestration`, phase, guard result, `next_skill`, Workflow health, unfinished transactions, available strategies, and exact recovery commands. If Arch integrity fails, identify the affected platform/Skill facts and report `matrix init --with-mattpocock`; do not reinterpret the change as Prim. Both commands are read-only. Do not infer status from conversation history, run `--repair`, or modify state. If the guard is failing, name the missing evidence and direct the user to the current phase Skill.
|
|
@@ -5,4 +5,4 @@ description: Run a lightweight Matrix workflow for a bounded small development c
|
|
|
5
5
|
|
|
6
6
|
# Matrix Tweak
|
|
7
7
|
|
|
8
|
-
Start through `$matrix` with workflow `tweak
|
|
8
|
+
Start through `$matrix` with workflow `tweak`. It uses the shared lightweight lifecycle `open → build → verify → archive`; there is no separate tweak state machine or Design phase. Before editing implementation, define current/preserved behavior, the diff boundary, acceptance, and validation in the compact proposal, present it, and wait for confirmation. Build and Verify must prove scope and diff alignment. Use controlled Return to upgrade to full when the change crosses module, API, schema, or architecture boundaries.
|
|
@@ -3,9 +3,11 @@ name: matrix-verify
|
|
|
3
3
|
description: Verify the active Matrix change against its plan and review its diff. Use when the active Matrix phase is verify.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Matrix Verify
|
|
7
|
-
|
|
8
|
-
Run the
|
|
6
|
+
# Matrix Verify
|
|
7
|
+
|
|
8
|
+
Run the approved Contract's acceptance commands and record their output summaries under `## Test evidence` in `artifacts/verification.md`.
|
|
9
|
+
|
|
10
|
+
Write verification prose in `artifact_language` from inspect while preserving the required English evidence headings.
|
|
9
11
|
|
|
10
12
|
## Input Sources
|
|
11
13
|
|
|
@@ -27,34 +29,34 @@ Before starting verification, ensure:
|
|
|
27
29
|
|
|
28
30
|
If these are missing (e.g., Claude Code didn't produce complete evidence), return to `$matrix-build` or ask Claude Code to补充.
|
|
29
31
|
|
|
30
|
-
## Orchestration
|
|
31
|
-
|
|
32
|
-
Run `matrix workflow inspect` and read the frozen mode.
|
|
33
|
-
|
|
34
|
-
- **Prim**: Matrix performs the Standards and Spec review itself.
|
|
35
|
-
- **Arch**: invoke `code-review` to produce both review axes; announce the invocation and reason.
|
|
36
|
-
|
|
37
|
-
Review findings are inputs to Matrix Verify; a companion cannot decide the phase outcome, broaden approved architecture, transition, or archive. Do not invoke post-review architecture wrappers. A correctly installed review capability gets at most one same-capability Matrix fallback; installation-integrity failure stops verification.
|
|
32
|
+
## Orchestration
|
|
33
|
+
|
|
34
|
+
Run `matrix workflow inspect` and read the frozen mode.
|
|
35
|
+
|
|
36
|
+
- **Prim**: Matrix performs the Standards and Spec review itself.
|
|
37
|
+
- **Arch**: invoke `code-review` to produce both review axes; announce the invocation and reason.
|
|
38
|
+
|
|
39
|
+
Review findings are inputs to Matrix Verify; a companion cannot decide the phase outcome, broaden approved architecture, transition, or archive. Do not invoke post-review architecture wrappers. A correctly installed review capability gets at most one same-capability Matrix fallback; installation-integrity failure stops verification.
|
|
38
40
|
|
|
39
41
|
## Failure Handling
|
|
40
42
|
|
|
41
|
-
If verification or review fails:
|
|
42
|
-
- If the issue is in the implementation, run `matrix workflow return build --reason verification-failed`, then enter `$matrix-build` or ask Claude Code to fix.
|
|
43
|
-
- If the issue is in the acceptance criteria or design, run `matrix workflow return design --reason acceptance-or-design-gap`, then enter `$matrix-design`.
|
|
44
|
-
|
|
45
|
-
Both Return paths rotate the current `verification.md` into revisioned evidence history. Do not copy stale conclusions back into the new current evidence.
|
|
43
|
+
If verification or review fails:
|
|
44
|
+
- If the issue is in the implementation, run `matrix workflow return build --reason verification-failed`, then enter `$matrix-build` or ask Claude Code to fix.
|
|
45
|
+
- If the issue is in the acceptance criteria or design, run `matrix workflow return design --reason acceptance-or-design-gap`, then enter `$matrix-design`.
|
|
46
|
+
|
|
47
|
+
Both Return paths rotate the current `verification.md` into revisioned evidence history. Do not copy stale conclusions back into the new current evidence.
|
|
46
48
|
|
|
47
49
|
If documents or public behavior changed, record the required synchronization work before the guard.
|
|
48
50
|
|
|
49
51
|
## Process
|
|
50
52
|
|
|
51
53
|
1. Check that `artifacts/verification.md` exists with `## Build evidence`
|
|
52
|
-
2. Run the
|
|
54
|
+
2. Run the approved validation commands (full plan or lightweight proposal)
|
|
53
55
|
3. Record test output under `## Test evidence`
|
|
54
|
-
4. Produce both Standards and Spec review axes through the selected orchestration mode
|
|
56
|
+
4. Produce both Standards and Spec review axes through the selected orchestration mode
|
|
55
57
|
6. Record findings under `## Review evidence`
|
|
56
|
-
7. Run the guard
|
|
57
|
-
8. If it passes, transition to archive and enter `$matrix-archive`
|
|
58
|
+
7. Run the guard
|
|
59
|
+
8. If it passes, transition to archive and enter `$matrix-archive`
|
|
58
60
|
|
|
59
61
|
```powershell
|
|
60
62
|
matrix workflow guard verify
|
|
@@ -68,4 +70,4 @@ The guard checks for:
|
|
|
68
70
|
1. **Test evidence** — Output from running the plan's validation commands
|
|
69
71
|
2. **Review evidence** — Findings from the two-axis code review
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
Full requires Test and Review evidence. Hotfix additionally requires `## Regression evidence`; tweak additionally requires `## Scope review evidence`.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Matrix Workflow
|
|
2
2
|
|
|
3
|
-
An evidence-driven development workflow with Prim and Arch orchestration, inspired by [Comet](https://github.com/rpamis/comet). Matrix can work with its own capabilities or conditionally invoke a verified cohort of [Matt Pocock's agent skills](https://github.com/mattpocock/skills) without giving up lifecycle ownership.
|
|
3
|
+
An evidence-driven development workflow with Prim and Arch orchestration, inspired by [Comet](https://github.com/rpamis/comet). Matrix can work with its own capabilities or conditionally invoke a verified cohort of [Matt Pocock's agent skills](https://github.com/mattpocock/skills) without giving up lifecycle ownership.
|
|
4
4
|
|
|
5
5
|
English | **[中文](./README.zh-CN.md)**
|
|
6
6
|
|
|
@@ -27,38 +27,39 @@ English | **[中文](./README.zh-CN.md)**
|
|
|
27
27
|
|
|
28
28
|
## Why Matrix
|
|
29
29
|
|
|
30
|
-
[Matt Pocock's skills](https://github.com/mattpocock/skills) provide focused capabilities such as `/grilling`, `/tdd`, and `/code-review`. Using independent tools without a lifecycle owner leads to common problems:
|
|
30
|
+
[Matt Pocock's skills](https://github.com/mattpocock/skills) provide focused capabilities such as `/grilling`, `/tdd`, and `/code-review`. Using independent tools without a lifecycle owner leads to common problems:
|
|
31
31
|
|
|
32
32
|
- **No process memory**: You grill, then implement, but there's no record of what was decided
|
|
33
33
|
- **Phase confusion**: Did we finish design? Are we in build? Hard to tell after context loss
|
|
34
34
|
- **Silent scope creep**: Requirements change mid-build without returning to design
|
|
35
35
|
- **Missing evidence**: "Looks done" without verification proof
|
|
36
36
|
|
|
37
|
-
Matrix solves this with one deterministic state machine, explicit phases, guard conditions, and artifact tracking — inspired by [Comet](https://github.com/rpamis/comet)'s phase-based approach. Skills can assist a phase, but Matrix always owns the lifecycle.
|
|
37
|
+
Matrix solves this with one deterministic state machine, explicit phases, guard conditions, and artifact tracking — inspired by [Comet](https://github.com/rpamis/comet)'s phase-based approach. Skills can assist a phase, but Matrix always owns the lifecycle.
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
41
|
## What It Does
|
|
42
42
|
|
|
43
|
-
Matrix provides two capability-orchestration modes over
|
|
43
|
+
Matrix provides two capability-orchestration modes over two centrally defined workflow profiles:
|
|
44
44
|
|
|
45
45
|
```
|
|
46
|
-
open → design → build → verify → archive
|
|
46
|
+
full: open → design → build → verify → archive
|
|
47
|
+
hotfix/tweak lightweight: open ─────────→ build → verify → archive
|
|
47
48
|
|
|
48
49
|
Prim: Matrix performs phase work itself
|
|
49
50
|
Arch: Matrix invokes verified atomic Skills only when task facts trigger them
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Recovery paths are controlled Runtime intents:
|
|
53
|
-
|
|
54
|
-
```text
|
|
55
|
-
build --design-gap--------------------> design
|
|
56
|
-
verify --verification-failed-----------> build
|
|
57
|
-
verify --acceptance-or-design-gap------> design
|
|
58
|
-
any active phase --abort--------------> aborted
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Each phase:
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Recovery paths are controlled Runtime intents:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
build --design-gap--------------------> design
|
|
57
|
+
verify --verification-failed-----------> build
|
|
58
|
+
verify --acceptance-or-design-gap------> design
|
|
59
|
+
any active phase --abort--------------> aborted
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Each phase:
|
|
62
63
|
- Has specific deliverables (artifacts)
|
|
63
64
|
- Has guard conditions that must pass
|
|
64
65
|
- Logs all transitions
|
|
@@ -68,9 +69,10 @@ Each phase:
|
|
|
68
69
|
|
|
69
70
|
## Prerequisites
|
|
70
71
|
|
|
71
|
-
- [Claude Code](https://docs.anthropic.com/claude-code) and/or Codex installed
|
|
72
|
-
- Node.js 18+ (for the
|
|
73
|
-
- Python is optional during the compatibility window; new installations
|
|
72
|
+
- [Claude Code](https://docs.anthropic.com/claude-code) and/or Codex installed as the Skill host
|
|
73
|
+
- Node.js 18+ and `npm` on `PATH` (for the Matrix CLI)
|
|
74
|
+
- Python is optional during the compatibility window; new installations use the bundled Node workflow runtime.
|
|
75
|
+
- Git is only needed when installing from GitHub or contributing to Matrix.
|
|
74
76
|
|
|
75
77
|
---
|
|
76
78
|
|
|
@@ -89,31 +91,48 @@ cd /path/to/your/project
|
|
|
89
91
|
matrix init
|
|
90
92
|
```
|
|
91
93
|
|
|
92
|
-
The interactive setup lets you:
|
|
94
|
+
The interactive setup lets you:
|
|
93
95
|
|
|
94
96
|
- Choose English or Chinese, project or global scope, and Claude Code, Codex, or both
|
|
95
97
|
- Copy skills (recommended) or symlink them for local development
|
|
96
|
-
- Safely
|
|
97
|
-
- Install Matt Pocock's companion skills in the same flow
|
|
98
|
-
- Choose **Prim** or **Arch** as the project default without disabling the other available mode
|
|
98
|
+
- Safely reconfigure an existing installation with an automatic backup
|
|
99
|
+
- Install Matt Pocock's companion skills in the same flow
|
|
100
|
+
- Choose **Prim** or **Arch** as the project default without disabling the other available mode
|
|
99
101
|
|
|
100
|
-
For automation and CI:
|
|
102
|
+
For automation and CI:
|
|
101
103
|
|
|
102
104
|
```bash
|
|
103
105
|
# Safe non-interactive installation for both verified platforms
|
|
104
|
-
matrix init --yes --platform claude-code --platform codex --with-mattpocock
|
|
105
|
-
|
|
106
|
-
# Explicitly select the project default
|
|
107
|
-
matrix init --yes --with-mattpocock --default-orchestration arch
|
|
106
|
+
matrix init --yes --platform claude-code --platform codex --with-mattpocock
|
|
107
|
+
|
|
108
|
+
# Explicitly select the project default
|
|
109
|
+
matrix init --yes --with-mattpocock --default-orchestration arch
|
|
108
110
|
|
|
109
111
|
# Preview exactly what would change (including backups) without writing
|
|
110
112
|
matrix init --platform codex --dry-run --json
|
|
111
113
|
|
|
112
|
-
# Inspect Matrix ownership, Matt Skills inheritance, and the selected platform
|
|
113
|
-
matrix doctor --platform codex
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
# Inspect Matrix ownership, Matt Skills inheritance, and the selected platform
|
|
115
|
+
matrix doctor --platform codex
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Update an initialized project:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Check for a newer Matrix CLI, confirm the plan, then refresh this project's installed assets
|
|
122
|
+
matrix update
|
|
123
|
+
|
|
124
|
+
# Offline or local-development refresh: skip the npm registry and use the current CLI package
|
|
125
|
+
matrix update --skip-self-update
|
|
126
|
+
|
|
127
|
+
# Non-interactive update after CI has explicitly authorized writes
|
|
128
|
+
matrix update --yes
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
`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 project assets. npm and project assets are separate transactions: if asset refresh fails after a CLI upgrade, run `matrix update --skip-self-update` to retry. Use `matrix init` to change installation choices, and `matrix doctor` for read-only diagnosis.
|
|
132
|
+
|
|
133
|
+
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.
|
|
134
|
+
|
|
135
|
+
To install directly from GitHub instead of npm:
|
|
117
136
|
|
|
118
137
|
```bash
|
|
119
138
|
npm install --global github:Rosenfan/Matrix
|
|
@@ -121,10 +140,10 @@ npm install --global github:Rosenfan/Matrix
|
|
|
121
140
|
|
|
122
141
|
Matrix installs:
|
|
123
142
|
- `matrix/` — Entry point and state management
|
|
124
|
-
- `matrix-open/` — Open phase and canonical proposal
|
|
125
|
-
- `matrix-design/` — Design, plan, and Contract approval
|
|
126
|
-
- `matrix-build/` — Bounded implementation and build evidence
|
|
127
|
-
- `matrix-verify/` — Test and two-axis review evidence
|
|
143
|
+
- `matrix-open/` — Open phase and canonical proposal
|
|
144
|
+
- `matrix-design/` — Design, plan, and Contract approval
|
|
145
|
+
- `matrix-build/` — Bounded implementation and build evidence
|
|
146
|
+
- `matrix-verify/` — Test and two-axis review evidence
|
|
128
147
|
- `matrix-archive/` — Archive phase
|
|
129
148
|
- `matrix-hotfix/` — Shortcut for small bugs
|
|
130
149
|
- `matrix-tweak/` — Shortcut for bounded changes
|
|
@@ -142,9 +161,9 @@ $matrix I want to add user authentication
|
|
|
142
161
|
```
|
|
143
162
|
|
|
144
163
|
Matrix will:
|
|
145
|
-
1. Initialize a change with workflow type `full` and frozen orchestration `prim|arch`
|
|
146
|
-
2. Enter `open`; Prim works directly, while Arch invokes only proven requirement triggers
|
|
147
|
-
3. Create `proposal.md` with Goal, Scope, Non-goals, Acceptance, Risks
|
|
164
|
+
1. Initialize a change with workflow type `full` and frozen orchestration `prim|arch`
|
|
165
|
+
2. Enter `open`; Prim works directly, while Arch invokes only proven requirement triggers
|
|
166
|
+
3. Create `proposal.md` with Goal, Scope, Non-goals, Acceptance, Risks
|
|
148
167
|
4. Guard check: are all sections substantive?
|
|
149
168
|
5. If pass → transition to `design`
|
|
150
169
|
|
|
@@ -152,13 +171,13 @@ Matrix will:
|
|
|
152
171
|
|
|
153
172
|
## Workflow Phases
|
|
154
173
|
|
|
155
|
-
| Phase | Arch capabilities (triggered, not a fixed sequence) | Deliverables | Guard Condition |
|
|
156
|
-
|-------|------------------------------------------------------|--------------|-----------------|
|
|
157
|
-
| **open** | `/grilling`, `/domain-modeling` | `proposal.md`; optional repository-standard context/ADR evidence | Goal, Scope, Non-goals, Acceptance, Risks present |
|
|
158
|
-
| **design** | `/domain-modeling`, `/research`, `/wayfinder`, `/prototype`, `/codebase-design` | `design.md`, `plan.md` | Decisions, Test seams, Steps documented |
|
|
159
|
-
| **build** | `/tdd`, `/diagnosing-bugs`, `/resolving-merge-conflicts` | Code, `verification.md` | Exact approved Contract matches; build evidence recorded |
|
|
160
|
-
| **verify** | `/code-review` | Test & review evidence | Test and review evidence present |
|
|
161
|
-
| **archive** | None; Matrix-owned in both modes | Archive record | Verify guard passed |
|
|
174
|
+
| Phase | Arch capabilities (triggered, not a fixed sequence) | Deliverables | Guard Condition |
|
|
175
|
+
|-------|------------------------------------------------------|--------------|-----------------|
|
|
176
|
+
| **open** | `/grilling`, `/domain-modeling` | `proposal.md`; optional repository-standard context/ADR evidence | Goal, Scope, Non-goals, Acceptance, Risks present |
|
|
177
|
+
| **design** | `/domain-modeling`, `/research`, `/wayfinder`, `/prototype`, `/codebase-design` | `design.md`, `plan.md` | Decisions, Test seams, Steps documented |
|
|
178
|
+
| **build** | `/tdd`, `/diagnosing-bugs`, `/resolving-merge-conflicts` | Code, `verification.md` | Exact approved Contract matches; build evidence recorded |
|
|
179
|
+
| **verify** | `/code-review` | Test & review evidence | Test and review evidence present |
|
|
180
|
+
| **archive** | None; Matrix-owned in both modes | Archive record | Verify guard passed |
|
|
162
181
|
|
|
163
182
|
---
|
|
164
183
|
|
|
@@ -173,44 +192,49 @@ State is stored in `.matrix/`:
|
|
|
173
192
|
├── changes/
|
|
174
193
|
│ └── <change-id>/
|
|
175
194
|
│ ├── matrix.yaml # Canonical workflow, orchestration, phase, status, revision
|
|
195
|
+
│ ├── workspace-baseline.json # Lightweight implementation-order boundary
|
|
176
196
|
│ ├── events.jsonl
|
|
177
|
-
│ └── artifacts/
|
|
178
|
-
│ ├── proposal.md
|
|
179
|
-
│ ├── design.md
|
|
180
|
-
│ ├── plan.md
|
|
181
|
-
│ ├── verification.md
|
|
182
|
-
│ └── evidence-history/
|
|
183
|
-
└── archive/
|
|
184
|
-
```
|
|
197
|
+
│ └── artifacts/
|
|
198
|
+
│ ├── proposal.md
|
|
199
|
+
│ ├── design.md
|
|
200
|
+
│ ├── plan.md
|
|
201
|
+
│ ├── verification.md
|
|
202
|
+
│ └── evidence-history/
|
|
203
|
+
└── archive/
|
|
204
|
+
```
|
|
185
205
|
|
|
186
206
|
The state machine enforces transitions:
|
|
187
207
|
|
|
188
208
|
```bash
|
|
189
|
-
# Check guard
|
|
190
|
-
matrix workflow guard open
|
|
191
|
-
|
|
209
|
+
# Check guard
|
|
210
|
+
matrix workflow guard open
|
|
211
|
+
|
|
192
212
|
# Advance (only if guard passes)
|
|
193
213
|
matrix workflow transition design
|
|
194
214
|
|
|
195
|
-
#
|
|
196
|
-
matrix workflow
|
|
215
|
+
# Lightweight: approve the compact proposal and enter Build
|
|
216
|
+
matrix workflow transition build --confirmed
|
|
197
217
|
|
|
198
|
-
#
|
|
199
|
-
matrix workflow
|
|
200
|
-
|
|
201
|
-
#
|
|
202
|
-
matrix workflow
|
|
218
|
+
# Return from verification failure; stale evidence is retained in history
|
|
219
|
+
matrix workflow return build --reason verification-failed
|
|
220
|
+
|
|
221
|
+
# Abort without deleting artifacts or undoing worktree changes
|
|
222
|
+
matrix workflow abort --reason requirement-cancelled
|
|
223
|
+
|
|
224
|
+
# Final Archive is a mandatory two-step optimistic commit
|
|
225
|
+
matrix workflow archive --dry-run
|
|
203
226
|
matrix workflow archive --expect-preflight <sha256-returned-by-dry-run>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
matrix workflow doctor --repair --
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
227
|
+
# hotfix/tweak commit command additionally carries --confirmed
|
|
228
|
+
|
|
229
|
+
# Diagnose an interrupted Workflow without writing
|
|
230
|
+
matrix workflow doctor
|
|
231
|
+
|
|
232
|
+
# Repair only the exact transaction or stale lock reported by doctor
|
|
233
|
+
matrix workflow doctor --repair --transaction <id> --strategy <continue|rollback>
|
|
234
|
+
matrix workflow doctor --repair --lock <id>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
`matrix.yaml` is the only canonical workflow/orchestration/phase/status/revision record, using `matrix/change/v2`. Full approval binds the exact bytes of proposal/design/plan. Lightweight approval binds the compact proposal, requires explicit confirmation, and compares the project with its initialization baseline so implementation cannot precede approval. Contract drift blocks later phases. Final Archive uses a read-only dry-run and hash-bound commit; shortcut workflows additionally require explicit confirmation. Multi-file mutations remain protected by durable journals.
|
|
214
238
|
|
|
215
239
|
---
|
|
216
240
|
|
|
@@ -220,8 +244,10 @@ matrix workflow doctor --repair --lock <id>
|
|
|
220
244
|
|------|-------------|--------|
|
|
221
245
|
| **full** | New features, architecture changes | All 5 phases |
|
|
222
246
|
| **hotfix** | Reproducible small bugs | Simplified: open → build → verify → archive |
|
|
223
|
-
| **tweak** | Bounded changes, no API/schema impact | Simplified: open → build → verify → archive |
|
|
224
|
-
|
|
247
|
+
| **tweak** | Bounded changes, no API/schema impact | Simplified: open → build → verify → archive |
|
|
248
|
+
|
|
249
|
+
Hotfix and tweak reference the same internal `lightweight` transition profile. They differ only in routing and evidence: hotfix requires reproduction/root-cause/regression evidence; tweak requires behavior-boundary, diff, and scope-review evidence.
|
|
250
|
+
|
|
225
251
|
---
|
|
226
252
|
|
|
227
253
|
## Special Feature: matrix-claude
|
|
@@ -252,30 +278,30 @@ The sidecar does NOT change Matrix state. It's a pure export — like taking a s
|
|
|
252
278
|
|
|
253
279
|
---
|
|
254
280
|
|
|
255
|
-
## Integration with Matt Pocock's Skills
|
|
256
|
-
|
|
257
|
-
Prim uses Matrix's own capability. Arch uses one initialization-verified cohort of ten atomic capabilities:
|
|
258
|
-
|
|
259
|
-
| Phase | Capability | Trigger |
|
|
260
|
-
|---|---|---|
|
|
261
|
-
| open | `/grilling` | Material ambiguity or explicit stress-test request |
|
|
262
|
-
| open/design | `/domain-modeling` | Unclear vocabulary, invariants, or architectural decisions |
|
|
263
|
-
| design | `/research` | Required external facts are unavailable in the repository |
|
|
264
|
-
| design | `/wayfinder` | Module ownership or dependency seams are unknown |
|
|
265
|
-
| design | `/prototype` | A material design question needs disposable evidence |
|
|
266
|
-
| design | `/codebase-design` | A deep-module, interface, or test-seam decision remains |
|
|
267
|
-
| build | `/tdd` | Observable behavior changes at a testable seam |
|
|
268
|
-
| build | `/diagnosing-bugs` | An actual failure exists and root cause is unknown |
|
|
269
|
-
| build | `/resolving-merge-conflicts` | A merge or rebase conflict is in progress |
|
|
270
|
-
| verify | `/code-review` | Standards and Spec review evidence is required |
|
|
271
|
-
|
|
272
|
-
`grill-with-docs`, `implement`, and `improve-codebase-architecture` are not Matrix-managed or automatically invoked. Existing user-installed copies are preserved as unmanaged extras. A companion never transitions, commits, archives, or writes Matrix state.
|
|
281
|
+
## Integration with Matt Pocock's Skills
|
|
282
|
+
|
|
283
|
+
Prim uses Matrix's own capability. Arch uses one initialization-verified cohort of ten atomic capabilities:
|
|
284
|
+
|
|
285
|
+
| Phase | Capability | Trigger |
|
|
286
|
+
|---|---|---|
|
|
287
|
+
| open | `/grilling` | Material ambiguity or explicit stress-test request |
|
|
288
|
+
| open/design | `/domain-modeling` | Unclear vocabulary, invariants, or architectural decisions |
|
|
289
|
+
| design | `/research` | Required external facts are unavailable in the repository |
|
|
290
|
+
| design | `/wayfinder` | Module ownership or dependency seams are unknown |
|
|
291
|
+
| design | `/prototype` | A material design question needs disposable evidence |
|
|
292
|
+
| design | `/codebase-design` | A deep-module, interface, or test-seam decision remains |
|
|
293
|
+
| build | `/tdd` | Observable behavior changes at a testable seam |
|
|
294
|
+
| build | `/diagnosing-bugs` | An actual failure exists and root cause is unknown |
|
|
295
|
+
| build | `/resolving-merge-conflicts` | A merge or rebase conflict is in progress |
|
|
296
|
+
| verify | `/code-review` | Standards and Spec review evidence is required |
|
|
297
|
+
|
|
298
|
+
`grill-with-docs`, `implement`, and `improve-codebase-architecture` are not Matrix-managed or automatically invoked. Existing user-installed copies are preserved as unmanaged extras. A companion never transitions, commits, archives, or writes Matrix state.
|
|
273
299
|
|
|
274
300
|
---
|
|
275
301
|
|
|
276
302
|
**Key difference**: Matt Pocock's skills are individual tools. Matrix adds:
|
|
277
303
|
- **State persistence**: Survives context loss
|
|
278
|
-
- **Phase enforcement**:
|
|
304
|
+
- **Phase enforcement**: Full cannot skip Design; lightweight cannot edit implementation before its confirmed Open Contract
|
|
279
305
|
- **Evidence requirements**: Guards check for artifacts, not assertions
|
|
280
306
|
- **Transition logging**: Full audit trail of phase changes
|
|
281
307
|
|