detect_patterns
Maps architectural patterns in a project directory and identifies refactoring candidates such as base classes, traits, or interfaces based on similarity thresholds.
Instructions
Maps project architectural patterns (MVC, Repository, etc.) and suggests refactoring candidates (Base Class, Trait, Interface).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dirPath": "<dirPath>"
},
"name": "detect_patterns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dirPath | Yes | The absolute path to the project directory. | |
| minSimilarity | No | Minimum similarity score (0-1) to suggest abstraction. Default: 0.8 | |
| focus | No | Optional focus area. | |
| includePath | No | Optional glob patterns to include. | |
| excludePath | No | Optional glob patterns to exclude. |