diff --git a/TODO.txt b/TODO.txt index ca920975..efed0146 100644 --- a/TODO.txt +++ b/TODO.txt @@ -99,3 +99,6 @@ we will probably have to start dynamically generating the x.project.json5 rather [syncback] optimize syncback like we did serve. + +[atlas-project.mdc] +we need to remove atlas-project.mdc from the main shared agent rules and migrate it to being manually cloned into newly created projects..... diff --git a/src/cli/init.rs b/src/cli/init.rs index 93df4396..a9782f9a 100644 --- a/src/cli/init.rs +++ b/src/cli/init.rs @@ -19,6 +19,7 @@ use super::resolve_path; const GIT_IGNORE_PLACEHOLDER: &str = "gitignore.txt"; static TEMPLATE_BINCODE: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/templates.bincode")); +static ATLAS_PROJECT_MDC: &str = include_str!("../../.cursor/rules/atlas-project.mdc"); /// Initializes a new Rojo project. /// @@ -117,6 +118,10 @@ impl InitCommand { } } + let rules_dir = base_path.join(".cursor/rules"); + fs::create_dir_all(&rules_dir)?; + write_if_not_exists(&rules_dir.join("atlas-project.mdc"), ATLAS_PROJECT_MDC)?; + let did_git_init = if !self.skip_git && crate::git::git_repo_root(&base_path).is_none() { log::debug!("Initializing Git repository...");