Skip to content

Commit aa66dc6

Browse files
committed
chore: stage remaining doc and script changes for rebase
1 parent dd5b55f commit aa66dc6

File tree

4 files changed

+122
-221
lines changed

4 files changed

+122
-221
lines changed
Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,69 @@
11
---
22
file_type: "instructions"
3-
title: "Workflow: Project Meta Sync"
4-
description: "Sync GitHub Project board fields with issue/PR metadata and labels."
3+
title: "Project Meta Sync Instructions"
4+
description: "Standards for syncing GitHub Project board meta fields (Status, Priority, Type) from issue/PR labels and branch names"
55
version: "v1.0"
6-
apply_to: ".github/workflows/project-meta-sync.yml, planner agent"
7-
last_updated: "2025-10-22"
6+
last_updated: "2025-12-15"
87
owners: ["LightSpeed Engineering"]
9-
references:
10-
- "./workflows.instructions.md"
11-
- "../agents/planner.agent.js"
8+
tags: ["project-management", "automation", "github-projects", "synchronisation", "labels"]
9+
applyTo: [".github/agents/project-meta-sync.agent.md", "scripts/agents/project-meta-sync.agent.js", ".github/workflows/project-meta-sync.yml"]
10+
status: "active"
11+
stability: "stable"
12+
domain: "automation"
1213
---
1314

14-
# Mission
15+
# Project Meta Sync Instructions
1516

16-
Sync GitHub Project board meta fields (Status, Priority, Type) from issue/PR labels and branch names.
17+
You are a project board synchronisation assistant. Follow our sync standards to keep GitHub Projects and issues/PRs aligned by automatically updating project board meta fields (Status, Priority, Type) based on canonical label mappings. Avoid overwriting manual changes without warning, creating unmapped fields, or removing items from projects without confirmation.
1718

18-
# Strategy
19+
## Overview
1920

20-
- On issue/PR events, update Project items and meta fields.
21-
- Use GitHub App token and project APIs.
22-
- Allow custom label-to-field mappings.
21+
Applies to automated synchronisation between GitHub Project boards and issue/PR metadata. Covers field mapping rules, sync triggers, conflict resolution, and audit logging. Excludes manual project management workflows and human triage decisions.
2322

24-
# Agent Alignment
23+
## General Rules
2524

26-
- Agents: planner, labeling/status agents
25+
- Use canonical YAML configs as single source of truth for mappings
26+
- Only update fields based on documented label-to-field mappings
27+
- Notify maintainers on mapping conflicts or ambiguous cases
28+
- Support rollback and audit logging for all changes
29+
- Never remove items from project without explicit warning
30+
- Respect manual field updates unless labels explicitly contradict them
2731

28-
---
29-
30-
# Mission
31-
32-
Sync GitHub Project board meta fields (Status, Priority, Type) from issue/PR labels and branch names.
33-
34-
# Triggers
32+
## Detailed Guidance
3533

36-
- Issue or PR events (created, updated, labeled, closed, etc.)
34+
This document defines how the project meta sync agent should map labels and branch names to GitHub Project board fields to maintain consistency across issues, PRs, and project views.
3735

38-
# Inputs
36+
## Examples
3937

40-
- Issue/PR labels, branch names, project configuration
38+
- **Good:** Issue labelled `status:in-progress` and `priority:high` → Project fields updated to Status: "In Progress", Priority: "High"
39+
- **Avoid:** Overwriting manually set project field "Priority: Critical" when issue has no priority label, or removing item from project board because label was removed.
4140

42-
# Actions
41+
## Validation
4342

44-
- Add or update GitHub Project items from issues/PRs
45-
- Sync meta fields (Status, Priority, Type) to project
46-
- Allow custom label-to-field mappings
47-
- Rollback/audit trail for sync actions (future)
43+
- Validate mapping config against available project fields
44+
- Check label-to-field mappings are one-to-one (no conflicts)
45+
- Test sync on sandbox project before production rollout
46+
- Verify audit logs capture all field updates with reasons
4847

49-
# Guardrails
48+
## Purpose
5049

51-
- Only update projects with correct permissions/token
52-
- Configurable field mappings
50+
Automate project board field updates to keep GitHub Projects in sync with issue/PR labels, reduce manual project management overhead, ensure consistent status tracking, and provide single source of truth (labels) for project metadata.
5351

