Skip to content
This repository was archived by the owner on Apr 5, 2026. It is now read-only.

Commit df2d70a

Browse files
HerbHallclaude
andcommitted
feat: version-tagged releases with update check and workflow (issue #87)
Adds VERSION file (2.0.0), SessionStart version check that notifies when a newer release is available, /devkit-sync update workflow for controlled upgrades, and CHANGELOG.md v2.0.0 entry documenting all changes in this release. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6930f0c commit df2d70a

5 files changed

Lines changed: 149 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Changelog
22

3+
## v2.0.0 -- 2026-02-25
4+
5+
v2.0 represents a major architectural shift from a bash-centric toolkit to a
6+
cross-platform, multi-tier system with formal versioning.
7+
8+
### Added
9+
10+
- Three-tier settings architecture (ADR-0012): User > DevSpace > Project cascade
11+
- Dual-language scripting strategy (ADR-0013): PowerShell primary, bash legacy
12+
- Cross-platform path resolution via `~/.devkit-config.json`
13+
- Forge abstraction layer for GitHub/GitLab operations
14+
- Project registry for multi-project coordination
15+
- Local overrides via `.local.md` pattern (gitignored, machine-specific)
16+
- SessionStart hardening: rate limiting (1/hour), lock-file awareness, pull logging
17+
- Auto-push prompt after `/reflect` sessions
18+
- Version-tagged releases with `VERSION` file as single source of truth
19+
- SessionStart version check: notifies when a newer DevKit release is available
20+
- `devkit update` command via `/devkit-sync` skill (check version, upgrade to tag or latest)
21+
- `devkit promote` command for graduating local patterns to universal rules
22+
23+
### Version Policy
24+
25+
- MAJOR: Breaking changes to rules, skill interfaces, or sync protocol
26+
- MINOR: New skills, agents, or non-breaking rule additions
27+
- PATCH: Bug fixes, documentation, pattern additions
28+
329
## v1.2.0 -- 2026-02-21
430

531
### Fixed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0
1+
2.0.0

claude/hooks/SessionStart.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,54 @@ devkit_pull() {
100100

101101
devkit_pull
102102

103+
# ===== Version Check =====
104+
# Compare local VERSION with origin/main after devkit_pull's fetch.
105+
# Only prints when a newer version is available (no noise otherwise).
106+
devkit_version_check() {
107+
local devkit_path="$1"
108+
109+
# Nothing to check if no DevKit path or no VERSION file
110+
if [ -z "$devkit_path" ] || [ ! -f "$devkit_path/VERSION" ]; then
111+
return 0
112+
fi
113+
114+
local current remote
115+
current=$(cat "$devkit_path/VERSION" 2>/dev/null | tr -d '[:space:]')
116+
remote=$(git -C "$devkit_path" show origin/main:VERSION 2>/dev/null | tr -d '[:space:]')
117+
118+
# Skip if either version is empty or they match
119+
if [ -z "$current" ] || [ -z "$remote" ] || [ "$current" = "$remote" ]; then
120+
return 0
121+
fi
122+
123+
echo "DevKit: new version available (current: $current, latest: $remote)"
124+
}
125+
126+
# Resolve devkit_path using the same logic as devkit_pull for the version check.
127+
# This duplicates path resolution but keeps devkit_pull's local scope intact.
128+
_devkit_resolve_path() {
129+
local config="$HOME/.devkit-config.json"
130+
if [ -f "$config" ]; then
131+
local devspace
132+
devspace=$(grep -o '"devspacePath"[[:space:]]*:[[:space:]]*"[^"]*"' "$config" | head -1 | sed 's/.*"devspacePath"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/' | sed 's|\\\\|/|g')
133+
if [ -z "$devspace" ]; then
134+
devspace=$(grep -o '"devspace"[[:space:]]*:[[:space:]]*"[^"]*"' "$config" | head -1 | sed 's/.*"devspace"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/' | sed 's|\\\\|/|g')
135+
fi
136+
if [ -n "$devspace" ] && [ -f "$devspace/devkit/.sync-manifest.json" ]; then
137+
echo "$devspace/devkit"
138+
return 0
139+
fi
140+
fi
141+
for candidate in "$HOME/DevSpace/devkit" "$HOME/workspace/devkit" "$HOME/devkit"; do
142+
if [ -f "$candidate/.sync-manifest.json" ]; then
143+
echo "$candidate"
144+
return 0
145+
fi
146+
done
147+
}
148+
149+
devkit_version_check "$(_devkit_resolve_path)"
150+
103151
# ===== CLAUDE.md Detection =====
104152

105153
# Skip if we're in the home directory

claude/skills/devkit-sync/SKILL.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: devkit-sync
3-
description: Manual sync operations for DevKit multi-machine synchronization. Status, push, pull, init, diff, and unlink.
3+
description: Manual sync operations for DevKit multi-machine synchronization. Status, push, pull, init, diff, unlink, and update.
44
user_invocable: true
55
---
66

@@ -28,6 +28,7 @@ What sync operation do you need?
2828
5. **Diff** -- Show detailed diff of local changes vs DevKit main
2929
6. **Unlink** -- Replace symlinks with copies (portable snapshot)
3030
7. **Resolve conflicts** -- Fix merge conflicts after pull/rebase
31+
8. **Update** -- Check version and upgrade to a specific release or latest
3132

3233
Or just type your question about DevKit sync.
3334
</intake>
@@ -37,11 +38,12 @@ Or just type your question about DevKit sync.
3738
|----------|----------|
3839
| 1, "status", "state", "health", "check" | workflows/status.md |
3940
| 2, "push", "commit", "upload", "share" | workflows/push.md |
40-
| 3, "pull", "fetch", "update", "download" | workflows/pull.md |
41+
| 3, "pull", "fetch", "download" | workflows/pull.md |
4142
| 4, "init", "setup", "install", "link" | workflows/init.md |
4243
| 5, "diff", "changes", "what changed" | workflows/diff.md |
4344
| 6, "unlink", "copy", "snapshot", "portable" | workflows/unlink.md |
4445
| 7, "resolve", "conflicts", "conflict", "merge conflict", "rebase conflict" | workflows/resolve-conflicts.md |
46+
| 8, "update", "upgrade", "version", "release" | workflows/update.md |
4547

4648
**After reading the workflow, follow it exactly.**
4749
</routing>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# DevKit Sync: Update
2+
3+
Check current version and upgrade to a specific release or latest.
4+
5+
## Steps
6+
7+
1. **Resolve DevKit path** from config or common locations.
8+
9+
2. **Read current version:**
10+
11+
```bash
12+
cat <devkit>/VERSION
13+
```
14+
15+
Report: "Current version: X.Y.Z"
16+
17+
3. **Fetch latest tags from origin:**
18+
19+
```bash
20+
git -C <devkit> fetch origin --tags
21+
```
22+
23+
4. **Show available versions** (most recent first):
24+
25+
```bash
26+
git -C <devkit> tag -l "v*" --sort=-v:refname | head -5
27+
```
28+
29+
If no tags exist: "No tagged releases found. Use `/devkit-sync pull` to track main HEAD."
30+
31+
5. **Determine target version:**
32+
- If user said `--latest` or "latest": target is `main` HEAD
33+
- If user specified a version (e.g., `v2.0.0`): target is that tag
34+
- Otherwise: target is the newest tag from step 4
35+
36+
6. **Check for local changes** that would block checkout:
37+
38+
```bash
39+
git -C <devkit> status --porcelain
40+
```
41+
42+
If dirty: warn and offer to stash first.
43+
44+
7. **Apply the update:**
45+
- For a tag target:
46+
47+
```bash
48+
git -C <devkit> checkout <tag>
49+
```
50+
51+
- For latest (main HEAD):
52+
53+
```bash
54+
git -C <devkit> pull --rebase origin main
55+
```
56+
57+
8. **Confirm version change:**
58+
59+
```bash
60+
cat <devkit>/VERSION
61+
```
62+
63+
Report: "Updated from X.Y.Z to A.B.C. Symlinked files updated instantly."
64+
65+
## Edge Cases
66+
67+
- Network unavailable: report fetch failure, show current version
68+
- No VERSION file: report "VERSION file not found -- this DevKit predates version tagging"
69+
- Target tag not found: list available tags, ask user to pick one
70+
- Dirty working tree: offer stash/unstash flow

0 commit comments

Comments
 (0)