[File-systemA1for AI]

FSA1

A file-system based spreadsheet format designed for AI agents.

Install it and reduce token spend by 98%1

[ FSA1 core idea ]

Tabs are folders.
Cells are files.Styling is CSS. Figures are JSON.

$ find Q3 | sort Q3 Q3/Charts Q3/Charts/A12:E21.json Q3/Charts/A1:E10.json Q3/Orders Q3/Orders/A1:D1 Q3/Orders/A2:A4 Q3/Orders/A5:C5 Q3/Orders/B2:B4 Q3/Orders/C2:C4 Q3/Orders/D2:D4 Q3/Orders/D5 Q3/Orders/D5.css Q3/Orders/F1:L12.json Q3/Summary Q3/Summary/A1:B1 Q3/Summary/A2:B2 $ cat Q3/Orders/D2:D4 =B2*C2 =B3*C3 =B4*C4
$ fsa1-cli render Q3/Orders +----+------+-------+-----+--------------------+---+-----+-----+-----+-----+-----+-----+-----+ | | A | B | C | D | E | F | G | H | I | J | K | L | +============================================================================================+ | 1 | Item | Price | Qty | Total | | | |----+------+-------+-----+--------------------+---+ | | 2 | Nut | 10 | 4 | 40 ← =B2*C2 | | | |----+------+-------+-----+--------------------+---+ | | 3 | Bolt | 15 | 2 | 30 ← =B3*C3 | | | |----+------+-------+-----+--------------------+---+ | | 4 | Cog | 4 | 10 | 40 ← =B4*C4 | | | |----+------+-------+-----+--------------------+---+ | | 5 | Sum | | | $110 ← =SUM(D2:D4) | | | |----+------+-------+-----+--------------------+---+ | | 6 | | | | | | F1:L12.json | |----+------+-------+-----+--------------------+---+ | | 7 | | | | | | layer(bar, text, rule)←Orders!A1:D4 | |----+------+-------+-----+--------------------+---+ | | 8 | | | | | | | |----+------+-------+-----+--------------------+---+ | | 9 | | | | | | | |----+------+-------+-----+--------------------+---+ | | 10 | | | | | | | |----+------+-------+-----+--------------------+---+ | | 11 | | | | | | | |----+------+-------+-----+--------------------+---+ | | 12 | | | | | | | +----+------+-------+-----+--------------------+---+-----------------------------------------+ $ fsa1-cli render Q3/Summary +---+--------+------------------+ | | A | B | +===============================+ | 1 | Metric | Value | |---+--------+------------------| | 2 | Sales | 110 ← =Orders!D5 | +---+--------+------------------+

[ FSA1 definition ]

It starts as a .xlsx.
This is what it becomes.

$ fsa1-cli unpack Q3.xlsx $ cat Q3/Orders/D5 =FUNCTION~NUMBER-FORMAT $ cat Q3/Orders/RANGE.css CSS-STYLING
$ fsa1-cli unpack Q3.xlsx $ cat Q3/Orders/D5 =SUM(D2:D4)~$#,##0 $ cat Q3/Orders/D5.css fsa1-cell { border-top: 2px solid #1b6b58 }

[ FSA1 advantages ]

[ FSA1 rendering ]

fsa1-cli renders the output
but never writes to the cells.

+----+------+-------+-----+--------------------+---+-----+-----+-----+-----+-----+-----+-----+ | | A | B | C | D | E | F | G | H | I | J | K | L | +============================================================================================+ | 1 | Item | Price | Qty | Total | | | |----+------+-------+-----+--------------------+---+ | | 2 | Nut | 10 | 4 | 40 ← =B2*C2 | | | |----+------+-------+-----+--------------------+---+ | | 3 | Bolt | 15 | 2 | 30 ← =B3*C3 | | | |----+------+-------+-----+--------------------+---+ | | 4 | Cog | 4 | 10 | 40 ← =B4*C4 | | | |----+------+-------+-----+--------------------+---+ | | 5 | Sum | | | $110 ← =SUM(D2:D4) | | | |----+------+-------+-----+--------------------+---+ | | 6 | | | | | | F1:L12.json | |----+------+-------+-----+--------------------+---+ | | 7 | | | | | | layer(bar, text, rule)←Orders!A1:D4 | |----+------+-------+-----+--------------------+---+ | | 8 | | | | | | | |----+------+-------+-----+--------------------+---+ | | 9 | | | | | | | |----+------+-------+-----+--------------------+---+ | | 10 | | | | | | | |----+------+-------+-----+--------------------+---+ | | 11 | | | | | | | |----+------+-------+-----+--------------------+---+ | | 12 | | | | | | | +----+------+-------+-----+--------------------+---+-----------------------------------------+
$ fsa1-cli render Q3/Orders
OrdersABCDEFGHIJKL123456789101112ItemPriceQtyTotalNut10440Bolt15230Cog41040Sum$110
$ fsa1-cli render Q3/Orders --format html > out.html

[ FSA1 authoring ]

Agents use whichever tool
is cheapest for the edit.

# a redirect $ printf '99\n15\n4\n' > Orders/B2:B4
# one line of bash $ sed -i s/Cog/Washer/ Orders/A2:A4
# a script it wrote itself $ ./write_cells.py Orders/D5 =SUM(D2:D4)
# its own file-editing tool Edit("Orders/C2:C4", old="10", new="12")