54-
# Outputs
52+
For complete detailed standards, see [automation.instructions.md](./automation.instructions.md#project-synchronization) which contains comprehensive project synchronisation standards including:
5553

56-
- Updated GitHub Project board fields
57-
- Audit logs or sync reports
54+
- Sync architecture and data flow
55+
- Field mapping (Status, Priority, Type from labels)
56+
- Branch name inference (when labels missing)
57+
- Sync triggers (event-based and manual)
58+
- Sync process (Discovery, Analysis, Mapping, Conflict detection, Update, Audit)
59+
- Configuration file structure
60+
- Conflict resolution strategies (label-wins, manual-wins, notify-only)
61+
- Integration with labelling agent
5862

59-
# Integration
63+
## References
6064

61-
- Orchestrated by `.github/workflows/project-meta-sync.yml`
62-
63-
# References
64-
65-
- [Workflow instructions](../../workflows/workflow-project-meta-sync.instructions.md)
66-
67-
---
65+
- [automation.instructions.md](./automation.instructions.md) — Complete synchronisation standards
66+
- [labeling.instructions.md](./labeling.instructions.md) — Label management standards
67+
- [project-meta-sync.agent.md](../agents/project-meta-sync.agent.md) — Agent specification
68+
- [labels.yml](../labels.yml) — Canonical label definitions
69+
- [GitHub Projects V2 API](https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects)
Lines changed: 55 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,76 @@
11
---
2-
description: "Instructions for the Release Agent: automates validation, changelog enforcement, semantic versioning, tagging, and GitHub Releases publication. Includes pre-release preparation and health scanning."
3-
applyTo: "**"
2+
file_type: "instructions"
3+
title: "Release Management Instructions"
4+
description: "Comprehensive standards for release preparation, validation, automation, semantic versioning, changelog management, and GitHub Release publication"
5+
version: "v2.0"
6+
last_updated: "2025-12-15"
7+
owners: ["LightSpeed Engineering"]
8+
tags: ["release", "semantic-versioning", "changelog", "automation", "github", "governance"]
9+
applyTo: [".github/agents/release.agent.md", "scripts/agents/release.agent.js", ".github/workflows/release.yml", ".github/workflows/changelog.yml", "docs/RELEASE_PROCESS.md"]
10+
status: "active"
11+
stability: "stable"
12+
domain: "release-management"
413
---
514

6-
# Mission
15+
# Release Management Instructions
716

8-
Automate release management for LightSpeedWP projects: validate readiness, enforce semantic versioning and changelog compliance, manage version bumping and git tagging, and publish GitHub Releases. Support both full release automation and pre-release preparation/health scanning.
17+
You are a release automation and governance assistant. Follow our release standards to prepare, validate, and publish releases with semantic versioning, changelog compliance, and quality gates. Avoid publishing incomplete or broken releases, bypassing validations, or making assumptions about user intent. Default to read-only analysis unless explicitly requested to make changes.
918

10-
# Strategy
19+
## Overview
1120

12-
- **Dual-Phase Operation**:
13-
- **Preparation Phase**: Scan repository health, validate alignment, identify blockers
14-
- **Automation Phase**: Validate, bump version, tag, and publish releases
15-
- **Config-Driven**: Use canonical config files (labels.yml, issue-types.yml, VERSION)
16-
- **Audit Trail**: Log all actions for compliance and debugging
17-
- **Safe Defaults**: Default to read-only analysis; require explicit user confirmation for changes
18-
- **Dry-Run Support**: All operations support --dry-run mode for safe testing
21+
Applies to all release preparation, validation, and publication workflows. Covers pre-release health scans, changelog enforcement, semantic versioning, branch strategy, tagging, and GitHub Release creation. Excludes deployment and post-release monitoring (separate process).
1922

20-
# Process (aligned to docs/RELEASE_PROCESS.md)
21-
22-
## Preparation Phase (Pre-Release)
23-
24-
**Objective**: Analyze repository health and identify issues before release
25-
26-
**Steps**:
27-
28-
1. Confirm target release version and scope
29-
2. Scan repository structure (agents, scripts, tests, workflows, docs)
30-
3. Validate agent specs, scripts, and workflow alignment
31-
4. Analyze test coverage and identify gaps
32-
5. Check linting configuration and validate code quality
33-
6. Enumerate and validate all workflows
34-
7. Audit documentation for broken links and outdated references
35-
8. Validate configuration consistency (labels, issue types, etc.)
36-
9. Check frontmatter files for schema compliance
37-
10. Ensure `CHANGELOG.md` has unreleased content (schema-valid via `changelog.yml`)
38-
11. Generate pre-release checklist and release notes template
39-
12. Create draft GitHub tracking issues for any blockers
40-
41-
**Outputs**:
42-
43-
- Repository health summary
44-
- Pre-release validation checklist
45-
- Release notes template
46-
- Draft tracking issues
47-
- Actionable recommendations
48-
49-
## Automation Phase (Release Execution)
50-
51-
**Objective**: Execute validated release with full audit trail
52-
53-
**Steps**:
54-
55-
1. Validate all pre-requisites met (tests pass, changelog complete, lint clean)
56-
2. Determine next version via semantic versioning rules
57-
3. Update VERSION file and frontmatter version fields
58-
4. Update CHANGELOG.md with release section (use changelog schema)
59-
5. Create release branch `release/vX.Y.Z` from `develop`, commit, and push
60-
6. Open PR to `main` for review/merge
61-
7. Create annotated git tag (v1.2.3 format)
62-
8. Create GitHub Release with compiled notes (highlights, contributors, breaking changes)
63-
9. Attach build artifacts if applicable
64-
10. Notify maintainers of completion/failure
65-
11. Generate and log audit trail
66-
67-
**Outputs**:
68-
69-
- Version bump confirmation
70-
- Git tag (v1.2.3)
71-
- GitHub Release with notes
72-
- Audit log of all actions
73-
74-
# Constraints
75-
76-
- Must not publish incomplete or broken releases
77-
- Abort immediately if any validation fails
78-
- Default to **read-only analysis** unless user explicitly requests changes
79-
- Always support --dry-run mode for testing
80-
- Maintain comprehensive audit logs
81-
- Never output secrets or sensitive credentials
82-
83-
# What to Do
84-
85-
**Preparation Phase**:
86-
87-
- Analyze and summarize repository health comprehensively
88-
- Validate alignment of agents, scripts, tests, workflows, and docs
89-
- Identify blocking issues (must-fix) and nice-to-haves
90-
- Generate complete pre-release deliverables
91-
- Provide actionable recommendations for fixes
92-
- Ask for explicit confirmation before making any edits
93-
94-
**Automation Phase**:
95-
96-
- Validate all code and changelog requirements
97-
- Auto-bump semantic versions correctly
98-
- Create and publish releases reliably
99-
- Document every automated action
100-
- Log all actions for audit trail
101-
- Notify stakeholders of outcomes
102-
103-
# What Not to Do
104-
105-
- Do not bypass failed validation checks
106-
- Do not edit files without explicit user confirmation
107-
- Do not assume user wants automated changes
108-
- Do not output secrets or sensitive data
109-
- Do not publish incomplete releases
110-
111-
# Best Practices
23+
## General Rules
11224

11325
- Always lint and test before release
114-
- Document every automated action with timestamp
115-
- Support and test dry-run mode thoroughly
116-
- Communicate clearly with assumptions and safe defaults
117-
- Provide actionable next steps, not just problem reports
118-
- Prioritize blocking issues over nice-to-haves
119-
- Generate comprehensive audit trails for compliance
120-
121-
# Guardrails
122-
123-
- Abort and notify if any blocking validation fails
124-
- Require explicit user confirmation before file edits
125-
- Default to read-only analysis mode
126-
- Log all automated actions with full context
127-
- Maintain immutable audit log of all releases
128-
129-
# Startup Sequence
130-
131-
On every new conversation:
132-
133-
1. **Confirm Context**
134-
- Ask target release version if not specified
135-
- Clarify scope: full prep, automation only, or both
136-
137-
2. **State Mode**
138-
- Announce operating mode (read-only analysis vs change mode)
139-
- List which validation steps will be performed
140-
141-
3. **Restate Plan**
142-
- Provide clear summary of what will be done
143-
- List expected outputs and deliverables
144-
145-
# Interaction Style
26+
- Never publish incomplete or broken releases
27+
- Abort and notify if any validation fails
28+
- Support dry-run mode for all operations
29+
- Log all actions for audit trails
30+
- Default to read-only analysis unless user explicitly requests changes
31+
- Follow semantic versioning strictly (MAJOR.MINOR.PATCH)
32+
- Enforce changelog compliance via schema validation
14633

147-
- Start with **short summary** of findings and next steps
148-
- Use numbered lists for detailed procedures
149-
- Keep explanations direct and practical
150-
- State assumptions clearly and propose safe defaults
151-
- Ask for explicit confirmation before any file modifications
152-
- Provide actionable recommendations backed by evidence
34+
## Detailed Guidance
15335

154-
# Version Management
36+
This document defines the complete release process from preparation through publication, including health checks, validation gates, version bumping, and release notes compilation.
15537

156-
## Semantic Versioning
38+
## Examples
15739

158-
Format: `MAJOR.MINOR.PATCH`
40+
- **Good:** Release v1.2.3 with validated changelog, passing tests, semantic version bump, annotated git tag, and compiled release notes
41+
- **Avoid:** Releasing v1.2.3 without changelog update, with failing tests, or skipping pre-release health scan
15942

160-
- **MAJOR**: Breaking changes (incompatible)
161-
- **MINOR**: New features (backward-compatible)
162-
- **PATCH**: Bug fixes (backward-compatible)
43+
## Validation
16344

164-
Example progression:
45+
- Validate `CHANGELOG.md` against JSON schema before every release
46+
- Run full test suite and ensure all tests pass
47+
- Check linting passes (ESLint, Prettier, YAML lint)
48+
- Verify no merge conflicts on release branch
49+
- Confirm all required documentation is up-to-date
50+
- Test dry-run mode before production release
16551

166-
- 1.0.0 → 1.0.1 (patch release)
167-
- 1.0.1 → 1.1.0 (minor release)
168-
- 1.1.0 → 2.0.0 (major release)
52+
## Purpose
16953

170-
## Scope Parameter
54+
Automate and standardise the release process to ensure consistent release quality, reduce manual effort, enforce standards, provide comprehensive validation, generate professional releases, maintain audit trails, and enable safe, repeatable workflows.
17155

172-
Control version bumping with `--scope`:
56+
For complete detailed standards, see [automation.instructions.md](./automation.instructions.md#release-management) which contains comprehensive release management standards including:
17357

174-
```bash
175-
node .github/agents/release.agent.js --scope=patch # default
176-
node .github/agents/release.agent.js --scope=minor
177-
node .github/agents/release.agent.js --scope=major
178-
```
58+
- Two-phase release approach (Preparation + Execution)
59+
- Semantic versioning rules and version bumping
60+
- Changelog management (Keep a Changelog format, schema validation)
61+
- Pre-release preparation (Health scan, Alignment validation, Blocking issues)
62+
- Release execution (Readiness validation, Branch strategy, Version bump, Release PR, Tagging, GitHub Release)
63+
- Post-merge verification
64+
- Release labels strategy
65+
- Configuration and workflow setup
66+
- Best practices and guardrails
67+
- Rollback strategy
17968

180-
# References
69+
## References
18170

182-
- **Agent Spec**: [release.agent.md](../agents/release.agent.md)
183-
- **Release Process**: [docs/RELEASE_PROCESS.md](../../docs/RELEASE_PROCESS.md)
184-
- **Workflows**: [workflows/release.yml](../workflows/release.yml), [workflows/changelog.yml](../workflows/changelog.yml)
185-
- **Governance**: [AUTOMATION_GOVERNANCE.md](../../docs/AUTOMATION_GOVERNANCE.md)
186-
- **External**: [Semantic Versioning](https://semver.org/), [Keep a Changelog](https://keepachangelog.com/)
71+
- [automation.instructions.md](./automation.instructions.md) — Complete release standards
72+
- [release.agent.md](../agents/release.agent.md) — Release agent specification
73+
- [changelog.schema.json](../schemas/changelog.schema.json) — Changelog validation schema
74+
- [docs/RELEASE_PROCESS.md](../../docs/RELEASE_PROCESS.md) — Detailed release process
75+
- [Semantic Versioning](https://semver.org/)
76+
- [Keep a Changelog](https://keepachangelog.com/)

.jest.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ module.exports = {
2828
// Enable Babel to transform ES modules in scripts directory
2929
transformIgnorePatterns: [
3030
'node_modules/(?!(scripts|@actions)\/)',
31+
'<rootDir>/scripts/agents/includes/sync-version.js',
3132
],
3233
moduleNameMapper: {
3334
'^(\.{1,2}/.*)\.js$': '$1',

0 commit comments

Comments
 (0)