.agents/skills/api-add-review/references/review-workflow.md
Review an existing PR or diff containing new SkiaSharp/HarfBuzzSharp APIs. Produces actionable feedback and can auto-fix high-confidence issues.
This workflow is used:
One of:
List every new or changed public member:
Build a table: | Type | Member | Signature | Notes |
Read api-design-rules.md and verify each item:
For each new public API member, verify a test exists that:
Build a table:
| API | Exact Values | Span Equiv | Static Font | Neg Index | Round-trip | File |
Flag any gaps as "Missing test: [description]".
# Build native (required if C API changed)
dotnet cake --target=externals-macos --arch=arm64
# Build C#
dotnet build binding/SkiaSharp/SkiaSharp.csproj
# Run all tests
dotnet test tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj
If tests fail, categorize:
Determine whether the new API needs a gallery sample:
If a gallery sample already exists for this feature area, verify:
static readonly for constant data (weights arrays, etc.)(int)(float)value for int sliders)If no sample exists, evaluate:
| Feature scope | Sample needed? |
|---|---|
| New standalone capability (new drawing mode, rendering technique, font feature) | Yes — new sample file |
| Enhancement to existing capability (new overload, extra option) | Maybe — update existing sample with new controls |
| Internal/plumbing API (no visible user effect) | No |
Flag missing samples as "Missing sample: [description]" in the review report.
CanvasSampleBase or DocumentSampleBaseTitle, Description, and Category (from SampleCategories)SampleMedia (new assets added to Media/ and registered)using or OnDestroy)Output a structured review:
## API Review: [feature name]
### ✅ Correct
- [list things that are good]
### ⚠️ Suggestions
- [non-blocking improvements]
### ❌ Must Fix
- [blocking issues that need resolution]
### 📋 Missing Tests
- [specific tests that should be added]
When called with "fix-first" or from the add-workflow, automatically implement minimal safe fixes for high-confidence issues:
Commit fixes and re-run tests to verify.