git-impact 0.1.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.
Files changed (56) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +305 -0
  3. package/dist/cli/index.d.ts +3 -0
  4. package/dist/cli/index.d.ts.map +1 -0
  5. package/dist/cli/index.js +267 -0
  6. package/dist/cli/index.js.map +1 -0
  7. package/dist/init/installer.d.ts +31 -0
  8. package/dist/init/installer.d.ts.map +1 -0
  9. package/dist/init/installer.js +225 -0
  10. package/dist/init/installer.js.map +1 -0
  11. package/dist/init/templates.d.ts +12 -0
  12. package/dist/init/templates.d.ts.map +1 -0
  13. package/dist/init/templates.js +258 -0
  14. package/dist/init/templates.js.map +1 -0
  15. package/dist/mcp/prompts.d.ts +4 -0
  16. package/dist/mcp/prompts.d.ts.map +1 -0
  17. package/dist/mcp/prompts.js +242 -0
  18. package/dist/mcp/prompts.js.map +1 -0
  19. package/dist/mcp/repo.d.ts +14 -0
  20. package/dist/mcp/repo.d.ts.map +1 -0
  21. package/dist/mcp/repo.js +106 -0
  22. package/dist/mcp/repo.js.map +1 -0
  23. package/dist/mcp/resources.d.ts +4 -0
  24. package/dist/mcp/resources.d.ts.map +1 -0
  25. package/dist/mcp/resources.js +98 -0
  26. package/dist/mcp/resources.js.map +1 -0
  27. package/dist/mcp/server.d.ts +14 -0
  28. package/dist/mcp/server.d.ts.map +1 -0
  29. package/dist/mcp/server.js +61 -0
  30. package/dist/mcp/server.js.map +1 -0
  31. package/dist/mcp/tools.d.ts +12 -0
  32. package/dist/mcp/tools.d.ts.map +1 -0
  33. package/dist/mcp/tools.js +285 -0
  34. package/dist/mcp/tools.js.map +1 -0
  35. package/dist/readers/git.d.ts +23 -0
  36. package/dist/readers/git.d.ts.map +1 -0
  37. package/dist/readers/git.js +120 -0
  38. package/dist/readers/git.js.map +1 -0
  39. package/dist/readers/github.d.ts +22 -0
  40. package/dist/readers/github.d.ts.map +1 -0
  41. package/dist/readers/github.js +94 -0
  42. package/dist/readers/github.js.map +1 -0
  43. package/dist/storage/db.d.ts +31 -0
  44. package/dist/storage/db.d.ts.map +1 -0
  45. package/dist/storage/db.js +170 -0
  46. package/dist/storage/db.js.map +1 -0
  47. package/dist/translator/prompt.d.ts +21 -0
  48. package/dist/translator/prompt.d.ts.map +1 -0
  49. package/dist/translator/prompt.js +117 -0
  50. package/dist/translator/prompt.js.map +1 -0
  51. package/dist/translator/translate.d.ts +36 -0
  52. package/dist/translator/translate.d.ts.map +1 -0
  53. package/dist/translator/translate.js +73 -0
  54. package/dist/translator/translate.js.map +1 -0
  55. package/package.json +55 -0
  56. package/skill/SKILL.md +238 -0
