Skip to content

Commit 5a4383b

Browse files
authored
feat: add git-cliff changelog generation
Add git-cliff as the changelog generation tool for mcp-clj, integrating it with the existing semantic commit workflow and release process. Configuration: - cliff.toml with conventional commits support - Parse conventional commit types (feat, fix, chore, docs, test, refactor, perf, ci, build, style) - Group commits by type in changelog sections - Filter out local-integration-branch merges and release commits - GitHub remote configured for automatic issue/PR linking Baseline Tag: - Created v0.1.0 tag on first semantic commit (39f31f8) - Establishes starting point for all future changelog generation - Enables version-based changelog segmentation Generated Changelog: - CHANGELOG.md initialized with complete history from v0.1.0 - Unreleased section shows commits since last tag - GitHub commit links for traceability - Commits grouped by type (Features, Bug Fixes, Chores, etc.) Documentation: - README.md: Added Changelog section with local usage instructions - doc/release.md: Complete release workflow documentation including version calculation strategy, git tag requirements, step-by-step release process, and troubleshooting guide Version Workflow: Git tags are required for git-cliff to segment changelog by version. Release process documented in doc/release.md includes changelog generation, tag creation, JAR building, and GitHub Release creation.
1 parent ddc1773 commit 5a4383b

File tree

5 files changed

+527
-2
lines changed

5 files changed

+527
-2
lines changed

