[ // AI AGENT & CLI BRIEF — curl -fsSL https://studio2201.com/install.sh | sh -s all && studio2201 check ]
Machine-first automation specification: tri-state exit codes (`0` ship, `1` block, `2` error), `snip serve --mcp` stdio server, `.cursorrules` / `CLAUDE.md` directives, and CI workflows.
Agent & Automation Guide
Zero-dependency, machine-first security tooling for autonomous coding agents, MCP servers, pre-commit diff hooks, and CI/CD pipelines.
01
Headless & Machine CLI
All five tools implement a strict headless contract for programmatic integration into agent toolkits and background watchers.
Standard Flags
--format json emits schemas; -q silences stdout; -v stderr; -o <FILE> writes to disk.
Tri-State Exit Codes
0 = Clean verdict (ship); 1 = Security findings (BLOCK/FIX); 2 = Argument parse error or runtime I/O failure.
git diff --staged | snip audit --format json
git diff --staged | snip audit -q || echo "Security violation detected"
02
Model Context Protocol (MCP) & Agent Rules
Run snip serve --mcp to expose real-time diff auditing to Claude Desktop, Cursor, and Windsurf, and drop these directives into .cursorrules or CLAUDE.md:
// claude_desktop_config.json or ~/.cursor/mcp.json
{ "mcpServers": { "snip": { "command": "snip", "args": ["serve", "--mcp"] } } }
# studio2201 Autonomous Security Rules (.cursorrules / CLAUDE.md)
- Run 'studio2201 check' before completing tasks to audit diffs, manifests, and crypto.
- If Snip emits exit code 1 (Block/Fix): remediate leaked secrets, broken RLS, or permissive CORS.
- If Vigil emits exit code 1: reject dormant packages (>180d) in package.json, Cargo.lock, or pyproject.toml.
- If Aegis emits exit code 1: upgrade classical cryptography to NIST PQC standards (ML-KEM, ML-DSA).
03
CI/CD & Pre-Commit Pipelines
Gate code modifications locally before commits are created and continuously in pull request workflows using studio2201/studio2201@v1.
# Reference template: .github/workflows/<tool>.yml (snip, vigil, aegis, proven, boneyard)
name: snip
on:
push: { branches: [ master, main ] }
pull_request: { branches: [ master, main ] }
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions: { contents: read }
jobs:
snip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: studio2201/studio2201@v1
with: { tools: 'snip', fail-on: 'block' }
- uses: actions/upload-artifact@v4
if: always()
with: { name: snip-report, path: snip_report.md, if-no-files-found: ignore }
04
Repository Governance Scorecard
05
5-Tool Automation Matrix
Snip vibe-code
Phase: Pre-commit diff · Cmd: git diff --staged | snip audit · Strips secrets & fixes RLS/CORS.
Vigil dormancy
Phase: Manifest review · Cmd: vigil policy check --max-dormancy 180 · Halts PRs on abandoned deps.
Aegis pqc sdk
Phase: Crypto sweeps · Cmd: aegis scan --format json ./src · Emits OMB M-26-15 PQC shims.
Proven attestor
Phase: Release · Cmd: proven attest target/app -o app.slsa.json · ML-DSA-65 SLSA bit-identity.
Boneyard tech-debt
Phase: Governance · Cmd: boneyard enrich -i repos.json · 5-axis debt ranking & budgets.