Skip to content

docs: optimize CLAUDE.md with enhanced directives#160

Merged
Ven0m0 merged 1 commit into
mainfrom
claude/optimize-claude-md-K4K9r
Jan 20, 2026
Merged

docs: optimize CLAUDE.md with enhanced directives#160
Ven0m0 merged 1 commit into
mainfrom
claude/optimize-claude-md-K4K9r

Conversation

@Ven0m0

@Ven0m0 Ven0m0 commented Jan 20, 2026

Copy link
Copy Markdown
Owner
  • Add comprehensive Git workflow section (branch/commit/push protocols)
  • Add File Operations section with tool priority hierarchy
  • Add Decision Trees for common scenarios
  • Expand examples with step-by-step workflow
  • Consolidate standards into clearer subsections
  • Add protected files list (paru.conf, makepkg.conf)
  • Improve formatting and structure for better readability

Result: More actionable guidance ∴ Explicit protocols for git, file ops, and decision-making

- Add comprehensive Git workflow section (branch/commit/push protocols)
- Add File Operations section with tool priority hierarchy
- Add Decision Trees for common scenarios
- Expand examples with step-by-step workflow
- Consolidate standards into clearer subsections
- Add protected files list (paru.conf, makepkg.conf)
- Improve formatting and structure for better readability

Result: More actionable guidance ∴ Explicit protocols for git, file ops, and decision-making
Copilot AI review requested due to automatic review settings January 20, 2026 06:04
@github-actions

Copy link
Copy Markdown

🤖 Hi @Ven0m0, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Ven0m0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the CLAUDE.md documentation, transforming it into a more explicit and actionable guide for AI agents managing dotfiles. The changes introduce structured protocols for Git operations, file handling, and decision-making, aiming to provide clearer directives and improve the overall utility and readability of the document.

Highlights

  • Git Workflow: A comprehensive Git workflow section has been added, detailing branch management, commit protocols, and push/fetch strategies.
  • File Operations: A new File Operations section introduces a tool priority hierarchy and specific rules for editing files.
  • Decision Trees: Decision Trees have been incorporated to guide users through common scenarios, such as when to use Bash vs. tools, or when to create vs. edit.
  • Examples: The examples section has been expanded with step-by-step workflows for practical application.
  • Standards Consolidation: Existing standards have been consolidated into clearer subsections for improved readability and organization.
  • Protected Files: The list of protected files has been updated to include paru.conf and makepkg.conf.
  • Formatting and Structure: Overall formatting and structure have been improved to enhance the document's readability.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Ven0m0 Ven0m0 merged commit c1da195 into main Jan 20, 2026
13 of 18 checks passed
@Ven0m0 Ven0m0 deleted the claude/optimize-claude-md-K4K9r branch January 20, 2026 06:05

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

The pull request significantly enhances the CLAUDE.md document by introducing comprehensive sections on Git workflow, file operations, and decision trees. The expanded examples and improved formatting contribute to a much clearer and more actionable set of directives for managing dotfiles. The restructuring effectively consolidates information into logical subsections, greatly improving the document's overall readability and utility.

Comment thread CLAUDE.md
Comment on lines +50 to +54
1. **Read:** `Read` tool (NOT `cat`/`head`/`tail`)
2. **Search:** `Grep`/`Glob` tools (NOT `grep`/`find` commands)
3. **Edit:** `Edit` tool (NOT `sed`/`awk`)
4. **Write:** `Write` tool (NOT `echo >`/heredoc)
5. **Bash:** ONLY for git, package managers, system commands

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The 'Tool Priority' section introduces abstract tool names (e.g., Read tool, Grep/Glob tools). To enhance clarity and ensure the AI uses the intended modern tools, consider providing examples or direct mappings to the specific tools listed in the 'Tools (Prefer Modern)' section (e.g., bat for Read tool, rg for Grep tool). This would make the directives more actionable and reduce potential ambiguity.

Comment thread CLAUDE.md
## Example
### Fetch/Pull
- **Specific:** `git fetch origin <branch>` (avoid bare `git fetch`)
- **Retry:** 4× with backoff on network errors

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For consistency and precision, the retry instruction for 'Fetch/Pull' could specify the backoff times, similar to the 'Push Protocol' section. This ensures uniform behavior for network error handling across different Git operations.

Suggested change
- **Retry:** 4× with backoff on network errors
- **Retry:** 4× with backoff (2s, 4s, 8s, 16s) on network errors only

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request significantly enhances the CLAUDE.md documentation by restructuring and expanding operational directives for Claude AI when working with this dotfiles repository. The changes transform a compact reference into a comprehensive operational manual with explicit protocols and decision-making guidance.

