agentleFS
mark2685mark2685/agent-tools/skills/flow-frontend/buf-bump/SKILL.md

buf-bump

Skill0 starsChanged 5 months agoMITView on GitHub

Bumps generated protobuf packages in the flow-frontend monorepo and fixes the resulting TypeScript breakage. Use when the user says "buf bump", "bump protos", "update proto types", "pull the latest protos for a service", or "/buf-bump". User-invoked only — this rewrites package pins and patches consuming code.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Ask which service(s) to bump.

    line 22
  2. Distinctive:

    Canary — verify the bump actually changed versions: Run git diff pnpm-workspace.yaml.

    line 36
  3. Distinctive:

    If it is empty, the pins were already current OR the bump silently no-op'd (bad auth, wrong service).

    line 37
  4. Very specific:

    Do not run pnpm build:rpc as part of a bump.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Proto Bump Workflow

Runs in flow-frontend. Updates the @bufteam/* proto packages pinned in the pnpm-workspace.yaml catalog and resolves the TypeScript breakage in consuming code. The packages are prebuilt on the BSR npm registry (hadrian.buf.dev/gen/npm/v1) — nothing is built locally; pnpm install fetches them. Side-effecting: it mutates lockfiles, reinstalls, and edits source. User-invoked only.

Prerequisites

  • Authenticated to the Buf registry: buf registry login hadrian.buf.dev (cross-repo requirement). Without it, buf-bump:* cannot resolve the upstream modules.

Step 0: Confirm scope

Ask which service(s) to bump. Read the available targets from the root package.json — do not rely on a memorized list. They drift:

node -e "console.log(Object.keys(require('./package.json').scripts).filter(s=>s.startsWith('buf-bump')).join('\n'))"

buf-bump:main pulls every service from main; buf-bump:<service> pulls one.

Steps

  1. Capture the before-state so you can prove the bump changed something: git diff --stat pnpm-workspace.yaml > /tmp/buf-before.txt
  2. Run pnpm buf-bump:<service> (or pnpm buf-bump:main).
  3. Canary — verify the bump actually changed versions. Run git diff pnpm-workspace.yaml. If it is empty, the pins were already current OR the bump silently no-op'd (bad auth, wrong service). Stop and report — do not proceed as if it succeeded.
  4. Install. The bump script runs pnpm install itself; it is what actually fetches the prebuilt packages. Canary: git diff --stat pnpm-lock.yaml must show the new @bufteam/* versions. If the lockfile is unchanged, the install pulled nothing — stop and report; do not proceed as if it succeeded. (If the script's install step failed, run pnpm install yourself and re-check.)
  5. Type-check with pnpm lint:tsc to surface breakage.
  6. Fix the breakage, distinguishing mechanical from non-mechanical:
    • Mechanical (renamed field, widened type, new optional field): update the rpcToForm* / formToRpc* converters, server actions referencing the RPC, and direct proto usage in components. Use *Required types from hadrian_protoc-gen-es-required for form validation.
    • Non-mechanical (a field was removed, an enum value dropped, semantics changed): escalate to the user. A removed field is a backend contract change — surface it; do not silently insert a null-check or default that hides lost data.
  7. Test with pnpm test.
  8. Report the version delta (from step 3), what you fixed mechanically, and any non-mechanical changes you escalated.

Gotchas

  • Do not run pnpm build:rpc as part of a bump. Its turbo filter (turbo build --filter *-proto) matches zero workspace packages — the proto packages moved to prebuilt BSR npm packages (Nov 2024), so there is nothing to build locally.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.