Constraint: Public skills are published only by explicit administrator action unless they are tracked third-party market sources. Confidence: high Scope-risk: narrow Directive: Keep private/internal skills out of the public marketplace and preserve normal incremental market Git history. Tested: Marketplace validation passed.
1.6 KiB
ppr-loop (sub-reference of next-cache-components-optimizer)
Page-render optimization: grow the static shell of a single cacheComponents page.
Rank candidates by visible pixel area; largest gap first.
preflight (in addition to shared)
The page to optimize is whatever route the user is currently on (per shared preflight). Set the instant cookie (per shared instant cookie section), then reload.
loop
diagnose
-
Check for the no-shell bailout per SKILL.md.
-
List candidates.
agent-browser react suspense --only-dynamic --json→ each boundary hasjsx_source(file:line:col) andsuspended_by[].name. Resolvejsx_source(orsuspended_by[].owner_stack) viaPOST /__nextjs_original-stack-frames. -
Rank by rendered area. Per candidate, take max(fallback rect on shell-only, rendered subtree rect on full). Fallback rect alone misleads when developers used an undersized spinner.
-
Gauge the gap. Same capture as verify — the shell-only render. If the top-ranked candidate is sub-viewport (thin fallback bar, sidebar widget), the shell is already in good shape; surface that and offer to audit other routes for better targets, rather than forcing a marginal refactor.
-
One boundary dominates → that wrapper is the shell. Read inside, enumerate the awaits, recurse with those.
decide / apply
Apply the shared lever rules from SKILL.md.
verify
Re-take the shell-only render and compare against the baseline screenshot. The targeted gap must shrink or vanish; identical captures fail per the shared visible-delta rule. Re-check the no-shell bailout; a botched extract can break the shell.