studio2201 / automation v0.4.8 Apache-2.0

Agent & Automation Guide

Zero-dependency, machine-first security tooling for autonomous coding agents, Model Context Protocol (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, shell pipelines, and background watchers.

Standard Flags

--format json emits structured schemas; -q, --quiet silences stdout for clean exit status; -v prints stderr diagnostics; -o <FILE> writes directly to disk.

Tri-State Exit Codes

0 = Success / Clean verdict (safe to ship); 1 = Security findings / Policy threshold breached (BLOCK/FIX); 2 = Argument parse error or runtime I/O failure.

# Stream staged diff directly to snip in machine-readable JSON:
git diff --staged | snip audit --format json

# Silent gate assertion (exits 0 on clean, 1 on violation):
git diff --staged | snip audit -q || echo "Security violation detected"

02

Model Context Protocol (MCP)

Run snip serve --mcp to expose real-time diff auditing and security gates directly to Claude Desktop, Cursor, and Windsurf via stdio.

// claude_desktop_config.json or ~/.cursor/mcp.json
{
  "mcpServers": {
    "snip": {
      "command": "snip",
      "args": ["serve", "--mcp"]
    }
  }
}

03

Agent Rules & Prompts

Drop these directives into your project's .cursorrules, CLAUDE.md, or agent system prompts to enforce automated security gates:

# studio2201 Autonomous Security Rules
- Before staging any code modifications, audit diffs: git diff --staged | snip audit --format json
- If Snip emits exit code 1 (Block/Fix): remediate leaked secrets, broken RLS, or permissive CORS.
- When adding dependencies to package.json, Cargo.lock, or pyproject.toml: vigil policy check --max-dormancy 180 -q
- Reject dormant packages; verify cryptographic call sites comply with post-quantum standards via aegis.

04

CI/CD & Pre-Commit Pipelines

Gate code modifications locally before commits are created and continuously in pull request workflows.

#!/bin/sh
# .git/hooks/pre-commit — Local pre-commit diff gate
git diff --staged | snip audit -q || {
  echo "[-] Snip pre-commit gate failed: security violations found in staged diff." >&2
  exit 1
}
# .github/workflows/security-gate.yml
name: studio2201 Security Gate
on: [pull_request, push]
jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - name: Install studio2201 suite
        run: curl -fsSL https://studio2201.com/install.sh | sh -s all
      - name: Audit PR diff with snip
        run: git diff origin/${{ github.base_ref || 'master' }}...HEAD | snip audit --format json
      - name: Check dependency dormancy with vigil
        run: vigil policy check --max-dormancy 180 -q

Tool Badges for CI & READMEs

Embed live verification and certification badges directly in your repository README:

<!-- Snip Vibe-Safe Security Gate -->
[![Vibe-Safe](https://img.shields.io/badge/vibe--safe-SHIP-brightgreen.svg)](https://studio2201.com/snip)

<!-- Vigil Supply-Chain Dormancy -->
[![Dormancy](https://img.shields.io/badge/dormancy-healthy-2f6f5e.svg)](https://studio2201.com/vigil)

<!-- Aegis PQC Migration Readiness -->
[![PQC](https://img.shields.io/badge/PQC-Quantum--Safe-blueviolet.svg)](https://studio2201.com/aegis)

<!-- Proven SLSA Level 3+ Attestation -->
[![SLSA](https://img.shields.io/badge/SLSA-Level%203%2B-blue.svg)](https://studio2201.com/proven)

<!-- Boneyard Tech-Debt Index -->
[![Boneyard](https://img.shields.io/badge/boneyard%20index-0%2F100-brightgreen.svg)](https://studio2201.com/boneyard)

05

5-Tool Automation Matrix

How the five studio2201 tools integrate across the autonomous developer loop.

Snip vibe-code

Loop Phase: Code generation & pre-commit diff review.
Command: git diff --staged | snip audit
Exit Codes: 0 Ship · 1 Block/Fix · 2 Error.
Action: Strips leaked API keys, fixes broken Supabase RLS, and remediates permissive CORS.

Overview & Specs →

Vigil dormancy

Loop Phase: Manifest updates & dependency addition.
Command: vigil policy check --max-dormancy 180 -q
Exit Codes: 0 Pass · 1 Dormant dep · 2 Error.
Action: Halts PRs on abandoned crates/packages; suggests actively maintained alternatives.

Overview & Specs →

Aegis pqc sdk

Loop Phase: Cryptographic migration & compliance sweeps.
Command: aegis scan --format json ./src
Exit Codes: 0 Compliant · 1 Classical crypto · 2 Error.
Action: Scans RSA/ECC and emits OMB M-26-15 roadmaps with ML-KEM-768/ML-DSA-65 drop-in shims.

Overview & Specs →

Proven attestor

Loop Phase: Build, packaging & artifact release.
Command: proven attest target/app --format slsa -o app.slsa.json
Exit Codes: 0 Verified · 1 Tampered · 2 Error.
Action: Signs binaries with post-quantum ML-DSA-65; attests bit-identity before runtime deployment.

Overview & Specs →

Boneyard tech-debt

Loop Phase: Fleet governance & scheduled org audits.
Command: boneyard enrich -i repos.json --format json
Exit Codes: 0 Compliant · 1 Debt breach · 2 Error.
Action: Ranks multi-repo catalog across 5 axes; allocates remediation budgets in repo-weeks.

Overview & Specs →