get_development_rules
Retrieve universal development rules and best practices for Modus Web Components to ensure consistent implementation and adherence to design system guidelines.
Instructions
Get universal development rules and best practices for Modus Web Components.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:733-757 (handler)The handler function that executes the get_development_rules tool. It retrieves the universal development rules from the loaded setup documents and returns them as tool content, or an error if not found.private async getDevelopmentRules(): Promise<any> { const universalGuide = this.setup.find( (s) => s.setupType === "universal" || s.filename.includes("universal") ); if (!universalGuide) { return { content: [ { type: "text", text: "Universal development rules not found. Please run: node download-docs.js", }, ], }; } return { content: [ { type: "text", text: universalGuide.content, }, ], }; }
- src/index.ts:335-336 (registration)The switch case in the main CallToolRequestSchema handler that dispatches to the specific getDevelopmentRules method.case "get_development_rules": return await this.getDevelopmentRules();
- src/index.ts:285-293 (registration)Registration of the get_development_rules tool in the ListToolsRequestSchema response, defining its name, description, and input schema (no parameters required).{ name: "get_development_rules", description: "Get universal development rules and best practices for Modus Web Components.", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:288-292 (schema)The input schema for the get_development_rules tool, which requires no parameters."Get universal development rules and best practices for Modus Web Components.", inputSchema: { type: "object", properties: {}, },
- src/index.ts:135-160 (helper)Helper function that loads the setup guide markdown files, including the universal_rules.md which provides data for get_development_rules.private loadSetup(): void { if (!existsSync(this.setupPath)) { console.error(`Setup directory not found at: ${this.setupPath}`); console.error("Please run: node download-docs.js"); return; } const files = readdirSync(this.setupPath).filter((f) => f.endsWith(".md")); for (const file of files) { const content = readFileSync(join(this.setupPath, file), "utf-8"); let setupType = file.replace(".md", "").replace("setup_", ""); // Map filenames to more user-friendly types if (setupType === "universal_rules") setupType = "universal"; if (setupType === "theme_usage") setupType = "theme"; this.setup.push({ filename: file, setupType, content, }); } console.error(`Loaded ${this.setup.length} setup guide files`); }