diff --git a/.changeset/salty-deer-joke.md b/.changeset/salty-deer-joke.md new file mode 100644 index 0000000..6d72c2f --- /dev/null +++ b/.changeset/salty-deer-joke.md @@ -0,0 +1,5 @@ +--- +"@plotday/sdk": patch +--- + +Add a CLAUDE.md on "plot agent create" diff --git a/sdk/cli/commands/create.ts b/sdk/cli/commands/create.ts index f036322..c520061 100644 --- a/sdk/cli/commands/create.ts +++ b/sdk/cli/commands/create.ts @@ -193,6 +193,15 @@ export default class extends Agent { console.warn("Warning: Could not copy AGENTS template"); } + // Copy CLAUDE.md from template + const claudeTemplatePath = path.join(__dirname, "..", "templates", "CLAUDE.template.md"); + try { + const claudeContent = fs.readFileSync(claudeTemplatePath, "utf-8"); + fs.writeFileSync(path.join(agentPath, "CLAUDE.md"), claudeContent); + } catch (error) { + console.warn("Warning: Could not copy CLAUDE template"); + } + // Create .gitignore const gitignore = `node_modules/ build/ diff --git a/sdk/cli/templates/CLAUDE.template.md b/sdk/cli/templates/CLAUDE.template.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/sdk/cli/templates/CLAUDE.template.md @@ -0,0 +1 @@ +@AGENTS.md