promptward

Plan 006: Add a CI workflow that runs the full verification suite on every push

Executor instructions: Follow this plan step by step. Run every verification command and confirm the expected result before moving to the next step. If anything in the “STOP conditions” section occurs, stop and report — do not improvise. When done, update the status row for this plan in plans/README.md — unless a reviewer dispatched you and told you they maintain the index.

Drift check (run first): git diff --stat a6293e1..HEAD -- package.json scripts/ .github/ If .github/workflows/ already exists, STOP — someone added CI first; reconcile instead of overwriting.

Status

Why this matters

The repo has a complete one-command verification story — asset checksums, strict typecheck, a 41-test suite (including an end-to-end run of the vendored ONNX model), and a production build — but nothing runs any of it automatically. Every release since 0.1.0 shipped on whatever the developer remembered to run locally. A single GitHub Actions workflow closes that gap and becomes the verification gate every other plan in this directory cites.

Current state

Commands you will need

Purpose Command Expected on success
Local dry run npm ci && npm run build && npm test exit 0
YAML sanity npx yaml-lint .github/workflows/ci.yml — SKIP if the package is unavailable; a careful read suffices exit 0 / n-a

Scope

In scope:

Out of scope:

Git workflow

Steps

Step 1: Create the workflow

Create .github/workflows/ci.yml:

name: CI

on:
  push:
    branches: [master]
  pull_request:

jobs:
  verify:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npm run verify:assets
      - run: npx tsc -p tsconfig.json --noEmit
      - run: npm test
      - run: npm run build

Notes baked into this design (do not “improve” them away):

Verify: file exists; indentation is two spaces throughout; git status shows only the new file.

Step 2: Local equivalent dry run

Run exactly what CI will run, in order:

Verify: npm ci → exit 0 (this deletes and reinstalls node_modules — expected). Verify: npm run verify:assets → prints Local model and ORT assets verified. Verify: npx tsc -p tsconfig.json --noEmit → exit 0. Verify: npm test → all tests pass. Verify: npm run build → exit 0, dist/ populated.

Test plan

No unit tests — the workflow is itself a test harness. The dry run in step 2 is the verification.

Done criteria

STOP conditions

Stop and report back if:

Maintenance notes