From 9eeb70e512d7100981258ef3e22c1bc100a7742f Mon Sep 17 00:00:00 2001 From: Mark Stuart Date: Wed, 30 Sep 2026 22:33:48 +0000 Subject: [PATCH 1/3] docs: align MCP examples with tool schemas --- README.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f7f190d..8bf7090 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,8 @@ Get detailed explanation of a symbol: ```typescript explain_code({ symbol: "UserService", - context_lines: 20 + include_dependencies: true, + file: "src/services/user.rs" }) ``` @@ -187,7 +188,8 @@ Find why a decision was made: ```typescript trace_decision({ topic: "why microservices", - max_results: 5 + time_range: "90d", + file: "src/services" }) ``` @@ -197,8 +199,9 @@ Find related code and dependencies: ```typescript find_related({ - symbol: "AuthController", - relationship_type: "both" // "depends_on" | "depended_by" | "both" + file: "src/auth/controller.ts", + depth: 2, + direction: "both" // "dependencies" | "dependents" | "both" }) ``` @@ -208,8 +211,9 @@ Store persistent knowledge: ```typescript remember({ - key: "auth-strategy", - value: "We use JWT for stateless auth across microservices" + topic: "auth-strategy", + content: "We use JWT for stateless auth across microservices", + tags: ["architecture", "security"] }) ``` @@ -229,8 +233,9 @@ Retrieve learned patterns: ```typescript get_session_patterns({ - pattern_type: "architecture", // or "errors", "refactoring", "testing" - min_confidence: 0.7 + pattern_type: "testing", // "naming" | "error" | "testing" | "organization" | "import" | "config" + min_confidence: 0.7, + top: 10 }) ``` From 98c2466a604c26292cf615f35726119fa051e4e3 Mon Sep 17 00:00:00 2001 From: Mark Stuart Date: Wed, 30 Sep 2026 23:07:32 +0000 Subject: [PATCH 2/3] docs: address MCP example review feedback --- README.md | 16 +++++++--------- npm/README.md | 21 ++++++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8bf7090..f17187c 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,10 @@ Remember important facts: ```bash # Via MCP server -remember("We use JWT for auth because of scalability requirements") +remember({ + topic: "auth-strategy", + content: "We use JWT for auth because of scalability requirements" +}) ``` ## MCP Tools @@ -175,9 +178,7 @@ Get detailed explanation of a symbol: ```typescript explain_code({ - symbol: "UserService", - include_dependencies: true, - file: "src/services/user.rs" + symbol: "UserService" }) ``` @@ -188,8 +189,7 @@ Find why a decision was made: ```typescript trace_decision({ topic: "why microservices", - time_range: "90d", - file: "src/services" + time_range: "90d" }) ``` @@ -200,7 +200,6 @@ Find related code and dependencies: ```typescript find_related({ file: "src/auth/controller.ts", - depth: 2, direction: "both" // "dependencies" | "dependents" | "both" }) ``` @@ -234,8 +233,7 @@ Retrieve learned patterns: ```typescript get_session_patterns({ pattern_type: "testing", // "naming" | "error" | "testing" | "organization" | "import" | "config" - min_confidence: 0.7, - top: 10 + min_confidence: 0.7 }) ``` diff --git a/npm/README.md b/npm/README.md index 4ea4add..46ab24f 100644 --- a/npm/README.md +++ b/npm/README.md @@ -138,7 +138,10 @@ Remember important facts: ```bash # Via MCP server -remember("We use JWT for auth because of scalability requirements") +remember({ + topic: "auth-strategy", + content: "We use JWT for auth because of scalability requirements" +}) ``` ## MCP Tools @@ -165,8 +168,7 @@ Get detailed explanation of a symbol: ```typescript explain_code({ - symbol: "UserService", - context_lines: 20 + symbol: "UserService" }) ``` @@ -177,7 +179,7 @@ Find why a decision was made: ```typescript trace_decision({ topic: "why microservices", - max_results: 5 + time_range: "90d" }) ``` @@ -187,8 +189,8 @@ Find related code and dependencies: ```typescript find_related({ - symbol: "AuthController", - relationship_type: "both" // "depends_on" | "depended_by" | "both" + file: "src/auth/controller.ts", + direction: "both" // "dependencies" | "dependents" | "both" }) ``` @@ -198,8 +200,9 @@ Store persistent knowledge: ```typescript remember({ - key: "auth-strategy", - value: "We use JWT for stateless auth across microservices" + topic: "auth-strategy", + content: "We use JWT for stateless auth across microservices", + tags: ["architecture", "security"] }) ``` @@ -219,7 +222,7 @@ Retrieve learned patterns: ```typescript get_session_patterns({ - pattern_type: "architecture", // or "errors", "refactoring", "testing" + pattern_type: "testing", // "naming" | "error" | "testing" | "organization" | "import" | "config" min_confidence: 0.7 }) ``` From 540330af57279df69ed569ac560b59084dab875e Mon Sep 17 00:00:00 2001 From: Mark Stuart Date: Wed, 30 Sep 2026 23:14:07 +0000 Subject: [PATCH 3/3] fix: preserve newest files when timestamps tie --- src/git/history.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/git/history.rs b/src/git/history.rs index f8788da..0f85683 100644 --- a/src/git/history.rs +++ b/src/git/history.rs @@ -339,6 +339,9 @@ impl GitHistory { continue; }; for file in &commit.files_changed { + if seen.len() >= limit { + break; + } seen.entry(file.clone()).or_insert(commit.timestamp); } if seen.len() >= limit { @@ -495,10 +498,14 @@ mod tests { } let git = GitHistory::open(&path).unwrap(); + assert_eq!(git.walk_commits(100).unwrap().len(), 8); let files = git.recent_files(2).unwrap(); assert_eq!(files.len(), 2); - assert!(files.iter().any(|(file, _)| file == "lib.rs")); + assert!( + files.iter().any(|(file, _)| file == "lib.rs"), + "recent files: {files:?}" + ); } #[test]