This document describes the GitHub-side workflow that sits on top of Quantex's repo-native project memory system.
GitHub is not the source of truth for long-lived project knowledge. It is the collaboration surface that helps route discussion into durable repo artifacts.
Use GitHub for:
- open-ended discussion
- issue intake
- pull-request review
- merge gating
Use the repository for:
- specs
- ADRs
- runbooks
- session summaries
- archived OpenSpec change history
- Start exploratory conversations in GitHub Discussions.
- Summarize the conclusion in
docs/sessions/if the discussion materially changes direction. - Open or update a GitHub issue for the actionable work.
- Create or update:
openspec/changes/for non-trivial behavior or durable-process changesdocs/adr/for durable decisions
- Create a dedicated branch or worktree-backed branch and open a PR.
- Merge only after CI, PR governance, and documentation updates are in place.
- Update any affected runbooks, specs, or ADRs; if an OpenSpec change lands, merge its delta into
openspec/specs/and archive or close the change. - Treat "implementation merged" and "OpenSpec archived" as separate closure steps; a non-trivial change is not fully done until a Superpowers/Quantex-runtime archive follow-up reaches PR or merge delivery.
Use explicit closure language when handing work between agents, reviewers, and automation:
- local implementation: files changed and local validation passed
- repository delivery: changes committed and the working tree is clean
- PR delivery: branch pushed and PR opened with linked artifacts and validation status
- merge delivery: PR merged into
mainor another protected target branch - OpenSpec archive closure: accepted spec deltas synced and completed changes archived
- release closure: release workflow completed when commit metadata warrants a release
Agents should not summarize a task as simply "done" when the current state is only local implementation or PR delivery. If the next step belongs to CI, reviewer approval, release automation, or agent-driven OpenSpec archive closure, name that owner explicitly.
PR descriptions are part of the delivery contract, not a best-effort summary. Before creating or editing a PR body, agents should:
- Prepare a body file based on
.github/pull_request_template.md. - Run
bun run pr:body:check -- --body-file <body-file> --title "<title>". - Use
gh pr create --body-file <body-file>orgh pr edit --body-file <body-file>.
Do not hand-write inline gh pr create --body "$(cat <<EOF ...)" payloads. Also do not add a repo-local pr:create wrapper only to sequence these steps; keep PR creation on the native GitHub CLI and keep repository code focused on shared validation.
For implementation that is expected to create commits or a PR, Quantex defaults to a dedicated git worktree rather than switching the user's active workspace in place.
Worktrees are required when:
- the current workspace already has local changes
- more than one change may be active in parallel
- the user wants their IDE to stay on its current branch or context
- the change may touch
main,beta, or automation-managed release branches during verification
Working directly in the current workspace is reserved for:
- read-only inspection
- short-lived commands that do not create commits
- explicit in-place edits requested by the user
Preferred naming:
- branch:
<agent>/<issue-or-change-slug> - worktree path:
../<repo-name>-<issue-or-change-slug>
Clean up merged or abandoned worktrees with git worktree remove <path> and git worktree prune after confirming no unmerged commits remain.
Quantex uses release-please to keep publishing compatible with protected main and source-visible versions.
- Merge one or more normal change PRs to
main. - The merge-gating
CIworkflow runs on the resultingmainpush. Product-impacting changes keep the normal cross-platform test matrix; process-only changes may skip the expensive platform jobs while still publishing the same required check contexts. - After successful push-side
mainCI, theReleaseworkflow reconciles branch release state from successful CI history, current branch history, and existing tags. - If a successful merged
chore: release ...commit is still untagged, the workflow publishes that commit first. Otherwise, if the merged commits warrant a version bump, release-please creates or updates a Release PR. - The Release PR updates
CHANGELOG.md,package.json,.release-please-manifest.json, andsrc/generated/build-meta.ts. Release PR Automergevalidates the generated Release PR and enables auto-merge.- After the Release PR merge produces another successful
mainCI run, theReleaseworkflow creates the tag and GitHub Release, then builds artifacts, publishes npm through trusted publishing, and uploads binaries.
This keeps normal product changes behind PR review while making the release version visible in the source tree at the tagged commit.
Release notes are tracked in CHANGELOG.md, summarized in docs/releases.md, and published on GitHub Releases.
The npm publish step uses GitHub Actions trusted publishing with OIDC rather than a long-lived NPM_TOKEN, so npm trusted publisher settings should point at .github/workflows/release.yml.
For full unattended publishing, configure the release GitHub App secrets RELEASE_APP_CLIENT_ID and RELEASE_APP_PRIVATE_KEY. The workflows use actions/create-github-app-token to mint short-lived installation tokens for Release PR creation, Release PR auto-merge, GitHub Release creation, and artifact upload.
Avoid using GITHUB_TOKEN as the normal release identity because GitHub suppresses many workflow events created by GITHUB_TOKEN, which can leave generated Release PR checks in action_required.
Release PR creation relies on merged commit metadata. In practice that means:
feat:commits produce a minor releasefix:andperf:commits produce a patch releaseBREAKING CHANGE:or!produces a major releasedocs:,test:,ci:, andchore:do not create a release unless the commit metadata is explicitly changed to do so later
For PRs that only touch workflow, documentation, project-memory, or release-please configuration files, use ci:, chore:, or docs: titles. PR Governance blocks release-worthy metadata for those scopes so release-process changes do not accidentally create stable product Release PRs.
Protected-branch release automation now keys off successful push-side CI completion rather than racing the raw push event. A failed main or beta CI run therefore blocks automated Release PR creation and publication until the branch is green again.
The stable release-please config may include a temporary last-release-sha anchor after release-governance incidents. Treat it as a recovery boundary, not a permanent release policy; remove or advance it after the next intentional stable release lands.
The repository now includes:
- issue forms in
.github/ISSUE_TEMPLATE/ - a PR template in
.github/pull_request_template.md - a PR body validation workflow in
.github/workflows/pr-governance.yml - discussion forms in
.github/DISCUSSION_TEMPLATE/
Some GitHub features are controlled in the repository settings UI and cannot be fully created from versioned files alone.
Enable GitHub Discussions for the repository. GitHub supports structured discussion forms via /.github/DISCUSSION_TEMPLATE/, but those forms only apply once Discussions is enabled and matching categories exist.
Suggested categories and slugs:
Ideaswith slugideasDecisionswith slugdecisionsWorkflowwith slugworkflow
The filenames in .github/DISCUSSION_TEMPLATE/ already assume those slugs.
Configure branch protection or rulesets so that main requires:
- the main CI workflow
- the
sandbox-testscheck context for lifecycle-sensitive pull requests - the
PR Governanceworkflow
Create the labels referenced by the forms, or adjust the forms to match your preferred label set.
Suggested labels:
kind:featurekind:bugkind:docssource:discussion
Milestones are optional. If you use them, prefer milestone names that represent product arcs or epics rather than implementation details.
Examples:
dual-mode-surfaceself-upgrade-hardeningagent-update-unification
For non-trivial behavior or durable-process changes, use Superpowers plus the central Quantex runtime skill rather than ad hoc planning files or copied per-agent workflow prompts:
skills/quantex-agent-runtime/SKILL.md: Quantex-specific session startup, intake, validation, artifact routing, and closure- Superpowers skills: brainstorming, worktrees, planning, review, verification, and finishing branch behavior
- OpenSpec CLI: proposal, design, spec, task, status, instructions, validation, and archive state transitions
- Quantex Task Start: copy-paste start prompt for fresh agent conversations when a native slash or skill launcher is unavailable
On protected branches, archive closure is an explicit agent-driven follow-up. A fresh agent session should be able to resume from Superpowers + skills/quantex-agent-runtime/SKILL.md, inspect active OpenSpec changes, archive completed work, validate, and deliver the archive PR.
Agents should use openspec status --change <id> --json and openspec instructions <artifact> --change <id> --json when they need to determine the next artifact or implementation step.
Before final handoff, agents should also check git status, whether the branch has been pushed, whether a PR exists, whether the OpenSpec change is still active by design, and whether archive or release closure is pending.
Do not let a merged PR depend only on a GitHub discussion for its rationale.
Promote discussion outcomes like this:
- decision that lasts beyond the current change -> ADR
- non-trivial behavior change -> OpenSpec
- future executable work -> GitHub issue; use OpenSpec too when it changes behavior or durable process
- reusable debugging or recovery knowledge -> runbook
- session-specific context -> session summary