@axiomatic-labs/claudeflow 2.13.16 → 2.13.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/install.js +17 -0
  2. package/package.json +1 -1
package/lib/install.js CHANGED
@@ -15,6 +15,8 @@ const REQUIRED_TEMPLATE_RULES = [];
15
15
  const LEGACY_TEMPLATE_RULES = ['claudeflow-implementation.md', 'example-rules.md'];
16
16
  const SHARED_APPEND_PROMPT_TEMPLATE = path.join('.claudeflow', 'templates', 'claudeflow-core-system-prompt.md');
17
17
  const SHARED_APPEND_PROMPT_OUTPUT = 'append-system-prompt.md';
18
+ const DEFAULT_CLAUDE_MD_TEMPLATE = path.join('.claudeflow', 'templates', 'claudeflow-default-claude-md.md');
19
+ const DEFAULT_CLAUDE_MD_OUTPUT = 'CLAUDE.md';
18
20
  const TEMPLATE_MANAGED_SETTINGS_KEYS = ['$schema', 'enabledMcpjsonServers', 'env', 'permissions', 'hooks'];
19
21
  const SERENA_REPO = 'git+https://github.com/oraios/serena';
20
22
  const TEMPLATE_SEEDED_SETTINGS_KEYS = new Set(['statusLine']);
@@ -152,6 +154,7 @@ async function run() {
152
154
  copyDirSync(srcTemplates, dstTemplates);
153
155
  }
154
156
  materializeSharedAppendPrompt(cwd);
157
+ materializeDefaultClaudeMd(cwd);
155
158
  propagateTemplateRules(cwd, srcTemplates);
156
159
 
157
160
  // Copy template agents (only template-managed, preserve user agents)
@@ -988,6 +991,19 @@ function materializeSharedAppendPrompt(projectRoot) {
988
991
  fs.copyFileSync(templatePath, outputPath);
989
992
  }
990
993
 
994
+ // Materialize the default CLAUDE.md only when the project has none.
995
+ // CLAUDE.md is user-owned: customizations made by the user (or by other
996
+ // frameworks) must survive `claudeflow update`. We therefore never
997
+ // overwrite an existing file.
998
+ function materializeDefaultClaudeMd(projectRoot) {
999
+ const templatePath = path.join(projectRoot, DEFAULT_CLAUDE_MD_TEMPLATE);
1000
+ if (!fs.existsSync(templatePath)) return false;
1001
+ const outputPath = path.join(projectRoot, DEFAULT_CLAUDE_MD_OUTPUT);
1002
+ if (fs.existsSync(outputPath)) return false;
1003
+ fs.copyFileSync(templatePath, outputPath);
1004
+ return true;
1005
+ }
1006
+
991
1007
  function isTemplateManagedAgent(agentName) {
992
1008
  return agentName.startsWith('claudeflow-');
993
1009
  }
@@ -1020,6 +1036,7 @@ function copyDirSync(src, dst, skipNames) {
1020
1036
  module.exports = Object.assign(run, {
1021
1037
  assertRequiredTemplateRules,
1022
1038
  materializeSharedAppendPrompt,
1039
+ materializeDefaultClaudeMd,
1023
1040
  isTemplateManagedAgent,
1024
1041
  listTemplateManagedAgents,
1025
1042
  mergeClaudeSettings,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomatic-labs/claudeflow",
3
- "version": "2.13.16",
3
+ "version": "2.13.17",
4
4
  "description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
5
5
  "bin": {
6
6
  "claudeflow": "./bin/cli.js"