Skip to content

feat(gemini): add user-global Gemini CLI instructions#137

Merged
kurone-kito merged 1 commit into
masterfrom
issue/133-feat-gemini-add-user-global-gemini-cli
May 19, 2026
Merged

feat(gemini): add user-global Gemini CLI instructions#137
kurone-kito merged 1 commit into
masterfrom
issue/133-feat-gemini-add-user-global-gemini-cli

Conversation

@kurone-kito

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

Copy link
Copy Markdown
Owner

Summary

Adds home/dot_gemini/GEMINI.md so chezmoi deploys a user-global
Gemini CLI instructions file at ~/.gemini/GEMINI.md, bringing
Gemini CLI to parity with the already-deployed Copilot CLI, Codex
CLI, and Claude Code 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 — adapted for
Gemini CLI's interaction model (intent-based wording in place of the
Copilot product-specific "Agent mode" / "Plan mode" terms).

Closes #133
Roadmap #130

Test plan

  • npx markdownlint-cli2 "home/dot_gemini/GEMINI.md" — 0 errors
  • npx cspell home/dot_gemini/GEMINI.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 repository documentation with guidelines for code standards, commit message conventions, and development practices.

Review Change Stack

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

Add `home/dot_gemini/GEMINI.md` modeled on the canonical Copilot
user-global file, adapted for Gemini CLI's interaction model
(intent-based pause/continue wording rather than the Copilot
product-specific "Agent mode" / "Plan mode" terms). 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, Claude Code, and Copilot
user-global files.

Track C under the symmetrization roadmap (#130). The sibling
documentation update lands in `docs/ai-strategy.md` (#134).

Refs #133
Roadmap #130

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

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR introduces home/dot_gemini/GEMINI.md, a new user-global instruction file for Gemini CLI interactions. The document establishes default conversation behavior, Conventional Commits formatting with a comprehensive signing failure recovery ladder, coding standards for line endings and whitespace, and guardrails against false claims about command execution. Repository-specific instructions override these defaults when present.

Changes

Gemini CLI user-global instructions

Layer / File(s) Summary
Scope and conversation defaults
home/dot_gemini/GEMINI.md
File introduction defers to repository-specific instructions, and conversation policy specifies language-matching behavior and English documentation standards.
Commit rules with signing failure ladder
home/dot_gemini/GEMINI.md
Conventional Commits formatting combined with a five-step signing failure recovery workflow: categorization, bounded gpg-agent restart, SSH fallback with key discovery, SSH best-effort treatment, and unsigned-commit final fallback with cause reporting.
Coding standards and guardrails
home/dot_gemini/GEMINI.md
Line-ending, whitespace, and naming conventions, plus guardrails against unauthorized community-document modification and false claims about command/test execution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • kurone-kito/dotfiles#136 — Adds parallel repository documentation files defining commit rules, Git signing failure ladders, and guardrails under the same dot-directory instruction pattern.
  • kurone-kito/dotfiles#135 — Adds complementary agent instruction files with matching structure, including the same five-step signing-failure ladder and guardrails about not claiming commands/tests ran when they didn't.

Poem

🐰 A rabbit drafts commands with care,
GPG keys and signing layers fair,
From Gemini's global wisdom flows—
No false claims of tests that don't run, one knows.
Standards set, guardrails in place, the dotfiles grow! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive PR description includes comprehensive details but template structure is minimal; clarity on completeness against repository standards is uncertain. Ensure description format aligns with repository contribution guidelines; verify all required sections per CONTRIBUTING.md are included.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly summarizes the main change: adding a Gemini CLI instructions file, which aligns with the changeset.
Linked Issues check ✅ Passed PR addresses all acceptance criteria from issue #133: file created at correct location, signing fallback ladder included, markdown/spell checks pass, and existing tests unchanged.
Out of Scope Changes check ✅ Passed All changes are directly scoped to creating home/dot_gemini/GEMINI.md per issue #133; no unrelated modifications detected.
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/133-feat-gemini-add-user-global-gemini-cli

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
home/dot_gemini/GEMINI.md (1)

45-140: ⚡ Quick win

Keep the signing ladder as five numbered steps for contract parity.

Line 45 frames a bounded ladder, but Lines 120-140 continue numbering as steps 6-8. That drifts from the “same five steps” objective and makes cross-file parity with the Copilot instruction set harder to validate. Consider keeping only five numbered steps and moving 6-8 into sub-bullets or a non-numbered “Notes/Reporting” subsection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@home/dot_gemini/GEMINI.md` around lines 45 - 140, The numbered “ladder” in
the "Prefer signed commits" section currently continues past five steps (steps
6–8); change it so the ladder is exactly five numbered steps (keep items 1–5
as-is) and move the content currently labeled 6 ("Treat SSH signing as
best-effort"), 7 ("Unsigned commit is the accepted final fallback"), and 8
("Always report which path was taken") into a non-numbered "Notes" or
"Reporting" subsection (or convert them to sub-bullets) under the same header;
update the text around the ladder header and any references to ensure the unique
phrases "Prefer signed commits", the numbered steps 1–5, and the specific lines
beginning with "Treat SSH signing as best-effort", "Unsigned commit is the
accepted final fallback", and "Always report which path was taken" are relocated
and reflowed so the document only shows five numbered steps followed by the new
Notes/Reporting block.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@home/dot_gemini/GEMINI.md`:
- Around line 45-140: The numbered “ladder” in the "Prefer signed commits"
section currently continues past five steps (steps 6–8); change it so the ladder
is exactly five numbered steps (keep items 1–5 as-is) and move the content
currently labeled 6 ("Treat SSH signing as best-effort"), 7 ("Unsigned commit is
the accepted final fallback"), and 8 ("Always report which path was taken") into
a non-numbered "Notes" or "Reporting" subsection (or convert them to
sub-bullets) under the same header; update the text around the ladder header and
any references to ensure the unique phrases "Prefer signed commits", the
numbered steps 1–5, and the specific lines beginning with "Treat SSH signing as
best-effort", "Unsigned commit is the accepted final fallback", and "Always
report which path was taken" are relocated and reflowed so the document only
shows five numbered steps followed by the new Notes/Reporting block.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7129d95b-3650-437c-bd47-3d41dbcd49ee

📥 Commits

Reviewing files that changed from the base of the PR and between 7b4292c and 3565180.

📒 Files selected for processing (1)
  • home/dot_gemini/GEMINI.md

Copilot AI left a comment

Copy link
Copy Markdown

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 new user-global Gemini CLI instructions file under home/ so chezmoi deploys a consistent baseline guidance set to ~/.gemini/GEMINI.md, aligning Gemini CLI with the existing user-global instruction surfaces for other agents.

Changes:

  • Add home/dot_gemini/GEMINI.md with repository-precedence guidance, conversation policy, Conventional Commits rules, the bounded signing fallback ladder, coding standards defaults, and guardrails.

Comment thread home/dot_gemini/GEMINI.md
@kurone-kito

Copy link
Copy Markdown
Owner Author

claude-code-73ed18fc: 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

E6 dispositions — PATH A and PATH B

PATH A (reviewer feedback, Rejected):

  • copilot-pull-request-reviewer inline thread at home/dot_gemini/GEMINI.md line 106: Rejected — the reviewer suggested adding ~/.ssh/id_ed25519 as an example of what NOT to do, matching the reference Copilot file. However, issue feat(gemini): add user-global Gemini CLI instructions #133's acceptance criteria explicitly requires "No fixed ~/.ssh/id_ed25519 path is named." The omission is intentional; the phrase "never assume a fixed key path, and never invent one" conveys the constraint without naming a common default path. Thread resolved.

PATH B (advisory, Rejected):

  • coderabbitai review at 2026-05-19T02:04:30Z: Rejected — no actionable changes requested; review body describes the PR accurately.
  • coderabbitai comment at 2026-05-19T02:04:28Z: Rejected — auto-generated "no actionable comments" summary; acknowledged above.

E2 critique pass returned 0 additional findings.

@kurone-kito

Copy link
Copy Markdown
Owner Author

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

@kurone-kito kurone-kito merged commit c2f1868 into master May 19, 2026
11 of 13 checks passed
@kurone-kito kurone-kito deleted the issue/133-feat-gemini-add-user-global-gemini-cli branch May 19, 2026 02:08
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(gemini): add user-global Gemini CLI instructions

2 participants