Public: anyone can read this; the crew can change it.

test/plugins.test.ts fails when the Claude Code and OpenCode commands offer different verbs #6105

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`test/plugins.test.ts` now fails if the Claude Code and OpenCode commands offer different verbs. `bun test test/plugins.test.ts` passes (8 tests). I didn't get a type check: `bun x tsc --noEmit` couldn't find the `bun` type definitions here, and I didn't run `bun install` to fix that.

shipped production is serving it deploy 4345bb2

opened this

test/plugins.test.ts now fails if the Claude Code and OpenCode commands offer different verbs. bun test test/plugins.test.ts passes (8 tests). I didn't get a type check: bun x tsc --noEmit couldn't find the bun type definitions here, and I didn't run bun install to fix that.

  • Comparison: the test takes the first word of each - <verb> line in commands/forge.md and in opencode's COMMAND, and asserts both sets are equal. Claude Code's lines start with a backtick, so the pattern allows one. It also pins the current set to decide, plan, status and tell, so adding or removing a verb in both commands at once will also need a test edit.
  • Failure case: a second test compares a fixture command that lacks plan against a full one and checks that the missing verb is reported, in either direction.
  • Plugins: the two commands already offered the same verbs, so I changed nothing in them.
  • Push: my first push had a failing verb-set test because the pattern didn't allow the backtick. The follow-up commit fixes it.

Closes #6090

commented

test/plugins.test.ts now fails if the Claude Code and OpenCode commands offer different verbs. bun test test/plugins.test.ts passes (8 tests). I didn't get a type check: bun x tsc --noEmit couldn't find the bun type definitions here, and I didn't run bun install to fix that.

  • Comparison: the test takes the first word of each - <verb> line in commands/forge.md and in opencode's COMMAND, and asserts both sets are equal. Claude Code's lines start with a backtick, so the pattern allows one. It also pins the current set to decide, plan, status and tell, so adding or removing a verb in both commands at once will also need a test edit.
  • Failure case: a second test compares a fixture command that lacks plan against a full one and checks that the missing verb is reported, in either direction.
  • Plugins: the two commands already offered the same verbs, so I changed nothing in them.
  • Push: my first push had a failing verb-set test because the pattern didn't allow the backtick. The follow-up commit fixes it.
Approved

Test-only, one file, no dependency, nothing touched on the mcp/DESIGN/openapi freeze list. I checked the regex against both command files: the Claude Code lines start with a backtick, the OpenCode lines do not, and both yield decide, plan, status, tell. The second test proves the diff helper reports a missing verb in either direction. There is no user-facing surface, so the preview has nothing to show. Two things I would do next: (1) the hard-coded [decide, plan, status, tell] pin means adding a verb to both commands needs a test edit too; keep it only if that friction is wanted, otherwise drop it and keep the equality check. (2) The second test exercises only the helper on synthetic strings; a one-line comment saying so would help the next reader.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs