Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/custom-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ file_type: custom-instructions
title: Repo-local Copilot Instructions
description: Repo-local Copilot and agent instructions for maintaining the LightSpeed .github control-plane repository.
mode: agent
version: v1.0
last_updated: '2026-06-03'
version: v1.1
last_updated: '2026-06-05'
owners:
- LightSpeed Team
tags:
- copilot
- agent
- governance
- instructions
status: active
stability: stable
domain: governance
language: en
---

# Repo-local Copilot Instructions
Expand All @@ -22,11 +31,13 @@ These instructions apply to work performed inside the LightSpeed `.github` contr
3. The branch name must follow [docs/BRANCHING_STRATEGY.md](../docs/BRANCHING_STRATEGY.md) (for example `fix/nl-postcode-validation` or `release/v1.6.0`).
4. Do not continue unrelated work on `claude/*`, issue-specific, or other in-flight branches.
5. If the working tree is already dirty with unrelated changes, stop editing that checkout and use a clean worktree or separate branch.

## Validation

- Run `npm run validate:branch-name -- --branch <branch>` for local checks.
- Pull requests targeting `develop` must pass the `Validation` job, which now includes branch-name enforcement.
# LightSpeed .github Custom Instructions

## LightSpeed .github Custom Instructions

## Issue Creation Protocol (AI Agents)

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Awesome GitHub Site: UI Redesign — Dark Mode, Navigation & Responsive Layout** — Complete navigation and UI overhaul. Added desktop Browse mega-dropdown with 4-column category grid (hover/click open, keyboard Escape dismiss, focus-out close). Added full-height mobile drawer sliding from right with backdrop overlay, scroll-lock, and `inert` guard. Fixed dark-mode nav header (was showing light background). Added fluid responsive CSS tokens for spacing and font sizes across breakpoints. Improved accessibility: Disclosure pattern (`aria-expanded`/`aria-controls`, no `role="menu"`), `aria-pressed` on theme toggle buttons, `inert` on closed drawer, nav z-index raised above drawer so hamburger stays accessible. ([#847](https://github.com/lightspeedwp/.github/issues/847), [#845](https://github.com/lightspeedwp/.github/pull/845))
- **Awesome GitHub Site: Phosphor Icon System** — Replaced all emoji icons (🤖 📖 💬 ✨ 🛡️ ⚙️ 🧩 🔧 🗺️ ✅ 📚 🍳 ☀️ 🌙) with Phosphor SVG icons via a new `Icon.astro` component that reads from `@phosphor-icons/core` at build time — zero runtime JS. Covers catalogue type icons, learning track icons, getting-started cards, cookbook placeholder, and theme toggle buttons. ([#844](https://github.com/lightspeedwp/.github/issues/844), [#843](https://github.com/lightspeedwp/.github/pull/843))

### Fixed
Expand Down
14 changes: 10 additions & 4 deletions docs/BRANCHING_STRATEGY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
file_type: documentation
title: Org-wide Git Branching Strategy
description: Canonical branch naming, protection, merge discipline, and automation rules for LightSpeedWP repositories.
last_updated: '2026-06-03'
last_updated: '2026-06-05'
owners:
- LightSpeed Team
version: v1.1
version: v1.2
status: active
stability: stable
domain: governance
tags:
- branching
- git
- governance
- ci
language: en
---

# Org-wide Git Branching Strategy
Expand Down Expand Up @@ -146,7 +152,7 @@ hotfix/ga4-purchase-duplicate
Use a single regex in a workflow to enforce naming discipline:

```regex
^(feat|fix|hotfix|release|refactor|chore|docs|test|perf|ci|build|deps|security|revert|research|design|a11y|ux|i18n|ops|proto|ds|api|schema|telemetry|content|seo|config|migrate|qa|uat)/[a-z0-9._-]+$
^(feat|fix|hotfix|release|refactor|chore|docs|test|perf|ci|build|deps|security|revert|research|design|a11y|ux|i18n|ops|proto|ds|api|schema|telemetry|content|seo|config|migrate|qa|uat)/[a-zA-Z0-9._-]+$
```

Example workflow (`.github/workflows/validate-branch-name.yml`):
Expand All @@ -165,7 +171,7 @@ jobs:
BRANCH="${{ github.head_ref }}"
# Allow dependabot/renovate
if [[ "$BRANCH" =~ ^(dependabot|renovate)/ ]]; then exit 0; fi
if [[ ! "$BRANCH" =~ ^(feat|fix|hotfix|release|refactor|chore|docs|test|perf|ci|build|deps|security|revert|research|design|a11y|ux|i18n|ops|proto|ds|api|schema|telemetry|content|seo|config|migrate|qa|uat)/[a-z0-9._-]+$ ]]; then
if [[ ! "$BRANCH" =~ ^(feat|fix|hotfix|release|refactor|chore|docs|test|perf|ci|build|deps|security|revert|research|design|a11y|ux|i18n|ops|proto|ds|api|schema|telemetry|content|seo|config|migrate|qa|uat)/[a-zA-Z0-9._-]+$ ]]; then
echo "❌ Branch '$BRANCH' must match the required pattern."
exit 1
fi
Expand Down
25 changes: 3 additions & 22 deletions docs/CANONICAL_CONFIGS_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
file_type: documentation
title: Canonical Config File Interdependencies Guide
description: Canonical reference for how labels.yml, issue-types.yml, labeler.yml, and issue-fields.yml interact from issue creation through automation completion.
version: v1.0.1
version: v1.0.2
created_date: "2026-06-03"
last_updated: "2026-06-03"
last_updated: "2026-06-05"
authors:
- GitHub Copilot
owners:
Expand Down Expand Up @@ -104,6 +104,7 @@ sequenceDiagram
- `scripts/validation/validate-issue-fields.cjs` enforces strict cross-file parity for `Status`, `Priority`, and `Type` mappings.
- `scripts/validation/validate-labeling-configs.cjs` fails when `.github/labeler.yml` emits labels not defined in `.github/labels.yml`.
- `scripts/validation/validate-branch-name.js` enforces branch naming discipline for pull requests targeting `develop`.
- Run parity checks in CI on every PR touching any canonical config file.

## Related Documentation

Expand All @@ -112,24 +113,4 @@ sequenceDiagram
- [docs/LABEL_STRATEGY.md](./LABEL_STRATEGY.md)
- [docs/LABELING.md](./LABELING.md)
- [docs/BRANCHING_STRATEGY.md](./BRANCHING_STRATEGY.md)
3. `labeler.yml` may only emit canonical labels defined in `.github/labels.yml`.
4. `issue-types.yml` display types should map to canonical `type:*` labels that can be projected into project field Type values.

## Current Risks Observed (Wave 5 Phase 1)

- Cross-file Type parity is now validator-enforced, but downstream documentation can still drift if canonical types are added without doc updates.
- Several legacy documentation references still need to be redirected to the canonical docs, increasing operator confusion when the cleanup is incomplete.

## Recommended Validation Hooks

- `scripts/validation/validate-issue-fields.cjs` now includes strict cross-file parity checks for `Status`, `Priority`, and `Type` mappings.
- `scripts/validation/validate-labeling-configs.cjs` now fails when `.github/labeler.yml` emits labels not defined in `.github/labels.yml`.
- Run parity checks in CI on every PR touching any canonical config file.

## Related Documentation

- `docs/ISSUE_FIELDS.md`
- `docs/ISSUE_TYPES.md`
- `docs/LABEL_STRATEGY.md`
- `docs/LABELING.md`
- `.github/reports/audits/2026-06-03-issue-fields-config-vs-github-api-audit-660.md`
13 changes: 9 additions & 4 deletions scripts/validation/validate-branch-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const ALLOWED_PREFIXES = [
const BOT_PREFIXES = /^(dependabot|renovate)\//;
const PROTECTED_BRANCHES = new Set(["main", "develop"]);
const BRANCH_PATTERN = new RegExp(
`^(${ALLOWED_PREFIXES.join("|")})/[a-z0-9._-]+$`,
`^(${ALLOWED_PREFIXES.join("|")})/[a-zA-Z0-9._-]+$`,
);

function getArgValue(flag) {
Expand Down Expand Up @@ -95,15 +95,20 @@ function isAllowed(branchName) {

function printFailure(branchName) {
console.error(`Branch '${branchName}' does not follow the required format.`);
console.error("Expected: {prefix}/{branch-slug} (see docs/BRANCHING_STRATEGY.md)");
console.error(
"Expected: {prefix}/{branch-slug} (see docs/BRANCHING_STRATEGY.md)",
);
console.error(`Allowed prefixes: ${ALLOWED_PREFIXES.join(", ")}`);
console.error(
"Examples: fix/frontmatter-validation, docs/canonical-configs-guide, ops/branch-governance-guardrails",
);
}

function main() {
if (process.env.GITHUB_REF_TYPE === "tag" || (process.env.GITHUB_REF && process.env.GITHUB_REF.startsWith("refs/tags/"))) {
if (
process.env.GITHUB_REF_TYPE === "tag" ||
(process.env.GITHUB_REF && process.env.GITHUB_REF.startsWith("refs/tags/"))
) {
console.log("Running on a tag. Skipping branch name validation.");
process.exit(0);
}
Expand All @@ -112,7 +117,7 @@ function main() {

if (!branchName) {
console.warn(
"No active branch detected (possibly detached HEAD). Skipping branch name validation."
"No active branch detected (possibly detached HEAD). Skipping branch name validation.",
);
process.exit(0);
}
Expand Down
Loading
Loading