instruction.md

CLI

npm install -g instruction-md

Offline, no account needed

CommandWhat it does
instruction validate <file>refuse or accept, with the specification's own messages and a stable code for each; exit 1 on refusal. Advisories (a Must: that is read as prose, an unused parameter) are shown and never refuse; --strict fails on warnings too
instruction init <name> --template agenta starting document that shows rules with reasons, variants, the reply's shape and reviewer notes
instruction deliver <file> name=valuethe exact bytes a model receives, for a context
instruction fmt <file> --writeconservative formatting; never touches machinery bodies
instruction digest <file>the authored digest, excluding the signature line
instruction render <file> --fullHTML for a static site
instruction test <dir>run a fixtures directory, for your own conformance suite
instruction eval <file>run the document's :::!eval cases against Claude with your own credentials; --dry-run shows what each case would send and calls no model

Against the registry

CommandWhat it does
instruction logindevice-flow sign-in; the token is stored in your config directory
instruction list, get, pullfind and fetch
instruction push <file> --publishcreate or update a draft, and publish it
instruction publish <id> --tag v2 --refs latest,stablepublish the current draft and move refs
instruction refs <id> set stable <ver>move a ref, which is how you roll back
instruction diff <id> <from> <to>unified and block-level diff
instruction watch <uri> --out FILEfollow a ref, keeping the last good version
instruction audit export <id> --format csvthe audit trail, never content
instruction revoke <id> <ver>withdraw a version; consumers hold

In CI

Set INSTRUCTION_MD_TOKEN for a non-interactive token and use --json for machine-readable output. Exit codes: 1 error, 3 transport, 4 not found, 5 forbidden, 6 nothing applied.

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 22 }
      - run: npm i -g instruction-md
      - run: instruction validate RUNBOOK.md
      - run: instruction push RUNBOOK.md --to ${{ vars.INSTRUCTION_ID }} --publish --message "${{ github.sha }}" --json
        env:
          INSTRUCTION_MD_URL: https://instruction.md/mcp
          INSTRUCTION_MD_TOKEN: ${{ secrets.INSTRUCTION_MD_TOKEN }}

Add --sign-with key.json to publish with your own key rather than the platform's. See signing and trust.