Changes:

  • Adds comprehensive Git workflow section with branch naming conventions, commit protocols, and retry logic
  • Introduces File Operations section with explicit tool priority hierarchy and edit rules
  • Adds Decision Trees section to guide common scenario decision-making (Bash vs Tools, Create vs Edit, When to Refactor)
  • Expands examples with step-by-step workflow demonstrations
  • Consolidates existing standards into clearer, more organized subsections
  • Updates Protected Files list to include paru.conf and makepkg.conf

Comment thread CLAUDE.md
### Push Protocol
- **Command:** `git push -u origin <branch-name>`
- **Retry:** 4× with backoff (2s, 4s, 8s, 16s) on network errors only
- **Validation:** Branch must start with `claude/` and match session ID

Copilot AI Jan 20, 2026

Copy link

Choose a reason for hiding this comment

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

The validation requirement that "Branch must start with claude/ and match session ID" is unclear and potentially problematic. What is a "session ID" in this context, and how would Claude verify this match? This could create confusion or block valid git operations. Consider either removing this requirement or clarifying what "session ID" means and how it should be validated.

Suggested change
- **Validation:** Branch must start with `claude/` and match session ID
- **Validation:** Branch name must start with `claude/`

Copilot uses AI. Check for mistakes.
Comment thread CLAUDE.md
5. **Bash:** ONLY for git, package managers, system commands

### Edit Rules
- **Always:** Read file FIRST (Edit/Write tools require it)

Copilot AI Jan 20, 2026

Copy link

Choose a reason for hiding this comment

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

The instruction "Read file FIRST (Edit/Write tools require it)" may not be technically accurate for all contexts. The Edit tool can work without first using Read if the file content is already known or if making targeted changes. Consider revising to "Read file FIRST when content is unknown or to verify current state" to be more precise.

Suggested change
- **Always:** Read file FIRST (Edit/Write tools require it)
- **Always:** Read file FIRST when content is unknown or to verify current state

Copilot uses AI. Check for mistakes.
Comment thread CLAUDE.md
`yadm clone --bootstrap` → Install Pkgs → Deploy Home → Deploy Sys (Tuckr).
### Push Protocol
- **Command:** `git push -u origin <branch-name>`
- **Retry:** 4× with backoff (2s, 4s, 8s, 16s) on network errors only

Copilot AI Jan 20, 2026

Copy link

Choose a reason for hiding this comment

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

The retry protocol specifies "4× with backoff" but this could lead to very long wait times (2+4+8+16 = 30 seconds total wait time plus actual operation time). For git operations in an interactive AI context, this may be excessive. Consider documenting whether Claude should inform the user about retry attempts, or if a shorter retry sequence would be more appropriate for the use case.

Copilot uses AI. Check for mistakes.
Comment thread CLAUDE.md
2. **Search:** `Grep`/`Glob` tools (NOT `grep`/`find` commands)
3. **Edit:** `Edit` tool (NOT `sed`/`awk`)
4. **Write:** `Write` tool (NOT `echo >`/heredoc)
5. **Bash:** ONLY for git, package managers, system commands

Copilot AI Jan 20, 2026

Copy link

Choose a reason for hiding this comment

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

The instruction specifies "Bash: ONLY for git, package managers, system commands" but then contradicts this in the decision tree at line 101 which says "Bash: git, paru/apt, systemctl, service management". The decision tree provides more specific guidance and should be aligned with the tool priority section. Either add "systemctl, service management" to line 54 or ensure both sections use identical language for consistency.

Suggested change
5. **Bash:** ONLY for git, package managers, system commands
5. **Bash:** git, paru/apt, systemctl, service management

Copilot uses AI. Check for mistakes.
Comment thread CLAUDE.md
- **Tools:** All file/search operations, text processing

### When to create vs edit?
- **Edit:** File exists in repo (99% of cases)

Copilot AI Jan 20, 2026

Copy link

Choose a reason for hiding this comment

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

The instruction "Edit: File exists in repo (99% of cases)" implies this is the default for almost all scenarios, but the guidance should be more nuanced. Claude should check if the file exists before deciding to edit vs create, not assume based on percentages. Consider revising to "Edit: When file exists in repo (always verify first)" to be more actionable.

Suggested change
- **Edit:** File exists in repo (99% of cases)
- **Edit:** When file exists in repo (always verify first)

Copilot uses AI. Check for mistakes.
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.

3 participants