gitmem-mcp 1.4.0 → 1.4.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.4.1] - 2026-02-22
11
+
12
+ ### Added
13
+ - **AGENTS.md generation**: Init wizard now creates an IDE-agnostic `AGENTS.md` file alongside the client-specific instructions file. Contains tool table, core workflow, sub-agent patterns (`prepare_context`, `absorb_observations`), and example JSON tool calls. Read by Codex, Copilot, Gemini, Cursor, and other AI coding assistants for automatic project discovery.
14
+
10
15
  ## [1.4.0] - 2026-02-22
11
16
 
12
17
  ### Changed
@@ -879,6 +879,51 @@ async function stepGitignore() {
879
879
  return { done: true };
880
880
  }
881
881
 
882
+ async function stepAgentsMd() {
883
+ const agentsPath = join(cwd, "AGENTS.md");
884
+ const templatePath = join(__dirname, "..", "AGENTS.md.template");
885
+
886
+ // Already exists — don't overwrite
887
+ if (existsSync(agentsPath)) {
888
+ const content = readFileSync(agentsPath, "utf-8");
889
+ if (content.includes("GitMem")) {
890
+ log(CHECK, `AGENTS.md already includes gitmem`);
891
+ return { done: false };
892
+ }
893
+ // Existing AGENTS.md without gitmem — ask before appending
894
+ if (interactive) {
895
+ if (!(await confirm("Add gitmem section to existing AGENTS.md?"))) {
896
+ log(SKIP, "AGENTS.md skipped");
897
+ return { done: false };
898
+ }
899
+ }
900
+ }
901
+
902
+ let template;
903
+ try {
904
+ template = readFileSync(templatePath, "utf-8");
905
+ } catch {
906
+ // Template not found — skip silently
907
+ return { done: false };
908
+ }
909
+
910
+ if (dryRun) {
911
+ log(CHECK, `Would ${existsSync(agentsPath) ? "update" : "create"} AGENTS.md`, "[dry-run]");
912
+ return { done: true };
913
+ }
914
+
915
+ if (existsSync(agentsPath)) {
916
+ const existing = readFileSync(agentsPath, "utf-8");
917
+ writeFileSync(agentsPath, existing.trimEnd() + "\n\n" + template + "\n");
918
+ log(CHECK, "Updated AGENTS.md", "Added gitmem section (your existing content is preserved)");
919
+ } else {
920
+ writeFileSync(agentsPath, template + "\n");
921
+ log(CHECK, "Created AGENTS.md", "IDE-agnostic agent discovery file");
922
+ }
923
+
924
+ return { done: true };
925
+ }
926
+
882
927
  async function stepFeedbackOptIn() {
883
928
  const configPath = join(gitmemDir, "config.json");
884
929
  const config = readJson(configPath) || {};
@@ -980,6 +1025,9 @@ async function main() {
980
1025
  const r6 = await stepGitignore();
981
1026
  if (r6.done) configured++;
982
1027
 
1028
+ const r6b = await stepAgentsMd();
1029
+ if (r6b.done) configured++;
1030
+
983
1031
  const r7 = await stepFeedbackOptIn();
984
1032
  if (r7.done) configured++;
985
1033
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitmem-mcp",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "mcpName": "io.github.gitmem-dev/gitmem",
5
5
  "description": "Persistent learning memory for AI coding agents. Memory that compounds.",
6
6
  "type": "module",