-
Notifications
You must be signed in to change notification settings - Fork 0
Quality Gate
One script — vendor/mohamed-ashraf-elsaed/claude-kit/runtime/quality-checks.sh — is the single source of truth, invoked in three places so the bar is identical everywhere.
flowchart LR
A[git pre-commit] --> Q
B[Claude Stop hook] --> Q
C[CI workflows] --> Q
Q[[quality-checks.sh]] --> P1[Pint<br/>if pint.json]
Q --> P2[PHPStan<br/>if phpstan.neon]
Q --> P3[Tests<br/>per .claude-kit.json]
Q --> P4[Frontend<br/>if package.json scripts]
classDef g fill:#22c55e,stroke:#15803d,color:#fff;
class Q g;
PHP — based on what you installed:
-
Pint (
--test) — runs whenpint.jsonexists. -
PHPStan — runs when
phpstan.neonexists; the level and strict-rules are whatever you chose (they live in that file). Must be zero errors. -
Tests — per
.claude-kit.json: the chosen runner and, for Pest,--coverage --min=<threshold>when a coverage driver is present (otherwise the suite runs and coverage is warned, not enforced).
Frontend — only if package.json defines the scripts:
-
lint:check(ESLint) ·format:check(Prettier) ·types:check(vue-tsc/tsc).
| Where | File | Blocks |
|---|---|---|
| Commit time | .githooks/pre-commit |
a bad git commit
|
| Claude turn |
.claude/settings.json → Stop hook |
Claude from finishing a turn |
| CI | .github/workflows/* |
a bad merge |
Beyond the quality suite, the Stop hook requires that any change under app/, database/, routes/, or resources/js/ is accompanied by an added/updated doc under features/<name>/ (copy features/_TEMPLATE/). This keeps docs in lockstep with code.
Tip
Disable it with CLAUDE_KIT_FEATURE_DOCS=0, or by setting hooks.feature_docs to false in .claude-kit.json.
sudo apt install -y php8.4-pcov # example: PHP 8.4 on Debian/UbuntuWithout pcov/Xdebug, the gate runs the tests and prints a warning instead of failing on coverage.
- Commits:
git commit --no-verify - Coverage threshold:
CLAUDE_KIT_MIN_COVERAGE(not recommended)
Warning
These are escape hatches, not defaults — CI still enforces the full gate.
← Frontend stacks · 🏠 Home · Skills →
claude-kit — one-command Claude Code + quality gate for Laravel
⭐ Star · 📦 Packagist · 🐛 Issues · 💬 Discussions · 📝 Changelog
MIT © Mohamed Elsaed
Getting started
Reference
Project