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

opened this

Merged 39d 9h ago, live in production

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.

Notes

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.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs