Skip to main content

Clayton Policies Explained

David Martin avatar
Written by David Martin
Updated this week

In Clayton, Policies are sets of rules and criteria designed to enforce coding standards, security measures, and best practices within your projects. They help maintain code quality and ensure compliance with industry standards.

By implementing and customizing these policies, teams can proactively manage code quality, adhere to best practices, and reduce technical debt across their projects.

Admin users can enable and disable policies to make them available to every project to achieve specific security and development goals.

Editing which Policies are applied to you project

To edit which policies are applied to your project, first select the project. Then, navigate to the Settings tab. On the right-hand side, you can toggle on or off the policies you wish to apply to that specific project.

Set up and edit your Policies

From the Clayton homepage, select the Admin Tool located at the bottom left of the page, then choose Policies from the dropdown menu.

From this screen, you can select which individual rules are included by default in each policy and set the policy behavior, allowing rules to be configured as opt-in, opt-out, mandatory, or disabled. Each rule also has an assigned severity level, indicating the risk and potential impact on technical debt for issues within an application.

Create your custom policy

From the Clayton home page navigate to the admin tool on the bottom left of the screen and select Policies and then add New policy. You can now search for through all the existing rules and add them to your policy.


Next you will have the option to configure the behavior of your policy. After this will have the option give your new Policy a name and description.



​Publishing a policy

All new policies default to being in the draft status, to publish your policy, go to the Policies page in the admin tool, navigate to the Draft section, and select pencil icon.


From the next tab select the publish button on the top right hand side. You will now be able apply this


Policy Behavior

You can configure the behavior of your policy to make certain presets mandatory for all projects or optional, allowing Project Leads to decide which rules to enable. Policies can also be set to Disabled, OPT-OUT, OPT-IN , or Mandatory.

  • Disabled: the policy cannot be used in any project

  • OPT-OUT (default for new projects is ON): the policy is enabled by default when creating a new project, the Project Leads can decide to switch it off

  • OPT-IN (default for new projects is OFF): the policy is disabled by default when creating a new project, the Project Leads can decide to switch it on

  • Mandatory for all projects: the policy is enabled, and the Project Leads cannot switch it off



Did this answer your question?