Skip to content

docs(ci): add VERSIONING.md documenting unified workspace versioning invariant #209

docs(ci): add VERSIONING.md documenting unified workspace versioning invariant

docs(ci): add VERSIONING.md documenting unified workspace versioning invariant #209

Workflow file for this run

# Charter Governance
#
# Consolidated governance workflow for the Charter repo.
# Replaces the former charter-governance.yml, governance.yml, and
# governance-scorecard.yml to cut redundant CI runs.
#
# For consumer repos, `charter setup --ci github` generates
# .github/workflows/charter-governance.yml (a lighter single-job variant).
name: Governance
on:
pull_request:
branches: [main, master]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pull-requests: write
jobs:
governance:
name: Charter Governance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Validate Commits
run: node packages/cli/dist/bin.js validate --ci --format text
continue-on-error: true
- name: Drift Scan
run: node packages/cli/dist/bin.js drift --ci --format text
if: hashFiles('.charter/patterns/*.json') != ''
- name: ADF Wiring & Pointer Integrity
run: node packages/cli/dist/bin.js doctor --adf-only --ci --format text
if: hashFiles('.ai/manifest.adf') != ''
continue-on-error: true
- name: ADF Evidence
run: node packages/cli/dist/bin.js adf evidence --auto-measure --ci --format text
if: hashFiles('.ai/manifest.adf') != ''
continue-on-error: true
- name: Audit Report
run: node packages/cli/dist/bin.js audit --format json > /tmp/audit.json || true
if: always()
- name: Post Summary
if: always()
run: |
echo "## Charter Governance Report" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ -f /tmp/audit.json ]; then
SCORE=$(cat /tmp/audit.json | jq -r '.score.overall')
echo "**Governance Score:** ${SCORE}/100" >> $GITHUB_STEP_SUMMARY
fi
scorecard:
name: Governance Scorecard
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Generate Charter JSON outputs
shell: bash
run: |
mkdir -p governance
node packages/cli/dist/bin.js validate --ci --format json > governance/validate.json || true
node packages/cli/dist/bin.js drift --ci --format json > governance/drift.json || true
node packages/cli/dist/bin.js adf evidence --auto-measure --ci --format json > governance/evidence.json || true
- name: Build governance scorecard
run: node scripts/generate-scorecard.mjs --repo charter --source https://github.com/Stackbilt-dev/charter
- name: Validate governance scorecard shape
run: node scripts/validate-scorecard.mjs --file governance/scorecard.json
- name: Upload scorecard artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: governance-scorecard
path: governance/scorecard.json