claude-code-autoconfig 1.0.136 → 1.0.138

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.
@@ -1,14 +1,15 @@
1
1
  <!-- @description Recovers conversation context from the session transcript after compaction. -->
2
- <!-- @version 2 -->
2
+ <!-- @version 3 -->
3
3
  Recover recent conversation context from the raw session transcript on disk.
4
4
 
5
5
  Usage:
6
6
  - `/recover-context -60` — last 60 minutes of conversation
7
+ - `/recover-context 60` — same thing (dash is optional)
7
8
  - `/recover-context -30` — last 30 minutes
8
9
  - `/recover-context -120` — last 2 hours
9
10
  - `/recover-context -60 --show` — same as above, but also opens the filtered transcript in default editor
10
11
 
11
- The negative number means "go back N minutes from now." The minutes argument is **required**.
12
+ The number means "go back N minutes from now." The leading dash is optional. The minutes argument is **required**.
12
13
 
13
14
  ## Step 1: Parse the arguments
14
15
 
@@ -1263,7 +1263,7 @@
1263
1263
  title: '.claude/ Directory',
1264
1264
  desc: 'Commands, rules, settings, and these docs. Keeps configuration organized as your project grows.'
1265
1265
  },
1266
- 'rules': {
1266
+ 'rules': {
1267
1267
  title: 'rules/',
1268
1268
  desc: 'Path-scoped context that loads when Claude works on matching files.'
1269
1269
  },
@@ -1305,7 +1305,7 @@
1305
1305
  },
1306
1306
  'gls': {
1307
1307
  title: 'gls.md',
1308
- desc: 'gls.md in commands/',
1308
+ desc: 'gls.md in commands/\n\n- `/gls` - Get and display the most recent screenshot\n- `/gls-2` - Get and display the 2 most recent screenshots\n- `/gls-3` - Get and display the 3 most recent screenshots\n- `/gls-N` - Get and display the N most recent screenshots\n- `/gls /path/to/dir` - Use a specific directory and save it',
1309
1309
  trigger: '/gls'
1310
1310
  },
1311
1311
  'publish': {
@@ -1315,7 +1315,7 @@
1315
1315
  },
1316
1316
  'recover-context': {
1317
1317
  title: 'recover-context.md',
1318
- desc: 'Recovers conversation context from the session transcript after compaction.',
1318
+ desc: 'Recovers conversation context from the session transcript after compaction.\n\n- `/recover-context -60` — last 60 minutes of conversation\n- `/recover-context 60` — same thing (dash is optional)\n- `/recover-context -30` — last 30 minutes\n- `/recover-context -120` — last 2 hours\n- `/recover-context -60 --show` — same as above, but also opens the filtered transcript in default editor',
1319
1319
  trigger: '/recover-context'
1320
1320
  },
1321
1321
  'show-docs': {
@@ -1569,7 +1569,7 @@ CRITICAL: A plausible-looking cause from code reading is NOT confirmed evidence.
1569
1569
 
1570
1570
  > Run \`/autoconfig\` to populate this based on your project.`
1571
1571
  },
