| file_type | documentation | ||||
|---|---|---|---|---|---|
| title | Automation & Workflows | ||||
| description | Strategy, governance, and workflow documentation for GitHub automation in LightSpeed repositories. | ||||
| version | v1.0.1 | ||||
| last_updated | 2026-06-01 | ||||
| owners |
|
||||
| tags |
|
||||
| status | active | ||||
| stability | stable | ||||
| domain | governance |
This document outlines LightSpeed's automation strategy, workflow governance, label management policies, and agent-driven deployment model.
- Automation Philosophy
- Branching & Workflow Strategy
- Workflow Overview
- Label & Issue Type Policy
- Workflow & Agent Governance
- Configuration Management
- References
- Automate everything: Releases, changelogs, labelling, project sync, and more—no manual steps or local scripts unless explicitly allowed.
- Agent-driven: Each automation workflow is paired with a corresponding agent that encapsulates all logic.
- Configuration-first: No hardcoded values; all label logic, rules, and type definitions live in canonical YAML configs.
- Instruction-paired: Every workflow and agent has a corresponding instruction file documenting purpose, usage, and best practices.
- Keep a Changelog: All changes must be traceable, user-facing, and formatted per Keep a Changelog 1.1.0 standard.
- Semantic Versioning: Release versioning is driven by PR labels and semantic version indicators.
LightSpeedWP follows a develop → main branching model:
- Primary development branch
- All active development, features, and bug fixes
- All validation, CI, test, lint, label, and automation workflows run here
- Every PR and push targeting
developis fully validated before integration - Workflows: Labelling, Testing, Linting, Planner, Reviewer, Project Sync
- Production-ready code only
- Reserved for releases and hotfixes
- Only release, changelog, versioning, and publishing workflows run here
- Code is merged into
mainonly for tagging and deploying a release - Workflows: Release, Tag, Publish, Deployment
If your project allows hotfixes directly to main, ensure validation workflows (CI/test/lint) also run on main for those rare PRs.
| Workflow | Branch | Purpose | Agent |
|---|---|---|---|
| labeling.yml | develop | Unified labelling, status/priority, and type automation | labeling.agent.js |
| changelog-validate.yml | develop | Enforce changelog requirements and PR labelling standards | changelog validation |
| planner.yml | develop | Post merge-readiness checklists and exit criteria to PRs | planner.agent.js |
| reviewer.yml | develop | Automated PR review and quality feedback | reviewer.agent.js |
| project-meta-sync.yml | develop | Sync project board with PR/issue status | project-meta-sync.agent.js |
| release.yml | main | Versioning, changelog generation, tagging, and release notes | release.agent.js |
| reporting.yml | develop | Generate metrics and activity reports | reporting.agent.js |
| metrics.yml | develop | Track and report organisation metrics | metrics.agent.js |
Ownership: Platform/Governance Team
Location: .github/labels.yml
Full Documentation: Labelling Guide — comprehensive reference for label families, usage, and automation
For complete label definitions, categories, naming conventions, and per-issue/PR labelling requirements, see LABELING.md.
Requirements:
- Justification: Document why the label is needed
- Check existing labels: Review LABELING.md to avoid duplicates
- Approval Process: Require 2 governance team approvals before creation
- Update documentation: Add to
.github/labels.ymland update LABELING.md
Approval Process:
- Create PR with label addition to
.github/labels.yml - Document use case and justify against existing labels
- Require approval from 2 governance team members
- Update LABELING.md with label definition
- Label takes effect on next label-sync workflow run
- Add label to deprecation list with replacement (if any)
- Add alias mapping old → new in
.github/labels.yml - Run migration script to update existing issues/PRs
- After 30-day grace period, remove deprecated label
- Remove from LABELING.md and document in CHANGELOG
Allowed:
- Component-specific areas (e.g.,
comp:custom-block) - Project-specific contexts (e.g.,
project:migration-2024) - Temporary initiative labels (prefix:
temp:)
Not Allowed:
- Alternative status/priority/type labels
- Labels conflicting with canonical naming
Documentation: Must be documented in repository README and linked from LABELING.md.
The labelling agent enforces canonical label usage:
- Single-select: Exactly one
status:*, onepriority:*, onetype:*per issue/PR - Canonical mapping: All labels must match definitions in
.github/labels.yml - Automated standardisation: Removes non-canonical labels and migrates legacy aliases
- Detailed requirements: See LABELING.md for per-issue and per-PR requirements
Canonical definitions: .github/issue-types.yml
Issue types are defined once in .github/issue-types.yml and used by both:
- Issue templates: Pre-populate the
typefield (maps totype:*labels) - Labelling agent: Auto-applies
type:*labels based on issue type field and content heuristics
Enforcement: One type per issue (one-hot principle); issue type field mirrors type:* label for consistency.
All workflows must:
- Include skip condition: Support
[skip workflow-name]in commit messages - Have concurrency control: Prevent overlapping runs where appropriate
- Use semantic names: Clear, descriptive names (e.g.,
Labelling • Issues & PRs) - Set appropriate permissions: Minimal required permissions only
- Include failure handling: Appropriate
continue-on-errororif: failure() - Generate summaries: Use
$GITHUB_STEP_SUMMARYfor output - Follow UK English: All text, comments, and documentation
Standard Workflows (require 2 Platform Team approvals):
- Labelling and label sync workflows
- Security scanning and dependency management
- Release automation and versioning
Repository-Specific Workflows (require Maintainer approval):
- Build/test workflows
- Deployment workflows
- Custom automation
File locations:
- Agent specifications:
.github/agents/ - Agent scripts:
scripts/agents/ - Agent utilities:
scripts/agents/includes/ - Tests:
scripts/agents/__tests__/andscripts/agents/includes/__tests__/
Requirements:
- Modular Design: Agents orchestrate; utilities implement logic
- Configuration-Driven: No hardcoded values; use YAML configs
- Test Coverage: Minimum 80% coverage for new utilities
- Error Handling: Comprehensive error handling with retry logic
- Logging: Use
@actions/coreor console for consistent logging - Documentation: JSDoc for all functions, README for agents
- Develop in feature branch
- Add/update tests
- Update documentation
- Create PR with
type:automationlabel - Require 2 governance team approvals
- Test in sandbox repository (if available)
- Deploy to production via merge
Rollback Procedure:
- Revert PR if critical issues detected
- Create hotfix for critical bugs
- Document incident in post-mortem review
| File | Purpose | Owner | Approval Required |
|---|---|---|---|
.github/labels.yml |
Label definitions, colours, aliases | Governance Team | 2 approvals |
.github/labeler.yml |
File/branch-based label rules | Governance Team | 2 approvals |
.github/issue-types.yml |
Issue type definitions and mappings | Governance Team | 2 approvals |
All configuration files are validated:
- Pre-commit: Local linting via Node scripts
- Workflow:
validate-labeling-configs.cjsruns on all labelling PRs - Deployment: Configuration is loaded and validated by agents at runtime
Common validation checks:
- YAML syntax correctness
- Required field presence
- Label uniqueness and naming conventions
- No conflicting category assignments
- Labelling Guide — Complete labelling strategy and label families
- Canonical Labels
- Labeler Rules
- Issue Types Config
- Portable Automation Instructions
- Workflow Specifications
- Agent Specifications