Skip to content

levelsofself/mcp-nervous-system-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nervous System Check - GitHub Action

LLM behavioral enforcement for your CI pipeline. This GitHub Action scans pull requests against a configurable list of protected files and reports violations based on the Nervous System governance rules. If any protected file is modified, the check fails and a detailed comment is posted on the PR.

Quick Start

Add this to .github/workflows/nervous-system.yml in your repo:

name: Nervous System Check
on:
  pull_request:
    branches: [main]

jobs:
  ns-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: levelsofself/mcp-nervous-system-action@v1
        with:
          protected-files: 'CLAUDE.md,.claude/settings.json'
          github-token: ${{ secrets.GITHUB_TOKEN }}

Configuration

Input Description Default
protected-files Comma-separated list of files that cannot be modified ''
protected-files-path Path to a file listing protected files (one per line) .nervous-system/protected.txt
fail-on-violation Whether to fail the check when violations are found 'true'
github-token GitHub token for posting PR comments ${{ github.token }}

Using a protected files list

Create .nervous-system/protected.txt in your repo:

# Core governance files
CLAUDE.md
.claude/settings.json
nervous-system.yml

Lines starting with # are treated as comments.

Outputs

Output Description
violations Number of violations found
report Full violation report text

PR Comment

When violations are found, the action posts (or updates) a comment on the PR:

Nervous System Check: FAILED

Found 2 violation(s):

  1. CLAUDE.md - Rule: UNTOUCHABLE — Protected file was modified.
  2. .claude/settings.json - Rule: UNTOUCHABLE — Protected file was modified.

When no violations are found, the comment confirms the check passed.

Links