|
|
||
|---|---|---|
| .gitea/workflows | ||
| docs | ||
| examples | ||
| frontend | ||
| src | ||
| tests | ||
| .gitignore | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
SCHEMETA
AI-Native schematic compiler and visual teaching workspace.
This version includes:
- Deterministic JSON validation, ERC, topology extraction
- Auto-generic symbol synthesis for unknown components/pins (deterministic fallback)
- Auto-template synthesis for common passives/connectors (
R/C/L/D/LED/J/P) - Constraint-aware placement, orthogonal routing, net-stub schematic mode
- SVG rendering with bus grouping, tie symbols, junctions, and legend
- Workspace UI for navigation, drag/lock placement, isolate/highlight, diagnostics focus, and direct graph editing
- JSON power tools: validate, format, sort keys, copy minimal repro
- REST + MCP integration (compile/analyze + UI bundle metadata)
Run
npm run start
Open:
- Workspace:
http://localhost:8787/ - Health:
http://localhost:8787/health - MCP UI bundle descriptor:
http://localhost:8787/mcp/ui-bundle
Version metadata:
- REST and MCP tool responses include
api_versionandschema_version. - REST responses also include
request_idandx-request-idfor request correlation. - Current values:
api_version=0.3.0,schema_version=1.0.0. - Compatibility policy (current): additive, backward-compatible fields may be introduced in the same API minor version.
Operational limits:
MAX_BODY_BYTES(default2097152) limits request payload size.MAX_REQUESTS_PER_MINUTE(default120) applies per-client throttling for POST API endpoints.SCHEMETA_AUTH_TOKEN(optional) enforces bearer/API-key auth for POST API endpoints.- send either
Authorization: Bearer <token>orx-api-key: <token>
- send either
Docs:
docs/release-checklist.mddocs/operations-runbook.mddocs/quality-gates.mddocs/phase4-execution-plan.mddocs/phase5-execution-plan.mddocs/fixtures.mddocs/api-mcp-contracts.md
CI:
.gitea/workflows/ci.ymlruns syntax checks + full test suite on push/PR.- CI also runs browser regression (
npm run test:ui) after installing Playwright Chromium.
REST API
POST /compile
Input:
{
"payload": { "...": "SJM" },
"options": {
"render_mode": "schematic_stub",
"show_labels": true,
"generic_symbols": true
}
}
payload can also be posted directly (backward compatible).
Output includes:
errors,warningswithid+suggestionfocus_mapfor issue-to-canvas targetinglayout(resolved placements)layout_metrics(crossings, overlaps, label collisions, tie points, bus groups)bus_groupsrender_mode_usedsvg
POST /analyze
Input: same payload model format Output: ERC + topology summary (power domains, clock source/sink, buses, paths)
generic_symbols defaults to true. When enabled, missing symbols or missing pins on generic symbols are synthesized from net usage and surfaced as warnings:
auto_template_symbol_created(for recognized common parts like resistor/capacitor/etc.)auto_template_symbol_hydrated(template shorthand expanded to full runtime symbol)auto_generic_symbol_createdauto_generic_symbol_hydrated(generic shorthand expanded to full runtime symbol)auto_generic_pin_created
Shorthand symbols are supported for concise AI output:
{
"symbols": {
"r_std": { "template_name": "resistor" },
"x_generic": { "category": "generic" }
}
}
symbol_id, category, body, and pins are auto-filled as needed during compile/analyze.
Instance-level built-in parts are also supported (no symbol definition required):
{
"instances": [
{
"ref": "R1",
"part": "resistor",
"properties": { "value": "10k" },
"placement": { "x": null, "y": null, "rotation": 0, "locked": false }
}
]
}
Supported part values: resistor, capacitor, inductor, diode, led, connector, generic.
Per-pin editor hints are supported through instance properties:
{
"instances": [
{
"ref": "R1",
"part": "resistor",
"properties": {
"value": "10k",
"pin_ui": {
"1": { "show_net_label": true },
"2": { "show_net_label": false }
}
},
"placement": { "x": null, "y": null, "rotation": 0, "locked": false }
}
]
}
POST /layout/auto
Computes fresh placement (ignores current locks), returns:
- updated
model - compiled result in
compile
POST /layout/tidy
Computes placement tidy while respecting locks, returns:
- updated
model - compiled result in
compile
MCP
Start stdio MCP server:
npm run mcp
Tools:
schemeta_compileschemeta_analyzeschemeta_ui_bundle
Workspace behavior highlights
- Fit-to-view default on load/import/apply
- Focus-selection + reset-view controls for faster navigation in dense schematics
Reset Sampleone-click deterministic baseline restore for QA/demo loops- Space + drag pan, wheel zoom, fit button
- Net/component/pin selection with dimming + isolate toggles
- Selected panel editors for component properties, full pin properties, full symbol body/pin editing, and net connect/disconnect operations
- Click diagnostics to jump/flash focused net/component/pin
- Auto Layout and Auto Tidy actions
Shortcutshelper modal andCtrl/Cmd+Kcommand palette quick actions- Keyboard shortcuts:
Ctrl/Cmd+ZundoCtrl/Cmd+Shift+ZorCtrl/Cmd+YredoCtrl/Cmd+Kopen command paletteSpacerotate selected components (or pan when no selection)Ffocus current selectionAlt+Enterapply current selection editor (component/pin/net)Alt+Cconnect selected pin to chosen net
Browser Regression
Run browser interaction + visual regression checks:
npx playwright install chromium
npm run test:ui
Metrics report artifact:
output/playwright/ui-metrics-report.json
Refresh visual baselines intentionally:
UPDATE_SNAPSHOTS=1 npm run test:ui
Baselines are stored in tests/baselines/ui/.