addNamingWizardRule
Add custom naming rules to automatically generate standardized file names for microservices architecture by mapping keywords to structured components like domain, action, and layer identifiers.
Instructions
π v6: Add custom rule to NAMING_WIZARD_RULES.yaml
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ruleType | Yes | Type of rule | |
| keywords | Yes | Keywords to match | |
| output | Yes | Output mapping |
Implementation Reference
- src/tools/v6-tools.js:281-292 (handler)The core handler function implementing the addNamingWizardRule tool. It accepts ruleType, keywords, and output parameters and returns a confirmation that the rule would be added to NAMING_WIZARD_RULES.yaml.export async function addNamingWizardRule({ ruleType, keywords, output }) { return { ruleType, keywords, output, status: 'Rule would be added to NAMING_WIZARD_RULES.yaml', example: { input: keywords[0], output: output } }; }
- src/index.js:394-416 (schema)Input schema definition for the addNamingWizardRule tool, specifying parameters ruleType (enum), keywords (array of strings), and output (object), all required.name: 'addNamingWizardRule', description: 'π v6: Add custom rule to NAMING_WIZARD_RULES.yaml', inputSchema: { type: 'object', properties: { ruleType: { type: 'string', description: 'Type of rule', enum: ['domainMapping', 'actionMapping', 'layerMapping', 'detailMapping'] }, keywords: { type: 'array', description: 'Keywords to match', items: { type: 'string' } }, output: { type: 'object', description: 'Output mapping' } }, required: ['ruleType', 'keywords', 'output'] } },
- src/index.js:656-657 (registration)Registration in the main tool dispatch switch statement, calling the handler with arguments.case 'addNamingWizardRule': result = await addNamingWizardRule(args);
- src/tools/index.js:818-818 (registration)Re-export of the addNamingWizardRule function from v6-tools.js for use in the main index.addNamingWizardRule,