Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
8e20b80
docs(builder): design spec for TriasDev.Templify.Builder (#270)
vaceslav Nov 25, 2026
77e2ff9
feat(builder): walking skeleton — paragraph with a placeholder as .do…
vaceslav Nov 25, 2026
afad8a1
build: add the builder projects to the solution; exclude them from co…
vaceslav Nov 25, 2026
f686ac6
docs(builder): record packaging and determinism findings from the ske…
vaceslav Nov 25, 2026
1f324c1
Merge remote-tracking branch 'origin/main' into feature/builder
vaceslav Nov 25, 2026
93616c6
feat(builder): StyleSheet — units, colours, fonts, named paragraph an…
vaceslav Nov 25, 2026
9f97327
docs(builder): FontFace without fallback; LibreOffice maps Word's bui…
vaceslav Nov 25, 2026
76f66b2
feat(builder): inline content — character styles, value formats, tabs…
vaceslav Nov 25, 2026
be72da5
docs(builder): inline content mapping — page breaks, character styles…
vaceslav Nov 25, 2026
2949773
feat(builder): block conditionals — If/ElseIf/Else, Condition AST and…
vaceslav Nov 25, 2026
4e941aa
docs(builder): condition emitter rules, marker style default, path op…
vaceslav Nov 25, 2026
1c3abe6
feat(builder): paragraph loops — ForEach with LoopItem, nesting, oute…
vaceslav Nov 25, 2026
1ed170e
docs(builder): loop scope rules and component units
vaceslav Nov 25, 2026
31ee00c
feat(builder): data contract — path manifest, hash, JSON, witness pay…
vaceslav Nov 25, 2026
513412f
docs(builder): data contract details
vaceslav Nov 25, 2026
b10bd4e
feat(builder): template identity stamp and upload check (#268)
vaceslav Nov 25, 2026
4287761
docs(builder): stamp properties, remover scope, #275 workaround
vaceslav Nov 25, 2026
a51b3e2
feat(builder): localisation — text catalogs, missing translation fail…
vaceslav Nov 25, 2026
439a0ee
docs(builder): localisation lookup rules; package README for phase 1
vaceslav Nov 25, 2026
bc5a84e
feat(builder): page setup, header and footer, page number and count, …
vaceslav Nov 25, 2026
67d9e62
docs(builder): page, header/footer, page field and right tab mapping
vaceslav Nov 25, 2026
496af50
feat(builder): static tables — columns, table styles, borders, shadin…
vaceslav Nov 25, 2026
599d745
docs(builder): table mapping and column width resolution
vaceslav Nov 25, 2026
2435505
feat(builder): table row loops and RowsIf; blocks, conditions and loo…
vaceslav Nov 25, 2026
f3acd11
docs(builder): row loop markers; DOCX parts end with a paragraph
vaceslav Nov 25, 2026
7067fcf
feat(builder): images — inline and as blocks, in headers and loops; P…
vaceslav Nov 25, 2026
3e90a25
docs(builder): image mapping
vaceslav Nov 25, 2026
b87a6f5
test(builder): private field names in the image tests (#280)
vaceslav Nov 25, 2026
5fa5c88
feat(builder): inline conditionals and inline expressions (#281)
vaceslav Nov 25, 2026
a305520
docs(builder): inline conditional and expression mapping
vaceslav Nov 25, 2026
96a1d56
feat(builder): Box and Rule (#282)
vaceslav Nov 25, 2026
5e27be2
docs(builder): box and rule mapping; padding vs border difference
vaceslav Nov 25, 2026
531f18b
feat(builder): bullet lists — levels, loops and conditionals over ite…
vaceslav Nov 25, 2026
fec1881
docs(builder): list mapping
vaceslav Nov 25, 2026
c705cdf
feat(builder): table of contents, and build warnings (#284)
vaceslav Nov 25, 2026
f2f73db
docs(builder): table of contents mapping and LibreOffice limitation
vaceslav Nov 25, 2026
e73ebf3
feat(builder): raw block escape hatch (#285)
vaceslav Nov 25, 2026
d4839d2
docs(builder): raw block decisions and mapping
vaceslav Nov 25, 2026
0802a95
Merge remote-tracking branch 'origin/main' into feature/builder
vaceslav Nov 25, 2026
3bbab8f
feat(builder): consumer test kit TriasDev.Templify.Builder.Testing (#…
vaceslav Nov 25, 2026
2a206ce
build(builder): test kit project in the solution, release config and …
vaceslav Nov 25, 2026
05c2fb8
docs(builder): test kit as built (#286)
vaceslav Nov 25, 2026
8e66041
fix(builder): ODT row loops under a header repeated the header rule
vaceslav Nov 25, 2026
3bb5a57
feat(builder): sample order confirmation and package README (#287)
vaceslav Nov 25, 2026
a5fc537
build(builder): sample in the solution, release config and CLAUDE.md …
vaceslav Nov 25, 2026
b532adf
docs(builder): template builder page (concepts, support matrix, known…
vaceslav Nov 25, 2026
a6d8fd1
feat(builder): embedded fonts (#288)
vaceslav Nov 25, 2026
3b4fc2c
docs(builder): font embedding mapping, decisions and docs page (#288)
vaceslav Nov 25, 2026
a380191
build(builder): version.txt as the single version source of builder a…
vaceslav Nov 25, 2026
f4af9ac
build: release-please package for the builder (#289)
vaceslav Nov 25, 2026
c4a3790
ci: publish-builder job in the release workflow (#289)
vaceslav Nov 25, 2026
be1508c
docs(builder): release policy for the builder's 0.x line (#289)
vaceslav Nov 25, 2026
3d90467
build: separate release PRs for core and builder (#289)
vaceslav Nov 25, 2026
951f4a2
docs(builder): phase 3 design — JSON definitions and typed data paths
vaceslav Nov 25, 2026
7e7fd3a
docs(builder): phase 3 implementation plan
vaceslav Nov 25, 2026
d2f1675
refactor(builder): list container in the model, ImageFit.Exact, diagn…
vaceslav Nov 25, 2026
eae559f
feat(builder): JSON value encodings (#274)
vaceslav Nov 25, 2026
286b4cf
feat(builder): condition parser for JSON definitions (#274)
vaceslav Nov 25, 2026
e3825a9
feat(builder): export definitions to JSON (#274)
vaceslav Nov 25, 2026
97ede99
feat(builder): import JSON definitions; every builder test round-trip…
vaceslav Nov 25, 2026
fbf3fc9
feat(builder): import diagnostics with JSON pointers (#274)
vaceslav Nov 25, 2026
669c251
feat(builder): typed data paths from C# types (#274)
vaceslav Nov 25, 2026
0af9358
feat(builder): component catalog; registered components export as ref…
vaceslav Nov 25, 2026
70efae7
feat(builder): data catalogue from C# types; import checks paths agai…
vaceslav Nov 25, 2026
6b6d564
feat(builder): phase 3 sample — JSON round trip and typed definition …
vaceslav Nov 25, 2026
3ec86ec
docs(builder): phase 3 evaluation (#274)
vaceslav Nov 25, 2026
8564415
fix(builder): phase 3 review — stack safety, concurrency, error types…
vaceslav Nov 25, 2026
be94f0a
docs(builder): phase 3 evaluation test count after the review fixes (…
vaceslav Nov 25, 2026
684f20f
docs(builder): compact JSON definitions design (#274)
vaceslav Nov 26, 2026
3a88948
docs(builder): compact JSON implementation plan (#274)
vaceslav Nov 26, 2026
06ddbdd
feat(builder): inherited paragraph styles — default, table text style…
vaceslav Nov 26, 2026
739887e
feat(builder): placeholder text parser for JSON strings (#274)
vaceslav Nov 26, 2026
f9536ea
feat(builder): JSON inline content as strings with placeholders (#274)
vaceslav Nov 26, 2026
15b43aa
feat(builder): JSON block short forms, inherited styles omitted (#274)
vaceslav Nov 26, 2026
35b4c41
feat(builder): compact JSON layout; sample uses inherited styles (#274)
vaceslav Nov 26, 2026
9a6ac8f
docs(builder): compact JSON format and evaluation (#274)
vaceslav Nov 26, 2026
e3ccb7d
fix(builder): list items without an item style inherit the paragraph …
vaceslav Nov 26, 2026
a5d402c
docs(builder): list items inherit without an item style (#274)
vaceslav Nov 26, 2026
999ab0a
docs(builder): text keys design and plan (#274)
vaceslav Nov 26, 2026
6fd03c2
feat(builder): text keys in JSON definitions (#274)
vaceslav Nov 26, 2026
dec6286
feat(builder): translations embedded in JSON definitions (#274)
vaceslav Nov 26, 2026
7951304
feat(builder): sample exports one JSON for all languages (#274)
vaceslav Nov 26, 2026
b079db4
docs(builder): text keys (#274)
vaceslav Nov 26, 2026
b081ffc
fix(builder): text keys review — export self-check, raw XML escaping,…
vaceslav Nov 26, 2026
3da1bdd
docs(builder): text keys export self-check (#274)
vaceslav Nov 26, 2026
b7aaf8d
docs(builder): typed path source generator design and plan (#274)
vaceslav Nov 26, 2026
3468653
build(builder): source generator project and Microsoft.CodeAnalysis.C…
vaceslav Nov 26, 2026
44fa57b
feat(builder): typed path source generator (#274)
vaceslav Nov 26, 2026
3ca0a37
feat(builder): sample and tests use the generated typed paths (#274)
vaceslav Nov 26, 2026
893d8e6
docs(builder): typed data paths (#274)
vaceslav Nov 26, 2026
c400354
fix(builder): typed path generator review — InternalsVisibleTo, unsup…
vaceslav Nov 26, 2026
4ad311f
docs(builder): typed path generator limits (#274)
vaceslav Nov 26, 2026
ebb4745
docs(builder): direction review findings and phase 4 plan (#261)
vaceslav Nov 26, 2026
aa604c0
docs(builder): phase 4 step 1 design and plan (#290, #291)
vaceslav Nov 26, 2026
3780f0b
feat(builder): indexed path segments (#290)
vaceslav Nov 26, 2026
5342e14
docs(builder): indexed paths (#290)
vaceslav Nov 26, 2026
95fcdb8
fix(builder): cells end with a paragraph, tables stay apart, style na…
vaceslav Nov 26, 2026
6183775
docs(builder): spacer paragraphs and style names (#291)
vaceslav Nov 26, 2026
5e9147e
fix(builder): step 1 review — no loop over an indexed path, ASCII ind…
vaceslav Nov 26, 2026
329f2ac
fix(builder): table of contents field ends in its own paragraph, so i…
vaceslav Nov 26, 2026
cfd3f6f
docs(builder): JSON format round plan (#293)
vaceslav Nov 26, 2026
6c1c6ce
feat(builder): strict JSON reader — value formats, padding, loop vari…
vaceslav Nov 26, 2026
0e25ab3
feat(builder): names — then in every conditional, if in elseIf, parag…
vaceslav Nov 26, 2026
a80bfab
feat(builder): texts by key, named sections instead of group (#293)
vaceslav Nov 26, 2026
f1d626a
feat(builder): cells are a string or an object with style; tabs and l…
vaceslav Nov 26, 2026
2078ab1
feat(builder): named assets and images with one size (#293)
vaceslav Nov 26, 2026
66ce805
feat(builder): theme tokens; components see texts and shared objects …
vaceslav Nov 26, 2026
4625a68
feat(builder): JSON layout width without indentation; export without …
vaceslav Nov 26, 2026
c654d4d
feat(builder): style parameter first; content methods return their co…
vaceslav Nov 26, 2026
329bc3a
fix(builder): registered components that read shared objects and text…
vaceslav Nov 26, 2026
4d79e17
docs(builder): sample uses theme tokens, a named logo, sections, chai…
vaceslav Nov 26, 2026
8317300
fix(builder): a text in the JSON's texts must have the languages of t…
vaceslav Nov 26, 2026
bfbfb97
docs(builder): JSON definitions as a reference: API, root, content, v…
vaceslav Nov 26, 2026
24be8e9
style(builder): field naming in the JSON reader (#293)
vaceslav Nov 26, 2026
96b272e
fix(builder): final review of the JSON format round (#293)
vaceslav Nov 26, 2026
4fbc415
docs(builder): host formats, theme overrides, complete export transla…
vaceslav Nov 26, 2026
1e9e073
docs(builder): design and plan for checking stored templates (#294)
vaceslav Nov 26, 2026
7e2aa69
feat(builder): data catalogue as JSON and witness validation (#294)
vaceslav Nov 26, 2026
43947c4
feat(builder): component versions in the template stamp (#294)
vaceslav Nov 26, 2026
75acab0
feat(builder): check stored template copies against the data catalogu…
vaceslav Nov 26, 2026
d785ba4
feat(builder): check stored JSON definitions (#294)
vaceslav Nov 26, 2026
7dc767f
feat(builder): versioned terms component in the sample (#294)
vaceslav Nov 26, 2026
2fbd236
docs(builder): checking stored templates and changing the data (#294)
vaceslav Nov 26, 2026
882245c
fix(builder): final review of the stored-template check (#294)
vaceslav Nov 26, 2026
54854cd
docs(builder): what the stored-template check cannot see (#294)
vaceslav Nov 26, 2026
e4e4036
docs(builder): design and plan for the formatting gaps (#296)
vaceslav Dec 1, 2026
a4b70b6
feat(builder): paragraph layout options (#296)
vaceslav Dec 1, 2026
e67cc42
feat(builder): spacer block (#296)
vaceslav Dec 1, 2026
b63bcfb
feat(builder): short rule and paragraph-style bottom border (#296)
vaceslav Dec 1, 2026
565ac1e
feat(builder): per-side padding for cells, tables and boxes (#296)
vaceslav Dec 1, 2026
826664f
feat(builder): per-side borders for cells and table styles (#296)
vaceslav Dec 1, 2026
a7595db
feat(builder): table indent and space before (#296)
vaceslav Dec 1, 2026
a8956db
fix(builder): one spacer paragraph per position (#296)
vaceslav Dec 1, 2026
4b01d4f
feat(builder): sample uses a cell's own border and paragraph options …
vaceslav Dec 1, 2026
910af91
docs(builder): formatting options (#296)
vaceslav Dec 1, 2026
e32e67d
fix(builder): final review of the formatting gaps (#296)
vaceslav Dec 1, 2026
c521f67
feat(builder): compare a path with a path in conditions (#297)
vaceslav Dec 1, 2026
9bb5d0e
docs(builder): path comparisons in conditions (#297)
vaceslav Dec 1, 2026
40eade6
fix(builder): ODT spacing parity with DOCX (#298)
vaceslav Dec 1, 2026
6ab5f47
docs(builder): ODT spacing parity (#298)
vaceslav Dec 1, 2026
a4e545b
fix(builder): top-of-page rule as a tree pass, after review (#298)
vaceslav Dec 1, 2026
73571a9
docs(builder): top-of-page rule after page breaks (#298)
vaceslav Dec 1, 2026
8fdaa0c
feat(builder): table of contents entry styles (#295)
vaceslav Dec 1, 2026
9f37acb
docs(builder): table of contents entry styles (#295)
vaceslav Dec 1, 2026
9837a2f
fix(builder): review of the table of contents entry styles (#295)
vaceslav Dec 1, 2026
78036d8
docs(builder): entry styles are document-wide (#295)
vaceslav Dec 1, 2026
9507f39
docs(builder): design and plan for the agent API (#274)
vaceslav Dec 1, 2026
b0df2b4
feat(builder): describe the JSON vocabulary for agents (#274)
vaceslav Dec 1, 2026
b91196c
build(deps): JsonSchema.Net for builder tests (#274)
vaceslav Dec 1, 2026
ac5caaa
feat(builder): JSON Schema of the definition format (#274)
vaceslav Dec 1, 2026
5ea3aa7
feat(builder): outline and read a JSON definition by pointer (#274)
vaceslav Dec 1, 2026
c7758ee
feat(builder): apply a JSON Patch to a definition and check it (#274)
vaceslav Dec 1, 2026
f9ed47a
feat(builder): preview a JSON definition (#274)
vaceslav Dec 1, 2026
819c35a
style(builder): format the vocabulary test (#274)
vaceslav Dec 1, 2026
ea36af2
docs(builder): agent API (#274)
vaceslav Dec 1, 2026
d8fbc49
style(builder): field naming in TemplateJson (#274)
vaceslav Dec 1, 2026
2cfebcb
feat(builder): outline row columns and a describe index, from the age…
vaceslav Dec 1, 2026
93bbe0e
docs(builder): export texts for agents (#274)
vaceslav Dec 1, 2026
1672933
fix(builder): final review of the agent API (#274)
vaceslav Dec 1, 2026
34d9ee2
Merge remote-tracking branch 'origin/main' into feature/builder
vaceslav Dec 1, 2026
f139295
test(builder): the stored-template check finds nested item paths in c…
vaceslav Dec 1, 2026
2b7d98b
docs(builder): the nested item path limit is gone with core #299
vaceslav Dec 1, 2026
78576fe
feat(builder): mark the builder packages experimental (TPLB001)
vaceslav Dec 1, 2026
14d066a
docs(builder): preview status — experimental API (TPLB001)
vaceslav Dec 1, 2026
60d9ed6
docs: the public API rule is for the core library; the builder is exp…
vaceslav Dec 1, 2026
e2faa1d
chore(release): one builder release package for all shipped builder p…
vaceslav Dec 1, 2026
238e451
ci: builder packages depend on the right core; check the release path…
vaceslav Dec 1, 2026
0a7ff69
test(builder): validate the definition schema with a test-only valida…
vaceslav Dec 1, 2026
e9f77d3
build(deps): drop JsonSchema.Net from the builder tests
vaceslav Dec 1, 2026
71d73e6
docs: no private paths in the plans
vaceslav Dec 1, 2026
eb41f85
docs(builder): not on nuget.org yet, needs core 1.11.0, determinism p…
vaceslav Dec 1, 2026
b422d73
docs: builder projects, release rules and LibreOffice step for the bu…
vaceslav Dec 1, 2026
972b20a
docs(builder): as-built release setup and the test kit's baseline note
vaceslav Dec 1, 2026
2eb3062
ci: Dependabot keeps Microsoft.CodeAnalysis.CSharp at the generator's…
vaceslav Dec 1, 2026
cf3b663
feat(builder): loop metadata under Loop; unguarded name collisions warn
vaceslav Dec 1, 2026
1f044a8
docs(builder): loop metadata under Loop; TBG001 warns
vaceslav Dec 1, 2026
8ee8f13
fix(builder): numbers in conditions are written the same on every run…
vaceslav Dec 1, 2026
a7694d6
fix(builder): ODT table edges with a row loop or row conditional at t…
vaceslav Dec 1, 2026
eaf2fd8
docs(builder): README sample writes the amount with Value
vaceslav Dec 1, 2026
aea124c
fix(builder): a path interpolated into text is reported as TB1002 (AP…
vaceslav Dec 1, 2026
3a0a3de
fix(builder): record TBG001 as a warning in the analyzer release file
vaceslav Dec 1, 2026
1c8e861
chore(builder): merge main (core 1.11.0) into feature/builder
vaceslav Dec 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ updates:
update-types:
- "minor"
- "patch"
ignore:
# The typed-path source generator ships inside the builder package and must load in the oldest supported compiler
# (Roslyn 5.0, .NET 10 SDK); a newer Microsoft.CodeAnalysis.CSharp would break it for those consumers (CS9057).
- dependency-name: "Microsoft.CodeAnalysis.CSharp"

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
14 changes: 14 additions & 0 deletions .github/scripts/check-builder-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# The packed builder package must depend on the core version in TriasDev.Templify.csproj (a global -p:Version would
# also version the referenced core project). Usage: check-builder-package.sh <artifacts dir> <builder version>
set -euo pipefail
dir=$1
version=$2
core=$(sed -n 's:.*<Version>\(.*\)</Version>.*:\1:p' src/TriasDev.Templify/TriasDev.Templify.csproj | head -1)
nuspec=$(unzip -p "$dir/TriasDev.Templify.Builder.$version.nupkg" '*.nuspec')
echo "$nuspec" | grep -q "id=\"TriasDev.Templify\" version=\"$core\"" \
|| { echo "::error::TriasDev.Templify.Builder $version does not depend on TriasDev.Templify $core"; echo "$nuspec" | grep -i dependency; exit 1; }
testing=$(unzip -p "$dir/TriasDev.Templify.Builder.Testing.$version.nupkg" '*.nuspec')
echo "$testing" | grep -q "id=\"TriasDev.Templify.Builder\" version=\"$version\"" \
|| { echo "::error::TriasDev.Templify.Builder.Testing $version does not depend on TriasDev.Templify.Builder $version"; exit 1; }
echo "Builder $version depends on core $core; the test kit on builder $version."
16 changes: 16 additions & 0 deletions .github/scripts/check-core-released.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# The builder package depends on the core version in TriasDev.Templify.csproj. That version must be on nuget.org, and
# the core source must not have changed since its tag: otherwise the builder would rely on core features no published
# core has (release core first). Runs on the builder release PR (ci.yml) and before publishing (release-please.yml).
set -euo pipefail
core=$(sed -n 's:.*<Version>\(.*\)</Version>.*:\1:p' src/TriasDev.Templify/TriasDev.Templify.csproj | head -1)
echo "Core version: $core"
if ! curl -fsS https://api.nuget.org/v3-flatcontainer/triasdev.templify/index.json | grep -q "\"$core\""; then
echo "::error::TriasDev.Templify $core is not on nuget.org. Release core first."
exit 1
fi
if ! git diff --quiet "v$core" HEAD -- 'src/TriasDev.Templify/*.cs'; then
echo "::error::The core source changed since v$core. Release core first, then the builder."
git diff --stat "v$core" HEAD -- 'src/TriasDev.Templify/*.cs'
exit 1
fi
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,22 @@ jobs:
- name: Pack
run: dotnet pack src/TriasDev.Templify/TriasDev.Templify.csproj --no-build --configuration Release --output ./artifacts

# The builder packages, as the release packs them: a packaging error shows on the PR, not in the release.
- name: Pack the builder packages
run: |
for project in src/TriasDev.Templify.Builder src/TriasDev.Templify.Builder.Testing; do
dotnet pack "$project" --no-build --configuration Release --output ./artifacts
done
./.github/scripts/check-builder-package.sh ./artifacts "$(tr -d '[:space:]' < src/TriasDev.Templify.Builder/version.txt)"

# On the builder's release PR: the core it depends on must be released first (the publish job checks it again,
# but only after the tag exists).
- name: Check that the core is released (builder release PR)
if: startsWith(github.head_ref, 'release-please--branches--main--components--builder')
run: |
git fetch --tags --unshallow --quiet || git fetch --tags --quiet
./.github/scripts/check-core-released.sh

- name: Upload NuGet package artifact
uses: actions/upload-artifact@v7
with:
Expand Down
110 changes: 110 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
release_created: ${{ steps.release.outputs.release_created }}
version: ${{ steps.release.outputs.version }}
tag_name: ${{ steps.release.outputs.tag_name }}
# The builder is a second release-please package: path src (minus src/TriasDev.Templify), component "builder",
# tags builder-v0.x.y.
builder_release_created: ${{ steps.release.outputs['src--release_created'] }}
builder_version: ${{ steps.release.outputs['src--version'] }}
builder_tag_name: ${{ steps.release.outputs['src--tag_name'] }}

steps:
- id: release
Expand Down Expand Up @@ -132,3 +137,108 @@ jobs:
echo "| **Package** | \`TriasDev.Templify\` |" >> $GITHUB_STEP_SUMMARY
echo "| **Version** | \`${{ env.VERSION }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| **Tag** | \`${{ needs.release-please.outputs.tag_name }}\` |" >> $GITHUB_STEP_SUMMARY

# TriasDev.Templify.Builder and TriasDev.Templify.Builder.Testing: own version line (0.x), released by their own
# release-please PR. Core and builder releases never share a job, so one cannot publish the other by accident.
publish-builder:
if: needs.release-please.outputs.builder_release_created == 'true'
needs: release-please
runs-on: ubuntu-latest
environment: nuget
permissions:
contents: read
id-token: write

env:
VERSION: ${{ needs.release-please.outputs.builder_version }}

steps:
- uses: actions/checkout@v7
with:
# The core guard below compares the core source with its release tag.
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
10.0.x
global-json-file: global.json

# The same check runs on the builder release PR (ci.yml), so it fails there, before a tag exists.
- name: Check that the core it depends on is released
run: ./.github/scripts/check-core-released.sh

- name: Check that version.txt is the released version
run: |
file=$(tr -d '[:space:]' < src/TriasDev.Templify.Builder/version.txt)
[ "$file" = "$VERSION" ] || { echo "::error::version.txt ($file) is not the released version ($VERSION)"; exit 1; }

# No -p:Version: a global property would also version the referenced core project, and the builder package would
# depend on TriasDev.Templify >= its own version. version.txt is the version source.
- name: Build
run: |
for project in src/TriasDev.Templify.Builder src/TriasDev.Templify.Builder.Testing tests/TriasDev.Templify.Builder.Tests; do
dotnet build "$project" --configuration Release -p:RestoreLockedMode=true
done

- name: Run tests
run: |
dotnet test tests/TriasDev.Templify.Builder.Tests/TriasDev.Templify.Builder.Tests.csproj \
--configuration Release \
--no-build \
--verbosity normal \
--logger trx \
--results-directory ./test-results

- name: Verify tests ran
run: |
shopt -s nullglob
files=(./test-results/*.trx)
if [ "${#files[@]}" -lt 1 ]; then
echo "::error::No test result file"
exit 1
fi
for f in "${files[@]}"; do ./.github/scripts/verify-test-results.sh "$f"; done

- name: Pack
run: |
for project in src/TriasDev.Templify.Builder src/TriasDev.Templify.Builder.Testing; do
dotnet pack "$project" --configuration Release --no-build --output ./artifacts
done

- name: Check the packed dependencies
run: ./.github/scripts/check-builder-package.sh ./artifacts "$VERSION"

- name: NuGet login (Trusted Publishing)
id: login
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
with:
user: ${{ secrets.NUGET_USER }}

- name: Push to NuGet
env:
NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
run: |
dotnet nuget push ./artifacts/*.nupkg \
--source https://api.nuget.org/v3/index.json \
--api-key "$NUGET_API_KEY" \
--skip-duplicate

- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: nuget-packages-builder
path: |
./artifacts/*.nupkg
./artifacts/*.snupkg

- name: Summary
run: |
echo "## NuGet Release (builder)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Key | Value |" >> $GITHUB_STEP_SUMMARY
echo "|-----|-------|" >> $GITHUB_STEP_SUMMARY
echo "| **Packages** | \`TriasDev.Templify.Builder\`, \`TriasDev.Templify.Builder.Testing\` |" >> $GITHUB_STEP_SUMMARY
echo "| **Version** | \`${{ env.VERSION }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| **Tag** | \`${{ needs.release-please.outputs.builder_tag_name }}\` |" >> $GITHUB_STEP_SUMMARY
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
".": "1.11.0"
".": "1.11.0",
"src": "0.0.0"
}
11 changes: 10 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Solution Structure

`templify.slnx` holds 9 projects in solution folders that mirror the directories (same layout as TriasDev/tabular):
`templify.slnx` holds 14 projects in solution folders that mirror the directories (same layout as TriasDev/tabular):

- `src/` (only what ships to NuGet)
- **TriasDev.Templify** - Core library with template processing logic
- **TriasDev.Templify.Builder** - Code-first template builder (0.x preview, own version line): generates .docx/.odt templates from C#; uses the core's public API only. Design: `docs/superpowers/specs/2026-11-25-template-builder-design.md`, epic #261
- **TriasDev.Templify.Builder.Testing** - Consumer test kit for the builder (same version line): `TemplateVerifier` (`VerifyAll` over languages × formats: build, ValidateTemplate, witness and sample fills, DOCX schema / ODT package, determinism, contract parity), `TemplateSnapshot` (canonical text dump), `LibreOfficeConverter`
- **TriasDev.Templify.Builder.Generators** - Roslyn source generator for typed data paths (`order.Number`); not a package of its own, it ships inside the builder package (`analyzers/dotnet/cs`). Must load in Roslyn 5.0 (.NET 10 SDK)
- `tests/`
- **TriasDev.Templify.Tests** - xUnit test suite (~2,360 tests, ~91% line / ~85% branch coverage)
- **TriasDev.Templify.Tools.Tests** - xUnit tests for the tools/apps (GUI ViewModel/services headless, DocumentGenerator smoke tests)
- **TriasDev.Templify.Converter.Tests** - xUnit tests for the Converter CLI (round trips through the core, file safety, CLI parsing)
- **TriasDev.Templify.Builder.Tests** - xUnit tests for the builder (every test: ValidateTemplate, fill through the engine, DOCX schema / ODT package checks, byte determinism; LibreOffice round trips with `Category=LibreOffice`). Its invariants are the test kit's checks (dogfooding); links `OdtDocumentVerifier`, `OdtDocumentBuilder` and `LibreOfficeRunner` from the core tests
- `benchmarks/`
- **TriasDev.Templify.Benchmarks** - BenchmarkDotNet performance tests
- `samples/`
- **TriasDev.Templify.Demo** - Demo console application
- **TriasDev.Templify.Builder.Sample** - Builder sample (order confirmation, DE/EN, DOCX/ODT, every construct; verified with the test kit, run by `SampleTests`)
- `tools/` (applications that are not packages)
- **TriasDev.Templify.Converter** - CLI tool for converting Word documents
- **TriasDev.Templify.Gui** - Avalonia-based GUI application
Expand Down Expand Up @@ -104,6 +109,9 @@ Instead these tests are a **required local step**:

```bash
dotnet test tests/TriasDev.Templify.Tests/TriasDev.Templify.Tests.csproj -c Release -f net11.0 --filter "Category=LibreOffice"
# builder changes, and before every builder release PR (also needs poppler: pdftotext, pdftoppm, pdffonts, pdfimages
# in /opt/homebrew/bin, /usr/local/bin or /usr/bin)
dotnet test tests/TriasDev.Templify.Builder.Tests/TriasDev.Templify.Builder.Tests.csproj -c Release --filter "Category=LibreOffice"
```

- all tests must **pass with 0 skipped** (a skip means `soffice` was not found — that is not a pass). Mention the result
Expand Down Expand Up @@ -588,6 +596,7 @@ When adding new features:

### Public API Compatibility (hard rule)
The library has external consumers. **Do not change, remove or rename public API** (types, members, signatures, namespaces) as a side effect of a fix or refactoring.
This rule is for the core library (`TriasDev.Templify`). The builder packages (`TriasDev.Templify.Builder`, `TriasDev.Templify.Builder.Testing`) are experimental (`[assembly: Experimental("TPLB001")]`, `0.x`): their API may change when a change needs it, without compatibility shims; record every change in their `PublicAPI.*.txt` files (entries carry the `[TPLB001]` prefix) and in the commit message.
- Public API is tracked in `src/TriasDev.Templify/PublicAPI.Shipped.txt` / `PublicAPI.Unshipped.txt`; the build fails on undeclared additions (RS0016) or removals/changes (RS0017). `dotnet pack` validates against the last released package (`PackageValidationBaselineVersion`).
- New public API → add it to `PublicAPI.Unshipped.txt` deliberately. Prefer `internal` unless the symbol is meant for consumers.
- Retire API with `[Obsolete]`; remove only in a major version.
Expand Down
46 changes: 43 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,20 @@ dotnet format --no-restore
```
templify/
├── src/
│ └── TriasDev.Templify/ # Core library (NuGet package)
│ ├── TriasDev.Templify/ # Core library (NuGet package)
│ ├── TriasDev.Templify.Builder/ # Template builder (NuGet package, experimental 0.x)
│ ├── TriasDev.Templify.Builder.Testing/ # Builder test kit (NuGet package, experimental 0.x)
│ └── TriasDev.Templify.Builder.Generators/ # Typed-path source generator (ships inside the builder package)
├── tests/
│ ├── TriasDev.Templify.Tests/ # Core library tests
│ ├── TriasDev.Templify.Builder.Tests/ # Builder tests (incl. LibreOffice round trips)
│ ├── TriasDev.Templify.Converter.Tests/ # Converter tests
│ └── TriasDev.Templify.Tools.Tests/ # Tests for GUI view models and DocumentGenerator
├── benchmarks/
│ └── TriasDev.Templify.Benchmarks/ # BenchmarkDotNet performance benchmarks
├── samples/
│ └── TriasDev.Templify.Demo/ # Demo console application
│ ├── TriasDev.Templify.Demo/ # Demo console application
│ └── TriasDev.Templify.Builder.Sample/ # Builder sample (order confirmation)
├── tools/
│ ├── TriasDev.Templify.Converter/ # CLI converter (OpenXMLTemplates → Templify)
│ ├── TriasDev.Templify.Gui/ # Avalonia GUI application
Expand Down Expand Up @@ -359,9 +364,12 @@ every change to OpenDocument code or the shared engine, and before every release

```bash
dotnet test tests/TriasDev.Templify.Tests/TriasDev.Templify.Tests.csproj -c Release -f net11.0 --filter "Category=LibreOffice"
dotnet test tests/TriasDev.Templify.Builder.Tests/TriasDev.Templify.Builder.Tests.csproj -c Release --filter "Category=LibreOffice"
```

They need LibreOffice installed (macOS default path is detected; otherwise set `TEMPLIFY_SOFFICE` to the `soffice`
The second line is for builder changes and before every builder release PR; the builder's round trips also need
poppler (`pdftotext`, `pdftoppm`, `pdffonts`, `pdfimages`, looked up in `/opt/homebrew/bin`, `/usr/local/bin` and
`/usr/bin`). They need LibreOffice installed (macOS default path is detected; otherwise set `TEMPLIFY_SOFFICE` to the `soffice`
executable). The run must show **0 skipped** — a skipped run means LibreOffice was not found. Put the result in the PR
description.

Expand Down Expand Up @@ -569,6 +577,38 @@ mkdocs build --strict
- Write PR titles for users: they become changelog lines. Put behavior changes and migration notes in the PR description
so maintainers can carry them into the release notes.

### Builder releases (preview, 0.x)

`TriasDev.Templify.Builder` and `TriasDev.Templify.Builder.Testing` have their own version line and their own
release-please package (`src/TriasDev.Templify.Builder`, component `builder`, tags `builder-v0.x.y`, changelog
`src/TriasDev.Templify.Builder/CHANGELOG.md`):

- Core and builder get separate release PRs (`separate-pull-requests`), each with its own changelog.
- The builder's release-please package is `src` without `src/TriasDev.Templify` (`exclude-paths`), so commits to any
of the three shipped builder projects (`src/TriasDev.Templify.Builder`, `.Builder.Testing`, `.Builder.Generators`)
count for the builder; `version-file` and `changelog-path` keep `version.txt` and `CHANGELOG.md` in
`src/TriasDev.Templify.Builder`. The core package excludes those projects, the builder tests and sample, and `docs/`,
so builder commits do not reach the core release notes. Root files (solution, `Directory.*.props`, `CLAUDE.md`,
`CONTRIBUTING.md`, CI) count for core: change them in their own `build`/`chore`/`docs`/`ci` commits.
- The PR that merges builder work into `main` gets a `chore(builder): …` title and a merge commit (no
`BEGIN_COMMIT_OVERRIDE`, no `BREAKING CHANGE`): GitHub puts the title into the merge commit body, and
release-please would read a `feat:` title as a core change.
- `src/TriasDev.Templify.Builder/version.txt` is the single version source of both packages; release-please updates
it in the builder's release PR. During `0.x`, a breaking change bumps the minor version (`bump-minor-pre-major`).
- The builder package depends on the core version in `TriasDev.Templify.csproj`. **Release core first** when the
builder needs unreleased core changes: the `publish-builder` job refuses to publish when that core version is not
on nuget.org or when the core source changed since its tag.
- Merging the builder's release PR runs `publish-builder` (builder tests, pack, Trusted Publishing with the `nuget`
environment, as for core). The core release job is not involved.
- The builder packages are experimental (`[assembly: Experimental("TPLB001")]`, docs "Preview status"): their API may
change in any `0.x` release, and the compatibility rules for core do not apply. There is no
`PackageValidationBaselineVersion` for them. Their `PublicAPI.*.txt` files are still kept (entries carry the
`[TPLB001]` prefix), so every change of the API is visible in review. After a builder release, move the
`PublicAPI.Unshipped.txt` entries to `PublicAPI.Shipped.txt` in the builder, the test kit and the generator, and the
generator's `AnalyzerReleases.Unshipped.md` entries to `AnalyzerReleases.Shipped.md`.
- The first release is 0.1.0 (`"initial-version"` in `release-please-config.json`; it no longer applies once a builder
release exists).

---

## Additional Resources
Expand Down
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<ItemGroup Label="Core">
<PackageVersion Include="DocumentFormat.OpenXml" Version="3.5.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="5.6.0" />
<!-- The builder's typed path source generator (C# 14 extension properties; .NET 10 SDK or later). -->
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
</ItemGroup>

<ItemGroup Label="Tools">
Expand Down
Loading
Loading