Repository navigation
v0.2.0
Phase 6 of the plan: the TypeScript and Python legs, and the dark-slide and
holy-sheet profiles in all three. Nothing to do for a PHP consumer -- every
change to the PHP leg below either adds a profile or accepts a template the spec
always allowed; nothing that rendered before renders differently.
Added
-
The
$valuesplice (owner ruling 2026-10-27, "Agent: add $value
splice"), SPEC.md section 8:{"$each": "<path>", "$as": "<name>", "$value": <any JSON>}as an item of any array is replaced in place by one rendered copy
of$valueper element, so a holy-sheet ROW, a cell or a string in a list can
repeat.$valuerenders as if written at the element's position (a spliced
row's strings are still{ "value": s }), may contain directives under the
samedirectiveDepth, and counts towarditerationsandoutputNodeslike
$each.$valuewithout$eachisDIRECTIVE_INVALID; a non-$key beside
it is the newDIRECTIVE_SPLICE_KEY. Rows: fancy-conformance 0.36.0.
Implemented in all three legs (Inspector + Renderer). Against the 0.36.0
fixtures with the pre-splice code, all 24 new or changed rows failed in every
leg; with it, all 203 pass in every leg, 211/211 byte-identical across legs
(parity.php), 0% under--control, 60/60 through the real writers. The xlsx
corpus report now repeats its quarter rows with a splice instead of
addressing them by index. Nine sabotages per leg (S33-S41,T33-T41,
P33-P41):$valuewithout$each, a key beside it,directiveDepth
inside it, the splice object counting no node, one iteration counter for every
loop, the element's path for the profile, its top not being an element, a
null$valuestill splicing, and plain notes in the profile data. -
TypeScript leg,
@particle-academy/fancy-template(src/,tests/;
ESM + CJS + types via tsup). Same API as PHP:inspect,validateData,
render,preview,tokenize,TemplateError { code, path, variable }.
Written against SPEC.md, not against the PHP source. Depends on
@particle-academy/fancy-expr>=0.2.0 <2.0only. Scans UTF-8 bytes so the
token-length bound means what it means in PHP; every key read and write goes
through own-property helpers, so a template or data key spelled__proto__
orconstructoris only ever a key. -
Python leg,
fancy-template(python/, Python >= 3.11, typed). API in
snake_case (validate_data). Depends onfancy-expr>=0.2.0,<2.0only. Every
walk of unknown depth is iterative;boolis never a number; names, digits
and dates are ASCII-only; a hoststr/intsubclass is read through its base
type, so no host method runs. -
dark-slide and holy-sheet profiles, in all three legs: the
markup,
markdownandcellencodings. dark-slide values are CommonMark-escaped in
format: "markdown"content and entity-escaped informat: "html";
every holy-sheet string result is written{ "value": s }, so user data can
never become a formula. A whole-token number or boolean keeps its type, and so
does a valid date whose path is DECLAREDdate(SPEC.md section 9, clarified). -
All 203
template/*rows of fancy-conformance 0.36.0 pass in every leg,
none skipped. The fixture pin moved 0.35.0 -> 0.36.0 together in
composer.json (exact), package.json (^0.36.0) + package-lock.json, the
threePINNED_SUITE_VERSIONconstants and both CI checkout refs. -
Cross-leg parity (
php php/tests/parity.php): every fixture row and a
corpus of realistic templates (examples/: certificate, invoice with$each
line items, a deck with a repeated slide and repeated table rows, a regional
xlsx report) run through all three legs and compared byte for byte -- 203/203
against the expected column in each leg, 211/211 between the legs;--control
reports 0% on every column.--writersrenders the corpus through the real
writers (fine-print; last-word, dark-slide and holy-sheet in PHP, Node and
Python) and compares the extracted text: 60/60 files identical. -
scripts/sabotage.pycovers all three legs and fancy-expr's bounds in all
three of its languages: 134 sabotages (40 PHP, 42 TypeScript, 43 Python, 9
fancy-expr), each turning a suite red.S29/T29/P29("notes always
markdown-escaped") were retired with that rule. -
CI:
node,pythonandparityjobs. Publish: npm (Trusted Publishing,
provenance) and PyPI (build and publish split soid-token: writenever runs
build code), both behind the read-onlyguardjob and the changelog gate,
which now BLOCKS them. Both names need the owner's one-time bootstrap.
Changed
- dark-slide speaker notes are plain text (owner ruling 2026-10-27,
"Agent: notes are plain"), SPEC.md section 9: the profile'sslides.*.notes
istext, notmarkdown, so a value is no longer backslash-escaped there.
The PPTX writer writes notes as plain text and fancy-slides edits them in a
plain textarea, so the escape printed its backslashes in both. Unreleased
until now in every leg, so no consumer has the old behaviour. Row:
fancy-conformance 0.36.0template/profiles0104. - The PHP test that ran the 11
skip.phprows explicitly and asserted there
were 11 is replaced by one asserting notemplate/*row is skipped for PHP.
0.36.0 dropped the skips; the old test's own comment said to delete it then.
Fixed
PHP leg disagreements with SPEC.md, found by building the other two legs against
the spec. Each landed with a test that failed against the old code.
- A
$ifwritten BEFORE its$eachin the same object was refused as
DIRECTIVE_UNDECLARED: the binding was only created when the inspector
reached$eachin key order. Section 8 says$eachruns first. templateBytesskipped object keys spelled with digits ("10"), because PHP
decodes them as integer keys. Section 10 counts every key.maxLength/maxItemswritten3.0, andfancyTemplatewritten1.0,
were refused. Section 3 defines integer as an integral value, and JavaScript
cannot even tell3.0from3.