# PR/Patch-Request Description Format Reference Canonical structure for `tractor` patch-request descriptions, designed to work across GitHub, Gitea, SourceHut, and GitLab markdown renderers. **Line length: wrap at 72 chars** for all prose content (Summary bullets, Motivation paragraphs, Scopes bullets, etc.). Fill lines *to* 72 — don't stop short at 50-65. Only raw URLs in reference-link definitions may exceed this. ## Template ```markdown ## ### Summary - [][] Description of change ending with period. - [][] Another change description ending with period. - [][] [][] Multi-commit change description. ### Motivation <1-2 paragraphs: problem/limitation first, then solution. Hard-wrap at 72 chars.> ### Scopes changed - [][] `pkg.mod.func()` — what changed. * [][] Also adjusts `.related_thing()` in same module. - [][] `tests.test_mod` — new/changed test coverage. (this pr content was generated in some part by [`claude-code`][claude-code-gh]) []: https://///commit/ [claude-code-gh]: https://github.com/anthropics/claude-code ``` ## Markdown Reference-Link Strategy Use reference-style links for ALL commit hashes and cross-service PR refs to ensure cross-service compatibility: **Inline usage** (in bullets): ```markdown - [f3726cf9][f3726cf9] Add `reg_err_types()` for custom exc lookup. ``` **Definition** (bottom of document): ```markdown [f3726cf9]: https://github.com/goodboy/tractor/commit/f3726cf9 ``` ### Why reference-style? - Keeps prose readable without long inline URLs. - All URLs in one place — trivially swappable per-service. - Most git services auto-link bare SHAs anyway, but explicit refs guarantee it works in *any* md renderer. - The `[hash][hash]` form is self-documenting — display text matches the ref ID. - Cross-service PR refs use the same mechanism: `[github-pr][]` resolves via a ref-link def at the bottom, trivially fillable post-submit. ## Cross-Service PR Placeholder Mechanism The generated description includes three layers of cross-service support, all using native md reference-links: ### 1. Metadata comment (top of file) ```markdown ``` A YAML-ish HTML comment block. The `___` placeholders get filled with PR/patch numbers after submission. Machine-parseable for tooling (e.g. `gish`) but invisible in rendered md. ### 2. Cross-references section (in body) ```markdown ``` Commented out at generation time. After submitting to multiple services, uncomment and the ref-links resolve via the stubs at the bottom. ### 3. Ref-link stubs (bottom of file) ```markdown ``` Commented out with `___` number placeholders. After submission: uncomment, replace `___` with the actual number. Each service-specific copy fills in all services' numbers so any copy can cross-reference the others. ### Post-submission file layout ``` pr_msg_LATEST.md # latest draft (skill root) msgs/ 20260325T002027Z_mybranch_pr_msg.md # timestamped github/ 42_pr_msg.md # github PR #42 gitea/ 17_pr_msg.md # gitea PR #17 srht/ 5_pr_msg.md # srht patch #5 ``` Each `/_pr_msg.md` is a copy with: - metadata `submitted:` fields filled in - cross-references section uncommented - ref-link stubs uncommented with real numbers - all services cross-linked in each copy This mirrors the `gish` skill's `/.md` pattern. ## Commit-Link URL Patterns by Service | Service | Pattern | |-----------|-------------------------------------| | GitHub | `https://github.com///commit/` | | Gitea | `https://///commit/` | | SourceHut | `https://git.sr.ht/~//commit/` | | GitLab | `https://gitlab.com///-/commit/` | ## PR/Patch URL Patterns by Service | Service | Pattern | |-----------|-------------------------------------| | GitHub | `https://github.com///pull/` | | Gitea | `https://///pulls/` | | SourceHut | `https://git.sr.ht/~//patches/` | | GitLab | `https://gitlab.com///-/merge_requests/` | ## Scope Naming Convention Use Python namespace-resolution syntax for referencing changed code scopes: | File path | Scope reference | |---------------------------|-------------------------------| | `tractor/_exceptions.py` | `tractor._exceptions` | | `tractor/_state.py` | `tractor._state` | | `tests/test_foo.py` | `tests.test_foo` | | Function in module | `tractor._exceptions.func()` | | Method on class | `.RemoteActorError.src_type` | | Class | `tractor._exceptions.RAE` | Prefix with the package path for top-level refs; use leading-dot shorthand (`.ClassName.method()`) for sub-bullets where the parent module is already established. ## Title Conventions Same verb vocabulary as commit messages: - `Add` — wholly new feature/API - `Fix` — bug fix - `Drop` — removal - `Use` — adopt new approach - `Move`/`Mv` — relocate code - `Adjust` — minor tweak - `Update` — enhance existing feature - `Support` — add support for something Target 50 chars, hard max 70. Always backtick code elements. ## Tone Casual yet technically precise — matching the project's commit-msg style. Terse but every bullet carries signal. Use project abbreviations freely (msg, bg, ctx, impl, mod, obvi, fn, bc, var, prolly, ep, etc.). --- (this format reference was generated by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code