claude-flow-novice 1.5.4 → 1.5.6
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.
- package/.claude/agents/CLAUDE.md +2617 -0
- package/.claude/agents/CLAUDE_AGENT_DESIGN_PRINCIPLES.md +1312 -0
- package/.claude/agents/README-VALIDATION.md +243 -0
- package/.claude/agents/validate-agent.js +841 -0
- package/.claude-flow-novice/.claude/agents/CLAUDE.md +2617 -0
- package/.claude-flow-novice/.claude/agents/CLAUDE_AGENT_DESIGN_PRINCIPLES.md +1312 -0
- package/.claude-flow-novice/.claude/agents/README-VALIDATION.md +243 -0
- package/.claude-flow-novice/.claude/agents/validate-agent.js +841 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/index.js +3 -5
- package/.claude-flow-novice/dist/src/slash-commands/claude-md.js +22 -9
- package/examples/sdk-swarm-demo.js +194 -0
- package/package.json +10 -2
- package/scripts/deploy-sdk.sh +176 -0
- package/scripts/migrate-to-sdk.sh +520 -0
- package/scripts/monitor-migration.js +339 -0
- package/scripts/rollback-sdk.sh +66 -0
- package/scripts/verify-sdk-phase1.cjs +293 -0
- package/src/cli/simple-commands/init/index.js +3 -5
- package/src/slash-commands/claude-md.js +22 -9
|
@@ -44,8 +44,6 @@ import { createLocalExecutable } from './executable-wrapper.js';
|
|
|
44
44
|
import { createSparcStructureManually } from './sparc-structure.js';
|
|
45
45
|
import { createClaudeSlashCommands } from './claude-commands/slash-commands.js';
|
|
46
46
|
import { createOptimizedClaudeSlashCommands } from './claude-commands/optimized-slash-commands.js';
|
|
47
|
-
// execSync imported above as execSyncOriginal\nconst execSync = execSyncOriginal;
|
|
48
|
-
import { promises as fs } from 'fs';
|
|
49
47
|
import { copyTemplates } from './template-copier.js';
|
|
50
48
|
import { copyRevisedTemplates, validateTemplatesExist } from './copy-revised-templates.js';
|
|
51
49
|
import {
|
|
@@ -105,6 +103,7 @@ async function readClaudeMdTemplate() {
|
|
|
105
103
|
for (const templatePath of possiblePaths) {
|
|
106
104
|
try {
|
|
107
105
|
const content = await fs.readFile(templatePath, 'utf8');
|
|
106
|
+
console.log(`✅ Using CLAUDE.md template from: ${templatePath}`);
|
|
108
107
|
return content;
|
|
109
108
|
} catch (error) {
|
|
110
109
|
// Try next path
|
|
@@ -112,9 +111,8 @@ async function readClaudeMdTemplate() {
|
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
|
|
115
|
-
//
|
|
116
|
-
|
|
117
|
-
return createOptimizedSparcClaudeMd();
|
|
114
|
+
// If template not found, throw error instead of falling back
|
|
115
|
+
throw new Error('CLAUDE.md template file not found! Please ensure templates are included in the build.');
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
/**
|
|
@@ -7,16 +7,34 @@
|
|
|
7
7
|
* Keeps it focused and lightweight - no bloat!
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { ClaudeMdGenerator } from '../language/claude-md-generator.js';
|
|
11
|
-
import { LanguageDetector } from '../language/language-detector.js';
|
|
12
10
|
import fs from 'fs/promises';
|
|
13
11
|
import path from 'path';
|
|
12
|
+
import { fileURLToPath } from 'url';
|
|
13
|
+
import { dirname } from 'path';
|
|
14
14
|
|
|
15
15
|
export class ClaudeMdSlashCommand {
|
|
16
16
|
constructor(projectPath = process.cwd()) {
|
|
17
17
|
this.projectPath = projectPath;
|
|
18
18
|
this.claudeMdPath = path.join(projectPath, 'CLAUDE.md');
|
|
19
19
|
this.copyToMainPath = path.join(projectPath, 'claude-copy-to-main.md');
|
|
20
|
+
|
|
21
|
+
// Get the directory of this module to find the template
|
|
22
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
23
|
+
const __dirname = dirname(__filename);
|
|
24
|
+
this.templatePath = path.join(__dirname, '..', 'cli', 'simple-commands', 'init', 'templates', 'CLAUDE.md');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Read the CLAUDE.md template file
|
|
29
|
+
*/
|
|
30
|
+
async readTemplate() {
|
|
31
|
+
try {
|
|
32
|
+
const content = await fs.readFile(this.templatePath, 'utf8');
|
|
33
|
+
console.log('✅ Using CLAUDE.md template');
|
|
34
|
+
return content;
|
|
35
|
+
} catch (error) {
|
|
36
|
+
throw new Error(`CLAUDE.md template not found at ${this.templatePath}`);
|
|
37
|
+
}
|
|
20
38
|
}
|
|
21
39
|
|
|
22
40
|
/**
|
|
@@ -37,13 +55,8 @@ export class ClaudeMdSlashCommand {
|
|
|
37
55
|
const existingClaudeExists = await this.fileExists(this.claudeMdPath);
|
|
38
56
|
const shouldUseNpxProtection = isNpxInstall && existingClaudeExists;
|
|
39
57
|
|
|
40
|
-
// Step 2:
|
|
41
|
-
const
|
|
42
|
-
backupExisting: backup && !shouldUseNpxProtection,
|
|
43
|
-
preserveCustomSections: true
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const newContent = await generator.generateClaudeMd();
|
|
58
|
+
// Step 2: Read template content (no language detection, just use template)
|
|
59
|
+
const newContent = await this.readTemplate();
|
|
47
60
|
|
|
48
61
|
// Step 3: Handle NPX protection
|
|
49
62
|
if (shouldUseNpxProtection) {
|