Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
416 commits
Select commit Hold shift + click to select a range
3abd328
Merge branch 'wt/themed-parts' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
69d4e4d
Merge branch 'wt/frame-tail' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
0edb371
Spreadsheets: a BIFF header string's length field is one byte in BIFF5
claude Jul 31, 2026
ff53e69
Number a page's notes afresh where the document asks, then stop
claude Jul 31, 2026
96f0c47
Presentations: write down what draws, what does not, and why
claude Jul 31, 2026
ba11d82
Merge the two rendering-found layout bugs and the note-restart pass
claude Jul 31, 2026
f479975
Merge branch 'wt/slide-render' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
bdb25ae
Merge slide rendering and right-to-left text
claude Jul 31, 2026
76485a8
Merge branch 'wt/sheet-print' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
40a8c70
Merge pull request #5 from theolivenbaum/claude/paperless-odf-phase-1…
theolivenbaum Jul 31, 2026
c57248a
Rendering: take a glyph's width off the run when the face's file will…
claude Jul 31, 2026
f1c51f1
Presentations: draw a slide's tables, and skip hidden slides in the p…
claude Jul 31, 2026
b0960b0
Spreadsheets: draw a cell's text in its own font, aligned as Calc ali…
claude Jul 31, 2026
6085294
Rendering: draw gradients, tiled bitmap fills and decoded pictures
claude Jul 31, 2026
12c6cf3
Presentations: measure the slide table against LibreOffice, and add t…
claude Jul 31, 2026
7877be6
Rendering: pin the new paints in both backends and against LibreOffice
claude Jul 31, 2026
fe07ec3
Rendering: give a fading gradient a soft mask in PDF, so both backend…
claude Jul 31, 2026
392dd4a
Spreadsheets: draw what a printed sheet holds besides its cells' text
claude Jul 31, 2026
0d39e12
Spreadsheets: read the cell formats all three formats state
claude Jul 31, 2026
19269a3
Write down what the fills draw, what was measured, and what is left
claude Jul 31, 2026
611f311
Spreadsheets: write down what the decoration path draws, and what it …
claude Jul 31, 2026
bcac5bb
Spreadsheets: say why the path field gets a name
claude Jul 31, 2026
122b7f1
Spreadsheets: close a border where the next placed row is not the nex…
claude Jul 31, 2026
1c4f913
Spreadsheets: measure cell text against LibreOffice, and write down t…
claude Jul 31, 2026
223df59
Merge branch 'wt/paint-images' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
ede254c
Presentations: evaluate all 187 preset geometries, dashes, arrowheads…
claude Jul 31, 2026
fb7b8db
Spreadsheets: record the suite's new size beside the measurements
claude Jul 31, 2026
5b9da58
Presentations: write down what the tables, presets, dashes and number…
claude Jul 31, 2026
31c69e5
Bring the master plan status back in line with the tree
claude Jul 31, 2026
2b8d344
Presentations: record that a raster export has no opinion about hidde…
claude Jul 31, 2026
ef3df63
Merge branch 'wt/slide-shapes' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
83b8f73
Merge branch 'wt/sheet-text': one sheet, its text and its decoration
claude Jul 31, 2026
1f24e88
Merge branch 'wt/sheet-merge' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
79941ac
Merge pull request #6 from theolivenbaum/claude/paperless-odf-phase-1…
theolivenbaum Aug 1, 2026
1fb3215
Let a reader emit a picture without depending on the rasteriser
claude Aug 1, 2026
b8cbfd8
Presentations: draw an ODF table through the layouter PPTX already uses
claude Aug 1, 2026
0c7181c
Word processing: read an ODF picture's bytes and draw them
claude Aug 1, 2026
2756881
Presentations: lay a binary PowerPoint deck out
claude Aug 1, 2026
ad442bd
Presentations: two layout rules the binary path exposed
claude Aug 1, 2026
b7abe12
Presentations: measure the binary path against LibreOffice
claude Aug 1, 2026
22c5bf0
Presentations: write down what the binary path cost and what it bought
claude Aug 1, 2026
8c83cfe
Slides: draw pictures and gradient fills, in both PPTX and ODP
claude Aug 1, 2026
fa66655
Rendering: do not discard an image a reader has not decoded
claude Aug 1, 2026
826daf7
Presentations: record what the fills draw and what they were measured…
claude Aug 1, 2026
49d4cd1
Merge PPT binary layout: all three presentation formats render
claude Aug 1, 2026
3e9d736
Presentations: draw an ODF shape from its own enhanced path, through …
claude Aug 1, 2026
aa09f25
Vector: say what a decoded vector image is, before decoding one
claude Aug 1, 2026
b1e43d8
Vector: SVG through the seam, with LibreOffice's size rule and our ow…
claude Aug 1, 2026
be01570
Rendering: let an undecoded image draw
claude Aug 1, 2026
232c41d
Ooxml: choose a picture's SVG rendering over its raster fallback
claude Aug 1, 2026
7310605
Vector: tests, and two corpus documents that carry a real SVG
claude Aug 1, 2026
6bc4784
Spreadsheets: draw a cell whose text changes format part-way through
claude Aug 1, 2026
fe99d10
Warn that a truncated test run reports success
claude Aug 1, 2026
b9132e4
Plan the embedded-graphics phase: metafiles, charts, SmartArt
claude Aug 1, 2026
be339d7
Vector: write down what the seam is, and tighten two things reading i…
claude Aug 1, 2026
a70a55a
Spreadsheets: read which rows are sized by their content, and measure…
claude Aug 1, 2026
93d64b7
Merge branch 'wt/slide-images' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
8a41980
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' into wt/sheet-images
claude Aug 1, 2026
4e4c22f
Presentations: read an ODF outline's list style, and place a bullet w…
claude Aug 1, 2026
979d35f
Merge slide pictures and gradients, and SVG with its vector seam
claude Aug 1, 2026
1991a8c
Spreadsheets: draw a picture anchored to a cell
claude Aug 1, 2026
0a1fd91
Spreadsheets: write down the rich text, the pictures and the row height
claude Aug 1, 2026
fce0c24
Spreadsheets: one ODF length parser, not a fourth copy
claude Aug 1, 2026
b282718
Spreadsheets: say "not an anchor" with null rather than with a cast
claude Aug 1, 2026
8fc3108
Presentations: record the ODF drawing work, its measurements and what…
claude Aug 1, 2026
07dd0b7
Corpus: describe what sheet-rich-text is for, in each of its three forms
claude Aug 1, 2026
128deb2
Merge ODP tables and custom shapes: one path emitter for both vocabul…
claude Aug 1, 2026
042594a
Merge branch 'wt/sheet-images' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
d3a721e
Vector: shared metafile device context, object table, mapping and wor…
theolivenbaum Aug 1, 2026
c81eca8
Record a whole-corpus render sweep, and what it found
claude Aug 1, 2026
673ca79
Spreadsheets: record why the second horizontal page of a spilling she…
claude Aug 1, 2026
bcf8227
Vector: WMF reader, decoder and corpus fixtures
theolivenbaum Aug 1, 2026
fbd4469
Read the chart model in all three families, from the cache
claude Aug 1, 2026
df9ccd2
Vector: tests for the metafile groundwork, WMF records, scaling, bitm…
theolivenbaum Aug 1, 2026
fddeed0
Vector: write down what WMF taught, and what EMF starts from
theolivenbaum Aug 1, 2026
ad041e3
Corpus: describe the WMF fixtures and why they are hand-built
theolivenbaum Aug 1, 2026
8b13a7c
Merge branch 'wt/wmf' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
d9da983
Presentations: stop a flat ODP drawing an embedded document's markup …
claude Aug 1, 2026
bc4bd92
Record what the chart corpus measured, before and after
claude Aug 1, 2026
8c047ac
Cite the one real multi-level category chart the assertion is modelle…
claude Aug 1, 2026
07bfb91
Note that the XHTML projection already names a chart, and Markdown do…
claude Aug 1, 2026
e40eea5
Sharpen the chart notes: three call sites, and the sparse-index case …
claude Aug 1, 2026
288f7be
Merge branch 'wt/charts' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
3f49cf4
Vector: an EMF reader on the metafile groundwork, and the WMF that wa…
claude Aug 1, 2026
bd2e6fb
Vector: EMF tests, corpus fixtures, and what the raster ops needed
claude Aug 1, 2026
64f23bb
Spreadsheets: draw the cell left of a page whose text reaches into it
theolivenbaum Aug 1, 2026
9969cde
Spreadsheets: stop a cell's overflow at a neighbour a merge covers
theolivenbaum Aug 1, 2026
450c2f1
Vector: settle the raster-op question by reading DIB pixels, in both …
claude Aug 1, 2026
60f6ac7
WIP: work in progress when the container restarted
claude Aug 1, 2026
b086579
WIP: work in progress when the container restarted
claude Aug 1, 2026
21e0086
WIP: work in progress when the container restarted
claude Aug 1, 2026
b848a82
Merge branch 'wt/emf' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
f6f4b09
Merge branch 'wt/sheet-fix' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
04bebff
Merge remote-tracking branch 'origin/claude/paperless-odf-phase-1-rny…
claude Aug 1, 2026
7d4653d
Merge remote-tracking branch 'origin/claude/paperless-odf-phase-1-rny…
claude Aug 1, 2026
e0d80ae
Draw SmartArt from the baked diagram drawing, with a corpus fixture
claude Aug 1, 2026
e4920ac
Record the SmartArt measurement and correct the plan it contradicted
claude Aug 1, 2026
37256ba
Correct the diagram doc comments to the numbers the measurement gives
claude Aug 1, 2026
99f76ef
Charts: draw them, because neither family ships a fallback we can replay
claude Aug 1, 2026
bc8d53f
Charts: write down the fallback measurement and what is left
claude Aug 1, 2026
cc2879b
Vector: an EMF+ reader, and the dual-format question answered from emfio
claude Aug 1, 2026
9d74f3d
Vector: an EMF+ Dual corpus fixture, hand-built because nothing here …
claude Aug 1, 2026
5483d02
Vector: close the metafile notes, now that all three formats are in
claude Aug 1, 2026
6e64069
Charts: draw only bar charts, because the loose match drew a pie as e…
claude Aug 1, 2026
16d4071
Vector: say when an EMF+ gradient repeats and the drawing model cannot
claude Aug 1, 2026
bc473a9
Vector: tick the two WMF entries EMF closed, and contrast the two arc…
claude Aug 1, 2026
897acd5
Vector: two corrections in the EMF+ notes
claude Aug 1, 2026
e97e81e
Merge chart drawing, and kill the metafile-fallback shortcut for good
claude Aug 1, 2026
67082f7
Merge branch 'wt/emf-plus' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
4d6bf08
Word processing: give an inline picture room on its line, and fix two…
claude Aug 1, 2026
61c6a96
Merge word-processing pictures, and close both sweep regressions
claude Aug 1, 2026
175a293
Vector: a triangle-mesh paint, gradient spreads, and a gradient focus
claude Aug 1, 2026
61c2e67
Word processing: draw list labels, and give a list level its indents
claude Aug 1, 2026
7431366
SmartArt: evaluate the layout atoms when there is no baked drawing
claude Aug 1, 2026
c7f5eb6
EMF+: draw the seven line caps that are decorations rather than caps
claude Aug 1, 2026
bb33990
Word processing: write down what the character-anchored frame item costs
claude Aug 1, 2026
db732a5
Charts: move the model into Core, draw a sheet's chart, and add the r…
claude Aug 1, 2026
b50c483
Merge list labels: one missing feature, six sweep rows
claude Aug 1, 2026
b54c74c
Merge branch 'wt/chart-types' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
dc91da9
Update .gitignore
theolivenbaum Aug 1, 2026
96c9788
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' of https://github.…
theolivenbaum Aug 1, 2026
aeae5c1
EMF+: replay a metafile carried as an image, and write down what changed
claude Aug 1, 2026
09d9515
Merge branch 'wt/emfplus-gaps' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
7100d95
Charts: data labels, number formats on ticks, a secondary axis and a …
claude Aug 1, 2026
206adda
SmartArt: the last four layout algorithms, and paragraph spacing as a…
claude Aug 1, 2026
0f6954b
Draw an embedded vector picture, in all three families
claude Aug 1, 2026
3e5a804
Merge branch 'wt/frame-seam' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
21ec1c7
Vector: close the region gaps with a rectangle algebra, and decline t…
claude Aug 1, 2026
422c52f
Merge branch 'wt/vector-regions' into claude/paperless-odf-phase-1-rn…
claude Aug 1, 2026
bd8ed7b
Charts: read the extension coordinate-region, stretch the glyphs, and…
claude Aug 1, 2026
54fde31
Merge branch 'wt/chart-rest' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
81e7ed1
Fonts: carry the resolver's key to the PDF, so a rendered page draws …
claude Aug 1, 2026
ef2efaa
Merge branch 'wt/font-embed' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
3e0f7bc
Record the structured-text sweep beside the render sweep
claude Aug 1, 2026
512f995
Charts: fit trendlines, turn crowded axis labels, and draw the data t…
claude Aug 1, 2026
e84c341
Charts: draw radar, bubble, stock and of-pie; decline surface with th…
claude Aug 1, 2026
105ab69
Merge radar, bubble, stock and of-pie; decline surface with reasons
claude Aug 1, 2026
b108b00
Sheets: read table:shapes, and let a drawing widen the print area
claude Aug 1, 2026
83f48cf
Writer draws a chart: a DOCX w:drawing and an ODT draw:object
claude Aug 1, 2026
cc8cb5f
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' of https://github.…
theolivenbaum Aug 1, 2026
ce31b84
Sheets: read XLSB, and stop losing sheets whose content is a shape
claude Aug 1, 2026
601788f
Charts: measure the plot rectangle on 100 charts, and find it in the …
claude Aug 1, 2026
e0310b2
A DOC's picture set in a line is decided by a SHAPE field
claude Aug 1, 2026
8872bf0
Solve the shrink-to-fit, turn a cycle's labels, draw a master's logo
claude Aug 1, 2026
9cde79c
Merge branch 'wt/writer-charts' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
531f214
Merge branch 'wt/plot-rect' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
0fffca3
Merge branch 'wt/slide-tail' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
438e70c
Stop the catalogue lying, and set a chart's labels in the right face
claude Aug 1, 2026
b30584f
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' of https://github.…
theolivenbaum Aug 1, 2026
2bffeca
Merge pull request #7 from theolivenbaum/claude/paperless-odf-phase-1…
theolivenbaum Aug 1, 2026
5a0e6c4
Add a corpus triage and parity harness
claude Aug 1, 2026
a0b232b
Merge remote-tracking branch 'origin/claude/paperless-odf-phase-1-rny…
claude Aug 1, 2026
477a60c
Add a batch parity gate for the sample corpus
claude Aug 1, 2026
ea97a10
Record the sample corpus and the batch rule in CLAUDE.md
claude Aug 1, 2026
84e7fe9
Ignore agent worktrees
claude Aug 1, 2026
0fc605c
Capture the corpus batch method as a skill, and track it in TODO.batc…
claude Aug 1, 2026
1d13c1e
Record how to split one track across several agents
claude Aug 1, 2026
01cb018
Record the measured words-track baseline and what it shows
claude Aug 1, 2026
c7bb784
Record what limits how many agents can run at once
claude Aug 1, 2026
eca72a2
Read a DOC's section break kind the way [MS-DOC] numbers it
claude Aug 1, 2026
ef899da
Correct the worktree disk breakdown: it is not the RID pin
claude Aug 1, 2026
f31cfdf
Collapse paragraph spacing inside a cell, a header and a frame too
claude Aug 1, 2026
a6a49f8
Count a cell's last paragraph's space-after in its height
claude Aug 1, 2026
e626f33
Inherit a section's headers and footers from the section before it
claude Aug 1, 2026
6c45cd1
Resolve a DOCX paragraph's spacing and indents attribute by attribute
claude Aug 1, 2026
12f1124
Apply a table style's paragraph formatting to the paragraphs in its c…
claude Aug 1, 2026
0f1e65d
Chop a word that does not fit the line it starts
claude Aug 1, 2026
2452eb4
Let a bullet claim its own width before the text starts
claude Aug 1, 2026
9fad9e5
Render a PPTX slide through the whole inheritance chain
claude Aug 1, 2026
d868729
Measure a tab from where the format says, and let one in a hanging in…
claude Aug 1, 2026
1faddaf
Draw a binary PowerPoint's pictures
claude Aug 1, 2026
ce0a7cb
Break before the paragraph a DOCX page break sits inside, not after it
claude Aug 1, 2026
1ca1054
Let a list level's indents beat the style chain when the numbering is…
claude Aug 1, 2026
a0a7acc
Draw a header or footer the page reserves no room for
claude Aug 1, 2026
13dee92
Let contextual spacing suppress the whole gap, not only the space-before
claude Aug 1, 2026
8e557b7
Let a table style's paragraph properties reach the paragraphs in its …
claude Aug 1, 2026
0c8b2a9
Merge branch 'worktree-agent-a94004bb0533fa5bd' into claude/paperless…
claude Aug 1, 2026
2c7c435
Merge branch 'worktree-agent-a8d4bd4150c8c7e5f' into claude/paperless…
claude Aug 2, 2026
e46907d
Give a page the running head of the section its content starts in
claude Aug 2, 2026
ea4f269
Read a WW8 list level's own indents and label follower
claude Aug 2, 2026
27adcca
Follow a content control down to the table cell inside it
claude Aug 2, 2026
9276a19
Record two findings from the first round of merges
claude Aug 2, 2026
9645b27
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' into worktree-agen…
claude Aug 2, 2026
e26171a
Merge the over-pagination fixes, combining rather than choosing
claude Aug 2, 2026
7f20b43
Record two merge traps met in practice
claude Aug 2, 2026
fea1572
Merge the text-loss fixes
claude Aug 2, 2026
09e79f0
Record the merged words result: 84 to 98 of 202
claude Aug 2, 2026
c0ac676
Record the merged slides result: 53/150 to 84/163
claude Aug 2, 2026
cdf762b
Draw a binary PowerPoint's master shapes under the slides that follow it
claude Aug 2, 2026
32047c4
Resolve a binary PowerPoint's running fields against the page drawing…
claude Aug 2, 2026
93f25ed
Read an unstated chart label flag the way the file's own producer mea…
claude Aug 2, 2026
2e66414
Lay a grouped shape's text out at the size the group scales it to
claude Aug 2, 2026
bf45722
Draw an embedded object as the picture of itself it carries
claude Aug 2, 2026
e6431ba
Follow a w:rFonts theme reference to the face the theme names
claude Aug 2, 2026
0c1c933
Read the four ways a table row says it must not be broken
claude Aug 2, 2026
a9c3352
Break a table row across a page, as Writer does
claude Aug 2, 2026
315b241
Record that worktrees isolate the code and not the scratch directory
claude Aug 2, 2026
0ffa63b
Measure a line from hhea, which is what LibreOffice actually does
claude Aug 2, 2026
b3a2c89
Inherit each of a w:rFonts' four families in its own right
claude Aug 2, 2026
6a34a64
Merge table-row splitting across page breaks
claude Aug 2, 2026
7d2ba4e
Record that an agent worktree can start hundreds of commits behind
claude Aug 2, 2026
d1c401d
Merge theme font resolution and the hhea line-height precedence
claude Aug 2, 2026
b26c0ea
Align an unwrapped label against its shape, not against the width it …
claude Aug 2, 2026
584043a
Take an untyped placeholder's kind from the layout before the master
claude Aug 2, 2026
2350bad
Stop a placeholder's style chain at the master, short of p:defaultTex…
claude Aug 2, 2026
e5ed4cc
Draw the slide number a field asks for, not the text cached beside it
claude Aug 2, 2026
aa19351
Inherit a placeholder's a:bodyPr from the layout and the master
claude Aug 2, 2026
eff2bf6
Record the second round: words 98 to 107 of 202
claude Aug 2, 2026
29e82e4
Read a binary PowerPoint bullet the way its own face means it
claude Aug 2, 2026
bb60b63
Merge PPT master shapes, field markers and symbol bullets
claude Aug 2, 2026
a7d2f22
Record the word count's blind spot
claude Aug 2, 2026
7cb5c57
Merge the PPTX text fixes
claude Aug 2, 2026
9ac8a07
Record the second round: slides 84 to 133 of 163
claude Aug 2, 2026
e3f6fbe
Draw the fill characters a tab leader asks for
claude Aug 2, 2026
53cbd09
Drop the HTML auto margin at a table cell's edges
claude Aug 2, 2026
0150881
Follow w:numStyleLink to the definition that holds the levels
claude Aug 2, 2026
6227239
Read a stream by the chain it has, not the length it claims
claude Aug 2, 2026
d2336c2
Record that a sweep and a build cannot share a tree
claude Aug 2, 2026
0267055
Push the body down when a running head outgrows the top margin
claude Aug 2, 2026
0425c1c
Measure a DOC that asks for printer metrics on the printer's pixel grid
claude Aug 2, 2026
9e5555b
Merge tab leaders, the HTML auto margin in cells, and w:numStyleLink
claude Aug 2, 2026
f836a4c
Keep the blank paragraphs a DOC pads a table cell with
claude Aug 2, 2026
602a139
Resolve an unknown font family the way LibreOffice actually does
claude Aug 2, 2026
df2297d
Merge the font substitution fix: carry FontType, and lead with DejaVu
claude Aug 2, 2026
f182d6e
Merge header push-down, printer metrics and blank cell paragraphs
claude Aug 2, 2026
f7eddfa
Record the debugging techniques three rounds of agents actually used
claude Aug 2, 2026
eb12835
Record the third round: words page error halved, 297 to 149
claude Aug 2, 2026
42708c4
Keep a running head whose only content is a logo
claude Aug 2, 2026
a0164ca
Draw w:caps and w:smallCaps, which every reader parsed and nothing ap…
claude Aug 2, 2026
cce7e31
Stop a spreadsheet paginating onto blank paper
claude Aug 2, 2026
2cd79e6
Raise the body's bottom when a footer outgrows its margin
claude Aug 2, 2026
124c90d
Let a running foot that outgrows its margin shorten the body
claude Aug 2, 2026
a289fc7
Read a DOC's U+000C as the page break it usually is
claude Aug 2, 2026
a719d74
Drop a paragraph's space-before at an automatic page break
claude Aug 2, 2026
ba30c2d
Record two testing traps from the fourth round
claude Aug 2, 2026
2a168b6
Merge the first sheets fixes: stop paginating onto blank paper
claude Aug 2, 2026
32b2f58
Merge a running head that is only a logo
claude Aug 2, 2026
317607f
Merge w:caps and w:smallCaps
claude Aug 2, 2026
306f86e
Record the first whole-corpus measurement: 343 of 534
claude Aug 2, 2026
ac8abee
Merge the fifth-round baseline into the sheets worktree
claude Aug 2, 2026
e065cd8
Read a DOC's HTML auto-spacing sprms, and the four places Word does n…
claude Aug 2, 2026
6e5001a
A run can put a fixed distance between its characters
claude Aug 2, 2026
f28f7cc
Stop a repeated title row keeping every blank page
claude Aug 2, 2026
ac57629
Draw a sheet's text boxes, which were read for their anchor alone
claude Aug 2, 2026
b1da053
A body placeholder's face, its tracking, and what a PPT shrinks to fit
claude Aug 2, 2026
1de6e52
Let a continuous section's page geometry wait for the next sheet
claude Aug 2, 2026
fc4a0bb
Merge slides: theme fonts in the layout reader, spc tracking, PPT aut…
claude Aug 2, 2026
5e172a6
Record the gate's ceiling, and the bar for blaming the reference
claude Aug 2, 2026
5467190
Anchor the footer's rectangle to the page edge, not to the body's
claude Aug 2, 2026
c9bda6c
Merge words: DOC auto-spacing, continuous sections, the footer rectangle
claude Aug 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
56 changes: 56 additions & 0 deletions .claude/skills/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Skills for developing Paperless