1572
- 'autoconfig-update': {
1572
+ 'autoconfig-update': {
1573
1573
  filename: 'autoconfig-update.md',
1574
1574
  content: `<!-- @applied
1575
1575
  -->
@@ -1760,11 +1760,12 @@ Run tests, bump the patch version, commit, push, and publish to npm.
1760
1760
 
1761
1761
  Usage:
1762
1762
  - \`/recover-context -60\` — last 60 minutes of conversation
1763
+ - \`/recover-context 60\` — same thing (dash is optional)
1763
1764
  - \`/recover-context -30\` — last 30 minutes
1764
1765
  - \`/recover-context -120\` — last 2 hours
1765
1766
  - \`/recover-context -60 --show\` — same as above, but also opens the filtered transcript in default editor
1766
1767
 
1767
- The negative number means "go back N minutes from now." The minutes argument is **required**.
1768
+ The number means "go back N minutes from now." The leading dash is optional. The minutes argument is **required**.
1768
1769
 
1769
1770
  ## Step 1: Parse the arguments
1770
1771
 
@@ -2047,82 +2048,86 @@ Claude reads this file but must never write to it. When Claude discovers project
2047
2048
  },
2048
2049
  'settings': {
2049
2050
  filename: 'settings.json',
2050
- content: `{
2051
- "env": {
2052
- "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0"
2053
- },
2054
- "hooks": {
2055
- "SessionStart": [
2056
- {
2057
- "matcher": "",
2058
- "hooks": [
2059
- {
2060
- "type": "command",
2061
- "command": "node .claude/hooks/migrate-feedback.js"
2062
- }
2063
- ]
2064
- }
2065
- ],
2066
- "PostToolUse": [
2067
- {
2068
- "matcher": "Edit|Write",
2069
- "hooks": [
2070
- {
2071
- "type": "command",
2072
- "command": "node .claude/hooks/feedback-rule-check.js"
2073
- }
2074
- ]
2075
- }
2076
- ]
2077
- },
2078
- "permissions": {
2079
- "allow": [
2080
- "Read(./**)",
2081
- "Edit(./**)",
2082
- "Write(./**)",
2083
- "Glob",
2084
- "Grep",
2085
- "WebSearch",
2086
- "WebFetch",
2087
- "Bash(npm run dev)",
2088
- "Bash(npm run build)",
2089
- "Bash(npm run lint)",
2090
- "Bash(npm run lint:fix)",
2091
- "Bash(npm run typecheck)",
2092
- "Bash(npm run test)",
2093
- "Bash(npm run test:*)",
2094
- "Bash(npm run validate)",
2095
- "Bash(git status)",
2096
- "Bash(git diff:*)",
2097
- "Bash(git add:*)",
2098
- "Bash(git commit:*)",
2099
- "Bash(git push:*)",
2100
- "Bash(git pull)",
2101
- "Bash(git checkout:*)",
2102
- "Bash(git branch:*)",
2103
- "Bash(ls:*)",
2104
- "Bash(dir:*)",
2105
- "Bash(mkdir:*)",
2106
- "Bash(mkdir -p:*)",
2107
- "Bash(start:*)",
2108
- "Bash(start .claude:*)",
2109
- "Bash(open:*)",
2110
- "Bash(open .claude:*)",
2111
- "Bash(xdg-open:*)",
2112
- "Bash(xdg-open .claude:*)"
2113
- ],
2114
- "deny": [
2115
- "Read(./.env)",
2116
- "Read(./.env.*)",
2117
- "Read(./secrets/**)",
2118
- "Read(./**/credentials.*)",
2119
- "Read(./**/*.pem)",
2120
- "Read(./**/*.key)",
2121
- "Bash(rm -rf:*)",
2122
- "Bash(curl:*)",
2123
- "Bash(wget:*)"
2124
- ]
2125
- }
2051
+ content: `{
2052
+ "env": {
2053
+ "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0"
2054
+ },
2055
+ "hooks": {
2056
+ "SessionStart": [
2057
+ {
2058
+ "matcher": "",
2059
+ "hooks": [
2060
+ {
2061
+ "type": "command",
2062
+ "command": "node .claude/hooks/migrate-feedback.js"
2063
+ }
2064
+ ]
2065
+ }
2066
+ ],
2067
+ "PostToolUse": [
2068
+ {
2069
+ "matcher": "Edit|Write",
2070
+ "hooks": [
2071
+ {
2072
+ "type": "command",
2073
+ "command": "node .claude/hooks/feedback-rule-check.js"
2074
+ }
2075
+ ]
2076
+ }
2077
+ ]
2078
+ },
2079
+ "permissions": {
2080
+ "allow": [
2081
+ "Read(./**)",
2082
+ "Edit(./**)",
2083
+ "Write(./**)",
2084
+ "Glob",
2085
+ "Grep",
2086
+ "WebSearch",
2087
+ "WebFetch",
2088
+ "Bash(npm test)",
2089
+ "Bash(npm test *)",
2090
+ "Bash(npm run dev)",
2091
+ "Bash(npm run build)",
2092
+ "Bash(npm run lint)",
2093
+ "Bash(npm run lint:fix)",
2094
+ "Bash(npm run typecheck)",
2095
+ "Bash(npm run test)",
2096
+ "Bash(npm run test:*)",
2097
+ "Bash(npm run validate)",
2098
+ "Bash(git status)",
2099
+ "Bash(git status *)",
2100
+ "Bash(git diff *)",
2101
+ "Bash(git add *)",
2102
+ "Bash(git commit *)",
2103
+ "Bash(git push *)",
2104
+ "Bash(git pull)",
2105
+ "Bash(git pull *)",
2106
+ "Bash(git checkout *)",
2107
+ "Bash(git branch *)",
2108
+ "Bash(ls *)",
2109
+ "Bash(dir *)",
2110
+ "Bash(mkdir *)",
2111
+ "Bash(mkdir -p *)",
2112
+ "Bash(start *)",
2113
+ "Bash(start .claude *)",
2114
+ "Bash(open *)",
2115
+ "Bash(open .claude *)",
2116
+ "Bash(xdg-open *)",
2117
+ "Bash(xdg-open .claude *)"
2118
+ ],
2119
+ "deny": [
2120
+ "Read(./.env)",
2121
+ "Read(./.env.*)",
2122
+ "Read(./secrets/**)",
2123
+ "Read(./**/credentials.*)",
2124
+ "Read(./**/*.pem)",
2125
+ "Read(./**/*.key)",
2126
+ "Bash(rm -rf *)",
2127
+ "Bash(curl *)",
2128
+ "Bash(wget *)"
2129
+ ]
2130
+ }
2126
2131
  }`
2127
2132
  },
2128
2133
  'mcp': {
@@ -81,6 +81,29 @@ function extractDescription(content, ext) {
81
81
  return null;
82
82
  }
83
83
 
84
+ /**
85
+ * Extract usage lines from a command file's content.
86
+ * Looks for a "Usage:" section and collects the bullet points.
87
+ */
88
+ function extractUsage(content) {
89
+ const lines = content.split(/\r?\n/);
90
+ const usageIdx = lines.findIndex(l => /^Usage:$/i.test(l.trim()));
91
+ if (usageIdx === -1) return null;
92
+
93
+ const usageLines = [];
94
+ for (let i = usageIdx + 1; i < lines.length; i++) {
95
+ const line = lines[i].trim();
96
+ if (line.startsWith('- ')) {
97
+ usageLines.push(line);
98
+ } else if (line === '') {
99
+ continue; // skip blank lines within usage block
100
+ } else {
101
+ break; // end of usage block
102
+ }
103
+ }
104
+ return usageLines.length > 0 ? usageLines.join('\\n') : null;
105
+ }
106
+
84
107
  /**
85
108
  * Extract @trigger from a JS file's JSDoc.
86
109
  */
@@ -170,8 +193,9 @@ function scanFiles() {
170
193
  const desc = extractDescription(content, ext) || `${file} in ${folder}/`;
171
194
  const trigger = deriveTrigger(folder, file, content);
172
195
  const preview = generatePreview(content, ext);
196
+ const usage = (folder === 'commands') ? extractUsage(content) : null;
173
197
 
174
- entries.push({ key, folder, file, desc, trigger, preview });
198
+ entries.push({ key, folder, file, desc, trigger, preview, usage });
175
199
  }
176
200
  }
177
201
 
@@ -317,7 +341,11 @@ function generateTreeInfo(entries) {
317
341
  for (const entry of entries) {
318
342
  if (entry.isEmptyFolder) continue;
319
343
 
320
- const escapedDesc = entry.desc.replace(/'/g, "\\'");
344
+ let fullDesc = entry.desc;
345
+ if (entry.usage) {
346
+ fullDesc += '\\n\\n' + entry.usage;
347
+ }
348
+ const escapedDesc = fullDesc.replace(/'/g, "\\'");
321
349
  lines.push(` '${entry.key}': {`);
322
350
  lines.push(` title: '${entry.file}',`);
323
351
  lines.push(` desc: '${escapedDesc}'${entry.trigger ? ',' : ''}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.136",
3
+ "version": "1.0.138",
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",