Shared module providing documentation formatting, naming, structural, and depth standards. Preloaded by all engines. NOT user-invocable.
This module is the single source of truth for all formatting, naming, structural, and depth rules governing the docs/ folder. Every engine preloads this module — NEVER duplicate these rules elsewhere.
| Type | Convention | Example |
|---|---|---|
| Section index | _index.md (underscore prefix) | docs/02-post-types/_index.md |
| Individual doc | Kebab-case matching source file or system name | post.md, build-system.md |
| Appendix | Letter prefix A- through G- (next available) | A-complete-hook-registry.md |
| Changelog entries | Date-based under month headings | ### 2026-02-26 — Short Title |
docs/NN-section/ directory MUST have a _index.md._index.md.About.md.G-).# [Post Type Name]
## Overview — ## Source File — ## Registration — ## Fields / Meta Keys — ## Hooks — ## Templates — ## Admin UI — ## Related Docs
# [Taxonomy Name]
## Overview — ## Source File — ## Registration Args — ## Term Meta — ## Admin UI — ## Query Modifications — ## Related Docs
# [Helper Name]
## Overview — ## Source File — ## Namespace — ## Functions (table) — ## Related Docs
# [Hook Group Name]
## Overview — ## Hooks (table: Hook Name | Type | Priority | Callback | Behavior) — ## Dependencies — ## Related Docs
# [Shortcode Category]
## Overview — ### [shortcode_tag] — Attributes table — Output HTML — Example — ## Related Docs
# [Endpoint Name]
## Overview — ## Route — ## Method — ## Parameters — ## Response Shape — ## Authentication — ## Related Docs
# [Component Name]
## Overview — ## Files — ## Variables / Context — ## Callers — ## Related Docs
# [Module Name]
## Overview — ## Source File — ## Exports — ## Event Listeners — ## DOM Dependencies — ## Imports — ## Related Docs
# [Field Group Name]
## Overview — ## Sync Method — ## Fields — ## Location Rules — ## Related Docs
# [Service Name] Integration
## Overview — ## Service — ## API — ## Credentials — ## Data Flow — ## Error Handling — ## Related Docs
Citation placement: Citations appear immediately after the documentation element they support. See the citations module for format rules.
themes/foreign-policy-2017/).function_name(), $variable, class-name.php.[LEGACY] tag marks deprecated systems — add to document title.[NEEDS INVESTIGATION] for unclear behavior — NEVER guess or fabricate.| System | What to Document |
|---|---|
| Post types | Every field, meta key, hook, template, taxonomy, admin customization |
| Taxonomies | Registration args, admin UI, term meta, query modifications |
| Helpers | Every function: full signature, parameters, return type, callers, side effects |
| Hooks | Hook name, priority, callback function, behavior, dependencies |
| Shortcodes | Tag name, all attributes with types/defaults, output HTML, example usage |
| REST endpoints | Route pattern, HTTP method, parameters, response shape, authentication |
| Components | File path, expected variables/context, output structure, who calls it |
| JavaScript | Every export, event listener, DOM dependency, import (same depth as PHP) |
| ACF field groups | Sync method (JSON/PHP/both), every field with type/key, location rules |
| Integrations | Service, API, credentials, data flow, error handling |
When creating or modifying docs that contain any of the following, the corresponding appendix MUST be checked and updated:
| When you add/change... | Also update... |
|---|---|
A hook (add_action/add_filter) | appendices/A-complete-hook-registry.md |
| A shortcode | appendices/B-shortcode-quick-reference.md |
| A REST route | appendices/C-rest-route-reference.md |
A constant (define()/const) | appendices/D-constants-reference.md |
| A dependency (Composer/npm/external) | appendices/E-third-party-dependencies.md |
| An ACF field group | appendices/F-acf-field-group-reference.md |
| A feature template | appendices/G-feature-template-catalog.md |
[NEEDS INVESTIGATION] — never fabricate content.Src value.docs/FLAGGED CONCERNS/.