Spectre Base Theme is a WordPress theme foundation with a Vite build pipeline, a single theme JavaScript entry, and a single emitted theme CSS bundle.
- Repo-shared Copilot support files live in
.github/copilot-instructions.md,.github/instructions/,.github/prompts/, and.github/agents/. - Use the
Release Readyprompt for production-readiness and dependency-update audits. - Keep release handoff notes aligned with
.codex/handoff-template.md.
-
Install dependencies:
npm install
-
Start development:
npm run dev
-
Build production assets:
npm run build
-
Validate the theme asset contract:
npm run check:assets
-
Validate PHP syntax:
npm run lint:php
src/js/main.tsis the single theme JavaScript entry.src/styles/main.cssis the theme stylesheet source imported bysrc/js/main.ts.spectre-theme/contains the WordPress theme PHP templates and metadata.spectre-theme/dist/contains compiled assets generated by Vite. Do not edit it by hand.
The deployable WordPress theme directory in this repository is
spectre-theme/. The package and repository name remain
spectre-base.
| File / directory | Status | Note |
|---|---|---|
src/js/main.ts |
Source of truth | Edit freely |
src/styles/main.css |
Source of truth | Edit freely |
spectre-theme/ (PHP, JSON) |
Source of truth | Edit freely |
spectre-theme/dist/ |
Generated | Never edit directly — output of npm run build |
spectre-theme/dist/.vite/manifest.json |
Generated | Validated by npm run check:assets |
vite.config.ts |
Source of truth | Edit when changing build behavior |
package.json |
Source of truth | Version must stay in sync with style.css and readme.txt |
- Keep PHP focused on WordPress structure, data access, and template flow.
- Keep theme styling and client behavior in
src/. - Consume
@phcdevworks/spectre-tokensand@phcdevworks/spectre-ui; do not redefine token values or recreate the shared styling layer locally. - Do not add additional theme asset entrypoints unless the theme contract is intentionally changing.
Run the full validation suite locally:
npm run checkIf your change affects WordPress rendering, verify both:
- Development mode loading from the Vite dev server
- Production mode loading from
spectre-theme/dist/.vite/manifest.json
Any change that touches a public theme surface requires explicit classification
before review. Public surfaces include WordPress hooks and filters, template
contracts, asset handles, theme metadata, deployable files in spectre-theme/,
README usage, and generated asset output.
Step-by-step checklist:
-
Identify the change classification:
additive,semantic change,breaking, orN/A. -
Update source, docs, theme metadata, and
CHANGELOG.md [Unreleased]together. -
Confirm no hardcoded visual values, local tokens, client-specific branding, or starter-theme boundary violations were introduced.
-
Regenerate assets with
npm run buildif output changed. -
Run the full validation command:
npm run check
-
Stop for Bradley Potts approval before changing public hooks, filters, asset handles, theme version metadata, or any reusable theme contract in a breaking way.
- Follow the existing file structure before creating new folders.
- Prefer small template parts over large abstractions.
- Update README or contributor docs when the developer workflow changes.
- Move reusable visual patterns to
@phcdevworks/spectre-uirather than expanding the WordPress shell.
Open an issue or discussion in this repository if you need direction before making a larger change.
By participating in this project, you agree to follow the Code of Conduct.
By contributing, you agree that your contributions will be licensed under the MIT License.