Instruction file imported from isa/cora (
.cursor/rules/cora-project.mdc). Copyright stays with the author.
Cora
Open-source diagram tool for AI coding agents. YAML in → professional SVG/PDF out.
Planning docs
Read .planning/STATE.md first each session.
| File | Purpose |
|---|---|
.planning/PROJECT.md |
Context, constraints, decisions |
.planning/REQUIREMENTS.md |
v1 requirements (REQ-IDs) |
.planning/ROADMAP.md |
6-phase execution plan |
.planning/STATE.md |
Current position |
GSD workflow
- Read
.planning/STATE.mdbefore starting work /gsd:discuss-phase Nbefore planning/gsd:plan-phase Nto create plans/gsd:execute-phase Nto implement- Update
STATE.mdafter significant progress
Current focus: Phase 4 — Interactive Canvas
Architecture
Single cora npm package: core → renderer → preview → cli.
- core: parse, validate (AJV), ELK layout, theme resolution
- renderer: React → pure SVG (no
foreignObject) - preview: interactive browser editor (
cora preview; Express + bundleddist/web/) - cli: validate, render, preview, schema (
cora ext,cora doctordeferred)
Constraints
- Pure SVG only — required for resvg PDF
- YAML AST patch save — preserve comments on canvas save
- One diagram per file;
version: 1required - Extensions via separate
cora-extensionsrepo (PR-curated) - Config path:
$HOME/.config/cora/ - Apache 2.0 license
Stack
Node.js 22+, Bun, TypeScript 5, Turborepo 2, tsdown, yaml (eemeli), ajv 8, elkjs, React 19, @resvg/resvg-js, commander 12, Vite 6 (web build only)
Do not (v1)
- MCP server, sequence/state/ER diagrams, or structural canvas editing (add/remove nodes and edges in YAML remains agent-owned)
foreignObjectin SVG- Bundled cloud provider icons in core
- Silent fallback when extensions missing