| file_type | documentation | ||||
|---|---|---|---|---|---|
| title | Release Agent — GitHub Agentic Workflow | ||||
| description | GitHub Agentic Workflows definition for the LightSpeed release agent, orchestrating release automation with LLM-driven reasoning and safety gates. | ||||
| version | 1.0 | ||||
| created_date | 2026-08-11 | ||||
| last_updated | 2026-08-25 | ||||
| status | active | ||||
| tags |
|
||||
| owners |
|
Version: 1.0 (Phase 5A, MVP)
Status: SKELETON (to be filled during Phase 5A implementation)
Last Updated: 2026-08-11
This is the GitHub Agentic Workflows definition for the LightSpeed release agent. It orchestrates release automation by:
- Parsing user intent (scope: patch/minor/major)
- Running pre-flight safety checks
- Invoking agentic reasoning (confidence scoring)
- Calling Phase 4 shell scripts for mutations
- Applying approval gates (scope-based)
- Publishing releases with audit trail
Approach: AUGMENT (wrap shell scripts, don't replace)
scope:
description: Release type (patch|minor|major)
default: patch
dry_run:
description: Preview without mutations
default: false
confirm_minor:
description: User confirms minor release (required for --scope=minor)
default: false
confirm_major:
description: User confirms major release (required for --scope=major)
default: false
engine:
description: AI engine to use (copilot|claude|auto)
default: copilotrelease_version:
description: Semantic version released (e.g., 1.2.3)
release_branch:
description: Branch name created (e.g., release/v1.2.3)
release_prs:
description: PR numbers created (#N, #N+1)
github_release_url:
description: Link to published GitHub Release
agentic_score:
description: Confidence score from agentic reasoning (0.0-1.0)Goal: Validate environment before agentic reasoning
- Check branch is develop
- Verify no uncommitted changes
- Confirm user is in maintainers team
- Load VERSION and CHANGELOG.md
- Report: "Ready to release. Scope: patch"
Goal: Invoke AI to validate release safety
Prompt Template:
You are a release manager. Validate this release:
Release Scope: {scope}
Current Version: {version}
Next Version: {next_version}
Changelog Entries: {changelog_entries}
Commit History: {recent_commits}
Questions to answer:
1. Is the scope appropriate? (patch=docs/fix, minor=feature, major=breaking)
2. Are breaking changes documented?
3. Is the version bump semantic and correct?
4. Is the changelog populated?
5. Any security concerns?
Respond with:
{
"approved": true/false,
"confidence": 0.0-1.0,
"reason": "string",
"concerns": ["..."],
"suggestions": ["..."]
}
Output:
Agentic Score: {confidence}
Decision: APPROVE / REJECT
Reason: {reason}
Concerns: [list any issues]
Suggestions: [recommended actions]
Goal: Ensure changelog is schema-valid and populated
node scripts/validation/validate-changelog.cjs CHANGELOG.md
# Expected: Exit code 0, valid JSON schema
node scripts/agents/includes/changelogUtils.cjs --unreleased CHANGELOG.md
# Expected: Find [Unreleased] section with entriesVerdict: PASS / FAIL
Goal: Verify version bump is semantic and unique
Check:
- Version format matches semver (X.Y.Z)
- No existing tag vX.Y.Z
- Bump is logical (not backwards, not too big)
- patch: X.Y.Z → X.Y.(Z+1)
- minor: X.Y.Z → X.(Y+1).0
- major: X.Y.Z → (X+1).0.0
- No version collision with other branches
Verdict: PASS / FAIL
Goal: Verify user can trigger release (maintainers team)
Call: scripts/workflows/release/trigger-telemetry.cjs
Expected: Output trigger-telemetry.json with is_authorized: true
Verdict: PASS / FAIL
Goal: Apply GitHub's safe-outputs validation
Check:
- No suspicious patterns in agentic output
- No command injection attempts
- No secret/credential leaks
- Version number is valid
Verdict: PASS / FAIL
Goal: Apply tiered approval based on release scope
PATCH:
if agentic_score >= 0.8 AND all_gates_pass:
approval = AUTO_APPROVE
else:
approval = REJECTED
MINOR:
Create PR #N (release/vX.Y.Z → develop)
Wait for: human review comment "approved"
Then: proceed to next step
If: no approval after 1 hour, abort
MAJOR:
Create PR #N (release/vX.Y.Z → develop)
Wait for: 2+ maintainer approvals
Then: proceed to next step
If: insufficient approvals, abort
Goal: Execute actual release operations (mutations)
# Step 8a: Trigger telemetry + authorization
node scripts/workflows/release/trigger-telemetry.cjs
# Step 8b: Run release agent (bump version, update changelog)
node scripts/workflows/release/run-release-agent.cjs
INPUT_SCOPE={scope}
INPUT_PROVIDER=shell
INPUT_VERSION={release_version}
INPUT_DRY_RUN={dry_run}
# Step 8c: Create main release PR
node scripts/workflows/release/create-main-release-pr.cjs
INPUT_VERSION={release_version}
INPUT_RELEASE_BRANCH={release_branch}
# Step 8d: Publish GitHub Release
node scripts/workflows/release/create-github-release.cjs
INPUT_VERSION={release_version}
INPUT_NOTES_FROM={notes_from}Mutations Made:
- Git commits (version bump, changelog)
- Git tags (vX.Y.Z)
- GitHub PRs (#N, #N+1)
- GitHub Release (published with notes)
Goal: Verify mutations were successful
Check:
- Tag vX.Y.Z exists and points to correct commit
- GitHub Release published
- PRs created (#N, #N+1) and opened
- Changelog rolled (Unreleased → vX.Y.Z)
- Version file updated correctly
Verdict: SUCCESS / ROLLBACK_NEEDED
Goal: Summarize outcome and log decisions
Output:
- ✅ Release vX.Y.Z published successfully
- PR #N (develop): [link]
- PR #N+1 (main): [link]
- GitHub Release: [link]
- Agentic Score: {confidence}
- Audit Log: [link]
If dry-run:
- release-dry-run-plan.md (artifacts only, no mutations)
→ Agentic detects schema error
→ Message: "❌ CHANGELOG.md schema error at line X: [detail]"
→ Suggestion: "Run: npm run validate:changelog"
→ Fallback: User runs manually
→ Outcome: ABORT, retry after fix
→ Agentic reasoning yields low confidence
→ Message: "⚠️ I'm uncertain about this release. Confidence: 0.65"
→ Concerns: [list issues]
→ Suggestion: "Address concerns or use --force-proceed (manual)"
→ Outcome: ABORT, wait for retry or manual command
→ Agentic API fails (timeout, rate limit, etc.)
→ Message: "⚠️ AI service unavailable. Using deterministic fallback."
→ Fallback: Skip agentic reasoning, use shell scripts
→ Outcome: Release proceeds without AI reasoning
→ Git reports tag v1.2.3 already present
→ Message: "❌ Tag v1.2.3 already exists"
→ Suggestion: "Delete old tag: git tag -d v1.2.3"
→ Fallback: User deletes tag, retries
→ Outcome: ABORT, wait for tag cleanup
Command:
gh agentic release --scope=patch --dry-runBehavior:
- All gates executed normally
- Agentic reasoning runs
- No commits/tags/PRs created
- Output artifacts generated:
- release-dry-run-plan.md (step-by-step)
- release-notes-preview.md (compiled notes)
- version-bump-preview.txt (old → new)
- changelog-rolled.md (how it would look)
User Can Then:
- Review artifacts
- Make adjustments
- Run again without --dry-run
If agentic workflow fails at any point, shell scripts remain operational:
# Manual shell-based release (Phase 4, always works)
npm run release -- --scope=patch --dry-run
npm run release -- --scope=patch- ✅ Calls all existing shell scripts unchanged
- ✅ Preserves all Phase 4 logic
- ✅ Uses existing VERSION and CHANGELOG.md handling
- 🔄 Can call agents/release/ (optional, for future)
- 🔄 Shares changelog utilities with agents/changelog-agent/
- 🔄 Agentic orchestrates, portable agents execute (future)
- 🔄 Agentic workflow template can be adapted for plugins/themes
- 🔄 Same safety gates apply
- 🔄 Portable agents provide WordPress-specific logic
All agentic decisions logged to:
.github/reports/agentic-releases/
├── 2026-08-11_release-v1.2.3_patch.json (structured log)
├── 2026-08-11_agentic-score.txt (confidence: 0.92)
└── 2026-08-11_decisions.md (human-readable summary)
Logged:
- ✅ Workflow triggered (user, timestamp)
- ✅ Agentic score and reasoning
- ✅ Gate results (all 7)
- ✅ Approvals (who, when)
- ✅ Mutations (commits, tags, PRs, releases)
- ✅ Outcome (success/failure)
Redacted:
- ❌ Full agentic prompts
- ❌ API keys or tokens
- ❌ User email or personal data
- ❌ Commit messages with secrets
gh agentic release --scope=patch --dry-run
# Expected: Artifacts generated, no mutations# Break changelog, test validation
# Break version file, test parsing
# Test authorization with non-maintainer
# Test all error pathsgh agentic release --scope=patch
# Expected: Full release vX.Y.Z published# Test with portable agents (Phase 5)
# Test with WordPress (Phase 6, future)
# Test multi-engine fallback- 🔜 Interactive Copilot chat:
@release-agent patch - 🔜 Auto-suggestions for changelog improvements
- 🔜 Multi-engine support (Claude, OpenAI, Gemini)
- 🔜 Metrics + analytics on release patterns
- 🔜 Integration with GitHub Projects for tracking
- 🔜 Slack notifications on release events
This release agent integrates with the LightSpeed changelog ecosystem:
- Changelog Spec Agent:
agents/changelog-agent/changelog.agent.md— Primary agent specification for changelog management - Changelog Portable Agent:
agents/changelog-agent/README.md— Multi-file implementation with Keep a Changelog 1.1.0 support - Changelog Schema:
schemas/changelog.schema.json— JSON schema validation for Keep a Changelog 1.1.0 compliance - Changelog Workflow:
.github/workflows/changelog-management.yml— GitHub Actions workflow for automated changelog processing - Changelog Documentation:
docs/CHANGELOG_AUTOMATION.md— Complete guide to changelog automation and contributor workflow
The release agent uses these components to:
- Validate changelog structure before release
- Convert [Unreleased] section to release version
- Ensure changelog entries meet Keep a Changelog 1.1.0 standard
- Apply two-gate validation (PR validation + release validation)
- AGENTIC_WORKFLOW_SPEC.md — Design decisions
- RELEASE_PROCESS.md — Phase 4 (shell scripts)
- GitHub Agentic Workflows Docs — Official reference
Markdown Workflow v1.0 — Phase 5A Skeleton
To be implemented during Phase 5A (Aug 12-16, 2026)
Built by 🧱 LightSpeedWP with ☕, 🚀, and agentic workflows!