Rename the top-level lib/ directory to core/ so the project root immediately communicates which code is core platform and which lives in modules/. PHP namespaces (MintyPHP\*) are unchanged — only the Composer PSR-4 path mapping moves from lib/ to core/. Module-internal lib/ directories (modules/*/lib/) are untouched. Updated across the full stack: - composer.json PSR-4 mapping - bootstrap entry points (web/index.php, bin/*, tests/bootstrap.php) - tooling configs (phpstan.neon, phpunit.xml, php-cs-fixer) - 26 architecture contract tests - enforcement-policy, guard-catalog, quality-gates - all documentation (CLAUDE.md, README, 25 docs/, .agents/skills/) - bin/qa-extended.sh search paths - .claude/settings.local.json permission paths Workflow: .agents/runs/CORE-LIB-RENAME-001/ (Analyst → Planner → Executor → Code Review (4 findings fixed) → Security Review → Acceptance Test → Finalizer) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
63 lines
2.7 KiB
JSON
63 lines
2.7 KiB
JSON
{
|
|
"version": "1.0.0",
|
|
"source": ".agents/skills/core-guardrails/references/quality-gates.md",
|
|
"gates": [
|
|
{
|
|
"id": "QG-001",
|
|
"type": "mandatory",
|
|
"name": "PHPUnit Full",
|
|
"command": "docker compose exec php vendor/bin/phpunit"
|
|
},
|
|
{
|
|
"id": "QG-002",
|
|
"type": "mandatory",
|
|
"name": "PHPStan",
|
|
"command": "docker compose exec php vendor/bin/phpstan analyse -c phpstan.neon --no-progress"
|
|
},
|
|
{
|
|
"id": "QG-003",
|
|
"type": "mandatory",
|
|
"name": "Architecture Core Contract",
|
|
"command": "docker compose exec php vendor/bin/phpunit tests/Architecture/CoreStarterkitContractTest.php"
|
|
},
|
|
{
|
|
"id": "QG-004",
|
|
"type": "fast",
|
|
"name": "Structural rg checks",
|
|
"command": "(rg 'new\\s+[^\\s(]+Factory\\(' core/Service || true) | wc -l\n(rg --glob '!**/*Factory.php' 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' core/Service || true) | wc -l\n(rg \"\\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\\(\" pages core templates web || true) | wc -l\n(rg -n 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' pages -g '*.php' || true) | wc -l\n(rg -n '\\bDB::' pages -g '*.php' || true) | wc -l\n(rg -n 'app\\([^\\n]*Factory::class\\)->create' pages/admin -g '*.php' || true) | wc -l\n(rg -n 'Factory::class' pages/admin -g '*.php' || true) | wc -l\n(rg -n 'ApiResponse::readJsonBody\\(' pages/api/v1 -g '*.php' || true) | wc -l"
|
|
},
|
|
{
|
|
"id": "QG-005",
|
|
"type": "manual",
|
|
"name": "JS smoke",
|
|
"command": "Browser smoke test with DevTools console; expect no new JS errors."
|
|
},
|
|
{
|
|
"id": "QG-006",
|
|
"type": "fast",
|
|
"name": "PHP Style Check",
|
|
"command": "docker compose exec php vendor/bin/php-cs-fixer fix --config=tools/php-cs-fixer/.php-cs-fixer.dist.php --dry-run --diff --verbose"
|
|
},
|
|
{
|
|
"id": "QG-007",
|
|
"type": "periodic",
|
|
"name": "Unused Composer packages",
|
|
"command": "docker compose exec php vendor/bin/composer-unused",
|
|
"note": "Run periodically (not per-merge). Flag any newly unused package to the reviewer."
|
|
},
|
|
{
|
|
"id": "QG-008",
|
|
"type": "fast",
|
|
"name": "Docs link integrity",
|
|
"command": "bin/docs-link-check.sh",
|
|
"note": "Default scanner excludes .agents/runs/** to avoid historical artifact false positives. qa-required also enforces bin/docs-drift-check.sh as QG-008 supplement."
|
|
},
|
|
{
|
|
"id": "QG-009",
|
|
"type": "fast",
|
|
"name": "Codex skills sync",
|
|
"command": "bin/codex-skills-sync.sh --check"
|
|
}
|
|
]
|
|
}
|