Skip to content

Commit 8a585f7

Browse files
committed
Warn about LLMs being allowed to alter project config
1 parent ac65ae3 commit 8a585f7

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

docs/5.x/system/project-config.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Project Config
22

3-
Craft tracks system settings in a centralized store called _Project Config_. Changes are recorded as YAML files in the `config/project/` folder, which can be version-controlled alongside your templates and other front-end resources.
3+
Craft tracks system settings and content schema in a centralized store called _Project Config_. Changes are automatically written to YAML files in the `config/project/` folder, which can be version-controlled alongside your templates and other front-end resources.
4+
5+
<!-- more -->
46

57
This workflow provides two main benefits:
68

7-
1. Your [project’s state](#whats-stored-in-project-config) is tracked over time.
9+
1. Your [project’s state](#scope) is tracked over time.
810
2. Settings are [automatically propagated](#propagating-changes) to other development/staging/production environments.
911

1012
The overarching principle behind Project Config is to separate the management of content and settings. In doing so, it’s possible to establish a one-way flow for configuration, and to tie settings and schema to the rest of your project’s code.
@@ -22,10 +24,9 @@ Broadly speaking, Project Config tracks things that are managed via the **Settin
2224
- Craft and plugin schema versions
2325
- Craft edition
2426
- Email settings
25-
- Fields, field groups, and all field layouts
27+
- Fields and field layouts
2628
- Global sets (settings only, not their content)
2729
- GraphQL schemas, and the access settings for the public schema
28-
- Matrix block types
2930
- Plugin versions, editions, and settings
3031
- Routes defined in **Settings****Routes**
3132
- Sections and entry types
@@ -42,15 +43,19 @@ Plugins and Modules can store their own settings in Project Config, too. See [Su
4243

4344
Project Config is always active, but you may need to adjust your workflow to get the most out of it.
4445

45-
Use of Project Config often involves disabling the <config5:allowAdminChanges> option in all but development environments, which makes the **Settings** section of the control panel inaccessible—even for admin users. This guarantees settings are only changed under circumstances where their effects can be tested alongside any relevant templates or code.
46+
Use of Project Config often involves disabling the <config5:allowAdminChanges> option in all but development environments, which puts the **Settings** section of the control panel in read-only mode—even for admin users. This guarantees settings are only changed under circumstances where their effects can be tested alongside any relevant templates or code.
4647

4748
Suppose you are asked to add a new entry type to an existing section. The process is probably pretty familiar: make some updates via the control panel, adjust templates and styles, then push your code. But how does the new entry type definition actually make it to the live site?
4849

4950
- **Without** Project Config, you would eventually need to squash a live database with a development one (risking content loss), or copy settings from one control panel to another (risking misconfiguration).
5051
- **With** Project Config, Craft tracks the schema changes as YAML and can apply them automatically (as part of your deployment process) or at the click of a button.
5152

5253
::: warning
53-
Never directly edit YAML files. Missing changes in other parts of the Project Config that should be made simultaneously can cause inconsistencies and instability.
54+
Directly editing YAML files can cause inconsistencies and instability.
55+
Craft should have exclusive control over the `config/project` directory.
56+
57+
This applies to LLMs and coding agents, as well: their training data will include configuration from many different (incompatible) versions of Craft.
58+
Invalid configuration puts your data and access at risk.
5459
:::
5560

5661
## Propagating Changes
@@ -90,7 +95,7 @@ Project Config simplifies collaboration on big features by letting you share ver
9095
Merge conflicts _can_ still happen (when two contributors modify the same setting), but resolving them is rarely more difficult than a template or stylesheet—you’ll just have to run `php craft project-config/touch` and then `php craft project-config/apply` to ensure the final result is applied.
9196
:::
9297

93-
Any time you integrate new code into an environment (say, while developing locally, or deploying to a server), run `craft up` to apply pending migrations and project config changes.
98+
Any time you integrate new code into an environment (say, while developing locally, or deploying to a server), run `craft up` to apply pending migrations and Project Config changes.
9499

95100
## Adopting Project Config
96101

0 commit comments

Comments
 (0)