CHANGELOG.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [unreleased]
9+
10+
### Bug Fixes
11+
12+
- Adapter tests ([38ea17f](https://github.com/hugoduncan/mcp-clj/commit/38ea17f24421a21e6a1b79a10e255f571e934586))
13+
14+
- New http-client component broke json-rpc (#11) ([9e243b8](https://github.com/hugoduncan/mcp-clj/commit/9e243b80b7ca9b821699537ff22a87d5ca22ae89))
15+
16+
17+
### Build System
18+
19+
- Add GitHub Actions workflow for testing (#10) ([2d18ded](https://github.com/hugoduncan/mcp-clj/commit/2d18deda32c579579638e2c8073b7d21c7850931))
20+
21+
22+
### Chores
23+
24+
- Change json-rpc top level namespace to mcp-clj ([9269fee](https://github.com/hugoduncan/mcp-clj/commit/9269fee29a8512dc97284dc4c9cc62d235393803))
25+
26+
- Add namespace documentation ([9500d6c](https://github.com/hugoduncan/mcp-clj/commit/9500d6c73b10c2dab45b2b035b6531cfcaec5846))
27+
28+
- Improve implementation encapsulation ([102a63e](https://github.com/hugoduncan/mcp-clj/commit/102a63ec07c9d61da28e93231dcb3d726a77eb6f))
29+
30+
- Rename to http-server.adapter ([0fc6bb0](https://github.com/hugoduncan/mcp-clj/commit/0fc6bb09c2ab1a22d9c845cb94c94d6a3125cf55))
31+
32+
- Remove ring dependencies ([3878617](https://github.com/hugoduncan/mcp-clj/commit/3878617c55480d1dde1274e6644632a076609c4e))
33+
34+
- Improve HTTP server adapter test coverage ([4b0b0c5](https://github.com/hugoduncan/mcp-clj/commit/4b0b0c5e4eaea0b047e9f10ca4a11afa17575672))
35+
36+
- Improve JSON-RPC server adapter test coverage ([414de3e](https://github.com/hugoduncan/mcp-clj/commit/414de3e5df3164e31fd873cb49f78e087de1f417))
37+
38+
- Improve server tests ([a4d94af](https://github.com/hugoduncan/mcp-clj/commit/a4d94afa27409133455d89b486d5567da35f4584))
39+
40+
- Add README.md ([e92ba82](https://github.com/hugoduncan/mcp-clj/commit/e92ba825010fb809f43ed7bc8dccc2ac398f00b9))
41+
42+
- Add server project ([edd3c34](https://github.com/hugoduncan/mcp-clj/commit/edd3c34f14add286fee8f716f339da21c2d0ce80))
43+
44+
- Add server project ([4967c42](https://github.com/hugoduncan/mcp-clj/commit/4967c42601b572a68f72e43ed12911b221df70d8))
45+
46+
- Remove extraneous files (#6) ([2e9c213](https://github.com/hugoduncan/mcp-clj/commit/2e9c213ee5fb323aefe427f911a8caea2df2e18d))
47+
48+
- Update cljstyle to format edn (#7) ([7a16f77](https://github.com/hugoduncan/mcp-clj/commit/7a16f77dc02334d8b5d18db09d05c4734cd6d26b))
49+
50+
- Remove reflection (#13) ([9a20cf3](https://github.com/hugoduncan/mcp-clj/commit/9a20cf38ffa382780a791eddd8105ce03e542aa8))
51+
52+
- Update CLAUDE.md (#15) ([72983c7](https://github.com/hugoduncan/mcp-clj/commit/72983c739be4456b7efc69b04c801f822435a7ec))
53+
54+
- Add MCP protocol specification as git submodule (#19) ([9ddd8aa](https://github.com/hugoduncan/mcp-clj/commit/9ddd8aaca96bef73032e09e3832438f4a02a91df))
55+
56+
57+
### Features
58+
59+
- Add server implementation ([c696c8b](https://github.com/hugoduncan/mcp-clj/commit/c696c8b818b6c3422391694b0ff32c5abbeae82b))
60+
61+
- Add mcp-server ([303a7a1](https://github.com/hugoduncan/mcp-clj/commit/303a7a1c9fe487924a9c7ae3ef068adeb65dd72c))
62+
63+
- Add Java HTTP ring adapter ([6f3038d](https://github.com/hugoduncan/mcp-clj/commit/6f3038d6a4dede783284238ce41f279c502324ff))
64+
65+
- Make json-rpc server use SSE ([3b09462](https://github.com/hugoduncan/mcp-clj/commit/3b09462cab4280c0512d2d6732cdb3fbfb1a7258))
66+
67+
- Working with initialisation over /messages ([3369f2b](https://github.com/hugoduncan/mcp-clj/commit/3369f2b82647bc29d687f30b5b606f714534c39a))
68+
69+
- Basic tools support ([640e657](https://github.com/hugoduncan/mcp-clj/commit/640e6570e7be2148809f3c972e57189e207497f9))
70+
71+
- Add basic resources and prompts support ([0233627](https://github.com/hugoduncan/mcp-clj/commit/0233627c51f0361445f36b84f750fdde56cbf35d))
72+
73+
- Add dynamic tool management ([563f8dd](https://github.com/hugoduncan/mcp-clj/commit/563f8dd0df174bdf9480f6abb0732198f5505776))
74+
75+
- Add tool change notifications ([435e1f4](https://github.com/hugoduncan/mcp-clj/commit/435e1f4ebfb1107ba4090bfe39bfab8fbd3058db))
76+
77+
- Improve clj-eval tool to show output and stack traces ([03e1f47](https://github.com/hugoduncan/mcp-clj/commit/03e1f4769b3e0491b84de5eecc70d392e7536dc0))
78+
79+
- Improve clj-eval tool to show output and stack traces ([9c847c7](https://github.com/hugoduncan/mcp-clj/commit/9c847c7d0b099094d23e65bd9738ecad544949fd))
80+
81+
- Add prompts support to MCP server ([dd868dc](https://github.com/hugoduncan/mcp-clj/commit/dd868dcfc6ac9ee1c915665a454dc74fec4fd4bf))
82+
83+
- Implement resource support ([239e7da](https://github.com/hugoduncan/mcp-clj/commit/239e7da40e8d7eca2053da6748080e0fb7674640))
84+
85+
- Add client-side prompts support (#16) ([caaa58e](https://github.com/hugoduncan/mcp-clj/commit/caaa58e59df27992d87b487559ced8dbaa1155d3))
86+
87+
- Add mcp-client support for resources (#17) ([1b2588b](https://github.com/hugoduncan/mcp-clj/commit/1b2588b2cc6fb14ff7fa408d43cdd100c8d0e38e))
88+
89+
- Add MCP capability negotiation compliance (#18) ([77ca1a2](https://github.com/hugoduncan/mcp-clj/commit/77ca1a2df2c9d261a127272417e92e0728b528fd))
90+
91+
- Add subscription support and compliance tests (#20) ([8dd2533](https://github.com/hugoduncan/mcp-clj/commit/8dd2533fd5fc5e4ed4dd0169fbc06fadb3c38f60))
92+
93+
- Add MCP logging utility support ([c60d2a1](https://github.com/hugoduncan/mcp-clj/commit/c60d2a14586bb4a4d71d4a90e37a06e273b1093f))
94+
95+
- Add CI reflection warning check ([84914ab](https://github.com/hugoduncan/mcp-clj/commit/84914abc4233db18d2002e7d1909b1a9a061a4a1))
96+
97+
- Add build infrastructure for JAR generation ([57408e8](https://github.com/hugoduncan/mcp-clj/commit/57408e8d13c78f7f696becfc59d84073227105f5))
98+
99+
100+
### Refactoring
101+
102+
- Extract versions into shared component (#12) ([e22160a](https://github.com/hugoduncan/mcp-clj/commit/e22160a39e13b328268b105fa89c49e6c1df61b7))
103+
104+
- Merge json-rpc protocol namespaces (#14) ([5173393](https://github.com/hugoduncan/mcp-clj/commit/5173393fe292c028ab33085ecaebd0440be91c31))
105+
106+
107+
## [0.1.0] - 2025-01-05
108+
109+
### Features
110+
111+
- Add initial json-rpc server ([39f31f8](https://github.com/hugoduncan/mcp-clj/commit/39f31f8ae815f4ca0f293218732e5d80e037ac88))
112+
113+
114+
<!-- generated by git-cliff -->

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,31 @@ clj -M:kaocha:dev:test --focus mcp-clj.mcp-server.core-test
281281
(clojure.test/run-tests 'mcp-clj.mcp-server.core-test)
282282
```
283283

284+
## Changelog
285+
286+
See [CHANGELOG.md](CHANGELOG.md) for release notes and version history.
287+
288+
### Generating Changelog Locally
289+
290+
Install git-cliff:
291+
292+
```bash
293+
# macOS
294+
brew install git-cliff
295+
296+
# Or download from https://github.com/orhun/git-cliff/releases
297+
```
298+
299+
Generate changelog:
300+
301+
```bash
302+
# Preview unreleased changes
303+
git cliff --unreleased
304+
305+
# Update CHANGELOG.md
306+
git cliff -o CHANGELOG.md
307+
```
308+
284309
## Architecture
285310

286311
mcp-clj uses a **polylith-style architecture** with component-based organization:

cliff.toml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# git-cliff configuration for mcp-clj
2+
# See https://git-cliff.org/docs/configuration for options
3+
4+
[changelog]
5+
# changelog header
6+
header = """
7+
# Changelog
8+
9+
All notable changes to this project will be documented in this file.
10+
11+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
12+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
13+
14+
"""
15+
# template for the changelog body
16+
# https://keats.github.io/tera/docs/#introduction
17+
body = """
18+
{% if version %}\
19+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
20+
{% else %}\
21+
## [unreleased]
22+
{% endif %}\
23+
{% for group, commits in commits | group_by(attribute="group") %}
24+
### {{ group | upper_first }}
25+
{% for commit in commits %}
26+
- {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/hugoduncan/mcp-clj/commit/{{ commit.id }}))\
27+
{% if commit.breaking %} **BREAKING**{% endif %}
28+
{% endfor %}
29+
{% endfor %}
30+
31+
"""
32+
# template for the changelog footer
33+
footer = """
34+
<!-- generated by git-cliff -->
35+
"""
36+
# remove the leading and trailing whitespace from the templates
37+
trim = true
38+
39+
[git]
40+
# parse the commits based on https://www.conventionalcommits.org
41+
conventional_commits = true
42+
# filter out the commits that are not conventional
43+
filter_unconventional = true
44+
# process each line of a commit as an individual commit
45+
split_commits = false
46+
# regex for preprocessing the commit messages
47+
commit_preprocessors = [
48+
# Remove issue numbers from titles
49+
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
50+
]
51+
# regex for parsing and grouping commits
52+
commit_parsers = [
53+
{ message = "^feat", group = "Features" },
54+
{ message = "^fix", group = "Bug Fixes" },
55+
{ message = "^perf", group = "Performance" },
56+
{ message = "^refactor", group = "Refactoring" },
57+
{ message = "^doc", group = "Documentation" },
58+
{ message = "^test", group = "Testing" },
59+
{ message = "^build", group = "Build System" },
60+
{ message = "^ci", group = "CI/CD" },
61+
{ message = "^chore\\(release\\)", skip = true },
62+
{ message = "^chore\\(changelog\\)", skip = true },
63+
{ message = "^chore", group = "Chores" },
64+
{ message = "^style", group = "Code Style" },
65+
# Skip merge commits from local-integration-branch
66+
{ body = ".*local-integration-branch.*", skip = true },
67+
]
68+
# protect breaking changes from being skipped due to matching a skipping commit_parser
69+
protect_breaking_commits = false
70+
# filter out the commits that are not matched by commit parsers
71+
filter_commits = true
72+
# regex for matching git tags
73+
tag_pattern = "v[0-9].*"
74+
# regex for skipping tags
75+
# skip_tags = "v0.1.0-beta.1"
76+
# regex for ignoring tags
77+
# ignore_tags = ""
78+
# sort the tags topologically
79+
topo_order = false
80+
# sort the commits inside sections by oldest/newest order
81+
sort_commits = "oldest"
82+
83+
[remote.github]
84+
owner = "hugoduncan"
85+
repo = "mcp-clj"

dev/build.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
1212
The :build alias in each project's deps.edn configures the project-specific
1313
parameters."
14-
(:require [clojure.tools.build.api :as b]))
14+
(:require
15+
[clojure.tools.build.api :as b]))
1516

1617
(def major-minor "0.1")
18+
1719
(def root-dir
1820
"Find the repository root by looking for deps.edn with :build alias."
1921
(let [cwd (System/getProperty "user.dir")]
@@ -93,7 +95,7 @@
9395
;; Clean first
9496
(clean opts)
9597

96-
;; Copy source files from basis paths and local dependencies
98+
;; Copy source files from basis paths and local dependencies
9799
(let [basis-paths (:paths basis)
98100
;; Extract paths from local/root dependencies
99101
local-deps (filter #(contains? (val %) :local/root) (:libs basis))

0 commit comments

Comments
 (0)