From 16d484a50f309fbee334de505f0e0551104f6fd2 Mon Sep 17 00:00:00 2001 From: Florian BRUNIAUX Date: Wed, 21 Jan 2026 11:41:24 +0100 Subject: [PATCH] feat: add maintenance slash commands for release management Commands added: - /update-infos-release [bump-type]: Automate CC releases tracking + version bump - /version: Display guide & CC versions with content stats - /changelog [count]: View recent CHANGELOG entries - /sync: Check guide/landing synchronization status Workflow automation: - Claude Code releases tracking (YAML + MD + Landing badge) - Guide version management (VERSION + sync all docs) - CHANGELOG updates - Landing site sync verification - Git commit/push to both repositories Files: - .claude/commands/update-infos-release.md: Full release workflow - .claude/commands/version.md: Version info display - .claude/commands/changelog.md: CHANGELOG viewer - .claude/commands/sync.md: Sync check with actionable fixes - .gitignore: Allow .claude/commands/ while ignoring other .claude/ config - CLAUDE.md: Document new maintenance commands Co-Authored-By: Claude Sonnet 4.5 --- .claude/commands/changelog.md | 83 +++++++ .claude/commands/sync.md | 116 +++++++++ .claude/commands/update-infos-release.md | 299 +++++++++++++++++++++++ .claude/commands/version.md | 86 +++++++ .gitignore | 3 +- CLAUDE.md | 28 +++ 6 files changed, 614 insertions(+), 1 deletion(-) create mode 100644 .claude/commands/changelog.md create mode 100644 .claude/commands/sync.md create mode 100644 .claude/commands/update-infos-release.md create mode 100644 .claude/commands/version.md diff --git a/.claude/commands/changelog.md b/.claude/commands/changelog.md new file mode 100644 index 0000000..cf05c08 --- /dev/null +++ b/.claude/commands/changelog.md @@ -0,0 +1,83 @@ +--- +name: changelog +description: View recent CHANGELOG entries +argument-hint: "[count]" +--- + +# CHANGELOG Viewer + +Display recent entries from CHANGELOG.md with optional count limit. + +## Usage + +``` +/changelog # Show last 5 entries (default) +/changelog 10 # Show last 10 entries +/changelog all # Show all entries +``` + +## What to Display + +Read `CHANGELOG.md` and extract the last N version entries with: +- Version number +- Release date +- All sections (Added, Changed, Fixed, etc.) +- Full content per section + +## Output Format + +``` +📋 Recent CHANGELOG Entries + +═══════════════════════════════════════════════════════════ + +## [3.9.11] - 2026-01-20 + +### Added +- Production Safety Rules (Section 14.3) + - Critical safety practices for production deployments + - Rollback procedures and monitoring guidelines + +### Documentation +- Enhanced deployment workflow documentation +- Added safety checklist templates + +═══════════════════════════════════════════════════════════ + +## [3.9.10] - 2026-01-19 + +### Added +- DevOps & SRE Guide with FIRE Framework + - Fault tolerance patterns + - Incident response protocols + - Recovery procedures + - Escalation guidelines + +### Documentation +- New Section 9.18: DevOps & SRE Practices +- 45+ operational best practices + +═══════════════════════════════════════════════════════════ + +[... more entries ...] + +─────────────────────────────────────────────────────────── +Showing 5 of N total entries +Use /changelog 10 for more, or /changelog all for complete history +``` + +## Implementation + +1. Read CHANGELOG.md +2. Parse entries using regex: `## \[(\d+\.\d+\.\d+)\] - (\d{4}-\d{2}-\d{2})` +3. Extract content between version headers +4. Limit to N entries (default 5) +5. Format with clear separators +6. Add footer with total count + +## Special Handling + +- Skip `[Unreleased]` section if present at top +- Handle missing dates gracefully +- Preserve markdown formatting in descriptions +- Show section hierarchy (###, bullet points) diff --git a/.claude/commands/sync.md b/.claude/commands/sync.md new file mode 100644 index 0000000..2411855 --- /dev/null +++ b/.claude/commands/sync.md @@ -0,0 +1,116 @@ +--- +name: sync +description: Check guide/landing synchronization status +--- + +# Synchronization Check + +Run comprehensive sync verification between guide repository and landing site. + +## What to Check + +Execute `./scripts/check-landing-sync.sh` and display results with enhanced formatting. + +## Output Format + +``` +🔄 Guide ↔ Landing Synchronization Check + +═══════════════════════════════════════════════════════════ + +1ī¸âƒŖ Guide Version + Guide: 3.9.11 + Landing: 3.9.11 + Status: ✅ Synchronized + +2ī¸âƒŖ Templates Count + Guide Files: 65 + Landing (index): 65 + Landing (examples): 65 + Status: ✅ Synchronized + +3ī¸âƒŖ Quiz Questions + Source (JSON): 227 + Landing (index): 227 + Landing (quiz): 227 + Status: ✅ Synchronized + +4ī¸âƒŖ Guide Lines + Actual Count: 11,560 + Landing Display: 11,000+ (approximate) + Status: ✅ Within Tolerance + +5ī¸âƒŖ Claude Code Version + Releases YAML: v2.1.14 + Landing Badge: v2.1.14 + Status: ✅ Synchronized + +═══════════════════════════════════════════════════════════ + +✅ All Components Synchronized + +No action required. Guide and landing site are in sync. +``` + +## If Mismatches Detected + +``` +🔄 Guide ↔ Landing Synchronization Check + +═══════════════════════════════════════════════════════════ + +1ī¸âƒŖ Guide Version + [... as above ...] + +2ī¸âƒŖ Templates Count + Guide Files: 65 + Landing (index): 63 + Landing (examples): 65 + Status: âš ī¸ MISMATCH + +3ī¸âƒŖ Quiz Questions + [... etc ...] + +═══════════════════════════════════════════════════════════ + +❌ Synchronization Issues Detected (1 issue) + +Issues to Fix: + +1. Templates Count Mismatch + Location: claude-code-ultimate-guide-landing/index.html + Current: 63 + Expected: 65 + Action: Update badge and meta tags with correct count + +Quick Fixes: + # Update landing templates count + cd /Users/florianbruniaux/Sites/perso/claude-code-ultimate-guide-landing + # Edit index.html lines: 6, 9, 188, 204, 455 + # Change "63 templates" → "65 templates" + git add index.html + git commit -m "fix: sync templates count (63 → 65)" + git push + +Recommended: + Run /update-infos-release to automate synchronization +``` + +## Implementation + +1. Execute sync check script +2. Capture output and parse status codes +3. Format results with clear visual hierarchy +4. If issues detected: + - List each mismatch + - Provide file locations + - Suggest exact fixes + - Recommend automation commands +5. Color-code status indicators +6. Add actionable next steps + +## Related Commands + +- `/update-infos-release` - Automated sync + version management +- `/version` - View current versions +- `/changelog` - View recent CHANGELOG entries diff --git a/.claude/commands/update-infos-release.md b/.claude/commands/update-infos-release.md new file mode 100644 index 0000000..62ffe60 --- /dev/null +++ b/.claude/commands/update-infos-release.md @@ -0,0 +1,299 @@ +--- +name: update-infos-release +description: Update Claude Code releases tracking (guide + landing + version bump) +argument-hint: "[bump-type]" +--- + +# Release Management Workflow + +Automate Claude Code releases tracking and guide version management. + +## Usage + +``` +/update-infos-release # Update CC releases only (no guide version bump) +/update-infos-release patch # Update CC + bump guide patch (3.9.11 → 3.9.12) +/update-infos-release minor # Update CC + bump guide minor (3.9.11 → 3.10.0) +/update-infos-release major # Update CC + bump guide major (3.9.11 → 4.0.0) +``` + +## Workflow Steps + +### 1. Check for New Claude Code Releases + +```bash +./scripts/update-cc-releases.sh +``` + +If new versions detected, continue. Otherwise, stop. + +### 2. Update Claude Code Releases Tracking + +**Files to update:** +- `machine-readable/claude-code-releases.yaml` +- `guide/claude-code-releases.md` +- `claude-code-ultimate-guide-landing/index.html` (badge + section) + +**Process:** +1. Read latest release notes from the command output +2. Extract version, date, and highlights (2-4 key features max) +3. Update YAML with condensed highlights +4. Update Markdown with expanded details +5. Update landing badge version +6. If major features, update landing #releases section (keep top 5) + +**Condensation rules for YAML:** +- ⭐ Major features get star emoji +- Breaking changes → `breaking:` array +- Bug fixes → single line +- 2-4 highlights max (focus on user-facing changes) +- Skip internal/SDK changes unless breaking + +### 3. Guide Version Bump (if requested) + +**If bump-type specified:** + +```bash +# Read current version +cat VERSION + +# Bump version +# patch: 3.9.11 → 3.9.12 +# minor: 3.9.11 → 3.10.0 +# major: 3.9.11 → 4.0.0 + +# Update VERSION file +echo "X.Y.Z" > VERSION + +# Sync version across docs +./scripts/sync-version.sh +``` + +**Files synced by script:** +- `README.md` +- `guide/cheatsheet.md` +- `guide/ultimate-guide.md` +- `machine-readable/reference.yaml` + +### 4. Update CHANGELOG.md + +**Add entry:** + +```markdown +## [X.Y.Z] - YYYY-MM-DD + +### Documentation + +- **Claude Code Releases**: Updated tracking to vA.B.C + - [Feature 1] + - [Feature 2] + - [Feature 3] + +[If guide version bump:] +### Version Bump + +- Bumped guide version: [old] → [new] +- Reason: [major features added / significant updates / breaking changes in CC] +``` + +### 5. Verify Synchronization + +```bash +./scripts/check-landing-sync.sh +``` + +**Expected output:** +``` +✅ Version guide: X.Y.Z +✅ Templates: N +✅ Quiz questions: N +✅ Guide lines: N +✅ Claude Code: vA.B.C +``` + +If mismatches, fix before committing. + +### 6. Commit and Push + +**Two repositories to update:** + +#### Guide Repository + +```bash +cd /Users/florianbruniaux/Sites/perso/claude-code-ultimate-guide + +git add \ + VERSION \ + CHANGELOG.md \ + README.md \ + guide/cheatsheet.md \ + guide/ultimate-guide.md \ + guide/claude-code-releases.md \ + machine-readable/reference.yaml \ + machine-readable/claude-code-releases.yaml + +# If version bump: +git commit -m "release: vX.Y.Z + +- Update Claude Code releases tracking (vOLD → vNEW) +- [Bump type]: vOLD_GUIDE → vNEW_GUIDE +- Update CHANGELOG with release details + +Co-Authored-By: Claude Sonnet 4.5 " + +# If CC releases only: +git commit -m "docs: update Claude Code releases to vA.B.C + +- Update latest tracked version: vOLD → vNEW +- Add vNEW highlights: [feature1], [feature2], [feature3] +- [Any breaking changes or fixes] +- Update dates: YYYY-MM-DD + +Co-Authored-By: Claude Sonnet 4.5 " + +git push +``` + +#### Landing Repository + +```bash +cd /Users/florianbruniaux/Sites/perso/claude-code-ultimate-guide-landing + +git add index.html + +git commit -m "chore: sync with guide vX.Y.Z + +- Update Claude Code version badge: vOLD → vNEW +[If releases section updated:] +- Update releases timeline with vNEW features +- Maintain top 5 notable releases +- Maintain landing/guide synchronization + +Co-Authored-By: Claude Sonnet 4.5 " + +git push +``` + +### 7. Summary Output + +Display to user: + +``` +✅ Release Update Complete + +Guide Repository: +- Version: [old] → [new] +- Claude Code: vA.B.C +- Commit: [hash] +- Files: [count] updated + +Landing Repository: +- Claude Code badge: vA.B.C +- Commit: [hash] +- Files: [count] updated + +Synchronization: ✅ All synced + +Next Steps: +1. Verify GitHub Pages deployment: https://florianbruniaux.github.io/claude-code-ultimate-guide-landing/ +2. Check version badge displays correctly +3. [If major release] Update social media / announcements +``` + +## Error Handling + +**If no new Claude Code versions:** +``` +â„šī¸ No new Claude Code releases detected. +Current tracked: vX.Y.Z +Latest available: vX.Y.Z + +Aborting. Nothing to update. +``` + +**If sync check fails:** +``` +❌ Synchronization check failed: +[List mismatches] + +Please fix manually before committing. +Run: ./scripts/check-landing-sync.sh +``` + +**If git operations fail:** +``` +❌ Git operation failed: [error] + +Manual intervention required. +Check: git status +``` + +## Examples + +### Example 1: Update CC releases only + +``` +User: /update-infos-release + +Output: +✅ New Claude Code release detected: v2.1.15 + Date: 2026-01-22 + Highlights: + - New feature X + - Fix for Y + - Improvement Z + +Updating tracking files... +✅ YAML updated +✅ Markdown updated +✅ Landing badge updated + +Verifying sync... ✅ All synced + +Committing changes... +✅ Guide: commit abc1234 +✅ Landing: commit def5678 + +✅ Release Update Complete +``` + +### Example 2: Update CC + minor bump + +``` +User: /update-infos-release minor + +Output: +✅ New Claude Code release detected: v2.2.0 + Major release with significant features + +Current guide version: 3.9.11 +Bumping to: 3.10.0 (minor) + +Updating files... +✅ Claude Code tracking updated +✅ Guide version bumped +✅ CHANGELOG updated +✅ All docs synced + +Verifying sync... ✅ All synced + +Committing changes... +✅ Guide: commit abc1234 (8 files) +✅ Landing: commit def5678 (1 file) + +✅ Release Update Complete (v3.10.0) +``` + +## Implementation Notes + +- **Atomicity**: If any step fails, rollback git changes (`git reset --hard`) +- **Idempotency**: Can be run multiple times safely +- **Validation**: Always verify sync before committing +- **User confirmation**: Ask before version bump if ambiguous +- **Smart defaults**: No bump = CC update only + +## Related Commands + +- `/version` - Check current versions (guide + CC) +- `/changelog` - View recent CHANGELOG entries +- `/sync` - Run sync check without updates diff --git a/.claude/commands/version.md b/.claude/commands/version.md new file mode 100644 index 0000000..285bde3 --- /dev/null +++ b/.claude/commands/version.md @@ -0,0 +1,86 @@ +--- +name: version +description: Display current guide and Claude Code versions +--- + +# Version Information + +Display current version information for the guide and tracked Claude Code version. + +## What to Display + +``` +Claude Code Ultimate Guide +├─ Guide Version: X.Y.Z (from VERSION file) +├─ Claude Code Tracked: vA.B.C (from claude-code-releases.yaml) +├─ Last CC Update: YYYY-MM-DD +├─ Templates: N files +├─ Quiz Questions: N questions +├─ Guide Lines: ~N lines +└─ Landing Synced: ✅ Yes / ❌ No + +Recent Guide Updates: +- [Date]: Version X.Y.Z-1 → X.Y.Z (reason) +- [Date]: Version X.Y.Z-2 → X.Y.Z-1 (reason) +- [Date]: Version X.Y.Z-3 → X.Y.Z-2 (reason) + +Recent Claude Code Releases: +- vA.B.C (YYYY-MM-DD): [2-3 highlights] +- vA.B.C-1 (YYYY-MM-DD): [2-3 highlights] +- vA.B.C-2 (YYYY-MM-DD): [2-3 highlights] +``` + +## Files to Read + +1. `VERSION` - Guide version +2. `machine-readable/claude-code-releases.yaml` - CC version + date +3. `CHANGELOG.md` - Last 3 guide updates +4. `machine-readable/claude-code-releases.yaml` - Last 3 CC releases +5. Run `find examples/ -type f ! -name README.md ! -name index.html | wc -l` - Templates count +6. Run `jq '. | length' questions.json` - Quiz count +7. Run `wc -l guide/ultimate-guide.md | awk '{print $1}'` - Guide lines +8. Run `./scripts/check-landing-sync.sh` - Sync status + +## Output Format + +Use clean, readable formatting with emojis for visual clarity: + +``` +📊 Claude Code Ultimate Guide - Version Info + +đŸ“Ļ Guide Version: 3.9.11 +🔧 Claude Code: v2.1.14 (2026-01-21) + +📈 Content Stats: + â€ĸ Templates: 65 files + â€ĸ Quiz Questions: 227 questions + â€ĸ Guide Lines: ~11,560 lines + +🔄 Landing Sync: ✅ Synchronized + +📝 Recent Guide Updates: + â€ĸ 2026-01-20 - v3.9.10 → v3.9.11: Production Safety Rules + â€ĸ 2026-01-19 - v3.9.9 → v3.9.10: DevOps & SRE Guide (FIRE) + â€ĸ 2026-01-18 - v3.9.8 → v3.9.9: Documentation improvements + +🚀 Recent Claude Code Releases: + â€ĸ v2.1.14 (2026-01-21) + - History-based autocomplete in bash mode + - Plugin search and SHA pinning + - Context window + memory fixes + + â€ĸ v2.1.12 (2026-01-18) + - Message rendering bugfix + + â€ĸ v2.1.11 (2026-01-17) + - MCP connection optimization +``` + +## Implementation + +1. Read all required files +2. Execute shell commands for counts +3. Parse YAML for CC releases +4. Parse CHANGELOG for guide updates +5. Format output with proper alignment +6. Display with clear visual hierarchy diff --git a/.gitignore b/.gitignore index 37d6cd3..fd38934 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,9 @@ *.swo *~ -# Claude Code +# Claude Code (ignore personal config, but keep shared commands) .claude/ +!.claude/commands/ # OS .DS_Store diff --git a/CLAUDE.md b/CLAUDE.md index 6e29f92..4e19ef1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -64,6 +64,34 @@ echo "3.7.0" > VERSION && ./scripts/sync-version.sh ./scripts/sync-version.sh --check ``` +### Slash Commands (Maintenance) + +Custom slash commands available in this project: + +| Command | Description | +|---------|-------------| +| `/update-infos-release [bump-type]` | Update Claude Code releases tracking + optional guide version bump | +| `/version` | Display current guide and Claude Code versions with stats | +| `/changelog [count]` | View recent CHANGELOG entries (default: 5) | +| `/sync` | Check guide/landing synchronization status | + +**Examples:** +``` +/update-infos-release # Update CC releases only +/update-infos-release patch # Update CC + bump guide (3.9.11 → 3.9.12) +/update-infos-release minor # Update CC + bump guide (3.9.11 → 3.10.0) +/version # Show versions and content stats +/changelog 10 # Last 10 CHANGELOG entries +/sync # Check guide/landing sync status +``` + +These commands are defined in `.claude/commands/` and automate: +- Claude Code releases tracking (YAML + Markdown + Landing badge) +- Guide version management (VERSION file + sync across all docs) +- CHANGELOG updates +- Landing site synchronization verification +- Git commit and push to both repositories + ## Conventions ### Documentation Style