Apply one numeric package-budget transaction
Own the standalone numeric mutation described by pui-dev under "Decide package-budget ceilings". This leaf changes tracked feature-branch content only. It does not perform a GitHub write or gain permission from an observed CI failure.
- Require a current
capability-envelope, the traced authority-map, the measured candidate-change, evidence-report, and implementation-authorization from the current bounded request or an active standing scope. The authority map must identify the already accepted capability and exact affected package entries. The report comes from pui-validate on that accepted capability candidate; use the validation route to collect missing evidence before this mutation. A read-only governance or CI report does not replace those inputs.
- Inspect the factual measurements before editing.
evidence-report must identify the canonical before/after CI runs for the baseline and accepted capability candidate, their revisions, affected entries, minified artifact hashes and sizes, measured gzip costs, current ceilings, observed failures and growth attribution. A proposed ceiling or its margin is not a prerequisite; pui-validate reports measured facts without deciding that value. Record Node, esbuild, platform/architecture, zlib and build/compression parameters. Compare unchanged source or equivalent isolated artifacts when the environments differ; local diagnostics do not overrule canonical CI.
- Choose the proposed ceiling in this leaf from those measurements and the accepted capability's bounded cost. The proposed value and resulting headroom rationale are outputs of this leaf, not decisions that the input report or a human must already supply. Preserve evidence of investigated accidental closure, duplicate Runtime copies, dead code and avoidable eager inclusion. Justify accepted capability cost without weakening semantics or raising a number merely to obtain green CI. For related changes, identify and measure the integrated combination; do not sum isolated deltas or pass off an old feature-only result as the final combination. Missing or stale measurements mean collect/refresh them before selecting a number, not ask for approval of an unsupported value.
- Apply the smallest bounded change to numeric ceiling literals in
scripts/analysis/package-budgets.mjs, associated explanatory comments when needed, and the transaction's supporting evidence record. Do not change entry points, bundling, compression, external dependencies, diagnostic profiles, pass/fail behavior, implementation code or unrelated limits. Route those different scopes through their own accepted work and owning leaves. The whole-entry gate remains blocking; diagnostic profiles cannot replace it.
- Return a separately reviewable commit or focused PR candidate linked to its accepted capability. The
candidate-change must include the numeric diff and its supporting transaction record, identifying the exact changed entries/literals, old and proposed ceilings, resulting headroom rationale, evidence references/digests, attribution, combination revisions, and the rollback boundary. Preserve prior red runs and alternatives as history. State candidate-bound checks as passed, failed or unrun; a candidate awaiting canonical CI is not accepted evidence.
- Hand the candidate to
pui-validate for the final candidate's canonical blocking package-budget check, including a fresh combination when related integration changes invalidate prior measurements. Keep the transaction record in the candidate and require a final-candidate evidence-report before fresh-context pui-review with review-input. A v1 handoff replaces its singleton report; a v2 handoff may retain distinct historical reports with their revisions/results alongside the new report. Retention never turns prior failed, partial or unrun evidence into a current pass. Fresh independent review, trusted CI/DCO and exact-head integration remain separate conditions. Only evidence-backed numeric choice is delegated. Real unresolved product direction and privileged operations retain their normal decision boundaries; pui-govern stays read-only.
Finf development policy boundary
The owner-authorized Finf rapid-development exception is an explicit, separately reviewed policy change, not a numeric transaction performed by this leaf. While that phase is active, retain actual over-budget pass: false results as advisory and do not raise a number merely to hide them. Build/measurement errors and all other gates remain blocking. Outside its named scope and after its 68-goal expiry, the strict whole-entry gate and numeric workflow above remain unchanged. This leaf cannot extend the phase, change its completion ledger, or invent another waiver.
Explicit handoff
Entry into this leaf requires a digest on every incoming candidate-change, including all distinct candidate materials retained in a v2 handoff. Other leaves retain their existing artifact-digest requirements.
When blocked before a numeric edit, return the incoming candidate-change unchanged with the existing report, nextSkillId: null, and explicit blocker/refresh work in the notes. Validate that terminal using pnpm agent:skill -- --handoff <output.json> --prior-handoff <received.json>. Keep the actual received handoff: it must select this leaf and retain the same format, mode and v2 binding. Preserve every required input artifact's reference, digest and metadata; the candidate needs a digest. A changed candidate or added transaction material cannot use this stop. State that no budget edit or approval occurred; do not fabricate a transaction or a passed check.
Return exactly one handoff conforming to internal/agent-operations/schemas/skill-handoff.schema.json. Preserve capability-envelope, authority-map and implementation-authorization references and any digests, and carry the incoming evidence-report until validation refreshes it. Include the registered candidate-change, containing both the numeric edit and its supporting transaction record. After any numeric edit, set nextSkillId to pui-validate; the incoming report does not validate the changed candidate and cannot justify a direct review handoff. Use null with the unchanged incoming candidate when blocked before an edit. Do not load another leaf. An actual transaction record is evidence of a numeric edit, not a review packet, published approval or mutation authorization for integration. A blocked unchanged candidate makes no such edit claim.
The registry declares allowedNextSkillIds: [pui-validate], which the handoff validator enforces for every nonterminal return from this leaf. A terminal return instead requires the validated received handoff and unchanged required inputs; notes alone never establish that no edit occurred. Adding review-input or previously published review artifacts cannot turn the retained pre-mutation report into a direct review or integration route. After running the required candidate-bound checks, pui-validate owns the refreshed report and its normal independent-review handoff. The resolver enforces these structural relationships; it does not authenticate the contents of opaque evidence references or a forged source identity.
Communicate with the user in the user's current language. Keep paths, entry names, measurements, revisions and evidence links exact.