Rules file authoring considerations

Rules file authoring considerations help write clear, project-based rules for all workflows.
Tip
Description
Severity keyword on every rule
Include a severity keyword so
AI Assistant
knows how strictly to enforce the rule.
One rule per item
State one rule per item. Split combined rules into separate items.
Be specific
Avoid vague statements. For example, use
Programs MUST use names of the form {Area}_{Function}
instead of
Prefer good program names
.
Project-based rules
Base rules on the actual project. Use real prefixes, device families, and conventions.
Be concise
Split long or multi-topic rules files into topic-specific files, such as
rules_naming.md
or
rules_devices.md
.
Rules across modes
Rules apply across modes. A rule written for the Plan mode also applies to other modes.

Severity keywords

Start each rule with a severity keyword to indicate how strictly the
AI Assistant
enforces the rule.
Severity
Keyword
Agent response
Strict
MUST
REQUIRED
NEVER
Refuses
non-compliant requests and asks for a compliant approach.
Advisory
SHOULD
RECOMMENDED
Warns
about deviations but proceeds if you acknowledge.
Optional
MAY
OPTIONAL
Prefers
the rule when practical but treats it as a soft suggestion.

Example rules file

In the following example, each item uses a severity keyword and references a specific project item. It also provides enough details for
AI Assistant
to apply it without further interpretation. Use it as a reference for creating clear and project-based rules files.
# Project Rules ## Naming Conventions - Tag names MUST follow `{Area}_{Type}_{Equipment}_{Function}`, e.g., `MX1_DI_P101_RUN`. - Program names MUST be functional descriptors (e.g., `PumpControl`, `TankControl`). `Main` is reserved and MUST NOT be used. ## Programming Standards - Routines MUST be written in Ladder Logic unless math-heavy, in which case they MAY use Structured Text. - Outputs MUST use OTE with seal-in; OTL/OTU MUST NOT be used. ## Library Usage - Repeated equipment patterns (motors, valves) SHOULD be implemented as AOIs from the project library rather than ad-hoc ladder.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal