Commit Graph

4 Commits

Author SHA1 Message Date
Benjamin D. Smith 3b1079897b chore(pr-prep): regenerate SKILL.md against current resolvers
The committed `pr-prep/SKILL.md` was generated against an older
preamble and had drifted from `bun run gen:skill-docs` output.
Regenerate it so it picks up the current shared resolvers: the
`SESSION_KIND` and `GSTACK_PLAN_MODE` preamble lines, the `/spec`
routing entry, the AskUserQuestion failure fallback, the 5+-option
split rule, and the Boil-the-Ocean rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00
Benjamin D. Smith 6b4bf39142 feat(pr-prep): step 4.4 — second-opinion review via codex on CLEAN commits
Before filing each CLEAN commit (not bucketed EXACT_DUP / OVERLAP /
SIBLING), invoke `codex review` for an independent second opinion.
Codex CLI uses a different model family (OpenAI vs Claude), so the
signal is genuinely independent and catches structural bugs the author
missed during write-up.

Optional: if `codex` is not on PATH, emit a soft warning and continue;
never block on tool availability. Severity escalation: P0/P1 findings
bump the commit from CLEAN to OVERLAP (don't file until addressed); P2
stays CLEAN at author discretion (fix-before-file or note in PR body).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00
Benjamin D. Smith fac9a33ad5 feat(pr-prep): read upstream CONTRIBUTING.md + surface pre-push gates per commit
Step 1.4: fetch `CONTRIBUTING.md` (case-insensitive) via gh api from
the upstream repo, cache to /tmp, extract pre-push commands + test
layout conventions + branch naming rules + banned patterns. The agent
uses these inline when writing PR bodies.

Step 4.5: annotate each CLEAN/OVERLAP/SIBLING commit row with the
required pre-push gate (e.g. `bun run verify`), whether changed files
trigger special test paths (eval-replay for retrieval), and whether
the commit added tests. Soft warning on missing-tests when
not-required is unclear — don't block, let the human decide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00
Benjamin D. Smith 50c474ba72 feat(pr-prep): pre-PR upstream duplicate audit skill
Walks `git log base..HEAD`, derives search keywords per commit from
subject + changed file paths, queries upstream issues + PRs via `gh`,
scores each commit against upstream collisions (EXACT_DUP / OVERLAP /
SIBLING / CLEAN) on a title-token + file-overlap Jaccard, and refuses
to proceed when EXACT_DUP found. Designed to slot into `/ship` as a
Step 0 hook (env `GSTACK_FROM_SHIP=1` switches to JSON output + skips
interactive prompts).

Motivating case (real, 2026-05-26): a contributor branch had 8 commits
ready for upstream PRs; 4 of 4 unverified commits would have duplicated
already-open upstream issues. pr-prep catches all in ~30-60s of `gh`
queries, before any noise PR or reviewer triage round.

v0.1.0 ships inline bash in SKILL.md (reviewable in one file). Out of
scope: diff-content similarity, cross-repo audit, LLM-judged semantic
dup detection, auto-comment on upstream PRs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 21:56:31 +10:00