deckhearth/.github/workflows/ci.yml
Randall Stillwell 1944b1ed48 bootstrap: agent pipeline v0.5.0 + ship-readiness review
Installs the three-layer agent-pipeline scaffold (https://github.com/varutasu/agent-pipeline @ v0.5.0):

L1 — Context (curated brain)
- AGENTS.md: orientation, conventions, 8 explicit gotchas
- .cursor/rules/: no-go-zones, api-routes, auth-and-permissions,
  db-and-schema, ui-and-theming, schema-map
- .cursor/skills/: add-api-route, add-page recipes
- docs/agent-context/README.md: layer explainer
- docs/SCHEMA_MAP.md: hand-curated Neon Postgres reference
  (replaces Prisma schema map since stack is raw SQL)

L2 — Subagent roles (copied verbatim from upstream templates)
- 9 .cursor/agents/role-*.md files: Conductor, IA-Architect,
  UX-Reviewer, Architect, Implementer, Reviewer,
  Design-System-Auditor, A11y-Auditor, Doc-Writer

L3 — Pipeline scaffolding (Vercel variant)
- CI: lint + schema-map-drift only (no duplicate build —
  Vercel handles it). Test job commented out until vitest lands.
- preview-smoke + visual-diff via wait-for-vercel-preview
- pr-health-rollup sticky comment aggregator
- agent-context-drift weekly cron
- PULL_REQUEST_TEMPLATE, CODEOWNERS (auth/admin paths tagged)
- .convoys/ folder + seed ship-readiness.md review
- lib/flags/index.js (JS — converted from TS template)
- scripts/wt.sh (Cursor 3.2 deprecation stub),
  scripts/log-convoy-event.sh
- tests/smoke/app.smoke.spec.ts (Playwright skeleton)

Manifest
- .agent-context-manifest.yml: tracks 31 artifacts by sha256
  for future sync-agent-context drift detection

Review
- .convoys/ship-readiness.md: 16 findings (7 P0 ship-blockers,
  5 P1 quality-bar, 4 P2 refactor, P3 UX/IA/a11y/docs) with
  proposed 13-convoy launch sequence.

No production code changed in this commit. All findings in
the ship-readiness review will be addressed in follow-up convoys
starting with fix-auth-bypass.

Structural brain: user-code-review-graph MCP has indexed the
codebase (122 files, 628 nodes, 5602 edges, 11 communities,
84 flows). Per-developer; not committed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 02:31:26 -05:00

91 lines
3.1 KiB
YAML

name: CI
# Vercel variant: Vercel builds Preview deployments on every push and gates the
# PR via the Vercel GitHub integration check. Running `npm run build` here too
# would duplicate Vercel's work for ~3-5 minutes per PR with no added signal.
#
# What this CI covers (and Vercel does not):
# - Lint (cheap belt-and-suspenders)
# - Schema-map drift check (docs/SCHEMA_MAP.md updated when scripts/add-*.js changes)
#
# NOTE: tcg-vault has no test runner installed yet. Re-enable the `test:` job
# below once vitest (or equivalent) is adopted AND a `test:run` script exists
# in package.json. See .convoys/ for the testing convoy.
#
# NOTE: tcg-vault is JavaScript (not TypeScript). No `npx tsc --noEmit` step.
# Re-enable a type-check job if migrating to TypeScript.
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: '20'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci
- run: npm run lint --if-present
schema-map-fresh:
name: Schema map up to date
runs-on: ubuntu-latest
# Only run when migration scripts or the schema map itself changed.
# If neither changed, nothing to verify.
if: |
contains(github.event.pull_request.changed_files, 'scripts/add-') ||
contains(github.event.pull_request.changed_files, 'scripts/fix-') ||
contains(github.event.pull_request.changed_files, 'scripts/setup-neon-db.js') ||
contains(github.event.pull_request.changed_files, 'docs/SCHEMA_MAP.md')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Verify schema map updated alongside migration scripts
run: |
MIGRATION_CHANGED=false
MAP_CHANGED=false
if git diff --name-only HEAD~1 | grep -qE '^scripts/(add-|fix-|setup-neon-db\.js)'; then
MIGRATION_CHANGED=true
fi
if git diff --name-only HEAD~1 | grep -q '^docs/SCHEMA_MAP\.md$'; then
MAP_CHANGED=true
fi
if [ "$MIGRATION_CHANGED" = "true" ] && [ "$MAP_CHANGED" = "false" ]; then
echo "::error::A migration script changed but docs/SCHEMA_MAP.md was not updated."
echo "Update docs/SCHEMA_MAP.md to reflect the schema change, then re-push."
exit 1
fi
echo "OK: schema map and migration scripts are in sync."
# test:
# Disabled until a test runner is adopted. Re-enable as:
#
# test:
# name: Unit + integration tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ env.NODE_VERSION }}
# cache: npm
# - run: npm ci
# - run: npm run test:run
# env:
# JWT_SECRET: ci-secret-only-for-tests
# POSTGRES_URL: postgres://ci:ci@localhost:5432/ci