name: gridcraft
description: >-
GridCraft is an open-source, clean-room Rust reimplementation of Microsoft Excel: a spreadsheet
app for macOS (also Windows, Linux, BSD and the web) that reads and writes real .xlsx files and
can be driven headlessly through a CLI, an MCP server and a live JSON control channel. Use this
skill whenever the user mentions GridCraft by name; asks what it can do or which formats,
keyboard shortcuts, commands or worksheet functions it has; wants to create, edit, convert,
calculate, print or export spreadsheets with it; wants to automate or script it (MCP, CLI,
control channel, recorded scripts, or the web build's window.gridcraft page API); needs inputs
prepared for it (build or convert .xlsx, CSV, TSV, JSON, or convert .xls/.xlsb/.ods/.slk into
.xlsx); wants its output verified, repaired or round-tripped (gridcraft-cli check); wants to
confirm that a machine really confines helper processes (gridcraft-cli sandbox-check); or
reports a symptom (crash, wrong formula result, formatting lost on save, Excel saying "we found
a problem with some content"). Trigger it even when the app is not named but the job is
Excel-style spreadsheet work — "make me an Excel file", "add a formula column", "sort and
filter this sheet", "pivot this data", "export this workbook to PDF", "read the values out of
this spreadsheet", "make this Arabic sheet read right to left". Do not assume Excel parity from
Audit basis. Refreshed 2026-11-12 against tag v0.19.1, commit 476448d7d9f3a5f8e93fcf7d98b47fd52293fe7f — git rev-parse HEAD in the pinned checkout confirms, and the installed GridCraft bundle matches it: its binary prints GridCraft 0.19.1, and its Info.plist carries CFBundleShortVersionString 0.19.1 with bundle id ai.storyteller.gridcraft. The previous release this skill described was v0.17.0 (a6a6a49a0415087474251b08e887a3581fab9e14).
v0.17.0 → v0.19.1 delta. The release diff touches 238 files (+18,427 / −1,483 lines) and adds no command ids and removes none: the registry is the same 385 ids (set-diffed), the catalog still 281/296 (crates/engine/src/catalog.rs), and the MCP tool set, control-method set, UI-only ids, shortcut bindings and key-tip sequences are unchanged (counts below). The automation surface grows in two places: a 12th CLI subcommand sandbox-check (apps/gridcraft-cli/src/sandbox_check.rs, apps/gridcraft-cli/src/main.rs:91) reports whether the machine confines programs, and the web build now installs window.gridcraft — request, execute, commands, docInspect, uiInspect, screenshot over the control methods, 30 s timeout — in every mode (apps/gridcraft-web/src/api.rs, shared craft-web-api; packaging/web/README.md). A new gridcraft-sandbox crate (crates/sandbox/, layer 0 in xtask/src/layers.rs) confines helper processes with Landlock ABI 3 + seccomp on Linux and sandbox-exec on macOS, with a canary-based enforcement check, an empty environment but LANG/LC_*/TZ, and launcher exit 97 when it refuses (crates/sandbox/src/{lib,policy,canary,probe,macos,linux}.rs, docs/sandbox.md); it is groundwork — Python cells still do not run. Arabic text now lays out with Unicode bidi: cells carry a reading direction (Context / LTR / RTL) stored as XLSX readingOrder, applied per cell independently of sheet RTL (crates/model/src/style.rs:354, crates/xlsx/src/styles.rs:272,616-618, crates/ui-egui/src/text_direction.rs), the formula bar and conditional formats follow it (crates/ui-egui/src/formula_bar.rs, crates/ui-egui/tests/arabic_bidi.rs), Arabic faces join the font fallbacks (crates/ui-egui/src/theme/font_fallback.rs), and editing navigates visually (crates/ui-egui/tests/arabic_editing.rs). Number formats gained the Excel B1/B2 calendar prefixes (B2 renders the tabular Hijri calendar in Arabic) in a new crates/numfmt/src/calendar.rs, and the whole renderer now rounds on Excel's 15-significant-digit decimal string (crates/numfmt/src/decimal.rs, golden files under crates/numfmt/tests/golden/). Legacy (pre-dynamic-array) formulas are read the legacy way — implicit @ intersection, no spilling, and written back without dynamic-array metadata unless the text really is dynamic (crates/xlsx/src/array_formula.rs, wired in crates/xlsx/src/read.rs:473, crates/xlsx/src/xls.rs:253 and crates/xlsx/src/sheet_write.rs:655-660); lookups onto an empty target keep it blank as Excel does (crates/functions/src/lookup.rs, #374). Charts got hard work budgets — 100,000 points per series, 2,000,000 points per chart, 16 trendlines per chart — clipped before evaluation (crates/chart/src/resolve.rs:11-18), a linear moving-average trendline (crates/chart/src/trend.rs), and cheaper label/legend measuring. Elsewhere: the MCP stdio server caps a message at 16 MB and answers -32600 (invalid request) past it (crates/mcp/src/server.rs), HTML export refuses charts past 64 MiB of SVG (crates/engine/src/chart_svg.rs), the catalog renamed its own pending labels SmartArt → Diagram and WordArt → Decorative Text while keeping the ids (docs/feature-names.md), and the self-update/Flatpak update path was fixed (v0.19.1's own change). A regional-format table landed in crates/core/src/region.rs (CLDR separators, month names, date order, currency) and a runtime Workbook::region field defaults to en-US (crates/model/src/workbook.rs:271-276) — nothing sets or reads it yet, so every workbook is still en-US; do not promise localized typing or display.
v0.16.0 → v0.17.0 (history). +13 command ids, none removed (control.assign, control.format, control.list, control.press, control.setValue, insert.button, insert.slider, insert.spinButton, range.move, selection.nextCorner, view.showSheetTabs, view.showHorizontalScrollBar, view.showVerticalScrollBar). Form controls arrived (buttons, sliders, spin buttons; crates/engine/src/cmd/controls.rs, crates/xlsx/src/controls.rs), one object selection with eight resize handles (crates/ui-egui/src/objects.rs), SYLK .slk import (crates/engine/src/io/sylk.rs), HTML-table import (read_html_table in crates/engine/src/io.rs), clipboard picture paste, active-row highlight, and a web data-host="page" host mode.
v0.15.0 → v0.16.0 (history). +7 command ids, none removed (data.solverLoadModel, data.solverReset, data.solverSaveModel, equation.edit, insert.equation, python.output, python.set): the Solver surface with Answer/Sensitivity/Limits reports, data tables beneath charts, Page Setup's page order, and one OS window per workbook window. Older history (v0.14.0–v0.15.0) is folded into CHANGES.md.
Verify against your installed version — the ArtCraft Launcher auto-updates, so a newer build may differ; every count quoted here was re-measured at this tag, and code paths that moved were re-cited. The measurement method for each count is in evidence.md.
GridCraft is an open-source, clean-room reimplementation of Microsoft Excel's workflow in pure Rust (README.md), by the ArtCraft team; source: github.com/storytold/gridcraft. XLSX is the native document format, and the architecture is engine-first: every ribbon button, menu item, dialog OK, keystroke and mouse gesture is a command (crates/engine/src/cmd/), reachable over a JSON control channel, an MCP server, a headless CLI and (in the web build) a page-level JavaScript API. Maturity is alpha: the core workflow (open XLSX → edit/format → sort/filter → chart/pivot → print to PDF → save XLSX) works end to end, but the project's own estimate is ~75% feature breadth and ~50% "ready for real work" (docs/target-app-parity.md summary; ROADMAP.md). It runs natively on macOS 11+, Windows, Linux and BSD, and in the browser via WebAssembly (apps/gridcraft-web). The UI runs on egui 0.37, patched to the storytold fork (Cargo.toml [patch.crates-io]).
view.newWindow opens another window on the same workbook (no clone; saving from either window saves it), view.arrangeAll tiles the windows, window.list/window.close manage them, and view.switchWindows/window.activate {index} switch workbooks (crates/engine/src/cmd.rs).budget, sales, grades: file.new {sample}, CLI --sample, URL ?sample= (crates/engine/src/sample.rs).crates/engine/src/cmd/*.rs, crates/engine/src/catalog.rs, generated docs/parity-checklist.md (the 15 unimplemented entries are listed there).crates/numfmt), cell styles and themes, conditional formatting (CellIs, expression, text, top-10, above-average, time period, duplicate/unique, colour scale, data bar, icon set) and data validation (whole, decimal, list, date, time, text length, custom).home.formatCells {range, style:{align:{reading_order:"Context"|"LeftToRight"|"RightToLeft"|null}}} (crates/engine/src/cmd/format.rs:88), modelled as ReadingOrder (crates/model/src/style.rs:354), written and read as the readingOrder attribute incl. differential styles (crates/xlsx/src/styles.rs:272,616-618). It is per cell and independent of sheet RTL; Context follows the first non-whitespace character's bidi class (crates/ui-egui/src/text_direction.rs), and the formula bar and conditional-format styles follow it (crates/ui-egui/src/formula_bar.rs, crates/ui-egui/tests/arabic_bidi.rs).ShapeKinds: rectangle, rounded rectangle, ellipse, triangle, line, arrow, text box, icon, ink, equation), checkboxes, freehand ink with Ink to Shape, sparklines (line/column/win-loss).control.list, control.format (name, text, linked cell, min/max/step/page/value, horizontal, print, locked), control.assign (a macro or a command with params), control.setValue and control.press. A button never opens a web page or a dialog, and control.press on a workbook that came from a file asks first (crates/engine/src/cmd/controls.rs; UI crates/ui-egui/src/form_controls.rs; XLSX crates/xlsx/src/controls.rs).crates/ui-egui/src/objects.rs). ui.object.select {id?, kind?} selects one and replies {selected, rect} in window points.within: "selection" and a bit-parallel wildcard matcher), Go To, Go To Special, Watch Window, undo/redo with bounded history. A repeated row or single cell pasted into a filtered selection skips the hidden rows; a taller block is pasted straight down (crates/engine/src/cmd/edit/paste_special.rs).crates/ui-egui/src/app/clipboard.rs runs insert.picture).formulas.autoSum, ⌘⇧T): a single cell guesses the numbers above it, else the numbers to its left (the guessed range now stops at a blank cell, #3291); a multi-cell selection gets column totals below and row totals in the empty last column (one undo step). Options ▸ Formulas Maximum Iterations / Maximum Change; Options ▸ General "Highlight the active cell's row"; show/hide sheet tabs and scroll bars per workbook (view.showSheetTabs, view.showHorizontalScrollBar, view.showVerticalScrollBar).DocState::new → Calc::recalc_all, crates/engine/src/lib.rs:314), so a workbook with volatile formulas runs them on open; there is no recalc-on-open switch (from_saved, the constructor that keeps a file's values unevaluated, is used only by a test). To read what a file stores, bypass the session and inspect the package (gridcraft-cli check does exactly that).#NUM!), MAP/REDUCE/SCAN/BYROW/BYCOL/MAKEARRAY, GROUPBY/PIVOTBY (a GROUPBY total depth of 2 or more adds subtotals), structured table references and iterative calculation for circular references — docs/function-parity.md, crates/functions/src/, crates/calc/src/eval.rs.cm attribute, which includes every .xls formula) is read with Excel's implicit intersection (@) and does not spill; a typed =@F(…) saves and reopens with the same single value, and only a genuinely dynamic formula gets cm metadata on save (crates/xlsx/src/array_formula.rs, crates/engine/tests/legacy_array_functions.rs, #410).ISBLANK and & see it as blank (crates/functions/src/lookup.rs, #374).gridcraft-cli eval '=SUM(A1:A9)' --in book.xlsx or formulas.evaluate. A formula that could not be typed into a cell is an error that says why, not a silent #VALUE!.formulas.calculationOptions). Set precision as displayed rounds calculation results.python.set {cell, code, output?} and python.output set the code and its return type (value/object); Python mode edits the code in the formula bar (ui.pythonMode, Ctrl+Alt+Shift+M toggles the return type). Code and a file's cached result are stored; GridCraft never runs Python, so new or changed code shows #BLOCKED! (crates/engine/src/cmd/python.rs, crates/xlsx/src/python_part.rs).insert.equation {latex}, equation.edit), LaTeX source laid out by gridcraft-math and drawn from the cached layout, written as OMML and read back from OMML for a common subset (crates/xlsx/src/omml.rs). The source is capped: 4 KB, nesting 32, at most 2,500 matrix cells, no macro definitions (crates/math/src/lib.rs).INDEX(A1:C3,2) on a 2-D reference is #REF!; REGEXREPLACE bounds each replacement; a 16-million-cell budget is charged before scanning; arrays the text functions build are capped, and TEXTJOIN and CONCAT build into a capped output instead of first copying every input (crates/functions/src/text.rs)..xlsx is native read/write: cells, shared/array/dynamic/legacy formulas, styles incl. per-cell reading direction, themes (per-script typefaces; <scheme val="minor"/> kept), merges, conditional formats, validation, tables, notes and threaded comments, hyperlinks, names, freeze panes, outlines, print settings, pictures (shared media written once), shapes incl. ink, sparklines, form controls, PivotTables, sheet/workbook protection and Allow Edit Ranges, calc settings — each sheet keeps its sheetId across a rewrite, and a formula an edit does not change keeps its stored text exactly as saved (crates/formula/src/adjust.rs, crates/formula/tests/it/adjust_oracle.rs)..xlsm / .xltm keep their VBA project byte-for-byte; macros are never executed. .xltx/.xltm save with the template content type..xls/.xlt (BIFF8: values, formulas — now with the legacy implicit-@ reading — number formats, merges, sizes, names, calc and sheet-display settings; duplicate sheet names are refused, chart/macro/dialog sheets skipped), .xlsb and .ods (worksheet values and cached formula results only), and .slk SYLK (values, R1C1 formulas converted to A1, number formats, column widths; save refused).file.open {csvAsText:true} keeps every field as text. .json/.scjson is a debug serde dump. HTML: file.exportHtml writes one sheet as a table (pictures as data-URI images, charts as inline SVG, at most 100,001 rows), and opening a page imports its table as a sheet (header cells bold; x:num values only when values are read; no full HTML document model). The charts on one exported page share a 64 MiB SVG budget and the export fails past it rather than dropping a chart (crates/engine/src/chart_svg.rs)..pdf export: own PDF 1.7 writer; file.exportPdf {path?, sheets?: active|all, range?, fitToPage?} returns {pages, bytes, path} or base64; file.print returns the same PDF. http(s) hyperlinks and internal cell destinations become real PDF link annotations; file: links are omitted..xlsx open (Agile AES and Standard encryption, [MS-OFFCRYPTO]) via a password param; the Agile dataIntegrity HMAC is verified. RC4/Extensible and encrypted .xls are refused..xls, .xlsb, .ods and .slk with an explanatory message. Content wins over the extension.ChartKinds (unchanged at v0.19.1): column/bar/line/pie/doughnut/area/scatter/bubble/radar/histogram/waterfall/funnel/treemap/sunburst/box-whisker/stock/combo and subtypes; chartex parts for histogram/box-whisker/waterfall/funnel/treemap/sunburst, six trendline types, Recommended Charts, Select Data, Switch Row/Column, Change Type/Colours/Layout. A doughnut draws every series as its own concentric ring.2,000,000 / series points and no series is dropped — and at most 16 trendlines per chart (crates/chart/src/resolve.rs, crates/chart/src/tests/budget.rs). Label fitting and legend measuring avoid hundreds of text layouts per render (crates/chart/src/render/legend.rs, crates/ui-egui/src/chartview.rs).crates/engine/src/cmd/analysis.rs).craft-print library, Page Setup, Page Break Preview, Page Layout view with rulers, draggable margins and in-place header/footer editing.Cargo.lock) and lays text out with Unicode bidi (unicode-bidi = "=0.3.18" in crates/ui-egui/Cargo.toml); cells, the in-cell editor and the formula bar follow the cell's reading direction, caret movement and word deletion are visual (crates/ui-egui/tests/{arabic_bidi,arabic_editing}.rs). Arabic faces are part of the fallback chains — fontconfig's pick, then system faces (Geeza Pro on macOS, Tahoma/Arial/Segoe UI on Windows, Noto Sans/Naskh Arabic on Linux) and craft-fonts' Noto Sans Arabic (crates/ui-egui/src/theme/font_fallback.rs, crates/ui-egui/src/craft_fonts_policy.rs).crates/ui-egui/src/grid/quadrant.rs, crates/ui-egui/tests/cjk_baseline.rs, docs/ui-parity.md).crates/engine/src/cmd/format/sizes.rs).B1 (Gregorian) and B2 (Hijri) calendar prefixes are hidden and B2 renders the tabular Hijri calendar with Arabic month/weekday names; a misplaced prefix makes the code General and TEXT return #VALUE! (crates/numfmt/src/calendar.rs, crates/numfmt/src/parse.rs, tests in crates/numfmt/src/tests.rs). Values round on Excel's 15-significant-digit decimal string, half away from zero, so 0.00 shows 2.675 as 2.68 (crates/numfmt/src/decimal.rs, crates/numfmt/tests/golden/).Language::ALL): en, es, el, zh, ja, ko, ru, pt-BR, de, cs, fr, sr, pl, it, uk, vi, nl, ro, tr. Untranslated strings fall back to English; command ids, document text, formulas and number formats stay English/en-US. app.language.set {language|code} switches at runtime.Counts at v0.19.1, with v0.17.0 in brackets where it differs: 385 engine commands (unchanged); 281/296 catalog ids (unchanged); 22 MCP tools (unchanged); 12 CLI subcommands (11); 35 control method names in 30 dispatch arms (unchanged) plus command-id passthrough; 18 UI-only command ids (unchanged); 72 shortcut bindings on command specs (unchanged) plus 5 macOS-only overrides; 413 key-tip sequences (unchanged); 19 interface languages (unchanged); 26 chart kinds (unchanged); 513/523 worksheet functions (unchanged); 3 MCP resources (unchanged); 14 check round-trip categories (unchanged).
apps/gridcraft/src/control_server.rs:4-5,23-29,59-73; gridcraft_mcp::control_auth). The token is --control-token <token> or GRIDCRAFT_CONTROL_TOKEN (at least 16 characters), else 256 random bits written to a file only the user can read whose path is printed to stderr ($XDG_RUNTIME_DIR/gridcraft/control-<port>.token, else ~/.cache/gridcraft/…; Windows %USERPROFILE%\.gridcraft\…). gridcraft-cli send and mcp --connect read it automatically.gridcraft-cli (headless; the app bundle ships no CLI): info, convert, eval, cat, run, check, sandbox-check, commands, functions, mcp, send, version — 12 subcommands (apps/gridcraft-cli/src/main.rs:85-96). Version 0.19.1.sandbox-check (new): with no program it runs a confined copy of itself that tries each action the sandbox must deny (reading outside the policy, writing, TCP, starting a process) plus two that must still work (a thread, reading an allowed file) and prints one line per attempt; with -- PROGRAM ARGS… it runs that program confined (--read PATH/--exec PATH add policy paths). Exit 0 = everything as required, 1 = not (a refused launch included), 2 = GridCraft has no sandbox for this system (apps/gridcraft-cli/src/sandbox_check.rs, docs/sandbox.md). macOS needs /usr/bin/sandbox-exec (deprecated by Apple); Linux needs Landlock ABI 3 (kernel 6.2). Windows, BSD and the web have none.check is the one to remember: it recalculates every formula against the file's Excel-cached values (skipping volatile formulas and files flagged fullCalcOnLoad), then writes and re-reads the workbook through GridCraft's own XLSX writer and compares 14 categories — package, sheets, values, formulas, numFmts, merges, names, tables, condFormats, validations, charts, comments, hyperlinks, pivots — and validates the package. Flags --tolerance 1e-9 and --max-report N; exit 1 on any difference; --json emits schema gridcraft-check/1.2025-06-18 (older clients are answered in their own version); headless (--in FILE | --sample NAME) or remote (--connect PORT). 22 tools: execute_command, list_commands, inspect_workbook, read_range, write_range, set_cell, get_cell, evaluate_formula, select, format_range, insert_chart, create_table, sort_range, filter, open_workbook, save_workbook, new_workbook, undo, redo, screenshot, list_functions, list_windows. A message over 16 MB is answered with -32600 ("message too large (16 MB max)") and dropped, without allocating it (crates/mcp/src/server.rs). Resources: gridcraft://workbook, gridcraft://commands, gridcraft://functions; prompts/list is empty.engine.execute (aliases command, ui.menu.invoke), engine.commands, engine.journal (10,000 entries / 64 MB, passwords stripped), document.inspect, sheet.read, cell.get, selection.stats, ui.inspect; objects and UI — ui.object.select, ui.ribbon, ui.set, ui.dialog, ui.dialog.set|confirm|cancel, ui.message.dismiss, ui.edit.begin|text|commit|cancel, ui.key, ui.text, ui.move, ui.click, ui.drag, ui.cell.click, ui.cell.drag, ui.resize, ui.focus, ui.screenshot; files and lifetime — app.open, app.save, app.quit. Any other method that names an engine command id runs that command (crates/ui-egui/src/control.rs).engine.execute in the running app (so also over mcp --connect, not in a headless gridcraft-cli mcp session); engine.commands marks them "ui": true and serves 18: ui.ribbonTab, app.checkForUpdates, view.collapseRibbon, view.expandFormulaBar, ui.pythonMode, view.darkMode, view.theme, view.animations, options.autoComplete, options.highlightActiveRow, view.interfaceScale, ui.dialog, ui.backstage, ui.printSettings, ui.printSubmit, app.language.set, app.language.english, app.language.japanese (crates/ui-egui/src/control.rs serves the list; crates/ui-egui/src/app/commands.rs runs them).automate.recordActions, automate.newScript, automate.allScripts, automate.runScript, automate.trustScripts, automate.deleteScript, automate.stopAction. A workbook opened from a file that carries scripts starts untrusted; steps may not call file.*, link.* or window.* or pass a path. Scripts are stored in the workbook as the hidden defined name _sc_scripts, so they round-trip XLSX.Trust, and the chunked hidden-name stash _gc_<key>_<n>.?sample=, ?webgl, ?chrome=none|notitlebar|nofiletab, ?host=parent&author=; data-host="page" on the canvas lets a page host GridCraft in its own document (apps/gridcraft-web/src/host.rs, shared crate craft-web-host); preferences in localStorage; no TCP control channel. window.gridcraft (new) is on the page in every mode: request(method, params) calls any control method, and execute, commands, docInspect, uiInspect, screenshot are shortcuts; each returns a Promise that rejects after 30 s, and a call the app had not started is skipped (apps/gridcraft-web/src/api.rs, packaging/web/README.md).file.open/file.save/data.getData/data.fromTextCsv without a file path return "missing path…: programmatic calls never open dialogs"..xls import covers values, formulas, number formats, merges, sizes, names, print area/titles, calc settings and WINDOW2 sheet-display options; no fonts, fills, borders, charts, pictures, comments, conditional formats, validation, hyperlinks or freeze panes; chart/macro/dialog sheets are skipped, BIFF5 and FILEPASS files refused. .xlsb/.ods import values and cached formula results only. .slk import is values, R1C1 formulas, formats and widths only. None of the four is ever written.crates/sandbox confines a spawned helper process and only gridcraft-cli sandbox-check starts it today; Python cells still show #BLOCKED! for new or changed code and never execute (docs/sandbox.md, crates/engine/src/cmd/python.rs). A framework-build Python that re-execs its real interpreter is refused by the macOS profile, and Python's asyncio has no socket pair on Linux.crates/core/src/region.rs holds CLDR-derived conventions and Workbook::region exists, but no UI page, command or format path reads it: typing 1.234,56 or seeing 25/09/2026 still does not depend on a region — everything is en-US (crates/model/src/workbook.rs:271-276)..xlsx open with a password; saves are always unencrypted and have no save path, so Save asks where to go. RC4/Extensible and encrypted .xls are refused..xlsm/.xltm; any other save drops it. GridCraft's recorded scripts are not VBA.#BLOCKED!, and there is no PY worksheet function.gridcraft-math's layout, not a full Office equation editor; macros, very deep nesting and large matrices are refused rather than laid out.extLst; chart sheets are passed through unchanged but cannot be viewed, edited or created (open now warns for each skipped drawing/chart).GETPIVOTDATA, timelines, PivotCharts command, number grouping or data-model pivots; filter items select labels only (no Top-10, condition or value filters); Show Details and Enable show details exist but have no Options dialog; XLSX round-trip has not been checked in Excel.data.fromWeb is absent), Stocks, Geography, Relationships or Analyze Data.docs/localization-parity.md still carries a stale sentence claiming Arabic does not join or reorder — check Arabic joining and vowel-mark placement visually before promising typographic quality; a right-to-left sheet mirrors the grid, and text follows its cell's reading direction inside its box, but sheet tabs, the horizontal scrollbar and printing/PDF are not mirrored. PDF export sets characters outside WinAnsi in a predefined, non-embedded Adobe-GB1 CID font (STSong-Light / UniGB-UTF16-H): Chinese is tested; Japanese/Korean coverage depends on that font; Arabic/Devanagari/Thai have no glyphs there, and PDF/printing do not apply bidi.docs/localization-parity.md).docs/function-parity.md's headline agrees with the code; its totals row (505/496, "18 missing") is stale — the honest split is 513 present, 10 absent, 9 stubs.file.exportHtml writes one sheet; there is no HTML editing.control.press on a workbook that came from a file asks for approval..xlsx and .json saves clear the dirty flag and become the document's file; .csv/.tsv/.html/.pdf are exports that leave the workbook dirty; .xls/.xlsb/.ods/.slk saves are refused. file.close {force:true} and the control-channel app.quit discard unsaved changes without asking.docs/target-app-parity.md:58 still reports "321 command ids" (the registry has 385); docs/gaps.md still says "59 command shortcuts" (command specs carry 72) and its §5 was merged with the new Arabic paragraph leaving both an updated and an obsolete "Missing/Evidence" pair; docs/function-parity.md's totals row disagrees with its own headline. Prefer code and the generated docs/parity-checklist.md.open -a GridCraft; open -a GridCraft book.xlsx — Finder double-clicks and open arrive as Apple events, and files dropped on the window open too.Contents/MacOS/GridCraft. It takes only these flags: [--control PORT [--control-token TOKEN]] [--sample budget|sales|grades] [files…], plus --version/-V, which prints GridCraft 0.19.1 and exits. There is no --help: any unrecognised flag is treated as a file path and starts the GUI, so do not pass one. Never pass the internal --sandbox-launch, --sandbox-confined, --sandbox-probe-child or --sandbox-report flags — they belong to the sandbox launcher (crates/sandbox/src/lib.rs).GRIDCRAFT_CONTROL_PORT=<port>, GRIDCRAFT_CONTROL_TOKEN=<token> (the control channel requires it), GRIDCRAFT_NO_PREFS=1 (the mode for agent test runs: no preferences read or written, no log file), GRIDCRAFT_NO_NATIVE_MENU, RUST_LOG (env_logger-style directives; default warn,gridcraft*=info).Library/Application Support/GridCraft/ in the user's home: ui.json, prefs.json, and logs/gridcraft.log, rotated to .1/.2 at each start, 16 MiB cap.The bundle ships no CLI. Install with cargo install --path apps/gridcraft-cli from a source checkout, or the release zip gridcraft-cli-<ver>-macos-universal.zip.
gridcraft-cli info book.xlsx [--json]
gridcraft-cli convert in.xls out.xlsx [--sheet Sales] # input may be .xls/.xlsb/.ods/.slk/CSV/TSV/HTML;
# output .xlsx/.csv/.tsv/.json/.html/.pdf by extension
gridcraft-cli eval '=XLOOKUP("b",{"a","b"},{1,2})' # → 2
gridcraft-cli cat book.xlsx --range A1:F20 [--formulas|--csv]
gridcraft-cli run --in book.xlsx --cmd 'cell.set={"cell":"D2","input":"=B2*C2"}' \
--cmd 'edit.fillDown={"range":"D2:D20"}' --out book.xlsx --print A1:D5
gridcraft-cli check corpus/ --json --tolerance 1e-9 # calc oracle + XLSX round-trip fidelity
gridcraft-cli sandbox-check # does this machine confine a helper process?
gridcraft-cli commands --search chart # every command and its params doc
gridcraft-cli functions --category statistical # function list with signatures
gridcraft-cli send 7979 engine.execute '{"command":"home.bold","params":{"range":"A1:C1"}}'
run flags: --in FILE | --sample NAME, repeated --cmd, --script FILE, --out FILE, repeated --print RANGE|used, --sheet, --quiet, --csv, --formulas. A --cmd is id, id={json} or id {json}; a script has one step per line; blank lines and #/// comments are skipped. The first failing step stops the run with a non-zero exit.convert refuses an unknown output extension; .pdf goes through file.exportPdf and reports bytes/pages; converting a .slk works because the input side reads SYLK.check never writes next to its inputs. --json output is schema gridcraft-check/1.sandbox-check prints sandbox: available (…)/sandbox: unsupported (…) first, then one line per attempt; it writes nothing.claude mcp add gridcraft -- gridcraft-cli mcp # headless in-process session
claude mcp add gridcraft-app -- gridcraft-cli mcp --connect 7979 # drive the visible app
Results are one text block holding pretty JSON; failures set isError: true. Unknown tools, missing/wrong arguments are JSON-RPC -32602; malformed JSON -32700; unknown methods -32601; a message over 16 MB is -32600 and dropped. The remote backend uses a 30 s socket timeout: after a timeout, re-read the state instead of retrying blind. list_windows enumerates the open workbook windows; address a window where the backend accepts it.
GridCraft --sample sales --control 7979
# stderr prints the token file path (or use --control-token / GRIDCRAFT_CONTROL_TOKEN), then
# newline-delimited JSON to 127.0.0.1:7979 — the FIRST line must authenticate with the token:
{"id":0,"method":"auth","params":{"token":"<token>"}}
{"id":1,"method":"engine.execute","params":{"command":"cell.set","params":{"cell":"B2","input":"=SUM(A1:A9)"}}}
{"id":2,"method":"engine.execute","params":{"command":"home.formatCells","params":{"range":"C2","style":{"align":{"reading_order":"RightToLeft"}}}}}
{"id":3,"method":"ui.screenshot","params":{"path":"shot.png"}}
gridcraft-cli send reads the token file automatically.ui.inspect first (ribbon tab, editor, open dialog, Backstage page, message, grid rect, scroll, perf, windows) and act on what it shows; ui.screenshot needs a presented frame.ui.dialog.confirm sends exactly what the dialog's OK sends; dialogs without an OK command return "this dialog has no OK command; drive it with its own commands".view.newWindow shares the workbook (no clone; saving from either window saves it), view.arrangeAll tiles, window.list/window.close manage windows, and view.switchWindows/window.activate switch workbooks. Sheet tabs at the bottom. File opens the Backstage with 9 pages: home, new (three samples), open (recents), info, saveAs, print, export, options, account.file.save, file.saveAs, ⌘S, ⇧⌘S): the extension picks the format — .xlsx (default), .csv, .tsv, .json, .html, .pdf; a .pdf save exports the sheet and leaves the document dirty. file.saveBytes {format} returns base64 without writing.file.exportPdf, file.exportCsv, file.exportHtml, file.printPreview, and on the desktop ui.printSettings / ui.printSubmit (native jobs via craft-print)..xls/.xlsb/.ods produces a document titled <name> (imported).xlsx with no save path; a .slk keeps its own name and path, so a later Save is refused (SYLK is import-only) — Save As .xlsx first. Opening an already-open path switches to it; a password-decrypted workbook also has no save path.crates/ui-egui/src/keymap.rs).Prefer headless over GUI. For read/write/convert/verify jobs use gridcraft-cli (or MCP) on files: no window, no preferences (set GRIDCRAFT_NO_PREFS=1 if you launch the app), deterministic. Drive the GUI over the control channel only when the task is genuinely about the UI. Never drive blind — ui.inspect/ui.screenshot before and after.
Legitimate agent work:
.xlsx from commands (gridcraft-cli run --script steps.jsonl), convert .xls/.xlsb/.ods/.slk/CSV/TSV/HTML into .xlsx, or generate CSV/TSV/JSON and import. Use file.open {csvAsText:true} when leading zeros must survive. Remember an import opens as an unsaved "(imported).xlsx".info, check), fix with commands or formulas, save as .xlsx. Do not promise recovery of parts GridCraft does not model. Opening recalculates, so read a file's cached values through gridcraft-cli check/package inspection rather than by opening it in a session. Legacy formulas that arrive without dynamic-array metadata are read with implicit @, so their values match Excel instead of spilling — but a formula whose text you rewrite is saved with dynamic-array metadata if it really is dynamic.gridcraft-cli check on round-tripped files, compare cat/info output against expectations, check PDF page counts and links. A zero exit from check means GridCraft agrees with itself and with the file's cached values; it does not prove Excel will open the file without a repair prompt.home.formatCells {range, style:{align:{reading_order:"RightToLeft"}}} (or Context to follow the text); do not mirror the whole sheet to make one cell read correctly — view.rightToLeft is a sheet-geometry switch and does not change text direction. Arabic in PDF is still unsupported: verify by rendering, and do not promise a PDF with Arabic glyphs.automate.stopAction.gridcraft-cli sandbox-check (read-only, prints a report) before relying on confinement on a new machine; exit 2 means this platform has none. Do not claim Python cells run under it — they do not run at all.view.newWindow shares the workbook — two windows, one document; list_windows (MCP) and window.list enumerate them; view.arrangeAll tiles.ui.object.select before clicking or dragging it, and use control.list/control.setValue rather than clicking a slider or spin button by coordinates. control.press on a workbook that came from a file asks for approval — pass approve only when the user asked for that action.window.gridcraft (request/execute/…) instead of a socket; the same command ids and methods apply, with a 30 s promise timeout.Must NOT attempt:
.xls/.xlsb/.ods/.slk, or saving password protection; expecting macros or Python to run; expecting slicers/timelines to survive a save; assuming a full HTML document import.1.234,56, localized month names, Hijri via a region) — the region table is not wired; only the B1/B2 format prefixes work..xlsx files that contain unmodelled parts: GridCraft's own writer is the supported path, and even it drops parts it does not model once it rewrites them. Prefer read-only analysis of such files.docs/formula-input.md: Spanish input/display exists, but files, commands and APIs use canonical English names and , separators.app.quit or file.close {force:true} while a workbook has unsaved changes: both discard them silently. Save first.--control port without the token (the connection is closed), or assuming the channel is unauthenticated — it is not..xlsx → reopen (or gridcraft-cli info/cat) → gridcraft-cli check file.xlsx. Add the source file itself to check when testing formula fidelity, and include a legacy (pre-dynamic-array) formula file if the task involves one.--out) rather than at the end.evidence.md against the new tag.cell.get, sheet.read, document.inspect) before retrying: a queued request is dropped, but one already taken may still finish.automate.trustScripts on a workbook you did not create unless the user asked you to run its scripts.476448d7d9f3a5f8e93fcf7d98b47fd52293fe7f ("Merge tested main for Flatpak update patch release"). The v0.17.0 tag (a6a6a49a0415087474251b08e887a3581fab9e14) was inspected for id and count diffs. The installed bundle GridCraft.app in the system Applications folder matches the tag: Contents/Info.plist reads CFBundleShortVersionString 0.19.1 / CFBundleIdentifier ai.storyteller.gridcraft, and its binary prints GridCraft 0.19.1. If your installed version differs, verify against it.--version).README.md, Cargo.toml, ROADMAP.md, docs/{cli,mcp,control-protocol,parity-checklist,function-parity,chart-parity,file-format-parity,gaps,target-app-parity,formula-input,sandbox,feature-names,ui-parity,localization-parity,architecture}.md, apps/gridcraft-cli/src/{main.rs,sandbox_check.rs,check/fidelity.rs,check/calc.rs,check/package.rs}, apps/gridcraft/src/{main.rs,control_server.rs}, apps/gridcraft-web/src/{main.rs,web.rs,api.rs,host.rs}, crates/sandbox/src/{lib.rs,policy.rs,canary.rs,probe.rs,macos.rs,linux.rs}, crates/engine/src/{io.rs,io/sylk.rs,lib.rs,sample.rs,catalog.rs,cmd.rs,display.rs,chart_svg.rs}, crates/engine/src/cmd/ (incl. controls.rs, extra.rs, view.rs, edit.rs, edit/{find,go_to,paste_special,clipboard}.rs, python.rs, equation.rs, solver.rs, analysis.rs, format.rs, format/sizes.rs), crates/xlsx/src/{array_formula.rs,controls.rs,omml.rs,python_part.rs,read.rs,write.rs,sheet_read.rs,sheet_write.rs,drawing.rs,package.rs,csv.rs,styles.rs,xls.rs}, crates/pdf/src/lib.rs, crates/mcp/src/{tools.rs,server.rs,backend.rs,control_auth.rs}, crates/ui-egui/src/{control.rs,keymap.rs,backstage.rs,objects.rs,form_controls.rs,text_direction.rs,formula_bar.rs,chartview.rs,theme/font_fallback.rs,app/commands.rs,app/clipboard.rs,i18n.rs}, crates/ui-egui/src/keytips/{keytips.json,keytip_table/generated.rs}, crates/ui-egui/tests/{arabic_bidi,arabic_editing,cjk_baseline,display_names,flatpak_updates}.rs, crates/model/src/{features.rs,style.rs,workbook.rs,sheet.rs,cell.rs}, crates/numfmt/src/{calendar.rs,decimal.rs,render.rs,tests.rs}, crates/core/src/region.rs, crates/chart/src/{resolve.rs,trend.rs,tests/budget.rs}, crates/functions/src/{lookup.rs,text.rs,info.rs}, crates/math/src/lib.rs, crates/calc/src/{eval.rs,recalc.rs,spill_index.rs}, packaging/web/README.md, apps/gridcraft/Cargo.toml, apps/gridcraft-web/Cargo.toml.evidence.md §5): engine commands by cmd! first-literal ids reachable from command_specs() plus the one explicit CommandSpec literal (review.allowEditRanges) — 385 at both tags, set-diff +0/−0; catalog coverage by intersecting the 296 distinct crates/engine/src/catalog.rs ids with registered ids (281, matching docs/parity-checklist.md); MCP tools by tool( calls in crates/mcp/src/tools.rs (22, same names); CLI subcommands by the Some(…) dispatch arms of main() (12 vs 11); control methods by the handle match arms (35/30); UI-only ids by the engine.commands array (18); shortcut bindings by the non-None fourth cmd! argument (72) plus 5 shortcut_mac overrides; key-tip sequences by keytips.json and the generated table (413 each); languages by Language::ALL (19); chart kinds by the ChartKind enum (26); functions by f! names outside #[cfg(test)] modules plus SPECIAL_FUNCTIONS, minus the two names not on Microsoft's list (USDOLLAR, ECMA.CEILING) → 513 present, 10 absent, 9 stubs; check categories by the 14 Diffs::new calls (package plus 13).6e03f65bf45181db77ba6229716e6624db9eb25b for craft-update, craft-window, craft-ui and craft-print; craft-web-host and craft-web-api at fd5e2feff6ea25bed371a99cc732b3968d621505; the egui 0.37 fork at 6d518fc799681571963842f95b55a6b68431b15a (Cargo.toml, Cargo.lock).docs/target-app-parity.md, docs/gaps.md, docs/architecture.md, docs/parity-checklist.md, docs/sandbox.md.