CI/CD and Slack
Use the PR check to catch broken references, sync committed source files to
your Nicia space, and send changes that need review to your team’s
#eng-ops channel.
Check pull requests for rot
Section titled “Check pull requests for rot”The Nicia Audit Action compares the pull request checkout with its base
and keeps one audit comment updated. Save this workflow as
.github/workflows/nicia-audit.yml to use the
published action.
name: Nicia auditon: pull_requestpermissions: contents: read pull-requests: writeconcurrency: group: nicia-audit-${{ github.event.pull_request.number }} cancel-in-progress: truejobs: audit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 - uses: nicia-ai/audit-action@v1The action needs no Nicia credentials. It reports findings by default.
Set fail-on: error on the action step to block new errors, or
fail-on: warn to block new errors and warnings. Fork PRs usually have a
read-only GitHub token, so the audit runs and the comment may be unavailable.
For a check of the checkout that writes to the job log, run the CLI in GitHub Actions.
- uses: actions/setup-node@v6 with: node-version: 24- run: npx --yes @nicia-ai/cli audit --ciTry the audit on a public repository before adding the workflow. Skill-Rot Audit
Sync committed Markdown
Section titled “Sync committed Markdown”In each checkout that should publish source changes, install the CLI on
Git’s PATH, sign in, and install the hook. Replace team-engineering
with your space handle.
npm install -g @nicia-ai/clinicia loginnicia hook install --space team-engineeringEdit the paths array in the generated .nicia.json, then run
nicia sync --dry-run to preview and nicia sync to upload the committed
files from HEAD. After that, the Git post-commit hook runs sync in the
background when a commit changes a watched file. Run nicia sync to catch
up if a hook run was missed.
When saving a rule or decision, cite the synced document’s repository-relative ID and the exact passage it rests on. When a synced version drops that passage, the dependent record reopens in Review. The sync summary reports reopened records when its credential has Review access.
Send Review alerts to Slack or Discord
Section titled “Send Review alerts to Slack or Discord”- In Slack, enable Incoming Webhooks in your Slack app’s settings.
Choose Add New Webhook to Workspace, select
#eng-ops, authorize it, and copy the generated URL. Slack setup guide - In Discord, go to Server Settings → Integrations, create a webhook,
set its channel to
#eng-ops, and choose Copy Webhook URL. Discord setup guide
Store the full URL in NICIA_CHAT_WEBHOOK_URL. Set NICIA_SPACE_KEY to a
key for that space with admin and read. Keep both values out of source
control. Handing out space keys
Use jq and curl to subscribe to change.staged for new changes
waiting in Review. Replace team-engineering with your space handle.
jq -n --arg url "$NICIA_CHAT_WEBHOOK_URL" \ '{ url: $url, types: ["change.staged"] }' | curl --fail-with-body -X POST \ "https://api.nicia.ai/v1/brains/team-engineering/webhooks" \ -H "Authorization: Bearer $NICIA_SPACE_KEY" \ -H "Content-Type: application/json" \ --data-binary @-Repeat with the second incoming webhook URL to send alerts to both platforms. Stage a change that requires approval under your space’s admission policy and look for a Review needed message with a link to Review. A record that reopens after sync is visible in Review. For alerts when a watched answer changes, see Watches.