Summary
Add ast-grep tools and skill to dora MCP server for AST-aware code search and transformation capabilities.
AST-aware search understands code structure (unlike text-based grep), enabling queries like "find async functions without error handling".
Context
- Reference implementation:
ref/oh-my-opencode/src/tools/ast-grep/
- Architecture decision:
docs/adr/0001-ast-grep-integration-architecture.md
Features to Implement
MCP Tools
ast_grep_search - AST-aware code search
ast_grep_replace - AST-aware code transformation
Language Support
- CLI: 25+ languages supported
- NAPI bindings: 5 languages (faster in-memory transforms)
- Binary auto-download from GitHub releases
- YAML rule file support
Agent/Skill
- Rule writing guidance and examples
Architecture
packages/dora/src/providers/ast-grep/
├── index.ts # AstGrepProvider
├── cli.ts # CLI wrapper
├── downloader.ts # Binary download
├── napi.ts # NAPI bindings
├── constants.ts # Config
├── types.ts # Types
└── utils.ts # Formatting
agents/ast-grep.md # Rule writing skill
Tasks
Acceptance Criteria
- All tasks completed and tested
- ast-grep provider fully functional and integrated into dora MCP server
- Documentation updated with ast-grep tool usage
- Agent skill provides helpful guidance for rule writing
Summary
Add ast-grep tools and skill to dora MCP server for AST-aware code search and transformation capabilities.
AST-aware search understands code structure (unlike text-based grep), enabling queries like "find async functions without error handling".
Context
ref/oh-my-opencode/src/tools/ast-grep/docs/adr/0001-ast-grep-integration-architecture.mdFeatures to Implement
MCP Tools
ast_grep_search- AST-aware code searchast_grep_replace- AST-aware code transformationLanguage Support
Agent/Skill
Architecture
Tasks
Acceptance Criteria