Three languages, one AST
Every declarative document format in CommandAGI can be written in TypeScript (.tsx/.jsx), Python (.py), or Rust (.rs) using matching element vocabularies (commandagi/design, commandagi.design.*, commandagi::design::*) backed by a shared schema:
- Round-trip AST editing. Visual editors evaluate the document in a no-network, memory- and time-bounded sandbox (
commandagi code eval) and write edits (dragged parts, routed traces, study parameter updates) back as minimal source AST diffs. - Relative references and assets. Cross-file links use clean relative paths or explicit
cloud:///local://Drive addresses. Binary assets, textures, or large arrays live in ordinary files under<stem>.assets/beside the document. - No hash-pinned run locks. Runs record
ofand timestamped stream evidence while keeping source code editable and diffable.
Devices, worlds, runs, and settings
Devices (devices/<id>/definition.tsx)
Declares machine provenance, CAD geometry (assets/), manufacturing process envelopes (process.print, process.mill), and typed channels:
export default () => (
<device name="CNC 3018" manufacturer="Generic">
<channel id="gcode" dir="duplex" medium="records" format="gcode-chat" dialect="grbl" transport="serial" baud={115200} />
</device>
);Worlds (worlds/<id>/world.tsx)
Places physical <unit> instances inside <space origin_mm={[0,0,0]} size_mm={[…]}> pointing at definition.tsx (and optionally a .3d.tsx twin). Channel calibration overrides live in <name>.calibration.tsx.
Runs (runs/<run>/)
| path | contents |
|---|---|
run.json | id, of, immutable reality (physical | simulation), kind (session | recipe | thread), started, ended, from |
members.jsonl | Joined and departed principals (unit, person, agent, contract, replica) |
steps.jsonl, mounts.tsx | Ordered workflow/recipe steps and mounted task files or folders |
streams/<uid>.<channel>@<replica>/ | stream.json, append-only records.jsonl (seq, hlc, src, kind, by, optional RFC 9162 seal), media (video.mp4/.webm, audio.webm, data.bin) |
streams/chat@<replica>/, evidence/ | Thread conversation stream, checks (checks.json), diffs, and diagnostic artifacts |
Cascading settings (settings.json)
JSON with comments (jsonc), merged deterministically from broad to narrow (global -> org chain -> user -> ~/.commandagi/settings.json -> ancestor folders -> .commandagi/settings.json), with per-extension scopes such as "[.gcode]": { "editor.default": "gcode" }.
Engineering, CAD, EDA, and verification formats
| extension | role & editor |
|---|---|
.3d.tsx (.3d.py, .3d.rs) | Parametric OpenCascade B-rep parts, mates, joints, drawings, <check> rules, and optional physics <slot name="scene"> |
.study.tsx | Structural FEA (CalculiX C3D10), CFD flow, and step-response studies with mesh refinement and pass/fail revision targets |
.cam.tsx, .slice.tsx | CNC milling toolpaths and 3D-printer slicing setups bound to device process definitions (emits .gcode) |
.sch.tsx, .pcb.tsx | Schematics and constraint-driven PCB layouts with KiCad 8+ ERC/DRC parity, biot-savart EMI solves, and Gerber/BOM fabrication |
.req.tsx, .system.tsx, .interface.tsx | Requirements tracing, system mass/power/cost budget roll-ups, and side-to-side interface contracts (commandagi trace, check) |
.testplan.tsx | Commissioning test procedures executed against real or twin units (commandagi testplan check | run | history) |
.firmware.tsx, .rollout.tsx | MicroPython board firmware definitions, pin maps, stop checks, and staged fleet rollouts (commandagi rollout) |
.release.tsx | Frozen hardware release manifest pinning digests, check verdicts, STEP/drawings/BOM/Gerber outputs (commandagi release) |
.calibration.tsx, .supplier.tsx, .logistics.tsx | Joint zeros, camera extrinsics/intrinsics, supplier quotes, and multi-leg supply logistics |
Operations, intelligence, and creative formats
| extension | role & editor |
|---|---|
.opportunity.tsx, .experiment.tsx | Evidence-graded opportunity briefs (Observed / Proxy / Modeled) with explicit approval actions and two-arm tests |
.eval.tsx, .metric.tsx, .optimize.tsx | Benchmark and evaluation suites (e.g., G1 factory tasks), scalar metrics, and candidate optimization loops |
.graph.json, .source.json | Zero-database knowledge graph views defined over JSON/JSONL/CSV/SQLite/.eml/.vcf/folders (graph_query, graph_search) |
.company.tsx, .money.tsx, .market.tsx, .contract.tsx | Company charters/cap tables/ledgers, money accounts & bounds, venue order recordings, and escrow contracts |
.flow.tsx, .task.tsx, .project.tsx, .script.tsx | Declarative multi-step workflows with approval barriers, task cards/proposals, project roll-ups, and reactive Drive scripts |
agent.tsx, harness.tsx, skill.tsx | Agent fork definitions, CLI/cloud harnesses, and reusable skill packages (skills/<name>/skill.tsx) |
.geo.tsx, .shock.tsx, .scenario.tsx | Geoeconomic world interventions, causal supply/price shocks, tectonic/seismic/weather layers, and swept scenarios |
.vid.tsx, .mus.tsx, .pdf.tsx | Multi-track programmatic video composition, audio synthesis/DSP, and declarative PDF layout |
.draw.tsx, .nest.tsx, .paint.tsx, .img.tsx | Parametric 2D vector artboards, sheet laser/CNC nesting, layered brush painting, and non-destructive image grading |
.page.tsx, .sheet.tsx, .deck.tsx, .dashboard.tsx | Rich prose documents, formula spreadsheets, slide decks, and multi-pane live workbench dashboards |
.brand.tsx, .product.tsx, .cart.tsx, .storefront.tsx, .letter.tsx, .postcard.tsx | Brand registries, commerce catalogs, storefronts, and physical Lob/Click2Mail print-and-post pieces |
Standard external formats
Unwrapped third-party assets stay verbatim on disk and open directly in their native editor or importer: .step, .stp, .iges, .stl, .glb, .gltf, .3mf, .usd*, .kicad_sch, .kicad_pcb, .kicad_pro, .aml (AutomationML CAEX), .3dxml, .jt, .svg, .png, .jpg, .mp4, .wav, .csv, .parquet, .duckdb, .sqlite, .xlsx, .docx, .md, .pdf, .ipynb, .gcode, .ics, .vcf, .eml, .mbox, .st (PLCopen IEC 61131-3).