cc-dev-template 0.1.45 → 0.1.46

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/bin/install.js CHANGED
@@ -251,6 +251,25 @@ if (fs.existsSync(mergeSettingsPath)) {
251
251
  });
252
252
  }
253
253
 
254
+ // Remove deprecated plugins
255
+ console.log('\nCleanup:');
256
+ if (fs.existsSync(settingsFile)) {
257
+ try {
258
+ const settings = JSON.parse(fs.readFileSync(settingsFile, 'utf8'));
259
+ if (settings.enabledPlugins && settings.enabledPlugins['code-simplifier@claude-plugins-official']) {
260
+ delete settings.enabledPlugins['code-simplifier@claude-plugins-official'];
261
+ fs.writeFileSync(settingsFile, JSON.stringify(settings, null, 2));
262
+ console.log('✓ Removed deprecated code-simplifier plugin');
263
+ } else {
264
+ console.log(' No deprecated plugins to remove');
265
+ }
266
+ } catch (e) {
267
+ console.log(' No deprecated plugins to remove');
268
+ }
269
+ } else {
270
+ console.log(' No deprecated plugins to remove');
271
+ }
272
+
254
273
  console.log('\n' + '='.repeat(50));
255
274
  console.log('Installation complete!');
256
275
  console.log('='.repeat(50));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-dev-template",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "Structured AI-assisted development framework for Claude Code",
5
5
  "bin": {
6
6
  "cc-dev-template": "./bin/install.js"
@@ -19,17 +19,11 @@ This requires full conversation context. Handle it yourself rather than delegati
19
19
 
20
20
  ## Steps
21
21
 
22
- **1. Run the code simplifier**
23
-
24
- Stage your changes, then use the code simplifier agent to refine them for clarity and consistency. Run tests afterward to verify nothing broke.
25
-
26
- Skip this step if no code simplifier agent is available.
27
-
28
- **2. Commit your work**
22
+ **1. Commit your work**
29
23
 
30
24
  Write clear commit messages that explain what was accomplished. This IS your record of completed work.
31
25
 
32
- **3. Update `docs/CURRENT_WORK.md`**
26
+ **2. Update `docs/CURRENT_WORK.md`**
33
27
 
34
28
  This file is forward-looking. Review it holistically and ensure it contains ONLY:
35
29
 
@@ -46,7 +40,7 @@ This file is forward-looking. Review it holistically and ensure it contains ONLY
46
40
 
47
41
  The file should be scannable in 30 seconds. If it takes longer, it's too long.
48
42
 
49
- **4. Capture workflow discoveries (rarely)**
43
+ **3. Capture workflow discoveries (rarely)**
50
44
 
51
45
  Add to CLAUDE.md only high-value operational knowledge that can't be found by reading code:
52
46
  - Dev commands, ports, local URLs
@@ -55,11 +49,11 @@ Add to CLAUDE.md only high-value operational knowledge that can't be found by re
55
49
 
56
50
  Most sessions: add nothing.
57
51
 
58
- **5. Push**
52
+ **4. Push**
59
53
 
60
54
  Push your commits to the remote.
61
55
 
62
- **6. Report what was updated**
56
+ **5. Report what was updated**
63
57
 
64
58
  Summarize: commits made, CURRENT_WORK.md changes, any items removed/added.
65
59
 
@@ -191,18 +191,35 @@ function main() {
191
191
 
192
192
  // Get token usage from context_window (available in Claude Code v2.0.70+)
193
193
  let tokenData = null;
194
- if (data.context_window?.current_usage) {
195
- const usage = data.context_window.current_usage;
196
- const used =
197
- (usage.input_tokens || 0) +
198
- (usage.cache_read_input_tokens || 0) +
199
- (usage.cache_creation_input_tokens || 0);
194
+ if (data.context_window) {
200
195
  const limit = data.context_window.context_window_size || 200000;
201
- tokenData = {
202
- used,
203
- limit,
204
- percentage: Math.min(100, Math.round((used / limit) * 100)),
205
- };
196
+
197
+ // Use new percentage fields if available (v2.1.6+)
198
+ if (typeof data.context_window.used_percentage === 'number') {
199
+ const usage = data.context_window.current_usage;
200
+ const used = usage
201
+ ? (usage.input_tokens || 0) +
202
+ (usage.cache_read_input_tokens || 0) +
203
+ (usage.cache_creation_input_tokens || 0)
204
+ : 0;
205
+ tokenData = {
206
+ used,
207
+ limit,
208
+ percentage: Math.round(data.context_window.used_percentage),
209
+ };
210
+ } else if (data.context_window.current_usage) {
211
+ // Fallback to manual calculation for older versions
212
+ const usage = data.context_window.current_usage;
213
+ const used =
214
+ (usage.input_tokens || 0) +
215
+ (usage.cache_read_input_tokens || 0) +
216
+ (usage.cache_creation_input_tokens || 0);
217
+ tokenData = {
218
+ used,
219
+ limit,
220
+ percentage: Math.min(100, Math.round((used / limit) * 100)),
221
+ };
222
+ }
206
223
  }
207
224
 
208
225
  // Generate context display