Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
repository: mattpocock/skills
ref: 49dd158d1076134a641b33efb035946536778336
ref: 4ae2317ddb22b046e26455e4f9c9b3aaaf62212d
path: .upstream/mattpocock-skills
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ in [Harness adapter reference](./docs/harness-adapters.md):
- **Shared root:** Codex, OpenCode, pi, Grok, and Cursor all read
`~/.agents/skills/`, so updating any of them refreshes the shared copy.
- **Claude Code:** Gets its own copy without frontmatter `name` (Claude names
skills by directory; OpenCode ignores nameless copies).
skills by directory; OpenCode 1 skips nameless copies, and OpenCode 2 prefers
`~/.agents/skills/`).
- **Antigravity:** Keeps its own canonical copy under
`~/.gemini/antigravity-cli/skills/` because it does not scan
`~/.agents/skills/` at user scope.
Expand Down Expand Up @@ -260,14 +261,22 @@ strict tool allowlists):
npm run smoke-harnesses -- --harness all --require-installed
```

| Harness | Reviewed stable | Verification |
| Harness | Reviewed stable (2026-11-12) | Verification |
| --- | --- | --- |
| Codex CLI | [0.166.0](https://github.com/openai/codex/releases/tag/rust-v0.166.0) | npm metadata, local version, `exec --help` |
| Claude Code | [2.1.314](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md) | npm metadata, local version, `--help` |
| OpenCode | [1.19.5](https://github.com/anomalyco/opencode/releases/tag/v1.19.5) | npm metadata, release notes, `run --help` |
| pi | [1.4.0](https://github.com/earendil-works/pi/releases/tag/v1.4.0) | `@earendil-works/pi-coding-agent` metadata, `--help` |
| Antigravity | [1.4.11](https://antigravity-cli-auto-updater-974169037036.us-central1.run.app/manifests/windows_amd64.json) | Official manifest, binary SHA512, `--help` |
| Grok Build | 1.0.70 | Local version, `--help`, `grok update --check --json` |
| Codex CLI | [0.167.2](https://github.com/openai/codex/releases/tag/rust-v0.167.2) | npm metadata and release, `exec --help` from the npm package |
| Claude Code | [2.1.322](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md) | npm metadata, local version, `--help` |
| OpenCode 2 | [2.2.7](https://github.com/anomalyco/opencode/releases/tag/v2.2.7) | npm metadata, local version, `run --help`, live `run --agent plan`, `recall` list/read, `api skill.list` |
| OpenCode 1 | [1.19.5](https://github.com/anomalyco/opencode/releases/tag/v1.19.5) | npm metadata and release, live `run --agent plan`, `recall` list/read from the npm package |
| pi | [1.5.2](https://github.com/earendil-works/pi/releases/tag/v1.5.2) | `@earendil-works/pi-coding-agent` metadata and release, `--help` |
| Antigravity | [1.5.6](https://antigravity-cli-auto-updater-974169037036.us-central1.run.app/manifests/windows_amd64.json) | Official manifest, binary SHA512, downloaded binary version, `--help` |
| Grok Build | 1.0.77 | `grok update --check --json`; `--help` from local 1.0.70 |

OpenCode 2 (`@opencode/cli`) removed `run --pure`, so `profiles/harnesses.json`
runs `opencode run` without it (leaving OpenCode 1 external plugins enabled) and
`recall` selects OpenCode 1 vs 2 commands by major version. The `opencode-ai`
package remains on the 1.19 line, so both majors are supported. See
[Harness adapter reference](./docs/harness-adapters.md) for versioned discovery
details.

## Repository layout and maintenance

Expand Down
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ SOFTWARE.
The following skills are adapted from
[`mattpocock/skills`](https://github.com/mattpocock/skills), pinned during the
port at commit
[`49dd158d1076134a641b33efb035946536778336`](https://github.com/mattpocock/skills/commit/49dd158d1076134a641b33efb035946536778336):
[`4ae2317ddb22b046e26455e4f9c9b3aaaf62212d`](https://github.com/mattpocock/skills/commit/4ae2317ddb22b046e26455e4f9c9b3aaaf62212d):

- `writing-for-agents`
- `codebase-design`
Expand Down
33 changes: 20 additions & 13 deletions docs/harness-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
This page records the vendor rules that shape mstack's adapters. The links point
to the official documentation used for each entry.

On 2026-10-30, release metadata and CLI help were checked against the
[reviewed harness versions](../README.md#reviewed-harness-versions). The runtime
arguments in `profiles/harnesses.json` remain supported. That review did not
repeat live prompts or skill discovery. The behavior observations below keep
their original tested versions.
On 2026-11-12, release metadata and CLI help were checked against the
[reviewed harness versions](../README.md#smoke-test-and-reviewed-harness-versions). OpenCode 2
rejects `--pure`, so its runtime arguments dropped that flag (on OpenCode 1,
`opencode run` now loads configured plugins instead of disabling them); the
other runtime arguments in `profiles/harnesses.json` remain supported. Live
prompts and skill discovery were repeated only for OpenCode. The other behavior
observations below keep their original tested versions.

## Skill locations and frontmatter

Expand Down Expand Up @@ -76,19 +78,23 @@ the `name` field and a file named `SKILL.md`, which the canonical skills already
satisfy, so `adapters/antigravity.json` and `adapters/grok.json` are empty. Grok
also scans `~/.claude/skills/`; skills with the same name collapse to one entry.
Claude output omits frontmatter `name`; Claude's documented fallback
uses the directory name, so `/meta-mode` keeps its name. OpenCode requires an
uses the directory name, so `/meta-mode` keeps its name. OpenCode 1 requires an
explicit name before registration and skips the Claude copy. This behavior
was checked with OpenCode 1.19.3 using a named Claude control skill and an
unnamed Claude copy alongside the canonical shared skill. Claude Code 2.1.267
unnamed Claude copy alongside the canonical shared skill. OpenCode 2 falls back
to the directory name, so it also reads the unnamed Claude copy, but it keys
skills by directory name and loads `.agents` roots after `.claude` roots. With
OpenCode 2.2.7, `opencode api skill.list` returned one entry per mstack skill,
each from `~/.agents/skills/`, while `~/.claude/skills/` held the unnamed copies.
Claude Code 2.1.267
also returned the directory-derived command name during an isolated
stream-JSON initialization without a user prompt or model request. Recheck this adapter
if OpenCode adds a directory-name fallback for external skills.
stream-JSON initialization without a user prompt or model request.

pi keeps the first same-name skill and reports a collision for later
independent copies. This was observed with pi 0.85.1, and the pi 1.3.0 skills
documentation states the same rule. A stale native pi copy can therefore hide a shared update.
The installer migration removes recognized redundant copies from discovery;
see [migration instructions](../README.md#migrate-an-existing-installation).
see [migration instructions](../README.md#migration-custom-targets-and-ssh).
It also keeps backups outside skill roots so recursive scanners do not load
archived versions. Project wrappers use their separate generator and are not
migrated by the user-level installer.
Expand All @@ -104,9 +110,10 @@ skills from different places and enforce different frontmatter rules:
| Claude Code plugin | `.claude-plugin/marketplace.json`, `.claude-plugin/plugin.json`, default `skills/`, `agents/`, and `hooks/hooks.json` | `name` is kept, skills are namespaced `/mstack:<skill>` |
| Desktop chat, Cowork, claude.ai | Zip per skill from `npm run pack-claude-skills` | Only `name`, `description`, `license`, `compatibility`, `metadata`, `allowed-tools`; `name` is required |

The installer's Claude adapter drops `name` so OpenCode, which scans
`~/.claude/skills/`, skips that copy. Plugin loading and uploads read the
canonical files, which keep `name`. Because uploads reject unknown keys, the
The installer's Claude adapter drops `name` so OpenCode 1, which scans
`~/.claude/skills/`, skips that copy (OpenCode 2 falls back to the directory
name and overrides it with `~/.agents/skills/`). Plugin loading and uploads read
the canonical files, which keep `name`. Because uploads reject unknown keys, the
canonical frontmatter must stay inside the upload field set; the packer test and
`npm run pack-claude-skills -- --check` enforce this, along with the description
and archive limits. Claude-only invocation fields such as `user-invocable` and
Expand Down
30 changes: 30 additions & 0 deletions docs/upstream-sync-matt-4ae2317.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Upstream sync to mattpocock/skills 4ae2317

The mattpocock/skills pin moves from `49dd158` to
[`4ae2317`](https://github.com/mattpocock/skills/commit/4ae2317ddb22b046e26455e4f9c9b3aaaf62212d).
One commit between the pins touches the three adapted skills:
[`7739eae`](https://github.com/mattpocock/skills/commit/7739eaed7f8f3915437a8def198a6d0d7206dbc7),
"Start subagents with a fresh context window, not a fork".

## Ported

- `codebase-design` starts each design-alternative subagent with a fresh
context window instead of a fork of the current conversation. Upstream notes
that some Harnesses, Codex among them, fork by default, and a fork carries the
parent context the subagent is meant to escape.

## Not ported

- The same sentence in upstream skills that mstack does not adapt
(`implement-spec`, `code-review`, `improve-codebase-architecture`, `wayfinder`,
`research`, `grilling`, `chief-of-staff`).
- Upstream's repository rule in `CLAUDE.md`. mstack's subagent briefs live in
pstack-derived skills, which follow pstack rather than this upstream.

`diagnosing-bugs` and `writing-for-agents` have no upstream change between the
pins.

## Verification

`skill-baseline --check` passes against both pinned sources. The repository
tests do not show that a model follows the changed instruction.
2 changes: 1 addition & 1 deletion profiles/harnesses.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"suffix": ["skills"],
"runtime": {
"command": "opencode",
"headlessArgs": ["run", "--pure"],
"headlessArgs": ["run"],
"modelArgs": ["--model", "{model}"],
"readOnlyArgs": ["--agent", "plan"]
}
Expand Down
10 changes: 5 additions & 5 deletions profiles/skill-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": 1,
"sources": {
"pstack": "0b46ec399d55f2829e88822998f53b84944837d3",
"mattpocock/skills": "49dd158d1076134a641b33efb035946536778336"
"mattpocock/skills": "4ae2317ddb22b046e26455e4f9c9b3aaaf62212d"
},
"files": {
"skills/architect/SKILL.md": {
Expand Down Expand Up @@ -51,8 +51,8 @@
"skills/codebase-design/references/design-alternatives.md": {
"upstream": "mattpocock/skills",
"source": "skills/engineering/codebase-design/DESIGN-IT-TWICE.md",
"sourceDigest": "52b52e75655a27aea59c6966b410bac82448968ad46ef1ebb9f07c274e3ae010",
"targetDigest": "fe64a751fc7e1a5399126886b1c0832b484364cfeaa7929d1c8e77b6a49eb208",
"sourceDigest": "c222ab5a82e0405672eb9062d62496139a08828e45d07fc5f18e4952c10fac1a",
"targetDigest": "ff896de577b462ff28a3152e154788e1a8d922426f951444ec1b0dd5723b1f3b",
"reason": "The adapted design comparison workflow lives under references."
},
"skills/codebase-design/SKILL.md": {
Expand Down Expand Up @@ -506,7 +506,7 @@
"skills/recall/references/history-sources.md": {
"upstream": null,
"reason": "Local portability guidance or implementation; review alongside its owning skill.",
"targetDigest": "181e7a56f8ef5514a1cae4841366bf62c708fd44be8bcee3c129c50182e0b3bc"
"targetDigest": "b95748234ef2196269ffba0638a439a6fee225420eca23da57923f04a3546922"
},
"skills/recall/references/hosts/t3code.md": {
"upstream": null,
Expand All @@ -516,7 +516,7 @@
"skills/recall/scripts/history.mjs": {
"upstream": null,
"reason": "Local portability guidance or implementation; review alongside its owning skill.",
"targetDigest": "fe3284380308ecd0cf232072c7bc8e59c0f56ffecc42851d1fddb2c382ab2683"
"targetDigest": "c3fb58b7816bb58acb5c134ebeaa2fe40a4716b936977221c8f2b42910c7da47"
},
"skills/recall/SKILL.md": {
"upstream": "pstack",
Expand Down
2 changes: 1 addition & 1 deletion profiles/upstreams.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,6 @@
},
"mattpocock/skills": {
"repository": "https://github.com/mattpocock/skills",
"commit": "49dd158d1076134a641b33efb035946536778336"
"commit": "4ae2317ddb22b046e26455e4f9c9b3aaaf62212d"
}
}
2 changes: 1 addition & 1 deletion scripts/context.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ test("run-role resolves a configured model override", () => {
assert.equal(result.status, 0, result.stderr);
const plan = JSON.parse(result.stdout);
assert.equal(plan.model, "remote-model");
assert.deepEqual(plan.args, ["run", "--pure", "--model", "remote-model", "inspect the repository"]);
assert.deepEqual(plan.args, ["run", "--model", "remote-model", "inspect the repository"]);
} finally {
rmSync(root, { recursive: true, force: true });
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/environment.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ test("OpenCode read-only plans select the built-in plan agent", () => {
], { cwd: resolve("."), encoding: "utf8" });
assert.equal(result.status, 0, result.stderr);
const plan = JSON.parse(result.stdout);
assert.deepEqual(plan.args, ["run", "--pure", "inspect the repository", "--agent", "plan"]);
assert.deepEqual(plan.args, ["run", "inspect the repository", "--agent", "plan"]);
});

test("SSH invocation rejects an unsafe host before spawning", () => {
Expand Down
42 changes: 39 additions & 3 deletions scripts/history.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ test("pi default storage uses only the requested workspace slug and keeps branch
assert.deepEqual(result.warnings, []);
});

test("OpenCode filters list metadata before exporting one sanitized session", async (t) => {
test("OpenCode 1 filters list metadata before exporting one sanitized session", async (t) => {
const { root, workspace } = fixture(t);
const calls = [];
const runOpenCode = (args, cwd) => {
Expand All @@ -132,7 +132,7 @@ test("OpenCode filters list metadata before exporting one sanitized session", as
];
return { info: { id: "wanted", directory: "[redacted:session-directory:wanted]" }, messages: [{ info: { role: "assistant" }, parts: [{ type: "text", text: "Sanitized answer" }, { type: "tool", text: "Do not emit" }] }] };
};
const options = { harness: "opencode", workspace, runOpenCode, env: {} };
const options = { harness: "opencode", workspace, runOpenCode, openCodeMajor: () => 1, env: {} };
const listing = await history({ ...options, command: "list" });
assert.deepEqual(listing.sessions.map((session) => session.id), ["wanted"]);
assert.equal(calls.length, 1);
Expand All @@ -148,6 +148,42 @@ test("OpenCode filters list metadata before exporting one sanitized session", as
}
});

test("OpenCode 2 uses session export and reads its message schema", async (t) => {
const { root, workspace } = fixture(t);
const calls = [];
const runOpenCode = (args, cwd) => {
calls.push({ args, cwd });
if (args[1] === "list") return [
{ id: "other", directory: join(root, "other"), updated: Date.now() },
{ id: "wanted", directory: workspace, updated: Date.now() },
];
return { info: { id: "wanted", location: { directory: "/[redacted:session-directory:wanted]" } }, messages: [
{ type: "user", text: "Sanitized prompt" },
{ type: "assistant", content: [{ type: "reasoning", text: "Do not emit" }, { type: "text", text: "Sanitized answer" }] },
{ type: "compaction", status: "completed", summary: "Earlier work" },
{ type: "shell", command: "Do not emit" },
] };
};
const options = { harness: "opencode", workspace, runOpenCode, openCodeMajor: () => 2, env: {} };
const listing = await history({ ...options, command: "list" });
assert.deepEqual(calls.at(-1).args, ["session", "list", "--format", "json"]);
assert.deepEqual(listing.sessions.map((session) => session.id), ["wanted"]);
const reading = await history({ ...options, command: "read", session: "wanted" });
assert.deepEqual(calls.at(-1), { args: ["session", "export", "wanted", "--sanitize"], cwd: workspace });
assert.deepEqual(reading.messages, [
{ role: "user", text: "Sanitized prompt" },
{ role: "assistant", text: "Sanitized answer" },
{ role: "summary", text: "Earlier work" },
]);
await history({ ...options, command: "read", session: "wanted", localText: true });
assert.deepEqual(calls.at(-1).args, ["session", "export", "wanted"]);
for (const directory of [join(root, "other"), "/[redacted:session-directory:other]"]) {
const wrongExport = (args, cwd) => args[1] === "list" ? runOpenCode(args, cwd)
: { info: { id: "wanted", location: { directory } }, messages: [] };
await assert.rejects(history({ ...options, runOpenCode: wrongExport, command: "read", session: "wanted" }), /does not match/);
}
});

test("missing stores and malformed records produce controlled diagnostics without raw content", async (t) => {
const { root, workspace } = fixture(t);
const options = { harness: "codex", workspace, root: join(root, "missing"), command: "list", env: {} };
Expand All @@ -170,7 +206,7 @@ test("OpenCode warns when sanitizer removes text and requires an explicit local-
const runOpenCode = (args) => args[0] === "session" ? [{ id: "session", directory: workspace, updated: Date.now() }]
: { info: { id: "session", directory: args.includes("--sanitize") ? "[redacted:session-directory:session]" : workspace },
messages: [{ info: { role: "user" }, parts: [{ type: "text", text: args.includes("--sanitize") ? "[redacted:text:part]" : "Local fixture prompt" }] }] };
const options = { harness: "opencode", workspace, runOpenCode, command: "read", session: "session" };
const options = { harness: "opencode", workspace, runOpenCode, openCodeMajor: () => 1, command: "read", session: "session" };
const sanitized = await history(options);
assert.equal(sanitized.sanitized, true);
assert.match(sanitized.warnings[0], /redacted message text/);
Expand Down
2 changes: 1 addition & 1 deletion skills/codebase-design/references/design-alternatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Show this to the user, then immediately proceed to Step 2. The user reads and th

### 2. Spawn sub-agents

Use the active Harness's native delegation to assign three independent candidates, within its available concurrency. Each must produce a **radically different** interface for the deepened module. If delegation is unavailable, run separate design passes with these same briefs and disclose that they share one agent's context. Keep the passes read-only; design alternatives do not need to edit a shared checkout.
Use the active Harness's native delegation to assign three independent candidates, within its available concurrency. Start each one with a fresh context window rather than a fork of this conversation; some Harnesses fork by default, and a fork carries over the context the candidate exists to escape. Each must produce a **radically different** interface for the deepened module. If delegation is unavailable, run separate design passes with these same briefs and disclose that they share one agent's context. Keep the passes read-only; design alternatives do not need to edit a shared checkout.

Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [Deepening](deepening.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:

Expand Down
Loading
Loading