Release

Release creation, validation, and automation.

Last Updated: 2026-02-15

Level 0: Stakeholder Needs (WHY)

Need: Create ubFlow Release NEED_REL_CREATE

As a ubFlow maintainer, I want to create official releases with version numbers, so that users can install stable, tested versions of ubFlow.

Acceptance Scenarios:

  1. Given I’m ready to release, When I follow the release process, Then a versioned release is created

  2. Given release is created, When users check for updates, Then they can see the new version

  3. Given version is released, When I check Git, Then I see a version tag

  4. Given release artifacts exist, When users download, Then they get complete ubFlow installation

Need: Validate Release Quality NEED_REL_VALIDATE
status: implemented
tags: release, quality, testing
priority: mandatory

As a ubFlow maintainer, I want to validate release quality before distribution, so that users receive stable, working releases.

Acceptance Scenarios:

  1. Given I prepare a release, When I run validation, Then all agents are tested

  2. Given validation passes, When I check docs, Then self-documentation builds successfully

  3. Given validation fails, When I review, Then I see which tests failed

  4. Given all checks pass, When I approve, Then release is ready for distribution

Need: Release Agent Template NEED_REL_AGENT_TEMPLATE
status: implemented
tags: release, agent, template
priority: medium
links incoming: REQ_REL_PROCESS_DOC

As a ubFlow user, I want to see how a release agent could work, so that I can create my own release automation for my projects.

Acceptance Scenarios:

  1. Given I read release documentation, When I see the release agent concept, Then I understand how it could automate releases

  2. Given I want my own release process, When I check ubFlow, Then I can use it as a template

  3. Given installation/update agent handles modified agents, When I create custom release agent, Then update process respects my changes

Level 1: Requirements (WHAT)

Release Requirements

This document contains requirements for the ubFlow release process.

Document Version: 0.1 Last Updated: 2026-01-30

Software Requirement: Semantic Versioning REQ_REL_SEMVER
status: implemented
tags: release, versioning
priority: mandatory

Description: ubFlow SHALL use Semantic Versioning (MAJOR.MINOR.PATCH) for all releases.

Rationale: Semantic Versioning communicates compatibility and scope of changes clearly to users. GitHub Releases convention uses SemVer.

Acceptance Criteria:

  • AC-1: Version numbers follow MAJOR.MINOR.PATCH format

  • AC-2: MAJOR increments indicate breaking changes

  • AC-3: MINOR increments indicate new features (backward compatible)

  • AC-4: PATCH increments indicate bug fixes

  • AC-5: Pre-release versions use suffixes (-beta, -alpha, -rc.1)

  • AC-6: Version is stored in version.json

Software Requirement: GitHub Release Publication REQ_REL_GITHUB_PUBLISH
status: implemented
tags: release, distribution, github
priority: mandatory

Description: ubFlow SHALL publish releases via GitHub Releases.

Rationale: GitHub Releases provides versioned distribution, release notes, and asset downloads in a standard platform.

Acceptance Criteria:

  • AC-1: Each release creates a Git tag with version number

  • AC-2: Release includes release notes describing changes

  • AC-3: GitHub automatically creates .zip and .tar.gz archives

  • AC-4: Users can view release history on GitHub

  • AC-5: Latest release is clearly marked

Software Requirement: Release Notes Generation REQ_REL_NOTES
status: approved
tags: release, documentation
priority: mandatory
links outgoing: NEED_REL_CREATE

Description: ubFlow SHALL generate release notes for each version.

Rationale: Release notes communicate what changed to users and help them decide whether to update.

Acceptance Criteria:

  • AC-1: Release notes list new features

  • AC-2: Release notes list bug fixes

  • AC-3: Release notes list breaking changes

  • AC-4: Release notes reference Stakeholder Needs/Requirements where applicable

  • AC-5: Release notes include migration guidance for breaking changes

  • AC-6: Release notes stored in docs/releasenotes.md

Software Requirement: Pre-Release Validation REQ_REL_VALIDATION
status: implemented
tags: release, quality, validation
priority: mandatory

Description: ubFlow SHALL validate releases before publication.

Rationale: Pre-release validation prevents distributing broken releases and maintains user trust.

Acceptance Criteria:

  • AC-1: All validation checks must pass before release

  • AC-2: Validation failure blocks release publication

  • AC-3: Validation report shows which checks failed

  • AC-4: Maintainer can review validation results before approving

Software Requirement: Documentation Build Verification REQ_REL_DOC_BUILD
status: implemented
tags: release, validation, documentation
priority: mandatory

Description: ubFlow SHALL verify documentation builds successfully before release.

Rationale: Broken documentation prevents users from understanding and using the system correctly.

Acceptance Criteria:

  • AC-1: Sphinx build completes without errors

  • AC-2: All sphinx-needs links are valid

  • AC-3: No orphaned requirements or design elements

  • AC-4: Documentation is published to GitHub Pages

Software Requirement: Agent Functionality Testing REQ_REL_AGENT_TEST
status: implemented
tags: release, validation, agents
priority: mandatory

Description: ubFlow SHALL verify agent functionality before release.

Rationale: Agents are the primary user interface for ubFlow. Non-functional agents render the system unusable.

Acceptance Criteria:

  • AC-1: All agent definition files parse correctly

  • AC-2: Agent prompts contain no syntax errors

  • AC-3: Critical agent workflows are tested (setup, change, implement)

  • AC-4: Agent dependencies (scripts, templates) are verified

Software Requirement: GitHub Actions Automation REQ_REL_GITHUB_ACTIONS
status: implemented
tags: release, automation, ci-cd
priority: high

Description: ubFlow SHOULD automate release validation and publication via GitHub Actions.

Rationale: Automation reduces human error, ensures consistency, and speeds up the release process.

Acceptance Criteria:

  • AC-1: GitHub Action validates releases on version tags

  • AC-2: GitHub Action builds documentation

  • AC-3: GitHub Action runs validation checks

  • AC-4: GitHub Action publishes to GitHub Releases on success

  • AC-5: GitHub Action publishes documentation to GitHub Pages

  • AC-6: GitHub Action can be triggered manually for testing

Software Requirement: Release Process Documentation REQ_REL_PROCESS_DOC
status: implemented
tags: release, documentation, template
priority: medium
links outgoing: NEED_REL_AGENT_TEMPLATE
links incoming: SPEC_REL_AGENT

Description: ubFlow SHALL document the release process as a template for users.

Rationale: Documenting ubFlow’s own release process provides a working example that users can adapt for their projects.

Acceptance Criteria:

  • AC-1: Release process documented in sphinx-needs format

  • AC-2: Documentation includes manual and automated approaches

  • AC-3: Documentation explains how to customize for user projects

  • AC-4: Release agent concept is documented (even if not fully automated)

Level 2: Design (HOW)

Release Design Specifications

This document contains design specifications for the ubFlow release process.

Document Version: 0.1 Last Updated: 2026-01-30

Software Detailed Design: Version Number Format SPEC_REL_VERSION_FORMAT
status: implemented
tags: release, versioning
links outgoing: REQ_REL_SEMVER

Design: ubFlow uses Semantic Versioning with structure stored in version.json.

Version Format:

  • Pattern: MAJOR.MINOR.PATCH[-prerelease]

  • MAJOR: Breaking changes (incompatible API/structure changes)

  • MINOR: New features (backward compatible)

  • PATCH: Bug fixes (backward compatible)

  • Pre-release suffixes: -alpha, -beta, -rc.N

version.json Structure:

{
    "version": "0.2.0",
    "installedAt": "2026-01-30",
    "ubFlowPath": "C:\\workspace\\ubFlow",
    "docsType": "sphinx"
}

Version Bump Rules:

  • Breaking: Stakeholder Needs/Requirements change behavior users depend on

  • Feature: New agents, new capabilities, enhanced workflows

  • Patch: Bug fixes, documentation updates, internal refactoring

Examples:

  • 0.1.00.2.0: New release agent added (feature)

  • 0.2.01.0.0: Change agent API changes (breaking)

  • 0.2.00.2.1: Bug fix in init script (patch)

Software Detailed Design: Git Tag Creation SPEC_REL_GIT_TAG
status: implemented
tags: release, git, tagging
links outgoing: REQ_REL_GITHUB_PUBLISH

Design: Releases are created via annotated Git tags that trigger GitHub Releases.

