Skip to content

Phase 2: New developer tools — grep, search, code analysis #4

@chubes4

Description

@chubes4

Summary

Phase 2 expands Data Machine Code beyond the extracted functionality with new developer-oriented tools that don't exist yet in core. These are the tools that make DM Code a real coding agent extension.

New Tools

Code Search

  • grep tool — search file contents across workspace repos using regex
  • find / glob tool — find files by name/pattern across repos
  • ripgrep wrapper — fast content search with context lines
  • Search results as structured data (file, line, match, context)

Code Analysis

  • Language detection per file/repo
  • Line count / file stats tool
  • Diff summary tool — summarize changes between refs
  • Branch comparison tool

Enhanced Git Operations

  • git checkout — create/switch branches
  • git stash — stash/pop/list stashed changes
  • git merge — merge branches (with conflict detection)
  • git rebase — rebase onto target branch
  • git cherry-pick — pick specific commits
  • PR creation via GitHub API (not just issues)
  • PR review/approve/request-changes via API

File Operations

  • Bulk file read (multiple files in one call)
  • File search-and-replace across multiple files
  • Tree view — full directory tree with depth control
  • File permissions/ownership info

Design Principles

  • All new tools register via datamachine_tools filter
  • All new abilities register via Abilities API
  • CLI commands under wp datamachine-code
  • Read-only tools exposed via REST, mutating tools CLI/agent-only
  • Security: path containment, allowlists, audit logging

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions