pivotdude-git-ai 1.0.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.
@@ -0,0 +1,28 @@
1
+ Analyze the staged diff and produce:
2
+ 1) branch name following repo conventions
3
+ 2) commit message in Conventional Commits format
4
+ 3) PR description for reviewers
5
+
6
+ Response format (strict):
7
+ BRANCH: <type>/<slug>
8
+ COMMIT: <type>[scope]: description
9
+ <optional body with bullet points>
10
+ PR_DESC:
11
+ <markdown, structured for readability>
12
+
13
+ Rules:
14
+ - Branch: lowercase, hyphens, short
15
+ - Commit title: imperative mood, no trailing period, capitalize first word
16
+ - Commit body: bullet points with notable changes only
17
+
18
+ PR_DESC guidelines:
19
+ - Start with a 1-2 sentence summary of what this PR does
20
+ - For small changes (< 5 files): concise description is fine
21
+ - For medium/large changes (5+ files, migrations, new features): include relevant sections from:
22
+ - **Motivation** — what problem this solves and why it matters (connect to real scenarios, not just code mechanics)
23
+ - **Key changes** — what changed and why this approach was chosen
24
+ - **Impact** — affected modules, database, performance, or compatibility notes
25
+ - **Testing notes** — how to verify correctness, edge cases, manual checks needed
26
+ - **Breaking?** — only if the change requires migration or has backward-incompatible effects
27
+ - If the diff touches frontend files (apps/web/, .svelte, .css, .astro): include a **Screenshots** section — even if you don't have an actual screenshot, the placeholder tells the author what to add before merging
28
+ - Focus on reviewer comprehension: the goal is to make the reviewer understand context and decisions without reading every diff line
@@ -0,0 +1,13 @@
1
+ Analyze the staged diff and produce:
2
+ 1) branch name following repo conventions
3
+ 2) commit message in Conventional Commits format
4
+
5
+ Response format (strict):
6
+ BRANCH: <type>/<slug>
7
+ COMMIT: <type>[scope]: description
8
+ <optional body with bullet points>
9
+
10
+ Rules:
11
+ - Branch: lowercase, hyphens, short
12
+ - Commit title: imperative mood, no trailing period, capitalize first word
13
+ - Commit body: bullet points with notable changes only
@@ -0,0 +1,10 @@
1
+ Analyze the staged diff and produce a commit message.
2
+
3
+ Response format (strict):
4
+ COMMIT: <type>[scope]: description
5
+ <optional body with bullet points>
6
+
7
+ Rules:
8
+ - Conventional Commits format
9
+ - Commit title: imperative mood, no trailing period, capitalize first word
10
+ - Body: bullet points with notable changes only
@@ -0,0 +1,25 @@
1
+ Analyze all commits and file changes on the current branch compared to the base branch. Produce a PR title and description for reviewers.
2
+
3
+ The input includes the commit log and full diff for everything that would land in this PR.
4
+
5
+ Response format (strict):
6
+ PR_TITLE: <type>[scope]: description
7
+ PR_DESC:
8
+ <markdown, structured for readability>
9
+
10
+ Rules:
11
+ - Title: imperative mood, no trailing period, capitalize first word
12
+ - Title should reflect the full branch scope, not just the latest commit
13
+ - Use Conventional Commits style for the title when it fits the changes
14
+
15
+ PR_DESC guidelines:
16
+ - Start with a 1-2 sentence summary of what this PR does
17
+ - For small changes (< 5 files): concise description is fine
18
+ - For medium/large changes (5+ files, migrations, new features): include relevant sections from:
19
+ - **Motivation** — what problem this solves and why it matters (connect to real scenarios, not just code mechanics)
20
+ - **Key changes** — what changed and why this approach was chosen
21
+ - **Impact** — affected modules, database, performance, or compatibility notes
22
+ - **Testing notes** — how to verify correctness, edge cases, manual checks needed
23
+ - **Breaking?** — only if the change requires migration or has backward-incompatible effects
24
+ - If the diff touches frontend files (apps/web/, .svelte, .css, .astro): include a **Screenshots** section — even if you don't have an actual screenshot, the placeholder tells the author what to add before merging
25
+ - Focus on reviewer comprehension: the goal is to make the reviewer understand context and decisions without reading every diff line
@@ -0,0 +1,102 @@
1
+ # Git Conventions
2
+
3
+ This file defines the preferred branch naming and commit message format for this repository.
4
+
5
+ Use it for human work and agent-generated git output.
6
+
7
+ ## Branch Naming
8
+
9
+ Use lowercase, short, descriptive names.
10
+
11
+ Preferred format:
12
+
13
+ ```text
14
+ <type>/<short-kebab-slug>
15
+ ```
16
+
17
+ Examples:
18
+
19
+ - `feature/chart-toolbar`
20
+ - `bugfix/ws-reconnect`
21
+ - `refactor/backend-health-module`
22
+ - `docs/update-readme`
23
+ - `test/profile-page`
24
+ - `chore/deps-refresh`
25
+
26
+ ## Allowed Branch Types
27
+
28
+ - `feature` - new functionality
29
+ - `bugfix` - bug fixes
30
+ - `hotfix` - urgent production fix
31
+ - `docs` - documentation changes
32
+ - `refactor` - structural code changes without intended behavior change
33
+ - `test` - tests or test infrastructure
34
+ - `chore` - maintenance, tooling, or cleanup
35
+
36
+ ## Branch Rules
37
+
38
+ - use lowercase only;
39
+ - use hyphens inside the slug;
40
+ - keep names short and readable;
41
+ - avoid spaces, camelCase, snake_case, dots, and repeated hyphens.
42
+
43
+ ## Commit Format
44
+
45
+ Use Conventional Commit style:
46
+
47
+ ```text
48
+ <type>[<scope>]: <description>
49
+ ```
50
+
51
+ Examples:
52
+
53
+ - `feat(chart): add timeframe switcher`
54
+ - `fix(auth): handle expired session redirect`
55
+ - `docs(readme): update workspace guidance`
56
+ - `refactor(websocket): simplify subscription cleanup`
57
+
58
+ ## Allowed Commit Types
59
+
60
+ - `feat`
61
+ - `fix`
62
+ - `docs`
63
+ - `refactor`
64
+ - `test`
65
+ - `chore`
66
+ - `perf`
67
+ - `style`
68
+ - `build`
69
+ - `ci`
70
+
71
+ ## Commit Rules
72
+
73
+ - use imperative mood;
74
+ - capitalize the first word of the description;
75
+ - do not end the title with a period;
76
+ - keep the title concise;
77
+ - keep the scope short and meaningful when used.
78
+
79
+ ## Commit Body
80
+
81
+ If a body is needed, use flat markdown bullets:
82
+
83
+ ```text
84
+ <type>[<scope>]: <description>
85
+
86
+ - Change 1
87
+ - Change 2
88
+ - Change 3
89
+ ```
90
+
91
+ Use the body for:
92
+
93
+ - notable implementation details;
94
+ - affected areas;
95
+ - important migration or compatibility notes.
96
+
97
+ ## What To Avoid
98
+
99
+ - vague branch names like `fixes` or `update-stuff`
100
+ - commit titles without a type prefix
101
+ - long narrative paragraphs in commit bodies
102
+ - mixing unrelated changes in one commit
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "pivotdude-git-ai",
3
+ "version": "1.0.1",
4
+ "description": "AI-assisted git workflows: commit messages, branches, and pull requests",
5
+ "keywords": [
6
+ "git",
7
+ "ai",
8
+ "cli",
9
+ "commit",
10
+ "pull-request",
11
+ "conventional-commits"
12
+ ],
13
+ "type": "module",
14
+ "bin": {
15
+ "git-ai": "./bin/git-ai.js"
16
+ },
17
+ "files": [
18
+ "bin",
19
+ "dist",
20
+ "README.md",
21
+ "LICENSE",
22
+ "CHANGELOG.md",
23
+ "config.schema.json",
24
+ "project-config.example"
25
+ ],
26
+ "publishConfig": {
27
+ "access": "public",
28
+ "tag": "latest"
29
+ },
30
+ "repository": "github:pivotdude/git-ai",
31
+ "bugs": {
32
+ "url": "https://github.com/pivotdude/git-ai/issues"
33
+ },
34
+ "license": "MIT",
35
+ "scripts": {
36
+ "start": "bun run src/index.ts",
37
+ "check": "bunx tsc --noEmit",
38
+ "test": "bun test",
39
+ "lint:check": "eslint . --cache --cache-strategy content --cache-location .eslintcache",
40
+ "lint:fix": "eslint . --cache --cache-strategy content --cache-location .eslintcache --fix",
41
+ "fix": "bun run lint:fix",
42
+ "build": "bun build src/index.ts --outdir dist --target bun && bun run build:assets",
43
+ "build:assets": "mkdir -p dist/prompts && cp -r src/prompts/. dist/prompts/ && cp src/clients/cursor-sdk-runner.mjs dist/cursor-sdk-runner.mjs",
44
+ "prepublishOnly": "bun run build",
45
+ "verify": "bun run check && bun run test && bun run build",
46
+ "validate:local-release": "bash scripts/validate-local-release.sh",
47
+ "audit:private-artifacts": "bash scripts/audit-private-artifacts.sh"
48
+ },
49
+ "dependencies": {
50
+ "@connectrpc/connect-node": "^1.6.1",
51
+ "@cursor/sdk": "^1.0.19",
52
+ "ignore": "^7.0.5"
53
+ },
54
+ "devDependencies": {
55
+ "@eslint/js": "^10.0.1",
56
+ "@types/bun": "^1.3.14",
57
+ "eslint": "^10.6.0",
58
+ "eslint-config-prettier": "^10.1.8",
59
+ "globals": "^17.7.0",
60
+ "typescript": "5.9.3",
61
+ "typescript-eslint": "^8.62.1"
62
+ },
63
+ "engines": {
64
+ "bun": ">=1.3.0",
65
+ "node": ">=22"
66
+ }
67
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "../config.schema.json",
3
+ "baseBranch": "main",
4
+ "prTemplate": ".github/PULL_REQUEST_TEMPLATE.md",
5
+ "stagedFix": {
6
+ "rules": [
7
+ {
8
+ "paths": ["src/**"],
9
+ "command": "npm run lint:fix"
10
+ }
11
+ ],
12
+ "root": null
13
+ }
14
+ }
@@ -0,0 +1,10 @@
1
+ # .gitignore-style patterns omitted from AI diff prompts.
2
+ # Merged with built-in lockfile defaults.
3
+
4
+ bun.lock
5
+ package-lock.json
6
+ yarn.lock
7
+ pnpm-lock.yaml
8
+
9
+ # Generated assets
10
+ # dist/**
@@ -0,0 +1,14 @@
1
+ Analyze the staged diff and produce a commit message.
2
+
3
+ Follow the git conventions section below.
4
+
5
+ Output format (plain text, no markdown fences):
6
+
7
+ ```
8
+ <type>[<scope>]: <Title>
9
+
10
+ - Bullet 1
11
+ - Bullet 2
12
+ ```
13
+
14
+ Return only the commit message block.