Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/leaf/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ The full guide ships with the framework. Read it before writing code:
2. `vendor/leafs/mvc-core/ai/references/<topic>.md` has the detail for each area (routing, database, auth, views and so on). The table in SKILL.md says which file to open.
3. If `vendor/` is missing, run `composer install`. If you cannot, fetch https://leafphp.dev/ai/SKILL.md instead.

Also read `AGENTS.md` for the commands to run (`php leaf ...`) and `.leaf/CONTEXT.md` for this project's goals and decisions.
Also read `AGENTS.md` for the commands to run (`leaf ...`, or `php leaf ...` when the Leaf CLI is not installed) and `.leaf/CONTEXT.md` for this project's goals and decisions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ hot
storage/framework
storage/logs
storage/database
storage/app/db
public/storage

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep storage/database in the gitignore, so this becomes an addition

# Logs
Expand Down
2 changes: 1 addition & 1 deletion .leaf/CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Format rules, so every agent's edits stay compatible:
3. A line wrapped in underscores is a placeholder. If it contains `agent:`, it is an instruction to you: act on it, then replace the line with real content (or delete it if it no longer applies).
4. Keep entries to a single line each where possible, so edits from different agents merge cleanly.
5. Never store secrets, keys, or tokens here. Refer to `.env` keys by name only.
6. Do not duplicate mechanical information (routes, models, structure, modules). That lives in the code and in `php leaf context`. This file holds only what the code cannot say: goals, decisions, and the reasoning behind them.
6. Do not duplicate mechanical information (routes, models, structure, modules). That lives in the code and in `leaf context`. This file holds only what the code cannot say: goals, decisions, and the reasoning behind them.

When your work is complete:

Expand Down
14 changes: 8 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Agent Instructions

Leaf has a module for each of these jobs. Use them instead of writing your own. Run every command as `php leaf ...` from the project root (a global `leaf` is optional, use it only if `which leaf` succeeds).
Leaf has a module for each of these jobs. Use them instead of writing your own.

Run commands as `leaf ...` when the Leaf CLI is installed (`which leaf` succeeds). If it is not, run the same command as `php leaf ...` from the project root.

1. Never write raw PDO or your own password/token/session code. Use Leaf models, schema files and `leafs/auth`.
2. Auth: `php leaf scaffold:auth` (web) or `php leaf scaffold:auth --scaffold=api` (API).
3. Models: `php leaf g:model Product`. Controllers: `php leaf g:controller ProductsController`.
4. Tables: `php leaf g:schema products`, edit the file in `app/database/`, then `php leaf db:migrate`.
5. Modules: `php leaf install <name>` (for example `php leaf install auth`). If that command is missing, `composer require leafs/<name>`.
6. Not sure what exists? `php leaf list` shows every command and `php leaf context` prints a map of this app.
2. Auth: `leaf scaffold:auth` (web) or `leaf scaffold:auth --scaffold=api` (API).
3. Models: `leaf g:model Product`. Controllers: `leaf g:controller ProductsController`.
4. Tables: `leaf g:schema products`, edit the file in `app/database/`, then `leaf db:migrate`.
5. Modules: `leaf install <name>` (for example `leaf install auth`). If that command is missing, `composer require leafs/<name>`.
6. Not sure what exists? `leaf list` shows every command and `leaf context` prints a map of this app.

Before changing code, read `.leaf/CONTEXT.md` for the project goals and decisions made so far.

Expand Down