Commit Graph

415 Commits

Author SHA1 Message Date
Trevin Chow d0bdc77338 docs(git-commit-push-pr): drop stale focus: keyword references
Two evidence-decision bullets still said "pass via focus: context"
after the ce-pr-description refactor dropped the formal focus:
keyword in favor of free-text steering. Matches the existing wording
elsewhere in this file (DU-3 already says "steering text") and
matches the ce-pr-description skill's current input contract.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 21:21:26 -07:00
Trevin Chow 3c062b0fbc docs(ce-pr-description): add to Git Workflow skill table
New entry for ce-pr-description in the README's Git Workflow section.
Also updates the git-commit-push-pr entry to note that it delegates
title/body generation to ce-pr-description. Skill count bumped from
41+ to 42+.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 21:12:50 -07:00
Trevin Chow 90744be48b Address PR review feedback (#561)
Branch diff collection now falls back to local state when the remote
is unreachable. rev-parse --verify first; only fetch if the base ref
isn't local. Restores the pre-refactor behavior and prevents offline,
restricted-network, or expired-auth environments from hard-failing
when git diff <base>...HEAD could run entirely from local refs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:55:52 -07:00
Trevin Chow f2bef3be58 Address PR review feedback (#561)
Add base:<ref> override for current-branch mode so callers can forward
an already-resolved base branch. Non-default base targets (develop,
release/*, or any branch set as the PR's base in git-commit-push-pr's
Step 6) now generate descriptions from the correct commit range.

Base resolution priority in current-branch mode:
1. Caller-supplied base:<ref>
2. Existing PR's baseRefName (for branches with a PR already open)
3. origin/HEAD (repo default)

Updates git-commit-push-pr Step 6 to pass base:<base-remote>/<base-branch>
when invoking ce-pr-description for new PRs, so description scope
matches the branch actually being opened.

PR mode is unchanged — PRs define their own base via baseRefName.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:47:31 -07:00
Trevin Chow dcae7d3b2f Address PR review feedback (#561)
Evidence preservation now triggers for any PR mode invocation, not
only the bare-number form. After the earlier refactor, callers like
git-commit-push-pr pass full PR URLs for repo-safe delegation, which
made the conditional fall through to "omit entirely" and silently
dropped existing ## Demo / ## Screenshots blocks during refresh.

Preservation is about whether we have an existing PR body to read,
not about which input shape the caller used.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:45:44 -07:00
Trevin Chow 103248df15 refactor(ce-pr-description): two modes + natural input parsing
Replaces the pr:/range:/focus: formal grammar with two modes and
free-form input parsing:

1. Current-branch mode (default) — when no PR reference is given,
   describe the commits on HEAD against the repo's default base
   (origin/HEAD), or against an existing PR's baseRefName if a PR
   is already open on the branch.
2. PR mode — when the input contains any PR reference (full URL,
   pr:<N>, #NN, or a bare number), describe that PR using the
   existing Case A/B routing.

Focus is now free-form steering text. The agent extracts whichever
PR reference pattern is present; everything else is treated as
focus. No formal focus: keyword required (though it still works).

Removes the range: input surface entirely:
- No more <remote>/<branch> vs bare-branch ambiguity
- No more EFFECTIVE_BASE tracking
- No more multi-remote resolution cascade
- No more fetch-on-demand logic for arbitrary user input
- All three Cluster B feedback threads were about this complexity;
  the problem class now doesn't exist.

Current-branch mode uses a narrow, well-defined base resolution:
origin/HEAD or the existing PR's base. Callers like git-commit-push-pr
never hit the problematic edge cases because they operate on
well-known local refs.

Updates git-commit-push-pr's Step 6 and DU-3 to match the new
contract: invoke ce-pr-description with no arg (current-branch mode,
new PRs) or with the PR URL (existing PRs). Focus is appended as free
text rather than passed as a formal focus: argument.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:38:11 -07:00
Trevin Chow d9c975d5f5 Address PR review feedback (#561)
Cluster A — git-commit-push-pr orchestration gaps from Unit 5 refactor:
- DU-3 and Step 6 existing-PR delegation now pass full PR URL (unambiguous
  repo/PR identity) to ce-pr-description instead of bare number
- Existing-PR flow reordered: Step 7 asks rewrite-or-not first, Step 6
  runs only on yes, so the delegation call site is actually reached
- Step 6 gathers real branch diff (git diff <remote>/<base>...HEAD) before
  the evidence decision gate, so feature branches with pushed commits are
  judged on the branch diff not the working-tree diff

Cluster B — ce-pr-description input-handling correctness:
- range: base resolution now treats <remote>/<branch> and <bare-branch>
  as distinct possibilities. Tries local first, then matched-remote
  prefix, then bare branch across remotes. release/2026-04, feat/foo,
  hotfix/x now resolve correctly via origin.
- EFFECTIVE_BASE tracks the actually-resolving ref separately from
  user-supplied <base>; used in all downstream merge-base/log/diff.
  Fixes range:main..HEAD in clones where local main was deleted.
- pr: Case A now falls back to Case B API path if fetch fails or
  merge-base can't resolve — covers shallow clones, detached states,
  offline/auth issues without hard-failing the skill.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 19:49:31 -07:00
Trevin Chow e768a95640 chore(ce-pr-description): trim argument-hint to the signature only
argument-hint is meant to be a quick argument shape for discovery, not
a full spec. The long-form explanations belong in the description
(where they are) and the body. Cut from 280+ characters to just the
signature.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:39:31 -07:00
Trevin Chow c871100f82 fix(ce-pr-description): drop wrong owner/repo#NN claim, use headRefOid
Two issues surfaced by exercising the full invocation matrix.

owner/repo#NN shorthand was claimed as a third input form, but gh pr
view's positional argument accepts only <number>, <url>, or <branch> —
NOT shorthand. Passing owner/repo#NN produces "no pull requests found
for branch" errors. Corrected the input-form documentation to the two
forms that actually work: bare number (current repo) and full URL (any
repo). Added a note that cross-repo number references are done via
gh pr view <N> -R owner/repo, which callers can use directly when
needed. A full URL remains the simplest cross-repo path.

headRefOid is a direct JSON field exposed by gh pr view --json. Using
it is more robust than indexing into .commits[-1].oid, which depended
on the commits array being non-empty and correctly ordered. The
FETCH_HEAD multi-ref bug fix from the previous commit is preserved —
both paths produce the same SHA — but headRefOid is now the primary
recommendation. Also added baseRefOid to the documented field list.

Validated end-to-end against the invocation matrix:
- pr: bare number (same repo) — headRefOid path resolves correctly
- pr: full URL (same repo) — URL parse + headRefOid resolves correctly
- pr: full URL (different repo) — Case B API fallback kicks in
- range: origin/main..HEAD — resolves directly
- range: main..HEAD (not local) — fetch-on-demand works
- range: HEAD~1..HEAD — commit-ish resolves without fetch
- pr: nonexistent — gh surfaces GraphQL error, graceful exit
- pr: merged/closed PR — state check exits gracefully
- range: bogus base — rev-parse fails, graceful exit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:35:30 -07:00
Trevin Chow 30c87f87bf fix(ce-pr-description): use explicit SHA from gh pr view instead of FETCH_HEAD
The previous Case A path ran a multi-ref fetch and read FETCH_HEAD:

  git fetch --no-tags origin main refs/pull/<N>/head
  PR_HEAD_SHA=$(git rev-parse FETCH_HEAD)

git rev-parse FETCH_HEAD returns only the first entry in .git/FETCH_HEAD,
which is the base branch SHA, not the PR head. Silent failure — merge-base
equals PR_HEAD_SHA, diff is empty, commit list is empty, and the skill
produces a broken description with no error signal.

Fix: extract the PR head SHA explicitly from gh pr view --json commits
(the last entry of the commits array is the PR's current tip), then
address all subsequent git commands by explicit SHA rather than via
FETCH_HEAD. A single fetch populates the object store; downstream
commands don't depend on ref ordering.

Also documents a fallback that parses .git/FETCH_HEAD by pull-ref
pattern via awk — robust to multi-ref ordering — for the rare case
where a server refuses to serve non-tip SHAs directly.

Caught during integration testing of git-commit-push-pr's refresh-mode
delegation to ce-pr-description (PR #561). An agent following the old
instructions silently produced an empty diff and had to work around by
falling through to the SHA-from-commits-array path that was documented
as an alternative — that path is now primary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:29:50 -07:00
Trevin Chow 53dfb5e841 fix(ce-pr-description): correct JSON fields, strengthen FETCH_HEAD warning, sharpen diagram vs table
Three issues surfaced by content-quality evals on PR #561.

JSON field correction: gh pr view --json does NOT expose baseRepository.
The SKILL.md previously requested it alongside headRepository, which
would have failed at runtime. Corrected to headRepository +
headRepositoryOwner + isCrossRepository (the fields that actually
exist). Case A vs Case B routing now uses isCrossRepository + URL
parsing against origin, not the nonexistent baseRepository.

FETCH_HEAD handling: the warning to capture PR_HEAD_SHA immediately
now explicitly forbids parallel commands and split tool calls between
fetch and rev-parse. The ephemeral nature of FETCH_HEAD is the
failure mode; any intervening fetch silently corrupts the SHA.

Visual communication: reshape the "when to use Mermaid vs when to use
a table" guidance around the real distinction — topology vs parallel
variation. Architecture changes have edges (A → B, who talks to whom,
who delegates to what), which tables cannot express; diagrams are
almost always right for architecture. Tables are for parallel
variation of a single shape (same metric different values, same
attributes different variants). Adds an in-doubt heuristic: "edges →
Mermaid, rows → table." Previously the guidance allowed tables as a
substitute for architecture diagrams, which caused evals to pass the
visual-aid assertion with flat lists where a graph was needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:49:43 -07:00
Trevin Chow d37f492b6c feat(ce-pr-description): accept URLs and cross-repo PR references for pr: input
pr: now takes three equivalent forms:
- Bare number: pr: 561 (resolves in current repo)
- Full URL: pr: https://github.com/owner/repo/pull/561
- Shorthand: pr: owner/repo#561

gh pr view accepts all three natively, so the metadata fetch is
unchanged. Two runtime paths split on whether the PR's base repo
matches the current working directory:

Case A (same repo): local-git path — fetch refs/pull/<N>/head, use
PR_HEAD_SHA in merge-base/log/diff. Existing behavior.

Case B (different repo): API-only path — gh pr diff gives the diff
without requiring the commits to be local. Equivalent output with a
caller-facing note that API fallback was used (relevant for evidence
preservation logic in Step 3).

Enables workflows like pasting a PR URL from a repo the user doesn't
have a local clone of, or refreshing descriptions across repos from a
single working directory.

Description and argument-hint updated to surface URL support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:28:00 -07:00
Trevin Chow 024625a4f8 fix(ce-pr-description): handle fork PRs, non-local base refs, add trigger words
Addresses two issues flagged in PR #561 review.

P1 — range: input no longer assumes the base ref is local. Fetches on
demand before validating, matching the pre-refactor git-commit-push-pr
behavior. Handles both remote-prefixed forms (origin/main) and bare
branch names with a sensible remote-detection fallback. Previously a
fresh clone or a deleted local branch caused an early graceful exit
and skipped description generation entirely; now it fetches and
proceeds.

P2 — pr: input no longer uses headRefName directly in git commands.
Fetches refs/pull/<number>/head (GitHub's always-available pull ref),
captures FETCH_HEAD into PR_HEAD_SHA, and uses the SHA in subsequent
merge-base/log/diff calls. Works for fork PRs, deleted local branches,
and cases where the user runs the skill from a different branch.
Documents an alternative SHA-from-gh-metadata path for non-GitHub
remotes where pull/<N>/head isn't exposed.

Also optimizes the frontmatter for skill triggering:
- Description now leads with explicit trigger phrases ('write a PR
  description', 'refresh the PR description', 'regenerate the PR body',
  'rewrite this PR', 'freshen the PR', etc.) so Claude reliably
  consults this skill for standalone description work, not only via
  the git-commit-push-pr and ce-pr-stack callers.
- argument-hint surfaces the three input forms (pr: / range: / focus:)
  and notes that fork PRs and non-local base refs are handled
  automatically — so callers and humans know the skill is robust.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:24:10 -07:00
Trevin Chow 11f466825d feat(ce-pr-description): extract PR description writing into a focused skill
New skill owns the value-first description writing logic that was
previously inline in git-commit-push-pr. Input contract is two-shape:
pr:<number> for existing PRs (used by refresh mode), or range:<base>..<head>
for pre-PR generation (used by new PR creation and by ce-pr-stack per
layer). Output is structured {title, body}; caller decides whether to
apply via gh pr edit.

No interactive prompts, no auto-apply, no branch coupling. The skill
is a pure capability — git-commit-push-pr wraps it with confirmation
prompts and evidence-capture for single-PR interactive flows;
ce-pr-stack (via git-commit-push-pr's stack-aware routing, coming next)
will call it per layer without the interactive scaffolding.

Refactor preserves git-commit-push-pr's user-facing behavior:
- Full flow: commit + push + create PR, description generated via
  ce-pr-description with range:<base>..<head> and passed to gh pr create
  in a single call (no transient placeholder on GitHub)
- Refresh mode (DU-1/DU-2/DU-3): interactive scaffolding stays; DU-3
  delegates description generation to ce-pr-description with pr:<number>,
  then presents the compare-and-confirm as before

Naming: ce-pr-description, not git-pr-description. PR is a GitHub
artifact; the ce- prefix matches the future convention for plugin
skills. git-commit-push-pr will rename later.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:10:54 -07:00
Trevin Chow a55990387d fix(git-commit-push-pr): rewrite descriptions as net result, not changelog (#558)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 23:22:47 -07:00
Trevin Chow e4d5f241bd fix(ce-plan): close escape hatches that let the skill abandon direct invocations (#554)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:27:05 -07:00
Trevin Chow e45c435b99 fix(document-review, review): restrict reviewer agents to read-only tools (#553)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:29:16 -07:00
Harold Hunt 8f20aa0406 feat(ce-optimize): Auto-research loop for tuning system prompts / vector clustering / evaluating different code solution / etc (#446)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:16:09 -07:00
David Joerg 4e0ed2cc8d fix(ce-review): always fetch base branch to prevent stale merge-base (#544)
Co-authored-by: David Joerg <david@Davids-MacBook-Pro-2.local>
2026-04-11 15:04:09 -07:00
Trevin Chow 9aa65c1fe6 docs(ce-setup): add getting started sections to READMEs (#548) 2026-04-10 17:47:21 -07:00
github-actions[bot] e931ed92b1 chore: release main (#547)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-10 17:44:25 -07:00
Trevin Chow 1372b2cffd fix(cleanup): remove rclone, agent-browser, lint, and bug-reproduction-validator (#545)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 17:41:33 -07:00
Trevin Chow 354dbb7582 feat(ce-setup): unified setup skill with dependency management and config bootstrapping (#345)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 17:39:43 -07:00
Trevin Chow 545405380d fix(ce-demo-reel): two-stage upload for reviewable approval gate (#546)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 17:30:39 -07:00
github-actions[bot] fba5cbaa01 chore: release main (#529)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-10 10:35:45 -07:00
Trevin Chow e38223ae91 feat(ce-debug): add systematic debugging skill (#543)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 10:23:48 -07:00
Trevin Chow b979143ad0 feat(ce-demo-reel): add demo reel skill with Python capture pipeline (#541)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:29:51 -07:00
Trevin Chow f3cc7545e5 feat(ce-plan): add output structure and scope sub-categorization (#542)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 19:22:21 -07:00
Trevin Chow bb59547a2e feat(ce-work): reduce token usage by extracting late-sequence references (#540)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:48:21 -07:00
Trevin Chow 31b0686c2e feat(ce-work-beta): add beta Codex delegation mode (#476)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 00:29:12 -07:00
Trevin Chow 044a035e77 fix(git-commit-push-pr): remove harness slug from badge table (#539)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 23:30:43 -07:00
Trevin Chow 042ee73239 feat(slack-researcher): add /ce-slack-research skill and improve agent (#538)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 11:00:00 -07:00
Trevin Chow 3208ec71f8 feat(session-historian): cross-platform session history agent and /ce-sessions skill (#534)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 07:52:26 -07:00
Trevin Chow a5ce094772 feat(ce-review): add compact returns to reduce orchestrator context during merge (#535)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 01:03:42 -07:00
Trevin Chow d37f0ed16f feat(ce-update): add plugin version check skill and ce_platforms filtering (#532)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 00:09:02 -07:00
Trevin Chow 0ae91dcc29 fix(ce-compound): explicit mode prompt and lightweight rename (#528)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 13:22:07 -07:00
github-actions[bot] 5fb6801567 chore: release main (#525)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-07 12:30:59 -07:00
Trevin Chow bafe9f0968 fix(ce-review): add recursion guard to reviewer subagent template (#527)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:29:48 -07:00
Trevin Chow 9a82222aba fix(document-review): widen autofix classification beyond trivial fixes (#524) 2026-04-06 22:05:27 -07:00
github-actions[bot] a6183ed000 chore: release main (#516)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-06 12:29:48 -07:00
Trevin Chow 36d8119166 fix(document-review): add recursion guard to reviewer subagent template (#523)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 12:26:22 -07:00
Trevin Chow 949bdef909 fix(review,work): omit mode parameter in subagent dispatch to respect user permissions (#522)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 12:12:31 -07:00
Trevin Chow 6f9069df7a fix(slack-researcher): make Slack research opt-in, surface workspace identity (#521)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 11:34:39 -07:00
Trevin Chow 320a045241 feat(ce-plan,ce-brainstorm): universal planning and brainstorming for non-software tasks (#519)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 23:53:13 -07:00
Trevin Chow b3960ec64b feat(slack-researcher): add Slack organizational context research agent (#495)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 18:39:25 -07:00
github-actions[bot] 6f3c841150 chore: release main (#508)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-05 14:33:40 -07:00
Trevin Chow f4e09044ba fix(ce-ideate,ce-review): reduce token cost and latency (#515)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 14:28:19 -07:00
Trevin Chow f6544eba0e fix(git-commit-push-pr): simplify PR probe pre-resolution (#513)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 12:44:32 -07:00
Trevin Chow bdeb7935fc fix(ce-brainstorm): reduce token cost by extracting late-sequence content (#511)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 11:25:12 -07:00
Trevin Chow 9da73a6091 fix(document-review): reduce token cost and latency (#509)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 23:31:56 -07:00