@@ -0,0 +1,225 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.install = install;
37
+ exports.runInitWizard = runInitWizard;
38
+ const fs = __importStar(require("fs"));
39
+ const path = __importStar(require("path"));
40
+ const readline = __importStar(require("readline"));
41
+ const templates_1 = require("./templates");
42
+ /**
43
+ * Core install function — idempotent, safe to run multiple times.
44
+ * Creates all integration files, context.json, updates CLAUDE.md and .gitignore.
45
+ * Returns a manifest of every file it touched.
46
+ */
47
+ function install(opts) {
48
+ const { repoRoot, integrations, context } = opts;
49
+ const installed = [];
50
+ // 1. Create .git-impact/ directory and context.json
51
+ const gitImpactDir = path.join(repoRoot, ".git-impact");
52
+ fs.mkdirSync(gitImpactDir, { recursive: true });
53
+ const contextPath = path.join(gitImpactDir, "context.json");
54
+ installed.push(writeFile(contextPath, (0, templates_1.CONTEXT_TEMPLATE)(context.companyDescription, context.managerPriorities, context.glossary)));
55
+ // 2. Update .gitignore
56
+ installed.push(ensureGitignore(repoRoot));
57
+ // 3. Per-integration files
58
+ for (const integration of integrations) {
59
+ installed.push(...installIntegration(repoRoot, integration));
60
+ }
61
+ // 4. Update CLAUDE.md if Claude integration selected
62
+ if (integrations.includes("claude")) {
63
+ installed.push(updateClaudeMd(repoRoot));
64
+ }
65
+ // 5. Write manifest
66
+ const manifest = {
67
+ version: "0.1.0",
68
+ installedAt: new Date().toISOString(),
69
+ integrations,
70
+ files: installed.map((f) => path.relative(repoRoot, f.path)),
71
+ };
72
+ const manifestPath = path.join(gitImpactDir, "manifest.json");
73
+ fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + "\n");
74
+ return installed;
75
+ }
76
+ // ─── Per-integration installers ───────────────────────────────────────────────
77
+ function installIntegration(repoRoot, integration) {
78
+ switch (integration) {
79
+ case "claude":
80
+ return installClaude(repoRoot);
81
+ case "copilot":
82
+ return installCopilot(repoRoot);
83
+ case "cursor":
84
+ return installCursor(repoRoot);
85
+ case "gemini":
86
+ return installGemini(repoRoot);
87
+ }
88
+ }
89
+ function installClaude(repoRoot) {
90
+ const skillDir = path.join(repoRoot, ".claude", "skills", "git-impact");
91
+ fs.mkdirSync(skillDir, { recursive: true });
92
+ return [writeFile(path.join(skillDir, "SKILL.md"), templates_1.CLAUDE_SKILL)];
93
+ }
94
+ function installCopilot(repoRoot) {
95
+ const dir = path.join(repoRoot, ".github", "instructions");
96
+ fs.mkdirSync(dir, { recursive: true });
97
+ return [writeFile(path.join(dir, "git-impact.instructions.md"), templates_1.COPILOT_INSTRUCTIONS)];
98
+ }
99
+ function installCursor(repoRoot) {
100
+ const dir = path.join(repoRoot, ".cursor", "rules");
101
+ fs.mkdirSync(dir, { recursive: true });
102
+ return [writeFile(path.join(dir, "git-impact.mdc"), templates_1.CURSOR_RULES)];
103
+ }
104
+ function installGemini(repoRoot) {
105
+ const dir = path.join(repoRoot, ".gemini", "commands");
106
+ fs.mkdirSync(dir, { recursive: true });
107
+ return [writeFile(path.join(dir, "git-impact.md"), templates_1.GEMINI_COMMAND)];
108
+ }
109
+ // ─── CLAUDE.md managed block ──────────────────────────────────────────────────
110
+ const BLOCK_START = "<!-- GIT-IMPACT START -->";
111
+ const BLOCK_END = "<!-- GIT-IMPACT END -->";
112
+ function updateClaudeMd(repoRoot) {
113
+ const claudeMdPath = path.join(repoRoot, "CLAUDE.md");
114
+ const block = `${BLOCK_START}\n${templates_1.CLAUDE_MD_BLOCK.trim()}\n${BLOCK_END}`;
115
+ if (!fs.existsSync(claudeMdPath)) {
116
+ fs.writeFileSync(claudeMdPath, `# Project\n\n${block}\n`);
117
+ return { path: claudeMdPath, action: "created" };
118
+ }
119
+ const existing = fs.readFileSync(claudeMdPath, "utf-8");
120
+ const startIdx = existing.indexOf(BLOCK_START);
121
+ const endIdx = existing.indexOf(BLOCK_END);
122
+ if (startIdx !== -1 && endIdx !== -1) {
123
+ // Replace existing block
124
+ const updated = existing.slice(0, startIdx) + block + existing.slice(endIdx + BLOCK_END.length);
125
+ fs.writeFileSync(claudeMdPath, updated);
126
+ return { path: claudeMdPath, action: "updated" };
127
+ }
128
+ // Append block
129
+ fs.writeFileSync(claudeMdPath, existing.trimEnd() + "\n\n" + block + "\n");
130
+ return { path: claudeMdPath, action: "updated" };
131
+ }
132
+ // ─── .gitignore ───────────────────────────────────────────────────────────────
133
+ const GITIGNORE_ENTRY = ".git-impact/history.db";
134
+ function ensureGitignore(repoRoot) {
135
+ const gitignorePath = path.join(repoRoot, ".gitignore");
136
+ const existing = fs.existsSync(gitignorePath)
137
+ ? fs.readFileSync(gitignorePath, "utf-8")
138
+ : "";
139
+ if (existing.includes(GITIGNORE_ENTRY)) {
140
+ return { path: gitignorePath, action: "skipped" };
141
+ }
142
+ fs.appendFileSync(gitignorePath, `\n# git-impact local history (private, per-machine)\n${GITIGNORE_ENTRY}\n`);
143
+ return { path: gitignorePath, action: "updated" };
144
+ }
145
+ // ─── Interactive prompt ───────────────────────────────────────────────────────
146
+ /**
147
+ * Run the interactive init wizard. Resolves with the answers.
148
+ * Designed to be called from the CLI `init` command.
149
+ */
150
+ async function runInitWizard(repoRoot) {
151
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
152
+ const ask = (q) => new Promise((res) => rl.question(q, (a) => res(a.trim())));
153
+ const existingContext = loadExistingContext(repoRoot);
154
+ console.log(`\n git-impact init\n ${"─".repeat(36)}\n`);
155
+ console.log(` Repo: ${repoRoot}`);
156
+ console.log(` Files will be committed with your team.\n`);
157
+ const companyDescription = await ask(` What does your company/product do? (1–2 sentences)\n` +
158
+ (existingContext?.companyDescription ? ` [current: ${existingContext.companyDescription}]\n` : "") +
159
+ ` > `);
160
+ const managerPriorities = await ask(`\n What does your manager care most about?\n` +
161
+ ` e.g. "Shipping on time, not breaking prod"\n` +
162
+ (existingContext?.managerPriorities ? ` [current: ${existingContext.managerPriorities}]\n` : "") +
163
+ ` > `);
164
+ const glossaryInput = await ask(`\n Technical terms to translate? (optional)\n` +
165
+ ` Format: "RLS=data security, MFA=login security"\n` +
166
+ (existingContext?.glossary && Object.keys(existingContext.glossary).length > 0
167
+ ? ` [current: ${Object.entries(existingContext.glossary).map(([k, v]) => `${k}=${v}`).join(", ")}]\n`
168
+ : "") +
169
+ ` > `);
170
+ const integrationsInput = await ask(`\n Which AI tools do you use? (comma-separated, or "all")\n` +
171
+ ` Options: claude, copilot, cursor, gemini\n` +
172
+ ` [default: claude]\n` +
173
+ ` > `);
174
+ rl.close();
175
+ // Parse glossary
176
+ const glossary = { ...(existingContext?.glossary ?? {}) };
177
+ if (glossaryInput) {
178
+ for (const pair of glossaryInput.split(",")) {
179
+ const [term, meaning] = pair.split("=").map((s) => s.trim());
180
+ if (term && meaning)
181
+ glossary[term] = meaning;
182
+ }
183
+ }
184
+ // Parse integrations
185
+ const ALL_INTEGRATIONS = ["claude", "copilot", "cursor", "gemini"];
186
+ let integrations;
187
+ const raw = integrationsInput.toLowerCase().trim();
188
+ if (!raw || raw === "all") {
189
+ integrations = ALL_INTEGRATIONS;
190
+ }
191
+ else {
192
+ integrations = raw
193
+ .split(",")
194
+ .map((s) => s.trim())
195
+ .filter((s) => ALL_INTEGRATIONS.includes(s));
196
+ if (integrations.length === 0)
197
+ integrations = ["claude"];
198
+ }
199
+ return {
200
+ context: {
201
+ companyDescription: companyDescription || existingContext?.companyDescription || "",
202
+ managerPriorities: managerPriorities || existingContext?.managerPriorities || "",
203
+ glossary,
204
+ },
205
+ integrations,
206
+ };
207
+ }
208
+ // ─── Helpers ──────────────────────────────────────────────────────────────────
209
+ function writeFile(filePath, content) {
210
+ const existed = fs.existsSync(filePath);
211
+ fs.writeFileSync(filePath, content, "utf-8");
212
+ return { path: filePath, action: existed ? "updated" : "created" };
213
+ }
214
+ function loadExistingContext(repoRoot) {
215
+ const contextPath = path.join(repoRoot, ".git-impact", "context.json");
216
+ if (!fs.existsSync(contextPath))
217
+ return null;
218
+ try {
219
+ return JSON.parse(fs.readFileSync(contextPath, "utf-8"));
220
+ }
221
+ catch {
222
+ return null;
223
+ }
224
+ }
225
+ //# sourceMappingURL=installer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installer.js","sourceRoot":"","sources":["../../src/init/installer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,0BAyCC;AAkGD,sCA4EC;AA9PD,uCAAyB;AACzB,2CAA6B;AAC7B,mDAAqC;AACrC,2CAOqB;AAwBrB;;;;GAIG;AACH,SAAgB,OAAO,CAAC,IAAoB;IAC1C,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,MAAM,SAAS,GAAoB,EAAE,CAAC;IAEtC,oDAAoD;IACpD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IACxD,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEhD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAC5D,SAAS,CAAC,IAAI,CACZ,SAAS,CAAC,WAAW,EAAE,IAAA,4BAAgB,EACrC,OAAO,CAAC,kBAAkB,EAC1B,OAAO,CAAC,iBAAiB,EACzB,OAAO,CAAC,QAAQ,CACjB,CAAC,CACH,CAAC;IAEF,uBAAuB;IACvB,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE1C,2BAA2B;IAC3B,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,SAAS,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED,qDAAqD;IACrD,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,QA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AAC;IACxC,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AACrE,CAAC;AAED,SAAS,mBAAmB,CAAC,QAAgB;IAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;IACvE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * All template content is embedded here as strings.
3
+ * This means the package works correctly after `npm install -g`
4
+ * without needing to locate template files on disk.
5
+ */
6
+ export declare const CLAUDE_SKILL = "---\nname: git-impact\ndescription: >\n Translates git commits into plain-English business impact \u2014 for standups,\n manager updates, and performance reviews. Use this skill whenever the user\n says: \"do my standup\", \"translate my commits\", \"what did I ship today/this\n week\", \"write my standup\", \"show my impact\", \"git-impact\", \"/git-impact\",\n \"generate a performance review\", \"what have I done this quarter\", or any\n request to turn technical git output into something a non-technical manager\n can understand.\n---\n\n# git-impact\n\nTranslate git commits into plain-English business impact without an API key.\nRead git data with bash, load the repo's context file, and write the translation\ninline.\n\n## Sub-commands\n\n| User says | Mode |\n|---|---|\n| `do my standup`, `today`, no args | **today** |\n| `since yesterday`, `since 3d`, `since 2026-05-01` | **since \\<when\\>** |\n| `review`, `last 30 days`, `Q2 review` | **review** |\n| `init`, `set up context` | **init** |\n\n## Step 1 \u2014 Find the repo root\n\n```bash\ngit rev-parse --show-toplevel 2>/dev/null\n```\n\nIf it fails: *\"No git repository found. Open a project folder first.\"* Stop.\n\n## Step 2 \u2014 Load context\n\n```bash\ncat \"$REPO_ROOT/.git-impact/context.json\" 2>/dev/null || echo \"NONE\"\n```\n\nApply the glossary (technical term \u2192 plain English) and frame impact around\nmanager priorities. If no context file exists, use general language and\nsuggest running init.\n\n## Mode: today / since \\<when\\>\n\nFetch commits:\n```bash\n# today\ngit -C \"$REPO_ROOT\" log \\\n --since=\"$(date '+%Y-%m-%d') 00:00:00\" \\\n --format=\"%h|%s|%b|%an|%ad\" --date=short HEAD\n\n# since Nd \u2192 --since=\"N days ago 00:00:00\"\n# since YYYY-MM-DD \u2192 --since=\"YYYY-MM-DD 00:00:00\"\n```\n\nFetch files changed:\n```bash\nFIRST=$(git -C \"$REPO_ROOT\" log --since=\"...\" --format=\"%h\" HEAD | tail -1)\ngit -C \"$REPO_ROOT\" diff --stat \"$FIRST\"^ HEAD 2>/dev/null\n```\n\n**Translation rules:**\n1. Each bullet = what was done + WHY it matters to the business. Never restate the commit message.\n2. Apply glossary \u2014 replace every technical term listed in context.json.\n3. If impact can't be inferred \u2192 \"technical foundation work for [area]\". Never hallucinate.\n4. Group related commits \u2014 4 auth commits = 1 bullet.\n5. WIP commits \u2192 \"\u23F3 In progress: [what] \u2192 [expected outcome]\"\n6. Be specific \u2014 use numbers from commit messages when they exist.\n\n**Output:**\n```\n\uD83D\uDCC5 [Day, Date]\n\n\u2705 [Plain-English summary]\n \u2192 [Business impact \u2014 who it unblocks, what risk it reduces]\n\n\u23F3 In progress: [what]\n \u2192 [Expected outcome]\n\n\uD83D\uDCC1 [N] files changed across [areas]\n [N] commit(s) on [branch]\n```\n\nSave to history after printing:\n```bash\nmkdir -p \"$REPO_ROOT/.git-impact\"\nsqlite3 \"$REPO_ROOT/.git-impact/history.db\" \"\n CREATE TABLE IF NOT EXISTS impact_entries (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n date TEXT NOT NULL, repo_name TEXT NOT NULL,\n total_commits INTEGER NOT NULL DEFAULT 0,\n total_files INTEGER NOT NULL DEFAULT 0,\n items_json TEXT NOT NULL DEFAULT '[]',\n created_at TEXT NOT NULL DEFAULT (datetime('now'))\n );\n INSERT INTO impact_entries (date, repo_name, total_commits, total_files, items_json)\n VALUES ('$(date +%Y-%m-%d)', '$(basename $REPO_ROOT)', $COMMITS, $FILES, '$JSON');\n\" 2>/dev/null || true\n```\n\n## Mode: review\n\nQuery history and synthesise a performance review:\n```bash\nsqlite3 \"$REPO_ROOT/.git-impact/history.db\" \\\n \"SELECT date, repo_name, total_commits, items_json\n FROM impact_entries WHERE date >= '$FROM' AND date <= '$TO'\n ORDER BY date ASC;\" 2>/dev/null\n```\n\nIf no history: *\"No saved history yet. Run the standup daily for a few weeks first.\"*\n\nFormat:\n```\nPerformance Review \u2014 [Period]\n[Headline sentence \u2014 biggest contribution]\n\n\uD83D\uDE80 [High-impact theme]\n \u2022 Specific achievement with numbers...\n\n\u2705 [Medium theme] ...\n\uD83D\uDD27 [Lower theme] ...\n\n\uD83D\uDCCA [N] commits across [N] working days\n```\n\n## Mode: init\n\nAsk one at a time:\n1. \"What does your company/product do? (1\u20132 sentences)\"\n2. \"What does your manager care most about?\"\n3. \"Technical terms to translate? e.g. RLS=data security (blank to skip)\"\n\nWrite `.git-impact/context.json` and confirm:\n*\"Saved. Commit context.json to share the glossary with your team.\"*\n\n## Tone\n\nNon-technical manager audience. Short sentences. No filler. Confident \u2014 if\nyou know the impact, state it. 2 accurate bullets > 5 vague ones.\n";
7
+ export declare const CLAUDE_MD_BLOCK = "\n## git-impact\n\nThis repo uses [git-impact](https://github.com/you/git-impact) for standup and\nperformance review generation.\n\n- Say **\"do my standup\"** to translate today's commits into business impact\n- Say **\"git-impact since 3d\"** to look back further\n- Say **\"generate a performance review\"** after a few weeks of standups\n- Say **\"set up context for this repo\"** to configure the glossary\n\nContext is stored in `.git-impact/context.json` (committed, team-shared).\nHistory is stored in `.git-impact/history.db` (gitignored, per-machine).\n";
8
+ export declare const COPILOT_INSTRUCTIONS = "# git-impact\n\nTranslate git commits into plain-English standup bullets when the user asks\nto \"do my standup\", \"translate my commits\", \"what did I ship today\", or\n\"generate a performance review\".\n\n## How to translate commits\n\n1. Run `git log --since=\"today 00:00:00\" --format=\"%h|%s|%b\" HEAD` to get commits\n2. Read `.git-impact/context.json` for glossary and company context\n3. Translate into 2\u20135 bullets following these rules:\n - What was done + WHY it matters (never restate commit messages)\n - Apply glossary terms from context.json\n - Group related commits into one bullet\n - WIP commits \u2192 \"\u23F3 In progress: [what] \u2192 [expected outcome]\"\n - If impact can't be inferred \u2192 \"technical foundation work for [area]\"\n\n## Output format\n\n```\n\uD83D\uDCC5 [Date]\n\u2705 [Summary] \u2192 [Business impact]\n\u23F3 In progress: [What] \u2192 [Expected outcome]\n\uD83D\uDCC1 [N] files changed across [areas]\n```\n\nFor performance reviews, query `.git-impact/history.db` and group by theme.\n";
9
+ export declare const CURSOR_RULES = "---\ndescription: git-impact standup and performance review generation\nglobs: []\nalwaysApply: false\n---\n\n# git-impact\n\nWhen the user asks to \"do my standup\", \"translate commits\", \"what did I ship\",\nor \"generate a performance review\":\n\n1. Find repo root: `git rev-parse --show-toplevel`\n2. Load context: `cat .git-impact/context.json`\n3. Fetch commits: `git log --since=\"today 00:00:00\" --format=\"%h|%s|%b\" HEAD`\n4. Translate into 2\u20135 plain-English bullets:\n - Apply glossary from context.json\n - Each bullet = what + why it matters (never restate commit messages)\n - Group related commits, flag WIP with \u23F3\n5. Format: \u2705 [summary] \u2192 [business impact]\n6. Save to `.git-impact/history.db` via sqlite3\n\nFor reviews: query history.db and group by theme (Features, Security, Reliability, etc.)\n";
10
+ export declare const GEMINI_COMMAND = "# git-impact\n\nTranslate git commits into plain-English standup bullets.\n\n## When to use\n\nUser says: \"do my standup\", \"translate my commits\", \"what did I ship today/this week\",\n\"generate a performance review\", or \"git-impact\".\n\n## Steps\n\n1. `git rev-parse --show-toplevel` \u2192 get repo root\n2. `cat .git-impact/context.json` \u2192 load glossary and company context\n3. `git log --since=\"today 00:00:00\" --format=\"%h|%s|%b\" HEAD` \u2192 get commits\n4. Translate into 2\u20135 bullets:\n - Apply glossary (replace technical terms with plain-English equivalents)\n - What was done + why it matters to the business\n - Group related commits\n - WIP commits: \u23F3 In progress: [what] \u2192 [expected outcome]\n5. End with: \uD83D\uDCC1 [N] files changed across [areas]\n6. Save to .git-impact/history.db\n\n## Context file format (.git-impact/context.json)\n\n```json\n{\n \"companyDescription\": \"...\",\n \"managerPriorities\": \"...\",\n \"glossary\": { \"TERM\": \"plain English meaning\" }\n}\n```\n";
11
+ export declare const CONTEXT_TEMPLATE: (companyDescription: string, managerPriorities: string, glossary: Record<string, string>) => string;
12
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,YAAY,0lJA+IxB,CAAC;AAIF,eAAO,MAAM,eAAe,yjBAa3B,CAAC;AAIF,eAAO,MAAM,oBAAoB,miCA2BhC,CAAC;AAIF,eAAO,MAAM,YAAY,m1BAsBxB,CAAC;AAIF,eAAO,MAAM,cAAc,yhCA+B1B,CAAC;AAIF,eAAO,MAAM,gBAAgB,GAC3B,oBAAoB,MAAM,EAC1B,mBAAmB,MAAM,EACzB,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC/B,MAKO,CAAC"}
@@ -0,0 +1,258 @@
1
+ "use strict";
2
+ /**
3
+ * All template content is embedded here as strings.
4
+ * This means the package works correctly after `npm install -g`
5
+ * without needing to locate template files on disk.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CONTEXT_TEMPLATE = exports.GEMINI_COMMAND = exports.CURSOR_RULES = exports.COPILOT_INSTRUCTIONS = exports.CLAUDE_MD_BLOCK = exports.CLAUDE_SKILL = void 0;
9
+ // ─── Claude Code skill ────────────────────────────────────────────────────────
10
+ exports.CLAUDE_SKILL = `---
11
+ name: git-impact
12
+ description: >
13
+ Translates git commits into plain-English business impact — for standups,
14
+ manager updates, and performance reviews. Use this skill whenever the user
15
+ says: "do my standup", "translate my commits", "what did I ship today/this
16
+ week", "write my standup", "show my impact", "git-impact", "/git-impact",
17
+ "generate a performance review", "what have I done this quarter", or any
18
+ request to turn technical git output into something a non-technical manager
19
+ can understand.
20
+ ---
21
+
22
+ # git-impact
23
+
24
+ Translate git commits into plain-English business impact without an API key.
25
+ Read git data with bash, load the repo's context file, and write the translation
26
+ inline.
27
+
28
+ ## Sub-commands
29
+
30
+ | User says | Mode |
31
+ |---|---|
32
+ | \`do my standup\`, \`today\`, no args | **today** |
33
+ | \`since yesterday\`, \`since 3d\`, \`since 2026-05-01\` | **since \\<when\\>** |
34
+ | \`review\`, \`last 30 days\`, \`Q2 review\` | **review** |
35
+ | \`init\`, \`set up context\` | **init** |
36
+
37
+ ## Step 1 — Find the repo root
38
+
39
+ \`\`\`bash
40
+ git rev-parse --show-toplevel 2>/dev/null
41
+ \`\`\`
42
+
43
+ If it fails: *"No git repository found. Open a project folder first."* Stop.
44
+
45
+ ## Step 2 — Load context
46
+
47
+ \`\`\`bash
48
+ cat "$REPO_ROOT/.git-impact/context.json" 2>/dev/null || echo "NONE"
49
+ \`\`\`
50
+
51
+ Apply the glossary (technical term → plain English) and frame impact around
52
+ manager priorities. If no context file exists, use general language and
53
+ suggest running init.
54
+
55
+ ## Mode: today / since \\<when\\>
56
+
57
+ Fetch commits:
58
+ \`\`\`bash
59
+ # today
60
+ git -C "$REPO_ROOT" log \\
61
+ --since="$(date '+%Y-%m-%d') 00:00:00" \\
62
+ --format="%h|%s|%b|%an|%ad" --date=short HEAD
63
+
64
+ # since Nd → --since="N days ago 00:00:00"
65
+ # since YYYY-MM-DD → --since="YYYY-MM-DD 00:00:00"
66
+ \`\`\`
67
+
68
+ Fetch files changed:
69
+ \`\`\`bash
70
+ FIRST=$(git -C "$REPO_ROOT" log --since="..." --format="%h" HEAD | tail -1)
71
+ git -C "$REPO_ROOT" diff --stat "$FIRST"^ HEAD 2>/dev/null
72
+ \`\`\`
73
+
74
+ **Translation rules:**
75
+ 1. Each bullet = what was done + WHY it matters to the business. Never restate the commit message.
76
+ 2. Apply glossary — replace every technical term listed in context.json.
77
+ 3. If impact can't be inferred → "technical foundation work for [area]". Never hallucinate.
78
+ 4. Group related commits — 4 auth commits = 1 bullet.
79
+ 5. WIP commits → "⏳ In progress: [what] → [expected outcome]"
80
+ 6. Be specific — use numbers from commit messages when they exist.
81
+
82
+ **Output:**
83
+ \`\`\`
84
+ 📅 [Day, Date]
85
+
86
+ ✅ [Plain-English summary]
87
+ → [Business impact — who it unblocks, what risk it reduces]
88
+
89
+ ⏳ In progress: [what]
90
+ → [Expected outcome]
91
+
92
+ 📁 [N] files changed across [areas]
93
+ [N] commit(s) on [branch]
94
+ \`\`\`
95
+
96
+ Save to history after printing:
97
+ \`\`\`bash
98
+ mkdir -p "$REPO_ROOT/.git-impact"
99
+ sqlite3 "$REPO_ROOT/.git-impact/history.db" "
100
+ CREATE TABLE IF NOT EXISTS impact_entries (
101
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
102
+ date TEXT NOT NULL, repo_name TEXT NOT NULL,
103
+ total_commits INTEGER NOT NULL DEFAULT 0,
104
+ total_files INTEGER NOT NULL DEFAULT 0,
105
+ items_json TEXT NOT NULL DEFAULT '[]',
106
+ created_at TEXT NOT NULL DEFAULT (datetime('now'))
107
+ );
108
+ INSERT INTO impact_entries (date, repo_name, total_commits, total_files, items_json)
109
+ VALUES ('$(date +%Y-%m-%d)', '$(basename $REPO_ROOT)', $COMMITS, $FILES, '$JSON');
110
+ " 2>/dev/null || true
111
+ \`\`\`
112
+
113
+ ## Mode: review
114
+
115
+ Query history and synthesise a performance review:
116
+ \`\`\`bash
117
+ sqlite3 "$REPO_ROOT/.git-impact/history.db" \\
118
+ "SELECT date, repo_name, total_commits, items_json
119
+ FROM impact_entries WHERE date >= '$FROM' AND date <= '$TO'
120
+ ORDER BY date ASC;" 2>/dev/null
121
+ \`\`\`
122
+
123
+ If no history: *"No saved history yet. Run the standup daily for a few weeks first."*
124
+
125
+ Format:
126
+ \`\`\`
127
+ Performance Review — [Period]
128
+ [Headline sentence — biggest contribution]
129
+
130
+ 🚀 [High-impact theme]
131
+ • Specific achievement with numbers...
132
+
133
+ ✅ [Medium theme] ...
134
+ 🔧 [Lower theme] ...
135
+
136
+ 📊 [N] commits across [N] working days
137
+ \`\`\`
138
+
139
+ ## Mode: init
140
+
141
+ Ask one at a time:
142
+ 1. "What does your company/product do? (1–2 sentences)"
143
+ 2. "What does your manager care most about?"
144
+ 3. "Technical terms to translate? e.g. RLS=data security (blank to skip)"
145
+
146
+ Write \`.git-impact/context.json\` and confirm:
147
+ *"Saved. Commit context.json to share the glossary with your team."*
148
+
149
+ ## Tone
150
+
151
+ Non-technical manager audience. Short sentences. No filler. Confident — if
152
+ you know the impact, state it. 2 accurate bullets > 5 vague ones.
153
+ `;
154
+ // ─── CLAUDE.md managed block ──────────────────────────────────────────────────
155
+ exports.CLAUDE_MD_BLOCK = `
156
+ ## git-impact
157
+
158
+ This repo uses [git-impact](https://github.com/you/git-impact) for standup and
159
+ performance review generation.
160
+
161
+ - Say **"do my standup"** to translate today's commits into business impact
162
+ - Say **"git-impact since 3d"** to look back further
163
+ - Say **"generate a performance review"** after a few weeks of standups
164
+ - Say **"set up context for this repo"** to configure the glossary
165
+
166
+ Context is stored in \`.git-impact/context.json\` (committed, team-shared).
167
+ History is stored in \`.git-impact/history.db\` (gitignored, per-machine).
168
+ `;
169
+ // ─── GitHub Copilot instructions ──────────────────────────────────────────────
170
+ exports.COPILOT_INSTRUCTIONS = `# git-impact
171
+
172
+ Translate git commits into plain-English standup bullets when the user asks
173
+ to "do my standup", "translate my commits", "what did I ship today", or
174
+ "generate a performance review".
175
+
176
+ ## How to translate commits
177
+
178
+ 1. Run \`git log --since="today 00:00:00" --format="%h|%s|%b" HEAD\` to get commits
179
+ 2. Read \`.git-impact/context.json\` for glossary and company context
180
+ 3. Translate into 2–5 bullets following these rules:
181
+ - What was done + WHY it matters (never restate commit messages)
182
+ - Apply glossary terms from context.json
183
+ - Group related commits into one bullet
184
+ - WIP commits → "⏳ In progress: [what] → [expected outcome]"
185
+ - If impact can't be inferred → "technical foundation work for [area]"
186
+
187
+ ## Output format
188
+
189
+ \`\`\`
190
+ 📅 [Date]
191
+ ✅ [Summary] → [Business impact]
192
+ ⏳ In progress: [What] → [Expected outcome]
193
+ 📁 [N] files changed across [areas]
194
+ \`\`\`
195
+
196
+ For performance reviews, query \`.git-impact/history.db\` and group by theme.
197
+ `;
198
+ // ─── Cursor rules ─────────────────────────────────────────────────────────────
199
+ exports.CURSOR_RULES = `---
200
+ description: git-impact standup and performance review generation
201
+ globs: []
202
+ alwaysApply: false
203
+ ---
204
+
205
+ # git-impact
206
+
207
+ When the user asks to "do my standup", "translate commits", "what did I ship",
208
+ or "generate a performance review":
209
+
210
+ 1. Find repo root: \`git rev-parse --show-toplevel\`
211
+ 2. Load context: \`cat .git-impact/context.json\`
212
+ 3. Fetch commits: \`git log --since="today 00:00:00" --format="%h|%s|%b" HEAD\`
213
+ 4. Translate into 2–5 plain-English bullets:
214
+ - Apply glossary from context.json
215
+ - Each bullet = what + why it matters (never restate commit messages)
216
+ - Group related commits, flag WIP with ⏳
217
+ 5. Format: ✅ [summary] → [business impact]
218
+ 6. Save to \`.git-impact/history.db\` via sqlite3
219
+
220
+ For reviews: query history.db and group by theme (Features, Security, Reliability, etc.)
221
+ `;
222
+ // ─── Gemini CLI commands ──────────────────────────────────────────────────────
223
+ exports.GEMINI_COMMAND = `# git-impact
224
+
225
+ Translate git commits into plain-English standup bullets.
226
+
227
+ ## When to use
228
+
229
+ User says: "do my standup", "translate my commits", "what did I ship today/this week",
230
+ "generate a performance review", or "git-impact".
231
+
232
+ ## Steps
233
+
234
+ 1. \`git rev-parse --show-toplevel\` → get repo root
235
+ 2. \`cat .git-impact/context.json\` → load glossary and company context
236
+ 3. \`git log --since="today 00:00:00" --format="%h|%s|%b" HEAD\` → get commits
237
+ 4. Translate into 2–5 bullets:
238
+ - Apply glossary (replace technical terms with plain-English equivalents)
239
+ - What was done + why it matters to the business
240
+ - Group related commits
241
+ - WIP commits: ⏳ In progress: [what] → [expected outcome]
242
+ 5. End with: 📁 [N] files changed across [areas]
243
+ 6. Save to .git-impact/history.db
244
+
245
+ ## Context file format (.git-impact/context.json)
246
+
247
+ \`\`\`json
248
+ {
249
+ "companyDescription": "...",
250
+ "managerPriorities": "...",
251
+ "glossary": { "TERM": "plain English meaning" }
252
+ }
253
+ \`\`\`
254
+ `;
255
+ // ─── context.json template ────────────────────────────────────────────────────
256
+ const CONTEXT_TEMPLATE = (companyDescription, managerPriorities, glossary) => JSON.stringify({ companyDescription, managerPriorities, glossary }, null, 2) + "\n";
257
+ exports.CONTEXT_TEMPLATE = CONTEXT_TEMPLATE;
258
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,iFAAiF;AAEpE,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+I3B,CAAC;AAEF,iFAAiF;AAEpE,QAAA,eAAe,GAAG;;;;;;;;;;;;;CAa9B,CAAC;AAEF,iFAAiF;AAEpE,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BnC,CAAC;AAEF,iFAAiF;AAEpE,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsB3B,CAAC;AAEF,iFAAiF;AAEpE,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B7B,CAAC;AAEF,iFAAiF;AAE1E,MAAM,gBAAgB,GAAG,CAC9B,kBAA0B,EAC1B,iBAAyB,EACzB,QAAgC,EACxB,EAAE,CACV,IAAI,CAAC,SAAS,CACZ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EACnD,IAAI,EACJ,CAAC,CACF,GAAG,IAAI,CAAC;AATE,QAAA,gBAAgB,oBASlB"}
@@ -0,0 +1,4 @@
1
+ import { Prompt, GetPromptResult } from "@modelcontextprotocol/sdk/types.js";
2
+ export declare const PROMPT_DEFINITIONS: Prompt[];
3
+ export declare function handleGetPrompt(name: string, args: Record<string, string> | undefined): Promise<GetPromptResult>;
4
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/mcp/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAU7E,eAAO,MAAM,kBAAkB,EAAE,MAAM,EA4BtC,CAAC;AAIF,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GACvC,OAAO,CAAC,eAAe,CAAC,CAM1B"}