@curenorway/kode-cli 1.0.2 → 1.0.3
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/dist/{chunk-LYIXUQOG.js → chunk-RS5LGRLV.js} +23 -12
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -358,6 +358,17 @@ function upsertPage(projectRoot, page, agent = "kode html") {
|
|
|
358
358
|
context.updatedBy = agent;
|
|
359
359
|
writeContext(projectRoot, context);
|
|
360
360
|
}
|
|
361
|
+
function generateClaudeMdMinimal(siteName) {
|
|
362
|
+
return `## Cure Kode (${siteName})
|
|
363
|
+
|
|
364
|
+
This project uses **Cure Kode** for Webflow script management.
|
|
365
|
+
|
|
366
|
+
- **Context**: Read \`.cure-kode/context.md\` before working on scripts
|
|
367
|
+
- **Scripts**: \`kode pull\` / \`kode push\` / \`kode deploy --env staging|production\`
|
|
368
|
+
- **HTML analysis**: \`kode html <url> --save\` to cache page structure
|
|
369
|
+
|
|
370
|
+
`;
|
|
371
|
+
}
|
|
361
372
|
function generateClaudeMd(siteName, scriptsDir = "scripts") {
|
|
362
373
|
return `# Cure Kode Project: ${siteName}
|
|
363
374
|
|
|
@@ -579,7 +590,8 @@ config.json
|
|
|
579
590
|
} catch {
|
|
580
591
|
}
|
|
581
592
|
const claudeMdPath = join3(cwd, "CLAUDE.md");
|
|
582
|
-
const
|
|
593
|
+
const claudeMdContentFull = generateClaudeMd(config.siteName, config.scriptsDir || "scripts");
|
|
594
|
+
const claudeMdContentMinimal = generateClaudeMdMinimal(config.siteName);
|
|
583
595
|
let claudeMdAction = "created";
|
|
584
596
|
if (existsSync3(claudeMdPath)) {
|
|
585
597
|
spinner.stop();
|
|
@@ -591,12 +603,12 @@ config.json
|
|
|
591
603
|
message: "How would you like to handle Kode instructions?",
|
|
592
604
|
choices: [
|
|
593
605
|
{
|
|
594
|
-
name: "
|
|
595
|
-
message: "
|
|
606
|
+
name: "prepend",
|
|
607
|
+
message: "Prepend minimal section to CLAUDE.md (recommended)"
|
|
596
608
|
},
|
|
597
609
|
{
|
|
598
610
|
name: "separate",
|
|
599
|
-
message: "Create separate KODE.md file"
|
|
611
|
+
message: "Create separate KODE.md file (full instructions)"
|
|
600
612
|
},
|
|
601
613
|
{
|
|
602
614
|
name: "skip",
|
|
@@ -607,19 +619,18 @@ config.json
|
|
|
607
619
|
}
|
|
608
620
|
]);
|
|
609
621
|
spinner.start("Generating AI context files...");
|
|
610
|
-
if (action === "
|
|
622
|
+
if (action === "prepend") {
|
|
611
623
|
const existingContent = readFileSync3(claudeMdPath, "utf-8");
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
claudeMdAction = "appended";
|
|
624
|
+
writeFileSync3(claudeMdPath, claudeMdContentMinimal + "---\n\n" + existingContent);
|
|
625
|
+
claudeMdAction = "prepended";
|
|
615
626
|
} else if (action === "separate") {
|
|
616
|
-
writeFileSync3(join3(cwd, "KODE.md"),
|
|
627
|
+
writeFileSync3(join3(cwd, "KODE.md"), claudeMdContentFull);
|
|
617
628
|
claudeMdAction = "separate";
|
|
618
629
|
} else {
|
|
619
630
|
claudeMdAction = "skipped";
|
|
620
631
|
}
|
|
621
632
|
} else {
|
|
622
|
-
writeFileSync3(claudeMdPath,
|
|
633
|
+
writeFileSync3(claudeMdPath, claudeMdContentFull);
|
|
623
634
|
}
|
|
624
635
|
const contextMdContent = generateInitialContext(config, scripts, siteInfo);
|
|
625
636
|
writeFileSync3(join3(cwd, ".cure-kode", "context.md"), contextMdContent);
|
|
@@ -629,8 +640,8 @@ config.json
|
|
|
629
640
|
console.log(chalk.dim(` ${cwd}/`));
|
|
630
641
|
if (claudeMdAction === "created") {
|
|
631
642
|
console.log(chalk.dim(` \u251C\u2500\u2500 CLAUDE.md (AI agent instructions)`));
|
|
632
|
-
} else if (claudeMdAction === "
|
|
633
|
-
console.log(chalk.dim(` \u251C\u2500\u2500 CLAUDE.md (Kode
|
|
643
|
+
} else if (claudeMdAction === "prepended") {
|
|
644
|
+
console.log(chalk.dim(` \u251C\u2500\u2500 CLAUDE.md (Kode section prepended)`));
|
|
634
645
|
} else if (claudeMdAction === "separate") {
|
|
635
646
|
console.log(chalk.dim(` \u251C\u2500\u2500 CLAUDE.md (existing - unchanged)`));
|
|
636
647
|
console.log(chalk.dim(` \u251C\u2500\u2500 KODE.md (Kode AI instructions)`));
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -306,7 +306,7 @@ declare function generateInitialContext(config: ProjectConfig, scripts: CdnScrip
|
|
|
306
306
|
staging_domain?: string | null;
|
|
307
307
|
}): string;
|
|
308
308
|
/**
|
|
309
|
-
* Generate CLAUDE.md content
|
|
309
|
+
* Generate full CLAUDE.md content for new projects
|
|
310
310
|
*/
|
|
311
311
|
declare function generateClaudeMd(siteName: string, scriptsDir?: string): string;
|
|
312
312
|
|
package/dist/index.js
CHANGED