Four skills covering development of the [Paperless](../../dotnet/) C# libraries against
headless LibreOffice as the reference implementation.

| Skill | Use it when |
|---|---|
| [`libreoffice-reference`](libreoffice-reference/) | You need ground truth: reference PDFs, per-page PNGs, or reference text from a document. Also when `soffice --convert-to` misbehaves. |
| [`render-comparison`](render-comparison/) | Comparing a Paperless rendering against the reference, and working out *why* it differs. |
| [`extraction-comparison`](extraction-comparison/) | Comparing extracted text. Also the right first step for a visual bug — parsing bugs are far cheaper to find in text than in pixels. |
| [`paperless-corpus`](paperless-corpus/) | Building or curating test documents. |
| [`corpus-batches`](corpus-batches/) | Driving the 541-document sample corpus to parity, batch by batch — the ordering, the regression rule, and how to dispatch parallel agents across the three tracks. |

## Start here

```bash
.claude/skills/libreoffice-reference/scripts/check-env.sh
```

Nothing else is trustworthy until this passes. It catches the two failures that waste the
most time:

- **Application modules missing.** `libreoffice-core` alone installs a `soffice` that runs
but cannot load *any* document, failing with a maximally unhelpful
`Error: source file could not be loaded`.
- **Wrong font substitution.** If Calibri resolves to DejaVu Sans rather than Carlito,
advance widths change, so line breaks change, so pagination changes — and every page after
the first differs for a reason that has nothing to do with Paperless.

## Scripts

All are dependency-free (bash, or Python using only the standard library) and all were
verified against LibreOffice 24.2.7.2 on real files.

| Script | Does |
|---|---|
| `libreoffice-reference/scripts/check-env.sh` | Verifies soffice, modules, fonts, rasteriser |
| `libreoffice-reference/scripts/lo-convert.sh` | Documents → reference PDFs and page PNGs |
| `libreoffice-reference/scripts/lo-extract.sh` | Documents → reference text (right filter per family) |
| `render-comparison/scripts/compare-images.py` | Page images → metrics, diagnosis, diff images |
| `extraction-comparison/scripts/compare-text.py` | Text → similarity, first divergence, codepoint diagnostics |
| `paperless-corpus/scripts/make-corpus.sh` | Generates a test corpus across all 17 formats |
| `corpus-batches/scripts/render-corpus.sh` | Renders a whole corpus with LibreOffice — parallel, resumable |
| `corpus-batches/scripts/pdf-complexity.py` | Scores what each rendered PDF demands of a renderer |
| `corpus-batches/scripts/make-batches.py` | Orders a corpus by that score and cuts it into per-family batches |
| `corpus-batches/scripts/batch-check.sh` | Renders a batch range both ways and gates on whether they agree |

## Two facts worth knowing before you start

**`soffice` exits 0 even when it converts nothing.** Never trust its exit code — always check
that the output file exists. The scripts here all do.

**Rasterised LibreOffice output is byte-deterministic.** Verified: the same input converted
twice and rasterised gives identical PNGs. So golden reference images can be committed and
checksummed, and a changed checksum is a real signal. The PDFs themselves are *not*
byte-identical — they embed a timestamp — so checksum the PNGs, never the PDFs.
458 changes: 458 additions & 0 deletions .claude/skills/corpus-batches/SKILL.md

Large diffs are not rendered by default.

126 changes: 126 additions & 0 deletions .claude/skills/corpus-batches/scripts/batch-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
#!/usr/bin/env bash
# Prove that Paperless renders a corpus batch the way LibreOffice does.
#
# batch-check.sh <corpus-root> <batch-glob> [outdir] [workers]
#
# batch-check.sh /workspace/sample-files 'batch-001' # one batch
# batch-check.sh /workspace/sample-files 'batch-0[0-1]*' # batches 1-19, a regression sweep
#
# Writes a TSV per document and a one-line verdict. Exit status is 0 only when every
# document in range matches, so this can gate a commit.
#
# Two things this script does that the obvious version does not:
#
# * Parallel workers, each with its own soffice profile. Two headless instances sharing
# ~/.config/libreoffice block on the profile lock and one of them converts nothing at
# all — silently, with exit status 0.
# * Per-format identity (`report__docx`, not `report`). Two documents differing only by
# extension both convert to report.pdf and one overwrites the other, which reads as a
# mysterious parity failure on whichever lost.
#
# The checks are the same three, in the same order, as corpus-parity.sh: page count, then
# extractable words, then font embedding. Each is cheap and rules out a whole class, and
# a wrong page count makes everything after it meaningless.
set -uo pipefail

ROOT_DIR="${1:?usage: batch-check.sh <corpus-root> <batch-glob> [outdir] [workers]}"
GLOB="${2:?batch glob, e.g. batch-001 or 'batch-0[0-1]*'}"
OUT="${3:-$(mktemp -d)}"
WORKERS="${4:-3}"

REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)"
CLI="$REPO/dotnet/tools/Paperless.Cli/bin/Debug/net10.0/linux-x64/Paperless.Cli"
[ -x "$CLI" ] || { echo "no CLI at $CLI — build it first" >&2; exit 1; }

mkdir -p "$OUT/ours" "$OUT/ref"
: > "$OUT/rows.tsv"

# shellcheck disable=SC2086 # the glob is meant to expand
mapfile -t DIRS < <(cd "$ROOT_DIR" && ls -d $GLOB 2>/dev/null)
[ "${#DIRS[@]}" -gt 0 ] || { echo "no batches matched $GLOB under $ROOT_DIR" >&2; exit 1; }

mapfile -t FILES < <(
for d in "${DIRS[@]}"; do
find "$ROOT_DIR/$d" -type f \
\( -iname '*.doc' -o -iname '*.docx' -o -iname '*.rtf' -o -iname '*.odt' -o -iname '*.ott' \
-o -iname '*.xls' -o -iname '*.xlsx' -o -iname '*.ods' -o -iname '*.csv' \
-o -iname '*.ppt' -o -iname '*.pptx' -o -iname '*.odp' -o -iname '*.otp' \) 2>/dev/null
done | sort
)

one() { # one <index>
local idx="$1" i=-1 f base ext stem id o r op rp ow rw of rf un v
local prof="$OUT/prof$idx"
mkdir -p "$prof" "$OUT/t$idx"
for f in "${FILES[@]}"; do
i=$((i + 1)); [ $((i % WORKERS)) -eq "$idx" ] || continue
base="$(basename "$f")"; ext="${base##*.}"; stem="${base%.*}"
id="${stem}__${ext,,}"
o="$OUT/ours/$id.pdf"; r="$OUT/ref/$id.pdf"

rm -rf "${OUT:?}/t$idx"; mkdir -p "$OUT/t$idx"
timeout 240 "$CLI" render "$f" --format pdf --outdir "$OUT/t$idx" >/dev/null 2>&1
[ -f "$OUT/t$idx/$stem.pdf" ] && mv -f "$OUT/t$idx/$stem.pdf" "$o"

rm -rf "$OUT/t$idx"; mkdir -p "$OUT/t$idx"
timeout 240 soffice -env:UserInstallation="file://$prof" \
--headless --convert-to pdf --outdir "$OUT/t$idx" "$f" >/dev/null 2>&1
[ -f "$OUT/t$idx/$stem.pdf" ] && mv -f "$OUT/t$idx/$stem.pdf" "$r"

op="-"; rp="-"; ow="-"; rw="-"; of="-"; rf="-"; un="-"
if [ -f "$o" ]; then
op=$(pdfinfo "$o" 2>/dev/null | awk '/^Pages/{print $2}')
ow=$(pdftotext "$o" - 2>/dev/null | wc -w)
of=$(pdffonts "$o" 2>/dev/null | tail -n +3 | grep -c .)
un=$(pdffonts "$o" 2>/dev/null | tail -n +3 | awk '$(NF-3)=="no"' | wc -l)
fi
if [ -f "$r" ]; then
rp=$(pdfinfo "$r" 2>/dev/null | awk '/^Pages/{print $2}')
rw=$(pdftotext "$r" - 2>/dev/null | wc -w)
rf=$(pdffonts "$r" 2>/dev/null | tail -n +3 | grep -c .)
fi

# A document LibreOffice itself cannot render is not our failure, and must not be
# allowed to look like one — it is excluded from the verdict, not counted as a pass.
if [ ! -f "$r" ] && [ ! -f "$o" ]; then v="both-failed"
elif [ ! -f "$r" ]; then v="ref-failed"
elif [ ! -f "$o" ]; then v="ours-failed"
else
v=""
[ "$op" = "$rp" ] || v="pages"
# Extraction drifts a little on hyphenation and soft breaks; 2% is the band that
# separates "the same text" from "text is missing", measured across this corpus.
if [ "$rw" -gt 0 ] 2>/dev/null; then
awk -v a="$ow" -v b="$rw" 'BEGIN{d=(a>b?a-b:b-a); exit !(d > b*0.02 && d > 3)}' \
&& v="${v:+$v,}words"
elif [ "${ow:-0}" -gt 3 ]; then v="${v:+$v,}words"
fi
[ "${un:-0}" = "0" ] || v="${v:+$v,}unembedded"
[ -n "$v" ] || v="match"
fi

printf "%s\t%s\t%s/%s\t%s/%s\t%s/%s\t%s\t%s\n" \
"${f#"$ROOT_DIR"/}" "${ext,,}" "$op" "$rp" "$ow" "$rw" "$of" "$rf" "$un" "$v" \
>> "$OUT/rows.tsv"
done
}

for w in $(seq 0 $((WORKERS - 1))); do one "$w" & done
wait

{
printf "path\text\tpages\twords\tfonts\tunemb\tverdict\n"
sort "$OUT/rows.tsv"
} > "$OUT/parity.tsv"

total=$(wc -l < "$OUT/rows.tsv")
match=$(awk -F'\t' '$7=="match"' "$OUT/rows.tsv" | wc -l)
reffail=$(awk -F'\t' '$7=="ref-failed" || $7=="both-failed"' "$OUT/rows.tsv" | wc -l)
bad=$((total - match - reffail))

cat "$OUT/parity.tsv"
echo
echo "BATCHES ${DIRS[*]}"
echo "TOTAL $total MATCH $match MISMATCH $bad REF-CANNOT-RENDER $reffail"
echo "TSV $OUT/parity.tsv"
[ "$bad" -eq 0 ]
179 changes: 179 additions & 0 deletions .claude/skills/corpus-batches/scripts/make-batches.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
#!/usr/bin/env python3
"""Order a document corpus by rendering complexity and cut it into batches of ten.

make-batches.py <corpus-root> <complexity.tsv> [--apply]

Reads the TSV produced by pdf-complexity.py over LibreOffice's renders of the corpus,
sorts every document by what its PDF demands of a renderer, and prints the plan that
reorganises the repository into <family>/batch-NNN/<ext>/. With --apply it performs the
`git mv`s, deletes the duplicates and unrenderable files, and writes the two manifests.

Ten per batch is the unit of work: small enough that one session can take a batch,
fix what it finds and prove the fix, without the batch itself becoming a project.

Run it on a clean working tree — --apply rewrites the entire layout, and a failed run is
far easier to undo with `git checkout .` than by hand.
"""
import collections
import csv
import hashlib
import subprocess
import sys
from pathlib import Path

PER_BATCH = 10

# Which library owns each extension. Splitting the corpus this way is what lets three
# agents work in parallel without ever touching the same file.
FAMILY = {
"doc": "words", "docx": "words",
"xls": "sheets", "xlsx": "sheets",
"ppt": "slides", "pptx": "slides",
}


def load_scores(tsv: Path) -> dict[str, float]:
"""Map the mangled PDF stem back to a score."""
out = {}
with tsv.open() as f:
for row in csv.DictReader(f, delimiter="\t"):
out[Path(row["path"]).stem] = float(row["score"])
return out


def mangle(rel: Path) -> str:
"""The id render-corpus.sh gave this document's PDF."""
ext = rel.suffix.lstrip(".")
return str(rel.with_suffix("")).replace("/", "_").replace(" ", "_") + "__" + ext


def write_manifest(final, path: Path) -> None:
"""Record the score each document was placed by.

Without this the ordering is unreproducible: the scores live in a scratch directory
that does not survive the session, and a batch boundary with no recorded reason
invites someone to 'tidy' the layout and silently destroy the ordering the whole
workflow depends on.
"""
with path.open("w", newline="") as f:
w = csv.writer(f, delimiter="\t", lineterminator="\n")
w.writerow(["family", "batch", "path", "ext", "score", "source"])
for rel, dest, score in final:
w.writerow([dest.parts[0], dest.parts[1], str(dest),
dest.suffix.lower().lstrip("."),
"" if score is None else f"{score:.1f}", str(rel)])


