Skip to content

[feature] Draft PR descriptions from the branch diff, repository template, and real checks #288

Closed

Description

@AetherAI3

Problem

aether ship defaults the PR title/body to the last commit subject/body. A multi-commit branch can get an empty or incomplete description that misses the actual problem, combined behavior change, and validation. The repository's PR template is not used by that fallback.

Evidence: src/commands/ship.ts and .github/pull_request_template.md. The existing branch/destination preview and publication gate are already valuable.

Proposed outcome

Prepare an editable PR draft before publication from the complete base-to-head change, accepted task scope, repository template, and actual verification records. Lead with the concrete user problem and resulting behavior; keep small changes short. Show the exact final title/body in the ship plan.

Constraints and alternatives

Preserve repository template headings and checklist intent. Prefer the final branch change over conversational history or abandoned approaches. State executed check commands/results and material limits; leave template checkboxes unchecked without evidence. Stale/missing verification cannot become “tests pass.”

Respect explicit user title/body. Offer a local/manual draft fallback if a selected model is unavailable. Drafting is read-only; it neither pushes nor creates a PR. Bind the draft to base/head revisions and refuse or refresh it when those revisions change. Keep raw logs/secrets out of the body.

Acceptance

  • A multi-commit fixture produces a coherent description of the final diff, with the repository's template and accurate check outcomes.
  • A one-file small change stays concise; a larger change explains only relevant behavior/risk.
  • Failed, skipped, stale, and unrun checks remain distinguishable; unknown CI is not claimed as passing.
  • User edits and explicit title/body overrides are previewed and passed verbatim to the argv-based publication rail, including multiline Markdown.
  • Base/head drift invalidates the prepared draft; cancelling makes zero push/PR calls. Golden-output tests cover template/no-template and verification states.

Priority: P1. Depends on #276 and truthful evidence from #275. Separate from RC PR/CI event publication in #220. Source reviewed at ca4180d (0.4.0 candidate). This ticket is an implementation spec; live service qualification remains separate.

Activity

  1. added
    enhancement
    on Oct 6, 2026
  2. AetherAI3 commented on Oct 6, 2026

    @AetherAI3
    OwnerAuthor

    Implemented and merged in #306 (merge commit 6c3ca5c).

    Evidence against the acceptance criteria:

    • The PR proposal uses the complete base-to-head diff, relevant accepted goal scope, .github/pull_request_template.md when present, and the current tree-bound host verification receipt. Golden fixtures cover a two-commit parser change with its repository template and a compact one-file change without a template. Template headings and checklist intent remain, with boxes unchecked until a user reviews the evidence.
    • Host checks are described distinctly as passed, failed, stale, skipped, or unrun; local CI is explicitly unknown. The body uses no raw check logs, and generated text is redacted. Drafting is local and works without a selected model.
    • aether ship --pr-draft exports an editable JSON proposal without publishing. --draft-file reads the edited title/body and binds them to the repository, branch, base/head revisions, template, accepted scope, and verification state. Explicit --title and --body overrides remain byte-for-byte, including multiline Markdown, in both the preview and argv-based gh pr create call.
    • Head drift, base drift, and a commit made during the approval prompt all refuse publication. Cancelling causes zero push and PR calls. The existing approval and publication rail remains in place.

    Local verification: npm run build, npm run docs:check, and staged diff checks passed. New draft fixtures passed 9/9. The affected ship and registry suite passed 51/51 applicable tests; one pre-existing POSIX shim test is skipped on Windows.

    GitHub CI and CodeQL failed before executing any job steps and produced no logs (CI run 37496170850; CodeQL run 37496170795). The merge used the repository's admin path with the local evidence above. Live hosted-service qualification remains separate, as specified in this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementspecux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions