diff --git a/crush.md b/CRUSH.md similarity index 100% rename from crush.md rename to CRUSH.md diff --git a/README.md b/README.md index c967640fad906c8257784724d4628ea26792beaa..92833130d4176268682550d08350899cbab01b23 100644 --- a/README.md +++ b/README.md @@ -491,7 +491,7 @@ Crush includes several built-in commands: | Command | Description | | ------------------ | --------------------------------------------------------------------------------------------------- | -| Initialize Project | Creates or updates the Crush.md memory file with project-specific information | +| Initialize Project | Creates or updates the CRUSH.md memory file with project-specific information | | Compact Session | Manually triggers the summarization of the current session, creating a new session with the summary | ## MCP (Model Context Protocol) diff --git a/internal/config/init.go b/internal/config/init.go index df9f213f15ddd4e85f912e3c121276a7da28ac09..1b603fbb846aba45230cd0f4683cb465e14db69a 100644 --- a/internal/config/init.go +++ b/internal/config/init.go @@ -38,13 +38,13 @@ func ShouldShowInitDialog() (bool, error) { return false, fmt.Errorf("failed to check init flag file: %w", err) } - // Check if any variation of crush.md already exists in working directory + // Check if any variation of CRUSH.md already exists in working directory crushExists, err := crushMdExists(WorkingDirectory()) if err != nil { - return false, fmt.Errorf("failed to check for crush.md files: %w", err) + return false, fmt.Errorf("failed to check for CRUSH.md files: %w", err) } if crushExists { - // Crush.md already exists, don't show the dialog + // CRUSH.md already exists, don't show the dialog return false, nil } diff --git a/internal/llm/prompt/coder.go b/internal/llm/prompt/coder.go index 82939a6a238bd9c8670ffdbbd8ff55af3c87305f..d994208dae04cd1cec63d0fc9b3fa7d606a2b0af 100644 --- a/internal/llm/prompt/coder.go +++ b/internal/llm/prompt/coder.go @@ -76,12 +76,12 @@ const baseAnthropicCoderPrompt = `You are Crush, an interactive CLI tool that he IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. # Memory -If the current working directory contains a file called Crush.md, it will be automatically added to your context. This file serves multiple purposes: +If the current working directory contains a file called CRUSH.md, it will be automatically added to your context. This file serves multiple purposes: 1. Storing frequently used bash commands (build, test, lint, etc.) so you can use them without searching each time 2. Recording the user's code style preferences (naming conventions, preferred libraries, etc.) 3. Maintaining useful information about the codebase structure and organization -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. +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. # Tone and style You 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 1. Use the available search tools to understand the codebase and the user's query. 2. Implement the solution using all tools available to you 3. 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. -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. +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. NEVER 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. diff --git a/internal/tui/components/dialogs/commands/commands.go b/internal/tui/components/dialogs/commands/commands.go index b140fc1246d36e806836359f5b17030e5b383a1b..7006117a33d916d0e822a2347b6b8993e99b7ddd 100644 --- a/internal/tui/components/dialogs/commands/commands.go +++ b/internal/tui/components/dialogs/commands/commands.go @@ -231,14 +231,14 @@ func (c *commandDialogCmp) defaultCommands() []Command { { ID: "init", Title: "Initialize Project", - Description: "Create/Update the Crush.md memory file", + Description: "Create/Update the CRUSH.md memory file", Handler: func(cmd Command) tea.Cmd { - prompt := `Please analyze this codebase and create a Crush.md file containing: + prompt := `Please analyze this codebase and create a CRUSH.md file containing: 1. Build/lint/test commands - especially for running a single test 2. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc. 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. - If there's already a crush.md, improve it. + If there's already a CRUSH.md, improve it. If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.` return util.CmdHandler(chat.SendMsg{ Text: prompt, diff --git a/internal/tui/components/dialogs/init/init.go b/internal/tui/components/dialogs/init/init.go index ff4cbfb4d7b6933523cc873019758c9203ff8657..347dc643da559bcb53449ec22765d550cf8f400f 100644 --- a/internal/tui/components/dialogs/init/init.go +++ b/internal/tui/components/dialogs/init/init.go @@ -106,7 +106,7 @@ func (m *initDialogCmp) renderContent() string { explanation := t.S().Text. Width(m.width - 4). - 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.") + 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.") question := t.S().Text. Width(m.width - 4). @@ -174,12 +174,12 @@ func (m *initDialogCmp) Position() (int, int) { func (m *initDialogCmp) handleInitialization(initialize bool) tea.Cmd { if initialize { // Run the initialization command - prompt := `Please analyze this codebase and create a Crush.md file containing: + prompt := `Please analyze this codebase and create a CRUSH.md file containing: 1. Build/lint/test commands - especially for running a single test 2. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc. 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. -If there's already a crush.md, improve it. +If there's already a CRUSH.md, improve it. If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.` // Mark the project as initialized