Project Conventions

intermediate feature

Editor Doctor Pro · Features

Project Conventions

The Project Conventions module enforces project-level rules without paternalism. Three native checks ship in v1.0; a power-user rule engine lets you author your own.

Native checks

IdDefault severityAuto-fix?What it does
EDP-LINT-STRAY Misplaced assetWarnManualLearning-based detector - finds the dominant-majority folder for each asset type and flags any asset of the same type living elsewhere.
EDP-LINT-TAG-CONTRACTWarn (or Error in strict mode)ManualVerifies that every GameObject tagged with one of the user-defined tag contract pairs carries the required component.
EDP-LINT-TAG-CLOSEDInfoManualVerifies that every project-defined tag is actually used somewhere; surfaces unused tags so the closed-tag list stays clean.

Learning-based stray detection

EDP-LINT-STRAY doesn't ship a hardcoded folder convention. Instead, it walks every asset in the project, groups by asset type (Material, Prefab, Texture, etc.), and finds the folder where the dominant majority of that type lives. Any asset of the same type living in a different folder is flagged as a stray.

Two settings tune the detector:

  • Confidence threshold (default 0.8) - the minimum proportion of the dominant folder needed before stray flagging kicks in. At 0.8, the rule fires only when ≥ 80% of the type lives in one folder; below that, the project doesn't have a clear convention and the rule stays quiet.
  • Minimum sample size (default 5) - the minimum number of assets of a given type before the rule is willing to declare a convention. With 4 prefabs spread across 4 folders, the rule abstains.

Both live under Settings > Conventions.

Tag contracts

A tag contract is a user-defined pair: "every GameObject with tag X must have component Y". The rule walks every active scene and prefab, finds GameObjects with the contracted tag, and flags any that don't carry the required component. The Manual fix attaches the missing component; revert the action from Action History.

Define contracts under Settings > Conventions > Tag Contracts. Each entry takes a tag name and a component type (e.g. Player + PlayerInput, InteractableObject + Interactable). Strict mode bumps every violation to Error severity so they fail the build via the CLI --fail-on error flag.

Closed-tag list

EDP-LINT-TAG-CLOSED walks every tag declared in TagManager and verifies it is actually used by at least one GameObject in any scene or prefab. Unused tags surface as Info findings; clean them up via the standard Tags & Layers panel. There is no auto-fix - removing a tag from TagManager is a deliberate decision that affects the whole team.

Custom rules

Beyond the three native checks, the Conventions module exposes a power-user rule engine: combine predicates (PathMatches, IsType, NamePrefix, HasComponent, Not) with recipes (Flag, MoveAsset, Rename, Ignore) to author rules specific to your project. See Custom Rules for the full reference.

No paternalistic preset rules. EDP deliberately ships zero "thou shalt put prefabs in Assets/Prefabs/" or "thou shalt prefix textures with T_" preset rules. Conventions are project decisions, not vendor decisions. The native rules learn from your project; the custom rule engine lets you author the rest.
Was this page helpful?