software-design
v0.1.3SOLID/OOP/DRY, the 23 GoF patterns, pattern scaffolding, and heuristic code-smell detection.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_catalog List design principles & patterns
List the catalog of software-design concepts, optionally filtered by kind. Returns each concept's slug, name, category, and one-line summary.
| Parameter | Type | Description |
|---|---|---|
kind | string | Filter by kind. "principle" = all principles; "solid"/"oop" narrow to the SOLID five / the four OOP pillars; "pattern" = all GoF patterns. Default "all". |
explain_concept Explain a principle or pattern
Return an authoritative explanation of one design principle or GoF pattern: intent, when to use it, trade-offs, participants, and related concepts. Accepts a slug, full name, or alias (e.g. "SRP", "factory").
| Parameter | Type | Description |
|---|---|---|
name * | string | Concept to explain, e.g. "open-closed", "SRP", "observer". |
scaffold_pattern Scaffold a GoF pattern
Generate a language-agnostic pseudo-code skeleton for a GoF pattern, showing its participants and how they collaborate. Optionally rename roles to your domain (e.g. Product -> Notification). Translate the result into your target language.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Pattern slug/name/alias, e.g. "observer", "factory-method". |
names | object | Optional role→name map, e.g. {"Product":"Notification","Creator":"Dispatcher"}. |
check_smells Detect code smells (heuristic)
Scan a code snippet for heuristic design smells (long method, large class, long parameter list, deep nesting, duplication, large file). Each finding maps to the principle it hints at plus a suggested refactor. HEURISTICS ONLY — hints, never verdicts; a clean run does not certify good design.
| Parameter | Type | Description |
|---|---|---|
code * | string | The source snippet to analyze (one file's worth). |
dupThreshold | integer | Duplicate-line count (default 3). |
largeClassMethods | integer | Max methods per class (default 12). |
longMethod | integer | Max method lines (default 40). |
maxDepth | integer | Max nesting depth (default 4). |
maxFileLines | integer | Max file lines (default 400). |
maxParams | integer | Max parameters (default 4). |