Repository navigation
Backlog
Labels
documentationImprovements or additions to documentation
Description
Part of #115.
Page: directory-structure. Audit score: 13/25 (accuracy 4, coverage 2, examples 2, Mage-OS and AI guidance 3, clarity 2).
Start after #108 is merged; it changes this page.
What is wrong
- Filler introduction and a "Conclusion" that restates it. The page promises "specific examples and code snippets" and has none, not even a directory tree.
- Nine top-level directories are described in long paragraphs, in no visible order. Nothing below the first level of
pub/andvar/is explained. - "It is generally recommended not to modify files in this directory directly" (about
vendor/) is weaker than the rule on the other pages: never edit files invendor/. - It says "a PHP or Magento 2 project" and "Mage-OS / Magento 2", has no link to any other page, and overlaps with
brief-explanation-of-each-component.
What the page should cover
- A tree of the project root as Mage-OS 4.0.0 installs it, including the root files (
composer.json,composer.lock,nginx.conf.sample,auth.json.sample,package.json.sample,Gruntfile.js.sample,.php-cs-fixer.dist.php). - For each directory: what is in it, who writes to it, whether it is build output (
generated/,pub/static/,var/view_preprocessed/), and whether it belongs in version control. - Which directories must be writable in which deploy mode.
app/etc/(env.php,config.php,di.xml,registration_globlist.php,NonComposerComponentRegistration.php) and the entry points inpub/(index.php,static.php,get.php,cron.php,health_check.php).var/below the first level:log/,report/,cache/,page_cache/,view_preprocessed/,export/,.maintenance.flag.- Where Composer packages land (
vendor/<vendor>/<package>) versus project code, with a link to the component types page for the layout inside a module or theme.
Done when
- The page follows the conventions of the rewritten pages: front matter with a description of at most 160 characters, an H1 that matches the navigation label,
[TOC], sentence-case headings, tagged code fences, no "Introduction" or "Conclusion" section. - It says Mage-OS where the product is meant.
- Every command and code sample was run on a Mage-OS 4.0.0 installation. XML samples pass the
xml-samplescheck and PHP samples passphp -l. - It links to the pages it overlaps with instead of repeating them.
Reviewer notes from the audit
Line numbers refer to the page as it is with all pull requests open on 2026-11-30 merged, so they are approximate. The notes come from an AI-assisted review of the page; a note marked "doubt" was not checked against the code. Check each one before acting on it.
Problems
- (lines 11-17) filler "Introduction": "A well-organized and logical directory structure is crucial for efficient development and maintenance of complex applications."
- (lines 16-17, 62) promises "specific examples and code snippets" and ends with "Use the provided examples and code snippets"; the page has no snippet and no directory tree.
- (lines 60-62) "Conclusion" section that restates the introduction.
- (lines 21, 25, 52, 62) product naming: "a PHP or Magento 2 project", "the Mage-OS / Magento 2 application", "static files for your Magento theme", "a PHP or Mage-OS / Magento 2 project".
- (line 44) "It is generally recommended not to modify files in this directory directly" is weaker than the rule on
overview-of-magento-2-development("Never edit files invendor/"). - (lines 24-58) a numbered list of paragraphs; items 2 to 9 are single unwrapped lines of up to 500 characters; the order (app, vendor, bin, dev, setup, pub, var, lib, generated) follows no visible logic.
- (line 7) H1 "Directory Structure Documentation"; (line 2) description "A clear, beginner-friendly overview ... best practices for organized development".
- No internal link at all, although
brief-explanation-of-each-componentholds the module, theme and language-pack layouts and repeats theapp/code,app/design,app/i18nandsetup/facts. - (line 52)
pub/is described withoutpub/errors/,pub/static.php,pub/get.php,pub/cron.php,pub/health_check.php; (line 54)var/withoutvar/log/,var/report/,var/cache/,var/page_cache/,var/view_preprocessed/,var/export/,var/.maintenance.flag.
Missing
- A tree of the project root as installed by 4.0.0, including root files (
composer.json,composer.lock,nginx.conf.sample,.htaccess,auth.json.sample,Gruntfile.js.sample,package.json.sample,.php-cs-fixer.dist.php,phpserver/). - Which directories must be writable in which mode, and which are build output (
generated/,pub/static/,var/view_preprocessed/). - What belongs in version control and what does not.
- The other files in
app/etc/(registration_globlist.php,NonComposerComponentRegistration.php,vendor_path.php) and inapp/(bootstrap.php,autoload.php). - Where a Composer-installed extension lands (
vendor/<vendor>/<package>) versus project code, and where theinisamples are (vendor/mage-os/magento2-base/php-cli.ini.dist).
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentation
Activity