Repository Structure – wpcamp-hub
Purpose
Section titled “Purpose”This repository keeps the client project code in one monorepo while allowing each development environment to stay local and replaceable.
.github/workflowscontains the GitHub workflows for the whole repo including per package workflows.packagescontains the reusable project packages.devcontains ready-made local development environments.docscontains shared docs, setup docs, and package docs entry points..agents/skillscontains agent skills to help work on the monorepo.
Agent Skills
Section titled “Agent Skills”Project-local agent skills live in .agents/skills. The client-monorepo skill explains how agents should add packages, development environments, GitHub Actions workflow wiring, and WordPress package mounts. Its references/ folder links directly to the current docs/setup/*.md files so reference material stays current after this repository is cloned.
Packages
Section titled “Packages”Store project-owned code in packages.
packages/ <package-name>/ <another-package-name>/Each package owns its own source code, dependency files, build tooling, tests, docs, and package-specific .gitignore rules. For example, a WordPress plugin package owns its own composer.json, composer.lock, package.json, docs, and source files when it needs those tools.
Adding A Package
Section titled “Adding A Package”Create a new folder in packages:
mkdir packages/<package-name>The folder name should describe the package role. It does not need to match the name used inside a development environment.
Examples:
packages/<plugin-package>can be mounted into WordPress aswp-content/plugins/<wordpress-plugin-folder>.packages/<theme-package>can be mounted into WordPress aswp-content/themes/<wordpress-theme-folder>.packages/<worker-package>can contain a Cloudflare Worker package.
Add package-specific dependency files inside the package folder only when the package needs them.
packages/ <package-name>/ composer.json composer.lock docs/ src/Package Docs
Section titled “Package Docs”Package-specific docs are authored in the package that owns the knowledge:
packages/ <package-name>/ docs/ index.mdExpose package docs in the root docs tree with a symlink:
docs/ packages/ <package-name> -> ../../packages/<package-name>/docsEdit package docs through packages/<package-name>/docs, not through the symlink path. Read docs/setup/how-to-write-docs.md for authoring rules, frontmatter requirements, and public/internal visibility metadata.
Package Workflows
Section titled “Package Workflows”Use package-name-prefixed workflow files at the repository root:
.github/ workflows/ <package-name>-ci.yml <package-name>-docs.yml <package-name>-release.yml
packages/ <package-name>/ src/ package.json README.mdDo not use nested root workflow folders such as .github/workflows/<package-name>/ci.yml. Package workflow files live directly in .github/workflows with <package-name>-<purpose>.yml filenames.
Use triggers inside each package workflow to scope the workflow to the package paths:
on: push: branches: - dev paths: - packages/web/src/content/docs/*.mdxUse the package folder name as the workflow filename prefix:
.github/workflows/<package-name>-ci.ymlWorkflow name values and job IDs should also include the package name so GitHub Actions history is easy to scan.
Read docs/setup/github-workflows.md for package-scoped trigger, CI, and release examples.
Ignore Rules
Section titled “Ignore Rules”The root .gitignore is a baseline for common generated directories that may appear anywhere in the repository, such as node_modules, vendor, dist, build, and coverage. Packages should keep their own .gitignore files for package-specific build outputs, caches, generated files, or exceptions where a generated directory must be committed.
Development Environments
Section titled “Development Environments”Store ready-made local environments in dev.
dev/ wordpress-<name>/ .ddev/For WordPress specifics read docs/setup/wordpress-package-mounts.md before adding a new WordPress plugin or theme package to the local environment.
Documentation
Section titled “Documentation”Use the root docs tree as the central documentation surface:
docs/ setup/ packages/ <shared-topic>.mddocs/setupcontains repository setup and maintainer conventions.docs/packagescontains symlinks to package-owned docs folders.- Files directly under
docscontain shared knowledge that applies across packages.