on main help sign in
Merge pull request #23 from charmbracelet/andrey/cha-62-opencodemd-should-probably-be-opencodemd-by-default
fecea6eKujtim Hoxha
crush.md → CRUSH.mdrenamed

The content is the same.

README.md+1−1
@@ -491,7 +491,7 @@ Crush includes several built-in commands:
491
491
492| Command | Description |
492| Command | Description |
493| ------------------ | --------------------------------------------------------------------------------------------------- |
493| ------------------ | --------------------------------------------------------------------------------------------------- |
494−| Initialize Project | Creates or updates the Crush.md memory file with project-specific information |
494+| Initialize Project | Creates or updates the CRUSH.md memory file with project-specific information |
495| Compact Session | Manually triggers the summarization of the current session, creating a new session with the summary |
495| Compact Session | Manually triggers the summarization of the current session, creating a new session with the summary |
496
496
497## MCP (Model Context Protocol)
497## MCP (Model Context Protocol)
internal/config/init.go+3−3
@@ -38,13 +38,13 @@ func ShouldShowInitDialog() (bool, error) {
38 return false, fmt.Errorf("failed to check init flag file: %w", err)
38 return false, fmt.Errorf("failed to check init flag file: %w", err)
39 }
39 }
40
40
41− // Check if any variation of crush.md already exists in working directory
41+ // Check if any variation of CRUSH.md already exists in working directory
42 crushExists, err := crushMdExists(WorkingDirectory())
42 crushExists, err := crushMdExists(WorkingDirectory())
43 if err != nil {
43 if err != nil {
44− return false, fmt.Errorf("failed to check for crush.md files: %w", err)
44+ return false, fmt.Errorf("failed to check for CRUSH.md files: %w", err)
45 }
45 }
46 if crushExists {
46 if crushExists {
47− // Crush.md already exists, don't show the dialog
47+ // CRUSH.md already exists, don't show the dialog
48 return false, nil
48 return false, nil
49 }
49 }
50
50
internal/llm/prompt/coder.go+3−3
@@ -76,12 +76,12 @@ const baseAnthropicCoderPrompt = `You are Crush, an interactive CLI tool that he
76IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure.
76IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure.
77
77
78# Memory
78# Memory
79−If the current working directory contains a file called Crush.md, it will be automatically added to your context. This file serves multiple purposes:
79+If the current working directory contains a file called CRUSH.md, it will be automatically added to your context. This file serves multiple purposes:
801. Storing frequently used bash commands (build, test, lint, etc.) so you can use them without searching each time
801. Storing frequently used bash commands (build, test, lint, etc.) so you can use them without searching each time
812. Recording the user's code style preferences (naming conventions, preferred libraries, etc.)
812. Recording the user's code style preferences (naming conventions, preferred libraries, etc.)
823. Maintaining useful information about the codebase structure and organization
823. Maintaining useful information about the codebase structure and organization
83
83
84−When you spend time searching for commands to typecheck, lint, build, or test, you should ask the user if it's okay to add those commands to Crush.md. Similarly, when learning about code style preferences or important codebase information, ask if it's okay to add that to Crush.md so you can remember it for next time.
84+When you spend time searching for commands to typecheck, lint, build, or test, you should ask the user if it's okay to add those commands to CRUSH.md. Similarly, when learning about code style preferences or important codebase information, ask if it's okay to add that to CRUSH.md so you can remember it for next time.
85
85
86# Tone and style
86# Tone and style
87You should be concise, direct, and to the point. When you run a non-trivial bash command, you should explain what the command does and why you are running it, to make sure the user understands what you are doing (this is especially important when you are running a command that will make changes to the user's system).
87You should be concise, direct, and to the point. When you run a non-trivial bash command, you should explain what the command does and why you are running it, to make sure the user understands what you are doing (this is especially important when you are running a command that will make changes to the user's system).
@@ -156,7 +156,7 @@ The user will primarily request you perform software engineering tasks. This inc
1561. Use the available search tools to understand the codebase and the user's query.
1561. Use the available search tools to understand the codebase and the user's query.
1572. Implement the solution using all tools available to you
1572. Implement the solution using all tools available to you
1583. Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.
1583. Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.
159−4. VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (eg. npm run lint, npm run typecheck, ruff, etc.) if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to crush.md so that you will know to run it next time.
159+4. VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (eg. npm run lint, npm run typecheck, ruff, etc.) if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to CRUSH.md so that you will know to run it next time.
160
160
161NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.
161NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.
162
162
internal/tui/components/dialogs/commands/commands.go+3−3
@@ -231,14 +231,14 @@ func (c *commandDialogCmp) defaultCommands() []Command {
231 {
231 {
232 ID: "init",
232 ID: "init",
233 Title: "Initialize Project",
233 Title: "Initialize Project",
234− Description: "Create/Update the Crush.md memory file",
234+ Description: "Create/Update the CRUSH.md memory file",
235 Handler: func(cmd Command) tea.Cmd {
235 Handler: func(cmd Command) tea.Cmd {
236− prompt := `Please analyze this codebase and create a Crush.md file containing:
236+ prompt := `Please analyze this codebase and create a CRUSH.md file containing:
237 1. Build/lint/test commands - especially for running a single test
237 1. Build/lint/test commands - especially for running a single test
238 2. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc.
238 2. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc.
239
239
240 The file you create will be given to agentic coding agents (such as yourself) that operate in this repository. Make it about 20 lines long.
240 The file you create will be given to agentic coding agents (such as yourself) that operate in this repository. Make it about 20 lines long.
241− If there's already a crush.md, improve it.
241+ If there's already a CRUSH.md, improve it.
242 If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.`
242 If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.`
243 return util.CmdHandler(chat.SendMsg{
243 return util.CmdHandler(chat.SendMsg{
244 Text: prompt,
244 Text: prompt,
internal/tui/components/dialogs/init/init.go+3−3
@@ -106,7 +106,7 @@ func (m *initDialogCmp) renderContent() string {
106
106
107 explanation := t.S().Text.
107 explanation := t.S().Text.
108 Width(m.width - 4).
108 Width(m.width - 4).
109− Render("Initialization generates a new Crush.md file that contains information about your codebase, this file serves as memory for each project, you can freely add to it to help the agents be better at their job.")
109+ Render("Initialization generates a new CRUSH.md file that contains information about your codebase, this file serves as memory for each project, you can freely add to it to help the agents be better at their job.")
110
110
111 question := t.S().Text.
111 question := t.S().Text.
112 Width(m.width - 4).
112 Width(m.width - 4).
@@ -174,12 +174,12 @@ func (m *initDialogCmp) Position() (int, int) {
174func (m *initDialogCmp) handleInitialization(initialize bool) tea.Cmd {
174func (m *initDialogCmp) handleInitialization(initialize bool) tea.Cmd {
175 if initialize {
175 if initialize {
176 // Run the initialization command
176 // Run the initialization command
177− prompt := `Please analyze this codebase and create a Crush.md file containing:
177+ prompt := `Please analyze this codebase and create a CRUSH.md file containing:
1781. Build/lint/test commands - especially for running a single test
1781. Build/lint/test commands - especially for running a single test
1792. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc.
1792. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc.
180
180
181The file you create will be given to agentic coding agents (such as yourself) that operate in this repository. Make it about 20 lines long.
181The file you create will be given to agentic coding agents (such as yourself) that operate in this repository. Make it about 20 lines long.
182−If there's already a crush.md, improve it.
182+If there's already a CRUSH.md, improve it.
183If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.`
183If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.`
184
184
185 // Mark the project as initialized
185 // Mark the project as initialized