mdpact

GitHub Action

Run mdpact on every pull request. The action emits inline diff annotations, posts a sticky PR comment with score + diagnostics, and fails the check when the score drops below a configured threshold.

Minimal workflow

name: mdpact

on:
  pull_request:
    paths: ["CLAUDE.md", "AGENTS.md", "**/*.mcp.md"]
  push:
    branches: [main]

jobs:
  mdpact:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: HMAKT99/Agentspec/apps/action@v0.1.0
        with:
          fail-below: "70"

Inputs

| Name | Description | Default | | --- | --- | --- | | config | Path to mdpact.config.* | auto | | fail-below | Fail the check if score drops below | 70 | | run-behavior-tests | Run the behavior engine (costs API credits) | false | | models | Comma-separated subset of models | — | | budget-usd | USD ceiling for the behavior run | 1 | | comment | Post sticky PR comment | true | | github-token | Token for the comment upsert | github.token |

Outputs

  • score — numeric score (0–100)
  • errors — count of error-severity diagnostics
  • warnings — count of warning-severity diagnostics

Behavior tests in CI

Set run-behavior-tests: "true" and supply API keys via secrets.

      - uses: HMAKT99/Agentspec/apps/action@v0.1.0
        with:
          run-behavior-tests: "true"
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}