claude-orchestration 1.0.0 → 1.0.1

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/bin/cli.js +18 -13
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -37,7 +37,6 @@ if (process.argv.includes("--version") || process.argv.includes("-v")) {
37
37
 
38
38
  const SOURCE_DIR = path.join(__dirname, "..", "templates", "claude");
39
39
  const DEST_NAME = ".claude";
40
- const CLAUDE_MD = "CLAUDE.md";
41
40
 
42
41
  const ORCHESTRATION_INSTRUCTION = `
43
42
 
@@ -46,28 +45,34 @@ const ORCHESTRATION_INSTRUCTION = `
46
45
  For complex tasks, refer to .claude/orchestration.md for available workflows.
47
46
  `;
48
47
 
49
- async function fileExists(filePath) {
50
- try {
51
- await fs.access(filePath);
52
- return true;
53
- } catch {
54
- return false;
55
- }
48
+ async function findClaudeMdFiles(projectDir) {
49
+ const entries = await fs.readdir(projectDir, { withFileTypes: true });
50
+ return entries
51
+ .filter((entry) => entry.isFile() && entry.name.toLowerCase() === "claude.md")
52
+ .map((entry) => entry.name);
56
53
  }
57
54
 
58
55
  async function updateClaudeMd(projectDir) {
59
- const claudeMdPath = path.join(projectDir, CLAUDE_MD);
56
+ const claudeMdFiles = await findClaudeMdFiles(projectDir);
57
+
58
+ if (claudeMdFiles.length === 0) {
59
+ const newFilePath = path.join(projectDir, "CLAUDE.md");
60
+ await fs.writeFile(newFilePath, `# CLAUDE.md${ORCHESTRATION_INSTRUCTION}`);
61
+ console.log(" Created: CLAUDE.md");
62
+ return;
63
+ }
60
64
 
61
- if (await fileExists(claudeMdPath)) {
65
+ for (const fileName of claudeMdFiles) {
66
+ const claudeMdPath = path.join(projectDir, fileName);
62
67
  const content = await fs.readFile(claudeMdPath, "utf-8");
63
68
 
64
69
  if (content.includes(".claude/orchestration.md")) {
65
- console.log(` Skipped: ${CLAUDE_MD} already references orchestration.md`);
66
- return;
70
+ console.log(` Skipped: ${fileName} already references orchestration.md`);
71
+ continue;
67
72
  }
68
73
 
69
74
  await fs.appendFile(claudeMdPath, ORCHESTRATION_INSTRUCTION);
70
- console.log(` Updated: ${CLAUDE_MD}`);
75
+ console.log(` Updated: ${fileName}`);
71
76
  }
72
77
  }
73
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-orchestration",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI tool to scaffold Claude orchestration workflows into your project",
5
5
  "bin": {
6
6
  "claude-orchestration": "bin/cli.js"