git-impact 0.3.0 → 0.6.2

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.
Files changed (59) hide show
  1. package/README.md +124 -78
  2. package/dist/cli/index.js +32 -211
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/init/installer.d.ts +6 -0
  5. package/dist/init/installer.d.ts.map +1 -1
  6. package/dist/init/installer.js +58 -5
  7. package/dist/init/installer.js.map +1 -1
  8. package/dist/init/installer.test.d.ts +2 -0
  9. package/dist/init/installer.test.d.ts.map +1 -0
  10. package/dist/init/installer.test.js +127 -0
  11. package/dist/init/installer.test.js.map +1 -0
  12. package/dist/init/templates.d.ts +8 -7
  13. package/dist/init/templates.d.ts.map +1 -1
  14. package/dist/init/templates.js +73 -371
  15. package/dist/init/templates.js.map +1 -1
  16. package/dist/mcp/resources.js +0 -1
  17. package/dist/mcp/resources.js.map +1 -1
  18. package/dist/mcp/tools.d.ts.map +1 -1
  19. package/dist/mcp/tools.js +64 -12
  20. package/dist/mcp/tools.js.map +1 -1
  21. package/dist/readers/git.d.ts +2 -1
  22. package/dist/readers/git.d.ts.map +1 -1
  23. package/dist/readers/git.js +12 -6
  24. package/dist/readers/git.js.map +1 -1
  25. package/dist/readers/redact.d.ts +29 -0
  26. package/dist/readers/redact.d.ts.map +1 -0
  27. package/dist/readers/redact.js +82 -0
  28. package/dist/readers/redact.js.map +1 -0
  29. package/dist/readers/redact.test.d.ts +2 -0
  30. package/dist/readers/redact.test.d.ts.map +1 -0
  31. package/dist/readers/redact.test.js +72 -0
  32. package/dist/readers/redact.test.js.map +1 -0
  33. package/dist/report/html.d.ts +2 -0
  34. package/dist/report/html.d.ts.map +1 -1
  35. package/dist/report/html.js +35 -1
  36. package/dist/report/html.js.map +1 -1
  37. package/dist/report/render.d.ts.map +1 -1
  38. package/dist/report/render.js +2 -0
  39. package/dist/report/render.js.map +1 -1
  40. package/dist/storage/db.d.ts +23 -2
  41. package/dist/storage/db.d.ts.map +1 -1
  42. package/dist/storage/db.js +12 -0
  43. package/dist/storage/db.js.map +1 -1
  44. package/dist/storage/db.test.d.ts +2 -0
  45. package/dist/storage/db.test.d.ts.map +1 -0
  46. package/dist/storage/db.test.js +152 -0
  47. package/dist/storage/db.test.js.map +1 -0
  48. package/package.json +7 -6
  49. package/skill/SKILL.md +131 -206
  50. package/skill/references/html-template.md +131 -0
  51. package/skill/references/translation-rules.md +87 -0
  52. package/dist/translator/prompt.d.ts +0 -21
  53. package/dist/translator/prompt.d.ts.map +0 -1
  54. package/dist/translator/prompt.js +0 -117
  55. package/dist/translator/prompt.js.map +0 -1
  56. package/dist/translator/translate.d.ts +0 -36
  57. package/dist/translator/translate.d.ts.map +0 -1
  58. package/dist/translator/translate.js +0 -73
  59. package/dist/translator/translate.js.map +0 -1
package/README.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # git-impact
2
2
 
3
- Translate your git commits into plain-English business impact — for standups, manager updates, and performance reviews.
3
+ Translate your git commits into plain-English business impact — for standups, manager updates, and performance review prep.
4
4
 
