lerd-add-framework
Add or extend a lerd framework definition (a new PHP framework or a new major version) as versioned YAML in the lerd-frameworks store. Use whenever the task involves framework detection, per-framework workers, env wiring, doctor checks, custom commands, or scaffolding — never branch on a framework name in Go.
- License 许可
- MIT
- 所属仓库
- lerd-env/lerd
- 最近更新
- 2026-11-15
- Stars
- ★ 1.5k
- Forks
- 97
01 前言 Front Matter
- name
- lerd-add-framework
- description
- Add or extend a lerd framework definition (a new PHP framework or a new major version) as versioned YAML in the lerd-frameworks store. Use whenever the task involves framework detection, per-framework workers, env wiring, doctor checks, custom commands, or scaffolding — never branch on a framework name in Go.
03 SKILL.md 正文
Add a lerd framework definition
Frameworks are submitted to the lerd-env/frameworks repo
(https://github.com/lerd-env/frameworks) as frameworks/<name>/<version>.yaml,
one file per major version. lerd is
framework-agnostic: no Go code knows a framework's name. Everything a framework
needs is declared here as data and ships to every install within ~24h with no
binary release.
The lerd-frameworks/ directory in the lerd repo is a local checkout you can edit
and test against, but the pull request goes to lerd-env/frameworks.
Procedure
-
Copy the closest existing definition.
laravel/12.yamlis the most complete reference (workers, env services, doctor, commands, tinker). For a new major version of an existing framework, copy the previous version file and adjust. The existing YAML is the schema of record — do not invent fields. -
Fill the sections that apply (all keyed by real examples in the store):
name,version,label,public_dir,create(scaffold command, which must constrain its package to the file's own major, e.g.composer create-project laravel/laravel:^12.0)php.min/php.max— the versions the framework supportsdetect— marker file, lockfile, orcomposer:package that identifies it, including the major versionenv—.envfile/format,key_generation, and theservicesmap that wires each service (mysql, postgres, redis, mailpit, …) with detection rules and the vars to inject. Env vars belong to the site, declared here — never on workers.workers— queue, schedule, and any framework-specific long-runners. Each hascommand,restart, optionalcheck/exclude_check(composer package or file gating),conflicts_with,proxy,per_worktree,host. New workers go here, not in Go — unless a composer package owns the worker rather than the framework, in which case it goes inpackages/<vendor>-<name>.yamland is declared once for every major (see step 4).setup— post-link steps (migrate, storage:link…) with sensibledefault:doctor.checks— declarative health checks (env_combo,symlink,command) with afix:command and a humandetail:stringcommands— dashboard/TUI custom commands withiconandconfirmwhere destructivedevtools.jobs— the method that runs a queued job, so the Debug window reports the framework's queue. One entry withimplements(usually the job interface),classorextends, plusmethodand an optionalnameexpression. Nothing about it is compiled in, see the queued job seams section ofdocs/usage/framework-definitions.md.tinker,logs,console,composer,npm
-
Give it its mark and its colour.
color:is the framework's brand tint, a plain hex literal (#ff2d20) and nothing else, repeated in every version file since that is the only YAML a framework has. The mark itself is per family, so it goes beside the versioned directory asframeworks/<name>.svg, one file every version shares. That file is monochrome: a single silhouette of filled paths with nofill,stroke,styleorclassof its own, in a bare<svg viewBox="...">, since lerd strips everything but the geometry on the way in and paints it in the declared colour. Not a full colour logo and not a wordmark. This is not theicon:a command declares, which names a built-in glyph for a dashboard button. -
Update
frameworks/index.jsonif the store requires it (check how the existing entries are registered), and the README table in the lerd-env/frameworksREADME.md.A worker, command, setup step or doctor check gated on a composer package belongs to the package, so it is declared once in
packages/<vendor>-<name>.yaml(package:, an optionalversion:for the package's own major, an optionalframeworks:list ofname/min/maxscopes, thenworkers,commands,setup,doctor, and aremoves:block for what a new major of the package took away) and listed underpackagesinframeworks/index.jsonas{"name": "vendor/pkg"}, withversions/latestonly when the package publishes a file per major. lerd merges it onto the resolved definition for a project that requires the package, and the package wins a name collision with the version file. Copypackages/laravel-horizon.yaml. -
Validate end-to-end against a real project:
lerd link # in a project of that framework — detection must fire lerd site:doctor # the declared checks must runConfirm detection, PHP pinning,
.envwiring, workers, and doctor all behave.
Rules
- The PR goes to lerd-env/frameworks, not the lerd binary repo.
- Data only. If you're tempted to write Go that branches on the framework name, the logic belongs in this YAML instead.
- Version the file by major version; keep detection specific enough to pick the right one.
04 同仓库更多 Skills
lerd-hello
Greets lerd sites. Use when the user asks to greet a site.
lerd-preflight
Run the full local verification gate for lerd before committing — build, test, vet, gofmt, UI tests, installer tests, then install the local build and smoke-test. Use before every commit or PR, and whenever asked to "verify", "check CI locally", or "make sure it's green".
lerd-open-pr
Draft and open a pull request the lerd way — issue-first, correct issue linking, human prose, none of the banned sections. Use when asked to open, prepare, or draft a PR for lerd. Never creates anything on GitHub without explicit per-action approval.
lerd-add-service
Add or edit a lerd service preset (database, cache, search engine, admin dashboard) as YAML in the lerd-services store. Use whenever the task is to add a new service, a new version of a service, or wire a service into projects — never add services in Go.