gitmem-mcp 1.0.1 → 1.0.3
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 +21 -0
- package/README.md +90 -184
- package/dist/index.js +0 -0
- package/dist/schemas/create-learning.d.ts +4 -4
- package/dist/services/agent-briefing.d.ts +12 -0
- package/dist/services/agent-briefing.d.ts.map +1 -0
- package/dist/services/agent-briefing.js +81 -0
- package/dist/services/agent-briefing.js.map +1 -0
- package/dist/services/agent-detection.d.ts +1 -1
- package/dist/services/agent-detection.js +3 -3
- package/dist/services/agent-detection.js.map +1 -1
- package/dist/services/local-file-storage.d.ts.map +1 -1
- package/dist/services/local-file-storage.js +13 -8
- package/dist/services/local-file-storage.js.map +1 -1
- package/dist/services/tier.d.ts +2 -0
- package/dist/services/tier.d.ts.map +1 -1
- package/dist/services/tier.js +4 -0
- package/dist/services/tier.js.map +1 -1
- package/dist/services/triple-writer.d.ts +4 -4
- package/dist/services/triple-writer.d.ts.map +1 -1
- package/dist/services/triple-writer.js +11 -20
- package/dist/services/triple-writer.js.map +1 -1
- package/dist/tools/confirm-scars.d.ts.map +1 -1
- package/dist/tools/confirm-scars.js +4 -0
- package/dist/tools/confirm-scars.js.map +1 -1
- package/dist/tools/definitions.d.ts +280 -58
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +80 -42
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/graph-traverse.d.ts +1 -1
- package/dist/tools/graph-traverse.d.ts.map +1 -1
- package/dist/tools/graph-traverse.js +3 -2
- package/dist/tools/graph-traverse.js.map +1 -1
- package/dist/tools/prepare-context.js +1 -1
- package/dist/tools/recall.d.ts +1 -0
- package/dist/tools/recall.d.ts.map +1 -1
- package/dist/tools/recall.js +15 -6
- package/dist/tools/recall.js.map +1 -1
- package/dist/tools/session-close.d.ts.map +1 -1
- package/dist/tools/session-close.js +35 -34
- package/dist/tools/session-close.js.map +1 -1
- package/dist/tools/session-start.d.ts.map +1 -1
- package/dist/tools/session-start.js +2 -0
- package/dist/tools/session-start.js.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/schema/starter-scars.json +3 -153
- package/dist/tools/create-linear-issue.d.ts +0 -18
- package/dist/tools/create-linear-issue.d.ts.map +0 -1
- package/dist/tools/create-linear-issue.js +0 -197
- package/dist/tools/create-linear-issue.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.3] - 2026-02-15
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **Tool alias consolidation (OD-691)**: Reduced advertised tools from 55 to 20 (free tier). Aliases still work when called directly. Set `GITMEM_FULL_ALIASES=1` to restore all.
|
|
14
|
+
- **Starter scars reduced (OD-684)**: Ship with 3 high-quality starter scars instead of 12. Starter scars deprioritized with 0.7x score multiplier so earned scars outrank them.
|
|
15
|
+
- **Recall similarity threshold (OD-686)**: Weak matches below threshold (0.4 BM25, 0.35 embeddings) are suppressed. Empty results show helpful guidance instead of noise.
|
|
16
|
+
- **Adaptive session closing (OD-685)**: Auto-detects ceremony level (micro/standard/full) based on session activity. Removed hard rejection gate that blocked standard closes on short sessions.
|
|
17
|
+
- **Scar relevance feedback (OD-690)**: Optional `relevance` field (high/low/noise) on `confirm_scars` for recall quality improvement. Defaults derived from decision type.
|
|
18
|
+
- **Pro tier messaging (OD-688)**: Rewritten from agent's perspective with concrete value propositions.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- **Agent briefing (OD-689)**: Generates `.gitmem/agent-briefing.md` at session close with memory state summary for MEMORY.md bridge.
|
|
22
|
+
- **PMEM/GitMem boundary docs (OD-687)**: README section documenting how GitMem complements MEMORY.md/cursorrules.
|
|
23
|
+
|
|
24
|
+
## [1.0.2] - 2026-02-15
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- **Free tier crash**: `markSessionSuperseded` called Supabase without `hasSupabase()` guard
|
|
28
|
+
- **Session close UX**: Write health block only shown when failures exist (was always visible)
|
|
29
|
+
- **E2E test suite**: Updated for display protocol changes (session_id extraction, display format assertions, recall display text, CLAUDE.md template wording)
|
|
30
|
+
|
|
10
31
|
## [1.0.0] - 2026-02-10
|
|
11
32
|
|
|
12
33
|
### Added
|
package/README.md
CHANGED
|
@@ -1,103 +1,93 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/banner.svg" alt="GitMem — Institutional memory for AI coding agents" width="700" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/gitmem-mcp"><img src="https://img.shields.io/npm/v/gitmem-mcp?style=flat-square&color=ed1e25&label=npm" alt="npm version" /></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/gitmem-mcp"><img src="https://img.shields.io/npm/dm/gitmem-mcp?style=flat-square&color=333333&label=downloads" alt="npm downloads" /></a>
|
|
8
|
+
<img src="https://img.shields.io/badge/license-MIT-ed1e25?style=flat-square" alt="MIT License" />
|
|
9
|
+
<img src="https://img.shields.io/badge/build-passing-333333?style=flat-square" alt="Build" />
|
|
10
|
+
<img src="https://img.shields.io/badge/node-%3E%3D22-ed1e25?style=flat-square" alt="Node.js >= 22" />
|
|
11
|
+
</p>
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://gitmem.ai/docs"><strong>Documentation</strong></a> ·
|
|
15
|
+
<a href="https://www.npmjs.com/package/gitmem-mcp"><strong>npm</strong></a> ·
|
|
16
|
+
<a href="https://gitmem.ai/docs/getting-started"><strong>Getting Started</strong></a> ·
|
|
17
|
+
<a href="https://gitmem.ai/docs/tools"><strong>Tool Reference</strong></a>
|
|
18
|
+
</p>
|
|
6
19
|
|
|
7
|
-
|
|
20
|
+
---
|
|
8
21
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
1. **Before each task**, the agent calls `recall` with a plan — GitMem surfaces relevant warnings from past sessions
|
|
12
|
-
2. **When mistakes happen**, the agent captures them as "scars" — failures with context and counter-arguments
|
|
13
|
-
3. **When things go well**, the agent captures wins and patterns to replicate
|
|
14
|
-
4. **At session close**, the agent reflects on what worked, what broke, and what to do differently
|
|
15
|
-
|
|
16
|
-
Over time, your agent builds institutional memory that prevents repeated mistakes and reinforces good patterns.
|
|
17
|
-
|
|
18
|
-
### Two Tiers
|
|
22
|
+
GitMem is an [MCP server](https://modelcontextprotocol.io/) that gives your AI coding agent **persistent memory across sessions**. It remembers mistakes (scars), successes (wins), and decisions — so your agent learns from experience instead of starting from scratch every time.
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|---|-----------|----------|
|
|
22
|
-
| **Storage** | Local `.gitmem/` directory | Supabase (PostgreSQL + pgvector) |
|
|
23
|
-
| **Search** | Keyword matching | Semantic vector search |
|
|
24
|
-
| **Setup** | Zero config | Supabase project + embedding API key |
|
|
25
|
-
| **Best for** | Solo projects | Teams, cross-project memory |
|
|
24
|
+
Works with **Claude Code**, **Claude Desktop**, **Cursor**, and any MCP-compatible client.
|
|
26
25
|
|
|
27
26
|
## Quick Start
|
|
28
27
|
|
|
29
|
-
### One command setup
|
|
30
|
-
|
|
31
28
|
```bash
|
|
32
29
|
npx gitmem init
|
|
33
30
|
```
|
|
34
31
|
|
|
35
|
-
The
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
6. Updates `.gitignore`
|
|
32
|
+
One command. The wizard sets up everything:
|
|
33
|
+
- `.gitmem/` directory with 3 starter scars
|
|
34
|
+
- `.mcp.json` with gitmem server entry
|
|
35
|
+
- `CLAUDE.md` with memory protocol instructions
|
|
36
|
+
- `.claude/settings.json` with tool permissions
|
|
37
|
+
- Lifecycle hooks for automatic session management
|
|
38
|
+
- `.gitignore` updated
|
|
43
39
|
|
|
44
|
-
Already have
|
|
40
|
+
Already have existing config? The wizard merges without destroying anything. Re-running is safe.
|
|
45
41
|
|
|
46
42
|
```bash
|
|
47
|
-
# Non-interactive
|
|
48
|
-
npx gitmem init --
|
|
49
|
-
|
|
50
|
-
# Preview what would change
|
|
51
|
-
npx gitmem init --dry-run
|
|
52
|
-
|
|
53
|
-
# Set project name
|
|
54
|
-
npx gitmem init --project my-app
|
|
43
|
+
npx gitmem init --yes # Non-interactive
|
|
44
|
+
npx gitmem init --dry-run # Preview changes
|
|
55
45
|
```
|
|
56
46
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### Pro Tier (with Supabase)
|
|
60
|
-
|
|
61
|
-
For semantic search and cloud persistence:
|
|
62
|
-
|
|
63
|
-
1. Create a free Supabase project at [database.new](https://database.new)
|
|
64
|
-
2. `npx gitmem setup` — copy the SQL output into Supabase SQL Editor
|
|
65
|
-
3. Set `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY` as environment variables
|
|
66
|
-
4. `npx gitmem init` — auto-detects pro tier from env vars
|
|
67
|
-
|
|
68
|
-
### Uninstall
|
|
47
|
+
## How It Works
|
|
69
48
|
|
|
70
|
-
```
|
|
71
|
-
|
|
49
|
+
```
|
|
50
|
+
recall --> work --> learn --> close --> recall --> ...
|
|
72
51
|
```
|
|
73
52
|
|
|
74
|
-
|
|
53
|
+
1. **Recall** — Before acting, the agent checks memory for relevant lessons from past sessions
|
|
54
|
+
2. **Work** — The agent does the task, applying past lessons automatically
|
|
55
|
+
3. **Learn** — Mistakes become **scars**, successes become **wins**, strategies become **patterns**
|
|
56
|
+
4. **Close** — Session reflection persists context for next time
|
|
75
57
|
|
|
76
|
-
|
|
77
|
-
# Also delete .gitmem/ data
|
|
78
|
-
npx gitmem uninstall --all
|
|
79
|
-
```
|
|
58
|
+
Every scar includes **counter-arguments** — reasons why someone might reasonably ignore it. This prevents memory from becoming a pile of rigid rules.
|
|
80
59
|
|
|
81
|
-
##
|
|
60
|
+
## What Gets Remembered
|
|
82
61
|
|
|
83
|
-
|
|
62
|
+
| Type | Purpose | Example |
|
|
63
|
+
|------|---------|---------|
|
|
64
|
+
| **Scars** | Mistakes to avoid | "Always validate UUID format before DB lookup" |
|
|
65
|
+
| **Wins** | Approaches that worked | "Parallel agent spawning cut review time by 60%" |
|
|
66
|
+
| **Patterns** | Reusable strategies | "5-tier test pyramid for MCP servers" |
|
|
67
|
+
| **Decisions** | Architectural choices with rationale | "Chose JWT over session cookies for stateless auth" |
|
|
68
|
+
| **Threads** | Unfinished work that carries across sessions | "Rate limiting still needs implementation" |
|
|
84
69
|
|
|
85
|
-
|
|
86
|
-
npx gitmem init
|
|
87
|
-
```
|
|
70
|
+
## Key Features
|
|
88
71
|
|
|
89
|
-
|
|
72
|
+
- **Automatic Recall** — Scars surface before the agent takes similar actions
|
|
73
|
+
- **Session Continuity** — Context, threads, and rapport carry across sessions
|
|
74
|
+
- **Closing Ceremony** — Structured reflection captures what broke, what worked, and what to do differently
|
|
75
|
+
- **20+ MCP Tools** — Full toolkit for memory management, search, threads, and multi-agent coordination
|
|
76
|
+
- **Zero Config** — `npx gitmem init` and you're running
|
|
77
|
+
- **Non-Destructive** — Merges with your existing `.mcp.json`, `CLAUDE.md`, and hooks
|
|
90
78
|
|
|
91
|
-
|
|
92
|
-
npm install -g gitmem-mcp
|
|
93
|
-
gitmem init
|
|
94
|
-
```
|
|
79
|
+
## Supported Clients
|
|
95
80
|
|
|
96
|
-
|
|
81
|
+
| Client | Setup |
|
|
82
|
+
|--------|-------|
|
|
83
|
+
| **Claude Code** | `npx gitmem init` (auto-detected) |
|
|
84
|
+
| **Claude Desktop** | `npx gitmem init` or add to `claude_desktop_config.json` |
|
|
85
|
+
| **Cursor** | `npx gitmem init` or add to `.cursor/mcp.json` |
|
|
86
|
+
| **Any MCP client** | Add `npx -y gitmem-mcp` as an MCP server |
|
|
97
87
|
|
|
98
|
-
|
|
88
|
+
<details>
|
|
89
|
+
<summary><strong>Manual MCP configuration</strong></summary>
|
|
99
90
|
|
|
100
|
-
**Free Tier:**
|
|
101
91
|
```json
|
|
102
92
|
{
|
|
103
93
|
"mcpServers": {
|
|
@@ -109,128 +99,45 @@ If you prefer to configure manually instead of using `npx gitmem init`:
|
|
|
109
99
|
}
|
|
110
100
|
```
|
|
111
101
|
|
|
112
|
-
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"mcpServers": {
|
|
116
|
-
"gitmem": {
|
|
117
|
-
"command": "npx",
|
|
118
|
-
"args": ["-y", "gitmem-mcp"],
|
|
119
|
-
"env": {
|
|
120
|
-
"SUPABASE_URL": "https://your-project.supabase.co",
|
|
121
|
-
"SUPABASE_SERVICE_ROLE_KEY": "eyJ...",
|
|
122
|
-
"OPENAI_API_KEY": "sk-..."
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Alternative embedding providers (set instead of `OPENAI_API_KEY`):
|
|
130
|
-
- `OPENROUTER_API_KEY` — OpenRouter (multiple models)
|
|
131
|
-
- `OLLAMA_URL` — Local Ollama instance (no API key needed)
|
|
132
|
-
|
|
133
|
-
### Verify
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
# Claude Code
|
|
137
|
-
claude mcp list
|
|
138
|
-
# Should show: gitmem: connected
|
|
139
|
-
```
|
|
102
|
+
</details>
|
|
140
103
|
|
|
141
104
|
## CLI Commands
|
|
142
105
|
|
|
143
106
|
| Command | Description |
|
|
144
107
|
|---------|-------------|
|
|
145
|
-
| `gitmem init` | Interactive setup wizard
|
|
146
|
-
| `gitmem init --yes` | Non-interactive setup
|
|
147
|
-
| `gitmem init --dry-run` | Preview
|
|
148
|
-
| `gitmem uninstall` | Clean removal
|
|
149
|
-
| `gitmem uninstall --all` |
|
|
150
|
-
| `gitmem
|
|
151
|
-
| `gitmem configure` | Generate MCP config for your editor |
|
|
152
|
-
| `gitmem check` | Run diagnostic health check |
|
|
153
|
-
| `gitmem check --full` | Full diagnostic with benchmarks |
|
|
154
|
-
| `gitmem install-hooks` | Install Claude Code hooks (standalone) |
|
|
155
|
-
| `gitmem uninstall-hooks` | Remove Claude Code hooks (standalone) |
|
|
156
|
-
| `gitmem server` | Start MCP server (default when no command given) |
|
|
157
|
-
| `gitmem help` | Show help |
|
|
158
|
-
|
|
159
|
-
## MCP Tools
|
|
160
|
-
|
|
161
|
-
GitMem exposes tools via the Model Context Protocol. Your AI agent calls these automatically based on the instructions in `CLAUDE.md`.
|
|
162
|
-
|
|
163
|
-
### Core Tools
|
|
108
|
+
| `npx gitmem init` | Interactive setup wizard |
|
|
109
|
+
| `npx gitmem init --yes` | Non-interactive setup |
|
|
110
|
+
| `npx gitmem init --dry-run` | Preview changes |
|
|
111
|
+
| `npx gitmem uninstall` | Clean removal (preserves `.gitmem/` data) |
|
|
112
|
+
| `npx gitmem uninstall --all` | Full removal including data |
|
|
113
|
+
| `npx gitmem check` | Diagnostic health check |
|
|
164
114
|
|
|
165
|
-
|
|
166
|
-
|------|---------|
|
|
167
|
-
| `recall` | Check memory for relevant warnings before taking action |
|
|
168
|
-
| `session_start` | Initialize session, load context from last session |
|
|
169
|
-
| `session_close` | Persist session with reflection |
|
|
170
|
-
| `create_learning` | Capture scars (failures), wins (successes), or patterns |
|
|
171
|
-
| `create_decision` | Log architectural/operational decisions |
|
|
172
|
-
| `record_scar_usage` | Track which scars were applied |
|
|
173
|
-
| `search` | Search institutional memory (exploration, no side effects) |
|
|
174
|
-
| `log` | List recent learnings chronologically |
|
|
115
|
+
## Pro Tier — Coming Soon
|
|
175
116
|
|
|
176
|
-
|
|
117
|
+
| What you get | Why your agent cares |
|
|
118
|
+
|-------------|---------------------|
|
|
119
|
+
| **Semantic search** | Recall returns the *right* scars, not keyword noise |
|
|
120
|
+
| **Session analytics** | Spot patterns in what keeps going wrong |
|
|
121
|
+
| **Sub-agent briefing** | Hand institutional context to sub-agents automatically |
|
|
122
|
+
| **Cloud persistence** | Memory survives machine changes, shareable across team |
|
|
123
|
+
| **A/B testing** | Optimize scar phrasing based on what actually changes behavior |
|
|
177
124
|
|
|
178
|
-
|
|
125
|
+
The free tier gives you everything for solo projects. Pro makes recall smarter and memory portable.
|
|
179
126
|
|
|
180
|
-
|
|
181
|
-
|------|---------|
|
|
182
|
-
| `list_threads` | List open threads |
|
|
183
|
-
| `create_thread` | Create a new thread |
|
|
184
|
-
| `resolve_thread` | Mark a thread as resolved |
|
|
185
|
-
|
|
186
|
-
### Pro Tier Tools
|
|
187
|
-
|
|
188
|
-
Available when Supabase is configured:
|
|
189
|
-
|
|
190
|
-
| Tool | Purpose |
|
|
191
|
-
|------|---------|
|
|
192
|
-
| `analyze` | Session analytics and pattern detection |
|
|
193
|
-
| `prepare_context` | Multi-agent context preparation |
|
|
194
|
-
| `absorb_observations` | Multi-agent observation absorption |
|
|
195
|
-
| Cache tools | `cache_status`, `cache_flush`, `cache_health` |
|
|
196
|
-
|
|
197
|
-
## Learning Types
|
|
198
|
-
|
|
199
|
-
GitMem tracks four types of institutional knowledge:
|
|
200
|
-
|
|
201
|
-
- **Scars** — Failures to avoid. Include severity and counter-arguments (why someone might think the mistake is OK). These are the core of GitMem.
|
|
202
|
-
- **Wins** — Successes to replicate. Capture what worked and why.
|
|
203
|
-
- **Patterns** — Neutral observations and recurring approaches.
|
|
204
|
-
- **Anti-patterns** — Known bad approaches to flag.
|
|
205
|
-
|
|
206
|
-
All types are searched together when `recall` is called, giving the agent comprehensive context.
|
|
207
|
-
|
|
208
|
-
## Lifecycle Hooks
|
|
209
|
-
|
|
210
|
-
GitMem includes Claude Code hooks that automate memory protocols. These are installed automatically by `npx gitmem init`.
|
|
211
|
-
|
|
212
|
-
- **SessionStart** — Automatically calls `session_start` when a session begins
|
|
213
|
-
- **PreToolUse** — Reminds the agent to call `recall` before consequential actions
|
|
214
|
-
- **PostToolUse** — Tracks scar acknowledgment
|
|
215
|
-
- **Stop** — Reminds the agent to close sessions properly
|
|
216
|
-
|
|
217
|
-
To install hooks standalone (without the full wizard):
|
|
218
|
-
```bash
|
|
219
|
-
npx gitmem install-hooks
|
|
220
|
-
```
|
|
127
|
+
[Join the mailing list](https://gitmem.ai) to get notified.
|
|
221
128
|
|
|
222
|
-
##
|
|
129
|
+
## GitMem + MEMORY.md
|
|
223
130
|
|
|
224
|
-
|
|
131
|
+
Your AI agent likely has its own memory file (MEMORY.md, .cursorrules, etc.). Here's how they work together:
|
|
225
132
|
|
|
226
|
-
|
|
|
227
|
-
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
133
|
+
| | MEMORY.md | GitMem |
|
|
134
|
+
|---|-----------|--------|
|
|
135
|
+
| **Loaded** | Every turn (system prompt) | On-demand (tool calls) |
|
|
136
|
+
| **Best for** | Preferences, shortcuts, quick reference | Earned lessons, unfinished work, decisions |
|
|
137
|
+
| **Updates** | Agent writes directly | Session lifecycle (close ceremony) |
|
|
138
|
+
| **Example** | "User prefers terse output" | "Always validate UUID before DB lookup" |
|
|
232
139
|
|
|
233
|
-
|
|
140
|
+
**Tip:** Include `.gitmem/agent-briefing.md` in your MEMORY.md for a lightweight bridge between the two systems.
|
|
234
141
|
|
|
235
142
|
## Development
|
|
236
143
|
|
|
@@ -238,12 +145,11 @@ Override with `agent_identity` parameter in `session_start`.
|
|
|
238
145
|
git clone https://github.com/nTEG-dev/gitmem.git
|
|
239
146
|
cd gitmem
|
|
240
147
|
npm install
|
|
241
|
-
npm run build
|
|
242
|
-
npm
|
|
243
|
-
npm test # Run unit tests
|
|
148
|
+
npm run build
|
|
149
|
+
npm test
|
|
244
150
|
```
|
|
245
151
|
|
|
246
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup
|
|
152
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for full development setup.
|
|
247
153
|
|
|
248
154
|
## License
|
|
249
155
|
|
package/dist/index.js
CHANGED
|
File without changes
|
|
@@ -37,8 +37,8 @@ export declare const CreateLearningParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
37
37
|
why_this_matters?: string | undefined;
|
|
38
38
|
action_protocol?: string[] | undefined;
|
|
39
39
|
self_check_criteria?: string[] | undefined;
|
|
40
|
-
source_linear_issue?: string | undefined;
|
|
41
40
|
domain?: string[] | undefined;
|
|
41
|
+
source_linear_issue?: string | undefined;
|
|
42
42
|
scar_type?: string | undefined;
|
|
43
43
|
problem_context?: string | undefined;
|
|
44
44
|
solution_approach?: string | undefined;
|
|
@@ -54,8 +54,8 @@ export declare const CreateLearningParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
54
54
|
why_this_matters?: string | undefined;
|
|
55
55
|
action_protocol?: string[] | undefined;
|
|
56
56
|
self_check_criteria?: string[] | undefined;
|
|
57
|
-
source_linear_issue?: string | undefined;
|
|
58
57
|
domain?: string[] | undefined;
|
|
58
|
+
source_linear_issue?: string | undefined;
|
|
59
59
|
scar_type?: string | undefined;
|
|
60
60
|
problem_context?: string | undefined;
|
|
61
61
|
solution_approach?: string | undefined;
|
|
@@ -71,8 +71,8 @@ export declare const CreateLearningParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
71
71
|
why_this_matters?: string | undefined;
|
|
72
72
|
action_protocol?: string[] | undefined;
|
|
73
73
|
self_check_criteria?: string[] | undefined;
|
|
74
|
-
source_linear_issue?: string | undefined;
|
|
75
74
|
domain?: string[] | undefined;
|
|
75
|
+
source_linear_issue?: string | undefined;
|
|
76
76
|
scar_type?: string | undefined;
|
|
77
77
|
problem_context?: string | undefined;
|
|
78
78
|
solution_approach?: string | undefined;
|
|
@@ -88,8 +88,8 @@ export declare const CreateLearningParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
88
88
|
why_this_matters?: string | undefined;
|
|
89
89
|
action_protocol?: string[] | undefined;
|
|
90
90
|
self_check_criteria?: string[] | undefined;
|
|
91
|
-
source_linear_issue?: string | undefined;
|
|
92
91
|
domain?: string[] | undefined;
|
|
92
|
+
source_linear_issue?: string | undefined;
|
|
93
93
|
scar_type?: string | undefined;
|
|
94
94
|
problem_context?: string | undefined;
|
|
95
95
|
solution_approach?: string | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Briefing Generator (OD-689)
|
|
3
|
+
*
|
|
4
|
+
* Generates `.gitmem/agent-briefing.md` at session close with a
|
|
5
|
+
* compact summary of memory state. Designed for inclusion in
|
|
6
|
+
* MEMORY.md to bridge PMEM <-> GitMem.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Generate and write agent-briefing.md to .gitmem/
|
|
10
|
+
*/
|
|
11
|
+
export declare function writeAgentBriefing(newLearnings: number, newDecisions: number): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=agent-briefing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-briefing.d.ts","sourceRoot":"","sources":["../../src/services/agent-briefing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAqEf"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Briefing Generator (OD-689)
|
|
3
|
+
*
|
|
4
|
+
* Generates `.gitmem/agent-briefing.md` at session close with a
|
|
5
|
+
* compact summary of memory state. Designed for inclusion in
|
|
6
|
+
* MEMORY.md to bridge PMEM <-> GitMem.
|
|
7
|
+
*/
|
|
8
|
+
import * as fs from "fs";
|
|
9
|
+
import * as path from "path";
|
|
10
|
+
import { getGitmemDir } from "./gitmem-dir.js";
|
|
11
|
+
import { getStorage } from "./storage.js";
|
|
12
|
+
/**
|
|
13
|
+
* Generate and write agent-briefing.md to .gitmem/
|
|
14
|
+
*/
|
|
15
|
+
export async function writeAgentBriefing(newLearnings, newDecisions) {
|
|
16
|
+
try {
|
|
17
|
+
const gitmemDir = getGitmemDir();
|
|
18
|
+
if (!gitmemDir || !fs.existsSync(gitmemDir))
|
|
19
|
+
return;
|
|
20
|
+
const storage = getStorage();
|
|
21
|
+
const sessions = await storage.query("sessions");
|
|
22
|
+
const learnings = await storage.query("learnings");
|
|
23
|
+
const threads = await storage.query("threads");
|
|
24
|
+
// Count by severity
|
|
25
|
+
const severityCounts = {};
|
|
26
|
+
const domainCounts = {};
|
|
27
|
+
for (const l of learnings) {
|
|
28
|
+
const sev = l.severity || "medium";
|
|
29
|
+
severityCounts[sev] = (severityCounts[sev] || 0) + 1;
|
|
30
|
+
const domains = l.domain || [];
|
|
31
|
+
for (const d of domains) {
|
|
32
|
+
domainCounts[d] = (domainCounts[d] || 0) + 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Active threads
|
|
36
|
+
const activeThreads = threads.filter((t) => t.status === "open").length;
|
|
37
|
+
// Top domains (top 5)
|
|
38
|
+
const topDomains = Object.entries(domainCounts)
|
|
39
|
+
.sort((a, b) => b[1] - a[1])
|
|
40
|
+
.slice(0, 5)
|
|
41
|
+
.map(([d]) => d);
|
|
42
|
+
// Severity breakdown
|
|
43
|
+
const sevParts = [];
|
|
44
|
+
if (severityCounts.critical)
|
|
45
|
+
sevParts.push(`${severityCounts.critical} critical`);
|
|
46
|
+
if (severityCounts.high)
|
|
47
|
+
sevParts.push(`${severityCounts.high} high`);
|
|
48
|
+
if (severityCounts.medium)
|
|
49
|
+
sevParts.push(`${severityCounts.medium} medium`);
|
|
50
|
+
if (severityCounts.low)
|
|
51
|
+
sevParts.push(`${severityCounts.low} low`);
|
|
52
|
+
// Recent activity
|
|
53
|
+
const recentParts = [];
|
|
54
|
+
if (newLearnings > 0)
|
|
55
|
+
recentParts.push(`+${newLearnings} scars`);
|
|
56
|
+
if (newDecisions > 0)
|
|
57
|
+
recentParts.push(`+${newDecisions} decisions`);
|
|
58
|
+
const today = new Date().toISOString().split("T")[0];
|
|
59
|
+
const lines = [
|
|
60
|
+
"<!-- Generated by GitMem at session close. Include in MEMORY.md for cross-session context. -->",
|
|
61
|
+
"## GitMem Status",
|
|
62
|
+
`- **Sessions:** ${sessions.length} total, last: ${today}`,
|
|
63
|
+
`- **Active threads:** ${activeThreads}`,
|
|
64
|
+
`- **Scars earned:** ${learnings.length}${sevParts.length > 0 ? ` (${sevParts.join(", ")})` : ""}`,
|
|
65
|
+
];
|
|
66
|
+
if (recentParts.length > 0) {
|
|
67
|
+
lines.push(`- **Recent:** ${recentParts.join(", ")} this session`);
|
|
68
|
+
}
|
|
69
|
+
if (topDomains.length > 0) {
|
|
70
|
+
lines.push(`- **Top domains:** ${topDomains.join(", ")}`);
|
|
71
|
+
}
|
|
72
|
+
const briefingPath = path.join(gitmemDir, "agent-briefing.md");
|
|
73
|
+
fs.writeFileSync(briefingPath, lines.join("\n") + "\n");
|
|
74
|
+
console.error(`[agent-briefing] Written to ${briefingPath}`);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
// Non-fatal — don't break session close
|
|
78
|
+
console.warn("[agent-briefing] Failed to write:", error);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=agent-briefing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-briefing.js","sourceRoot":"","sources":["../../src/services/agent-briefing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,YAAoB,EACpB,YAAoB;IAEpB,IAAI,C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IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;SACnG,CAAC;QAEF,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,iBAAiB,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,sBAAsB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5D,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC/D,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QACxD,OAAO,CAAC,KAAK,CAAC,+BAA+B,YAAY,EAAE,CAAC,CAAC;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,wCAAwC;QACxC,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* | ENTRYPOINT | Docker | Hostname | Identity |
|
|
9
9
|
* |------------|--------|----------|----------|
|
|
10
10
|
* | cli | YES | (any) | CLI |
|
|
11
|
-
* | cli | NO |
|
|
11
|
+
* | cli | NO | (server hostname) | CODA-1 |
|
|
12
12
|
* | claude-desktop | NO | (any) | DAC |
|
|
13
13
|
* | (empty) | NO | (local) | Brain_Local |
|
|
14
14
|
* | (empty) | NO | (no fs) | Brain_Cloud |
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* | ENTRYPOINT | Docker | Hostname | Identity |
|
|
9
9
|
* |------------|--------|----------|----------|
|
|
10
10
|
* | cli | YES | (any) | CLI |
|
|
11
|
-
* | cli | NO |
|
|
11
|
+
* | cli | NO | (server hostname) | CODA-1 |
|
|
12
12
|
* | claude-desktop | NO | (any) | DAC |
|
|
13
13
|
* | (empty) | NO | (local) | Brain_Local |
|
|
14
14
|
* | (empty) | NO | (no fs) | Brain_Cloud |
|
|
@@ -51,8 +51,8 @@ export function detectAgent() {
|
|
|
51
51
|
// CLI in Docker container
|
|
52
52
|
agent = "CLI";
|
|
53
53
|
}
|
|
54
|
-
else if (
|
|
55
|
-
// CLI on
|
|
54
|
+
else if (process.env.GITMEM_AGENT_HOSTNAME && (hostname === process.env.GITMEM_AGENT_HOSTNAME)) {
|
|
55
|
+
// CLI on configured server = CODA-1
|
|
56
56
|
agent = "CODA-1";
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-detection.js","sourceRoot":"","sources":["../../src/services/agent-detection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAG9B;;GAEG;AACH,SAAS,QAAQ;IACf,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB;IAC1B,IAAI,CAAC;QACH,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,IAAI,CAAC;IAC9D,MAAM,MAA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E,OAAO,CAAC,EAC1C,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KACX,GACL,OAAO,CAAC,CAAC,EAAE,CAAC;IA8Bf;;OAEG;IACG,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzC,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAKpB;;OAEG;IACG,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5C,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GACvB,OAAO,CAAC,CAAC,CAAC;IAcb;;OAEG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ9D;;;;;OAKG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,SAAI,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAuClE;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;OAEG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAyB3D;AAKD,wBAAgB,mBAAmB,IAAI,gBAAgB,CAKtD;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
|
|
@@ -137,21 +137,26 @@ export class LocalFileStorage {
|
|
|
137
137
|
const results = bm25Search(query, docs, k);
|
|
138
138
|
// Map back to RelevantScar
|
|
139
139
|
const byId = new Map(learnings.map((l) => [String(l.id), l]));
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
const mapped = [];
|
|
141
|
+
for (const r of results) {
|
|
142
142
|
const l = byId.get(r.id);
|
|
143
143
|
if (!l)
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
continue;
|
|
145
|
+
// OD-684: Deprioritize starter scars (0.7x multiplier)
|
|
146
|
+
const isStarter = !!l.is_starter;
|
|
147
|
+
const adjustedSimilarity = isStarter ? r.similarity * 0.7 : r.similarity;
|
|
148
|
+
mapped.push({
|
|
146
149
|
id: r.id,
|
|
147
150
|
title: String(l.title),
|
|
148
151
|
description: String(l.description),
|
|
149
152
|
severity: String(l.severity || "medium"),
|
|
150
153
|
counter_arguments: l.counter_arguments || [],
|
|
151
|
-
similarity:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
similarity: adjustedSimilarity,
|
|
155
|
+
is_starter: isStarter || undefined,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
// Re-sort after starter penalty (earned scars float up)
|
|
159
|
+
return mapped.sort((a, b) => b.similarity - a.similarity);
|
|
155
160
|
}
|
|
156
161
|
/**
|
|
157
162
|
* Get the count of learnings stored locally
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-file-storage.js","sourceRoot":"","sources":["../../src/services/local-file-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAqB,MAAM,WAAW,CAAC;AAG1D,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO;AAC/C,MAAM,cAAc,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM;AAE9C,MAAM,OAAO,gBAAgB;IACnB,QAAQ,CAAS;IAEzB,YAAY,QAAiB;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,E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CAAC,CAAC;YACtE,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;CACF;AAED,qBAAqB;AACrB,IAAI,SAAS,GAA4B,IAAI,CAAC;AAE9C,MAAM,UAAU,mBAAmB;IACjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAC;IACrC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,SAAS,GAAG,IAAI,CAAC;AACnB,CAAC"}
|
package/dist/services/tier.d.ts
CHANGED
|
@@ -49,4 +49,6 @@ export declare function getTablePrefix(): string;
|
|
|
49
49
|
* Get the fully-qualified table name for a base table name
|
|
50
50
|
*/
|
|
51
51
|
export declare function getTableName(baseName: string): string;
|
|
52
|
+
/** Whether all tool aliases (gitmem-*, gm-*) should be advertised (default: false) */
|
|
53
|
+
export declare function hasFullAliases(): boolean;
|
|
52
54
|
//# sourceMappingURL=tier.d.ts.map
|