Updates the Beta Skills row to reflect the v2 two-phase shape
(re-brainstorm + re-plan, R-IDs carried forward, full redo from
main) and clarifies that all three original artifacts (PR, plan,
brainstorm) are preserved as superseded by reference.
bun test green (1340 pass / 0 fail). bun run release:validate clean.
Replaces v1's six-phase delta-shaped body with the v2 two-phase
flow:
- Phase 0: mode detection (PR# / blank / no-PR routing).
- Phase 1: discovery via four scripts + plan-merge-state probe.
Uses ${CLAUDE_SKILL_DIR}/scripts/X.sh paths so the runtime Bash
tool resolves them correctly (bare relative paths fail
empirically per AGENTS.md). The allowed-tools frontmatter pins
per-script entries so users skip the per-call permission prompt.
- Phase 2a/3a/4a: re-brainstorm phase, loaded from
references/rebrainstorm-workflow.md and written via
references/rebrainstorm-template.md. Skipped entirely when no
upstream brainstorm exists (R3 from the brainstorm) — re-plan
runs against the original plan + PR + learnings instead.
- Phase 2b/3b/4b: re-plan phase, loaded via
references/replan-template.md. Always-from-main baseline; plan
units cite R-IDs from origin:.
- Phase 5: handoff with explicit hard rule against unsolicited
"what is not in this plan" summaries (R19 from the brainstorm,
matching the cora-session friction). Branch base committed to
main; ce-work invocation passes both the plan path and the
branch base so ce-work doesn't re-ask the user.
Synthesis checkpoints stay prose, not menus — option sets bias
the answer at the synthesis layer. Pipeline mode skips both
synthesis prompts and the handoff menu; Inferred bets land in
## Assumptions in each artifact.
Replaces v1's doc-template.md (deleted) with replan-template.md
that:
- Drops the per-requirement [unchanged]/[revised]/[discarded]
block (now in the forked brainstorm; plan only references
R-IDs from origin:).
- Hoists the always-from-main rule to the top so the load-bearing
discipline is unmissable. Plan units' Files:, Approach:, and
Test scenarios: are written for the main baseline; code on the
original PR's branch must be named in Cherry-Pick Guidance.
- Adds explicit cherry-pick reference idiom: "Reuses path/... from
original PR commit <sha> — see Cherry-Pick Guidance."
- Documents type: replan in frontmatter (distinguishes from
feat/fix/refactor for downstream tooling) plus original_pr
and the origin: pointer to the forked brainstorm.
Discipline checks: no silent assumption that PR-branch code is on
main; Discarded Approaches each name a specific learning, not
generic rationale.
Loaded by Phase 4a. Documents the filename pattern
(<topic>-rebrainstorm-requirements.md), frontmatter contract
(supersedes + revision), full section order, and the new
## Discarded Requirements section unique to forks.
Discipline checks: every original R-ID must be accounted for
(active list with [unchanged]/[revised] marker, or discarded
section with [discarded] marker — never silent drop). New R-IDs
continue from max+1; no ID reuse. Frontmatter supersedes: names
the immediately-prior brainstorm; chain walks to root.
Replaces v1's regrounding-workflow.md (deleted) with a re-brainstorm
reference at the requirements scope. Documents the four-step pattern
(read artifacts in order with brainstorm last; re-derive problem
frame from user discussion language; walk every requirement assigning
[unchanged]/[revised]/[discarded] with R-ID stability; compose
three-bucket synthesis), the load-bearing R-ID stability rule, the
anti-patterns (diff-against-original, framing inheritance, critique
mode, brainstorm-from-zero, renumbering), the legacy fallback for
brainstorms without R-IDs, and a worked example based on the cora
brief-view scenario.
124 lines.
fetch-pr-context.sh: add // [] defaults on every collection
traversal so missing keys produce structured empty arrays rather
than triggering jq exit code 5 (which the cora run silently
absorbed three times). Same defense for nullable .author.login on
deleted accounts.
find-original-brainstorm.sh: new script. Given a plan path, prefer
the plan frontmatter's origin: field; fall back to scoring
docs/brainstorms/*-requirements.md by topic-fragment match against
the plan's filename topic. Same scoring shape as
find-original-plan.sh (with '-' first in the tr SET so it is
literal, not a range).
Updates the skill description to reflect the two-phase
re-brainstorm + re-plan output. Adds allowed-tools frontmatter
pinned per script filename so the runtime Bash invocations in the
forthcoming Phase 1 (U6) skip the per-call permission prompt.
Rewrites the intro paragraph; phase content is intentionally
empty here and lands in U6.
ce-code-review autofix pass (run 20260506-075859-f3ee7ae0):
- find-original-plan.sh: '-' moved to the front of the tr SET so it is
literal. Previously written as '/-_+.', tr interpreted the '-' between
'/' and '_' as a range, sweeping in uppercase letters and digits.
Branches like JIRA-123-bug had their fragments silently destroyed by
the unintended range translation; lowercase-only branch names happened
to survive. Verified the fix produces correct fragment splits for both
cases.
Surfaces ce-replan-beta in the Beta / Experimental table next to
ce-polish-beta. release:validate updates plugin counts automatically
during release-please runs; no manual count edits needed.
Adds the full phase content: mode detection (PR# / blank / no-PR
routing), discovery via the three scripts, re-grounding (loads
references/regrounding-workflow.md), synthesis checkpoint, doc
write (loads references/doc-template.md), and handoff menu with
inline routing. Documents pipeline-mode behavior — skip synthesis
prompt, route Inferred bets to ## Assumptions, skip handoff menu.
Cross-platform interaction via AskUserQuestion plus equivalents.
Defines the single canonical output template: frontmatter (with
original_pr/original_plan/supersedes), summary, re-grounded problem
frame, requirements with [unchanged]/[revise]/[discard] annotations,
discarded approaches, cherry-pick guidance table, supersedes block
with diff narrative, new learnings inventory, then standard ce-plan
body sections, then a suggested fresh branch name. Filename uses
the beta-skills framework's -beta-plan.md suffix to avoid colliding
with stable ce-plan output.
Documents the four-step pattern: read artifacts (PR first, plan
last), re-derive the problem frame from user discussion language,
mark every original requirement [unchanged]/[revise]/[discard], and
compose a three-bucket synthesis. Includes anti-pattern callouts
(diff-against-plan, critique-mode, brainstorm-from-zero) and a
worked example based on the brief-view scenario.
- detect-pr.sh: targets explicit PR or auto-detects current branch's,
emits PR metadata JSON; exit code 2 sentinel for no-PR routing.
- fetch-pr-context.sh: GraphQL bundle of PR metadata, review threads,
review bodies, top-level comments, and commits; minimal filtering so
the agent decides what's signal.
- find-original-plan.sh: scores docs/plans/ filenames by branch-name
fragment matches; prefers explicit PR-body link when given. Emits
the top candidate so the synthesis checkpoint can confirm/correct.
Creates the skill directory and SKILL.md with the beta-skills
framework frontmatter (name, [BETA] description, disable-model-
invocation, argument-hint) plus the phase outline. Phase content
is wired in U5 once references and scripts exist.
Upload changes:
- Add R2 (Cloudflare R2) as a permanent upload destination using AWS CLI
- In headless/background mode, auto-upload to R2 when env vars are set
(R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET, R2_ENDPOINT, R2_PUBLIC_URL)
without any user confirmation step
- In interactive mode, offer R2 as the first option in the destination menu
- Fall back to catbox if R2 upload fails
Browser reel tier:
- In headless mode, auto-start the dev server in background and poll for
readiness (30s timeout) instead of asking the user to start it
- Track server PID for cleanup in Step 4
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>