Skip to content

Team

Check pull requests in CI

Check that each commit with agent work is explained, and link the commits GitHub makes at a merge.

wisdom check needs no recordings, only the repository. It runs in CI in one of two ways.

With the team dashboard, wisdom commits deploy writes one CI file that checks pull requests, links merges and builds the dashboard, by calling Wisdom’s reusable workflow:

.github/workflows/wisdom.yml, its job
jobs:
wisdom:
uses: wisdomlayer/wisdom/.github/workflows/wisdom.yml@v1
with:
main: "main"
wisdom-version: "0.6.1"
commits: true
vercel-org-id: "team_..."
vercel-project-id: "prj_..."
secrets:
VERCEL_TOKEN: ${{ secrets.WISDOM_VERCEL_TOKEN }}

Two jobs do the checking and the linking. The check, for GitHub Actions:

.github/workflows/wisdom.yml
name: wisdom
on: pull_request
permissions:
contents: read
checks: write # the result as a check run on the pull request
jobs:
guides:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: actions/setup-node@v4
with: { node-version: 24 }
- run: npm install -g @oqura/wisdom@0.6.1
- run: wisdom check --range origin/${{ github.base_ref }}..HEAD
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Pin the version your team uses (wisdom --version). Plain @oqura/wisdom installs npm’s latest, which may not be the Wisdom your team runs.

The second job links what GitHub makes at a merge. wisdom team init offers to write it as .github/workflows/wisdom-relink.yml:

.github/workflows/wisdom-relink.yml
name: wisdom links
on:
push:
branches: ["main"]
permissions:
contents: write # to push Wisdom's link refs (refs/wisdom/...), never a branch
pull-requests: read # to ask which pull request made a commit
jobs:
relink:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: actions/setup-node@v4
with: { node-version: 24 }
- run: npm install -g @oqura/wisdom@0.6.1
- run: wisdom team relink --range "${{ github.event.before }}..${{ github.sha }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Without it, merges made with GitHub’s buttons stay unlinked until someone runs wisdom team relink --range …, which still works later.

wisdom check fails when a commit with agent work has no guide (unless requireGuides is false), has one that didn’t pass Wisdom’s check, or names a session that isn’t on the remote. A commit made without Wisdom isn’t counted against you, and merge commits are skipped.

On the pull request it shows as a check run named Wisdom, with one line such as “3 of 4 commits explained by recorded sessions · 1 needs attention”, and each commit that needs attention, with why. A pull request from a fork can’t get a check run, so its result is on the job’s own summary page.