Conversation
There was a problem hiding this comment.
Pull request overview
This PR pivots the package away from Composer-plugin-based syncing and toward a Laravel Boost–centric workflow, adding Claude/Laravel AI–backed validation of resources/boost/skills/**/SKILL.md via Pest + GitHub Actions, while also modernizing skill content structure and documentation.
Changes:
- Add an AI-driven skills validation harness (Pest + Testbench + Laravel AI) and a GitHub Actions workflow to run it.
- Update many skills to include
compatible_agentsfrontmatter and improve/standardize skill content formatting. - Remove legacy Composer plugin/scripts/refactor command artifacts and the old GitHub Models–based skill integration workflow.
Reviewed changes
Copilot reviewed 99 out of 100 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/TestCase.php | Adds a Testbench base test case registering Laravel AI/Prism providers for the test suite. |
| tests/Pest.php | Configures Pest to use the package TestCase for feature tests. |
| tests/Feature/SkillValidationTest.php | Adds a feature test that drives skill validation by asserting jobs are dispatched per SKILL.md. |
| tests/Support/Agents/SkillQualityAgent.php | Introduces a structured-output Laravel AI agent defining the skill-validation schema. |
| tests/Support/Console/ValidateSkillsCommand.php | Adds a command that discovers SKILL.md files and dispatches validation jobs (sync/async). |
| tests/Support/Jobs/ValidateSkillJob.php | Implements the queued job that calls the AI provider and logs structured results. |
| prompts/skill-validation.md | Adds a standalone prompt specification for skill validation criteria/JSON shape. |
| phpunit.xml.dist | Adds PHPUnit config and default env values for Anthropic model/key behavior. |
| .github/workflows/skills-validation.yml | Adds CI workflow to run composer validation + Pest skills group. |
| composer.json | Switches package type to library, adds Boost dependency and test/dev tooling deps. |
| RULES.md | Expands guidance around skill indexing, overrides, and compatible_agents. |
| README.md | Rewrites docs toward Boost + multi-agent usage + Claude CI + skill validation workflow. |
| .gitignore | Ignores local phpunit.xml, Cursor folder, and generated validation logs. |
| AGENTS.md | Adds definitions and recommended usage patterns for multi-agent roles. |
| docs/skills/template-skill.md | Adds a reusable template for authoring skills in a workflow-oriented structure. |
| docs/concepts/mermaid/skill-template-flow.mmd | Adds mermaid diagram for skill authoring/usage flow. |
| docs/concepts/mermaid/phpstan-analysis-flow.mmd | Adds mermaid diagram for a PHPStan workflow flow. |
| resources/boost/skills/documentation/SKILL.md | Adds a new Documentation skill with a workflow/checklist format. |
| resources/boost/skills/actions/SKILL.md | Reformats/expands Actions skill into a workflow/checklist structure. |
| resources/boost/skills/controllers/SKILL.md | Reformats/expands Controllers skill into a workflow/checklist structure. |
| resources/boost/skills/general/SKILL.md | Adds compatible_agents and adds further-reading link. |
| resources/boost/skills/models/SKILL.md | Adds compatible_agents and reformats into a workflow/checklist structure. |
| resources/boost/skills/php/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/phpstan/SKILL.md | Reformats/expands PHPStan skill and adds further-reading link. |
| resources/boost/skills/services/SKILL.md | Reformats/expands Services skill into a workflow/checklist structure. |
| resources/boost/skills/albatros/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/blade/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/commands/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/design/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/docuware/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/dto/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/dusk/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/enums/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/events/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/exceptions/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/formrequests/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/general/SKILL.md | Adds further reading link section. |
| resources/boost/skills/helperfunctions/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/helpers/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/interfaces/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/jobs/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/livewire/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/middleware/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/migrations/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/observers/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/pesttesting/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/phpunit/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/policies/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/requests/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/resources/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/routing/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/saloon/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/tailwind/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/traits/SKILL.md | Adds compatible_agents frontmatter. |
| resources/boost/skills/translations/SKILL.md | Adds compatible_agents frontmatter. |
| src/Support/RefactorCommandSynchronizer.php | Removes legacy Cursor refactor-command sync helper. |
| src/Console/SyncRefactorCommand.php | Removes legacy artisan command for syncing Cursor refactor command. |
| src/Composer/RefactorCommandPlugin.php | Removes Composer plugin implementation used to sync refactor.md. |
| src/CodingGuidelinesServiceProvider.php | Removes service provider that previously registered console sync command. |
| scripts/validate-skills.php | Removes legacy non-AI PHP script validation for skills frontmatter. |
| scripts/sync-guidelines.php | Removes legacy git-clone/pull guideline sync script. |
| refactor.md | Removes legacy Cursor /refactor prompt file. |
| .github/workflows/skill-integration.yml | Removes disabled GitHub Models based skill integration workflow. |
| .github/workflows/ci.yml | Removes old CI workflow that ran scripts/validate-skills.php. |
| .github/scripts/validate-skill-response.sh | Removes bash validator for GitHub Models prompt responses. |
| .github/prompts/*.prompt.yml | Removes multiple GitHub Models prompt definition files for skills. |
Comments suppressed due to low confidence (1)
composer.json:21
autoload.psr-4mapsCodebarAg\\CodingGuidelines\\tosrc/, butsrc/does not exist in the repository after this PR. Either add thesrc/directory (even if empty) or remove/adjust this PSR-4 mapping to avoid confusing autoload configuration and potential tooling warnings.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| file_put_contents( | ||
| $logFile, | ||
| json_encode($logEntry, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).PHP_EOL, | ||
| FILE_APPEND | ||
| ); |
There was a problem hiding this comment.
Jobs are dispatched per SKILL.md and may run concurrently; writing to a single shared log file with FILE_APPEND but without LOCK_EX can interleave writes and corrupt JSON lines. Consider using file_put_contents(..., FILE_APPEND | LOCK_EX) or Laravel's logger (separate channel) to ensure atomic writes.
| if (! is_dir($logDir)) { | ||
| mkdir($logDir, 0777, true); | ||
| } |
There was a problem hiding this comment.
mkdir($logDir, 0777, true) is not checked for failure, which can lead to warnings/notices and later log writes failing silently. Use a safer permission (e.g. 0755) and handle the failure case (or mirror Laravel's File::ensureDirectoryExists).
| file_put_contents($logFile, ''); | ||
|
|
There was a problem hiding this comment.
This command unconditionally truncates storage/logs/skills-validation.log (file_put_contents($logFile, '')). If the command is re-run locally while debugging, this discards prior validation history. Consider only truncating when an explicit --fresh/--reset-log flag is passed, or writing to a timestamped log file per run.
| env: | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| ANTHROPIC_MODEL: ${{ secrets.ANTHROPIC_MODEL }} | ||
| run: vendor/bin/pest --group=skills |
There was a problem hiding this comment.
ANTHROPIC_MODEL is set from ${{ secrets.ANTHROPIC_MODEL }}. If the secret is not configured, GitHub Actions will still set the env var to an empty string, which can override the default model selection in code/tests and cause AI calls to fail. Prefer omitting this env var when unset, or provide a default in the workflow expression (or in code treat empty string as “unset”).
| $model = env('ANTHROPIC_MODEL', 'claude-3-5-sonnet@20240620'); | ||
| $expectedJobs = iterator_to_array($finder); | ||
|
|
||
| Bus::assertDispatched(ValidateSkillJob::class, count($expectedJobs)); |
There was a problem hiding this comment.
Bus::assertDispatched() does not accept a dispatch count as the second argument (it expects an optional callback). Passing count($expectedJobs) here will be treated as a callback and can cause a type error / failed assertion. Use Bus::assertDispatchedTimes(ValidateSkillJob::class, count($expectedJobs)) (or keep assertDispatched() with a callback and separately assert the count).
No description provided.