Skip to content

chore: add .grove/commands.json for grove ws exec support#55

Merged
emmax86 merged 1 commit intomainfrom
grove-commands
Mar 13, 2026
Merged

chore: add .grove/commands.json for grove ws exec support#55
emmax86 merged 1 commit intomainfrom
grove-commands

Conversation

@emmax86
Copy link
Copy Markdown
Owner

@emmax86 emmax86 commented Mar 13, 2026

Summary

Adds .grove/commands.json so the grove repo can be used with grove ws exec:

grove ws exec test:file <file>
grove ws exec test:match <pattern>
grove ws exec check

Test plan

  • grove ws exec test from anywhere in the workspace runs bun test
  • grove ws exec test:file src/__tests__/integration/hooks.test.ts runs just that file

🤖 Generated with Claude Code

Registers common commands so grove can run them via:
  grove ws exec test:file <file>
  grove ws exec test:match <pattern>
  grove ws exec check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 13, 2026 08:41
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 13, 2026

Claude finished @emmax86's task in 1m 6s —— View job


Code Review

  • Gather context
  • Read changed file
  • Review commands format and conventions
  • Post findings

Summary

This PR adds .grove/commands.json so the grove repo itself can be used with grove ws exec. The change is a single 8-line JSON file.

File: .grove/commands.json

{
  "setup": ["bun", "install"],
  "format": ["bun", "run", "format"],
  "test": ["bun", "test"],
  "test:file": ["bun", "test", "{file}"],
  "test:match": ["bun", "test", "--test-name-pattern", "{match}"],
  "check": "bun run format:check && bun run typecheck"
}

Findings

No blocking issues. The file is correct and well-formed.

Observations:

  • All keys are valid StandardCommand values as defined in src/lib/commands.ts:7.
  • setup, format, test, test:file, and test:match all use the array form — correct, since array form supports {file} / {match} placeholder substitution.
  • check intentionally uses the string form to leverage shell && chaining (bun run format:check && bun run typecheck). This is the documented approach in src/lib/commands.ts:72-75 and both referenced scripts (format:check, typecheck) exist in package.json.
  • The {file} and {match} placeholders in test:file and test:match are handled correctly by resolveCommand() — they get substituted or dropped cleanly if not provided.

Minor nit (non-blocking):

  • test:file could use ["bun", "test", "--", "{file}"] to guard against filenames starting with -, but in practice test file paths won't trigger this, so it's not worth the added noise.

Verdict

Approved — clean, minimal, correct. No changes needed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a repository-level .grove/commands.json so this repo can be driven via grove ws exec standard commands (including test:file, test:match, and check which aren’t auto-detected from ecosystem signals).

Changes:

  • Introduces .grove/commands.json mapping standard Grove commands to Bun-based invocations.
  • Adds support for targeted test execution via {file} and {match} placeholders.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@emmax86 emmax86 merged commit 05621d9 into main Mar 13, 2026
8 checks passed
@emmax86 emmax86 deleted the grove-commands branch March 13, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants