.agents/skills/review-skia-update/references/schema-cheatsheet.md
Quick reference for skia-review-schema.json v1.0.
{
"meta": { ... },
"summary": "Executive summary of the PR review...",
"recommendations": ["Action item 1", "Action item 2"],
"generatedFiles": { "status": "...", "summary": "...", "recommendations": [...], ... },
"upstreamIntegrity": { "status": "...", "summary": "...", "recommendations": [...], ... },
"interopIntegrity": { "status": "...", "summary": "...", "recommendations": [...], ... },
"depsAudit": { "status": "...", "summary": "...", "recommendations": [...], ... },
"riskAssessment": "HIGH",
"companionPr": { "prNumber": N, "status": "...", "summary": "...", "recommendations": [...], "added": [...], "changed": [...], "unchanged": N }
}
Every section has summary (brief overview) and recommendations (actionable items for reviewer).
companionPr is required — a Skia update always has a companion SkiaSharp PR.
| Script | What it checks | Output key |
|---|---|---|
check_generated_files.py | Regenerate P/Invokes independently | generatedFiles |
check_source.py | Diff-of-diffs for upstream + interop | upstreamIntegrity + interopIntegrity |
check_deps.py | DEPS dependency changes | depsAudit |
check_companion.py | Companion PR file diffs (filtered) | companionPr |
run_review.py | Orchestrator — runs all four above | raw-results.json |
All sections use PASS or REVIEW_REQUIRED. There is no WARN or FAIL for source/deps — all changes need human review.
| Field | Values |
|---|---|
generatedFiles.status | PASS, FAIL |
upstreamIntegrity.status | PASS, REVIEW_REQUIRED |
interopIntegrity.status | PASS, REVIEW_REQUIRED |
depsAudit.status | PASS, REVIEW_REQUIRED |
riskAssessment | LOW, MEDIUM, HIGH |
| Condition | Risk |
|---|---|
generatedFiles.status == FAIL | HIGH |
upstreamIntegrity.status == REVIEW_REQUIRED | HIGH |
interopIntegrity.status == REVIEW_REQUIRED | MEDIUM |
depsAudit.status == REVIEW_REQUIRED | MEDIUM |
| All PASS | LOW |
Both use the same structure (diff-of-diffs):
| Category | Meaning |
|---|---|
added | Patched in new fork but NOT in old — new modifications |
removed | Patched in old fork but NOT in new — patches dropped |
changed | Patched in both but patch content differs |
unchanged | Count of identical patches carried forward |
Each item in added/removed:
{ "path": "include/core/SkBitmap.h", "summary": "...", "diff": "...", "relatedFiles": [...] }
Each item in changed:
{ "path": "src/core/SkFont.cpp", "summary": "...", "diff": "...", "oldDiff": "...", "newDiff": "...", "patchDiff": "...", "relatedFiles": [...] }
diff — Direct branch-to-branch diff (base→PR head). The simplest view — what actually changed in the fork. Default view in the HTML viewer.patchDiff — Diff-of-diffs (old patch vs new patch). Shows how the fork's modifications changed. Useful for understanding why something changed relative to upstream.oldDiff / newDiff — The full fork-vs-upstream patches for old and new branches respectively.No per-file status. AI provides factual summaries only. ALL items need human review.
Each source file item can include an optional relatedFiles array to link to other files in the report:
{
"path": "include/core/SkFontMgr.h",
"summary": "Fork patch added MakeDefault()...",
"relatedFiles": [
{ "path": "src/c/sk_default_fontmgr.cpp", "relationship": "replaced by" },
{ "path": "src/c/sk_typeface.cpp", "relationship": "consumer" }
]
}
| Field | Required | Description |
|---|---|---|
path | Yes | File path (relative to skia or SkiaSharp repo root) |
relationship | No | Short label: replaced by, moved to, moved from, depends on, consumer, header, implementation, C# wrapper |
The HTML viewer renders these as clickable pills. Clicking navigates to the matching file in the report (scrolling + highlighting), or opens on GitHub if not found in the report.
When to add relatedFiles:
Same added/removed/changed pattern:
Each added/removed item:
{ "name": "icu4x", "summary": "...", "url": "...", "revision": "..." }
Each changed item:
{ "name": "libpng", "summary": "...", "oldUrl": "...", "oldRevision": "...", "newUrl": "...", "newRevision": "..." }
Uses the same sourceFile structure as upstream/interop for full file-level review with diffs:
{
"companionPr": {
"prNumber": 3560,
"status": "REVIEW_REQUIRED",
"summary": "Brief overview of C# changes...",
"recommendations": ["Action item 1", "..."],
"added": [
{ "path": "binding/SkiaSharp/SKFoo.cs", "summary": "New wrapper for sk_foo API", "diff": "..." }
],
"changed": [
{ "path": "binding/SkiaSharp/SKBar.cs", "summary": "Updated overload for new parameter", "diff": "...", "oldDiff": "...", "newDiff": "...", "patchDiff": "..." }
],
"unchanged": 5
}
}
| Category | Meaning |
|---|---|
added | New files in the companion PR (new C# wrappers, new tests) |
changed | Modified files (updated wrappers, new overloads, signature changes) |
unchanged | Count of reviewed files with no changes requiring attention |
Each item uses the same sourceFile shape as upstream/interop — full diff support with Direct/Patch/Old/New views, related files cross-links, etc.
Files in these dirs go to interopIntegrity; everything else to upstreamIntegrity:
include/c/include/xamarin/src/c/src/xamarin/REVIEW_REQUIRED sections must have at least one added/removed/changed itempath + summaryname + summarymeta.skiasharpPrNumber is required (integer, not null)meta.shas.upstream is the NEW upstream SHA (the milestone being merged in)companionPr must have prNumber, status, summary, recommendations, unchangedpath + summary (same as source integrity items)generatedFiles can include generatorError (string) when the generator itself crashes/Users/... → relative)"1.0"