{
  "markdown": "<p align=\"center\">\n  <img width=\"400\" height=\"400\" alt=\"gavel\" src=\"assets/gavel.png\" />\n\n  <h1 align=\"center\">Gavel</h1>\n  <p align=\"center\">\n    <em>Test-code quality enforcement for AI agents.</em><br>\n    <em>One test. One verdict. Move on.</em>\n  </p>\n  <p align=\"center\">\n    <img src=\"https://img.shields.io/github/v/release/dsolisp/gavel?style=flat-square&label=release\" alt=\"Release\">\n    <img src=\"https://github.com/dsolisp/gavel/actions/workflows/gavel-verify.yml/badge.svg\" alt=\"CI\">\n    <img src=\"https://img.shields.io/badge/works%20with-20%2B%20IDEs-blue?style=flat-square\" alt=\"Works with 20+ IDEs\">\n    <img src=\"https://img.shields.io/badge/license-MIT-blue?style=flat-square\" alt=\"MIT license\">\n  </p>\n</p>\n\n---\n\nGavel is an independent QA discipline project for automation repos. It enforces **lean suites**, **trustworthy test code**, and **resilient structure** across Playwright (TS/JS, pytest-playwright, and Playwright.NET), Selenium (incl. Selenium C#), Appium (.NET mobile-native), Cypress, WebdriverIO, Cucumber, and Robot — without turning into a full QA platform. The C# / .NET ecosystem (NUnit/xUnit/MSTest/SpecFlow/Reqnroll/FluentAssertions) is a first-class audited surface as of v0.10.0.\n\nInspired by [ponytail](https://github.com/DietrichGebert/ponytail)'s minimalism. Not a fork. No upstream sync required.\n\n## First run (< 60s)\n\n```bash\ngit clone https://github.com/dsolisp/gavel.git\ncd gavel\nnpm run verify                        # dogfood the verify gate\nnode scripts/cli.js self-check ../your-automation-repo\nnode scripts/cli.js audit ../your-automation-repo --with-self-check --audit-format\n```\n\nOr gate CI with **SARIF 2.1.0** (no LLM required):\n\n```bash\nnpx --yes @dsolisp/gavel@0.12.0 audit --format sarif > gavel.sarif\n```\n\nCopy the GitHub Actions recipe from [templates/github-actions/gavel-audit-sarif.yml](templates/github-actions/gavel-audit-sarif.yml). Enterprise trust criteria, Sonar import, and exit codes: [docs/ENTERPRISE.md](docs/ENTERPRISE.md).\n\nInstall into your IDE (Cursor, Claude Code, OpenCode, Windsurf, and 16+ more) using [QUICKSTART.md](QUICKSTART.md), then invoke `/gavel-audit` or `/gavel-review` on your test repo.\n\n### Sample repos\n\nSeven complete example projects under `fixtures/sample-repos/` — **Playwright**, **Playwright.NET**, **Appium.NET**, **Selenium**, **Selenium.NET**, **Cypress**, and **WebdriverIO** — each with good and bad examples showing Gavel's constitution rules applied to real test code. Run the self-check against them to see verdicts in action.\n\n## What can gavel do for me?\n\n| I want to… | Command / skill | Outcome |\n|------------|-----------------|---------|\n| Scan my suite for bloat and violations | `/gavel-audit` | Ranked scoreboard: dead POMs, leaks, waits, markers |\n| Review a test diff before merge | `/gavel-review` | One line per constitution violation |\n| Enforce layering in CI | `node scripts/self-check.js .` | Blocker/fix report with exit code |\n| Understand a CI failure cluster | `/gavel-analyze` | Classified clusters + next agent |\n| Fix a failing test | `/gavel-heal` | Verdict: test bug, app bug, env, or flake |\n| Remove safe dead code | `/gavel-refactor` (apply-safe) | Dead locators/POMs removed with test evidence |\n| Detect my stack | `/gavel-detect` | Activates the right framework profile |\n| Explain a rule or finding | `/gavel explain` | Human-readable explanation of any verdict |\n| Prepare a branch for PR | `/gavel-pr-prep` | Commit, merge main, verify FF, push |\n| Write UI/API tests in existing patterns | `/gavel-e2e`, `/gavel-api` | Test code using your repo's architecture |\n| Track deferred test decisions | `/gavel-debt` | Ledger of `gavel:` comments |\n| See suite health at a glance | `/gavel-gain` | Pass rate, flake count, LOC per test |\n| Check CI safety before merge | `/gavel-ci-check` | Diff-based env var / secret / dep audit |\n\nRun `gavel companion --help` for optional companion workflows (CI migration, env setup, hub credentials, issue closure — not in default install).\n\n## Core commands\n\n| Command | What it does |\n|---------|-------------|\n| `/gavel [lite \\| full \\| strict \\| off]` | Set intensity level |\n| `/gavel-audit` | Whole-repo audit + suite health scoreboard |\n| `/gavel-review` | Review test diffs for constitution violations |\n| `/gavel-self-check` | Static constitution scanner (12 rules, multi-framework) |\n| `/gavel-heal` | Diagnose a failing test |\n| `/gavel-analyze` | Parse CI report, cluster failures |\n| `/gavel-refactor` | Improve test code; apply-safe dead code removal |\n| `/gavel-detect` | Auto-detect your test stack |\n| `/gavel-explain` | Explain any rule or finding |\n| `/gavel-ci-check` | Diff-based CI safety verdict |\n| `/gavel-pr-prep` | Automated PR preparation |\n| `/gavel-help` | Quick reference |\n\n## Feature grid\n\n| Area | What Gavel enforces |\n|------|---------------------|\n| **Layering** | Locators → actions → specs; no assertion leakage |\n| **Locators** | Semantic/accessibility first; no raw selector chains outside locator classes |\n| **Waits** | Native retry assertions; no arbitrary sleeps |\n| **DI** | Fixtures over `new PageObject(page)` in specs |\n| **Suite health** | Dead POMs/locators/factories, skip markers, bare `test.fail()` |\n| **Suppression** | Tag-scoped `@gavel-ignore(TICKET-123)` — unreasoned suppressions flagged |\n| **SARIF export** | Valid SARIF 2.1.0 output for GitHub Code Scanning & CI dashboards |\n| **Result envelope** | Schema-wrapped output (`schemaVersion`, `findings`, `summary`) for machine piping |\n| **Config schema** | `gavel.config.json` with JSON Schema validation — declare rules, scans, suppressions |\n| **Area map** | Auto-generated from `tests/` + `pages/` structure, with manual overrides |\n| **Boundary guard** | Mechanical enforcement of Gavel/Bailiff scope separation |\n| **CI intelligence** | JUnit, Allure, Playwright, Cypress, Cucumber parsers + clustering |\n| **Evidence gate** | Compile + affected tests before declaring done |\n| **Frameworks** | Playwright (TS/JS, pytest-playwright, .NET), Appium (.NET), Selenium (incl. C#), Cypress, WebdriverIO, Cucumber, Robot |\n\n## Example output\n\n```text\nGavel audit report — ../my-automation-repo\nblocker review manual-wait Manual sleeps or arbitrary polling. [pages/actions/ExampleActions.ts:L42]\nfix review selector-leak Raw selector chains outside locator classes. [pages/actions/ExampleActions.ts:L18]\n\nSuite health:\n  Dead POMs: 2\n  Dead locators: 5\n  Unused factories: 1\n  Selector leaks: 3\n  Manual waits: 7\n  Skip/quarantine markers: 0\n  Bare test.fail markers: 1\n  Constitution violations: 11\n  Critical-area violations: 4\n  Safe autofix candidates: 8\n  Top areas:\n    tests/e2e/catalog: 6\n```\n\n## Scripts (run on any automation repo)\n\n| Script | Purpose |\n|--------|--------|\n| `scripts/cli.js` | Unified CLI — dispatches all commands (`gavel <command>`) |\n| `scripts/self-check.js` | Constitution violation scan (12 rules, multi-framework) |\n| `scripts/audit-report.js` | Ranked audit + suite health (`--with-self-check`) |\n| `scripts/to-sarif.js` | SARIF 2.1.0 export for CI dashboards |\n| `scripts/detect.js` | Auto-detect test automation stack |\n| `scripts/generate-area-map.js` | Auto-generate area map from directory structure |\n| `scripts/validate-envelope.js` | Validate result envelope against JSON schema |\n| `scripts/validate-manifest.js` | Validate plugin.yaml manifest |\n| `scripts/verify-boundary.js` | Enforce Gavel/Bailiff scope separation |\n| `scripts/refactor-score.js` | Before/after line + violation delta |\n| `scripts/affected-tests.js` | Transitive affected spec discovery |\n| `scripts/analyze-ci.js` | Parse CI report, cluster, correlate commits |\n\nReport parsers: `junit`, `allure`, `playwright`, `playwright-html`, `cypress`, `cucumber`.\n\n## Install\n\nSee [QUICKSTART.md](QUICKSTART.md) for IDE-specific paths. OpenCode npm package:\n\n```json\n{ \"plugin\": [\"@dsolisp/gavel\"] }\n```\n\n## Docs\n\n| Doc | Audience |\n|-----|----------|\n| [QUICKSTART.md](QUICKSTART.md) | First session — audit, heal, write (7 end-to-end flows) |\n| [docs/ENTERPRISE.md](docs/ENTERPRISE.md) | CI gate, SARIF recipes, trust criteria (platform teams) |\n| [docs/README.md](docs/README.md) | Script reference and CI templates |\n| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Two-repo architecture (Gavel + Bailiff) |\n| [AGENTS.md](AGENTS.md) | Universal QA rules for all adapters |\n| [CHANGELOG.md](CHANGELOG.md) | Release history |\n\n## Development\n\n```bash\nnpm run verify    # all gates including docs drift + unit tests\n```\n\n## License\n\n[MIT](LICENSE). QA discipline layer inspired by [ponytail](https://github.com/DietrichGebert/ponytail) minimalism.\n",
  "bytes": 8646,
  "sha": "a5d4784be49d82129232d52e038f3eb7b74d64fad44f6121fb701665e794e36f",
  "repo_slug": "dsolisp/gavel",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_dsolisp_gavel_61e5b2d2/readme"
}