Skip to content

Consolidate Claude config: shared vs personal split + project.md#4035

Draft
Leiyks wants to merge 3 commits into
masterfrom
leiyks/claude-config-consolidation
Draft

Consolidate Claude config: shared vs personal split + project.md#4035
Leiyks wants to merge 3 commits into
masterfrom
leiyks/claude-config-consolidation

Conversation

@Leiyks

@Leiyks Leiyks commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What & why

Our repo .claude/ config had a shared team config and per-developer config coexisting, where the personal part was only hidden by each developer's global gitignore (*.claude). That isn't portable to teammates and would silently hide any new shared file too.

This PR makes the split explicit and repo-side, and folds project-level knowledge into the shared config.

Changes

  • .claude/.gitignore (new) — ignores per-developer paths in place so they never get committed, regardless of anyone's global gitignore:
    • personal/* (except README.md), commands/, scripts/, skills/omc-reference/, settings.local.json, worktrees/, .omc/
    • Commands/scripts/skills stay in their canonical dirs (so Claude Code still discovers them) but are ignored.
  • .claude/personal/ (new, git-ignored except README) — each developer's drop zone. Put personal memory in personal/CLAUDE.md; the root CLAUDE.md imports it via @.claude/personal/CLAUDE.md if present. README.md documents the convention.
  • .claude/project.md (new) — project knowledge (overview, layout, architecture, INI, conventions) written in the existing terse house style. It cross-references the existing build/CI/debug docs instead of duplicating them.
  • CLAUDE.md — now links general.md, project.md, ci/index.md and imports the optional personal config.

Verified

  • From a teammate's perspective (no global *.claude): the shared files stage cleanly and every personal path is refused by the local .gitignore.
  • All internal doc links resolve.
  • No personal files are included in this PR (only the 4 shared files).

Adopting locally

If you currently rely on a global *.claude ignore, you can drop it — this repo now handles the split itself. Move personal memory to .claude/personal/CLAUDE.md.

Add a portable, repo-side convention so each developer can keep personal
Claude config alongside the shared team config without committing it, and
fold project-level knowledge into the committed common config.

- .claude/.gitignore: ignore per-developer paths (personal/, commands/,
  scripts/, skills/omc-reference/, settings.local.json, worktrees/, .omc/)
  in place; keep personal/README.md committed. Previously this relied on
  each developer's global gitignore, which isn't portable and silently
  hid new shared files.
- .claude/personal/: git-ignored drop zone for per-developer config;
  CLAUDE.md optionally imports personal/CLAUDE.md if present.
- .claude/project.md: project knowledge (overview, layout, architecture,
  INI, conventions) in the terse house style, cross-referencing the
  existing build/CI/debug docs instead of duplicating them. Reflects the
  ext/ -> tracer/ split (#3912); versions reference VERSION / Cargo.toml
  / rust-toolchain.toml rather than being pinned inline.
- CLAUDE.md: link general.md, project.md, ci/index.md and import personal.
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 8, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 4 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | ASAN test_c with multiple observers: [8.5]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [8.4]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | Loader test on amd64 libc: [5.6, nts, buster]   View in Datadog   GitLab

View all 4 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 20 jobs - 16 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 54.08% (+0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 549eae4 | Docs | Datadog PR Page | Give us feedback!

Plain markdown links in CLAUDE.md are not injected into context by Claude
Code — only @-imports are. Import general.md and project.md so the shared
operating rules and project knowledge are always loaded alongside each
developer's personal config. ci/index.md stays a link (large on-demand CI
reference).
@Leiyks Leiyks force-pushed the leiyks/claude-config-consolidation branch from b315fbb to 71979cc Compare July 8, 2026 13:58
… commands

Addresses PR review feedback:

- .claude/.gitignore: commands/ is now personal-by-default via `/commands/*`
  (instead of ignoring the whole dir), so the team CAN commit shared commands
  by un-ignoring them while personal ones stay ignored. Claude Code discovers
  commands by filesystem regardless of git status, so both coexist.
- Scripts: shared helper scripts moved into .claude/scripts/ (dd_php_release_url,
  find_map_region.py, parse_ucontext.py); personal scripts go in
  .claude/scripts/local/ (git-ignored). crash-analysis skill refs updated.
- Debugging docs grouped under .claude/debugging/ with an index.md (like ci/):
  gdb.md, appsec-integration.md (was debugging.md), system-tests.md (was
  debugging-system-tests.md). All inbound/outbound links updated.

Note: ci/ keeps its own co-located tooling (dockerh, check-ci, ...) since those
are referenced throughout the ci/ docs as a self-contained module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant