From 5fe33b25bf38d0e6bacff4b9df6a5940202d4801 Mon Sep 17 00:00:00 2001 From: Amolith Date: Fri, 15 Aug 2025 17:57:39 -0600 Subject: [PATCH] feat: replace CRUSH with AGENTS, improve init cmd - Refer to `AGENTS.md` instead of `CRUSH.md` - Include more detailed instructions, covering architecture, control/data flow --- internal/agent/templates/initialize.md | 12 ++++++------ internal/tui/components/chat/splash/splash.go | 2 +- internal/tui/components/dialogs/commands/commands.go | 2 +- internal/tui/page/chat/chat.go | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/agent/templates/initialize.md b/internal/agent/templates/initialize.md index 5eb1636c44094982ac1784aadeabdecb022a9dcc..3d31fa7cd4d3952b0c579d7bfe36ba7c27b313df 100644 --- a/internal/agent/templates/initialize.md +++ b/internal/agent/templates/initialize.md @@ -1,8 +1,8 @@ -Analyze this codebase and create/update **CRUSH.md** to help future agents work effectively in this repository. +Analyze this codebase and create/update **AGENTS.md** to help future agents work effectively in this repository. -**First**: Check if directory is empty or contains only config files. If so, stop and say "Directory appears empty or only contains config. Add source code first, then run this command to generate CRUSH.md." +**First**: Check if directory is empty or contains only config files. If so, stop and say "Directory appears empty or only contains config. Add source code first, then run this command to generate AGENTS.md." -**Goal**: Document what an agent needs to know to work in this codebase - commands, patterns, conventions, gotchas. +**Goal**: Document what an agent needs to know to work in this codebase - commands, patterns, conventions, gotchas, overall architecture, how the components fit together **Discovery process**: @@ -10,13 +10,13 @@ Analyze this codebase and create/update **CRUSH.md** to help future agents work 2. Look for existing rule files (`.cursor/rules/*.md`, `.cursorrules`, `.github/copilot-instructions.md`, `claude.md`, `agents.md`) - only read if they exist 3. Identify project type from config files and directory structure 4. Find build/test/lint commands from config files, scripts, Makefiles, or CI configs -5. Read representative source files to understand code patterns -6. If CRUSH.md exists, read and improve it +5. Read representative source files to understand code patterns, architecture, control/data flow +6. If AGENTS.md exists, read and improve it **Content to include**: - Essential commands (build, test, run, deploy, etc.) - whatever is relevant for this project -- Code organization and structure +- Code organization and structure, application architecture and control/data flow - Naming conventions and style patterns - Testing approach and patterns - Important gotchas or non-obvious patterns diff --git a/internal/tui/components/chat/splash/splash.go b/internal/tui/components/chat/splash/splash.go index af4533cbeda9a3c3fb9d2227eadf5b49898b9adc..553e63aaaf1c16e5d4a893027ddaf898c751f776 100644 --- a/internal/tui/components/chat/splash/splash.go +++ b/internal/tui/components/chat/splash/splash.go @@ -465,7 +465,7 @@ func (s *splashCmp) View() string { pathStyle.Render(s.cwd()), "", bodyStyle.Render("When I initialize your codebase I examine the project and put the"), - bodyStyle.Render("result into a CRUSH.md file which serves as general context."), + bodyStyle.Render("result into an AGENTS.md file which serves as general context."), "", bodyStyle.Render("You can also initialize anytime via ")+shortcutStyle.Render("ctrl+p")+bodyStyle.Render("."), "", diff --git a/internal/tui/components/dialogs/commands/commands.go b/internal/tui/components/dialogs/commands/commands.go index 4e8111ee59085ad02b7145a8738f0c235840e5ed..d7bbf7c69d141826ede46f299bc0a96d06218590 100644 --- a/internal/tui/components/dialogs/commands/commands.go +++ b/internal/tui/components/dialogs/commands/commands.go @@ -453,7 +453,7 @@ func (c *commandDialogCmp) defaultCommands() []Command { { ID: "init", Title: "Initialize Project", - Description: "Create/Update the CRUSH.md memory file", + Description: "Create/Update the AGENTS.md memory file", Handler: func(cmd Command) tea.Cmd { return util.CmdHandler(chat.SendMsg{ Text: agent.InitializePrompt(), diff --git a/internal/tui/page/chat/chat.go b/internal/tui/page/chat/chat.go index a7310ef35ed597c307a72cf4cf051fc88e55ef0c..68521a6a09af9fc4aa132971ac74942f1e27980f 100644 --- a/internal/tui/page/chat/chat.go +++ b/internal/tui/page/chat/chat.go @@ -144,7 +144,7 @@ func (p *chatPage) Init() tea.Cmd { p.isOnboarding = true p.splashFullScreen = true } else if b, _ := config.ProjectNeedsInitialization(); b { - // Project needs CRUSH.md initialization + // Project needs context initialization p.splash.SetProjectInit(true) p.isProjectInit = true p.splashFullScreen = true