Skip to content

feat(claude): add user-global Claude Code memory file#136

Merged
kurone-kito merged 1 commit into
masterfrom
issue/132-feat-claude-add-user-global-claude-code
May 19, 2026
Merged

feat(claude): add user-global Claude Code memory file#136
kurone-kito merged 1 commit into
masterfrom
issue/132-feat-claude-add-user-global-claude-code

Conversation

@kurone-kito
Copy link
Copy Markdown
Owner

@kurone-kito kurone-kito commented May 19, 2026

Summary

Adds home/dot_claude/CLAUDE.md so chezmoi deploys a user-global
Claude Code memory file at ~/.claude/CLAUDE.md, bringing Claude
Code to parity with the already-deployed Copilot CLI and Codex CLI
user-global files.

The new file preserves the same five sections — repository-precedence
preamble, Conversation, Commit rules (with the full P/C/A/U signing
fallback ladder), Coding standards, and Guardrails — and adds a
clarifying note that distinguishes this static file from Claude
Code's per-project auto-memory at ~/.claude/projects/. Wording
uses "continue autonomously / pause to ask" rather than the Copilot
product-specific "Agent mode" / "Plan mode" terms.

Closes #132
Roadmap #130

Test plan

  • npx markdownlint-cli2 "home/dot_claude/CLAUDE.md" — 0 errors
  • npx cspell home/dot_claude/CLAUDE.md — 0 issues
  • tests/bash/helpers/bats-core/bin/bats tests/bash/ — 212/212
  • pwsh -c "Invoke-Pester tests/powershell/ -Output Detailed" — 182 passed, 0 failed, 33 skipped
  • Lint + Test workflow on this PR — CI green on required checks

Signing path

GPG attempt 1 (category P pinentry — PINENTRY_LAUNCHED then
timeout). Category (P) prohibits the gpg-agent restart, so routed
directly to the project-blessed git commit-ssh alias (attempt 2).

Out-of-scope

Summary by CodeRabbit

  • Documentation
    • Added internal development guidelines and code standards documentation to establish consistent processes and practices.

Review Change Stack

`home/dot_claude/` did not exist, so chezmoi deployed nothing to
`~/.claude/CLAUDE.md`. Without a user-global `CLAUDE.md`, Claude
Code sessions in repositories that lack a project-level `CLAUDE.md`
fall back to model defaults for the conversation language policy,
Conventional Commits style, and the bounded signing fallback ladder.

Add `home/dot_claude/CLAUDE.md` modeled on the canonical Copilot
user-global file, adapted for Claude Code's interaction model: the
wording uses "continue autonomously / pause to ask" rather than the
Copilot product-specific "Agent mode" / "Plan mode" terms, and a
note distinguishes this static user-global file from Claude Code's
auto-memory subsystem at `~/.claude/projects/`. The file preserves
the same five sections (deferral preamble, Conversation, Commit
rules with the full P/C/A/U signing fallback ladder, Coding
standards, Guardrails) as the Codex and Copilot user-global files.

Track B under the symmetrization roadmap (#130). Sibling tracks
land `home/dot_gemini/GEMINI.md` (#133) and the documentation
update in `docs/ai-strategy.md` (#134) independently.

Refs #132
Roadmap #130

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 19, 2026 01:54
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 697f4445-4aa5-4790-af18-7e9dc8cf7b11

📥 Commits

Reviewing files that changed from the base of the PR and between cac548d and c17fc4e.

📒 Files selected for processing (1)
  • home/dot_claude/CLAUDE.md

📝 Walkthrough

Walkthrough

Adds home/dot_claude/CLAUDE.md, a user-global instruction file for Claude Code that deploys to ~/.claude/CLAUDE.md. It covers conversation language, Conventional Commits rules, a five-step commit signing fallback ladder (GPG classification, optional agent restart, SSH discovery, unsigned), coding standards, and guardrails. Defers to repository-specific instructions.

Changes

Claude Code User-Global Instructions

Layer / File(s) Summary
Complete user-global instruction file
home/dot_claude/CLAUDE.md
Defines Claude Code behavioral guidance, Conventional Commits format with casing/scope/subject limits and atomic commits, bounded commit signing procedure (GPG with pinentry/agent failure classification, optional gpg-agent restart, SSH fallback with key discovery, unsigned fallback), coding standards (LF line endings, trimmed whitespace, final newline, naming conventions), and guardrails (approval for community docs, truthful test/command claims).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

Possibly related PRs

  • kurone-kito/dotfiles#135: Parallel user-global instruction file for Copilot/Codex with identical signing fallback ladder structure and Conventional Commits rules.

Poem

🐇 A global guide for Claude to follow,
Commits signed tall, no fallback hollow,
From GPG calls to SSH's trust,
User-wide wisdom: a dotfile must.
Instructions stack, repo-deference true—
Now every session knows what to do! 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(claude): add user-global Claude Code memory file' is specific and accurately summarizes the main change.
Description check ✅ Passed The description provides comprehensive context including summary, test plan, signing path, and out-of-scope items, exceeding the template's minimal requirements.
Linked Issues check ✅ Passed The PR addresses all acceptance criteria from #132: file created with required sections, chezmoi mapping configured, markdownlint and cspell passed, test suite unchanged, and proper Claude-specific wording used.
Out of Scope Changes check ✅ Passed Only home/dot_claude/CLAUDE.md is added; all changes are directly in scope for #132 with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/132-feat-claude-add-user-global-claude-code

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a user-global Claude Code memory file at home/dot_claude/CLAUDE.md so chezmoi deploys it to ~/.claude/CLAUDE.md, bringing Claude Code to parity with the already-deployed Copilot CLI user-global instructions.

Changes:

  • New home/dot_claude/CLAUDE.md containing repository-precedence preamble, Conversation, Commit rules (with signing fallback ladder), Coding standards, and Guardrails sections.
  • Wording adapted to Claude Code's interaction model (continue autonomously / pause to ask), avoiding Copilot-specific "Agent mode" / "Plan mode" terms.
  • Clarifying note distinguishing this static memory file from Claude Code's per-project auto-memory under ~/.claude/projects/.

@kurone-kito
Copy link
Copy Markdown
Owner Author

claude-code-425b15e1: review triage snapshot — IDD automation marker. Do not edit.

@kurone-kito
Copy link
Copy Markdown
Owner Author

Acknowledged — recording the auto-no-action review for the F2 unreplied-comment evidence check.

@kurone-kito
Copy link
Copy Markdown
Owner Author

claude-code-425b15e1: review triage snapshot (refreshed) — IDD automation marker. Do not edit.

@kurone-kito
Copy link
Copy Markdown
Owner Author

E6 dispositions — PATH B (advisory)

Both items in ReviewItems_snapshot for head c17fc4e carry no actionable feedback and are recorded as PATH B advisory rejections.

  • copilot-pull-request-reviewer review at 2026-05-19T01:55:45Z: Rejected — review body is a pull-request overview only; no actionable findings, no change requests.
  • coderabbitai comment at 2026-05-19T01:58:00Z: Rejected — body explicitly states no actionable comments were generated.

E2 critique pass returned 0 additional findings.

@kurone-kito
Copy link
Copy Markdown
Owner Author

claude-code-425b15e1: review triage snapshot (final pre-merge) — IDD automation marker. Do not edit.

@kurone-kito kurone-kito merged commit 7b4292c into master May 19, 2026
11 of 13 checks passed
@kurone-kito kurone-kito deleted the issue/132-feat-claude-add-user-global-claude-code branch May 19, 2026 02:00
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c17fc4e645

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread home/dot_claude/CLAUDE.md
commit.gpgsign=true`). Do **not** assume the alias exists
in every repo.
- Otherwise use per-command flags:
`git -c gpg.format=ssh -c user.signingkey="<ssh-public-key>" commit -S`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prefix literal SSH signing keys with key::

When the fallback uses a literal key from ssh-add -L, this command can fail for common non-ssh- key types such as ecdsa-sha2-* or hardware-backed sk-ssh-* keys. Git's user.signingKey docs say literal public keys should be prefixed with key::, and raw-key compatibility is only for values beginning ssh-; otherwise Git treats the value like a path instead of a key. Since this file explicitly recommends hardware-backed keys, the transient fallback should use user.signingkey="key::<ssh-public-key>" for literal keys.

Useful? React with 👍 / 👎.

Comment thread home/dot_claude/CLAUDE.md
Comment on lines +9 to +10
provides its own `CLAUDE.md`, `.github/instructions/*.md`,
`.claude/skills/`, or similar guidance, follow those rules wherever
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Tell Claude to load .github instructions before relying on them

For repositories that only publish rules under .github/instructions/*.md, this sentence says those rules take precedence but does not actually make their contents available to Claude Code; the repo's own docs/idd-workflow.md:31 notes that Claude Code gets no .github/instructions/ context by default. As a result, Claude can proceed under this generic global file while silently missing the repository-specific rules it is supposed to honor unless the user or a project CLAUDE.md separately points it at them.

Useful? React with 👍 / 👎.

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.

feat(claude): add user-global Claude Code memory file

2 participants