Skip to content

git.md: second size cut — move the 8 PR/review op bodies to references (SG-7) #326

Description

@dean0x

Context

Phase 2 of the pluggable-tracker work splits tracker mechanics out of src/assets/agents/git.md into generated per-op skill references, taking the file from 59,376 characters to ≈ 49,563 — a 17% reduction on every Git spawn. That is the tracker-shaped cut only.

A second, larger cut was measured during planning and deliberately left unowned by any phase.

The measured opportunity (SG-7)

  • 8 PR/review operation bodies remain inline in git.md.
  • They total 381 lines / 25,175 characters ≈ 6,294 tokens.
  • Moving them would bring git.md to a target of ≈ 500 lines.

Because git.md is a shared agent prompt file billed per spawn (PF-026), this is the largest remaining per-spawn saving in the file.

The constraint that made it a separate issue (SG-8, verbatim)

post-review-summary / post-resolution-summary mechanics may move only in a PR that moves their guards, never as a size optimisation.

Both operations are D10 sinks (the publication gate — visibility probe, FULL/STUB/OFF, fail-closed) and D11 sinks (unconditional secret redaction before posting). Their guards — the 10 D10 its including the negative-scope assertion that gh repo view appears in exactly ['post-resolution-summary','post-review-summary'], and the D11 forward/reverse sink-class guards with the postingOps.length >= 8 floor — must move in the same PR as the text, or the invariants they protect become unguarded mid-flight.

Folding this into Phase 2 would have moved two D10+D11 sink bodies in the same PR as the tracker split, which is precisely what SG-8 forbids.

Scope for this issue

  1. Move the 8 PR/review op **Process:** bodies into skills/git/references/, following the Phase-2 pattern (contract stays in git.md; mechanics move; containment test proves zero unaccounted lines).
  2. Move their guards in the same PR — the D10 block including its negative-scope assertion, and the D11 forward/reverse guards — repointed to the widened corpus with the floor unchanged at >= 8 and each repointed guard proven non-vacuous.
  3. Re-derive and re-pin the byte budget constant with its derivation in a comment.
  4. Regenerate the git-agent.md golden in its own commit, reviewed as a text diff; the frozen github-status-lines.txt fixture must be byte-unchanged.

Out of scope

## Comment-sink scrub (D11) never moves. No threshold is lowered. No behaviour change to any GitHub-rendered artifact.

Tracking issue: #321 (out of scope for the four phases).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions