From c6f7f877c0dda85016581931be44baf587c30fff 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 9ada44755994b7db97c8371a2fe9151edecf3061..e140e9ce013a48d404598e4e5d0022592addb6ab 100644 --- a/internal/tui/components/dialogs/commands/commands.go +++ b/internal/tui/components/dialogs/commands/commands.go @@ -399,7 +399,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 099a1c3c627f573872f2663afd548219e0b0c43c..8763d1ed48e8d2de5577ba8f7d43671646d531ce 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