Docs Guide Structure Policy
Defines what belongs in docs-guide/, how it is organised, and what rules apply to each content type.
Scope
| In scope | Out of scope |
|---|---|
All files and folders under docs-guide/ | v2/ content pages |
| Naming conventions for catalog, policy, framework, and tooling files | snippets/ component library |
| Generator freshness and CI pipeline rules | AI adapter files (.claude/, .cursor/, .windsurf/) |
_workspace/ usage within docs-guide/ | Root-level .allowlist governance (see root-allowlist-governance.mdx) |
Canonical Structure
Rules
-
Canonical sections only — new top-level subdirectories under
docs-guide/require a policy update to this document before they can be created. -
No 0-byte stubs — placeholder files with no content (e.g.
source-of-truth.mdstubs) are not permitted. A file at a nav path must contain real content or must not exist. -
Generated files must not be manually edited — all files in
docs-guide/catalog/are auto-generated. They carry agenerated-file-banner:v1comment block identifying their generator script. Manual edits will be overwritten on the next run. -
Generated files must stay current — if a generator’s source input changes (workflows, templates, docs.json, v2/index.mdx), the corresponding catalog must be regenerated before the PR merges. The
check-docs-guide-catalogs.ymlCI workflow enforces this. -
Naming conventions — follow the suffix pattern for each section:
catalog/files:<subject>-catalog.mdxpolicies/files:<subject>-policy.mdxor<subject>-governance.mdxframeworks/files:<subject>-framework.mdxfeatures/files:<subject>.mdx(no suffix required)tooling/files:<subject>.mdxor<subject>-reference.mdxrepoOps/files:<subject>-map.mdxfor maps;<subject>-secrets.mdxfor secrets;<subject>-config.mdxfor config references
-
No
-index.mdxnaming — the-index.mdxsuffix is retired. Use-catalog.mdxfor generated inventories and descriptive names for hand-maintained pages. -
Archive before delete — files being removed from navigation must move to
_workspace/archive/with a 90-day TTL before permanent deletion, unless they are empty stubs (0-byte files may be deleted immediately). -
_workspace/is not a nav path —docs-guide/_workspace/must never appear indocs.json. It is covered by.mintignore.
Enforcement
| Mechanism | Trigger | Script / Tool |
|---|---|---|
| CI check — catalog freshness | PR to docs-v2 or main | .github/workflows/check-docs-guide-catalogs.yml |
| CI generate — catalog auto-update | Push to main (source paths changed) | .github/workflows/generate-docs-guide-catalogs.yml |
| Pre-commit hook — file deletion guard | Staged deletion of any governed file | .githooks/pre-commit (deletion gate) |
Exceptions
docs-guide/_workspace/— exempt from nav and naming rules; governed byworkspace-lifecycle-policy.mdx.docs-guide/catalog/ai-tools.mdx— migrated todocs-guide/tooling/ai-tools.mdx; this exception is now resolved.- Legacy files in
_workspace/archive/during their 90-day TTL window are not subject to naming enforcement.