agentleFS
leekleek/laravel-agent-rules/lang/CLAUDE.md

laravel-agent-rules / lang

CLAUDE.md9 starsChanged 2 months agoMITView on GitHub

Purpose: store user-facing copy. PHP and Blade read strings via __() / trans_choice() — never inline user-facing literals (see app/CLAUDE.md).

The file

We split this CLAUDE.md into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    MUST: keep keys stable once shipped — changing a key is a breaking rename for every call site.

    line 14
  2. Distinctive:

    MUST NOT: put HTML structure in translation strings when a Blade component can own the markup — translate phrases, not full layout.

    line 20

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Localization (lang/)

Purpose: store user-facing copy. PHP and Blade read strings via __() / trans_choice() — never inline user-facing literals (see app/CLAUDE.md).

Layout

  • PHP files: lang/{locale}/*.php returning arrays — e.g. lang/en/orders.php with keys like 'status' => ['pending' => 'Pending'].
  • JSON files: lang/{locale}.json for short UI strings keyed by the source English phrase, when the project prefers that style.
  • MUST name PHP files and array keys snake_case — orders.php, article_added, not Orders.php / articleAdded.
  • SHOULD group by domain or feature (orders, auth, validation) rather than one giant messages.php.

Keys

  • MUST keep keys stable once shipped — changing a key is a breaking rename for every call site.
  • SHOULD nest by concept: __('orders.status.pending') rather than flat __('orders_status_pending').
  • MUST pass interpolations as the second argument: __('mail.invoice_paid.subject', ['number' => $invoice->number]).

Rules

  • MUST NOT put HTML structure in translation strings when a Blade component can own the markup — translate phrases, not full layout.
  • AVOID concatenating translated fragments into sentences (word order differs by locale); use one string with placeholders instead.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.