@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.
@@ -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 claudeMdContent = generateClaudeMd(config.siteName, config.scriptsDir || "scripts");
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: "append",
595
- message: "Append to existing CLAUDE.md (recommended)"
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 === "append") {
622
+ if (action === "prepend") {
611
623
  const existingContent = readFileSync3(claudeMdPath, "utf-8");
612
- const separator = "\n\n---\n\n";
613
- writeFileSync3(claudeMdPath, existingContent + separator + claudeMdContent);
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"), claudeMdContent);
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, claudeMdContent);
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 === "appended") {
633
- console.log(chalk.dim(` \u251C\u2500\u2500 CLAUDE.md (Kode instructions appended)`));
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
@@ -13,7 +13,7 @@ import {
13
13
  readPageContext,
14
14
  statusCommand,
15
15
  watchCommand
16
- } from "./chunk-LYIXUQOG.js";
16
+ } from "./chunk-RS5LGRLV.js";
17
17
 
18
18
  // src/cli.ts
19
19
  import { Command } from "commander";
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
@@ -27,7 +27,7 @@ import {
27
27
  updateScriptPurpose,
28
28
  watchCommand,
29
29
  writeContext
30
- } from "./chunk-LYIXUQOG.js";
30
+ } from "./chunk-RS5LGRLV.js";
31
31
  export {
32
32
  KodeApiClient,
33
33
  KodeApiError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curenorway/kode-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "CLI tool for Cure Kode - manage JS/CSS scripts for Webflow sites",
5
5
  "type": "module",
6
6
  "bin": {