feat: normalize CRUSH.md as the default name

This makes it consistent with the GitHub conventions (`README.md`,
`CONTRIBUTING.md`, etc).
This commit is contained in:
Andrey Nering
2025-06-13 14:29:39 -03:00
parent 8adc4c0ce8
commit 5f84289b07
6 changed files with 13 additions and 13 deletions

View File

View File

@@ -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)

View File

@@ -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
}

View File

@@ -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.

View File

@@ -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,

View File

@@ -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