sdd-es 2.0.0 → 2.6.0
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.
- package/.claude/settings.json +29 -29
- package/.claude/settings.local.json +10 -0
- package/.claude-plugin/marketplace.json +10 -7
- package/.claude-plugin/plugin.json +59 -37
- package/.gitignore +20 -0
- package/.mcp.json +8 -0
- package/LICENSE +21 -0
- package/README.md +77 -40
- package/agents/architecture-designer.md +211 -0
- package/agents/arquitecto.md +16 -1
- package/agents/asesor-datos.md +15 -1
- package/agents/critico.md +37 -1
- package/agents/desarrollador-backend.md +3 -1
- package/agents/desarrollador-frontend.md +11 -16
- package/agents/disenador-api.md +13 -1
- package/agents/documentador.md +3 -1
- package/agents/investigador.md +3 -1
- package/agents/operaciones.md +3 -1
- package/agents/product-designer.md +268 -0
- package/agents/revisor.md +25 -1
- package/agents/seguridad.md +5 -1
- package/agents/tester.md +3 -1
- package/claude-hooks/agent-memory.js +288 -0
- package/claude-hooks/pre-tool-guard.js +61 -9
- package/cli/index.js +1 -2
- package/commands/sdd.adr.md +196 -0
- package/commands/sdd.analizar.md +23 -2
- package/commands/sdd.ayuda.md +13 -0
- package/commands/sdd.compliance.md +521 -0
- package/commands/sdd.configurar.md +34 -1
- package/commands/sdd.constitucion.md +198 -23
- package/commands/sdd.construir.md +210 -0
- package/commands/sdd.crear-mcp.md +2 -0
- package/commands/sdd.defect-report.md +134 -0
- package/commands/sdd.descubrir.md +19 -0
- package/commands/sdd.dise/303/261ar.md +188 -0
- package/commands/sdd.estado.md +120 -3
- package/commands/sdd.exportar.md +344 -0
- package/commands/sdd.implementar.md +272 -52
- package/commands/sdd.interpretar.md +239 -0
- package/commands/sdd.md +93 -4
- package/commands/sdd.optimizar-memoria.md +47 -0
- package/commands/sdd.optimizar.md +164 -0
- package/commands/sdd.planificar.md +64 -0
- package/commands/sdd.retro.md +74 -0
- package/commands/sdd.verificar.md +81 -0
- package/configuracion-ejemplo/.claude/CLAUDE.md +106 -0
- package/configuracion-ejemplo/sdd.config.yaml +10 -0
- package/craft/accessibility-baseline.md +216 -0
- package/craft/anti-ai-slop.md +158 -0
- package/craft/color.md +160 -0
- package/craft/typography.md +121 -0
- package/design-systems/bold-brutalist/DESIGN.md +239 -0
- package/design-systems/editorial-minimal/DESIGN.md +205 -0
- package/design-systems/neutral-modern/DESIGN.md +227 -0
- package/design-systems/vibrant-consumer/DESIGN.md +257 -0
- package/design-systems/warm-editorial/DESIGN.md +221 -0
- package/docs/AGENTES.md +4 -1
- package/docs/CASO-COMPLETO.md +206 -0
- package/docs/EJEMPLOS.md +61 -185
- package/docs/FABRICA.md +163 -115
- package/docs/INICIO-RAPIDO.md +27 -79
- package/docs/MEMORIA-Y-OBSERVABILIDAD.md +239 -0
- package/docs/MODELOS.md +3 -0
- package/docs/QUE-PASA-SI-FALLA.md +404 -0
- package/docs/README.md +43 -0
- package/docs/RELACION-CON-CLAUDE-CODE.md +38 -0
- package/docs/SEGURIDAD-PARA-NOTECNICOS.md +280 -0
- package/package.json +15 -10
- package/plantillas/job-story-mejorar-prompt.md +107 -0
- package/presets/enterprise.yaml +6 -0
- package/presets/lean.yaml +4 -0
- package/presets/startup.yaml +6 -0
- package/skills/adr-indexer/SKILL.md +181 -0
- package/skills/cache-audit/SKILL.md +163 -0
- package/skills/critica-diseno/SKILL.md +193 -0
- package/skills/descubrir-idea/SKILL.md +133 -0
- package/skills/effort-router/SKILL.md +128 -0
- package/skills/elegir-direccion/SKILL.md +184 -0
- package/skills/github-connect/IMPLEMENTATION-CHECKLIST.md +297 -0
- package/skills/github-connect/INDEX.md +223 -0
- package/skills/github-connect/INTEGRATION.md +361 -0
- package/skills/github-connect/QUICK-START.md +168 -0
- package/skills/github-connect/README.md +414 -0
- package/skills/github-connect/RESUMEN_IMPLEMENTACION.txt +374 -0
- package/skills/github-connect/SKILL.md +343 -0
- package/skills/github-connect/STRUCTURE.txt +252 -0
- package/skills/github-connect/example-config.yaml +41 -0
- package/skills/github-connect/github-connect.sh +419 -0
- package/skills/interpretar-idea/SKILL.md +254 -0
- package/skills/mejorar-prompt/SKILL.md +237 -0
- package/skills/memory-compactor/SKILL.md +68 -0
- package/skills/modo-guiado/SKILL.md +12 -2
- package/skills/mutation-detector/SKILL.md +134 -0
- package/skills/observabilidad-consumo/SKILL.md +164 -0
- package/skills/token-budget/SKILL.md +177 -0
- package/skills/vercel-deploy/00-START-HERE.txt +364 -0
- package/skills/vercel-deploy/CHECKLIST.md +205 -0
- package/skills/vercel-deploy/EXEC-SUMMARY.txt +322 -0
- package/skills/vercel-deploy/FLOW.txt +334 -0
- package/skills/vercel-deploy/INDEX.md +276 -0
- package/skills/vercel-deploy/INTEGRATION.md +328 -0
- package/skills/vercel-deploy/MANIFEST.md +310 -0
- package/skills/vercel-deploy/README.md +65 -0
- package/skills/vercel-deploy/SKILL.md +356 -0
- package/skills/vercel-deploy/deploy.sh +298 -0
- package/skills/vercel-deploy/estado.json.example +205 -0
- package/skills/vercel-deploy/skill.yaml +323 -0
- package/skills/vercel-deploy/vercel-deploy.sh +216 -0
- package/skills/wireframe-mvp/SKILL.md +157 -0
- package/docs/EJEMPLO-PRACTICA.md +0 -383
- package/mcp-figma/README.md +0 -158
- package/mcp-figma/package.json +0 -7
- package/mcp-figma/src/component-generator.js +0 -162
- package/mcp-figma/src/design-system-analyzer.js +0 -247
- package/mcp-figma/src/figma-client.js +0 -75
- package/mcp-figma/src/index.js +0 -114
- package/mcp-figma/src/mcp.js +0 -97
- package/mcp-figma/src/style-mapper.js +0 -85
- /package/skills/{compresion-tokens.md → compresion-tokens/SKILL.md} +0 -0
- /package/skills/{constitucion-constraint.md → constitucion-constraint/SKILL.md} +0 -0
- /package/skills/{deteccion-stack.md → deteccion-stack/SKILL.md} +0 -0
- /package/skills/{enrutador-agentes.md → enrutador-agentes/SKILL.md} +0 -0
- /package/skills/{gestion-estado.md → gestion-estado/SKILL.md} +0 -0
- /package/skills/{indexador.md → indexador/SKILL.md} +0 -0
- /package/skills/{validacion-spec.md → validacion-spec/SKILL.md} +0 -0
- /package/skills/{verificador-implementacion.md → verificador-implementacion/SKILL.md} +0 -0
package/mcp-figma/src/mcp.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Implementación mínima del protocolo MCP sobre stdio (JSON-RPC 2.0)
|
|
3
|
-
// Sin dependencias externas — solo Node.js built-ins
|
|
4
|
-
|
|
5
|
-
import { createInterface } from "readline";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @typedef {{ name:string, description:string, inputSchema:object, annotations?:object }} ToolDefinition
|
|
9
|
-
* @typedef {(args: Record<string,any>) => Promise<object>} ToolHandler
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @param {{ name:string, version:string }} serverInfo
|
|
14
|
-
*/
|
|
15
|
-
export function createServer({ name, version }) {
|
|
16
|
-
/** @type {ToolDefinition[]} */
|
|
17
|
-
const tools = [];
|
|
18
|
-
/** @type {Record<string, ToolHandler>} */
|
|
19
|
-
const handlers = {};
|
|
20
|
-
|
|
21
|
-
const rl = createInterface({ input: process.stdin, terminal: false });
|
|
22
|
-
|
|
23
|
-
/** @param {object} obj */
|
|
24
|
-
function send(obj) {
|
|
25
|
-
process.stdout.write(JSON.stringify(obj) + "\n");
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param {any} id
|
|
30
|
-
* @param {object} result
|
|
31
|
-
*/
|
|
32
|
-
function reply(id, result) {
|
|
33
|
-
send({ jsonrpc: "2.0", id, result });
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @param {any} id
|
|
38
|
-
* @param {number} code
|
|
39
|
-
* @param {string} message
|
|
40
|
-
*/
|
|
41
|
-
function replyError(id, code, message) {
|
|
42
|
-
send({ jsonrpc: "2.0", id, error: { code, message } });
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
rl.on("line", async (line) => {
|
|
46
|
-
/** @type {{ id:any, method:string, params:any }} */
|
|
47
|
-
let msg;
|
|
48
|
-
try { msg = JSON.parse(line); } catch { return; }
|
|
49
|
-
|
|
50
|
-
const { id, method, params } = msg;
|
|
51
|
-
|
|
52
|
-
if (method === "initialize") {
|
|
53
|
-
reply(id, {
|
|
54
|
-
protocolVersion: "2024-11-05",
|
|
55
|
-
serverInfo: { name, version },
|
|
56
|
-
capabilities: { tools: {} },
|
|
57
|
-
});
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (method === "notifications/initialized") return;
|
|
62
|
-
if (method === "ping") { reply(id, {}); return; }
|
|
63
|
-
|
|
64
|
-
if (method === "tools/list") {
|
|
65
|
-
reply(id, { tools });
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (method === "tools/call") {
|
|
70
|
-
const handler = handlers[params?.name];
|
|
71
|
-
if (!handler) { replyError(id, -32601, `Tool not found: ${params?.name}`); return; }
|
|
72
|
-
try {
|
|
73
|
-
const result = await handler(params?.arguments ?? {});
|
|
74
|
-
reply(id, result);
|
|
75
|
-
} catch (err) {
|
|
76
|
-
reply(id, {
|
|
77
|
-
content: [{ type: "text", text: JSON.stringify({ ok: false, error: /** @type {Error} */ (err).message }) }],
|
|
78
|
-
isError: true,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (id !== undefined) replyError(id, -32601, `Method not found: ${method}`);
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
/**
|
|
89
|
-
* @param {ToolDefinition} definition
|
|
90
|
-
* @param {ToolHandler} handler
|
|
91
|
-
*/
|
|
92
|
-
tool(definition, handler) {
|
|
93
|
-
tools.push(definition);
|
|
94
|
-
handlers[definition.name] = handler;
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
import { extractColorFromFill } from "./figma-client.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @typedef {{ figmaName: string, figmaValue: string, localToken: string|null, localValue: string, matchType: "exact"|"approximate"|"new", confidence: number }} ColorMapping
|
|
6
|
-
* @typedef {{ type: string, color?: { r:number, g:number, b:number, a?:number } }} Fill
|
|
7
|
-
* @typedef {{ name: string, fills: Fill[] }} FillItem
|
|
8
|
-
* @typedef {{ name: string, style: { fontSize?: number } }} TextItem
|
|
9
|
-
* @typedef {{ colors: Record<string,string>, typography: { fontSizes: Record<string,string> } }} DesignProfile
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/** @param {string} hex */
|
|
13
|
-
function hexToRgb(hex) {
|
|
14
|
-
const clean = hex.replace("#", "");
|
|
15
|
-
if (clean.length !== 6) return null;
|
|
16
|
-
return [parseInt(clean.slice(0,2),16), parseInt(clean.slice(2,4),16), parseInt(clean.slice(4,6),16)];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/** @param {string} a @param {string} b */
|
|
20
|
-
function colorDistance(a, b) {
|
|
21
|
-
const ra = hexToRgb(a), rb = hexToRgb(b);
|
|
22
|
-
if (!ra || !rb) return Infinity;
|
|
23
|
-
return Math.sqrt((ra[0]-rb[0])**2 + (ra[1]-rb[1])**2 + (ra[2]-rb[2])**2);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @param {FillItem[]} fillItems
|
|
28
|
-
* @param {DesignProfile} profile
|
|
29
|
-
* @returns {ColorMapping[]}
|
|
30
|
-
*/
|
|
31
|
-
function mapColors(fillItems, profile) {
|
|
32
|
-
const localEntries = Object.entries(profile.colors);
|
|
33
|
-
return fillItems.map(({ name, fills }) => {
|
|
34
|
-
const figmaHex = fills.map(extractColorFromFill).find(Boolean) ?? null;
|
|
35
|
-
if (!figmaHex) return { figmaName: name, figmaValue: "desconocido", localToken: null, localValue: "desconocido", matchType: "new", confidence: 0 };
|
|
36
|
-
|
|
37
|
-
const exact = localEntries.find(([,v]) => v.toLowerCase() === figmaHex.toLowerCase());
|
|
38
|
-
if (exact) return { figmaName: name, figmaValue: figmaHex, localToken: exact[0], localValue: exact[1], matchType: "exact", confidence: 1 };
|
|
39
|
-
|
|
40
|
-
let best = null, bestDist = Infinity;
|
|
41
|
-
for (const [token, value] of localEntries) {
|
|
42
|
-
const dist = colorDistance(figmaHex, value);
|
|
43
|
-
if (dist < bestDist) { bestDist = dist; best = [token, value]; }
|
|
44
|
-
}
|
|
45
|
-
if (best && bestDist < 30) return { figmaName: name, figmaValue: figmaHex, localToken: best[0], localValue: best[1], matchType: "approximate", confidence: Math.max(0, 1 - bestDist/30) };
|
|
46
|
-
|
|
47
|
-
return { figmaName: name, figmaValue: figmaHex, localToken: null, localValue: figmaHex, matchType: "new", confidence: 0 };
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @param {TextItem[]} textItems
|
|
53
|
-
* @param {DesignProfile} profile
|
|
54
|
-
* @returns {ColorMapping[]}
|
|
55
|
-
*/
|
|
56
|
-
function mapTypography(textItems, profile) {
|
|
57
|
-
return textItems.map(({ name, style }) => {
|
|
58
|
-
const figmaSize = style.fontSize ? `${style.fontSize}px` : null;
|
|
59
|
-
if (!figmaSize) return { figmaName: name, figmaValue: "desconocido", localToken: null, localValue: "desconocido", matchType: "new", confidence: 0 };
|
|
60
|
-
const match = Object.entries(profile.typography.fontSizes).find(([,v]) => v === figmaSize);
|
|
61
|
-
if (match) return { figmaName: name, figmaValue: figmaSize, localToken: match[0], localValue: match[1], matchType: "exact", confidence: 1 };
|
|
62
|
-
return { figmaName: name, figmaValue: figmaSize, localToken: null, localValue: figmaSize, matchType: "new", confidence: 0 };
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @param {ColorMapping[]} colorMappings
|
|
68
|
-
* @param {ColorMapping[]} typographyMappings
|
|
69
|
-
*/
|
|
70
|
-
function buildMappingReport(colorMappings, typographyMappings) {
|
|
71
|
-
const all = [...colorMappings, ...typographyMappings];
|
|
72
|
-
const unmapped = [
|
|
73
|
-
...colorMappings.filter(m => m.matchType === "new").map(m => `color: ${m.figmaName} (${m.figmaValue})`),
|
|
74
|
-
...typographyMappings.filter(m => m.matchType === "new").map(m => `tipografía: ${m.figmaName} (${m.figmaValue})`),
|
|
75
|
-
];
|
|
76
|
-
const total = all.length;
|
|
77
|
-
let recommendation = "";
|
|
78
|
-
if (total === 0) recommendation = "No hay estilos en Figma para mapear.";
|
|
79
|
-
else if (unmapped.length === 0) recommendation = "✅ Todos los estilos de Figma coinciden con tokens existentes.";
|
|
80
|
-
else if (unmapped.length <= 3) recommendation = `⚠️ ${unmapped.length} estilo(s) nuevo(s) sin equivalente en el proyecto.`;
|
|
81
|
-
else recommendation = `❌ ${unmapped.length} estilos sin equivalente — considera sincronizar el design system con Figma.`;
|
|
82
|
-
return { colors: colorMappings, typography: typographyMappings, unmapped, recommendation };
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { mapColors, mapTypography, buildMappingReport };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|