@m2015agg/git-skill 0.1.2 → 0.1.4
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 +120 -0
- package/dist/commands/embed.js +10 -17
- package/dist/commands/embed.js.map +1 -1
- package/dist/commands/enrich.js +116 -38
- package/dist/commands/enrich.js.map +1 -1
- package/dist/util/config.js +1 -1
- package/dist/util/config.js.map +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# @m2015agg/git-skill
|
|
2
|
+
|
|
3
|
+
Git history intelligence for LLMs. Gives AI agents institutional memory over a codebase's evolution, decisions, and health trends.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @m2015agg/git-skill
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
If `git-skill` is not found after install, run `hash -r` to refresh your shell's command cache.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cd your-project
|
|
17
|
+
git-skill init # Install hook, index history, set up CLAUDE.md
|
|
18
|
+
git-skill doctor # Verify setup
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Embeddings (Optional)
|
|
22
|
+
|
|
23
|
+
For semantic search, configure an embedding provider. Works with any OpenAI-compatible endpoint (OpenAI, Ollama, LMStudio).
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git-skill install # Configure embedding provider
|
|
27
|
+
git-skill embed # Generate embeddings for all commits
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or manually edit `~/.config/git-skill/config.json`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"embedding": {
|
|
35
|
+
"enabled": true,
|
|
36
|
+
"provider": "ollama",
|
|
37
|
+
"model": "mxbai-embed-large",
|
|
38
|
+
"url": "http://localhost:11434/api/embed",
|
|
39
|
+
"apiKey": "",
|
|
40
|
+
"dimensions": 1024
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Commands
|
|
46
|
+
|
|
47
|
+
### Query (read-only, pre-approved for Claude Code)
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
|---------|-------------|
|
|
51
|
+
| `git-skill search <query>` | Search commit history (BM25 + vector) |
|
|
52
|
+
| `git-skill timeline <path>` | File/directory evolution |
|
|
53
|
+
| `git-skill blame <path>` | Enhanced blame with enrichments |
|
|
54
|
+
| `git-skill trends` | Metric trends dashboard |
|
|
55
|
+
| `git-skill hotspots` | Files with most churn |
|
|
56
|
+
| `git-skill coupling <path>` | Co-changed file analysis |
|
|
57
|
+
| `git-skill decisions` | Major decision points (reverts, refactors) |
|
|
58
|
+
| `git-skill experts <path>` | Who has most context |
|
|
59
|
+
| `git-skill diff-summary <range>` | Range summary (e.g., `v1.0..v1.1`) |
|
|
60
|
+
| `git-skill why <hash>` | Commit intent/reasoning |
|
|
61
|
+
| `git-skill regression` | Change-point detection |
|
|
62
|
+
| `git-skill doctor` | Health check |
|
|
63
|
+
|
|
64
|
+
### Write (require confirmation)
|
|
65
|
+
|
|
66
|
+
| Command | Description |
|
|
67
|
+
|---------|-------------|
|
|
68
|
+
| `git-skill snapshot` | Full re-index of git history |
|
|
69
|
+
| `git-skill embed` | Generate/refresh embeddings |
|
|
70
|
+
| `git-skill enrich [range]` | Backfill LLM enrichments |
|
|
71
|
+
| `git-skill release-notes <range>` | Generate release notes |
|
|
72
|
+
| `git-skill metric record <name> <value>` | Record a custom metric |
|
|
73
|
+
|
|
74
|
+
### Setup
|
|
75
|
+
|
|
76
|
+
| Command | Description |
|
|
77
|
+
|---------|-------------|
|
|
78
|
+
| `git-skill install` | Global setup (embedding config, CLAUDE.md) |
|
|
79
|
+
| `git-skill init` | Per-project setup (hook, snapshot, permissions) |
|
|
80
|
+
| `git-skill approve` | Pre-approve read commands in Claude Code |
|
|
81
|
+
| `git-skill docs` | Output CLAUDE.md snippet |
|
|
82
|
+
| `git-skill cron` | Nightly snapshot automation |
|
|
83
|
+
| `git-skill update` | Self-update |
|
|
84
|
+
| `git-skill uninstall` | Clean removal |
|
|
85
|
+
|
|
86
|
+
### Global Flags
|
|
87
|
+
|
|
88
|
+
- `--json` — Structured output for agents
|
|
89
|
+
- `--limit N` — Cap results
|
|
90
|
+
- `--since <date>` / `--until <date>` — Time filter
|
|
91
|
+
|
|
92
|
+
## How It Works
|
|
93
|
+
|
|
94
|
+
Three-layer SQLite cache at `.git-history/history.db`:
|
|
95
|
+
|
|
96
|
+
1. **Raw git data** — commits, files, branches, tags (captured by post-commit hook + snapshot)
|
|
97
|
+
2. **Derived analytics** — file evolution, churn hotspots, coupling, decision points, author expertise, trends
|
|
98
|
+
3. **LLM enrichments** — intent, reasoning, category per commit (optional, via `enrich`)
|
|
99
|
+
|
|
100
|
+
Search uses BM25 (FTS5) by default. Optional vector search via any OpenAI-compatible embedding endpoint.
|
|
101
|
+
|
|
102
|
+
## Built-in Metrics
|
|
103
|
+
|
|
104
|
+
Automatically tracked per commit:
|
|
105
|
+
|
|
106
|
+
- **Revert rate** — how often commits get reverted
|
|
107
|
+
- **Fix-on-fix rate** — commits fixing previous commit's bug
|
|
108
|
+
- **Scope creep** — files per commit trending up
|
|
109
|
+
- **Time-to-commit** — time between commits
|
|
110
|
+
- **Same-file churn** — same file 3+ times in recent commits (thrashing)
|
|
111
|
+
|
|
112
|
+
## Part of the CLI Skills Ecosystem
|
|
113
|
+
|
|
114
|
+
- [`@m2015agg/supabase-skill`](https://github.com/m2015agg/supabase-skill) — Database schema intelligence
|
|
115
|
+
- [`@m2015agg/context7-skill`](https://github.com/m2015agg/context7-skill) — Library docs cache
|
|
116
|
+
- `@m2015agg/git-skill` — Git history intelligence
|
|
117
|
+
|
|
118
|
+
## License
|
|
119
|
+
|
|
120
|
+
MIT
|
package/dist/commands/embed.js
CHANGED
|
@@ -6,7 +6,7 @@ import { generateEmbedding } from "../util/embedding.js";
|
|
|
6
6
|
export function embedCommand() {
|
|
7
7
|
return new Command("embed")
|
|
8
8
|
.description("Generate/refresh embeddings for commit messages")
|
|
9
|
-
.option("--limit <n>", "Max commits to embed
|
|
9
|
+
.option("--limit <n>", "Max commits to embed (default: all)")
|
|
10
10
|
.option("--force", "Re-embed commits that already have embeddings")
|
|
11
11
|
.action(async (opts) => {
|
|
12
12
|
const config = readConfig();
|
|
@@ -21,26 +21,19 @@ export function embedCommand() {
|
|
|
21
21
|
}
|
|
22
22
|
const db = openDb(historyDir);
|
|
23
23
|
try {
|
|
24
|
-
const limit = parseInt(opts.limit, 10)
|
|
25
|
-
let
|
|
24
|
+
const limit = opts.limit ? parseInt(opts.limit, 10) : 0;
|
|
25
|
+
let query;
|
|
26
26
|
if (opts.force) {
|
|
27
|
-
|
|
28
|
-
.prepare("SELECT hash, message FROM commits ORDER BY timestamp DESC LIMIT ?")
|
|
29
|
-
.all(limit);
|
|
27
|
+
query = "SELECT hash, message FROM commits ORDER BY timestamp DESC";
|
|
30
28
|
}
|
|
31
29
|
else {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
SELECT c.hash, c.message
|
|
36
|
-
FROM commits c
|
|
37
|
-
LEFT JOIN embeddings e ON c.hash = e.commit_hash
|
|
38
|
-
WHERE e.commit_hash IS NULL
|
|
39
|
-
ORDER BY c.timestamp DESC
|
|
40
|
-
LIMIT ?
|
|
41
|
-
`)
|
|
42
|
-
.all(limit);
|
|
30
|
+
query = `SELECT c.hash, c.message FROM commits c
|
|
31
|
+
LEFT JOIN embeddings e ON c.hash = e.commit_hash
|
|
32
|
+
WHERE e.commit_hash IS NULL ORDER BY c.timestamp DESC`;
|
|
43
33
|
}
|
|
34
|
+
if (limit > 0)
|
|
35
|
+
query += ` LIMIT ${limit}`;
|
|
36
|
+
const commits = db.prepare(query).all();
|
|
44
37
|
if (commits.length === 0) {
|
|
45
38
|
process.stdout.write("No commits to embed.\n");
|
|
46
39
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed.js","sourceRoot":"","sources":["../../src/commands/embed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;SACxB,WAAW,CAAC,iDAAiD,CAAC;SAC9D,MAAM,CAAC,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"embed.js","sourceRoot":"","sources":["../../src/commands/embed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;SACxB,WAAW,CAAC,iDAAiD,CAAC;SAC9D,MAAM,CAAC,aAAa,EAAE,qCAAqC,CAAC;SAC5D,MAAM,CAAC,SAAS,EAAE,+CAA+C,CAAC;SAClE,MAAM,CAAC,KAAK,EAAE,IAAwC,EAAE,EAAE;QACzD,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,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;YACrB,IAAI,SAAS,GAAG,CAAC,CAAC;YAElB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACvD,IAAI,MAAM,EAAE,CAAC;oBACX,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;oBACnD,MAAM,GAAG,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;oBAC5C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAElC,WAAW,CAAC,GAAG,CAAC;wBACd,UAAU,EAAE,MAAM,CAAC,IAAI;wBACvB,WAAW,EAAE,SAAS;wBACtB,MAAM,EAAE,GAAG;wBACX,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;qBACpC,CAAC,CAAC;oBACH,YAAY,EAAE,CAAC;gBACjB,CAAC;qBAAM,CAAC;oBACN,SAAS,EAAE,CAAC;gBACd,CAAC;YACH,CAAC;YAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,YAAY,aAAa,SAAS,IAAI,CAAC,CAAC;QAClF,CAAC;gBAAS,CAAC;YACT,EAAE,CAAC,KAAK,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/commands/enrich.js
CHANGED
|
@@ -3,20 +3,34 @@ import { join } from "path";
|
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
4
|
import { openDb, hasDb } from "../util/db.js";
|
|
5
5
|
import { readConfig } from "../util/config.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
function getDiff(cwd, hash, maxChars = 3000) {
|
|
7
|
+
try {
|
|
8
|
+
const raw = execSync(`git show --patch --no-color ${hash}`, {
|
|
9
|
+
cwd,
|
|
10
|
+
encoding: "utf-8",
|
|
11
|
+
timeout: 10000,
|
|
12
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
13
|
+
});
|
|
14
|
+
// Skip the header (everything before first diff --git)
|
|
15
|
+
const diffStart = raw.indexOf("diff --git");
|
|
16
|
+
if (diffStart === -1)
|
|
17
|
+
return "(no diff)";
|
|
18
|
+
const diff = raw.slice(diffStart);
|
|
19
|
+
if (diff.length <= maxChars)
|
|
20
|
+
return diff;
|
|
21
|
+
return diff.slice(0, maxChars) + `\n... (truncated, ${diff.length - maxChars} chars omitted)`;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return "(diff unavailable)";
|
|
25
|
+
}
|
|
14
26
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
function getRecentMessages(db, beforeTimestamp, limit = 3) {
|
|
28
|
+
const rows = db
|
|
29
|
+
.prepare("SELECT message FROM commits WHERE timestamp < ? ORDER BY timestamp DESC LIMIT ?")
|
|
30
|
+
.all(beforeTimestamp, limit);
|
|
31
|
+
return rows.map((r) => r.message);
|
|
32
|
+
}
|
|
33
|
+
async function callLlm(url, model, apiKey, maxTokens, prompt) {
|
|
20
34
|
const headers = { "Content-Type": "application/json" };
|
|
21
35
|
if (apiKey)
|
|
22
36
|
headers["Authorization"] = `Bearer ${apiKey}`;
|
|
@@ -27,22 +41,59 @@ Message: ${commit.message}`;
|
|
|
27
41
|
body: JSON.stringify({
|
|
28
42
|
model,
|
|
29
43
|
messages: [{ role: "user", content: prompt }],
|
|
30
|
-
max_tokens:
|
|
44
|
+
max_tokens: maxTokens,
|
|
31
45
|
temperature: 0,
|
|
32
46
|
}),
|
|
33
47
|
});
|
|
34
48
|
if (!response.ok)
|
|
35
49
|
return null;
|
|
36
|
-
const data = await response.json();
|
|
50
|
+
const data = (await response.json());
|
|
37
51
|
const text = data.choices?.[0]?.message?.content ?? data.content?.[0]?.text ?? "";
|
|
38
|
-
|
|
39
|
-
|
|
52
|
+
const cleaned = text
|
|
53
|
+
.replace(/^```(?:json)?\s*/i, "")
|
|
54
|
+
.replace(/\s*```\s*$/i, "")
|
|
55
|
+
.trim();
|
|
40
56
|
return JSON.parse(cleaned);
|
|
41
57
|
}
|
|
42
58
|
catch {
|
|
43
59
|
return null;
|
|
44
60
|
}
|
|
45
61
|
}
|
|
62
|
+
function buildPrompt(commit, files, diff, recentMessages) {
|
|
63
|
+
const fileList = files
|
|
64
|
+
.map((f) => ` [${f.status}] ${f.file_path} (+${f.insertions}/-${f.deletions})`)
|
|
65
|
+
.join("\n");
|
|
66
|
+
const recentContext = recentMessages.length > 0
|
|
67
|
+
? `\nRecent commits before this one:\n${recentMessages.map((m) => ` - ${m}`).join("\n")}\n`
|
|
68
|
+
: "";
|
|
69
|
+
return `You are analyzing a git commit to extract structured intelligence about what changed and why.
|
|
70
|
+
|
|
71
|
+
Study the commit message, file list, and diff carefully. Respond with ONLY a JSON object — no markdown fences, no explanation.
|
|
72
|
+
|
|
73
|
+
{
|
|
74
|
+
"intent": "One clear sentence: what is the developer trying to accomplish with this commit?",
|
|
75
|
+
"what_changed": "Concrete description of the actual code changes (functions added/removed/modified, config changes, structural changes). Be specific — reference actual names from the diff.",
|
|
76
|
+
"goal": "The broader goal or problem being solved. Why does this change exist? What user/system need does it serve?",
|
|
77
|
+
"reasoning": "Why was this approach chosen? What tradeoffs were made?",
|
|
78
|
+
"category": "One of: feature, bugfix, refactor, cleanup, docs, test, config, perf, revert",
|
|
79
|
+
"impact": "One of: low (typo, comment, minor tweak), medium (single feature/fix, localized change), high (architecture change, breaking change, cross-cutting concern)",
|
|
80
|
+
"alternatives_considered": "What other approaches could have been taken? Say 'none apparent' if the change is straightforward.",
|
|
81
|
+
"session_context": "Based on the recent commits and this change, what broader work session or initiative is this part of?"
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
--- COMMIT ---
|
|
85
|
+
Hash: ${commit.hash.slice(0, 7)}
|
|
86
|
+
Author: ${commit.author}
|
|
87
|
+
Date: ${commit.timestamp.slice(0, 10)}
|
|
88
|
+
Message: ${commit.message}
|
|
89
|
+
Stats: +${commit.insertions}/-${commit.deletions} across ${commit.files_changed} files
|
|
90
|
+
${recentContext}
|
|
91
|
+
--- FILES CHANGED ---
|
|
92
|
+
${fileList}
|
|
93
|
+
|
|
94
|
+
--- DIFF ---
|
|
95
|
+
${diff}`;
|
|
96
|
+
}
|
|
46
97
|
function resolveEnvVar(val) {
|
|
47
98
|
if (!val)
|
|
48
99
|
return undefined;
|
|
@@ -54,35 +105,37 @@ export function enrichCommand() {
|
|
|
54
105
|
.description("Backfill LLM enrichments for commit history")
|
|
55
106
|
.argument("[range]", "Git range to filter commits (e.g. v1.0..v1.1)")
|
|
56
107
|
.option("--dry-run", "Show what would be enriched without doing it")
|
|
57
|
-
.option("--limit <n>", "Max commits to enrich
|
|
108
|
+
.option("--limit <n>", "Max commits to enrich (default: all)")
|
|
58
109
|
.action(async (range, opts) => {
|
|
59
|
-
const
|
|
110
|
+
const cwd = process.cwd();
|
|
111
|
+
const historyDir = join(cwd, ".git-history");
|
|
60
112
|
if (!hasDb(historyDir)) {
|
|
61
113
|
process.stdout.write("No .git-history/ database found. Run `git-skill snapshot` first.\n");
|
|
62
114
|
process.exit(1);
|
|
63
115
|
}
|
|
64
116
|
const db = openDb(historyDir);
|
|
65
117
|
try {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
`)
|
|
77
|
-
.all(limit);
|
|
118
|
+
let query = `
|
|
119
|
+
SELECT c.hash, c.message, c.author, c.timestamp, c.insertions, c.deletions, c.files_changed
|
|
120
|
+
FROM commits c
|
|
121
|
+
LEFT JOIN enrichments e ON c.hash = e.commit_hash
|
|
122
|
+
WHERE e.commit_hash IS NULL
|
|
123
|
+
ORDER BY c.timestamp DESC
|
|
124
|
+
`;
|
|
125
|
+
if (opts.limit)
|
|
126
|
+
query += ` LIMIT ${parseInt(opts.limit, 10)}`;
|
|
127
|
+
let commits = db.prepare(query).all();
|
|
78
128
|
// Filter by range if provided
|
|
79
129
|
if (range) {
|
|
80
130
|
try {
|
|
81
131
|
const rangeHashes = execSync(`git rev-list ${range}`, {
|
|
82
|
-
cwd
|
|
132
|
+
cwd,
|
|
83
133
|
encoding: "utf-8",
|
|
84
134
|
timeout: 10000,
|
|
85
|
-
})
|
|
135
|
+
})
|
|
136
|
+
.trim()
|
|
137
|
+
.split("\n")
|
|
138
|
+
.filter(Boolean);
|
|
86
139
|
const rangeSet = new Set(rangeHashes);
|
|
87
140
|
commits = commits.filter((c) => rangeSet.has(c.hash));
|
|
88
141
|
}
|
|
@@ -107,11 +160,13 @@ export function enrichCommand() {
|
|
|
107
160
|
return;
|
|
108
161
|
}
|
|
109
162
|
if (!enrichEnabled) {
|
|
110
|
-
process.stdout.write(
|
|
163
|
+
process.stdout.write("Enrichment not configured. Set enrichment.enabled and enrichment.url in ~/.config/git-skill/config.json\n");
|
|
164
|
+
process.stdout.write(`Recommended models: claude-sonnet-4-5-20250514, gpt-4o, gpt-4o-mini\n`);
|
|
111
165
|
process.stdout.write(`${commits.length} commit${commits.length !== 1 ? "s" : ""} would be enriched.\n`);
|
|
112
166
|
return;
|
|
113
167
|
}
|
|
114
|
-
|
|
168
|
+
const maxTokens = config.enrichment.maxTokensPerCommit || 5000;
|
|
169
|
+
process.stdout.write(`Enriching ${commits.length} commits (model: ${config.enrichment.model}, max_tokens: ${maxTokens})...\n`);
|
|
115
170
|
const apiKey = resolveEnvVar(config.enrichment.apiKey);
|
|
116
171
|
const insertEnrichment = db.prepare(`
|
|
117
172
|
INSERT OR REPLACE INTO enrichments
|
|
@@ -121,12 +176,31 @@ export function enrichCommand() {
|
|
|
121
176
|
`);
|
|
122
177
|
let successCount = 0;
|
|
123
178
|
let failCount = 0;
|
|
124
|
-
for (
|
|
125
|
-
const
|
|
179
|
+
for (let i = 0; i < commits.length; i++) {
|
|
180
|
+
const commit = commits[i];
|
|
181
|
+
// Get file list from SQLite
|
|
182
|
+
const files = db
|
|
183
|
+
.prepare("SELECT file_path, status, insertions, deletions FROM commit_files WHERE commit_hash = ?")
|
|
184
|
+
.all(commit.hash);
|
|
185
|
+
// Get actual diff (truncated)
|
|
186
|
+
const diff = getDiff(cwd, commit.hash);
|
|
187
|
+
// Get recent commit messages for session context
|
|
188
|
+
const recentMessages = getRecentMessages(db, commit.timestamp);
|
|
189
|
+
// Build rich prompt
|
|
190
|
+
const prompt = buildPrompt(commit, files, diff, recentMessages);
|
|
191
|
+
const result = await callLlm(config.enrichment.url, config.enrichment.model, apiKey, maxTokens, prompt);
|
|
126
192
|
if (result) {
|
|
193
|
+
// Combine new fields into existing schema
|
|
194
|
+
const intentParts = [result.intent];
|
|
195
|
+
if (result.what_changed)
|
|
196
|
+
intentParts.push(`Changes: ${result.what_changed}`);
|
|
197
|
+
if (result.goal)
|
|
198
|
+
intentParts.push(`Goal: ${result.goal}`);
|
|
199
|
+
if (result.impact)
|
|
200
|
+
intentParts.push(`Impact: ${result.impact}`);
|
|
127
201
|
insertEnrichment.run({
|
|
128
202
|
commitHash: commit.hash,
|
|
129
|
-
intent:
|
|
203
|
+
intent: intentParts.join(" | "),
|
|
130
204
|
reasoning: result.reasoning ?? null,
|
|
131
205
|
category: result.category ?? null,
|
|
132
206
|
alternativesConsidered: result.alternatives_considered ?? null,
|
|
@@ -137,6 +211,10 @@ export function enrichCommand() {
|
|
|
137
211
|
else {
|
|
138
212
|
failCount++;
|
|
139
213
|
}
|
|
214
|
+
// Progress
|
|
215
|
+
if ((i + 1) % 10 === 0 || i === commits.length - 1) {
|
|
216
|
+
process.stdout.write(` ${i + 1}/${commits.length} (${successCount} ok, ${failCount} failed)\n`);
|
|
217
|
+
}
|
|
140
218
|
}
|
|
141
219
|
process.stdout.write(`Done. Enriched: ${successCount}, Failed: ${failCount}\n`);
|
|
142
220
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrich.js","sourceRoot":"","sources":["../../src/commands/enrich.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"enrich.js","sourceRoot":"","sources":["../../src/commands/enrich.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAmB/C,SAAS,OAAO,CAAC,GAAW,EAAE,IAAY,EAAE,QAAQ,GAAG,IAAI;IACzD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,QAAQ,CAAC,+BAA+B,IAAI,EAAE,EAAE;YAC1D,GAAG;YACH,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;SAC5B,CAAC,CAAC;QACH,uDAAuD;QACvD,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC5C,IAAI,SAAS,KAAK,CAAC,CAAC;YAAE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AC,CAAC;oBAEhE,gBAAgB,CAAC,GAAG,CAAC;wBACnB,UAAU,EAAE,MAAM,CAAC,IAAI;wBACvB,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;wBAC/B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI;wBACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,IAAI;wBACjC,sBAAsB,EAAE,MAAM,CAAC,uBAAuB,IAAI,IAAI;wBAC9D,cAAc,EAAE,MAAM,CAAC,eAAe,IAAI,IAAI;qBAC/C,CAAC,CAAC;oBACH,YAAY,EAAE,CAAC;gBACjB,CAAC;qBAAM,CAAC;oBACN,SAAS,EAAE,CAAC;gBACd,CAAC;gBAED,WAAW;gBACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACnD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,KAAK,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,YAAY,QAAQ,SAAS,YAAY,CAC3E,CAAC;gBACJ,CAAC;YACH,CAAC;YAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,mBAAmB,YAAY,aAAa,SAAS,IAAI,CAC1D,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,EAAE,CAAC,KAAK,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/util/config.js
CHANGED
|
@@ -6,7 +6,7 @@ const CONFIG_PATH = join(CONFIG_DIR, "config.json");
|
|
|
6
6
|
export function getDefaultConfig() {
|
|
7
7
|
return {
|
|
8
8
|
embedding: { enabled: false, provider: "openai", model: "text-embedding-3-small", url: "", apiKey: "", dimensions: 1536 },
|
|
9
|
-
enrichment: { enabled: false, url: "", model: "
|
|
9
|
+
enrichment: { enabled: false, url: "", model: "claude-sonnet-4-5-20250514", apiKey: "", batchSize: 10, maxTokensPerCommit: 5000 },
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
export function readConfig() {
|
package/dist/util/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/util/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAqB7B,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAC3D,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAEpD,MAAM,UAAU,gBAAgB;IAC9B,OAAO;QACL,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;QACzH,UAAU,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/util/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAqB7B,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAC3D,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE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