Skip to content

Ops docs: fix partial includes, LaTeX rendering, version stamp + KDoc params (#513)#514

Merged
michalharakal merged 3 commits intodevelopfrom
feature/513-ops-docs-partials-latex-void
Apr 15, 2026
Merged

Ops docs: fix partial includes, LaTeX rendering, version stamp + KDoc params (#513)#514
michalharakal merged 3 commits intodevelopfrom
feature/513-ops-docs-partials-latex-void

Conversation

@michalharakal
Copy link
Copy Markdown
Contributor

Fixes #513.

Summary

Four polish follow-ups to #511 (TensorOps surface scan) that shipped with rendering bugs on the published site.

  • Unresolved partial includes. Generator now only emits include::partial$ops/<op>/<fn>.adoc[...] when the partial exists on disk. Antora does not honour [optional] for resource-ref includes, so the prior blanket emission produced "unresolved include" errors on every op except matmul. Partials root is derived from the output dir's Antora pages/ marker. Per-function backend chrome removed entirely — platform coverage per op is not a concern yet.
  • void backend no longer surfaces as a real backend. @Backend annotation gains internal: Boolean = false, applied to VoidTensorOps (shape-only sentinel, no runtime). KSP surface scan filters internal backends out, and the annotation-grouping path drops symbols whose enclosing class is @Backend-tagged. No more standalone voidtensorops.adoc stub.
  • LaTeX renders as real math. Playbook sets asciidoc.attributes.stem: latexmath; supplemental UI override at docs/supplemental-ui/partials/footer-scripts.hbs injects MathJax v3 from jsDelivr with \(…\) / \[…\] delimiters matching Asciidoctor's output. Override is local so docs fixes don't require a skainet-docs-ui bundle release.
  • Real version stamp + KDoc params. Generated pages now stamp VERSION_NAME from root gradle.properties (the same value published to Maven Central) via a new skainet.version KSP option, replacing the hardcoded "1.0.0" placeholder. Parameter descriptions come from KDoc @param directives on the TensorOps interface — a new parseKDocParams helper walks KSP's raw docString, pulls @param <name> <desc> blocks with continuation-line support, and feeds them into extractParameters. matmul and scaledDotProductAttention are the reference examples.

Commits

  1. c4f0ed2b — unresolved partials + void backend + LaTeX rendering
  2. 3327cba3 — real version stamp + KDoc @param extraction
  3. fdb4323e — KDoc @param on matmul as a reference example

Test plan

  • Local Antora build via docs/.docker image produces zero Unresolved include errors on tensorops.html
  • No voidtensorops.html in the built site
  • MathJax loads on every page; \(…\) / \[…\] delimiters in the matmul section render as real math
  • Top-of-page stamp reads Generated from version ``0.18.0``` (matches VERSION_NAME`)
  • matmul and scaledDotProductAttention parameter bullets carry KDoc prose
  • CI docs workflow builds successfully on push
  • Published Pages site renders correctly after merge

🤖 Generated with Claude Code

michalharakal and others added 3 commits April 15, 2026 11:29
)

Four follow-ups to the TensorOps surface-scan docs (#511) that landed
with rendering bugs on the published site.

Generator now only emits `include::partial$ops/<op>/<fn>.adoc[...]`
directives for partials that actually exist on disk — Antora does not
honour `[optional]` for resource-ref includes, so the prior blanket
emission produced "unresolved include" errors on every op except
matmul. Partial root is derived from the output dir's Antora `pages/`
marker. Per-function backend chrome is removed entirely; platform
coverage per op is not a concern yet.

`@Backend` annotation gains `internal: Boolean = false`, applied to
`VoidTensorOps` which is a shape-only sentinel, not a deployable
backend. The KSP surface scan filters internal backends out, and the
annotation-grouping path drops symbols whose enclosing class is
`@Backend`-tagged (their coverage is already in the surface scan).
Result: no standalone `voidtensorops.adoc` stub, no `void` column in
badges or matrices.

LaTeX in `stem:[…]` and `[stem]` blocks now renders as real math.
The playbook sets `asciidoc.attributes.stem: latexmath` so expressions
are parsed as LaTeX, and a supplemental UI override at
`docs/supplemental-ui/partials/footer-scripts.hbs` injects MathJax v3
from jsDelivr with `\(…\)` / `\[…\]` delimiters matching Asciidoctor's
output. Override is local so docs fixes don't require a
skainet-docs-ui bundle release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two related polish items on top of the partial/void/LaTeX fixes.

Generated pages now stamp the canonical SKaiNET version — sourced from
`VERSION_NAME` in the root `gradle.properties` (the same value
published to Maven Central) — instead of the hardcoded "1.0.0"
placeholder the KSP processor shipped with. The value is passed via a
new `skainet.version` KSP option configured in
`skainet-lang-core/build.gradle.kts` and read through
`environment.options` on the processor side. Falls back to `"unknown"`
when the option is absent so unit-test fixtures that drive the
processor directly don't need to thread the value through.

Parameter descriptions on the generated operator pages now come from
KDoc `@param` directives on the underlying `TensorOps` interface. A
new `parseKDocParams` helper walks KSP's raw `docString`, pulls
`@param <name> <desc>` blocks (with continuation-line support up to
the next `@<tag>` or blank line), and feeds the map into
`extractParameters`. Params without KDoc still render as
`name: Type` with no description, so ops that haven't been documented
yet stay valid. `scaledDotProductAttention` is the reference example —
its six params all now carry shape and semantics prose on the
generated page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
matmul is the walk-through example for the ops docs pipeline — it
already has a prose partial under partials/ops/tensorops/matmul.adoc
and gets embedded into the explanation/theory page. Give its
interface declaration the matching @param KDoc so the generator's
new param-description extraction has something to render on the
reference page, mirroring the pattern set by
scaledDotProductAttention.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-514 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

@michalharakal michalharakal merged commit 4ab6602 into develop Apr 15, 2026
8 checks passed
@michalharakal michalharakal deleted the feature/513-ops-docs-partials-latex-void branch April 15, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ops docs: fix unresolved partial includes, drop void backend, render LaTeX

1 participant