GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Overbaker/square2: square² (方方): zero-dependency repo-agnostic governance skeleton combining deterministic ratcheting quality gates with advisory cross-family AI code review.

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
bin
bin
 
 
docs
docs
 
 
prompts
prompts
 
 
schemas
schemas
 
 
src
src
 
 
templates/consumer
templates/consumer
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
jsconfig.json
jsconfig.json
 
 
llms.txt
llms.txt
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

square² (方方) — Zero-dependency repo governance: ratcheting deterministic gates + advisory cross-family AI review

License: MIT Node >= 22 Zero Runtime Dependencies Status: v0.1 Advisory

Consumer Guide · Gate Rules · Trust Model · Auth · Templates · Discussions


square² (方方) is a zero-dependency, repo-agnostic governance skeleton (Node ≥ 22, MIT) built around two non-blocking planes: a deterministic ratcheting quality gate that fails only on new regressions with concrete Instead: fixes, and an advisory cross-family AI code review where a different model family audits commits in a credential-isolated read-only copy.

Two-Plane Architecture

square2 two-plane architecture: deterministic ratcheting gate and 3-stage cross-family AI review

Quick Start

npm install
npm run typecheck
npm test

Drop-in consumer workflows, .square2/ configs, and pre-push hooks live in templates/consumer/.

CLI Commands

Run from your repo root (or pass --root <dir>). Exit codes: 0 pass · 1 violations · 2 tool/config/vendor error.

Command Purpose
square2 check [--only <ids>] [--format text|github] [--report <path>] [--base <sha>] [--rev <sha>] Self-test enabled rules, subtract .square2/baseline.json + live exceptions, print [ID] path:line — Instead: …. Enforces baseline ratchet & exception immutability with --base.
square2 selftest [--only <ids>] Verify every enabled rule fires on .square2/fixtures/<id>/bad/ and stays silent on good/.
square2 baseline show | shrink | grow --approval <id> Inspect, shrink resolved entries, or grow baseline citing .square2/approvals.yaml.
square2 exceptions lint [--base <sha>] Validate .square2/exceptions.yaml TTLs and immutability.
square2 vendor --from <path|git-url> --ref <tag> [--into <dir>] Copy square² into tools/square2/ and pin tree_sha256 in .square2/lock.json.
square2 replay --rule <id> (--commit <sha> | --since <days>) [--out <file>] Replay a candidate rule on git history in a temporary worktree before enabling it.
square2 review prepare | run | validate | publish | guard-env 3-stage daily cross-family review (prepare → read-only run with no GH token → validate/publish).
square2 publish-gate [--report <path>] [--branch <name>] [--test] Open GitHub issues for new gate violations on the configured branch.
square2 budget Track month-to-date Actions minutes against your threshold.
square2 config get <key> Print a scalar from .square2/config.yaml.
Configuration (.square2/config.yaml) & Pluggable Engines
approvers:
  - some-login
max_exception_ttl_days: 90
require_provenance: false   # true: every enabled rule needs born_from + replay report
generated:
  - apps/web/generated/**
engines:
  ruff:
    command: [uv, run, --project, python, ruff]
  depcruise:
    config: .dependency-cruiser.cjs
  eslint:
    config: eslint.config.mjs
escapes:
  enabled: false            # experimental escape records (default false)
review:
  author_trailers:          # trailers naming the writers (default Co-Authored-By)
    - Co-Authored-By
    - X-Writers
  change_id_trailers:       # trailers whose value is a change id (default none)
    - X-Change
  provenance_trailers:      # further trailers shown on escape records (default none)
    - X-Reviewers

Escape records (experimental, off by default; escapes.enabled: true): fix commits on the reviewed branch become square2:escape issues (one per fix sha, no model call); a fix that closes a gate or review issue credits that issue instead. See docs/consumer-guide.md.

Engines: depcruise and eslint run the repository's own installed tools; ruff runs the configured command; suppressions is built in; command runs options.argv (with {root} replaced by the tree to scan) and reads one JSON object per line: {"path": "src/a.ts", "line": 3, "subject": "what is wrong"}.

Changes

  • 0.1.2: SQ2_LLM_BASE_URL routes the analysis through an OpenAI-compatible Responses gateway (https, or http on loopback only); provider request and stream retries (SQ2_LLM_RETRIES, default 20) and a 10-minute stream idle timeout for throttled deployments; the analyze job can run on a self-hosted runner (SQ2_ANALYZE_RUNS_ON). The escape-record redesign moves to 0.1.3.
  • 0.1.1: configurable author, change-id and provenance trailers (review.*_trailers); commit trailers outside that allow-list never reach the review context or prompts; the model override (SQ2_REVIEW_MODEL) applies only within the selected reviewer's family; the pre-push hook skips checkouts without tools/square2; escape records added as an experimental feature, off by default (escapes.enabled), to be redesigned in 0.1.2.
  • 0.1.0: first release.

Vendoring

Tamper-Evident Vendoring & CI Agnosticism
  • Vendoring: square2 vendor pins tree_sha256 in .square2/lock.json. Any unexpected modification exits 2 with [S2-VENDOR-TAMPERED]. Threat model: detects accidental edits of the vendored copy; a committer can always change policy, which review of the commit must catch.
  • CI Agnosticism: .github/workflows/ci.yml runs typecheck, test, and an optional agnosticism grep using SQ2_FORBIDDEN_PATTERN (skipped on forks) so the public skeleton never leaks consumer names.
FAQ
  • Does square² block PR merges? Both planes are advisory by default (v0.1): square² reports violations and opens issues without blocking merges.
  • Why split AI review into 3 steps? Keeping review run strictly read-only with zero GitHub token ensures an untrusted model call cannot mutate repository state or exfiltrate write credentials.
  • Why zero runtime dependencies? Vendoring square² into tools/square2/ stays fast, auditable, and immune to supply-chain churn.

Licensed under MIT (LICENSE). See CONTRIBUTING.md to contribute.

About

square² (方方): zero-dependency repo-agnostic governance skeleton combining deterministic ratcheting quality gates with advisory cross-family AI code review.

Topics

ai-code-reviewci-cdcode-reviewdeveloper-toolsgithub-actionsgovernancelinterllmmulti-modelnodejsquality-gatesratchetingstatic-analysiszero-dependencies

Resources

Readme
MIT license

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.