Skip to content

Enforce constitution.md as a required check

Make Maina verification a required check — PRs can’t merge until the constitution is satisfied.

  1. Set up Maina CI

    Add the verification workflow (see Verify a PR in CI).

  2. Define your constitution

    .maina/constitution.md
    # Project Constitution
    ## Stack
    - Runtime: Bun
    - Language: TypeScript strict mode
    - Lint/Format: Biome
    ## Verification
    - Lint: `bun run check`
    - Typecheck: `bun run typecheck`
    - Test: `bun test`
    - Diff-only: only report findings on changed lines
    ## Conventions
    - Conventional commits enforced
    - No console.log in production code
    - TDD: write tests first
  3. Make it a required check

    In GitHub repo settings:

    • Go to Settings → Branches → Branch protection rules
    • Add rule for main / master
    • Under Require status checks, add Maina CI (or your workflow name)
    • Enable Require branches to be up to date
  4. Result

    PRs that violate the constitution (lint failures, missing tests, slop patterns, security findings) can’t merge until fixed.