Skip to content

chore(workflow): adopt the /finalize-pr 3-phase PR workflow - #21

Merged
Ardnived merged 4 commits into
mainfrom
chore/finalize-pr-workflow
Jun 30, 2026
Merged

Ardnived merged 4 commits into
mainfrom
chore/finalize-pr-workflow

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

Adopts the 3-phase PR workflow (Implement → Adjust → Finalize) and the
reusable /finalize-pr ship pipeline from SahajCloud (ref sydevs/SahajCloud#517),
adapted to this repo's Vite/React widget tooling — so CI re-runs once per
finalize, not on every push.

  • Extracts the post-implementation ship pipeline into a single source of truth
    (/finalize-pr); /implement-issue now delegates its finalize steps to it.
  • Adds a conditional /security-review gated on this widget's client-side
    risky paths, and consolidates to a single /code-review pass.

Changes

  • .claude/skills/finalize-pr/SKILL.md — new ship pipeline: pre-flight →
    /simplify → single /code-review (subagent) → conditional /security-review
    → lean gate (pr-prep/check.sh) → push → create/refresh PR → watch CI
    (3-iteration fix cap) → report. Re-pointed at this repo's pnpm lint / typecheck / test:run gate and the Lint, Typecheck & Build + Smoke CI jobs.
  • .claude/skills/finalize-pr/pr-template.md — moved from implement-issue/
    (finalize-pr now owns PR creation); added a Tests: verification line.
  • .claude/skills/implement-issue/SKILL.md — slimmed to delegate finalize to
    /finalize-pr; removed the redundant post-PR /review pass; added the
    Adjust-phase handoff.
  • .claude/skills/implement-issue/scripts/validate.sh — removed (was a
    byte-for-byte duplicate of pr-prep/check.sh).
  • CLAUDE.md — new "PR workflow (3 phases)" subsection, including the
    Adjust-phase "commit locally, never push" rule; /finalize-pr added to the
    skills line.

Conditional /security-review — this repo's risky paths (derived from the
existing security-reviewer agent's threat model for a public, host-embedded
bundle): src/config/api/ (API-key auth + zod data layer), src/Widget.tsx
(host-prop trust boundary), the Lexical→HTML XSS sinks (src/lib/shape/lexical*,
EventPanel/, src/types/event*), package.json (supply chain), and
.env* / vite.config.ts (secrets/build) — plus a content-grep for any newly
added dangerouslySetInnerHTML/dompurify sink.

Verification

  • Lint: ✓ No errors (pnpm lint)
  • Types: ✓ Clean (pnpm typecheck)
  • Tests: ✓ Unit lane green — 84 tests (pnpm test:run)
  • Build: N/A — docs/skills-only change, no build-affecting code

Ran via the new pipeline itself (dogfooded): /simplify (4-agent pass, applied)
→ single /code-review (subagent). The conditional /security-review correctly
skipped — the diff touches only .claude/ + CLAUDE.md, no risky paths.

Notes for reviewer

  • Single source of truth: /implement-issue reads + executes
    finalize-pr/SKILL.md rather than duplicating the pipeline, so both entry
    points run the same steps. Satisfies all five acceptance criteria.
  • Documented in CLAUDE.md, not a new AGENTS.md — this repo uses CLAUDE.md
    as its canonical agent guide.
  • Dismissed review finding: the $(mktemp -t pr-body.XXXXXX).md idiom in
    finalize-pr step 6 is this repo's existing convention (identical in
    draft-ticket/SKILL.md); it works because the body is written to $BODY_FILE
    before gh reads it. Kept for consistency rather than diverging in one skill.
  • Out-of-scope follow-ups (not touched here): the security-reviewer.md
    agent file documents auth as Bearer … but the interceptor actually sends
    clients API-Key …; and the stray-temp-file nit above could be tidied across
    both skills.

Closes #19

🤖 Generated with Claude Code

Ardnived and others added 4 commits June 30, 2026 17:20
The reusable finalize pipeline (phase 3 of Implement → Adjust → Finalize):
simplify → single /code-review → conditional /security-review → lean gate →
push → open/refresh PR → watch CI (capped fix-loop) → report. Re-pointed at
this repo's lint/typecheck/test:run gate, CI job names, and client-side
risky-path globs. pr-template.md moves here since finalize-pr now owns PR
creation.

Refs #19

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace the inline simplify → review → push → PR → CI tail (and the redundant
post-PR /review pass) with a delegation to /finalize-pr, the single source of
truth for the ship pipeline. Repoint the lean gate at pr-prep/check.sh and add
the Adjust-phase handoff. Removes scripts/validate.sh — a byte-for-byte
duplicate of pr-prep/check.sh.

Refs #19

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add an "Implement → Adjust → Finalize" subsection under Git / PR workflow,
including the Adjust-phase "commit locally, never push" rule that batches CI
runs. List /finalize-pr in the skills line.

Refs #19

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Drop the over-repeated pipeline restatements the /simplify review flagged:
the inline finalize step-list in implement-issue (delegate, don't echo), the
triple-stated "single pass" in finalize-pr step 2, and the duplicated CI-gate
enumeration in step 4 (step 7 already owns it).

Refs #19

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying atlas-legacy with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0584a0b
Status: ✅  Deploy successful!
Preview URL: https://e7296dde.syatlas.pages.dev
Branch Preview URL: https://chore-finalize-pr-workflow.syatlas.pages.dev

View logs

@Ardnived
Ardnived merged commit f7a4273 into main Jun 30, 2026
3 checks passed
@Ardnived
Ardnived deleted the chore/finalize-pr-workflow branch June 30, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(workflow): adopt the /finalize-pr 3-phase PR workflow

1 participant