Skip to content

Add workspace grep tool#307

Merged
chubes4 merged 2 commits into
mainfrom
fix/workspace-grep
May 9, 2026
Merged

Add workspace grep tool#307
chubes4 merged 2 commits into
mainfrom
fix/workspace-grep

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 9, 2026

Summary

  • Adds a read-only workspace_grep tool / datamachine/workspace-grep ability for searching workspace files by regex with optional path, include glob, result cap, and context lines.
  • Implements local filesystem search for primary/worktree handles and GitHub API-backed search for remote registered primary/worktree handles, including pending remote worktree edits.
  • Fixes remote primary reads to avoid passing an empty ref so preloaded primary handles can read/search default-branch content before worktree creation.

Fixes #306.

Tests

  • php -l inc/Abilities/WorkspaceAbilities.php && php -l inc/Cli/Commands/WorkspaceCommand.php && php -l inc/Tools/WorkspaceTools.php && php -l inc/Workspace/RemoteWorkspaceBackend.php && php -l inc/Workspace/WorkspaceReader.php && php -l tests/smoke-remote-workspace-backend.php && php -l tests/smoke-workspace-grep.php
  • php tests/smoke-workspace-grep.php && php tests/smoke-remote-workspace-backend.php
  • git diff --check origin/main...HEAD
  • homeboy lint data-machine-code --path /Users/chubes/Developer/data-machine-code@fix-workspace-grep --changed-since origin/main failed with existing PHPCS findings in changed files (96 findings after grep-specific cleanup), including pre-existing alignment warnings around WorkspaceAbilities.php cleanup schemas and WorkspaceCommand.php cleanup rendering.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Implemented the workspace grep ability/tool/backend changes and smoke tests; Chris remains responsible for review and validation.

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.

Add workspace grep/search for remote workspaces

1 participant