kradle 0.6.10 → 0.6.12
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.
|
@@ -4,8 +4,13 @@ import { Command, Flags } from "@oclif/core";
|
|
|
4
4
|
import enquirer from "enquirer";
|
|
5
5
|
import pc from "picocolors";
|
|
6
6
|
import { getStaticResourcePath } from "../../lib/utils.js";
|
|
7
|
-
// Files that should be synced on update (documentation files only)
|
|
8
|
-
|
|
7
|
+
// Files that should be synced on update (documentation files only).
|
|
8
|
+
// CLAUDE.md is a verbatim copy of AGENTS.md — the template lives only at
|
|
9
|
+
// project_template/AGENTS.md and we mirror it into CLAUDE.md in the target.
|
|
10
|
+
const SYNC_FILES = [
|
|
11
|
+
{ filename: "AGENTS.md", templateFilename: "AGENTS.md" },
|
|
12
|
+
{ filename: "CLAUDE.md", templateFilename: "AGENTS.md" },
|
|
13
|
+
];
|
|
9
14
|
export default class Sync extends Command {
|
|
10
15
|
static description = "Sync project AI docs (AGENTS.md, CLAUDE.md) to the latest version from the CLI";
|
|
11
16
|
static examples = [
|
|
@@ -32,8 +37,8 @@ export default class Sync extends Command {
|
|
|
32
37
|
const templateDir = getStaticResourcePath("project_template");
|
|
33
38
|
const cwd = process.cwd();
|
|
34
39
|
const comparisons = [];
|
|
35
|
-
for (const filename of SYNC_FILES) {
|
|
36
|
-
const templatePath = path.join(templateDir,
|
|
40
|
+
for (const { filename, templateFilename } of SYNC_FILES) {
|
|
41
|
+
const templatePath = path.join(templateDir, templateFilename);
|
|
37
42
|
const localPath = path.join(cwd, filename);
|
|
38
43
|
let templateContent;
|
|
39
44
|
let localContent = null;
|
package/dist/commands/init.js
CHANGED
|
@@ -120,6 +120,10 @@ export default class Init extends Command {
|
|
|
120
120
|
const sourceEnvContent = await fs.readFile(sourceEnvPath, "utf-8");
|
|
121
121
|
const updatedEnvContent = `${sourceEnvContent}\nKRADLE_API_KEY=${apiKey}`;
|
|
122
122
|
await fs.writeFile(destEnvPath, updatedEnvContent);
|
|
123
|
+
// CLAUDE.md is a verbatim copy of AGENTS.md — Claude Code no longer
|
|
124
|
+
// follows @AGENTS.md imports reliably, so we duplicate the content.
|
|
125
|
+
const agentsContent = await fs.readFile(path.join(templateDir, "AGENTS.md"), "utf-8");
|
|
126
|
+
await fs.writeFile(path.join(targetDir, "CLAUDE.md"), agentsContent);
|
|
123
127
|
},
|
|
124
128
|
},
|
|
125
129
|
{
|
|
@@ -148,6 +152,7 @@ export default class Init extends Command {
|
|
|
148
152
|
// Display success message and next steps
|
|
149
153
|
this.log(pc.green(`\n✓ Project initialized successfully!`));
|
|
150
154
|
this.log(pc.dim(`\nProject location: ${targetDir}`));
|
|
155
|
+
this.log(pc.dim("AGENTS.md and CLAUDE.md were added to the project — LLM-based coding agents will read them to learn how to work with Kradle."));
|
|
151
156
|
this.log(pc.bold("\n📝 Next steps:"));
|
|
152
157
|
if (targetDir !== cwd) {
|
|
153
158
|
this.log(pc.cyan(` cd ${projectName}`));
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@AGENTS.md
|