ai-release-notes 0.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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +261 -0
  3. package/dist/bin/cli.d.ts +6 -0
  4. package/dist/bin/cli.d.ts.map +1 -0
  5. package/dist/bin/cli.js +723 -0
  6. package/dist/bin/cli.js.map +1 -0
  7. package/dist/config.d.ts +23 -0
  8. package/dist/config.d.ts.map +1 -0
  9. package/dist/config.js +176 -0
  10. package/dist/config.js.map +1 -0
  11. package/dist/context.d.ts +11 -0
  12. package/dist/context.d.ts.map +1 -0
  13. package/dist/context.js +58 -0
  14. package/dist/context.js.map +1 -0
  15. package/dist/generator.d.ts +21 -0
  16. package/dist/generator.d.ts.map +1 -0
  17. package/dist/generator.js +258 -0
  18. package/dist/generator.js.map +1 -0
  19. package/dist/git.d.ts +28 -0
  20. package/dist/git.d.ts.map +1 -0
  21. package/dist/git.js +116 -0
  22. package/dist/git.js.map +1 -0
  23. package/dist/index.d.ts +15 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +36 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/llm.d.ts +23 -0
  28. package/dist/llm.d.ts.map +1 -0
  29. package/dist/llm.js +105 -0
  30. package/dist/llm.js.map +1 -0
  31. package/dist/output-index.d.ts +13 -0
  32. package/dist/output-index.d.ts.map +1 -0
  33. package/dist/output-index.js +53 -0
  34. package/dist/output-index.js.map +1 -0
  35. package/dist/prompts/builder.d.ts +26 -0
  36. package/dist/prompts/builder.d.ts.map +1 -0
  37. package/dist/prompts/builder.js +82 -0
  38. package/dist/prompts/builder.js.map +1 -0
  39. package/dist/prompts/translation-system.md +8 -0
  40. package/dist/release.d.ts +37 -0
  41. package/dist/release.d.ts.map +1 -0
  42. package/dist/release.js +288 -0
  43. package/dist/release.js.map +1 -0
  44. package/dist/types.d.ts +224 -0
  45. package/dist/types.d.ts.map +1 -0
  46. package/dist/types.js +78 -0
  47. package/dist/types.js.map +1 -0
  48. package/dist/version.d.ts +3 -0
  49. package/dist/version.d.ts.map +1 -0
  50. package/dist/version.js +10 -0
  51. package/dist/version.js.map +1 -0
  52. package/package.json +63 -0
  53. package/prompts/release-notes-instructions.md +21 -0
  54. package/prompts/release-notes-system.md +7 -0
  55. package/prompts/release-notes-translation-system.md +20 -0
  56. package/templates/default-release-note.html +133 -0
  57. package/templates/default-release-note.md +8 -0
  58. package/templates/default-release-summary.html +126 -0
  59. package/templates/default-release-summary.md +11 -0
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "ai-release-notes",
3
+ "version": "0.0.1",
4
+ "description": "Generic AI-powered release notes generator using Vercel AI SDK",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "ai-release-notes": "dist/bin/cli.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "templates",
13
+ "prompts",
14
+ "README.md"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc",
18
+ "dev": "tsx src/bin/cli.ts",
19
+ "lint": "tsc --noEmit",
20
+ "test": "tsx --test test/*.test.ts",
21
+ "prepare": "husky",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "keywords": [
25
+ "release-notes",
26
+ "changelog",
27
+ "ai",
28
+ "llm",
29
+ "git",
30
+ "vercel-ai-sdk",
31
+ "cli"
32
+ ],
33
+ "author": "",
34
+ "license": "MIT",
35
+ "engines": {
36
+ "node": ">=22.0.0"
37
+ },
38
+ "dependencies": {
39
+ "@ai-sdk/anthropic": "^4.0.17",
40
+ "@ai-sdk/google": "^4.0.20",
41
+ "@ai-sdk/mistral": "^4.0.14",
42
+ "@ai-sdk/openai": "^4.0.17",
43
+ "ai": "^7.0.33",
44
+ "chalk": "^5.3.0",
45
+ "clipboardy": "^5.3.1",
46
+ "commander": "^15.0.0",
47
+ "ora": "^9.4.1",
48
+ "simple-git": "^3.25.0",
49
+ "yaml": "^2.4.0",
50
+ "zod": "^4.4.3"
51
+ },
52
+ "devDependencies": {
53
+ "@commitlint/cli": "^21.2.1",
54
+ "@commitlint/config-conventional": "^21.2.0",
55
+ "@types/node": "^26.1.1",
56
+ "husky": "^9.1.7",
57
+ "tsx": "^4.15.0",
58
+ "typescript": "^7.0.2"
59
+ },
60
+ "peerDependencies": {
61
+ "ai": "^7.0.33"
62
+ }
63
+ }
@@ -0,0 +1,21 @@
1
+ ## Rules
2
+
3
+ - Do NOT mention commit hashes.
4
+ - Do NOT mention internal ticket IDs.
5
+ - Keep sentences concise.
6
+ - Group by domain.
7
+ - Preserve chronological order.
8
+ - Never create fake features.
9
+ - Treat terms enclosed in double quotes in the changelog or context as protected
10
+ vocabulary: copy them exactly and never translate, normalize, or alter them.
11
+ - If a release contains only fixes, do not create a features section.
12
+ - Use bullet points.
13
+
14
+ ## Output structure
15
+
16
+ Use only sections that fit the release.
17
+
18
+ - 🚀 New Features
19
+ - ✨ Improvements
20
+ - 🐛 Bug Fixes
21
+ - ⚙️ Technical
@@ -0,0 +1,7 @@
1
+ You are a release notes writer.
2
+
3
+ Your goal: Transform technical changelog entries into clean, business-readable release notes.
4
+
5
+ Language: {{language}}
6
+
7
+ {{instructions}}
@@ -0,0 +1,20 @@
1
+ You are a precise release-notes translator.
2
+
3
+ Translate the supplied release notes into {{language}}. Do not regenerate the
4
+ notes from the changelog.
5
+
6
+ Preserve every fact, version, heading, list, emoji, Markdown structure, and
7
+ level of detail. Do not add or remove content.
8
+
9
+ Apply instructions only to preserve terminology, product names, tone, and
10
+ disclosure rules. If an instruction asks to regroup, rewrite, add, remove, or
11
+ reorganize content, do not do that during translation: the supplied release
12
+ note is the authoritative source.
13
+
14
+ Copy product vocabulary exactly as written. Any vocabulary enclosed in double
15
+ quotes in the supplied release note is protected vocabulary: copy it
16
+ character-for-character and never translate, normalize, or alter it.
17
+
18
+ ## Project instructions
19
+
20
+ {{instructions}}
@@ -0,0 +1,133 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="color-scheme" content="light dark">
7
+ <title>{{title}}</title>
8
+ <style>
9
+ :root {
10
+ color-scheme: light dark;
11
+ --page: #fff;
12
+ --text: #202124;
13
+ --muted: #5f6368;
14
+ --line: #d9dde3;
15
+ --link: #1558d6;
16
+ --code: #f6f7f8;
17
+ }
18
+
19
+ @media (prefers-color-scheme: dark) {
20
+ :root {
21
+ --page: #181a1b;
22
+ --text: #e8eaed;
23
+ --muted: #b8bec5;
24
+ --line: #3c4043;
25
+ --link: #8ab4f8;
26
+ --code: #242729;
27
+ }
28
+ }
29
+
30
+ body {
31
+ max-width: 54rem;
32
+ margin: 0 auto;
33
+ padding: 3rem 1.5rem;
34
+ background: var(--page);
35
+ color: var(--text);
36
+ font: 1rem/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
37
+ }
38
+
39
+ h1, h2, h3, h4, h5, h6 {
40
+ line-height: 1.25;
41
+ }
42
+
43
+ h1 {
44
+ margin: 0;
45
+ font-size: 2rem;
46
+ }
47
+
48
+ h2 {
49
+ margin-top: 2rem;
50
+ font-size: 1.35rem;
51
+ }
52
+
53
+ h3 {
54
+ margin-top: 1.5rem;
55
+ font-size: 1.1rem;
56
+ }
57
+
58
+ h4 {
59
+ margin-top: 1.25rem;
60
+ font-size: 1rem;
61
+ }
62
+
63
+ h5, h6 {
64
+ margin-top: 1rem;
65
+ font-size: 0.95rem;
66
+ }
67
+
68
+ .meta {
69
+ margin: 0.5rem 0 0;
70
+ color: var(--muted);
71
+ }
72
+
73
+ ul, ol {
74
+ padding-left: 1.35rem;
75
+ }
76
+
77
+ li + li {
78
+ margin-top: 0.35rem;
79
+ }
80
+
81
+ a {
82
+ color: var(--link);
83
+ text-underline-offset: 0.16em;
84
+ }
85
+
86
+ blockquote {
87
+ margin: 1.25rem 0;
88
+ padding-left: 1rem;
89
+ border-left: 3px solid var(--line);
90
+ color: var(--muted);
91
+ }
92
+
93
+ code {
94
+ padding: 0.12em 0.35em;
95
+ border-radius: 0.3rem;
96
+ background: var(--code);
97
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
98
+ font-size: 0.9em;
99
+ }
100
+
101
+ pre {
102
+ padding: 1rem;
103
+ overflow-x: auto;
104
+ border: 1px solid var(--line);
105
+ border-radius: 0.6rem;
106
+ background: var(--code);
107
+ }
108
+
109
+ pre code {
110
+ padding: 0;
111
+ background: none;
112
+ }
113
+
114
+ footer {
115
+ margin-top: 2.5rem;
116
+ padding-top: 1rem;
117
+ border-top: 1px solid var(--line);
118
+ color: var(--muted);
119
+ font-size: 0.875rem;
120
+ }
121
+ </style>
122
+ </head>
123
+ <body>
124
+ <article>
125
+ <main>
126
+ {{content}}
127
+ </main>
128
+ <footer>
129
+ Generated with <a href="https://github.com/tabkram/ai-release-notes">tabkram/ai-release-notes</a> v{{version}}
130
+ </footer>
131
+ </article>
132
+ </body>
133
+ </html>
@@ -0,0 +1,8 @@
1
+ {{projectName}} – Release Notes {{environment}} ({{fromVersion}} → {{toVersion}})
2
+
3
+ Version {{cleanVersion}} – {{date}}
4
+
5
+ {{content}}
6
+
7
+ ---
8
+ _Generated with [tabkram/ai-release-notes](https://github.com/tabkram/ai-release-notes) v{{version}}._
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="color-scheme" content="light dark">
7
+ <title>{{projectName}} release notes</title>
8
+ <style>
9
+ :root {
10
+ color-scheme: light dark;
11
+ --page: #fff;
12
+ --surface: #f6f7f8;
13
+ --text: #202124;
14
+ --muted: #5f6368;
15
+ --line: #d9dde3;
16
+ --link: #1558d6;
17
+ }
18
+
19
+ @media (prefers-color-scheme: dark) {
20
+ :root {
21
+ --page: #181a1b;
22
+ --surface: #242729;
23
+ --text: #e8eaed;
24
+ --muted: #b8bec5;
25
+ --line: #3c4043;
26
+ --link: #8ab4f8;
27
+ }
28
+ }
29
+
30
+ body {
31
+ max-width: 54rem;
32
+ margin: 0 auto;
33
+ padding: 3rem 1.5rem;
34
+ background: var(--page);
35
+ color: var(--text);
36
+ font: 1rem/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
37
+ }
38
+
39
+ h1, h2 {
40
+ line-height: 1.25;
41
+ }
42
+
43
+ h1 {
44
+ margin: 0 0 0.5rem;
45
+ font-size: 2rem;
46
+ }
47
+
48
+ .intro, .release-meta, footer {
49
+ color: var(--muted);
50
+ }
51
+
52
+ .language-switcher {
53
+ display: flex;
54
+ flex-wrap: wrap;
55
+ gap: 0.5rem;
56
+ margin: 1.25rem 0 2rem;
57
+ }
58
+
59
+ .language-option {
60
+ padding: 0.3rem 0.7rem;
61
+ border: 1px solid var(--line);
62
+ border-radius: 999px;
63
+ color: var(--link);
64
+ font-size: 0.875rem;
65
+ font-weight: 700;
66
+ line-height: 1.2;
67
+ text-decoration: none;
68
+ }
69
+
70
+ .language-option.is-active {
71
+ border-color: var(--text);
72
+ background: var(--text);
73
+ color: var(--page);
74
+ }
75
+
76
+ .release-entry {
77
+ margin: 1.25rem 0;
78
+ padding: 1.35rem 1.5rem;
79
+ border: 1px solid var(--line);
80
+ border-radius: 0.75rem;
81
+ background: var(--surface);
82
+ }
83
+
84
+ .release-entry h2 {
85
+ margin: 0;
86
+ font-size: 1.2rem;
87
+ }
88
+
89
+ .release-meta {
90
+ margin: 0.45rem 0 1rem;
91
+ font-size: 0.925rem;
92
+ }
93
+
94
+ .release-link {
95
+ margin: 0;
96
+ font-weight: 600;
97
+ }
98
+
99
+ a {
100
+ color: var(--link);
101
+ text-underline-offset: 0.16em;
102
+ }
103
+
104
+ footer {
105
+ margin-top: 2.5rem;
106
+ padding-top: 1rem;
107
+ border-top: 1px solid var(--line);
108
+ font-size: 0.875rem;
109
+ }
110
+ </style>
111
+ </head>
112
+ <body>
113
+ <main>
114
+ <h1>{{projectName}} release notes</h1>
115
+ <p class="intro">A concise release history for {{environment}}. The newest release is listed first.</p>
116
+
117
+ {{languages}}
118
+
119
+ <!-- ai-release-notes:releases -->
120
+ {{releases}}
121
+ </main>
122
+ <footer>
123
+ Generated with <a href="https://github.com/tabkram/ai-release-notes">tabkram/ai-release-notes</a> v{{version}}
124
+ </footer>
125
+ </body>
126
+ </html>
@@ -0,0 +1,11 @@
1
+ # {{projectName}} release notes
2
+
3
+ A concise release history for {{environment}}. The newest release is listed first.
4
+
5
+ {{languages}}
6
+
7
+ <!-- ai-release-notes:releases -->
8
+ {{releases}}
9
+
10
+ ---
11
+ _Generated with [tabkram/ai-release-notes](https://github.com/tabkram/ai-release-notes) v{{version}}._