docs: correct module/plugin naming convention in skills#142
Merged
Conversation
Align create-module and create-plugin skills with framework behavior
verified against core (ModuleDiscovery, ProjectPaths, ModuleAutoloader):
- Directory and Composer-name segments are always lowercase; only the
PHP namespace is StudlyCase (core derives namespace solely from
composer.json psr-4, never from directory casing).
- Three host-project tiers: app/{name}/ (single segment, vendor is
literal "app"), modules/{vendor}/{name}/ (distributable, two-segment),
packages/{name}/ (monorepo only). vendor/ is never authored into.
- create-module: add explicit name-elicitation step; replace the
capitalized app/{Module}/ with lowercase app/{name}/; add the
modules/ tier; tier-scope the vendor-derivation rule.
- create-plugin: inherit namespace from the host module's psr-4 verbatim
instead of re-deriving vendor from the project directory name (which
produced the wrong vendor for app-local modules).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Corrects the module/plugin naming convention in the
create-moduleandcreate-pluginskills, verified against core framework code.The skills previously had the directory-casing model backwards for
app/(showed a capitalizedapp/{Module}/) and were missing themodules/distributable tier.create-pluginalso re-derived the vendor from the project directory name, producing the wrong namespace for app-local modules.The correct model (confirmed against core)
composer.jsonpsr-4 (ModuleAutoloader), never from directory casing — so lowercase directories are correct, not a bug.ProjectPaths+ModuleDiscovery):app/{name}/— one level deep, single segment, vendor is the literalapp→ namespaceApp\{Name}modules/{vendor}/{name}/— recursive/any depth, two-segment distributable → namespace{Vendor}\{Name}packages/{name}/— framework monorepo only → namespaceMarko\{Name}vendor/is ephemeral and never authored into;modules/is its manual-install mirror.Changes
create-module
app/{Module}/with lowercaseapp/{name}/modules/{vendor}/{name}/distributable tiercreate-plugin
{{Vendor}}\{{Name}}from the host module's psr-4 verbatim instead of re-deriving vendor from the project directory nameVerification
Cross-checked against
packages/core/src/Module/ModuleDiscovery.php,packages/core/src/Path/ProjectPaths.php, andpackages/core/src/Module/ModuleAutoloader.php. Discovery depths, the three directory names, and psr-4-driven (casing-agnostic) namespace registration all match the documented convention. Docs-only change to skill markdown — no code or tests affected.🤖 Generated with Claude Code