CertPrep
Domain 2 · Lesson 2.3 · 5 min read

Configuration Across Environments and CI

Exam skillConfiguration and SDLC Integration

Determining the correct configuration for a Claude system from its configuration artifacts and SDLC context, including CLAUDE.md files, settings.json, model version pinning, prompt versioning, plugin dependencies, and CI integration, and assessing how a configuration change affects each environment.

Work out the effective configuration of a Claude system from its artifacts (CLAUDE.md levels, settings.json precedence, pinned model IDs, versioned prompts, plugin dependencies, CI jobs) and predict how a change in one file affects development, staging, CI and production.

What you need to know

Claude Code settings precedence

From highest to lowest:

  1. Managed settings (deployed by administrators; cannot be overridden)
  2. Command-line arguments
  3. Local project .claude/settings.local.json (personal, git-ignored)
  4. Shared project .claude/settings.json (committed for the team)
  5. User ~/.claude/settings.json

Within permissions, deny beats ask beats allow. A managed deny cannot be undone by a project allow.

CLAUDE.md levels

FileScope
Managed policy CLAUDE.mdOrganization-wide instructions
~/.claude/CLAUDE.mdThe developer's personal preferences, every project
./CLAUDE.md (or .claude/CLAUDE.md)Team conventions, committed with the repo
CLAUDE.md in subdirectoriesLoaded when Claude works with files there
.claude/rules/*.md with pathsLoaded only for matching files

All applicable files load; more specific ones add detail. Keep CLAUDE.md short: it loads every session, so a 900-line file dilutes the rules that matter. Move reference material to files loaded on demand.

Models and prompts as versioned artifacts

  • Pin a dated model ID in production. Aliases move to new snapshots and can change behavior without a deploy. Track deprecation dates and migrate before retirement.
  • Version prompts in source control and log the prompt version and model ID with every response, so an output can be traced to its configuration.
  • Gate changes with the regression set, for prompts exactly as for model upgrades.
  • Promote configuration through environments: the same model ID, prompts and project files in staging and production, so they are comparable.

Plugins and dependencies

A plugin bundles Skills, hooks, subagents and MCP servers. It must be self-contained or declare what it needs: bundle scripts and reference them with ${CLAUDE_PLUGIN_ROOT}, declare dependencies on other plugins, and never rely on tools only the author has installed.

CI integration

  • CI runs read the repo's CLAUDE.md and settings, so team conventions apply there too.
  • Limit the job's tools and permissions to what it needs (for example, read and comment, no push).
  • Use headless mode with --output-format json for machine-readable results, --max-turns and a job timeout as bounds.

In the exam

Items show configuration files and an environment, and ask what is in effect or what a change will do. Apply precedence, check which environments load the changed file, and prefer pinned, versioned, promoted configuration. Distractors assume user settings win, treat CLAUDE.md as enforcement, use aliases for stability, or fix environment drift by copying logs.

Check your understanding

Question 1

A managed setting denies Bash(curl:*); the project allows it. What happens?

Show answer

Answer: C. Managed settings sit at the top, and deny wins over allow.

Question 2

Where do personal settings for one repo go without changing the team's file?

Show answer

Answer: B. Local project settings are personal and git-ignored.

Question 3

Why pin a dated model ID in production?

Show answer

Answer: D. An alias can move to a new snapshot; a pinned ID changes only when you change it.

Apply it: Untangle Quarry Lane's configuration

Exercise · about 25 minCase: Quarry Lane Software

Quarry Lane's CLAUDE.md is 940 lines. Security wants git push --force and edits to infra/prod/ blocked on every laptop. The help assistant's prompt changes weekly and support cannot explain answer changes. A plugin update broke the release Skill in CI.

  1. Restructure memory: what stays in CLAUDE.md and where the rest goes.
  2. Place the security rules in the right settings layer.
  3. Make prompt changes traceable and tested.
  4. Fix the plugin so it works in CI.
    Done when: every rule lives in the layer that enforces or scopes it.
Check your work
Show model answer

1. CLAUDE.md keeps build and test commands, framework conventions and must-follow constraints (under about 150 lines). The API reference moves to docs loaded on demand or a Skill; package-specific rules go to .claude/rules/ with paths; the decisions log moves to a docs file.

2. Managed settings with deny rules for Bash(git push --force:*) and Edit(./infra/prod/**), distributed by IT through server-managed settings, so no project or user can remove them.

3. Prompts in the repo with version IDs; every response logs prompt version and model ID; a changelog per version; the regression set (including Spanish cases) runs in CI on every prompt change.

4. Bundle the release script in the plugin and call it through ${CLAUDE_PLUGIN_ROOT}; declare any dependency; test the plugin in the CI container before publishing.

Key termsCLAUDE.mdModel migrationsettings.json

Sources