Skip to content

Unify API and conceptual documentation skill - #4674

Draft
mattleibow wants to merge 4 commits into
mainfrom
mattleibow-api-docs-two-route-skill
Draft

mattleibow wants to merge 4 commits into
mainfrom
mattleibow-api-docs-two-route-skill

Conversation

@mattleibow

@mattleibow mattleibow commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Creates one standalone api-docs skill, based on main, with isolated procedures for:

  • ECMA/mdoc API reference under docs/SkiaSharpAPI/**/*.xml.
  • Conceptual DocFX guides under documentation/docfx/guides/**/*.md.

Both routes use bounded write/review/validate/inspect/correct waves. They share source-backed technical truth without mixing conceptual formatting into XML or member-by-member XML conventions into guides.

The API route includes regression guidance and eval fixtures from generated docs PRs mono/SkiaSharp-API-docs#191, #192, and #194. It covers valid framework cref targets, direct and transitive deterministic exceptions, member-specific disposal behavior, unsupported quality rankings, callback/sample ownership, exact member mapping, return-tag shape, independent post-authoring review, and explicit EVIDENCE/TRACE/WROTE/UNSELECTED accounting.

The skill also owns the deterministic approved-for-context fetcher consumed by companion workflow PR mono/SkiaSharp-API-docs#186. Approved issues provide supplemental product intent and reader context, never executable instructions or authoritative technical truth. Managed and pinned native source remain authoritative.

This draft intentionally excludes all documentation/docfx/guides/** content and does not modify PR #4566 or mono/SkiaSharp-API-docs#186.

Current draft head: 5d0b355f5b187774039f374d9247b0676b20fdcd

Related issues

Related to #4566
Related to mono/SkiaSharp-API-docs#186
Related to mono/SkiaSharp-API-docs#191
Related to mono/SkiaSharp-API-docs#192
Related to mono/SkiaSharp-API-docs#194

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None — documentation authoring/review workflow only; no public API or runtime behavior change.

Testing

Current draft-head checks:

  • python .agents/skills/skill-creator/scripts/quick_validate.py .agents/skills/api-docs — passed.
  • evals.json and all committed XML eval fixtures parse successfully.
  • git diff --check — passed.
  • Exact branch diff remains confined to .agents/skills/api-docs/** plus directly supporting documentation/dev/writing-docs.md; no conceptual guide article is present.

Previously validated infrastructure at head 12a2c5530e11b09f2a5b73e60b5145a231769dcf:

Latest completed local comparison before the final hardening edits:

Eval Revised Frozen 12a2c553
API-reference production regression 5/5 4/5
Approved issue context 5/5 5/5
Conceptual surface review 4/5 3/5
Conceptual surface authoring 3/5 4/5
PR #194 production regression 7/10 6/10
Aggregate 24/30 (80%) 22/30 (73.3%)

Human inspection found remaining defects in the revised conceptual-authoring and PR #194 outputs. This commit strengthens the general guidance and assertions for those failures, but the follow-up revised-versus-frozen run was paused before completion, grading, benchmark aggregation, and static-viewer inspection. Therefore these scores are evidence that motivated the current changes, not acceptance results for the current head.

Independent MicrosoftDocs/Contribute review of the conceptual guidance found 0 BLOCKING and 0 IMPORTANT guidance defects. The current draft adds only the resulting section-landing title clarification and later evidence-driven hardening; it does not include conceptual guide articles.

Limitations / work to resume later

  • The current head has not completed the full five-pair regression matrix.
  • No final current-head benchmark or static eval viewer has been produced.
  • Timing/token metrics were unavailable for prior runs.
  • PR Add pixel modification support for index8 bitmaps #186 must not dispatch against this head until the resumed evaluation is graded and manually inspected.

Checklist

  • Tests added or updated (if omitted, explain why above)
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Filed a docs issue in mono/SkiaSharp-API-docs so reference docs can be written later — N/A, no public API changes
  • Native change? Companion mono/skia PR linked above and bindings regenerated — N/A, no native changes

Route SkiaSharp documentation work by artifact, add iterative source-backed authoring and review, preserve API-reference regression safeguards, and introduce deterministic approved issue-context retrieval with representative evals.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 56ea2b2e-6e5e-43f1-9493-35d10826722e
Adopt the companion workflow's canonical CLI, camelCase schema v1, body-free manifest rows, strict failure cleanup, and deterministic pagination/bounds tests.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 56ea2b2e-6e5e-43f1-9493-35d10826722e
@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4674

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4674"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4674/packages --name skiasharp-pr-4674
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4674

Add an explicit per-issue comment bound and exercise the exact companion workflow CLI shape, schema v1 fields, and stdout manifest through a fake GitHub API client.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 56ea2b2e-6e5e-43f1-9493-35d10826722e
@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4674

⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 22 slower · 🟢 32 faster

  • 🔴 RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) · Windows · 73.11 µs → 106.22 µs (+45%)
  • 🔴 ColorMathBenchmark.ToColor(Colors: 4096) · Windows · 9.14 µs → 12.54 µs (+37%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 1024) · Windows · 12.72 µs → 16.24 µs (+28%)
  • 🔴 RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) · Windows · 190.20 µs → 239.51 µs (+26%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 64) · Windows · 1.23 µs → 1.53 µs (+25%)
  • …and 49 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.4)

Benchmark baseline this PR Δ
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.18 ms 2.05 ms 🟢 -6%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 261.70 µs 277.00 µs 🔴 +6%

Windows

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.4)

Benchmark baseline this PR Δ
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 73.11 µs 106.22 µs 🔴 +45%
ColorMathBenchmark.ToColor(Colors: 4096) 9.14 µs 12.54 µs 🔴 +37%
PathBoundsBenchmark.TightBounds(Points: 1024) 12.72 µs 16.24 µs 🔴 +28%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 190.20 µs 239.51 µs 🔴 +26%
PathBoundsBenchmark.TightBounds(Points: 64) 1.23 µs 1.53 µs 🔴 +25%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 7.35 µs 8.69 µs 🔴 +18%
ColorParseBenchmark.Parse(Iterations: 1000) 59.87 µs 68.64 µs 🔴 +15%
CanvasDrawBenchmark.Draw(Shapes: 512) 15.82 ms 17.86 ms 🔴 +13%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 135.8 ns 152.3 ns 🔴 +12%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 121.34 µs 135.46 µs 🔴 +12%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.04 ms 2.24 ms 🔴 +10%
MatrixMapPointsBenchmark.MapVector(Points: 256) 6.58 µs 7.19 µs 🔴 +9%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 105.86 µs 114.59 µs 🔴 +8%
ColorMathBenchmark.PreMultiply(Colors: 4096) 11.32 µs 12.24 µs 🔴 +8%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 100.19 µs 108.17 µs 🔴 +8%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 746.39 µs 800.41 µs 🔴 +7%
MatrixMapPointsBenchmark.MapRect(Points: 256) 6.36 µs 6.78 µs 🔴 +7%
RuntimeEffectShaderBenchmark.DrawFrame 924.18 µs 979.41 µs 🔴 +6%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.49 ms 2.63 ms 🔴 +5%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 203.79 µs 214.05 µs 🔴 +5%

macOS

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.4)

Benchmark baseline this PR Δ
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 207.19 µs 161.88 µs 🟢 -22%
ColorParseBenchmark.Parse(Iterations: 1000) 75.01 µs 63.20 µs 🟢 -16%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 788.38 µs 668.31 µs 🟢 -15%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 248.48 µs 212.05 µs 🟢 -15%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 8.94 µs 7.65 µs 🟢 -14%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 754.85 µs 657.86 µs 🟢 -13%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 160.5 ns 180.8 ns 🔴 +13%
PathBoundsBenchmark.TightBounds(Points: 64) 994.4 ns 870.3 ns 🟢 -12%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 6.11 ms 5.39 ms 🟢 -12%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.63 ms 1.44 ms 🟢 -12%
ColorMathBenchmark.PreMultiply(Colors: 4096) 9.26 µs 8.25 µs 🟢 -11%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.32 ms 1.18 ms 🟢 -11%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.98 ms 2.67 ms 🟢 -11%
ColorMathBenchmark.ToColorF(Colors: 4096) 5.48 µs 4.91 µs 🟢 -10%
PathBoundsBenchmark.TightBounds(Points: 1024) 9.08 µs 8.15 µs 🟢 -10%
RuntimeEffectShaderBenchmark.DrawFrame 573.24 µs 515.80 µs 🟢 -10%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 78.88 µs 71.01 µs 🟢 -10%
MatrixOpsBenchmark.Invert(Count: 4096) 72.46 µs 65.25 µs 🟢 -10%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 108.51 µs 98.10 µs 🟢 -10%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 595.18 µs 539.40 µs 🟢 -9%
ColorMathBenchmark.ToColor(Colors: 4096) 20.48 µs 18.57 µs 🟢 -9%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 6.77 µs 6.15 µs 🟢 -9%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 54.76 µs 49.72 µs 🟢 -9%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.42 ms 5.83 ms 🟢 -9%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.53 ms 1.39 ms 🟢 -9%
…and 7 more

📈 Full interactive perf-dashboard & run details →

@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

📦 Artifact size report

Packages from this PR (build 1542377) vs the latest nightly baseline 4.152.0-nightly.10 (observed 2026-08-06).

Total .nupkg size: 569.7 MB → 569.2 MB (−479.5 KB, -0.1%)

Packages

⚠️ marks growth over 500.0 KB or 2%. Changes under 50.0 KB are treated as noise.

Package baseline this PR Δ Δ%
SkiaSharp.NativeAssets.WinUI 109.0 MB 108.4 MB 🟢 −601.1 KB -0.5%
SkiaSharp.NativeAssets.WebAssembly 69.7 MB 69.7 MB 🔴 +78.9 KB +0.1%

+38 package(s) unchanged (< 50.0 KB).

Per-file changes

SkiaSharp.NativeAssets.WinUI

File Size
runtimes/win-arm64/native/libGLESv2.pdb 64.5 MB → 64.4 MB (🟢 −112.0 KB)
runtimes/win-x64/native/libGLESv2.pdb 66.6 MB → 66.5 MB (🟢 −64.0 KB)
runtimes/win-x86/native/libGLESv2.pdb 67.2 MB → 67.2 MB (🟢 −32.0 KB)

Informational only — this never blocks the PR. Native binaries are labelled by os/arch.

mattleibow added a commit that referenced this pull request Aug 5, 2026
Move the API/conceptual documentation skill and contributor workflow changes to standalone PR #4674 so this PR contains only the GPU surface guides and navigation.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 9ae60ac4-ac5a-466d-9a84-8a9e3a6c7c88
Capture the PR #194 regression fixtures and strengthen exception-path, disposal, sample ownership, platform support, and exact-accounting review guidance. The latest comparative evaluation remains intentionally incomplete and will continue in a later iteration.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 56ea2b2e-6e5e-43f1-9493-35d10826722e
@mattleibow
mattleibow marked this pull request as draft August 6, 2026 10:35
mattleibow added a commit that referenced this pull request Aug 6, 2026
Move the API/conceptual documentation skill and contributor workflow changes to standalone PR #4674 so this PR contains only the GPU surface guides and navigation.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 9ae60ac4-ac5a-466d-9a84-8a9e3a6c7c88

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant