/gh-post)
Guidelines, automated orientation tooling, and execution protocols for authoring and submitting high-signal, anti-slop GitHub issues and pull requests without AI formatting noise.
Quick Start
# Orient with a local Git repository checkout's conventions:
kscripts gh-orient --dir /path/to/repo
# Orient with a remote GitHub repository (zero local clone required):
kscripts gh-orient -R invertase/melos
Invocation Style & Slash Command
Trigger the skill via the /gh-post slash command or natural language
equivalents:
/gh-post a PR with these changes
/gh-post a new issue requesting the feature we discussed
/gh-post a bug report for the crash when passing empty config
/gh-post draft a feature proposal for smart dependent versioning in invertase/melos
The 5-Step Workflow
graph TD
A["1. Intake & Disambiguation<br><b>STOP. DON'T GUESS.</b>"] --> B["2. Repository Orientation<br><code>kscripts gh-orient [-R repo] [-p paths]</code>"]
B --> C["3. Draft into Artifact<br><code>draft_github_[owner]_[repo]_issue.md</code> / <code>draft_github_[owner]_[repo]_pr.md</code>"]
C --> C2["3.5 Cold Read (Hard Gate)<br><code>/cold-read --role <audience></code>"]
C2 --> D["4. Mandatory Approval Gate<br><code>ask_question</code> (Hard Stop)"]
D --> E["5. Execution & Verification<br><code>gh issue/pr create --body-file</code>"]
Step 1: Intake & Disambiguation (STOP. DON'T GUESS.)
The agent MUST have crystal-clear clarity on two fundamental parameters before doing any work:
- Target Post Type: Is this an Issue (Bug Report, Feature Proposal) or a Pull Request?
- Target Repository: Which exact GitHub repository (
owner/repo)?
[!IMPORTANT]
STOP. DON'T GUESS. If the user's intent is ambiguous (e.g. "create a post for this" without specifying Issue vs. PR), or if the target repository cannot be deterministically resolved from the current git checkout, or if multiple remotes/forks exist: The agent MUST STOP and explicitly ask the user for clarification using
ask_questionor chat before proceeding. Never guess or fabricate targets.
Step 2: Repository Orientation
Before drafting, run kscripts gh-orient (or the bare gh-orient shim) to
inspect the target repository's maintainers, title prefixes, label vocabulary,
native templates, and audience:
kscripts gh-orient --dir <path-to-repo> -p lib/src/foo.dart -p lib/src/bar.dart
kscripts gh-orient -R <owner/repo> -p packages/foo/lib/foo.dart
- What it gathers: Active human maintainers (filtering out bots), common
issue title prefixes (
request:,[analyzer],area/foo:), PR title prefixes (feat(scope):,fix(scope):,chore:), repository label vocabulary, detected issue/PR form schemas (.ymlfield IDs), and an Audience line. - Audience (
-p, --paths): Pass the repository-relative paths the draft references.ownermeans the likely reader wrote or maintains that code (small repository, or one author dominates the paths): give zero background and open with what is wrong or what changes.visitormeans rotating or distributed triage: give one orienting line plus a permalink, then the defect. When unsure the tool answersvisitor. - No Unsolicited
@mentionGuardrail: On GitHub, inline@usernamementions act as the CC mechanism and immediately trigger public notifications and issue subscriptions. Use maintainer handles fromgh-orientstrictly for internal context—NEVER add unsolicitedcc @usernamementions to issue or PR bodies unless explicitly instructed by the user. - Slop Contagion Guardrail: Use orientation output strictly for taxonomy, prefixes, and template adherence, and keep plain declarative prose regardless of the decorative emojis or conversational fluff found in historical repository posts.
Step 3: Draft into an ARTIFACT First
Always draft the complete title and body into a dedicated Markdown artifact in
the conversation artifact directory (<appDataDir>/brain/<conversation-id>/)
before touching the GitHub CLI, explicitly namespaced by repository:
- For Issues:
draft_github_<owner>_<repo>_issue.md - For Pull Requests:
draft_github_<owner>_<repo>_pr.md
Always include # <Proposed Title> at Line 1 of the draft artifact
(followed by a blank line on Line 2) so the user reviews the exact title
alongside the body, and strip lines 1–2 (tail -n +3) when passing
--body-file to gh issue create or gh pr create. Always provide
ArtifactMetadata with RequestFeedback: false and UserFacing: true (gating
execution via Step 4's ask_question). Consult
references/templates.md for the complete Bug
Report, Feature Proposal, Pull Request templates, title pattern tables, and
GitHub YAML Issue Form field mappings.
Core Philosophy: Five Principles + GitHub Mechanics
Maintainers suffer from low-effort LLM fatigue. A good submission lets its reader decide in under 15 seconds. Write for the reader's next decision, not for the record of your work:
- Lead with the decision. Sentence 1 of the body (Line 3 of the draft
artifact, right below
# <Proposed Title>) states the exact defect, ask, or change. Discovery history ("Commit X and PR Y added..."), process narrative ("While investigating the codebase..."), and### Summaryor### Contextheaders above it go last, in<details>, or away. - Budget words by reader count. Title: hundreds of readers, search key +
decision signal,
<= 70chars. First 3 lines: tens, enough to triage or review. Body: one reader, repro + evidence + permalinks. Keep the visible gist to<= 8–12lines. - Report the delta, not the tour. Open with what is wrong or what changes.
An
owneraudience already knows how their code works today and what stays unchanged, so cut both "currently, X does Y" openers and "existing mechanics X, Y, Z remain sound" summaries; avisitoraudience gets one orienting line plus a permalink. - Fill a slot only if it changes a decision. Delete empty template
sections, headers over single paragraphs, parenthetical asides,
---dividers, decorative emojis, pleasantries, and speculative architecture essays. One audience and one owner per post: split distinct subsystems/teams into separate issues. Limit proposed fixes to 1–3 concrete bullets. - Anchor, verify, then cold-read. In issues, every claim carries a GitHub
https://permalink (https://github.com/<owner>/<repo>/blob/<commit>/<file>#L<start>-L<end>) or a plain backtick repository-relative path (`lib/src/foo.dart`)—never a localfile://workstation URL, since--body-filepipes the draft verbatim to GitHub. Inference is labeled as inference. In PRs, GitHub already shows the Files changed diff tab and CI check runs: never list a file-by-file change inventory (- path/to/file.dart: ...) or recite routine CI checks (Verified: dart analyze / dart test); state only the intent/why, non-obvious callouts or breaking changes,Fixes #N, and non-CI verification (e.g. benchmarks or manual UI checks). Encapsulate verbatim CLI output, stack traces, code traces, and full benchmark tables inside<details><summary><b>Detailed Breakdown, Repro Steps & Measurements (AI-assisted)</b></summary>(blank line after</summary>and before</details>; no narrative prose inside). Then run Step 3.5.
GitHub-specific mechanics:
- No Unsolicited
cc @usernameMentions: Never appendcc @user1 @user2to issue or PR descriptions unless the user explicitly asks to mention specific people. - Tight Declarative Prose: Short, declarative sentences and bullets rather than multi-clause narrative paragraphs or dramatized severity adjectives.
- No Inline Multiline Shell Escapes: Never pass multiline Markdown inline
via
--body "line 1\nline 2". Always use--body-file. - Manual Web Form Mode: If the user asks for a link to the repo's issue form
to paste manually, provide a pre-filled
https://github.com/<owner>/<repo>/issues/new?title=...URL artifact.
Explicit 3D Paranoia Header for PR Draft Previews (OQ3)
At the top of every PR draft artifact preview
(draft_github_<owner>_<repo>_pr.md, immediately below # <Proposed Title>)
and in chat, display the computed 3D Paranoia Classification line:
🛡️ Paranoia Tier: Ring <0..4B> (<Label>) · Confidence: <High|Low> · Door: <🚪 One-Way | 🔄 Two-Way>
| Dimension | Values & Classification Rules |
|---|---|
| Reuse Ring | Ring 0 (Personal dotfiles & private configs: personal_dotfiles) · Ring 2 (Public skills & utilities: kevmoo_skills, scripts.dart) · Ring 3 (Published pub.dev packages: analytica.dart, json_serializable) · Ring 4A (Upstream Dart/Flutter framework & packages) · Ring 4B (Upstream C++, Dart VM internals, WIMP, Skwasm engine) |
| Confidence | High (Pure Dart, CLI, package & framework code) · Low (Unfamiliar C++, VM internals, WIMP/Skwasm/engine plumbing) |
| Door Type | 🚪 One-Way (Public api.txt / CLI flag / JSON schema delta, SemVer -wip bump, DB migration, CI release workflow) · 🔄 Two-Way (Internal lib/src/ refactors, isolated tests, docs) |
Note: Strip the # <Proposed Title> line and the 🛡️ Paranoia Tier: preview
banner when passing --body-file in Step 5 so the published GitHub PR body
begins with the one-sentence change summary.
Conditional Benchmark <details> Block for PRs (FU3)
Include a compact Before vs. After benchmark delta table inside
<details><summary><b>Benchmark measurements (AI-assisted)</b></summary>
only when the PR makes algorithmic or hot-path performance changes backed by
empirical measurements. Never include <details> blocks on PRs that merely
repeat public API diffs or list multi-file control flow already visible in the
GitHub Files changed tab.
Step 3.5: Cold Read (Hard Gate for Issue and PR Bodies)
Before the approval gate, hand the publish form of the draft to a
fresh-context reader via the cold-read skill
(kevmoo/kevmoo_skills); if it is not
installed, spawn a read-only subagent with the same three inputs (its persona,
the role and N=3, the file path) and nothing else from this conversation.
- Publish form: issues
tail -n +3 <draft>, PRstail -n +5 <draft>(title and preview banner stripped), with# <Proposed Title>re-added as line 1 so the reader sees what GitHub shows. - Role from Step 2: issue +
owner→--role owner; issue +visitor→--role triager; any PR →--role reviewer. - Gate: proceed only when
verdictisdecide_in_nandcut_listhas no entries outside repository-required PR checklists (such as CLA / tree-hygiene checklists). Otherwise move the deciding sentence to the first body line, apply thecut_list(preserving repository-required PR checklists), add themissingfacts, and re-run once. - Skip for comments and replies of
<= 50words.
Step 4: Two-Layer Pre-Chew Gate & Concise Change Explanation (Hard Stop)
Separate Layer A (Internal Pre-Chew Brief for the human author) from Layer B (Outbound GitHub Payload):
- Layer A (Internal Pre-Flight Brief): Before running
gh issue createorgh pr create, emit a concise internal explanation (<= 50lines in chat) covering (1) title & audience/routing rationale, (2) major code changes or verified root causes by file, (3) test coverage executed, and (4) the Step 3.5 result in one line (verdict, decision line, words above the fold). Never leak Layer A's internal forensic trace into the published GitHub body unless encapsulated inside a<details>appendix. - Layer B (Outbound Payload Approval): Halt execution and prompt the user
via
ask_questionso they can pre-chew/adjust the human gist or approve submission:- Option 1:
(Recommended) Yes, create <issue|PR> via gh <issue|pr> create - Option 2:
No, keep as draft only (let me edit/pre-chew the framing)
- Option 1:
Step 5: Execution & Verification
- Pre-PR Check (For PRs in
~/github/kevmoo/*): Runkscripts pr-checkbefore creating a PR. - Strip Draft Header & Submit via
--body-file -:# For Issues (strip Line 1 '# <Proposed Title>' + Line 2 blank line): tail -n +3 <draft_artifact_path> | gh issue create -R owner/repo \ --title "[subsystem] Imperative Title" --body-file - # For Pull Requests (strip '# <Proposed Title>' + '🛡️ Paranoia Tier:' header): tail -n +5 <draft_artifact_path> | gh pr create \ --title "feat(scope): imperative summary" --body-file - - Verify Output: Confirm submission succeeded and output the clickable link.
Title Conventions & Templates
- Concise, Imperative Titles (
<= 70chars): Adopt the repository's issue prefix convention (request: ...,[subsystem] ...,area/foo: ...) for Issues, and Conventional Commits (feat(scope): ...,fix(scope): ...) for PRs unless the repository mandates an alternative. - Full Templates & YAML Form Mappings: See
references/templates.md.