Skip to content

fix(cli): vendor scaffold-response types, unblock 0.10.0 publish #95

fix(cli): vendor scaffold-response types, unblock 0.10.0 publish

fix(cli): vendor scaffold-response types, unblock 0.10.0 publish #95

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@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.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: npx charter validate --ci --format text
continue-on-error: true
- name: Drift Scan
run: npx charter drift --ci --format text
if: hashFiles('.charter/patterns/*.json') != ''
- name: ADF Wiring & Pointer Integrity
run: npx charter doctor --adf-only --ci --format text
if: hashFiles('.ai/manifest.adf') != ''
continue-on-error: true
- name: ADF Evidence
run: npx charter adf evidence --auto-measure --ci --format text
if: hashFiles('.ai/manifest.adf') != ''
continue-on-error: true
- name: Audit Report
run: npx charter 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@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.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@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: governance-scorecard
path: governance/scorecard.json