Skip to content

GitHub Actions and Precommit

Toprak Ahmet Aydoğmuş edited this page Nov 30, 2026 · 2 revisions

Repository source: docs/github_action_guide.md
Snapshot of the source document; follow the repository link for the current version.


T-Zero GitHub Action & Pre-Commit Integration Guide

Use the repository's composite GitHub Action and pre-commit hooks for repeatable static checks. A successful run only means the configured checks passed; it is not a security certification, proof of zero hallucinations, or a guarantee of zero cloud cost.


1. GitHub Action CI Pipeline (10 Seconds)

Add a new workflow to your repository at .github/workflows/tzero-gate.yml:

name: T-Zero Autonomous Review & Security Gate

on:
  pull_request:
    branches: [main, master, dev]
  push:
    branches: [main, master]

jobs:
  tzero-review:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
        with:
          fetch-depth: 2 # Required for diff inspection

      - name: Run T-Zero Reality-Lock & Security Gate
        uses: toprakahmetaydogmus/TZeroAlgorithm@main
        with:
          mode: review
          audit-level: strict

For production workflows, replace the mutable @main reference with a reviewed release tag or immutable commit SHA, and verify that the chosen version supports the inputs used here.

What Happens on Every Pull Request:

  1. Secret-pattern scan: Checks configured patterns and thresholds. False negatives and false positives are possible.
  2. Static symbol checks: Checks selected references against the available workspace model; it cannot prove that all runtime behavior is correct.
  3. Blast Radius Computation: Calculates downstream caller impact (0-100 score) on modified classes and functions.
  4. Step Summary Output: Posts an automated status card directly to the GitHub Action run summary:
Metric Status Policy
Secret-pattern scan CHECKED Best-effort; not a certification
Static symbol checks CHECKED Limited to configured rules and inputs
AST context reduction WORKLOAD-DEPENDENT Measure on the target repository

2. Pre-Commit Hook Integration

If you use the popular pre-commit framework in your repository, add T-Zero to .pre-commit-config.yaml: The v10.6.0 revision shown below is a historical example; choose a current, reviewed release tag for new installations.

repos:
  - repo: https://github.com/toprakahmetaydogmus/TZeroAlgorithm
    rev: v10.6.0
    hooks:
      # Block commits with secrets, ghost packages, or hallucinations
      - id: tzero-review
      # (Optional) Full AST static smell analysis
      - id: tzero-audit

Run installation:

pre-commit install

After installation, configured hooks run on applicable commits. Their coverage depends on the selected hook and configuration; they do not prevent every secret or defect from entering Git history.


3. Local CLI Usage

Run manual review on uncommitted changes:

tzero review

Run manual review comparing with a target branch or commit:

tzero review origin/main
tzero review HEAD~1

Run live background watcher daemon while coding in Cursor / Claude / Windsurf:

tzero --watch

Engineered with pride by Toprak Ahmet Aydoğmuş (Solo Developer @ Siber Akademi).
Check the current repository license, release notes, and third-party service terms before use. If you find T-Zero helpful, visit the GitHub repository.

Clone this wiki locally