davenov-cc 1.0.9 → 1.0.10

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.
package/README.md CHANGED
@@ -8,6 +8,7 @@ A personal collection of Claude Code customizations including skills and slash c
8
8
 
9
9
  Slash commands that can be invoked with `/<command-name>`:
10
10
 
11
+ - **davenov:cc:changelog** - Initialize or manage a CHANGELOG.md following Keep a Changelog format
11
12
  - **davenov:cc:interview** - Interview mode for expanding specifications
12
13
  - **davenov:cc:rule** - Create or modify Claude Code rules
13
14
 
package/bin/cli.js CHANGED
@@ -11,6 +11,7 @@ const SOURCE_DIR = path.join(__dirname, "..");
11
11
  // Parse command line arguments
12
12
  const args = process.argv.slice(2);
13
13
  const AUTO_OVERRIDE = args.includes("--auto-override");
14
+ const UPDATE = args.includes("--update");
14
15
  const UNINSTALL = args.includes("--uninstall");
15
16
 
16
17
  // Directories to install/uninstall
@@ -145,7 +146,11 @@ async function uninstall(rl) {
145
146
  }
146
147
 
147
148
  async function install(rl) {
148
- console.log("\n✨ Davenov CC Collection\n");
149
+ if (UPDATE) {
150
+ console.log("\nšŸ”„ Updating Davenov CC Collection...\n");
151
+ } else {
152
+ console.log("\n✨ Davenov CC Collection\n");
153
+ }
149
154
 
150
155
  // Check what we have to install
151
156
  const available = CUSTOMIZATION_DIRS.filter((dir) =>
@@ -168,26 +173,25 @@ async function install(rl) {
168
173
  // Check for actual file conflicts (not just directory existence)
169
174
  const itemsToOverwrite = getItemsToOverwrite();
170
175
 
171
- if (itemsToOverwrite.length > 0) {
176
+ // Skip confirmation if updating or auto-override is enabled
177
+ const skipConfirmation = UPDATE || AUTO_OVERRIDE;
178
+
179
+ if (itemsToOverwrite.length > 0 && !skipConfirmation) {
172
180
  console.log("āš ļø Heads up! These will be overwritten:");
173
181
  for (const { dir, item } of itemsToOverwrite) {
174
182
  console.log(` ${dir}/${item}`);
175
183
  }
176
184
  console.log();
177
185
 
178
- if (AUTO_OVERRIDE) {
179
- console.log("Auto-override enabled, let's go...");
180
- } else {
181
- const answer = await prompt(
182
- rl,
183
- "Cool with that? (y/N): "
184
- );
185
-
186
- if (answer.toLowerCase() !== "y") {
187
- console.log("\nNo worries, nothing changed. Catch you later! šŸ‘‹");
188
- rl.close();
189
- process.exit(0);
190
- }
186
+ const answer = await prompt(
187
+ rl,
188
+ "Cool with that? (y/N): "
189
+ );
190
+
191
+ if (answer.toLowerCase() !== "y") {
192
+ console.log("\nNo worries, nothing changed. Catch you later! šŸ‘‹");
193
+ rl.close();
194
+ process.exit(0);
191
195
  }
192
196
  }
193
197
 
@@ -197,7 +201,11 @@ async function install(rl) {
197
201
  }
198
202
 
199
203
  // Install each directory
200
- console.log("Installing the good stuff...\n");
204
+ if (UPDATE) {
205
+ console.log("Syncing latest files...\n");
206
+ } else {
207
+ console.log("Installing the good stuff...\n");
208
+ }
201
209
 
202
210
  for (const dir of available) {
203
211
  const srcPath = path.join(SOURCE_DIR, dir);
@@ -207,7 +215,11 @@ async function install(rl) {
207
215
  copyRecursive(srcPath, destPath);
208
216
  }
209
217
 
210
- console.log("\nšŸš€ You're all set! Go build something!\n");
218
+ if (UPDATE) {
219
+ console.log("\nāœ… Updated to the latest version!\n");
220
+ } else {
221
+ console.log("\nšŸš€ You're all set! Go build something!\n");
222
+ }
211
223
  }
212
224
 
213
225
  async function main() {
@@ -0,0 +1,222 @@
1
+ ---
2
+ description: Initialize or manage a CHANGELOG.md following Keep a Changelog format
3
+ allowed-tools:
4
+ - Read
5
+ - Write
6
+ - Edit
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - AskUserQuestion
11
+ ---
12
+
13
+ # Changelog Management Command
14
+
15
+ Initialize and manage a CHANGELOG.md file following the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) specification.
16
+
17
+ ## Workflow
18
+
19
+ ### Step 1: Detect Current State
20
+
21
+ Check if CHANGELOG.md already exists:
22
+
23
+ ```bash
24
+ ls -la CHANGELOG.md 2>/dev/null || echo "NO_CHANGELOG"
25
+ ```
26
+
27
+ Also check for existing CLAUDE.md:
28
+
29
+ ```bash
30
+ ls -la CLAUDE.md 2>/dev/null || echo "NO_CLAUDE_MD"
31
+ ```
32
+
33
+ ### Step 2: Handle Existing Changelog
34
+
35
+ **If CHANGELOG.md exists:**
36
+
37
+ Use AskUserQuestion:
38
+ - header: "Action"
39
+ - question: "A CHANGELOG.md already exists. What would you like to do?"
40
+ - options:
41
+ - "View current state" — Show the changelog and [Unreleased] section
42
+ - "Prepare for release" — Move [Unreleased] entries to a new version
43
+ - "Add entry" — Add a new entry to [Unreleased]
44
+ - "Replace entirely" — Create fresh CHANGELOG.md (destructive)
45
+
46
+ **If CHANGELOG.md does not exist:** Proceed to Step 3.
47
+
48
+ ### Step 3: Gather Project Info
49
+
50
+ If creating a new changelog, gather:
51
+
52
+ 1. **Repository URL** — Try to detect from git:
53
+ ```bash
54
+ git remote get-url origin 2>/dev/null | sed 's/\.git$//' | sed 's/git@github.com:/https:\/\/github.com\//'
55
+ ```
56
+
57
+ 2. **Current version** — Try to detect from package.json or ask:
58
+ ```bash
59
+ node -p "require('./package.json').version" 2>/dev/null || echo "0.1.0"
60
+ ```
61
+
62
+ If auto-detection fails, use AskUserQuestion to gather missing info.
63
+
64
+ ### Step 4: Create CHANGELOG.md
65
+
66
+ Create the changelog following Keep a Changelog format:
67
+
68
+ ```markdown
69
+ # Changelog
70
+
71
+ All notable changes to this project will be documented in this file.
72
+
73
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
74
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
75
+
76
+ ## [Unreleased]
77
+
78
+ <!--
79
+ Add changes here as you work. Use these categories:
80
+ ### Added - New features
81
+ ### Changed - Changes to existing functionality
82
+ ### Deprecated - Features marked for removal
83
+ ### Removed - Deleted features
84
+ ### Fixed - Bug fixes
85
+ ### Security - Vulnerability fixes
86
+ -->
87
+
88
+ ## [VERSION] - YYYY-MM-DD
89
+
90
+ ### Added
91
+
92
+ - Initial release
93
+
94
+ [Unreleased]: REPO_URL/compare/vVERSION...HEAD
95
+ [VERSION]: REPO_URL/releases/tag/vVERSION
96
+ ```
97
+
98
+ Replace `VERSION`, `YYYY-MM-DD`, and `REPO_URL` with actual values.
99
+
100
+ ### Step 5: Update CLAUDE.md
101
+
102
+ Check if CLAUDE.md contains changelog instructions:
103
+
104
+ ```bash
105
+ grep -l "Changelog Management" CLAUDE.md 2>/dev/null || echo "NO_CHANGELOG_SECTION"
106
+ ```
107
+
108
+ **If no changelog section exists**, ask user if they want to add changelog workflow to CLAUDE.md:
109
+
110
+ Use AskUserQuestion:
111
+ - header: "CLAUDE.md"
112
+ - question: "Should I add changelog management instructions to CLAUDE.md?"
113
+ - options:
114
+ - "Yes (Recommended)" — Add instructions for maintaining the changelog
115
+ - "No" — Skip, I'll manage it manually
116
+
117
+ **If user agrees**, add this section to CLAUDE.md:
118
+
119
+ ```markdown
120
+ ## Changelog Management
121
+
122
+ **Keep the CHANGELOG.md updated** following [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
123
+
124
+ ### During Development
125
+
126
+ When making changes, add entries to the `[Unreleased]` section using the appropriate category:
127
+
128
+ - **Added** — New features
129
+ - **Changed** — Changes to existing functionality
130
+ - **Deprecated** — Features marked for removal
131
+ - **Removed** — Deleted features
132
+ - **Fixed** — Bug fixes
133
+ - **Security** — Vulnerability fixes
134
+
135
+ ### Before Releasing a New Version
136
+
137
+ 1. Review commits since last version:
138
+ ```bash
139
+ git log $(git describe --tags --abbrev=0)..HEAD --oneline
140
+ ```
141
+
142
+ 2. Ensure all notable changes are captured in `[Unreleased]`
143
+
144
+ 3. Move `[Unreleased]` entries to a new version section:
145
+ - Create new heading: `## [X.Y.Z] - YYYY-MM-DD`
146
+ - Use today's date in ISO 8601 format
147
+ - Move all category sections under the new version
148
+
149
+ 4. Update comparison links at the bottom of CHANGELOG.md:
150
+ - Add new version link
151
+ - Update `[Unreleased]` link to compare from new version
152
+
153
+ 5. Commit the changelog update with version bump
154
+ ```
155
+
156
+ ### Step 6: "Add Entry" Flow
157
+
158
+ If user selected "Add entry":
159
+
160
+ 1. Use AskUserQuestion:
161
+ - header: "Category"
162
+ - question: "What type of change is this?"
163
+ - options:
164
+ - "Added" — New feature
165
+ - "Changed" — Modified existing functionality
166
+ - "Fixed" — Bug fix
167
+ - "Removed" — Deleted feature
168
+
169
+ 2. Use AskUserQuestion:
170
+ - header: "Description"
171
+ - question: "Describe the change in one line (imperative mood, e.g., 'Add user authentication')"
172
+ - Allow free text via "Other" option
173
+
174
+ 3. Add the entry to the appropriate section under `[Unreleased]`, creating the category heading if needed.
175
+
176
+ ### Step 7: "Prepare for Release" Flow
177
+
178
+ If user selected "Prepare for release":
179
+
180
+ 1. Show current `[Unreleased]` contents
181
+
182
+ 2. If empty, warn: "No unreleased changes found. Add entries first."
183
+
184
+ 3. Use AskUserQuestion:
185
+ - header: "Version"
186
+ - question: "What version number should this release be?"
187
+ - options:
188
+ - "Patch (x.y.Z)" — Bug fixes, minor changes
189
+ - "Minor (x.Y.0)" — New features, backwards compatible
190
+ - "Major (X.0.0)" — Breaking changes
191
+
192
+ 4. Calculate new version number based on selection and current version
193
+
194
+ 5. Move `[Unreleased]` content to new version section with today's date
195
+
196
+ 6. Update comparison links at bottom of file
197
+
198
+ 7. Clear `[Unreleased]` section (keep heading and comment)
199
+
200
+ ## Output
201
+
202
+ Report what was created/modified:
203
+
204
+ ```
205
+ Changelog: [created | updated]
206
+ - Path: ./CHANGELOG.md
207
+ - Current version: X.Y.Z
208
+ - Unreleased changes: [count] entries
209
+
210
+ CLAUDE.md: [updated | unchanged]
211
+ - Changelog instructions: [added | already present | skipped]
212
+ ```
213
+
214
+ ## Key Principles (Keep a Changelog)
215
+
216
+ 1. **For humans, not machines** — Write clear, readable entries
217
+ 2. **One entry per version** — Group changes by release
218
+ 3. **Newest first** — Latest version at top
219
+ 4. **ISO 8601 dates** — Use YYYY-MM-DD format
220
+ 5. **Linkable** — Version headers link to diffs
221
+ 6. **Track unreleased** — Always maintain [Unreleased] section
222
+ 7. **Use standard categories** — Added, Changed, Deprecated, Removed, Fixed, Security
@@ -10,12 +10,13 @@ This command updates the **davenov-cc** npm package — a collection of Claude C
10
10
 
11
11
  ## Instructions
12
12
 
13
- Run the npx command to fetch and install the latest version:
13
+ Run the npx command with the `--update` flag to fetch and install the latest version:
14
14
 
15
15
  ```bash
16
- npx davenov-cc@latest
16
+ npx davenov-cc@latest --update
17
17
  ```
18
18
 
19
- The `@latest` tag ensures npm fetches the newest version, bypassing any cached versions.
19
+ - The `@latest` tag ensures npm fetches the newest version, bypassing any cached versions
20
+ - The `--update` flag skips confirmation prompts since we're updating existing files
20
21
 
21
22
  Report the results to the user.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davenov-cc",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Claude Code customizations - skills and slash commands for enhanced AI-assisted development",
5
5
  "bin": {
6
6
  "davenov-cc": "./bin/cli.js"