Skip to content

Conversation

@charliecreates
Copy link
Contributor

Component / Package Name:

jsx-email / .charlie

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Resolves #354
Refs #348

Description

Aligns the next/v3 branch docs and Charlie playbooks with main for <Raw>, <Conditional>, and running jsx-email tests so v3 contributors get branch-accurate guidance.

  • Ported .charlie/instructions/pull-request.md from main into next/v3 and updated test references to use the jsx-email:test Moon task and shared/vitest.config.ts (the configuration used on next/v3).
  • Added .charlie/playbooks/conditional-and-raw.md mirroring main’s Conditional/Raw guidance, but wired to the next/v3 Moon tasks and CI workflow. This copy explicitly calls out that alignment work should branch from origin/next/v3, target next/v3 as the PR base, and mention #348.
  • Added .charlie/playbooks/run-jsx-email-tests-like-ci.md describing how to run the packages/jsx-email suite locally in the same way next/v3 CI does (build plugin artifacts, run pnpm moon run jsx-email:test, and run jsx-email:tsc), again with an explicit note about targeting next/v3 and referencing #348 for the broader alignment effort.
  • Left the existing user-facing component docs under docs/components/{raw,conditional}.md unchanged because they are already in sync between main and next/v3; the new .charlie docs provide the branch-specific contributor guidance requested in charlie: next/v3 docs and playbooks parity with main for Raw, Conditional, and tests #354.

Verification

Docs-only change (new .charlie instructions and playbooks); no runtime or test code was modified.

  • Skipped pnpm moon run repo:lint, pnpm moon run jsx-email:build, pnpm moon run jsx-email:test, and pnpm moon run jsx-email:tsc because this PR only adds documentation/configuration for Charlie and does not touch TypeScript/JS or workflows.
  • Manually verified that the commands referenced in the new playbooks (jsx-email:test, jsx-email:tsc, plugin build tasks, and shared/vitest.config.ts) exist on next/v3 and match the CI workflows (.github/workflows/test*.yml).

Self-review notes

Copy link
Contributor Author

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the new .charlie instructions and playbooks are coherent and aligned with the repository’s next/v3 setup, but there are a couple of consistency and maintainability concerns. The biggest issue is that the newly added [R4] verification rules conflict with the behavior described in this PR’s own description, which skips those commands for docs-only changes. The Conditional/Raw playbook hardcodes the MSO closer string without pointing to a single source of truth, which could drift over time. The rollback command in the CI-aligned test playbook assumes a tracking origin branch and may be surprising or brittle for some contributors.

Additional notes (4)
  • Readability | .charlie/instructions/pull-request.md:29-41
    The Verification commands section defines repo:lint as part of R4, then introduces a separate R4.1 section for linting. While this mirrors the intent from main, the split between running repo:lint as a verification command and having a separate mandatory linting rule can be slightly confusing for contributors scanning quickly (it reads as if lint must be run twice in different contexts).

Given this is a fresh copy on next/v3, consider making the relationship between R4 and R4.1 explicit (e.g., that R4.1 elaborates on the repo:lint bullet in R4 rather than adding a distinct additional requirement). This would reduce ambiguity without changing any actual rules.

  • Maintainability | .charlie/playbooks/conditional-and-raw.md:16-18
    The Closer/opener integrity guidance hardcodes the closer string to <![endif]/-->. If next/v3 ever needs to diverge (or if older tests still assert <![endif]-->), this guidance could become inaccurate and mislead contributors writing or updating tests.

Given that #348 tracks alignment across branches, it might be safer to either:

  • briefly justify why this closer is the canonical form for next/v3, or

  • reference a single source of truth (e.g., a helper or existing tests) rather than duplicating the literal in prose.

  • Maintainability | .charlie/playbooks/conditional-and-raw.md:13-13
    The playbook clearly targets next/v3 and mentions #348, which is good. One minor risk is that the explicit command string import { Conditional, Raw, render } from '../src/index.ts' may drift if the source entry point changes on next/v3 (for example, if the main export file is renamed or reorganized). That would make the guidance subtly stale.

Given this is an internal contributor playbook, you might want to phrase this as a pattern ("import from ../src/index.ts or the relevant source file") to reduce future maintenance when the source layout evolves.

  • Maintainability | .charlie/playbooks/run-jsx-email-tests-like-ci.md:29-32
    The rollback command that targets snapshots uses a glob inside quotes and relies on git restore --source=origin/$(git rev-parse --abbrev-ref HEAD) succeeding. On some shells or for contributors without the remote tracking branch locally (e.g., working from a fork or a non‑tracking branch), this may either no‑op or surprise people.

Given this is meant as a safety valve for contributors, a slightly more conservative example (or a brief warning about the assumptions) would make it easier to use without accidentally restoring from the wrong remote/branch.

Summary of changes

Summary of changes

  • Added .charlie/instructions/pull-request.md describing branch-specific rules for the next/v3 branch, with emphasis on packages/jsx-email, Moon tasks, testing, linting, and PR conventions.
  • Introduced .charlie/playbooks/conditional-and-raw.md to guide changes to <Conditional> and <Raw> rendering and tests on next/v3, including test strategies and required commands.
  • Added .charlie/playbooks/run-jsx-email-tests-like-ci.md detailing how to run the packages/jsx-email tests locally in a way that mirrors next/v3 CI (build steps, Moon tasks, Vitest config, rollback guidance).

@charliecreates charliecreates bot removed the request for review from CharlieHelps November 17, 2025 16:47
@shellscape shellscape merged commit 129242f into next/v3 Nov 18, 2025
6 of 8 checks passed
@shellscape shellscape deleted the ai-354-charlie-next-v3-docs-and-playbooks-parity-w branch November 18, 2025 18:53
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.

3 participants