2026-03-03 09:46:35 +00:00
# Contribuir
2026-03-03 09:57:17 +00:00
## Estructura del proyecto
2026-03-03 09:46:35 +00:00
```
packages/
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
core/ @open -pencil/core — motor (sin deps DOM)
src/ Grafo de escena, renderer, layout, codec, kiwi, tipos
cli/ @open -pencil/cli — CLI headless para operaciones .fig
src/commands/ info, tree, find, export, eval, analyze
mcp/ @open -pencil/mcp — servidor MCP para herramientas IA
2026-03-07 21:28:11 +00:00
src/ Transportes stdio + HTTP (Hono), 87 herramientas
2026-03-03 09:46:35 +00:00
src/
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
components/ Vue SFCs (canvas, paneles, barra de herramientas, selector de color)
properties/ Secciones del panel de propiedades (Apariencia, Relleno, Trazo, etc.)
composables/ Entrada de canvas, atajos de teclado, hooks de renderizado
stores/ Estado del editor (reactividad Vue)
engine/ Shims de re-exportación desde @open -pencil/core
kiwi/ Shims de re-exportación desde @open -pencil/core
types.ts Tipos compartidos (re-exportados desde core)
constants.ts Colores UI, valores por defecto, umbrales
desktop/ Tauri v2 (Rust + config)
2026-03-03 09:46:35 +00:00
tests/
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
e2e/ Regresión visual Playwright
engine/ Tests unitarios (bun:test)
docs/ Sitio de documentación VitePress
specs/ Especificaciones de capacidades (fuente de verdad)
changes/ Cambios activos y archivados
2026-03-03 09:46:35 +00:00
```
2026-03-03 09:57:17 +00:00
## Entorno de desarrollo
2026-03-03 09:46:35 +00:00
```sh
bun install
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
bun run dev # Editor en localhost:1420
bun run docs:dev # Docs en localhost:5173
2026-03-03 09:46:35 +00:00
```
2026-03-03 09:57:17 +00:00
## Estilo de código
2026-03-03 09:46:35 +00:00
2026-03-03 09:57:17 +00:00
### Herramientas
2026-03-03 09:46:35 +00:00
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
| Herramienta | Comando | Propósito |
|-------------|---------|-----------|
| oxlint | `bun run lint` | Linting (basado en Rust, rápido) |
| oxfmt | `bun run format` | Formateo de código |
| tsgo | `bun run typecheck` | Verificación de tipos (checker TypeScript basado en Go) |
Ejecutar todas las verificaciones:
2026-03-03 09:46:35 +00:00
```sh
bun run check
```
2026-03-03 09:57:17 +00:00
### Convenciones
2026-03-03 09:46:35 +00:00
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
- **Nombres de archivo** — kebab-case (`scene-graph.ts`, `use-canvas-input.ts` )
- **Componentes** — PascalCase Vue SFCs (`EditorCanvas.vue`, `ScrubInput.vue` )
- **Constantes** — SCREAMING_SNAKE_CASE
- **Funciones/variables** — camelCase
- **Tipos/interfaces** — PascalCase
### Convenciones para agentes IA
Desarrolladores y agentes IA deben leer `AGENTS.md` en la raíz del repo ([ver en GitHub](https://github.com/open-pencil/open-pencil/blob/master/AGENTS.md)). Cubre renderizado, grafo de escena, componentes e instancias, layout, UI, formato de archivo, convenciones Tauri y problemas conocidos.
2026-03-03 09:46:35 +00:00
2026-03-03 09:57:17 +00:00
## Realizar cambios
2026-03-03 09:46:35 +00:00
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
3. Implementar el cambio
4. Ejecutar `bun run check` y `bun run test`
5. Enviar un pull request
2026-03-03 09:46:35 +00:00
2026-03-03 09:57:17 +00:00
## Archivos clave
2026-03-03 09:46:35 +00:00
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
El código fuente del motor vive en `packages/core/src/` . Los directorios `src/engine/` y `src/kiwi/` de la app son shims de re-exportación — edita el paquete core, no los shims.
| Archivo | Propósito |
|---------|-----------|
| `packages/core/src/scene-graph.ts` | Grafo de escena: nodos, variables, instancias, hit testing |
| `packages/core/src/renderer.ts` | Pipeline de renderizado CanvasKit |
| `packages/core/src/layout.ts` | Adaptador de layout Yoga |
| `packages/core/src/undo.ts` | Gestor de deshacer/rehacer |
| `packages/core/src/clipboard.ts` | Portapapeles compatible con Figma |
| `packages/core/src/vector.ts` | Modelo de red vectorial |
| `packages/core/src/render-image.ts` | Exportación de imagen offscreen (PNG/JPG/WEBP) |
| `packages/core/src/kiwi/codec.ts` | Codificador/decodificador binario Kiwi |
| `packages/core/src/kiwi/fig-import.ts` | Lógica de importación de archivos .fig |
| `packages/cli/src/index.ts` | Punto de entrada del CLI |
2026-03-07 21:28:11 +00:00
| `packages/core/src/tools/` | Definiciones unificadas de herramientas (IA, MCP, CLI) |
Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 15:12:01 +00:00
| `packages/core/src/figma-api.ts` | Implementación de Figma Plugin API |
| `packages/mcp/src/server.ts` | Factory del servidor MCP |
| `packages/cli/src/commands/` | Comandos CLI (info, tree, find, export, eval, analyze) |
| `src/stores/editor.ts` | Estado global del editor |
| `src/composables/use-canvas.ts` | Composable de renderizado del canvas |
| `src/composables/use-canvas-input.ts` | Manejo de entrada ratón/touch |
| `src/composables/use-keyboard.ts` | Manejo de atajos de teclado |