claude-code-autoconfig 1.0.161 → 1.0.163

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +152 -0
  2. package/bin/cli.js +49 -2
  3. package/package.json +6 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,152 @@
1
+ # Changelog
2
+
3
+ ## v1.0.162
4
+ - feat: show changelog on upgrade
5
+
6
+ ## v1.0.161
7
+ - fix(docs): top-align and left-align table cells in sync script
8
+
9
+ ## v1.0.160
10
+ - fix: hide same-version updates in CLI output, top-align docs tables
11
+
12
+ ## v1.0.159
13
+ - fix: exclude cca.config.json from npm publish
14
+
15
+ ## v1.0.158
16
+ - fix(gls): persist screenshot path in local config, fix Windows paths
17
+
18
+ ## v1.0.157
19
+ - feat: stop pre-populating CLAUDE.md with project descriptions
20
+
21
+ ## v1.0.156
22
+ - fix: clean up inside-Claude block message wording
23
+
24
+ ## v1.0.155
25
+ - feat: pre-approve permissions for all shipped command dependencies
26
+
27
+ ## v1.0.154
28
+ - fix: enforce ls -t over find in gls command to avoid permission prompts
29
+
30
+ ## v1.0.153
31
+ - style: left-align all table cells in docs info cards
32
+
33
+ ## v1.0.152
34
+ - fix: warn against ! prefix workaround in inside-Claude message
35
+
36
+ ## v1.0.151
37
+ - fix: scope find permission to project directory for security
38
+
39
+ ## v1.0.150
40
+ - style: use pointing emoji in inside-Claude message
41
+
42
+ ## v1.0.149
43
+ - style: consolidate inside-Claude message to two lines
44
+
45
+ ## v1.0.148
46
+ - fix: refine inside-Claude error wording
47
+
48
+ ## v1.0.147
49
+ - fix: make inside-Claude error message more specific
50
+
51
+ ## v1.0.146
52
+ - style: improve inside-Claude block message formatting
53
+
54
+ ## v1.0.145
55
+ - fix: block npx install from inside Claude Code session
56
+
57
+ ## v1.0.144
58
+ - feat: swagger-style docs, wider layout, better install UX
59
+
60
+ ## v1.0.143
61
+ - feat: add /validate-cca-install command
62
+
63
+ ## v1.0.142
64
+ - feat(recover-context): support cross-session recovery
65
+
66
+ ## v1.0.141
67
+ - fix: replace Windows NUL cleanup with cross-platform command
68
+
69
+ ## v1.0.140
70
+ - docs: trim recover-context usage to essential examples
71
+
72
+ ## v1.0.139
73
+ - fix: render usage params as structured HTML list in docs info cards
74
+
75
+ ## v1.0.138
76
+ - feat: auto-include Usage sections in docs info cards
77
+
78
+ ## v1.0.137
79
+ - docs: add usage params to recover-context docs and make dash optional
80
+
81
+ ## v1.0.136
82
+ - fix: modernize permission syntax and merge perms on upgrade
83
+
84
+ ## v1.0.135
85
+ - feat: auto-sync docs with .claude/ contents via sync-docs.js
86
+
87
+ ## v1.0.134
88
+ - fix: add missing hooks/updates to docs, expand sync tests
89
+
90
+ ## v1.0.133
91
+ - fix: add recover-context, gls, and autoconfig-update to interactive docs
92
+
93
+ ## v1.0.132
94
+ - fix: strengthen bootstrap step instruction so Claude executes it
95
+
96
+ ## v1.0.131
97
+ - feat: support running autoconfig from inside Claude Code sessions
98
+
99
+ ## v1.0.130
100
+ - fix: block interactive install from inside Claude Code sessions
101
+
102
+ ## v1.0.129
103
+ - fix: tighten /recover-context confirmation to single line
104
+
105
+ ## v1.0.128
106
+ - fix: show estimated tokens instead of bytes in /recover-context
107
+
108
+ ## v1.0.127
109
+ - feat: SessionStart hook for feedback migration, merge hooks on upgrade
110
+
111
+ ## v1.0.126
112
+ - feat: add FEEDBACK.md migration to /autoconfig Step 0
113
+
114
+ ## v1.0.125
115
+ - feat: auto-migrate FEEDBACK.md to Discoveries during CLI upgrade
116
+
117
+ ## v1.0.124
118
+ - fix: remove Step 0 from /autoconfig, clarify terminal requirement
119
+
120
+ ## v1.0.123
121
+ - fix: use npm exec instead of npx in Step 0
122
+
123
+ ## v1.0.122
124
+ - feat: /autoconfig pulls latest package before configuring
125
+
126
+ ## v1.0.121
127
+ - feat: add feedback-to-discoveries migration update (004)
128
+
129
+ ## v1.0.120
130
+ - feat: separate Claude discoveries from human feedback
131
+
132
+ ## v1.0.119
133
+ - fix: remove nul deny rules that block Windows bash redirections
134
+
135
+ ## v1.0.118
136
+ - feat: add feedback-to-rules migration update (003)
137
+
138
+ ## v1.0.117
139
+ - refactor: let Claude evaluate rule migration candidates
140
+
141
+ ## v1.0.116
142
+ - feat: improve FEEDBACK.md reliability and add rule migration hook
143
+
144
+ ## v1.0.115
145
+ - feat: add @version tracking to all command files
146
+
147
+ ## v1.0.114
148
+ - fix: detect updated commands, remove redundant update file
149
+
150
+ ## v1.0.113
151
+ - fix: remove redundant installed commands list from upgrade output
152
+
package/bin/cli.js CHANGED
@@ -27,7 +27,7 @@ const WINDOWS_RESERVED = ['CON', 'PRN', 'AUX', 'NUL', 'COM1', 'COM2', 'COM3', 'C
27
27
  'LPT6', 'LPT7', 'LPT8', 'LPT9'];