Tag Naming Convention:

  • Format: vMAJOR.MINOR.PATCH (e.g., v0.2.0)

  • Prefix v required by GitHub convention

  • Must match version in version.json

Tag Creation Process:

# 1. Update version.json with new version
# 2. Commit version.json change
git add version.json
git commit -m "chore: bump version to 0.2.0"

# 3. Create annotated tag
git tag -a v0.2.0 -m "Release v0.2.0: Description"

# 4. Push tag (triggers GitHub Actions if configured)
git push origin v0.2.0

Tag Content:

  • Annotated tag with release summary message

  • Points to commit where version.json was updated

  • Triggers GitHub Actions workflow (if configured)

Validation:

  • Tag version must match version.json

  • All tests must pass on tagged commit

  • Documentation must build successfully

Software Detailed Design: Release Notes Structure SPEC_REL_NOTES_STRUCTURE
status: implemented
tags: release, documentation
links outgoing: REQ_REL_NOTES

Design: Release notes follow structured markdown format with traceability.

Release Notes File:

  • Location: docs/releasenotes.md

  • Format: Markdown with newest releases at top

  • Generated from merged Change Documents

Release Notes Template:

# ubFlow Release Notes

## v0.2.0 - 2026-01-30

### Summary
[One paragraph describing the release, generated from Change Documents]

### ⚠️ Breaking Changes
- [List breaking changes with migration guidance]
- References: NEED_XXX, REQ_YYY

### ✨ New Features
- [Feature description] (NEED_XXX, REQ_YYY)
- [Feature description] (NEED_XXX, REQ_YYY)

### 🐛 Bug Fixes
- [Fix description] (REQ_YYY)
- [Fix description] (REQ_YYY)

### 📚 Documentation
- [Doc updates]

### 🔧 Internal Changes
- [Refactoring, cleanup]

---

## v0.1.0 - 2026-01-15
...

Generation Process:

  1. Release agent reads merged Change Documents

  2. Extracts summaries, decisions, impacted elements

  3. Generates release note entry

  4. Appends to docs/releasenotes.md

  5. Commits: “chore: add release notes for vX.Y.Z”

Traceability:

  • Each item references Stakeholder Need or Requirement ID

  • Breaking changes include migration guidance

  • Links back to Change Documents (preserved in Git history)

Software Detailed Design: Validation Checklist SPEC_REL_VALIDATION_CHECKLIST
status: implemented
tags: release, validation, quality

Design: Pre-release validation ensures release quality through manual checklist.

Validation Checklist:

Documentation:

  • [ ] version.json updated with new version

  • [ ] docs/releasenotes.md updated with release entry

  • [ ] All sphinx-needs links valid (sphinx-build succeeds)

  • [ ] No orphaned requirements or specs

  • [ ] Documentation builds without warnings

  • [ ] copilot-instructions.md up to date

Agents:

  • [ ] All agent files parse correctly (no syntax errors)

  • [ ] Agent prompts reference correct tools

  • [ ] Setup agent tested in clean environment

  • [ ] Change agent tested with sample request

Scripts:

  • [ ] init.ps1 / init.sh work on target platforms

  • [ ] ubCode MCP tools work correctly

  • [ ] Build scripts execute successfully

Git:

  • [ ] All changes committed

  • [ ] Working directory clean

  • [ ] Branch up to date with main

  • [ ] All Change Documents merged or archived

Validation Execution:

  • Manual checklist completed by maintainer before creating release tag

  • Release agent guides maintainer through checklist

  • Future: Automate via GitHub Actions (SPEC_REL_GITHUB_ACTIONS)

Manual Fallback Process:

If GitHub Actions fails or is unavailable:

  1. Run validation checklist manually

  2. Build docs locally: cd docs && sphinx-build -b html . _build/html

  3. Verify no errors or broken links

  4. Create Git tag manually (see SPEC_REL_GIT_TAG)

  5. Create GitHub Release manually with release notes from docs/releasenotes.md

Software Detailed Design: GitHub Actions Workflow SPEC_REL_GITHUB_ACTIONS
status: implemented
tags: release, automation, ci-cd, github-actions

Design: GitHub Actions automate validation, documentation build, and release publication.

Workflow File: .github/workflows/release.yml

Workflow Trigger:

  • On: Push tags matching v*.*.*

  • Manual: workflow_dispatch for testing

Workflow Steps:

  1. Checkout - Clone repository at tag

    - uses: actions/checkout@v4
    
  2. Setup Python - Install Python 3.11+

    - uses: actions/setup-python@v5
      with:
        python-version: '3.11'
    
  3. Install Dependencies - Install Sphinx and sphinx-needs

    - run: pip install -r docs/requirements.txt
    
  4. Validate version.json - Ensure tag matches version file

    - run: |
        VERSION=$(jq -r .version version.json)
        TAG=${GITHUB_REF#refs/tags/v}
        if [ "$VERSION" != "$TAG" ]; then
          echo "Version mismatch: version.json=$VERSION tag=$TAG"
          exit 1
        fi
    
  5. Build Documentation - Run sphinx-build

    - run: |
        cd docs
        sphinx-build -b html . _build/html
    
  6. Check Links - Verify all sphinx-needs links valid

    - run: |
        if grep -r "WARNING" docs/_build/html/needs.json; then
          echo "Sphinx warnings found"
          exit 1
        fi
    
  7. Deploy to GitHub Pages - Publish HTML to gh-pages branch

    - uses: peaceiris/actions-gh-pages@v3
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: ./docs/_build/html
    
  8. Create GitHub Release - Publish with release notes

    - uses: softprops/action-gh-release@v1
      with:
        body_path: docs/releasenotes.md
        draft: false
        prerelease: false
    

Environment Variables:

  • GITHUB_TOKEN: Automatic (provided by GitHub)

  • No secrets required for basic workflow

Failure Handling:

  • If any step fails, workflow stops

  • GitHub Release is not created

  • Maintainer investigates and re-tags after fix

  • Manual fallback available (see SPEC_REL_VALIDATION_CHECKLIST)

Software Detailed Design: GitHub Pages Publishing SPEC_REL_GITHUB_PAGES
status: implemented
tags: release, documentation, github-pages
links outgoing: REQ_REL_DOC_BUILD

Design: Documentation is automatically published to GitHub Pages on release.

GitHub Pages Configuration:

  • Source: gh-pages branch (created by Actions)

  • Path: / (root)

  • Custom domain: Optional (e.g., ubFlow.dev)

Build Process:

# Install dependencies
pip install -r docs/requirements.txt

# Build Sphinx documentation
cd docs
sphinx-build -b html . _build/html

# Deploy to gh-pages branch
# (handled by GitHub Actions peaceiris/actions-gh-pages)

Dependencies:

From docs/requirements.txt:

  • Python 3.11+

  • sphinx >= 7.0.0

  • sphinx-needs >= 2.0.0

  • furo >= 2024.0.0

  • myst-parser >= 2.0.0

  • graphviz >= 0.20.0 (optional, for diagrams)

URL Structure:

  • Format: https://<username>.github.io/<repo>/

  • Example: https://yourorg.github.io/ubFlow/

  • Latest documentation always reflects latest release

Update Frequency:

  • On every release tag push

  • Manual trigger available for testing

Initial Setup (one-time):

  1. Enable GitHub Pages in repository settings

  2. Select source: Deploy from a branch

  3. Select branch: gh-pages / / (root)

  4. Wait for first release to create gh-pages branch

Software Detailed Design: Release Agent & Automation SPEC_REL_AGENT
status: implemented
tags: release, automation, agent

Design: Release agent guides maintainer through release process interactively.

Agent Definition: .github/agents/ubFlow.release.agent.md

Agent Responsibilities:

  1. Preparation Phase:

    • List merged feature branches since last release

    • Identify Change Documents from merged branches

    • Ask maintainer: “What type of release? (major/minor/patch)”

  2. Release Notes Generation:

    • Read Change Documents

    • Extract summaries, new features, bug fixes, breaking changes

    • Generate release note entry for docs/releasenotes.md

    • Show preview to maintainer for approval

    • Commit: “chore: add release notes for vX.Y.Z”

  3. Version Update:

    • Calculate new version number based on release type

    • Update version.json

    • Commit: “chore: bump version to X.Y.Z”

  4. Validation Guidance:

    • Display validation checklist (SPEC_REL_VALIDATION_CHECKLIST)

    • Ask maintainer to confirm each item

    • Warn if any checks fail

  5. Tag Creation:

    • Generate Git tag command with proper format

    • Show command to maintainer for execution

    • Explain GitHub Actions will trigger after push

  6. Post-Release:

    • Archive/delete merged Change Documents

    • Commit: “chore: archive change documents for vX.Y.Z”

Interaction Model:

User: @ubFlow.release prepare v0.2.0

Agent: I found 3 merged Change Documents:
       - install-update.md
       - release-process.md
       - agent-improvements.md

       Based on these changes, I recommend a MINOR release (0.1.0 → 0.2.0).

       Shall I generate release notes?

User: Yes

Agent: [Generates release note entry]

       Preview:
       ## v0.2.0 - 2026-01-30
       ### Summary
       This release adds the installation/update workflow...

       ### New Features
       - Install/update mechanism (NEED_INST_NEW_PROJECT through NEED_INST_UPDATE)
       - Release process documentation (NEED_REL_CREATE through NEED_REL_AGENT_TEMPLATE)

       Approve and commit?

Implementation Options:

  • Option A: Full agent implementation (interactive, guides entire process)

  • Option B: Python script helper (automated, called by maintainer)

  • Option C: Manual process documentation (template for users)

Template for Users:

The release agent serves as a working example that users can adapt for their own projects, demonstrating:

  • How to read Change Documents programmatically

  • How to generate release notes from structured docs

  • How to integrate with Git and GitHub Actions

Release Workflow

Software Detailed Design: Release Workflow Orchestration SPEC_REL_WORKFLOW
status: implemented
tags: workflow, release, orchestration

Design: The release workflow bundles multiple merged changes into a versioned release.

Release Flow:

Merged Changes (on main)
    │
    ▼
┌─────────────────┐
│  1. Version      │ ──→ Update version.json, determine SemVer bump
└─────────────────┘
    │
    ▼
┌─────────────────┐
│  2. Validate     │ ──→ sphinx-build, agent tests, quality checks
└─────────────────┘
    │
    ▼ (all pass)
┌─────────────────┐
│  3. Publish      │ ──→ Git tag, GitHub Release, GitHub Pages
└─────────────────┘
    │
    ▼
┌─────────────────┐
│  change / end   │  (user decides)
└─────────────────┘

Scope: Unlike the change workflow (operates on one change), the release workflow operates across all changes since the last release.

Automation: GitHub Actions automates steps 2 and 3 (see SPEC_REL_GITHUB_ACTIONS). Step 1 (version determination) requires maintainer judgment.

Traceability

Stakeholder Needs

ID

Title

Status

Priority

NEED_REL_AGENT_TEMPLATE

Release Agent Template

implemented

medium

NEED_REL_CREATE

Create ubFlow Release

implemented

mandatory

NEED_REL_VALIDATE

Validate Release Quality

implemented

mandatory

Requirements

ID

Title

Status

Tags

REQ_REL_AGENT_TEST

Agent Functionality Testing

implemented

release; validation; agents

REQ_REL_DOC_BUILD

Documentation Build Verification

implemented

release; validation; documentation

REQ_REL_GITHUB_ACTIONS

GitHub Actions Automation

implemented

release; automation; ci-cd

REQ_REL_GITHUB_PUBLISH

GitHub Release Publication

implemented

release; distribution; github

REQ_REL_NOTES

Release Notes Generation

approved

release; documentation

REQ_REL_PROCESS_DOC

Release Process Documentation

implemented

release; documentation; template

REQ_REL_SEMVER

Semantic Versioning

implemented

release; versioning

REQ_REL_VALIDATION

Pre-Release Validation

implemented

release; quality; validation

Design Specifications

ID

Title

Status

Links

SPEC_REL_AGENT

Release Agent & Automation

implemented

SPEC_REL_GIT_TAG

Git Tag Creation

implemented

SPEC_REL_GITHUB_ACTIONS

GitHub Actions Workflow

implemented

SPEC_REL_GITHUB_PAGES

GitHub Pages Publishing

implemented

SPEC_REL_NOTES_STRUCTURE

Release Notes Structure

implemented

SPEC_REL_VALIDATION_CHECKLIST

Validation Checklist

implemented

SPEC_REL_VERSION_FORMAT

Version Number Format

implemented

SPEC_REL_WORKFLOW

Release Workflow Orchestration

implemented