git-impact 0.2.0 → 0.2.1
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/dist/cli/index.js
CHANGED
|
@@ -49,7 +49,7 @@ const program = new commander_1.Command();
|
|
|
49
49
|
program
|
|
50
50
|
.name("git-impact")
|
|
51
51
|
.description("Translate git commits into plain-English business impact")
|
|
52
|
-
.version("0.2.
|
|
52
|
+
.version("0.2.1");
|
|
53
53
|
// ─── today ────────────────────────────────────────────────────────────────────
|
|
54
54
|
program
|
|
55
55
|
.command("today")
|
package/dist/init/templates.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* This means the package works correctly after `npm install -g`
|
|
4
4
|
* without needing to locate template files on disk.
|
|
5
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\
|
|
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## Step 4 \u2014 Generate the HTML report (REQUIRED, run this)\n\nThis step is mandatory, not optional. After saving to history, you **must\nactually execute** the following bash command \u2014 do not just describe it.\nWithout this step, the file:// link you print will 404.\n\n```bash\ncd \"$REPO_ROOT\" && npx --yes git-impact@latest view --no-open --date \"$(date +%Y-%m-%d)\"\n```\n\nThis uses npx, so the user does **not** need to have `git-impact` installed\nlocally. If the command errors, surface the error to the user \u2014 don't swallow\nit. If it succeeds, `.git-impact/result.html` will exist.\n\nThen, and only then, print the link as the very last line of your response:\n\n```\n\uD83D\uDD17 file://$REPO_ROOT/.git-impact/result.html?date=$(date +%Y-%m-%d)\n```\n\nIf the npx command failed, instead print:\n```\n\u26A0\uFE0F HTML report could not be generated: <paste the error message>\n Run `npx git-impact@latest view` from the repo to retry.\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
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
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
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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,YAAY,wiLAyKxB,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"}
|
package/dist/init/templates.js
CHANGED
|
@@ -110,16 +110,32 @@ sqlite3 "$REPO_ROOT/.git-impact/history.db" "
|
|
|
110
110
|
" 2>/dev/null || true
|
|
111
111
|
\`\`\`
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
## Step 4 — Generate the HTML report (REQUIRED, run this)
|
|
114
|
+
|
|
115
|
+
This step is mandatory, not optional. After saving to history, you **must
|
|
116
|
+
actually execute** the following bash command — do not just describe it.
|
|
117
|
+
Without this step, the file:// link you print will 404.
|
|
118
|
+
|
|
114
119
|
\`\`\`bash
|
|
115
|
-
cd "$REPO_ROOT" && npx
|
|
120
|
+
cd "$REPO_ROOT" && npx --yes git-impact@latest view --no-open --date "$(date +%Y-%m-%d)"
|
|
116
121
|
\`\`\`
|
|
117
122
|
|
|
118
|
-
|
|
123
|
+
This uses npx, so the user does **not** need to have \`git-impact\` installed
|
|
124
|
+
locally. If the command errors, surface the error to the user — don't swallow
|
|
125
|
+
it. If it succeeds, \`.git-impact/result.html\` will exist.
|
|
126
|
+
|
|
127
|
+
Then, and only then, print the link as the very last line of your response:
|
|
128
|
+
|
|
119
129
|
\`\`\`
|
|
120
130
|
🔗 file://$REPO_ROOT/.git-impact/result.html?date=$(date +%Y-%m-%d)
|
|
121
131
|
\`\`\`
|
|
122
132
|
|
|
133
|
+
If the npx command failed, instead print:
|
|
134
|
+
\`\`\`
|
|
135
|
+
⚠️ HTML report could not be generated: <paste the error message>
|
|
136
|
+
Run \`npx git-impact@latest view\` from the repo to retry.
|
|
137
|
+
\`\`\`
|
|
138
|
+
|
|
123
139
|
## Mode: review
|
|
124
140
|
|
|
125
141
|
Query history and synthesise a performance review:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,iFAAiF;AAEpE,QAAA,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/init/templates.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,iFAAiF;AAEpE,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyK3B,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"}
|