def write_duplicates(dupes, final, path: Path) -> None:
"""Record what was removed and where its surviving copy now lives.

Pointing at the copy's *new* path rather than its old one is the difference between
an auditable deletion and a list of names that no longer resolve to anything.
"""
moved = {rel: dest for rel, dest, _ in final}
with path.open("w", newline="") as f:
w = csv.writer(f, delimiter="\t", lineterminator="\n")
w.writerow(["removed", "identical_to"])
for rel, kept in sorted(dupes, key=lambda d: str(d[0])):
w.writerow([str(rel), str(moved.get(kept, kept))])


def main() -> int:
argv = [a for a in sys.argv[1:] if not a.startswith("--")]
if len(argv) != 2:
print(__doc__, file=sys.stderr)
return 2
SRC, scores = Path(argv[0]), load_scores(Path(argv[1]))

docs, seen_bytes, dupes, unrenderable = [], {}, [], []
for p in sorted(SRC.rglob("*")):
if not p.is_file() or ".git" in p.parts:
continue
if p.suffix.lower().lstrip(".") not in FAMILY:
continue
rel = p.relative_to(SRC)

# Byte-identical copies are 39% of this corpus, mostly the same document collected
# from two sites. Rendering one twice proves nothing and costs a batch slot that a
# document with different content should have had, so only the first is kept — by
# content, not by name, since the copies rarely share one.
digest = hashlib.sha256(p.read_bytes()).hexdigest()
if digest in seen_bytes:
dupes.append((rel, seen_bytes[digest]))
continue
seen_bytes[digest] = rel

# A document LibreOffice cannot convert has no score and, more to the point, no
# reference rendering — there is nothing to compare a result against, so keeping it
# would put a file in a batch that can never be marked passing. Each was retried
# once with a ten-minute ceiling before being dropped.
score = scores.get(mangle(rel))
if score is None:
unrenderable.append(rel)
continue
docs.append((score, rel))

ordered = sorted(docs, key=lambda d: (d[0], str(d[1])))

# Batches are cut per family rather than across the whole corpus. One global ordering
# would front-load the easy end with word processing and leave the spreadsheet and
# presentation work with nothing to do until batch forty, which defeats the point of
# working the three families in parallel. Within a family the ordering is still
# strictly ascending, so each track is worked easiest-first exactly as before.
plan, batches = [], collections.defaultdict(list)
per_family = collections.Counter()
for score, rel in ordered:
ext = rel.suffix.lower().lstrip(".")
fam = FAMILY[ext]
n = per_family[fam] // PER_BATCH + 1
per_family[fam] += 1
dest = Path(fam) / f"batch-{n:03d}" / ext / rel.name
plan.append((rel, dest, score))
batches[(fam, n)].append((rel, dest, score))

# A name can repeat across the source's extension folders; make it unique per target.
seen, final = collections.Counter(), []
for rel, dest, score in plan:
seen[dest] += 1
if seen[dest] > 1:
dest = dest.with_name(f"{dest.stem}-{seen[dest]}{dest.suffix}")
final.append((rel, dest, score))

if "--apply" in sys.argv:
for rel in [r for r, _ in dupes] + unrenderable:
subprocess.run(["git", "-C", str(SRC), "rm", "-q", "--", str(rel)], check=True)
for rel, dest, _ in final:
target = SRC / dest
target.parent.mkdir(parents=True, exist_ok=True)
subprocess.run(["git", "-C", str(SRC), "mv", "--", str(rel), str(dest)], check=True)
# Drop whatever directories the move emptied. `git mv` leaves them behind, and an
# empty `docx/` beside the new tracks reads as "some files were missed".
for p in sorted(SRC.rglob("*"), key=lambda q: -len(q.parts)):
if p.is_dir() and ".git" not in p.parts and not any(p.iterdir()):
p.rmdir()
write_manifest(final, SRC / "MANIFEST.tsv")
write_duplicates(dupes, final, SRC / "DUPLICATES.tsv")
print(f"removed {len(dupes)} byte-identical copies and "
f"{len(unrenderable)} documents LibreOffice cannot convert; "
f"moved {len(final)} documents into {len(batches)} batches")
for rel in unrenderable:
print(f" dropped (unrenderable): {rel}")
else:
by_track = collections.defaultdict(list)
for rel, dest, score in final:
by_track[(dest.parts[0], dest.parts[1])].append((rel, dest, score))
for (fam, batch) in sorted(by_track):
rows = by_track[(fam, batch)]
got = [s for *_, s in rows if s is not None]
kinds = collections.Counter(d.parts[2] for _, d, _ in rows)
span = f"{min(got):.0f}-{max(got):.0f}" if got else "unrendered"
print(f"{fam:6s} {batch} {len(rows):2d} files score {span:>12} " +
" ".join(f"{k}:{v}" for k, v in sorted(kinds.items())))
print(f"\n{len(final)} documents, {len(batches)} batches of up to {PER_BATCH}"
f" ({len(dupes)} byte-identical copies and "
f"{len(unrenderable)} unrenderable documents dropped)")
return 0


if __name__ == "__main__":
raise SystemExit(main())
Loading
Loading