Skip to content

A pull request skill for contributor agents - #1595

Merged
ashhart merged 3 commits into
ashhart:mainfrom
jayleaton:repo/pr-skill
Nov 4, 2026
Merged

ashhart merged 3 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: 9cea40c
  • Lean checker, python3 tools/zig/lean_check.py, on main (3bdc4e54) 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: 92 checked, 92 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: 11/11 checks pass on this head (fmt, zig, zig-windows, zig-macos-dev-tools, appimage-linux, desktop, desktop-linux, mobile, release-paths, benchmark-clients on ubuntu and windows); 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.

@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.

@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.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks @jayleaton. #1596 has landed, and the six .github files here now match main exactly, so this PR is just the skill and its two pointer lines. Your three changes read well. One correction, and it's our fault: lines 73-74 of the skill don't match our rule, and line 74 is wording we asked for. TensorFold takes no lossy weight or cache formats, even opt-in, and no mode that changes output tokens, even opt-in. Output must stay token-equal to the serial reference. Could you replace those two lines with that and take the PR out of draft? Then we'll land it.

@jayleaton
jayleaton marked this pull request as ready for review November 4, 2026 11:06
@jayleaton

jayleaton commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Done on 9cea40c5, rebased onto main: lines 73–74 now read that TensorFold takes no lossy weight or cache formats, even opt-in, and no mode that changes output tokens, even opt-in, with output token-equal to the serial reference. The PR is out of draft.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thanks @jayleaton. Step 4 now says it exactly: no lossy weight or cache formats and no token-changing modes, even opt-in, with output token-equal to the serial reference. With #1596 in, this is just the skill and its two pointer lines, and every link resolves on main. Ready to land.

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.
Step 4 now states the rule as it is: TensorFold takes no lossy weight or
cache formats, even opt-in, and no mode that changes output tokens, even
opt-in, and output stays token-equal to the serial reference.
@ashhart
ashhart merged commit e4d5749 into ashhart:main Nov 4, 2026
0 of 5 checks passed
@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Thank you @jayleaton. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

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