diff --git a/src/public/ai/SKILL.md b/src/public/ai/SKILL.md index bf067b9e..7e3680d2 100644 --- a/src/public/ai/SKILL.md +++ b/src/public/ai/SKILL.md @@ -107,7 +107,7 @@ echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc && source ~/. echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.zshrc && source ~/.zshrc ``` -**Always use the global `leaf` CLI (no `php` prefix) for everything.** It carries its own commands (`create`, `install`, `uninstall`, `context`, `up`, `update`) and forwards anything else (`db:*`, `g:*`, `scaffold:*`, ...) into the project's own console automatically, so `leaf g:controller Posts` and `leaf db:migrate` just work. `php leaf`, by contrast, runs only the project console, so `php leaf install` and `php leaf context` fail with "not found". Only fall back to `php leaf ` when the global CLI isn't installed, and then `leaf install auth` becomes `composer require leafs/auth`. +**Use the global `leaf` CLI (no `php` prefix) whenever it is installed.** Check with `which leaf`. It carries its own commands (`create`, `install`, `uninstall`, `context`, `up`, `update`) and forwards anything else (`db:*`, `g:*`, `scaffold:*`, ...) into the project's own console automatically, so `leaf g:controller Posts` and `leaf db:migrate` just work. If `leaf` is not installed, run the same command as `php leaf ` from the project root. `php leaf install` and `php leaf context` work there too in current MVC and API projects. On an older project where they are missing, `leaf install auth` becomes `composer require leafs/auth`. `create`, `uninstall`, `up` and `update` exist only in the global CLI, which installs with `composer global require leafs/cli`. | Command | Description | |---|---| @@ -249,7 +249,7 @@ Read the relevant file before generating code for that area: | Topic | File | |---|---| -All reference files live at `https://leafphp.dev/ai/references/.md`, fetch them raw from there. +Reference files ship with the framework at `vendor/leafs/mvc-core/ai/references/.md`, so read them from disk first. Only if that path is missing, fetch `https://leafphp.dev/ai/references/.md` raw. | Lite apps: the manual setup contract (db, views, Vite, schema) | `references/lite.md` | | Routing (methods, groups, dynamic routes, constraints) | `references/routing.md` |