add custom rules system and multi-language keyword support - #125
Merged
Conversation
- Enable users to add custom rules, agents, and skills via .codingbuddy/ folder:
- CustomService: discovers and parses .codingbuddy/{rules,agents,skills}/
- RulesService integration: merges custom rules with built-in rules
- MCP tools: include source field ('custom' | 'default') in responses
- Validation: agents validated against AgentProfile schema
close #124
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add custom rules system and multi-language keyword support
📋 Summary
This PR adds two major features:
.codingbuddy/folder that codingbuddy auto-discovers and merges with built-in rules🎯 Reason for Change
Custom Rules System
.codingbuddy/folder structure with custom content that is automatically discovered and merged with defaultsMulti-language Keyword Support
🔧 Key Changes
1. Custom Rules System Implementation
CustomService (
apps/mcp-server/src/custom/).codingbuddy/folder contents.codingbuddy/folder in project rootrules/,agents/,skills/custom.service.ts- Core service implementationcustom.service.spec.ts- Comprehensive test coverage (+150 lines)custom.types.ts- Type definitionscustom.module.ts- NestJS moduleRulesService Integration
searchRules(): Now searches both custom and default rulessourcefield to SearchResult to distinguish custom vs defaultgetAgent(): Returns agent withsource: 'default'fieldapps/mcp-server/src/rules/rules.service.tsType System
apps/mcp-server/src/custom/custom.types.ts2. Multi-language Keyword Support
Keyword Types (
apps/mcp-server/src/keyword/keyword.types.ts)Keyword Service (
apps/mcp-server/src/keyword/keyword.service.ts)Adapter Rule Files Updated
.antigravity/rules/instructions.md.claude/rules/custom-instructions.md.codex/rules/system-prompt.md.cursor/rules/imports.mdc.kiro/rules/guidelines.md.q/rules/customizations.mdMCP Service Updates
apps/mcp-server/src/mcp/mcp.service.ts3. Comprehensive Test Coverage
Custom Service Tests
apps/mcp-server/src/custom/custom.service.spec.ts(+150 lines)Keyword Service Tests
apps/mcp-server/src/keyword/keyword.service.spec.ts(+210 lines)Rules Service Tests
apps/mcp-server/src/rules/rules.service.spec.ts(+154 lines)MCP Service Tests
apps/mcp-server/src/mcp/mcp.service.spec.ts(+169 lines)4. Documentation
Implementation Plan
docs/plans/2026-01-01-custom-rules.md(+693 lines)None
✅ Testing
Custom Rules System
1. Create Custom Rules
2. Verify Custom Rules Discovery
3. Verify Search Results
Multi-language Keyword Support
1. Test Korean Keywords
2. Test Japanese Keywords
3. Test Chinese Keywords
4. Test Spanish Keywords
🔍 Review Checklist
Custom Rules System
.codingbuddy/foldersourcefield is correctly set for custom and default rulesMulti-language Keyword Support
💡 Usage Examples
Custom Rules System
Create Custom Rule
Create Custom Agent
Use Custom Rules
Multi-language Keywords
Korean User
Japanese User
Chinese User
Spanish User
🎯 Expected Impact
Custom Rules System
Multi-language Keyword Support