The four levels
Settings are defined in.factory/ folders with a consistent structure at four levels:
.factory/ folder can contain:
settings.json– general settings (models, safety, preferences, telemetry).mcp.json– MCP server configurations.droids/– droid definitions.commands/– custom commands.hooks/– hook definitions.
Extension‑only semantics
Factory uses extension‑only semantics instead of traditional “override” behavior.- Higher levels (org, project) cannot be overridden by lower levels.
- Lower levels (folder, user) can only add to what higher levels define when those fields are unset.
- This ensures org policies remain intact even as projects and users customize their experience.
1. Simple values – first wins
For simple scalar values (strings, numbers, booleans):- The first level that sets a value “wins.”
- Lower levels cannot change or remove that value.
sessionDefaults.modelsessionDefaults.autonomyLevelmaxAutonomyLevel
2. Arrays – union, cannot remove
Array fields accumulate across levels:- Org entries are always present and cannot be removed.
- Project and folder levels can add more entries.
- User level can add more entries but cannot remove or weaken higher‑level entries.
- Command allow lists and deny lists.
- Lists of enabled hooks or features.
3. Objects – keys are locked per level
For object fields:- Keys defined at a higher level are locked; their contents cannot be changed by lower levels.
- Lower levels can add new keys but not modify or delete existing ones.
customModels– org definesclaude-enterprise; projects can addpayments-gpt, users can addpersonal-experimental, but none can change or removeclaude-enterprise.- MCP server definitions – org defines which servers exist and how they connect; projects decide which to use.
Org configuration
Large organizations typically manage an org‑level.factory bundle or config endpoint that:
- Specifies allowed models, gateways, and BYOK policies.
- Defines global command allow/deny lists.
- Sets defaults for autonomy, reasoning effort, and safety features like Droid Shield.
- Configures OTEL defaults (endpoints, sampling, and attributes).
- Publishes org‑standard droids, commands, and hooks.
Project and folder configuration
Projects and folders use.factory/ directories checked into version control to specialize org policy for particular codebases and teams.
Common responsibilities include:
- Adding project‑specific models and gateways within the allowed set.
- Defining project‑specific droids (for example,
/migrate-service,/refactor-module). - Configuring hooks that know about the project’s tests, linters, and deployment processes.
- Tightening safety controls for high‑risk repositories.
.factory/ directories are useful in monorepos where different subsystems have different policies.
User configuration
Developers can configure~/.factory/ for personal preferences only where higher levels are silent.
Examples:
- Choosing a preferred model from the allowed set.
- Setting default behavior for display options and minor UX preferences.
- Enabling additional hooks or tools that do not conflict with org policy.
- Re‑enable models or tools that org or project settings have disallowed.
- Loosen command allow/deny lists.
- Reduce autonomy or safety requirements set by org or project.
Example: enforcing a model policy
Suppose your org wants to:- Allow only approved enterprise models.
- Disallow user‑supplied API keys.
- Force all prompts through a particular LLM gateway.
- Define the allowed models and gateway endpoints in the org
.factory/settings.json. - Set a policy flag to disable user BYOK entirely.
- Configure hooks to verify that any model selection or endpoint use matches the org‑approved set.
Example: environment‑specific autonomy
Consider an org that wants to:- Allow high autonomy in CI and sandboxed containers.
- Limit autonomy on developer laptops.
- At org level, set
maxAutonomyLeveltohigh. - In project settings, define environment‑aware hooks that:
- Inspect environment tags (for example,
environment.type=local|ci|sandbox). - Downgrade or block autonomy levels above
mediumwhen running on laptops.
- Inspect environment tags (for example,
- Optionally, define stricter folder‑level policies for particularly sensitive repos.
Putting it all together
The hierarchical settings system underpins everything described in the other enterprise pages:- Identity & Access Management – who can change which level of settings.
- Privacy, Data Flows & Governance – where data and telemetry are allowed to go.
- Network & Deployment Configuration – which environments Droid can run in and how it connects.
- LLM Safety & Agent Controls – policies for commands, tools, and Droid Shield.
- Models, LLM Gateways & Integrations – control over models, gateways, MCP servers, droids, and commands.
- Compliance, Audit & Monitoring – guarantees and telemetry used to prove compliance.
