agentleFS
yannelliyannelli/pi-rust/.claude/skills/port-upstream-commit/SKILL.md

port-upstream-commit

Skill32 starsChanged 44 days agoMITView on GitHub

Port one commit from upstream pi (earendil-works/pi) to pi-rust with tests. Use when the parity report or GAPS.md lists an unported upstream commit, or when asked to port an upstream fix or feature.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Run cargo fmt --all -- --check, cargo clippy --workspace --all-targets --locked -- -D warnings, and the tests of the crates you changed.

    line 13
  2. Very specific:

    Commit with a Conventional Commit that names the upstream SHA: fix(scope): <what> (upstream <sha>), with the 9-character SHA.

    line 14
  3. Very specific:

    If this closes an entry in docs/parity/GAPS.md, remove the entry in the same change.

    line 15
  4. Very specific:

    If a commit does not apply (browser-only code, a TypeScript build change), add its 9-character SHA to the commits list in …

    line 17

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Port an upstream commit

Full playbook: docs/parity/README.md#porting-an-upstream-commit.

  1. git -C ../pi-upstream show <sha>. Read the whole diff, including tests and changelog lines.
  2. Find the Rust counterpart with the mapping table in docs/parity/README.md. Read the Rust code that defines the current behavior before you change it.
  3. Port the behavior with the same names, JSON shapes, and messages as upstream. Port the tests to the Rust style. Tests use the faux provider or a local mock server.
  4. Run cargo fmt --all -- --check, cargo clippy --workspace --all-targets --locked -- -D warnings, and the tests of the crates you changed. Cross-build Windows if you touched cfg(windows) code.
  5. Commit with a Conventional Commit that names the upstream SHA: fix(scope): <what> (upstream <sha>), with the 9-character SHA. Do not write upstream <sha> for a commit you did not port.
  6. If this closes an entry in docs/parity/GAPS.md, remove the entry in the same change. When every upstream commit up to a point is ported, move syncedCommit, syncedVersion, and syncedOn in docs/parity/upstream.json.

If a commit does not apply (browser-only code, a TypeScript build change), add its 9-character SHA to the commits list in docs/parity/allowlist.json with the reason.

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.