Skip to content

A pull request skill for contributor agents - #1595

Draft
jayleaton wants to merge 4 commits into
ashhart:mainfrom
jayleaton:repo/pr-skill
Draft

jayleaton wants to merge 4 commits into
ashhart:mainfrom
jayleaton:repo/pr-skill

Conversation

@jayleaton

@jayleaton jayleaton commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Before: a contributor agent had no procedure for preparing a pull request, so descriptions reached review without the issue link, the overlap check, the lean delta or platform coverage. After: docs/pr/SKILL.md (tensorfold-pull-request) is a seven-step pre-flight an agent runs before gh pr create and again after each revision, and AGENTS.md and README.md#contributing-with-agents each gain one line pointing to it.

Why: reviewers kept asking for the same missing pieces; every rule comes from CONTRIBUTING.md, the kernel contract, the ATC contributor skill or a survey of recent pull requests.

Checks on this head

  • Head commit: f15b510
  • Lean checker, python3 tools/zig/lean_check.py, on the merge base (465e48b62) and on this head: 425 and 425, 0 new (tools/zig/lean_new.py). Both runs exit 1 on the 425 findings already on main.
  • Tests run, with the command and pass, fail and skip counts:
    • relative links and anchors in docs/pr/SKILL.md, AGENTS.md and README.md: 88 checked, 88 resolve, 0 broken (external links excluded).
    • git diff --check: clean.
    • the skill's kernel commands exist and match docs/kernel-contract.md: zig build kernel-contract, kernel-contract-fatbins (zig/build/kernel_contract.zig), hip-kernel-contract and hip-kernel-contract-limits (zig/build/hip_contract.zig), tf-cuda-test kernel-contract-limits (zig/tests/cuda/main.zig).
  • CI: 9/9 checks pass on this head (fmt, zig, zig-windows, zig-macos-dev-tools, appimage-linux, desktop, desktop-linux, mobile, release-paths); no failure.
  • Not run locally, and why: the Zig host suite, test-golden and zig fmt, because no Zig source changed and no workflow checks markdown; CI's zig job runs on this head.

Receipt

n/a: documentation only; it cannot reach inference.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (none added; the link check above is the check)
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

The pull request template asks for the issue link, the atc overlap result,
the lean checker's base and head counts and the paths and platforms reached.
Its receipt and inference checklist now say "n/a" for changes that cannot
reach inference, the kernel contract is a section only kernel changes fill,
and new weights or drafters state their licence.

Issue forms for bugs, performance regressions, feature requests and the
issue-first proposal for a model family, backend or arithmetic change ask for
the version or commit, the checkpoint and revision, the hardware and the exact
command. Blank issues are off; contact links point to CONTRIBUTING, the agent
radar, the known issues and the runbook.
@ashhart

ashhart commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Thanks for this. The forms and the pre-flight read well, and the commands they cite match main. Could you add a short description, and say how this relates to #1596? The six .github files here are identical to #1596. If this is stacked on it, please say so in the description; otherwise we'll keep just one of the two.

@jayleaton

Copy link
Copy Markdown
Contributor Author

Added a short description; this PR stacks on #1596 and adds only the pull request skill plus its two pointer lines, so merge #1596 first and review 8ae199036..542857cfe.

@ashhart

ashhart commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thanks @jayleaton. The pre-flight is careful: one behavior a PR, Refs against Fixes, every caller of the changed code, no tolerance moved after the results, and unrun not counted as passed. Those are points we make by hand in reviews. To match what we ask on kernel and speed PRs, could step 4 add that each new kernel has a planted control that fails as planted (with the SUMMARY showing it red), and that a change to output tokens on a default path needs proof and an opt-in, beside line 72's line about lossy conversions? And step 3's speed lines could add "no slower than main at one stream and the widest admitted; with --drafter, no slower than without it, greedy and sampled". One optional thought: where the skill restates CONTRIBUTING (lines 68-71 and 106-113), a link to the section would stop the two drifting apart. We'll land it right after #1596.

The proposal's arithmetic field asks for proof and an opt-in before a change
to output tokens on a default path, and keeps a token-changing opt-in off by
default with its own agreed gate. The template's kernel block asks for a
planted control for each new kernel that fails as planted, and the last
checklist line covers decode as well as prompt processing at one stream and
the widest admitted, with and without --drafter.

The version placeholders name the --version output instead of a release that
will age.
Add docs/pr/SKILL.md, a pre-flight an agent runs before opening a pull
request: scope and issue link, ATC overlap, rebase, the receipt, kernel
and arithmetic gates, tests and lean delta, hygiene and a final check.
Point to it from AGENTS.md and the README agent workflow.
Step 4 asks for a planted control for each new kernel that fails as planted,
with the backend's SUMMARY line showing it red, and for proof and an opt-in
before a change to output tokens on a default path. Step 3 gates decode and
prompt processing at one stream and the widest admitted, with and without
--drafter, greedy and sampled.

Step 4 and step 6 link the CONTRIBUTING sections they restated, so the rule
and this summary cannot drift apart.
@jayleaton

Copy link
Copy Markdown
Contributor Author

All three done on f15b510a, rebased onto #1596's new head 462f4a60 so the stack stays in order.

  1. Step 4: each new kernel has a planted control that fails as planted, with the backend's SUMMARY line showing it red. Beside the line about lossy conversions, a change to output tokens on a default path now needs proof and an opt-in.
  2. Step 3: decode and prompt processing are no slower than main at one stream and the widest admitted; with --drafter, no slower than without it, greedy and sampled.
  3. Steps 4 and 6 now link CONTRIBUTING's exactness and precision, lean code and review, and public identity and privacy sections instead of repeating them; the rules CONTRIBUTING does not cover stayed.

Checked on this head: 88 relative links and anchors resolve (0 broken), git diff --check is clean, and the lean checker is 425 with 0 new. CI is rerunning on the rebased head.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants