memory-journal-mcp 6.2.1 → 7.0.0

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/README.md CHANGED
@@ -10,9 +10,10 @@
10
10
  [![MCP Registry](https://img.shields.io/badge/MCP_Registry-Published-green)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.neverinfamous/memory-journal-mcp)
11
11
  [![Security](https://img.shields.io/badge/Security-Enhanced-green.svg)](SECURITY.md)
12
12
  [![TypeScript](https://img.shields.io/badge/TypeScript-Strict-blue.svg)](https://github.com/neverinfamous/memory-journal-mcp)
13
- ![Coverage](https://img.shields.io/badge/Coverage-96%25-brightgreen.svg)
14
- ![Tests](https://img.shields.io/badge/Tests-1767_passed-brightgreen.svg)
15
- ![E2E Tests](https://img.shields.io/badge/E2E_Tests-377_passed-brightgreen.svg)
13
+ ![Coverage](https://img.shields.io/badge/Coverage-97.52%25-brightgreen.svg)
14
+ ![Tests](https://img.shields.io/badge/Tests-1782_passed-brightgreen.svg)
15
+ ![E2E Tests](https://img.shields.io/badge/E2E_Tests-391_passed-brightgreen.svg)
16
+ [![CI](https://github.com/neverinfamous/memory-journal-mcp/actions/workflows/gatekeeper.yml/badge.svg)](https://github.com/neverinfamous/memory-journal-mcp/actions/workflows/gatekeeper.yml)
16
17
 
17
18
  🎯 **AI Context + Project Intelligence:** Bridge disconnected AI sessions with persistent project memory and **automatic session handoff** — with full GitHub workflow integration.
18
19
 
@@ -27,14 +28,15 @@
27
28
 
28
29
  ### What Sets Us Apart
29
30
 
30
- **61 MCP Tools** · **16 Workflow Prompts** · **28 Resources** · **10 Tool Groups** · **Code Mode** · **GitHub Commander** (Issue Triage, PR Review, Milestone Sprints, Security/Quality/Perf Audits) · **GitHub Integration** (Issues, PRs, Actions, Kanban, Milestones, Insights) · **Team Collaboration** (Shared DB, Vector Search, Cross-Project Insights)
31
+ **61 MCP Tools** · **17 Workflow Prompts** · **38 Resources** · **10 Tool Groups** · **Code Mode** · **GitHub Commander** (Issue Triage, PR Review, Milestone Sprints, Security/Quality/Perf Audits) · **GitHub Integration** (Issues, PRs, Actions, Kanban, Milestones, Insights) · **Team Collaboration** (Shared DB, Vector Search, Cross-Project Insights)
31
32
 
32
33
  | Feature | Description |
33
34
  | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
- | **Session Intelligence** | Agents auto-query project history, create entries at checkpoints, and hand off context between sessions via `/session-summary` |
35
+ | **Session Intelligence** | Agents auto-query project history, create entries at checkpoints, and hand off context between sessions via `/session-summary` and `team-session-summary` |
35
36
  | **GitHub Integration** | 16 tools for Issues, PRs, Actions, Kanban, Milestones (%), Copilot Reviews, and 14-day Insights |
37
+ | **Dynamic Project Routing** | Seamlessly switch contexts and access CI/Issue tracking across multiple repositories using a single server instance via `PROJECT_REGISTRY` |
36
38
  | **Knowledge Graphs** | 8 relationship types linking specs → implementations → tests → PRs with Mermaid visualization |
37
- | **Triple Search** | Full-text (FTS5), semantic (`@huggingface/transformers` + `sqlite-vec`), and date-range search |
39
+ | **Hybrid Search** | Reciprocal Rank Fusion combining FTS5 keywords, semantic vector similarity, auto-heuristics, and date-range filters |
38
40
  | **Code Mode** | Execute multi-step operations in a secure sandbox — up to 90% token savings via `mj.*` API |
39
41
  | **Configurable Briefing** | 12 env vars / CLI flags control `memory://briefing` content — entries, team, GitHub detail, skills awareness |
40
42
  | **Reports & Analytics** | Standups, retrospectives, PR summaries, digests, period analyses, and milestone tracking |
@@ -43,8 +45,6 @@
43
45
  | **Security & Transport** | OAuth 2.1 (RFC 9728/8414, JWT/JWKS, scopes), Streamable HTTP + SSE, rate limiting, CORS, SQL injection prevention, non-root Docker |
44
46
  | **Structured Error Handling** | Every tool returns `{success, error, code, category, suggestion, recoverable}` — agents get classification, remediation hints, and recoverability signals |
45
47
  | **Agent Collaboration** | IDE agents and Copilot share context; review findings become searchable knowledge; agents suggest reusable rules and skills ([setup](docs/copilot-setup.md)) |
46
- | **Strict TypeScript** | 100% type-safe with strict mode, typed error classes, and no `eslint-disable` pragmas |
47
- | **MCP 2025-03-26 Compliant** | Tool safety annotations, resource priorities, and progress notifications |
48
48
  | **GitHub Commander** | Skills for issue triage, PR reviews, sprint milestones, and security/quality/performance audits with journal trails ([docs](skills/github-commander/SKILL.md)) |
49
49
 
50
50
  ---
@@ -85,10 +85,11 @@ flowchart TB
85
85
  Link["Link Entries"]
86
86
  end
87
87
 
88
- subgraph Search["🔍 Triple Search"]
89
- FTS["Full-Text"]
88
+ subgraph Search["🔍 Hybrid Search"]
89
+ FTS["Keyword (FTS5)"]
90
90
  Semantic["Semantic (Vector)"]
91
91
  DateRange["Date Range"]
92
+ RRF["Reciprocal Rank Fusion"]
92
93
  end
93
94
 
94
95
  subgraph GitHub["🐙 GitHub Integration"]
@@ -114,17 +115,28 @@ flowchart TB
114
115
 
115
116
  ---
116
117
 
117
- ## Suggested Rule (Add to AGENTS.md, GEMINI.md, etc)
118
-
119
- **PERFORM AT START OF CHATS**: Read `memory://briefing`, present as two-column markdown table (Context | Value). Include all available fields; omit absent rows.
120
-
121
- **CREATE JOURNAL ENTRIES** at natural checkpoints:
122
-
123
- - After pushing to main (`milestone` or `technical_note`, tag with version)
124
- - After significant design decisions or learnings (`project_decision`)
125
- - After resolving non-trivial bugs (`bug_fix`, link to issue number)
126
-
127
- **SUGGEST CREATING OR IMPROVING RULES AND SKILLS** as you notice workflow opportunities.
118
+ Suggested Rule (Add to AGENTS.md, GEMINI.md, etc):
119
+
120
+ 🛑 MANDATORY SESSION START ROUTINE
121
+
122
+ Execute BEFORE fulfilling any user request in a new session:
123
+
124
+ 1. **TARGET**: Infer `repo_name` from the active workspace context or user prompt. If the task is not associated with a specific project, fallback to using the generic resource without a repo name (which defaults to the first registered workspace).
125
+ 2. **FETCH**: Use the MCP `read_resource` tool (Server: `memory-journal-mcp`) to read `memory://briefing/{repo_name}` (or `memory://briefing` if falling back).
126
+ - **RESTRICTION**: Do NOT use `execute_code` for this step.
127
+ 3. **RENDER TABLE**: Extract `userMessage` and output it EXCLUSIVELY as a vertical Markdown Table (2 columns: Field and Value).
128
+ - **RESTRICTION**: NO bulleted lists. NO truncation of arrays or lists.
129
+ - **REQUIRED MAP**: Output all data comprehensively. Map these fields to the "Field" column:
130
+ - Application / Project
131
+ - Journal Entries
132
+ - Team DB Entries
133
+ - Latest Entry (Journal)
134
+ - Latest Entry (Team)
135
+ - GitHub (Include Repo, Branch, CI Status, Issues, PRs, Insights on separate lines in the Value column)
136
+ - Milestone Progress
137
+ - Template Resources (Output count only, not URLs)
138
+ - Registered Workspaces (Output FULL list of project names)
139
+ - Available Extensions (Rules, Skills, Workflows)
128
140
 
129
141
  ---
130
142
 
@@ -173,7 +185,7 @@ Control which tools are exposed via `MEMORY_JOURNAL_MCP_TOOL_FILTER` (or CLI: `-
173
185
 
174
186
  **[Complete tools reference →](https://github.com/neverinfamous/memory-journal-mcp/wiki/Tools)**
175
187
 
176
- ### 🎯 **16 Workflow Prompts**
188
+ ### 🎯 **17 Workflow Prompts**
177
189
 
178
190
  - `find-related` - Discover connected entries via semantic similarity
179
191
  - `prepare-standup` - Daily standup summaries
@@ -191,14 +203,15 @@ Control which tools are exposed via `MEMORY_JOURNAL_MCP_TOOL_FILTER` (or CLI: `-
191
203
  - `project-milestone-tracker` - Milestone progress tracking
192
204
  - `confirm-briefing` - Acknowledge session context to user
193
205
  - `session-summary` - Create a session summary entry with accomplishments, pending items, and next-session context
206
+ - `team-session-summary` - Create a retrospective team session summary entry securely isolated to the team database
194
207
 
195
208
  **[Complete prompts guide →](https://github.com/neverinfamous/memory-journal-mcp/wiki/Prompts)**
196
209
 
197
- ### 📡 **28 Resources** (20 Static + 8 Template)
210
+ ### 📡 **38 Resources** (25 Static + 13 Template)
198
211
 
199
212
  **Static Resources** (appear in resource lists):
200
213
 
201
- - `memory://briefing` - **Session initialization**: compact context for AI agents (~300 tokens)
214
+ - `memory://briefing` / `memory://briefing/{repo}` - **Session initialization**: compact context for AI agents (~300 tokens)
202
215
  - `memory://instructions` - **Behavioral guidance**: complete server instructions for AI agents
203
216
  - `memory://recent` - 10 most recent entries
204
217
  - `memory://significant` - Significant milestones and breakthroughs
@@ -218,9 +231,18 @@ Control which tools are exposed via `MEMORY_JOURNAL_MCP_TOOL_FILTER` (or CLI: `-
218
231
  - `memory://team/statistics` - Team entry counts, types, and author breakdown
219
232
  - `memory://help` - Tool group index with descriptions and tool counts
220
233
  - `memory://help/gotchas` - Field notes, edge cases, and critical usage patterns
234
+ - `memory://metrics/summary` - Aggregate tool call metrics since server start (calls, errors, token estimates, duration) — HIGH priority
235
+ - `memory://metrics/tokens` - Per-tool token usage breakdown sorted by output token cost — MEDIUM priority
236
+ - `memory://metrics/system` - Process-level metrics: memory (MB), uptime (s), Node.js version, platform — MEDIUM priority
237
+ - `memory://metrics/users` - Per-user call counts (populated when OAuth user identifiers are present) — LOW priority
238
+ - `memory://audit` - Last 50 write/admin tool call entries from the JSONL audit log (requires `AUDIT_LOG_PATH`)
221
239
 
222
240
  **Template Resources** (require parameters, fetch directly by URI):
223
241
 
242
+ - `memory://github/status/{repo}` - Repository status targeted by repo
243
+ - `memory://github/insights/{repo}` - Repository insights targeted by repo
244
+ - `memory://github/milestones/{repo}` - Open milestones targeted by repo
245
+ - `memory://milestones/{repo}/{number}` - Milestone detail targeted by repo
224
246
  - `memory://projects/{number}/timeline` - Project activity timeline
225
247
  - `memory://issues/{issue_number}/entries` - Entries linked to issue
226
248
  - `memory://prs/{pr_number}/entries` - Entries linked to PR
@@ -294,6 +316,8 @@ npm run build
294
316
 
295
317
  Add this to your `~/.cursor/mcp.json`, Claude Desktop config, or equivalent:
296
318
 
319
+ ### Basic Configuration
320
+
297
321
  ```json
298
322
  {
299
323
  "mcpServers": {
@@ -301,7 +325,40 @@ Add this to your `~/.cursor/mcp.json`, Claude Desktop config, or equivalent:
301
325
  "command": "memory-journal-mcp",
302
326
  "env": {
303
327
  "GITHUB_TOKEN": "ghp_your_token_here",
304
- "GITHUB_REPO_PATH": "/path/to/your/git/repo"
328
+ "PROJECT_REGISTRY": "{\"my-repo\":{\"path\":\"/path/to/your/git/repo\",\"project_number\":1}}"
329
+ }
330
+ }
331
+ }
332
+ }
333
+ ```
334
+
335
+ ### Advanced Configuration (Recommended)
336
+
337
+ Showcasing the full power of the server, including Multi-Project Routing, Team Collaboration, Copilot awareness, and Context Injections.
338
+
339
+ ```json
340
+ {
341
+ "mcpServers": {
342
+ "memory-journal-mcp": {
343
+ "command": "memory-journal-mcp",
344
+ "env": {
345
+ "DB_PATH": "/path/to/your/memory_journal.db",
346
+ "TEAM_DB_PATH": "/path/to/shared/team.db",
347
+ "GITHUB_TOKEN": "ghp_your_token_here",
348
+ "PROJECT_REGISTRY": "{\"my-repo\":{\"path\":\"/path/to/repo\",\"project_number\":1},\"other-repo\":{\"path\":\"/path/to/other\",\"project_number\":5}}",
349
+ "AUTO_REBUILD_INDEX": "true",
350
+ "MEMORY_JOURNAL_MCP_TOOL_FILTER": "codemode",
351
+ "BRIEFING_ENTRY_COUNT": "3",
352
+ "BRIEFING_INCLUDE_TEAM": "true",
353
+ "BRIEFING_ISSUE_COUNT": "1",
354
+ "BRIEFING_PR_COUNT": "1",
355
+ "BRIEFING_PR_STATUS": "true",
356
+ "BRIEFING_WORKFLOW_COUNT": "1",
357
+ "BRIEFING_WORKFLOW_STATUS": "true",
358
+ "BRIEFING_COPILOT_REVIEWS": "true",
359
+ "RULES_FILE_PATH": "/path/to/your/RULES.md",
360
+ "SKILLS_DIR_PATH": "/path/to/your/skills",
361
+ "MEMORY_JOURNAL_WORKFLOW_SUMMARY": "/deploy: prod deployment | /audit: security scan"
305
362
  }
306
363
  }
307
364
  }
@@ -414,69 +471,74 @@ Each job is error-isolated — a failure in one job won't affect the others. Sch
414
471
 
415
472
  ### GitHub Integration Configuration
416
473
 
417
- The GitHub tools (`get_github_issues`, `get_github_prs`, etc.) auto-detect the repository from your git context when `GITHUB_REPO_PATH` is configured (shown in the Quick Start config above).
418
-
419
- | Environment Variable | Description |
420
- | --------------------------------- | ------------------------------------------------------------------------------------------------- |
421
- | `DB_PATH` | Database file location (CLI: `--db`; default: `./memory_journal.db`) |
422
- | `TEAM_DB_PATH` | Team database file location (CLI: `--team-db`) |
423
- | `TEAM_AUTHOR` | Override author name for team entries (default: `git config user.name`) |
424
- | `GITHUB_TOKEN` | GitHub personal access token for API access |
425
- | `GITHUB_REPO_PATH` | Path to the git repository for auto-detecting owner/repo |
426
- | `DEFAULT_PROJECT_NUMBER` | Default GitHub Project number for auto-assignment when creating issues |
427
- | `AUTO_REBUILD_INDEX` | Set to `true` to rebuild vector index on server startup |
428
- | `MCP_HOST` | Server bind host (`0.0.0.0` for containers, default: `localhost`) |
429
- | `MCP_AUTH_TOKEN` | Bearer token for HTTP transport authentication (CLI: `--auth-token`) |
430
- | `MCP_CORS_ORIGIN` | Allowed CORS origins for HTTP transport, comma-separated (default: `*`) |
431
- | `MCP_RATE_LIMIT_MAX` | Max requests per minute per client IP, HTTP only (default: `100`) |
432
- | `LOG_LEVEL` | Log verbosity: `error`, `warn`, `info`, `debug` (default: `info`; CLI: `--log-level`) |
433
- | `MCP_ENABLE_HSTS` | Enable HSTS security header on HTTP responses (CLI: `--enable-hsts`; default: `false`) |
434
- | `OAUTH_ENABLED` | Set to `true` to enable OAuth 2.1 authentication (HTTP only) |
435
- | `OAUTH_ISSUER` | OAuth issuer URL (e.g., `https://auth.example.com/realms/mcp`) |
436
- | `OAUTH_AUDIENCE` | Expected JWT audience claim |
437
- | `OAUTH_JWKS_URI` | JWKS endpoint for token signature verification |
438
- | `BRIEFING_ENTRY_COUNT` | Journal entries in briefing (CLI: `--briefing-entries`; default: `3`) |
439
- | `BRIEFING_INCLUDE_TEAM` | Include team DB entries in briefing (`true`/`false`; default: `false`) |
440
- | `BRIEFING_ISSUE_COUNT` | Issues to list in briefing; `0` = count only (default: `0`) |
441
- | `BRIEFING_PR_COUNT` | PRs to list in briefing; `0` = count only (default: `0`) |
442
- | `BRIEFING_PR_STATUS` | Show PR status breakdown (open/merged/closed; default: `false`) |
443
- | `BRIEFING_WORKFLOW_COUNT` | Workflow runs to list in briefing; `0` = status only (default: `0`) |
444
- | `BRIEFING_WORKFLOW_STATUS` | Show workflow status breakdown in briefing (default: `false`) |
445
- | `BRIEFING_COPILOT_REVIEWS` | Aggregate Copilot review state in briefing (default: `false`) |
446
- | `RULES_FILE_PATH` | Path to user rules file for agent awareness (CLI: `--rules-file`) |
447
- | `SKILLS_DIR_PATH` | Path to skills directory for agent awareness (CLI: `--skills-dir`) |
448
- | `MEMORY_JOURNAL_WORKFLOW_SUMMARY` | Free-text workflow summary for `memory://workflows` (CLI: `--workflow-summary`) |
449
- | `INSTRUCTION_LEVEL` | Briefing depth: `essential`, `standard`, `full` (CLI: `--instruction-level`; default: `standard`) |
450
- | `PROJECT_LINT_CMD` | Project lint command for GitHub Commander validation gates (default: `npm run lint`) |
451
- | `PROJECT_TYPECHECK_CMD` | Project typecheck command (default: `npm run typecheck`; empty = skip) |
452
- | `PROJECT_BUILD_CMD` | Project build command (default: `npm run build`; empty = skip) |
453
- | `PROJECT_TEST_CMD` | Project test command (default: `npm run test`) |
454
- | `PROJECT_E2E_CMD` | Project E2E test command (default: empty = skip) |
455
- | `PROJECT_PACKAGE_MANAGER` | Package manager override: `npm`, `yarn`, `pnpm`, `bun` (default: auto-detect from lockfile) |
456
- | `PROJECT_HAS_DOCKERFILE` | Enable Docker audit steps (default: auto-detect) |
457
- | `COMMANDER_HITL_FILE_THRESHOLD` | Human-in-the-loop checkpoint if changes touch > N files (default: `10`) |
458
- | `COMMANDER_SECURITY_TOOLS` | Override security tool auto-detection (comma-separated; default: auto-detect) |
459
- | `COMMANDER_BRANCH_PREFIX` | Branch naming prefix for PRs (default: `fix`) |
460
-
461
- **Without `GITHUB_REPO_PATH`**: You'll need to explicitly provide `owner` and `repo` parameters when calling GitHub tools.
462
-
463
- #### Fallback Behavior
464
-
465
- When GitHub tools cannot auto-detect repository information:
466
-
467
- 1. **With `GITHUB_REPO_PATH` set**: Tools auto-detect `owner` and `repo` from git remote URL
468
- 2. **Without `GITHUB_REPO_PATH`**: Tools return structured response with `requiresUserInput: true` and instructions to provide `owner` and `repo` parameters
469
- 3. **With explicit parameters**: Always preferred - specify `owner` and `repo` directly in tool calls
470
-
471
- **Example response when auto-detection fails:**
472
-
473
- ```json
474
- {
475
- "error": "Could not auto-detect repository",
476
- "requiresUserInput": true,
477
- "instruction": "Please provide owner and repo parameters"
478
- }
479
- ```
474
+ The GitHub tools (`get_github_issues`, `get_github_prs`, etc.) auto-detect the repository from your git context when `PROJECT_REGISTRY` is configured or the MCP server is run inside a git repository.
475
+
476
+ | Environment Variable | Description |
477
+ | -------------------- | ----------------------------------------------------------------------- |
478
+ | `DB_PATH` | Database file location (CLI: `--db`; default: `./memory_journal.db`) |
479
+ | `TEAM_DB_PATH` | Team database file location (CLI: `--team-db`) |
480
+ | `TEAM_AUTHOR` | Override author name for team entries (default: `git config user.name`) |
481
+ | `GITHUB_TOKEN` | GitHub personal access token for API access |
482
+
483
+ | `DEFAULT_PROJECT_NUMBER` | Default GitHub Project number for auto-assignment when creating issues |
484
+ | `GITHUB_REPO_PATH` | Path to a git repository for auto-detecting owner/repo |
485
+ | `PROJECT_REGISTRY` | JSON map of repos to `{ path, project_number }` for multi-project auto-detection and routing |
486
+ | `AUTO_REBUILD_INDEX` | Set to `true` to rebuild vector index on server startup |
487
+ | `MCP_HOST` | Server bind host (`0.0.0.0` for containers, default: `localhost`) |
488
+ | `MCP_AUTH_TOKEN` | Bearer token for HTTP transport authentication (CLI: `--auth-token`) |
489
+ | `MCP_CORS_ORIGIN` | Allowed CORS origins for HTTP transport, comma-separated (default: `*`) |
490
+ | `MCP_RATE_LIMIT_MAX` | Max requests per minute per client IP, HTTP only (default: `100`) |
491
+ | `LOG_LEVEL` | Log verbosity: `error`, `warn`, `info`, `debug` (default: `info`; CLI: `--log-level`) |
492
+ | `MCP_ENABLE_HSTS` | Enable HSTS security header on HTTP responses (CLI: `--enable-hsts`; default: `false`) |
493
+ | `OAUTH_ENABLED` | Set to `true` to enable OAuth 2.1 authentication (HTTP only) |
494
+ | `OAUTH_ISSUER` | OAuth issuer URL (e.g., `https://auth.example.com/realms/mcp`) |
495
+ | `OAUTH_AUDIENCE` | Expected JWT audience claim |
496
+ | `OAUTH_JWKS_URI` | JWKS endpoint for token signature verification |
497
+ | `BRIEFING_ENTRY_COUNT` | Journal entries in briefing (CLI: `--briefing-entries`; default: `3`) |
498
+ | `BRIEFING_INCLUDE_TEAM` | Include team DB entries in briefing (`true`/`false`; default: `false`) |
499
+ | `BRIEFING_ISSUE_COUNT` | Issues to list in briefing; `0` = count only (default: `0`) |
500
+ | `BRIEFING_PR_COUNT` | PRs to list in briefing; `0` = count only (default: `0`) |
501
+ | `BRIEFING_PR_STATUS` | Show PR status breakdown (open/merged/closed; default: `false`) |
502
+ | `BRIEFING_WORKFLOW_COUNT` | Workflow runs to list in briefing; `0` = status only (default: `0`) |
503
+ | `BRIEFING_WORKFLOW_STATUS` | Show workflow status breakdown in briefing (default: `false`) |
504
+ | `BRIEFING_COPILOT_REVIEWS` | Aggregate Copilot review state in briefing (default: `false`) |
505
+ | `RULES_FILE_PATH` | Path to user rules file for agent awareness (CLI: `--rules-file`) |
506
+ | `SKILLS_DIR_PATH` | Path to skills directory for agent awareness (CLI: `--skills-dir`) |
507
+ | `MEMORY_JOURNAL_WORKFLOW_SUMMARY` | Free-text workflow summary for `memory://workflows` (CLI: `--workflow-summary`) |
508
+ | `INSTRUCTION_LEVEL` | Briefing depth: `essential`, `standard`, `full` (CLI: `--instruction-level`; default: `standard`) |
509
+ | `PROJECT_LINT_CMD` | Project lint command for GitHub Commander validation gates (default: `npm run lint`) |
510
+ | `PROJECT_TYPECHECK_CMD` | Project typecheck command (default: `npm run typecheck`; empty = skip) |
511
+ | `PROJECT_BUILD_CMD` | Project build command (default: `npm run build`; empty = skip) |
512
+ | `PROJECT_TEST_CMD` | Project test command (default: `npm run test`) |
513
+ | `PROJECT_E2E_CMD` | Project E2E test command (default: empty = skip) |
514
+ | `PROJECT_PACKAGE_MANAGER` | Package manager override: `npm`, `yarn`, `pnpm`, `bun` (default: auto-detect from lockfile) |
515
+ | `PROJECT_HAS_DOCKERFILE` | Enable Docker audit steps (default: auto-detect) |
516
+ | `COMMANDER_HITL_FILE_THRESHOLD` | Human-in-the-loop checkpoint if changes touch > N files (default: `10`) |
517
+ | `COMMANDER_SECURITY_TOOLS` | Override security tool auto-detection (comma-separated; default: auto-detect) |
518
+ | `COMMANDER_BRANCH_PREFIX` | Branch naming prefix for PRs (default: `fix`) |
519
+ | `AUDIT_LOG_PATH` | Path for the JSONL audit log of write/admin tool calls. Rotates at 10 MB (keeps 5 archives). Omit to disable audit logging. |
520
+ | `AUDIT_REDACT` | Set to `true` to omit tool arguments from audit log entries for privacy (default: `false`) |
521
+ | `AUDIT_READS` | Log read-scoped tool calls in addition to write/admin (CLI: `--audit-reads`; default: `false`) |
522
+ | `AUDIT_LOG_MAX_SIZE` | Maximum audit log file size in bytes before rotation (CLI: `--audit-log-max-size`; default: `10485760`) |
523
+ | `MCP_METRICS_ENABLED` | Set to `false` to disable in-memory tool call metrics accumulation (default: `true`) |
524
+
525
+ **Multi-Project Workflows**: For agents to seamlessly support multiple projects, provide **`PROJECT_REGISTRY`**.
526
+
527
+ #### Dynamic Context Resolution & Auto-Detection
528
+
529
+ When executing GitHub tools (issues, PRs, context, etc.), the server resolves repository context in this order:
530
+
531
+ 1. **Dynamic Project Routing**: If the agent passes a `repo` string that matches a key in your `PROJECT_REGISTRY`, the server dynamically mounts the physical directory mapped to that project. It executes git commands locally and automatically infers the `owner`.
532
+ 2. **Explicit Override**: If the agent provides both `owner` and `repo` explicitly, those values override auto-detection for API calls.
533
+ 3. **Missing Context**: Without `PROJECT_REGISTRY` or explicit parameters, the server blocks execution and returns `{requiresUserInput: true}` to prompt the agent.
534
+
535
+ #### Automatic Project Routing (Kanban / Issues)
536
+
537
+ When opening an issue or viewing/moving a Kanban card, the server needs a GitHub Project number. It determines this via:
538
+
539
+ 1. Exploring the raw `project_number` argument passed by the agent.
540
+ 2. Checking if the `repo` string precisely matches an entry in your **`PROJECT_REGISTRY`**, seamlessly mapping it to its pre-configured `project_number`.
541
+ 3. Falling back to the globally defined `DEFAULT_PROJECT_NUMBER` if set.
480
542
 
481
543
  ### 🔐 OAuth 2.1 Authentication
482
544
 
@@ -521,7 +583,7 @@ memory-journal-mcp --transport http --port 3000
521
583
 
522
584
  ### 🔄 Session Management
523
585
 
524
- 1. **Session start** → agent reads `memory://briefing` and shows project context
586
+ 1. **Session start** → agent reads `memory://briefing` (or `memory://briefing/{repo}`) and shows project context
525
587
  2. **Session summary** → use `/session-summary` to capture progress and next-session context
526
588
  3. Next session's briefing includes the previous summary — context flows seamlessly
527
589
 
@@ -569,8 +631,8 @@ flowchart TB
569
631
 
570
632
  subgraph MCP["Memory Journal MCP Server"]
571
633
  Tools["🛠️ 61 Tools"]
572
- Resources["📡 28 Resources"]
573
- Prompts["💬 16 Prompts"]
634
+ Resources["📡 33 Resources"]
635
+ Prompts["💬 17 Prompts"]
574
636
  end
575
637
 
576
638
  subgraph Storage["Persistence Layer"]
@@ -597,7 +659,7 @@ flowchart TB
597
659
  ┌─────────────────────────────────────────────────────────────┐
598
660
  │ MCP Server Layer (TypeScript) │
599
661
  │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐ │
600
- │ │ Tools (61) │ │ Resources (28) │ │ Prompts (16)│ │
662
+ │ │ Tools (61) │ │ Resources (38) │ │ Prompts (17)│ │
601
663
  │ │ with Annotations│ │ with Annotations│ │ │ │
602
664
  │ └─────────────────┘ └─────────────────┘ └─────────────┘ │
603
665
  ├─────────────────────────────────────────────────────────────┤
@@ -629,9 +691,9 @@ flowchart TB
629
691
 
630
692
  Memory Journal is designed for extremely low overhead during AI task execution. We include a `vitest bench` suite to maintain these baseline guarantees:
631
693
 
632
- - **Database Reads**: Operations execute in fractions of a millisecond. `calculateImportance` is ~13x faster than retrieving 50 recent entries.
633
- - **Vector Search Engine**: Both search (~220 ops/sec) and indexing (~1600+ ops/sec) are high-throughput via `sqlite-vec` with SQL-native KNN queries.
634
- - **Core MCP Routines**: `getTools` uses cached O(1) dispatch (~4800x faster than `get_recent_entries`). `create_entry` and `search_entries` execute through the full MCP layer with sub-millisecond overhead.
694
+ - **Database Reads**: Operations execute in fractions of a millisecond. `calculateImportance` is ~13-14x faster than retrieving 50 recent entries.
695
+ - **Vector Search Engine**: Both search (~140-220 ops/sec) and indexing (~1600-1900+ ops/sec) are high-throughput via `sqlite-vec` with SQL-native KNN queries.
696
+ - **Core MCP Routines**: `getTools` uses cached O(1) dispatch (~4800-7000x faster than `get_recent_entries`). `create_entry` and `search_entries` execute through the full MCP layer with sub-millisecond overhead.
635
697
 
636
698
  To run the benchmarking suite locally:
637
699