repomemory 1.0.2 → 1.0.4
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/commands/init.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const CLAUDE_MD_BLOCK = "## Repository Memory (repomemory)\n\nThis repo uses [repomemory](https://github.com/DanielGuru/repomemory) for persistent AI memory.\n\n**At the start of every task:**\n1. Use `context_search` to find relevant architecture, decisions, and known issues\n2. Read `.context/index.md` for quick project orientation\n\n**During your session:**\n- Use `context_write` to record discoveries, decisions, and gotchas\n- Use `context_delete` to remove stale or incorrect knowledge\n\n**Before modifying code:**\n- Search `context_search(\"component name\")` for known regressions\n- Check `context_search(\"why\")` for past decisions before proposing alternatives\n\n**At end of session:**\n- Write a brief session summary: `context_write(category=\"sessions\", ...)`";
|
|
1
2
|
export declare function initCommand(options: {
|
|
2
3
|
dir?: string;
|
|
3
4
|
provider?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAOA,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,0vBAiBiD,CAAC;AAE9E,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,iBAkF7E"}
|
package/dist/commands/init.js
CHANGED
|
@@ -3,6 +3,24 @@ import { join } from "path";
|
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import { loadConfig, DEFAULT_CONFIG } from "../lib/config.js";
|
|
5
5
|
import { ContextStore } from "../lib/context-store.js";
|
|
6
|
+
export const CLAUDE_MD_BLOCK = `## Repository Memory (repomemory)
|
|
7
|
+
|
|
8
|
+
This repo uses [repomemory](https://github.com/DanielGuru/repomemory) for persistent AI memory.
|
|
9
|
+
|
|
10
|
+
**At the start of every task:**
|
|
11
|
+
1. Use \`context_search\` to find relevant architecture, decisions, and known issues
|
|
12
|
+
2. Read \`.context/index.md\` for quick project orientation
|
|
13
|
+
|
|
14
|
+
**During your session:**
|
|
15
|
+
- Use \`context_write\` to record discoveries, decisions, and gotchas
|
|
16
|
+
- Use \`context_delete\` to remove stale or incorrect knowledge
|
|
17
|
+
|
|
18
|
+
**Before modifying code:**
|
|
19
|
+
- Search \`context_search("component name")\` for known regressions
|
|
20
|
+
- Check \`context_search("why")\` for past decisions before proposing alternatives
|
|
21
|
+
|
|
22
|
+
**At end of session:**
|
|
23
|
+
- Write a brief session summary: \`context_write(category="sessions", ...)\``;
|
|
6
24
|
export async function initCommand(options) {
|
|
7
25
|
const repoRoot = options.dir || process.cwd();
|
|
8
26
|
const config = loadConfig(repoRoot);
|
|
@@ -51,35 +69,26 @@ Write new learnings using the \`context_write\` MCP tool during your session.
|
|
|
51
69
|
};
|
|
52
70
|
writeFileSync(configPath, JSON.stringify(configToWrite, null, 2) + "\n");
|
|
53
71
|
}
|
|
54
|
-
console.log(chalk.green("\u2713 Initialized .context/ directory"));
|
|
72
|
+
console.log(chalk.green("\u2713 Initialized .context/ directory\n"));
|
|
73
|
+
console.log(chalk.bold("Next steps:\n"));
|
|
74
|
+
console.log(` ${chalk.cyan("1.")} Set your API key:`);
|
|
75
|
+
console.log(chalk.dim(` export ANTHROPIC_API_KEY=sk-ant-...`));
|
|
55
76
|
console.log();
|
|
56
|
-
console.log(chalk.
|
|
57
|
-
console.log(
|
|
58
|
-
console.log(` ${chalk.cyan(".context/facts/")} \u2014 Architecture & patterns`);
|
|
59
|
-
console.log(` ${chalk.cyan(".context/decisions/")} \u2014 Why things are this way`);
|
|
60
|
-
console.log(` ${chalk.cyan(".context/regressions/")} \u2014 Known gotchas`);
|
|
61
|
-
console.log(` ${chalk.cyan(".context/sessions/")} \u2014 Session summaries`);
|
|
62
|
-
console.log(` ${chalk.cyan(".context/changelog/")} \u2014 Monthly changelogs`);
|
|
63
|
-
console.log(` ${chalk.cyan(".repomemory.json")} \u2014 Configuration`);
|
|
77
|
+
console.log(` ${chalk.cyan("2.")} Analyze your repo:`);
|
|
78
|
+
console.log(chalk.dim(` npx repomemory analyze`));
|
|
64
79
|
console.log();
|
|
65
|
-
console.log(chalk.
|
|
80
|
+
console.log(` ${chalk.cyan("3.")} Connect Claude Code (one-time):`);
|
|
81
|
+
console.log(chalk.dim(` npx repomemory setup claude`));
|
|
66
82
|
console.log();
|
|
67
|
-
console.log(`
|
|
68
|
-
console.log(
|
|
69
|
-
console.log(chalk.
|
|
70
|
-
console.log(chalk.dim(` # or: export GEMINI_API_KEY=...`));
|
|
71
|
-
console.log(chalk.dim(` # or: export GROK_API_KEY=...`));
|
|
83
|
+
console.log(` ${chalk.cyan("4.")} Add this to your ${chalk.bold("CLAUDE.md")} so Claude uses it automatically:`);
|
|
84
|
+
console.log();
|
|
85
|
+
console.log(chalk.cyan(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 copy below into CLAUDE.md \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
72
86
|
console.log();
|
|
73
|
-
console.log(
|
|
74
|
-
console.log(chalk.dim(` repomemory analyze`));
|
|
87
|
+
console.log(CLAUDE_MD_BLOCK);
|
|
75
88
|
console.log();
|
|
76
|
-
console.log(
|
|
77
|
-
console.log(chalk.dim(` repomemory setup claude # Claude Code`));
|
|
78
|
-
console.log(chalk.dim(` repomemory setup cursor # Cursor`));
|
|
79
|
-
console.log(chalk.dim(` repomemory setup copilot # GitHub Copilot`));
|
|
80
|
-
console.log(chalk.dim(` repomemory setup windsurf # Windsurf`));
|
|
81
|
-
console.log(chalk.dim(` repomemory setup cline # Cline`));
|
|
89
|
+
console.log(chalk.cyan(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
82
90
|
console.log();
|
|
83
|
-
console.log(`
|
|
91
|
+
console.log(` ${chalk.cyan("5.")} Commit to git:`);
|
|
92
|
+
console.log(chalk.dim(` git add .context/ .repomemory.json CLAUDE.md && git commit -m "Add repomemory"`));
|
|
84
93
|
}
|
|
85
94
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAA4C;IAC5E,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAC9C,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAEpC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrB,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAoB,CAAC;IACjD,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEjD,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;QACnB,OAAO,CAAC,GA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