6.9 KiB
Agent Integration Guide
This guide is for agentic coding partners that need to integrate the composite actions published by this repository.
Source Of Truth
Pin all action references to a released tag (for example @v1.0.2) and keep all vociferate references on the same tag in a workflow.
Published composite actions:
git.hrafn.xyz/aether/vociferate@v1.0.2(root action)git.hrafn.xyz/aether/vociferate/prepare@v1.0.2git.hrafn.xyz/aether/vociferate/publish@v1.0.2git.hrafn.xyz/aether/vociferate/coverage-badge@v1.0.2git.hrafn.xyz/aether/vociferate/decorate-pr@v1.0.2
Action Selection Matrix
Use this when deciding which action to call:
- Choose
preparewhen you need to update changelog/version files, commit, and push a release tag. - Choose
publishwhen a tag already exists and you need to create or update release notes/assets. - Choose
coverage-badgeafter tests have producedcoverage.outand you need coverage artefacts uploaded. - Choose
decorate-prto annotate pull requests with coverage information and unreleased changelog entries. - Choose root
vociferatefor direct recommend/prepare logic without commit/tag/push behavior.
Preconditions
Apply these checks before invoking actions:
- Checkout repository first.
- For prepare/publish flows that depend on tags/history, use full history checkout (
fetch-depth: 0). - Use valid credentials for release/comment API calls. On GitHub,
secrets.GITHUB_TOKENis used; on self-hosted Gitea, setsecrets.GITEA_TOKEN. do-releaseanddecorate-prnow run preflight API checks and fail fast when token credentials are missing or insufficient.- Set required vars/secrets for coverage uploads:
vars.ARTEFACT_BUCKET_NAMEvars.ARTEFACT_BUCKET_ENDPONTsecrets.ARTEFACT_BUCKET_WRITE_ACCESS_KEYsecrets.ARTEFACT_BUCKET_WRITE_ACCESS_SECRET
- For externally visible changelog links, set
vars.VOCIFERATE_REPOSITORY_URLto the server/base URL only.
Changelog Format Guidance
Agents should keep CHANGELOG.md in a Keep a Changelog compatible structure because vociferate derives versions and release notes from headings.
Required conventions:
- Keep the top-level heading as
# Changelog. - Maintain an
## [Unreleased]section. - Keep the standard subsections under
Unreleasedin this order:### Breaking### Added### Changed### Removed### Fixed
- Record releases with headings like
## [1.2.3] - YYYY-MM-DD. - Use bullet entries under subsections (for example
- Added new publish output). - Preserve or regenerate bottom reference links (
[Unreleased]: ...,[1.2.3]: ...) instead of mixing inline heading links.
Semver behavior used by recommendation logic:
BreakingorRemovedentries trigger a major bump.Addedentries trigger a minor bump.- Otherwise recommendation falls back to a patch bump.
Minimal template:
# Changelog
## [Unreleased]
### Breaking
### Added
### Changed
### Removed
### Fixed
Minimal Integration Patterns
1. Prepare Then Publish
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: prepare
uses: git.hrafn.xyz/aether/vociferate/prepare@v1.0.2
publish:
needs: prepare
uses: aether/vociferate/.gitea/workflows/do-release.yml@v1.0.2
with:
tag: ${{ needs.prepare.outputs.version }}
secrets: inherit
2. Publish Existing Tag
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: publish
uses: git.hrafn.xyz/aether/vociferate/publish@v1.0.2
with:
version: v1.2.3
3. Coverage Badge Publication
jobs:
coverage:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ARTEFACT_BUCKET_WRITE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTEFACT_BUCKET_WRITE_ACCESS_SECRET }}
AWS_DEFAULT_REGION: ${{ vars.ARTEFACT_BUCKET_REGION }}
AWS_EC2_METADATA_DISABLED: true
steps:
- uses: actions/checkout@v4
- name: Run tests with coverage
run: go test -covermode=atomic -coverprofile=coverage.out ./...
- id: badge
uses: git.hrafn.xyz/aether/vociferate/coverage-badge@v1.0.2
with:
artefact-bucket-name: ${{ vars.ARTEFACT_BUCKET_NAME }}
artefact-bucket-endpoint: ${{ vars.ARTEFACT_BUCKET_ENDPONT }}
4. Decorate Pull Request With Coverage and Changes
jobs:
coverage:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ARTEFACT_BUCKET_WRITE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTEFACT_BUCKET_WRITE_ACCESS_SECRET }}
AWS_DEFAULT_REGION: ${{ vars.ARTEFACT_BUCKET_REGION }}
AWS_EC2_METADATA_DISABLED: true
steps:
- uses: actions/checkout@v4
- name: Run tests with coverage
run: go test -covermode=atomic -coverprofile=coverage.out ./...
- id: badge
uses: git.hrafn.xyz/aether/vociferate/coverage-badge@v1.0.2
with:
artefact-bucket-name: ${{ vars.ARTEFACT_BUCKET_NAME }}
artefact-bucket-endpoint: ${{ vars.ARTEFACT_BUCKET_ENDPONT }}
- name: Decorate PR
uses: git.hrafn.xyz/aether/vociferate/decorate-pr@v1.0.2
with:
coverage-percentage: ${{ steps.badge.outputs.total }}
badge-url: ${{ steps.badge.outputs.badge-url }}
Inputs And Outputs Cheatsheet
prepare
Common inputs:
version(optional override)version-file(optional)version-pattern(optional)changelog(optional)
Primary output:
version(resolved tag, for examplev1.2.3)
publish
Common inputs:
token(optional, defaults to workflow token)version(optional if running from tag ref)changelog(optional)
Primary outputs:
release-idtagversion
coverage-badge
Required inputs:
artefact-bucket-nameartefact-bucket-endpoint
Useful optional inputs:
coverage-profile(defaultcoverage.out)summary-file(append markdown summary)
Primary outputs:
totalreport-urlbadge-url
decorate-pr
Required inputs:
coverage-percentage(0-100, typically from coverage-badge action)badge-url(SVG badge URL, typically from coverage-badge action)
Useful optional inputs:
changelog(defaultCHANGELOG.md)comment-title(defaultVociferate Review)token(defaults to workflow token)
Primary outputs:
comment-idcomment-url
Guardrails For Agents
Use these rules to avoid common automation mistakes:
- Do not mix action tags in one workflow update.
- Do not assume a release workflow will run from a tag push in all environments; reusable workflow call paths are supported.
- Do not treat
VOCIFERATE_REPOSITORY_URLas a full repository URL; it must be a base URL. - Do not bypass preflight failures with broad retry loops; fix token scope/secret wiring first.