sonance-brand-mcp 1.3.102 → 1.3.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1519,18 +1519,44 @@ function buildPhase2DesignPrompt(problems: DesignProblem[]): string {
|
|
|
1519
1519
|
return ''; // No problems identified, skip design protocol
|
|
1520
1520
|
}
|
|
1521
1521
|
|
|
1522
|
-
// Create a
|
|
1523
|
-
const problemsList = problems.map(p =>
|
|
1522
|
+
// Create a structured list with code hints to guide the LLM
|
|
1523
|
+
const problemsList = problems.map((p, i) => {
|
|
1524
|
+
const hint = p.codeHint ? `\n → Look for: ${p.codeHint}` : '';
|
|
1525
|
+
return `${i + 1}. [${p.severity.toUpperCase()}] ${p.description}${hint}`;
|
|
1526
|
+
}).join('\n\n');
|
|
1524
1527
|
|
|
1525
1528
|
return `
|
|
1526
1529
|
═══════════════════════════════════════════════════════════════════════════════
|
|
1527
|
-
DESIGN ISSUES TO FIX
|
|
1530
|
+
DESIGN ISSUES TO FIX (${problems.length} problems identified)
|
|
1528
1531
|
═══════════════════════════════════════════════════════════════════════════════
|
|
1529
1532
|
|
|
1530
|
-
These visual issues were identified:
|
|
1531
1533
|
${problemsList}
|
|
1532
1534
|
|
|
1533
|
-
|
|
1535
|
+
BEFORE GENERATING PATCHES, analyze each problem:
|
|
1536
|
+
|
|
1537
|
+
For EACH problem, determine:
|
|
1538
|
+
1. What is the current DOM structure for this element?
|
|
1539
|
+
2. Can this be fixed by adjusting className values (spacing, alignment, colors)?
|
|
1540
|
+
3. Or does the DOM structure itself prevent the fix?
|
|
1541
|
+
|
|
1542
|
+
DECISION RULES:
|
|
1543
|
+
- If a problem is about SPACING: adjust margin/padding classes (mt-X, mb-X, gap-X, p-X)
|
|
1544
|
+
- If a problem is about ALIGNMENT: adjust flex/grid alignment classes (items-center, justify-between)
|
|
1545
|
+
- If a problem is about HIERARCHY: adjust font-size, font-weight, or color classes
|
|
1546
|
+
- If a problem is about GROUPING: check if elements are in the same container first
|
|
1547
|
+
→ If yes: adjust gap/spacing classes
|
|
1548
|
+
→ If no: consider minimal restructuring
|
|
1549
|
+
|
|
1550
|
+
ONLY restructure elements when:
|
|
1551
|
+
- Elements are in separate containers that prevent proper grouping
|
|
1552
|
+
- The current container type (div, flex, grid) fundamentally can't achieve the layout
|
|
1553
|
+
|
|
1554
|
+
PREFER the minimal change. A good designer makes surgical fixes, not rewrites.
|
|
1555
|
+
|
|
1556
|
+
YOUR TASK: Generate AT LEAST ONE PATCH for EACH problem listed above.
|
|
1557
|
+
Expected minimum patches: ${problems.length}
|
|
1558
|
+
|
|
1559
|
+
Use the "Look for" hints to find the relevant code in the file.
|
|
1534
1560
|
|
|
1535
1561
|
⚠️ CRITICAL - EXACT CODE MATCHING:
|
|
1536
1562
|
Your "search" string MUST be copied CHARACTER-FOR-CHARACTER from the file.
|
|
@@ -1545,11 +1571,14 @@ DO NOT:
|
|
|
1545
1571
|
- Add or remove classes/attributes
|
|
1546
1572
|
- Invent code that "should" exist
|
|
1547
1573
|
- Guess at the structure
|
|
1574
|
+
- Restructure when a className change would work
|
|
1548
1575
|
|
|
1549
1576
|
DO:
|
|
1550
1577
|
- Copy the exact text from the numbered lines
|
|
1551
1578
|
- Make small, targeted changes in the "replace" field
|
|
1552
1579
|
- Keep patches focused on one change each
|
|
1580
|
+
- Generate one patch per problem minimum
|
|
1581
|
+
- Prefer adjusting existing classes over moving elements
|
|
1553
1582
|
`;
|
|
1554
1583
|
}
|
|
1555
1584
|
|
|
@@ -1515,18 +1515,44 @@ function buildPhase2DesignPrompt(problems: DesignProblem[]): string {
|
|
|
1515
1515
|
return ''; // No problems identified, skip design protocol
|
|
1516
1516
|
}
|
|
1517
1517
|
|
|
1518
|
-
// Create a
|
|
1519
|
-
const problemsList = problems.map(p =>
|
|
1518
|
+
// Create a structured list with code hints to guide the LLM
|
|
1519
|
+
const problemsList = problems.map((p, i) => {
|
|
1520
|
+
const hint = p.codeHint ? `\n → Look for: ${p.codeHint}` : '';
|
|
1521
|
+
return `${i + 1}. [${p.severity.toUpperCase()}] ${p.description}${hint}`;
|
|
1522
|
+
}).join('\n\n');
|
|
1520
1523
|
|
|
1521
1524
|
return `
|
|
1522
1525
|
═══════════════════════════════════════════════════════════════════════════════
|
|
1523
|
-
DESIGN ISSUES TO FIX
|
|
1526
|
+
DESIGN ISSUES TO FIX (${problems.length} problems identified)
|
|
1524
1527
|
═══════════════════════════════════════════════════════════════════════════════
|
|
1525
1528
|
|
|
1526
|
-
These visual issues were identified:
|
|
1527
1529
|
${problemsList}
|
|
1528
1530
|
|
|
1529
|
-
|
|
1531
|
+
BEFORE GENERATING PATCHES, analyze each problem:
|
|
1532
|
+
|
|
1533
|
+
For EACH problem, determine:
|
|
1534
|
+
1. What is the current DOM structure for this element?
|
|
1535
|
+
2. Can this be fixed by adjusting className values (spacing, alignment, colors)?
|
|
1536
|
+
3. Or does the DOM structure itself prevent the fix?
|
|
1537
|
+
|
|
1538
|
+
DECISION RULES:
|
|
1539
|
+
- If a problem is about SPACING: adjust margin/padding classes (mt-X, mb-X, gap-X, p-X)
|
|
1540
|
+
- If a problem is about ALIGNMENT: adjust flex/grid alignment classes (items-center, justify-between)
|
|
1541
|
+
- If a problem is about HIERARCHY: adjust font-size, font-weight, or color classes
|
|
1542
|
+
- If a problem is about GROUPING: check if elements are in the same container first
|
|
1543
|
+
→ If yes: adjust gap/spacing classes
|
|
1544
|
+
→ If no: consider minimal restructuring
|
|
1545
|
+
|
|
1546
|
+
ONLY restructure elements when:
|
|
1547
|
+
- Elements are in separate containers that prevent proper grouping
|
|
1548
|
+
- The current container type (div, flex, grid) fundamentally can't achieve the layout
|
|
1549
|
+
|
|
1550
|
+
PREFER the minimal change. A good designer makes surgical fixes, not rewrites.
|
|
1551
|
+
|
|
1552
|
+
YOUR TASK: Generate AT LEAST ONE PATCH for EACH problem listed above.
|
|
1553
|
+
Expected minimum patches: ${problems.length}
|
|
1554
|
+
|
|
1555
|
+
Use the "Look for" hints to find the relevant code in the file.
|
|
1530
1556
|
|
|
1531
1557
|
⚠️ CRITICAL - EXACT CODE MATCHING:
|
|
1532
1558
|
Your "search" string MUST be copied CHARACTER-FOR-CHARACTER from the file.
|
|
@@ -1541,11 +1567,14 @@ DO NOT:
|
|
|
1541
1567
|
- Add or remove classes/attributes
|
|
1542
1568
|
- Invent code that "should" exist
|
|
1543
1569
|
- Guess at the structure
|
|
1570
|
+
- Restructure when a className change would work
|
|
1544
1571
|
|
|
1545
1572
|
DO:
|
|
1546
1573
|
- Copy the exact text from the numbered lines
|
|
1547
1574
|
- Make small, targeted changes in the "replace" field
|
|
1548
1575
|
- Keep patches focused on one change each
|
|
1576
|
+
- Generate one patch per problem minimum
|
|
1577
|
+
- Prefer adjusting existing classes over moving elements
|
|
1549
1578
|
`;
|
|
1550
1579
|
}
|
|
1551
1580
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonance-brand-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.104",
|
|
4
4
|
"description": "MCP Server for Sonance Brand Guidelines and Component Library - gives Claude instant access to brand colors, typography, and UI components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|