Skip to content

Releases: henryavila/codeguard

0.2.0 — first Packagist release

04 May 18:02

Choose a tag to compare

First Packagist release of the PHP/Laravel rewrite. Replaces the unmaintained npm package @henryavila/codeguard@0.1.1 — no programmatic migration path; this is a complete rewrite from Node/TypeScript to PHP/Composer.

Pre-1.0 means the public API may shift between minors. Pin to ^0.2 for compatibility.

Install

```bash
composer require --dev henryavila/codeguard
php artisan codeguard:install
```

The installer auto-detects your environment, picks a preset (`codeguard` PHP-only or `codeguard-full` with Node-based jscpd/Insights), publishes stubs with inline educational comments, suggests Deptrac layers from your `app/` namespaces, and activates CaptainHook automatically via the Composer plugin.

What's in 0.2.0

Commands

  • `codeguard:install` (+ `--refresh-stubs`, `--no-interactive`, `--preset=...`)
  • `codeguard:install:override`
  • `codeguard:check` — sequential gates with fail-fast, Layer 3 telemetry
  • `codeguard:test` — multi-stage test runner driven by `StageConfig`, Layer 5 telemetry
  • `codeguard:telemetry:enable|disable|clear` — opt-in JSONL telemetry

Stubs (11 in `codeguard-full`, 9 in `codeguard`)

Pint, PHPStan + extensions, phpstan-test-quality, Deptrac, Infection, CaptainHook (+ README), phpunit.xml strict-mode floor, minimal CI workflow stub. Full preset adds jscpd config and a Pest arch-test file.

Pest assertion traits

  • `TestQualityAssertions` — tautological assertions, Eloquent mocking, bare assertNotNull, DB queries / eager creates inside factory definitions
  • `ParallelSafetyAssertions` — truncate / forceDelete in tests

Quality gates

  • 377 tests / 928 assertions
  • PHPStan level 5 self-applied with grandfathered baseline
  • Package CI runs on PHP 8.3 + 8.4 (`.github/workflows/ci.yml`)

Roadmap (post-0.2.0)

Currently in "Roadmapped" status:

  • `codeguard:analyze` — pattern engine (28 curated YAMLs) with LLM adjudicator
  • `codeguard:prepare` — multi-database schema dump
  • AI rules generator for canonical `.claude/rules/*.md`

Migration from npm

If you used `@henryavila/codeguard@0.1.1` on npm: that line is no longer maintained. Install fresh on PHP/Laravel via the composer command above.

Full changelog

See CHANGELOG.md.

v0.1.1

22 Mar 23:17

Choose a tag to compare