28
28
 
29
29
  // Files/folders installed by autoconfig - don't backup these
30
- const AUTOCONFIG_FILES = ['commands', 'guide', 'agents', 'migration', 'hooks', 'updates', 'scripts'];
30
+ const AUTOCONFIG_FILES = ['commands', 'docs', 'agents', 'migration', 'hooks', 'updates', 'scripts', 'rules'];
31
31
 
32
32
  function isReservedName(name) {
33
33
  const baseName = name.replace(/\.[^.]*$/, '').toUpperCase();
@@ -297,6 +297,13 @@ cp .claude/migration/${timestamp}/settings.json .claude/settings.json
297
297
  }
298
298
  }
299
299
 
300
+ // Read previous installed version (before copying overwrites it)
301
+ const versionFile = path.join(claudeDest, '.autoconfig-version');
302
+ const previousVersion = fs.existsSync(versionFile)
303
+ ? fs.readFileSync(versionFile, 'utf8').trim()
304
+ : null;
305
+ const currentVersion = require(path.join(packageDir, 'package.json')).version;
306
+
300
307
  // Detect upgrade vs fresh install (must run BEFORE copying files)
301
308
  const isUpgrade = (() => {
302
309
  // Indicator 1: CLAUDE.md has autoconfig marker
@@ -611,6 +618,9 @@ if (isUpgrade) {
611
618
  }
612
619
  }
613
620
 
621
+ // Write current version marker
622
+ fs.writeFileSync(versionFile, currentVersion);
623
+
614
624
  const launchCommand = isUpgrade ? '/autoconfig-update' : '/autoconfig';
615
625
 
616
626
  // --bootstrap: copy files only, exit silently (used by /autoconfig inside Claude)
@@ -647,7 +657,44 @@ if (isUpgrade) {
647
657
  console.log('\x1b[33m║ ║\x1b[0m');
648
658
  console.log('\x1b[33m╚════════════════════════════════════════════╝\x1b[0m');
649
659
  }
650
- console.log();
660
+ // Show changelog on upgrade
661
+ if (isUpgrade && previousVersion) {
662
+ const changelogPath = path.join(packageDir, 'CHANGELOG.md');
663
+ if (fs.existsSync(changelogPath)) {
664
+ const changelog = fs.readFileSync(changelogPath, 'utf8');
665
+ const prevPatch = parseInt(previousVersion.split('.').pop(), 10);
666
+ const entries = [];
667
+ let currentEntry = null;
668
+ for (const line of changelog.split(/\r?\n/)) {
669
+ if (line.startsWith('## v')) {
670
+ const ver = line.slice(3).trim();
671
+ const patch = parseInt(ver.split('.').pop(), 10);
672
+ currentEntry = patch > prevPatch ? { ver, items: [] } : null;
673
+ } else if (currentEntry && line.startsWith('- ')) {
674
+ currentEntry.items.push(line.slice(2));
675
+ } else if (currentEntry && line === '' && currentEntry.items.length > 0) {
676
+ entries.push(currentEntry);
677
+ currentEntry = null;
678
+ }
679
+ }
680
+ if (currentEntry && currentEntry.items.length > 0) entries.push(currentEntry);
681
+ if (entries.length > 0) {
682
+ console.log(`\x1b[90m What's new since v${previousVersion}:\x1b[0m`);
683
+ console.log();
684
+ const show = entries.slice(0, 10);
685
+ for (const e of show) {
686
+ for (const item of e.items) {
687
+ console.log(`\x1b[90m ${e.ver} — ${item}\x1b[0m`);
688
+ }
689
+ }
690
+ const remaining = entries.length - show.length;
691
+ if (remaining > 0) {
692
+ console.log(`\x1b[90m ... and ${remaining} more (see CHANGELOG.md)\x1b[0m`);
693
+ }
694
+ console.log();
695
+ }
696
+ }
697
+ }
651
698
  if (!isUpgrade) {
652
699
  console.log('\x1b[90m%s\x1b[0m', "You'll need to approve a few file prompts to complete the installation.");
653
700
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.161",
3
+ "version": "1.0.163",
4
4
  "description": "Intelligent, self-configuring setup for Claude Code. One command analyzes your project, configures Claude, and shows you what it did.",
5
5
  "author": "ADAC 1001 <info@adac1001.com>",
6
6
  "license": "MIT",
@@ -25,7 +25,8 @@
25
25
  "test": "node test/box-alignment.test.js && node test/cli-install.test.js && node test/update-system.test.js",
26
26
  "test:box": "node test/box-alignment.test.js",
27
27
  "test:install": "node test/cli-install.test.js",
28
- "test:update": "node test/update-system.test.js"
28
+ "test:update": "node test/update-system.test.js",
29
+ "preversion": "node scripts/generate-changelog.js && git add CHANGELOG.md"
29
30
  },
30
31
  "bin": {
31
32
  "claude-code-autoconfig": "./bin/cli.js"
@@ -35,9 +36,11 @@
35
36
  ".claude",
36
37
  "!.claude/settings.local.json",
37
38
  "!.claude/cca.config.json",
39
+ "!.claude/.autoconfig-version",
38
40
  "!.claude/commands/publish.md",
39
41
  "!.claude/plans",
40
- "CLAUDE.md"
42
+ "CLAUDE.md",
43
+ "CHANGELOG.md"
41
44
  ],
42
45
  "engines": {
43
46
  "node": ">=16.0.0"