From a142866d51fb18da5701f9eda65f8196282a3718 Mon Sep 17 00:00:00 2001 From: Oleksandr Akhtyrskiy Date: Sun, 11 Jan 2026 15:55:33 -0700 Subject: [PATCH 1/5] Add version management command to handle project version updates --- .claude/commands/version.md | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .claude/commands/version.md diff --git a/.claude/commands/version.md b/.claude/commands/version.md new file mode 100644 index 0000000..97c8392 --- /dev/null +++ b/.claude/commands/version.md @@ -0,0 +1,45 @@ +# Version Management Command + +Manage the project version across all configuration files. + +## Arguments: $ARGUMENTS + +## Instructions + +1. Read the current version from `src/Keystone.Cli/Keystone.Cli.csproj` (the `` tag) + +2. **If arguments are empty or "show"**: Display the current version and exit + +3. **If a version is provided**: Validate and update the version + +### Validation + +The new version MUST match the pattern `X.Y.Z` where X, Y, and Z are non-negative integers +(e.g., `0.1.0`, `1.0.0`, `2.3.14`). If the pattern doesn't match, show an error and exit. + +### Files to Update + +When bumping the version, update these files: + +#### 1. `src/Keystone.Cli/Keystone.Cli.csproj` + +Update ALL five version properties to the new value: + +- `X.Y.Z` +- `X.Y.Z` +- `X.Y.Z` +- `X.Y.Z` +- `X.Y.Z` + +#### 2. `docs/man/man1/keystone-cli.1` + +Update the VERSION section. Find the line that starts with `keystone-cli` under the +`.Sh VERSION` section and update it to `keystone-cli X.Y.Z`. + +### Output + +After updating, confirm the changes by showing: + +- The old version +- The new version +- List of files updated From f64f9aa6f88699968332f67597800faad088c7f1 Mon Sep 17 00:00:00 2001 From: Oleksandr Akhtyrskiy Date: Sun, 11 Jan 2026 16:00:34 -0700 Subject: [PATCH 2/5] Enhance version management documentation with command usage and semantic versioning guidelines --- docs/RELEASE.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/docs/RELEASE.md b/docs/RELEASE.md index 11ce726..5f2615a 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -17,6 +17,33 @@ Keystone CLI uses **tag-driven releases**. --- +## Version management + +Use the `/version` command in Claude Code to view or update the project version. + +### View current version + +```text +/version +``` + +This displays the current version from `Keystone.Cli.csproj`. + +### Update to a new version + +```text +/version X.Y.Z +``` + +This updates the version in all required files: + +- `src/Keystone.Cli/Keystone.Cli.csproj` (all five version properties) +- `docs/man/man1/keystone-cli.1` (VERSION section) + +The version must follow semantic versioning format (`X.Y.Z`). + +--- + ## Release flows Keystone CLI supports two release flows: @@ -38,11 +65,7 @@ This is the **recommended** way to publish a new version. ### Steps -1. Update the project version: - - ```xml - X.Y.Z - ``` +1. Update the project version using `/version X.Y.Z` in Claude Code (see [Version management](#version-management)). This value **must match** the git tag that will be created (`vX.Y.Z`). @@ -101,7 +124,7 @@ Use this flow **only** if GitHub Actions is unavailable or requires debugging. dotnet test ./tests/Keystone.Cli.UnitTests/Keystone.Cli.UnitTests.csproj -c Release ``` -2. Ensure `` in `Keystone.Cli.csproj` matches the intended release. +2. Ensure the version matches the intended release (use `/version` to check, `/version X.Y.Z` to update). 3. Build and package release assets locally: From 4c2547d8daac59f63b3bbcd570732914b875368c Mon Sep 17 00:00:00 2001 From: Oleksandr Akhtyrskiy Date: Sun, 11 Jan 2026 16:02:48 -0700 Subject: [PATCH 3/5] Bump version to `0.1.1` in project files and documentation --- docs/man/man1/keystone-cli.1 | 2 +- src/Keystone.Cli/Keystone.Cli.csproj | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/man/man1/keystone-cli.1 b/docs/man/man1/keystone-cli.1 index 9a51162..9d703be 100644 --- a/docs/man/man1/keystone-cli.1 +++ b/docs/man/man1/keystone-cli.1 @@ -186,7 +186,7 @@ To switch a project at a specific path to use the `core` template: .Dl keystone-cli project switch-template --project-path /path/to/my-project core .Sh VERSION -keystone-cli 0.1.0 +keystone-cli 0.1.1 .Sh AUTHOR Knight Owl LLC diff --git a/src/Keystone.Cli/Keystone.Cli.csproj b/src/Keystone.Cli/Keystone.Cli.csproj index ca0a5cc..566758b 100644 --- a/src/Keystone.Cli/Keystone.Cli.csproj +++ b/src/Keystone.Cli/Keystone.Cli.csproj @@ -12,11 +12,11 @@ © 2025 Knight Owl LLC. All rights reserved. A command-line interface for Keystone. MIT - 0.1.0 - 0.1.0 - 0.1.0 - 0.1.0 - 0.1.0 + 0.1.1 + 0.1.1 + 0.1.1 + 0.1.1 + 0.1.1 From a3785d87656a97fdd74968381c75b61a07061bb5 Mon Sep 17 00:00:00 2001 From: Oleksandr Akhtyrskiy Date: Sun, 11 Jan 2026 16:09:39 -0700 Subject: [PATCH 4/5] Update version in InfoCommandTests to `0.1.1` --- .../Application/Commands/Info/InfoCommandTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Keystone.Cli.UnitTests/Application/Commands/Info/InfoCommandTests.cs b/tests/Keystone.Cli.UnitTests/Application/Commands/Info/InfoCommandTests.cs index 8e9defb..1b4c170 100644 --- a/tests/Keystone.Cli.UnitTests/Application/Commands/Info/InfoCommandTests.cs +++ b/tests/Keystone.Cli.UnitTests/Application/Commands/Info/InfoCommandTests.cs @@ -33,7 +33,7 @@ public void GetInfo_ReturnsModel() using (Assert.EnterMultipleScope()) { - Assert.That(actual.Version, Does.StartWith("0.1.0")); + Assert.That(actual.Version, Does.StartWith("0.1.1")); Assert.That(actual.Description, Is.EqualTo("A command-line interface for Keystone.")); Assert.That(actual.Copyright, Is.EqualTo("© 2025 Knight Owl LLC. All rights reserved.")); Assert.That(actual.DefaultTemplateTarget, Is.EqualTo(defaultTemplateTarget)); From 9431fde5f019f47ae26c9961bf0cca61ef820fc3 Mon Sep 17 00:00:00 2001 From: Oleksandr Akhtyrskiy Date: Sun, 11 Jan 2026 16:09:55 -0700 Subject: [PATCH 5/5] Update release and version documentation to include unit test version assertion --- .claude/commands/version.md | 16 +++++++++++++++- docs/RELEASE.md | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.claude/commands/version.md b/.claude/commands/version.md index 97c8392..07e8642 100644 --- a/.claude/commands/version.md +++ b/.claude/commands/version.md @@ -36,10 +36,24 @@ Update ALL five version properties to the new value: Update the VERSION section. Find the line that starts with `keystone-cli` under the `.Sh VERSION` section and update it to `keystone-cli X.Y.Z`. +#### 3. `tests/Keystone.Cli.UnitTests/Application/Commands/Info/InfoCommandTests.cs` + +Update the version assertion. Find the line containing `Does.StartWith("X.Y.Z")` and update +it to use the new version. + +### Verify + +After updating all files, run the unit tests to ensure everything still passes: + +```bash +dotnet test +``` + ### Output -After updating, confirm the changes by showing: +After updating and verifying, confirm the changes by showing: - The old version - The new version - List of files updated +- Test results (passed/failed) diff --git a/docs/RELEASE.md b/docs/RELEASE.md index 5f2615a..d087028 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -39,6 +39,7 @@ This updates the version in all required files: - `src/Keystone.Cli/Keystone.Cli.csproj` (all five version properties) - `docs/man/man1/keystone-cli.1` (VERSION section) +- `tests/Keystone.Cli.UnitTests/Application/Commands/Info/InfoCommandTests.cs` (version assertion) The version must follow semantic versioning format (`X.Y.Z`).