5
5
  ```
6
6
  📅 Thursday, May 8, 2026
7
7
 
8
- ✅ Shipped secure multi-tenant data access layer
8
+ ✅ Shipped secure multi-tenant data access layer [PR #142]
9
9
  → Prevents cross-company data leaks. Required for SOC2 compliance sign-off.
10
10
 
11
- ✅ Fixed login failures for admin users
11
+ ✅ Fixed login failures for admin users [a1b2c3d, ENG-431]
12
12
  → Unblocks Q2 portal launch, was blocking 3 engineers.
13
13
 
14
- ⏳ In progress: Refactoring authentication flow
14
+ ⏳ In progress: Refactoring authentication flow [inferred]
15
15
  → Will reduce login latency by ~40%, targeting end of week.
16
16
 
17
17
  📁 6 files changed across auth + database layers
18
18
  4 commits on main
19
19
  ```
20
20
 
21
- No API key needed when used through Claude Code.
21
+ No API key, ever. Translation runs inside your AI editor.
22
22
 
23
23
  ---
24
24
 
@@ -32,7 +32,7 @@ npx git-impact init
32
32
 
33
33
  [![npm version](https://img.shields.io/npm/v/git-impact.svg)](https://www.npmjs.com/package/git-impact)
34
34
 
35
- The wizard asks four questions, then self-installs into the repo:
35
+ The wizard auto-detects which AI editors you already use and installs for them. Three short questions, then it self-installs:
36
36
 
37
37
  ```
38
38
  git-impact init
@@ -51,10 +51,11 @@ The wizard asks four questions, then self-installs into the repo:
51
51
  Format: "RLS=data security, MFA=login security"
52
52
  >
53
53
 
54
- Which AI tools do you use? (comma-separated, or "all")
54
+ Which AI editors should I install for? (comma-separated, or "all")
55
55
  Options: claude, copilot, cursor, gemini
56
- [default: claude]
57
- > all
56
+ Detected in this repo: claude, cursor
57
+ [press Enter to use detected]
58
+ >
58
59
  ```
59
60
 
60
61
  Then it creates everything and tells you what it did:
@@ -66,19 +67,18 @@ Then it creates everything and tells you what it did:
66
67
  ✅ .git-impact/context.json
67
68
  ✅ .gitignore
68
69
  ✅ .claude/skills/git-impact/SKILL.md
69
- ✅ .github/instructions/git-impact.instructions.md
70
+ ✅ .claude/skills/git-impact/references/translation-rules.md
71
+ ✅ .claude/skills/git-impact/references/html-template.md
70
72
  ✅ .cursor/rules/git-impact.mdc
71
- ✅ .gemini/commands/git-impact.md
72
73
  ✅ CLAUDE.md
73
74
  ✅ .git-impact/manifest.json
74
75
 
75
76
  Next steps:
76
- 1. git add .git-impact/context.json .claude/ && git commit -m "chore: add git-impact"
77
- 2. In Claude Code, say: "do my standup"
77
+ 1. git add .git-impact/context.json && git commit -m "chore: add git-impact"
78
+ 2. In Claude Code: type "/git-impact" or say "do my standup"
79
+ 3. After a few standups: `git-impact view` to see the rolling dashboard
78
80
  ```
79
81
 
80
- After that, open the project in Claude Code and you're ready to go.
81
-
82
82
  ---
83
83
 
84
84
  ## Using it
@@ -87,25 +87,35 @@ Once installed, just talk to your AI editor naturally:
87
87
 
88
88
  | What you say | What happens |
89
89
  |---|---|
90
- | `do my standup` | Translates today's commits |
91
- | `git-impact since 3d` | Looks back 3 days |
90
+ | `/git-impact` or `do my standup` | Translates commits since your last standup (survives weekends) |
91
+ | `since yesterday`, `since 3d`, `since 2026-05-01` | Explicit lookback window |
92
92
  | `what did I ship this week?` | Looks back 7 days |
93
- | `generate a performance review` | Synthesises the last 90 days |
93
+ | `generate a performance review` | Synthesises history into review-prep evidence |
94
+ | `make a presentation for today` | Adds a bespoke shareable HTML page (opt-in) |
94
95
  | `set up context for this repo` | Re-runs the init questions inline |
95
96
 
96
- Works in **Claude Code**, **GitHub Copilot**, **Cursor**, and **Gemini CLI** each editor gets its own instruction file.
97
+ Works in **Claude Code**, **GitHub Copilot**, **Cursor**, and **Gemini CLI**. Claude Code and Gemini CLI get the full agentic experience (the skill auto-runs the MCP tools); Cursor and Copilot get the same instructions as paste-into-chat fallbacks.
97
98
 
98
99
  ---
99
100
 
100
101
  ## How it works
101
102
 
102
- git-impact reads your commits with `git log`, loads the team glossary from `.git-impact/context.json`, and translates them into business language. The AI editor does the translation inline — no separate process, no API key needed.
103
+ git-impact ships two things: a Claude Code **skill** that handles the prompting, and an **MCP server** that exposes typed data tools (git activity, history, context). The skill calls the MCP tools — no `sqlite3` shelling, no hand-rolled SQL.
103
104
 
104
105
  ```
105
- your commits → git logcontext.json glossary → AI translation → standup
106
+ your commits → MCP get_git_activityprivacy redaction → AI translation
107
+
108
+ MCP save_impact_entry (with provenance + refs)
109
+
110
+ .git-impact/result.html (rolling dashboard)
106
111
  ```
107
112
 
108
- History is saved locally to `.git-impact/history.db` (SQLite, gitignored) so performance reviews can synthesise weeks or months of daily standups.
113
+ **Two safeguards built in:**
114
+
115
+ - **Privacy redaction** (default-on) — filenames matching `.env*`, `.aws/`, `.ssh/`, `*credentials*`, `*secret*`, `*.pem`, `*.key` get replaced with `[redacted-secret-file]` before they reach the model. Obvious-looking secret values in commit bodies (Stripe keys, AWS access key ids, GitHub PATs, Slack tokens, JWTs) become `[redacted-secret]`.
116
+ - **Per-bullet provenance** — every translated bullet is tagged `pr` / `commit_body` / `commit_message` / `ticket` / `inferred`. Inferred bullets surface with an amber chip in the HTML report so you (and your manager) can tell what's grounded vs. guessed.
117
+
118
+ History is saved locally to `.git-impact/history.db` (SQLite, gitignored) so review-prep can synthesise weeks or months of standups.
109
119
 
110
120
  ---
111
121
 
@@ -115,32 +125,37 @@ History is saved locally to `.git-impact/history.db` (SQLite, gitignored) so per
115
125
  your-project/
116
126
  ├── .claude/
117
127
  │ └── skills/git-impact/
118
- └── SKILL.md # Claude Code skill
128
+ ├── SKILL.md # Workflow (orchestrates MCP tools)
129
+ │ └── references/
130
+ │ ├── translation-rules.md # Loaded on demand
131
+ │ └── html-template.md # Loaded on demand
119
132
  ├── .github/
120
133
  │ └── instructions/
121
- │ └── git-impact.instructions.md # GitHub Copilot
134
+ │ └── git-impact.instructions.md # GitHub Copilot
122
135
  ├── .cursor/
123
136
  │ └── rules/
124
- │ └── git-impact.mdc # Cursor
137
+ │ └── git-impact.mdc # Cursor
125
138
  ├── .gemini/
126
139
  │ └── commands/
127
- │ └── git-impact.md # Gemini CLI
140
+ │ └── git-impact.md # Gemini CLI
128
141
  ├── .git-impact/
129
- │ ├── context.json # Team glossary ← commit this
130
- │ ├── manifest.json # Install record ← commit this
131
- └── history.db # Local history ← gitignored
132
- └── CLAUDE.md # Usage reminder block (managed)
142
+ │ ├── context.json # Team glossary ← commit this
143
+ │ ├── manifest.json # Install record ← commit this
144
+ ├── history.db # Local history ← gitignored
145
+ │ ├── result.html # Rolling dashboard gitignored
146
+ │ └── standups/YYYY-MM-DD.html # Bespoke presentations (opt-in)
147
+ └── CLAUDE.md # Usage reminder block (managed)
133
148
  ```
134
149
 
135
- **Commit everything except `history.db`.** Your teammates get the glossary and AI instructions automatically when they clone or pull.
150
+ **Commit the SKILL files and `context.json`. Everything else stays local.**
136
151
 
137
- Re-running `npx git-impact init` is safe — it updates existing files without creating duplicates.
152
+ Re-running `npx git-impact init` is safe — it updates existing files in place.
138
153
 
139
154
  ---
140
155
 
141
156
  ## context.json
142
157
 
143
- The glossary file lives at `.git-impact/context.json`. Commit it so everyone on the team gets the same translation:
158
+ Lives at `.git-impact/context.json`. Commit it so everyone on the team gets the same translation:
144
159
 
145
160
  ```json
146
161
  {
@@ -150,11 +165,16 @@ The glossary file lives at `.git-impact/context.json`. Commit it so everyone on
150
165
  "RLS": "data security layer",
151
166
  "MFA": "login security",
152
167
  "TabPFN": "AI predictions"
168
+ },
169
+ "privacy": {
170
+ "redact": true,
171
+ "filePatterns": ["*internal-only*"],
172
+ "valuePatterns": ["MY_COMPANY_NAME"]
153
173
  }
154
174
  }
155
175
  ```
156
176
 
157
- You can edit it by hand or re-run `git-impact init` to update it through the wizard.
177
+ The `privacy` block is optional defaults work for most teams. Set `redact: false` to disable the filter, or extend the patterns to catch internal names / customer identifiers.
158
178
 
159
179
  ---
160
180
 
@@ -164,39 +184,40 @@ The skill follows these rules to keep output useful rather than vague:
164
184
 
165
185
  1. **What + why, not what + how** — "Fixed login failures for admin users → unblocks Q2 launch" not "updated auth middleware"
166
186
  2. **Apply the glossary** — every term in `context.json` is replaced with its plain-English equivalent
167
- 3. **Never hallucinate** — if impact can't be inferred, says "technical foundation work for [area]"
187
+ 3. **Provenance is mandatory** — every saved bullet is tagged `pr` / `commit_body` / `commit_message` / `ticket` / `inferred`. Inferred bullets render with an amber chip so the reader can spot what was grounded vs guessed.
168
188
  4. **Group related commits** — four auth commits become one bullet, not four
169
- 5. **Flag WIP** — draft/WIP commits get `⏳ In progress:` with the expected outcome
189
+ 5. **Three statuses** — `done` (✅), `in_progress` (⏳), `blocked` (🚫). WIP work surfaces the *expected* outcome, not the work-so-far.
170
190
  6. **Use numbers** — "reduced latency by ~40%" beats "improved performance"
171
191
 
192
+ Full rules in [`skill/references/translation-rules.md`](skill/references/translation-rules.md).
193
+
172
194
  ---
173
195
 
174
- ## Performance reviews
196
+ ## Performance review prep
175
197
 
176
198
  Use the standup daily for a few weeks. History builds up in `history.db`. Then:
177
199
 
178
200
  ```
179
- generate a performance review for last 90 days ← Claude Code
180
- git-impact review --last 90 CLI
181
- git-impact review --quarter Q2-2026 ← CLI, specific quarter
201
+ generate performance review prep for the last 90 days ← Claude Code
202
+ generate review for Q2-2026 any supported editor
182
203
  ```
183
204
 
184
- Output:
205
+ Output (think of this as evidence pack you paste into your own writing — not a finished review):
185
206
 
186
207
  ```
187
- Performance Review — Q2 2026
208
+ Performance Review Prep — Q2 2026
188
209
 
189
210
  Led the security layer redesign that enabled SOC2 compliance sign-off.
190
211
 
191
212
  🚀 Security
192
- • Shipped multi-tenant data isolation, unblocking a $2M enterprise deal
193
- • Resolved 2 auth vulnerabilities before the audit window
213
+ • Shipped multi-tenant data isolation, unblocking a $2M enterprise deal [Apr 8, PR #98]
214
+ • Resolved 2 auth vulnerabilities before the audit window [May 2, PR #114]
194
215
 
195
216
  ✅ Features
196
- • Delivered admin portal ahead of schedule (was blocking 3 engineers)
217
+ • Delivered admin portal ahead of schedule (was blocking 3 engineers) [Apr 22, PR #103]
197
218
 
198
219
  🔧 Reliability
199
- • Reduced login latency by ~40% through auth flow refactor
220
+ • Reduced login latency by ~40% through auth flow refactor [May 8, inferred]
200
221
 
201
222
  📊 47 commits across 58 working days
202
223
  ```
@@ -205,16 +226,12 @@ Led the security layer redesign that enabled SOC2 compliance sign-off.
205
226
 
206
227
  ## CLI reference
207
228
 
208
- The CLI requires an Anthropic API key (set during `init` or via `ANTHROPIC_API_KEY`). Not needed when using the Claude Code skill.
229
+ The CLI is just for installing and viewing reports translation always happens inside your AI editor.
209
230
 
210
231
  ```bash
211
232
  git-impact init # set up / update this repo
212
- git-impact today # translate today's commits
213
- git-impact since yesterday # since yesterday
214
- git-impact since 3d # last 3 days
215
- git-impact since 2026-05-01 # since a specific date
216
- git-impact review --last 90 # performance review, last 90 days
217
- git-impact review --quarter Q2-2026
233
+ git-impact view # open the HTML report of saved standups
234
+ git-impact view --date 2026-05-09 # open a specific day directly
218
235
  ```
219
236
 
220
237
  All commands accept `-p <path>` to point at a different repo. By default the repo is auto-detected from the current directory.
@@ -223,7 +240,7 @@ All commands accept `-p <path>` to point at a different repo. By default the rep
223
240
 
224
241
  ## MCP server
225
242
 
226
- The MCP server exposes git data as tools so Claude Code can call them directly. It requires no API key — Claude does the translation in its own session.
243
+ The MCP server exposes git data as typed tools so AI editors can call them directly. No API key — your editor does the translation in its own session.
227
244
 
228
245
  Add to `.claude/settings.json` in your project:
229
246
 
@@ -238,14 +255,23 @@ Add to `.claude/settings.json` in your project:
238
255
  }
239
256
  ```
240
257
 
241
- Available tools: `get_git_activity`, `get_github_activity`, `save_impact_entry`, `get_history`, `update_context`.
258
+ Available tools:
259
+
260
+ | Tool | What it does |
261
+ |---|---|
262
+ | `get_git_activity` | Reads commits + file changes, applies privacy redaction |
263
+ | `get_github_activity` | Pulls PR titles + descriptions (needs `github_token` in context) |
264
+ | `get_last_standup_date` | Powers the "since last standup" default |
265
+ | `save_impact_entry` | Persists a translation with provenance + refs |
266
+ | `get_history` | Returns saved entries for a date range |
267
+ | `update_context` | Updates `context.json` (company / glossary / privacy / token) |
242
268
 
243
269
  ---
244
270
 
245
271
  ## Local development
246
272
 
247
273
  ```bash
248
- git clone https://github.com/efraimnafady/git-impact
274
+ git clone https://github.com/efraimnabil/git-impact
249
275
  cd git-impact
250
276
  npm install
251
277
  npm run build
@@ -253,11 +279,15 @@ npm run build
253
279
  # Test the installer
254
280
  node dist/cli/index.js init
255
281
 
256
- # Test standup translation
257
- node dist/cli/index.js today
282
+ # Open the HTML report
283
+ node dist/cli/index.js view
258
284
 
259
285
  # Run the MCP server
260
286
  node dist/mcp/server.js
287
+
288
+ # Tests
289
+ npm test # one-shot
290
+ npm run test:watch # watch mode
261
291
  ```
262
292
 
263
293
  Publishing a new version:
@@ -275,37 +305,53 @@ git push --follow-tags
275
305
  ```
276
306
  src/
277
307
  ├── init/
278
- │ ├── installer.ts # install() + runInitWizard() the spec-kit style init
279
- └── templates.ts # all integration file content as embedded TS strings
308
+ │ ├── installer.ts # install() + runInitWizard() + detectEditors()
309
+ ├── installer.test.ts
310
+ │ └── templates.ts # editor-specific instruction templates
280
311
  ├── readers/
281
- │ ├── git.ts # reads git log, diffs, file changes
282
- └── github.ts # reads PRs via GitHub API (optional)
283
- ├── translator/
284
- ├── prompt.ts # Claude prompt templates
285
- │ └── translate.ts # calls Claude API (CLI mode only)
312
+ │ ├── git.ts # reads git log, diffs, file changes
313
+ ├── github.ts # reads PRs via GitHub API (optional)
314
+ ├── redact.ts # privacy filter (filenames + secret-shaped values)
315
+ └── redact.test.ts
286
316
  ├── storage/
287
- └── db.ts # per-repo SQLite history + context.json
317
+ ├── db.ts # per-repo SQLite history + context.json
318
+ │ └── db.test.ts
319
+ ├── report/
320
+ │ ├── render.ts # builds the rolling HTML dashboard
321
+ │ └── html.ts # HTML template + provenance chips
288
322
  ├── mcp/
289
- │ ├── server.ts # MCP server entry point
290
- │ ├── tools.ts # data tools (get_git_activity, etc.)
291
- │ ├── resources.ts # MCP resources (context, history overview)
292
- │ ├── prompts.ts # computed prompt templates (standup, review)
293
- │ └── repo.ts # auto-detects repo root from cwd
323
+ │ ├── server.ts # MCP server entry point
324
+ │ ├── tools.ts # typed data tools (get_git_activity, save_impact_entry, …)
325
+ │ ├── resources.ts # MCP resources (context, history overview)
326
+ │ ├── prompts.ts # computed prompt templates (standup, review)
327
+ │ └── repo.ts # auto-detects repo root from cwd
294
328
  └── cli/
295
- └── index.ts # commander CLI
329
+ └── index.ts # init + view commands
296
330
  skill/
297
- └── SKILL.md # standalone Claude Code skill (copy to any repo)
331
+ ├── SKILL.md # workflow (200 lines, orchestrates MCP tools)
332
+ └── references/
333
+ ├── translation-rules.md
334
+ └── html-template.md
298
335
  ```
299
336
 
300
337
  ---
301
338
 
302
339
  ## Roadmap
303
340
 
304
- - [x] `npm publish` — `npx git-impact init` works zero-install
305
- - [ ] Color output (`chalk`) in CLI mode
306
- - [ ] `--copy` flag to put output on clipboard
307
- - [ ] GitHub PR enrichment fully wired into standup output
308
- - [ ] Web dashboard for shared performance review links
341
+ Shipped:
342
+ - [x] Skill + MCP architecture (skill orchestrates, tools provide)
343
+ - [x] Per-bullet provenance tags + refs
344
+ - [x] Privacy redaction (default-on)
345
+ - [x] "Since last standup" default
346
+ - [x] Editor auto-detection in init
347
+ - [x] Test baseline (Vitest, 40 tests)
348
+ - [x] Multi-editor: Claude Code, Copilot, Cursor, Gemini CLI
349
+
350
+ Next:
351
+ - [ ] **PR description writer** — `git-impact-pr` skill produces ready-to-paste PR bodies
352
+ - [ ] **Multi-repo standup** — aggregate across `~/work/*` in one update
353
+ - [ ] **Changelog mode** — `since v1.2.0` produces user-facing release notes
354
+ - [ ] **Team / cloud features** — shared history, shareable evidence-pack URLs
309
355
 
310
356
  ---
311
357