Skip to content

Commit 5f3064a

Browse files
committed
feat(cli): add support for dynamic configuration loading via SUPAMEM_PROJECT_ROOT
- Implemented functionality in cmd_mcp_server to utilize the SUPAMEM_PROJECT_ROOT environment variable for loading configurations dynamically. - Updated documentation to clarify the usage of SUPAMEM_PROJECT_ROOT when running the server outside the repository context. - Refactored cursor.py to conditionally inject SUPAMEM_PROJECT_ROOT based on the presence of the configuration file in the current working directory.
1 parent 162afb4 commit 5f3064a

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

.cursor/hooks.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"sessionStart": [
3+
{
4+
"command": [
5+
"supamem",
6+
"index",
7+
"--snapshot",
8+
"cursor"
9+
],
10+
"timeout": 60
11+
}
12+
]
13+
}

.cursor/rules/dual-memory.mdc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
description: Use both semantic (qdrant-find) and structural (graphify) memory before non-trivial code changes
3+
alwaysApply: true
4+
---
5+
6+
# Dual Memory — supamem
7+
8+
Use **both** memory layers before any non-trivial code change.
9+
10+
## When to query
11+
12+
- New feature, refactor, debugging, or architecture decision
13+
- Adding/modifying dependencies
14+
- Code review of a non-trivial change
15+
16+
## Semantic (Qdrant tuned_hybrid)
17+
18+
```
19+
qdrant-find "<topic> decisions"
20+
qdrant-find "<topic> known issues"
21+
qdrant-find "<topic> patterns"
22+
```
23+
24+
## Refresh
25+
26+
If memory feels stale: `supamem index --target tuned --force`.
27+
28+
## Anti-patterns
29+
30+
- ❌ Querying after coding — check memory before implementing.
31+
- ❌ Skipping semantic for "what calls X" — use structural for that.
32+
- ❌ Trusting hits without checking source attribution — always inspect the
33+
payload's `source` field.

0 commit comments

Comments
 (0)