Appearance
Monorepo Developer Workflow
This playbook reflects the current webentor-stack monorepo workflow.
How the stack is organized
Work inside one repository with package boundaries:
packages/webentor-core- shared PHP + JS runtime (blocks, images, filters, frontend/editor logic).packages/webentor-configs- shared lint/format presets.packages/webentor-setup- shared setup runtime + setup CLI contract.packages/webentor-starter- starter template composition.docs- VitePress documentation.
External context:
webentor-demoremains an external integration target used for final validation.
Daily workflow (where to make changes)
Use change scope to choose location:
- Shared runtime behavior ->
packages/webentor-core. - Shared lint/format rules ->
packages/webentor-configs. - Setup/bootstrap/upgrade behavior ->
packages/webentor-setup. - Starter defaults and wrapper integration ->
packages/webentor-starter. - Documentation and rollout notes ->
docs.
Rule of thumb: if multiple projects should reuse it, implement it in shared packages, not in project-specific hooks.
Validation workflow
For package-level changes:
- Run package-local checks in the changed package.
- Validate docs/contracts affected by that change.
- Validate integrated behavior through starter/demo flow before release.
Typical checks:
- Setup/runtime syntax checks in
webentor-setup. - PHP syntax checks for setup CLI and touched PHP files.
- Docs build for documentation changes.
What happens after push (CI pipeline)
Repository automation is split by trigger type so CI stays fast and release steps remain auditable.
.github/workflows/ci.yml:- Runs on every pull request and every push to
main. - Uses
dorny/paths-filterto execute only jobs for changed areas. coreandconfigsjobs run lint/build/test.setupjob validates shell scripts and setup CLI PHP syntax.starterjob installs composer dependencies and builds the theme.docsjob builds VitePress docs.
- Runs on every pull request and every push to
.github/workflows/docs-deploy.yml:- Runs on push to
mainwhendocs/**changed. - Builds docs and deploys to GitHub Pages.
- Runs on push to
.github/workflows/release.yml:- Runs on push to
main. - Uses Changesets action to open/update the "Version Packages" PR.
- After merging that PR,
pnpm changeset publishpublishes only newly bumped, unpublished npm package versions.
- Runs on push to
.github/workflows/demo-bump.yml:- Runs after
release.ymlcompletes successfully. - Invokes
scripts/bump-demo.shto trigger downstream demo integration bump flow (placeholder implementation).
- Runs after
.github/workflows/split-webentor-core.yml,.github/workflows/split-webentor-setup.yml, and.github/workflows/split-webentor-starter.yml:- Run on namespaced monorepo tags (
core-v*,setup-v*,starter-v*) or manual dispatch. - Use subtree split scripts to mirror package contents to standalone repositories.
- Mirror repositories receive normalized semver tags (
vX.Y.Z) for downstream package tooling compatibility.
- Run on namespaced monorepo tags (
mermaid
flowchart LR
pushOrPr["Push_or_PR"] --> ci["ci.yml"]
pushMain["Push_main"] --> release["release.yml"]
release --> demoBump["demo-bump.yml"]
pushMainDocs["Push_main_with_docs_changes"] --> docsDeploy["docs-deploy.yml"]
pushCoreTag["Push_tag_core-v*"] --> splitCore["split-webentor-core.yml"]
pushSetupTag["Push_tag_setup-v*"] --> splitSetup["split-webentor-setup.yml"]
pushStarterTag["Push_tag_starter-v*"] --> splitStarter["split-webentor-starter.yml"]How to change and release a package
Use this sequence for package changes so CI, releases, and downstream integration stay synchronized:
- Create a feature branch and implement changes in the relevant
packages/*directory. - Add a changeset:
- Run
pnpm changeset. - Select affected package(s).
- Select semver bump type.
- Write a short release summary.
- Run
- Open a pull request;
ci.ymlvalidates changed areas. - Merge the PR into
main;release.ymlthen opens/updates the "Version Packages" PR. - Merge the version PR; Changesets bumps versions/changelogs and publishes only newly bumped, unpublished npm package versions.
- Confirm
demo-bump.ymlran successfully after release. - Push a namespaced tag when you want to trigger a specific split mirror:
core-v*->split-webentor-core.ymlsetup-v*->split-webentor-setup.ymlstarter-v*->split-webentor-starter.yml- Mirror scripts normalize these to
vX.Y.Ztags in target repositories.
Release and rollout order
When changes span multiple packages, keep this order and map each stage to automation:
webentor-coreand/orwebentor-configs- Add changesets in PRs.
release.yml+ Changesets handles version PR and selective npm publish after merge.
webentor-setup(include upgrade recipe when behavior changes)- Validate runtime/CLI contract updates.
- Trigger split mirror via
setup-v*tag when ready.
webentor-starter- Validate integrated behavior against updated package outputs.
- Trigger split mirror via
starter-v*tag when ready.
webentor-coremirror (for standalone Composer delivery)- Trigger split mirror via
core-v*tag when ready. - Confirm target mirror tag is normalized to
vX.Y.Z.
- Trigger split mirror via
webentor-demointegration validation and bump- Validate downstream compatibility after release.
demo-bump.ymlis the automation hook for this handoff.
Setup-core contract (do not break)
In consumer projects:
scripts/setup-core/is synchronized runtime payload fromwebentor-setup.- Do not put project business logic in
setup-core.
Project-specific setup customization belongs in:
scripts/.env.setupscripts/hooks/scripts/project-specific/
Team working agreement
- Keep reusable behavior in shared packages, not in ad-hoc project patches.
- Keep setup contract updates synchronized across runtime scripts, CLI behavior, docs, and upgrade manifests.
- Treat demo integration checks as release gate before declaring coordinated changes complete.