claude-code-autoconfig 1.0.142 → 1.0.144
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/.claude/commands/autoconfig-update.md +4 -0
- package/.claude/commands/autoconfig.md +5 -1
- package/.claude/commands/commit-and-push.md +4 -0
- package/.claude/commands/enable-retro.md +3 -0
- package/.claude/commands/gls.md +10 -0
- package/.claude/commands/recover-context.md +9 -0
- package/.claude/commands/show-docs.md +4 -0
- package/.claude/commands/sync-claude-md.md +3 -0
- package/.claude/commands/test.md +7 -0
- package/.claude/commands/validate-cca-install.md +205 -0
- package/.claude/docs/autoconfig.docs.html +65 -23
- package/.claude/scripts/sync-docs.js +97 -26
- package/README.md +3 -1
- package/bin/cli.js +7 -1
- package/package.json +1 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<!-- @description Manages and installs updates to Claude Code configuration. -->
|
|
2
2
|
<!-- @version 1 -->
|
|
3
|
+
<!-- @response updates-available | Displays list of pending updates with install/review options. -->
|
|
4
|
+
<!-- @response up-to-date | All updates are already installed. -->
|
|
5
|
+
<!-- @sideeffect Pulls latest update files from npm, executes update instructions, tracks applied updates -->
|
|
6
|
+
<!-- @example /autoconfig-update | Check for and install configuration updates -->
|
|
3
7
|
|
|
4
8
|
<!-- @applied
|
|
5
9
|
-->
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
<!-- @description
|
|
1
|
+
<!-- @description Analyzes your project and populates CLAUDE.md with real context. Re-run anytime your stack changes. -->
|
|
2
2
|
<!-- @version 8 -->
|
|
3
|
+
<!-- @response success | CLAUDE.md populated, settings configured, docs opened in browser. -->
|
|
4
|
+
<!-- @response no-project | No project detected — asks user to confirm directory. -->
|
|
5
|
+
<!-- @sideeffect Generates CLAUDE.md, settings.json, hooks, and MEMORY.md -->
|
|
6
|
+
<!-- @example /autoconfig | Analyze project and configure Claude -->
|
|
3
7
|
|
|
4
8
|
# Autoconfig
|
|
5
9
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<!-- @description Runs tests, then stages all changes, generates a conventional commit message, commits, and pushes. -->
|
|
2
2
|
<!-- @version 1 -->
|
|
3
|
+
<!-- @response success | Changes committed and pushed to current branch. -->
|
|
4
|
+
<!-- @response test-failure | Tests failed — no commit made. -->
|
|
5
|
+
<!-- @sideeffect Runs test suite, stages all changes, creates git commit, pushes to remote -->
|
|
6
|
+
<!-- @example /commit-and-push | Run tests, commit, and push -->
|
|
3
7
|
|
|
4
8
|
# Commit and Push
|
|
5
9
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<!-- @description (Experimental) Enable Claude to log tech debt it encounters into .claude/retro. -->
|
|
2
2
|
<!-- @version 1 -->
|
|
3
|
+
<!-- @response success | Retro enabled — Claude will log tech debt to .claude/retro/ when encountered. -->
|
|
4
|
+
<!-- @sideeffect Creates .claude/retro/README.md, adds agent, updates CLAUDE.md -->
|
|
5
|
+
<!-- @example /enable-retro | Activate tech debt tracking -->
|
|
3
6
|
|
|
4
7
|
# Enable Retro
|
|
5
8
|
|
package/.claude/commands/gls.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
<!-- @screenshotDir /c/Users/andre/OneDrive/Pictures/Screenshots 1 -->
|
|
2
|
+
<!-- @description Get the latest screenshot(s) and display them. -->
|
|
2
3
|
<!-- @version 1 -->
|
|
4
|
+
<!-- @param count | integer | optional | Number of screenshots to display. Use /gls-N syntax. Default: 1. Min: 1. -->
|
|
5
|
+
<!-- @param path | string | optional | Screenshot directory path. Saved for future use. Auto-detected if omitted. -->
|
|
6
|
+
<!-- @response success | Displays requested screenshot(s) from newest to oldest. -->
|
|
7
|
+
<!-- @response no-screenshots | Directory exists but contains no image files. -->
|
|
8
|
+
<!-- @response no-directory | Unable to detect screenshot directory — prompts for path. -->
|
|
9
|
+
<!-- @sideeffect Saves detected screenshot path to command file on first run -->
|
|
10
|
+
<!-- @example /gls | Display the most recent screenshot -->
|
|
11
|
+
<!-- @example /gls-3 | Display the 3 most recent screenshots -->
|
|
12
|
+
<!-- @example /gls /path/to/dir | Use a specific screenshot directory -->
|
|
3
13
|
Get the latest screenshot(s) and display them.
|
|
4
14
|
|
|
5
15
|
Usage:
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
<!-- @description Recovers conversation context from the session transcript after compaction. -->
|
|
2
2
|
<!-- @version 4 -->
|
|
3
|
+
<!-- @param minutes | integer | required | How far back to recover, in minutes. Leading dash optional. Min: 1. -->
|
|
4
|
+
<!-- @param --show | flag | optional | Opens the extracted transcript in your default editor. -->
|
|
5
|
+
<!-- @response success | ~{tokens} tokens recovered ({N} messages across {sessions} session(s), last {minutes} min). -->
|
|
6
|
+
<!-- @response no-transcript | No transcript files found. -->
|
|
7
|
+
<!-- @response no-messages | No messages found in the requested time range. -->
|
|
8
|
+
<!-- @sideeffect Reads .jsonl transcripts from ~/.claude/projects/, writes temp file -->
|
|
9
|
+
<!-- @example /recover-context -60 | Last 60 minutes of conversation -->
|
|
10
|
+
<!-- @example /recover-context 120 | Last 2 hours (dash optional) -->
|
|
11
|
+
<!-- @example /recover-context -60 --show | Last 60 min + open transcript file -->
|
|
3
12
|
Recover recent conversation context from the raw session transcript on disk.
|
|
4
13
|
|
|
5
14
|
Usage:
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<!-- @description Opens the interactive docs in your browser. -->
|
|
2
2
|
<!-- @version 2 -->
|
|
3
|
+
<!-- @response success | Docs synced and opened in default browser. -->
|
|
4
|
+
<!-- @response no-docs | Docs file not found — run /autoconfig first. -->
|
|
5
|
+
<!-- @sideeffect Runs sync-docs.js to refresh content, opens browser -->
|
|
6
|
+
<!-- @example /show-docs | Open interactive documentation -->
|
|
3
7
|
|
|
4
8
|
# Show Docs
|
|
5
9
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<!-- @description Re-analyzes your project and updates CLAUDE.md to reflect current state. -->
|
|
2
2
|
<!-- @version 2 -->
|
|
3
|
+
<!-- @response success | CLAUDE.md updated with current project state. -->
|
|
4
|
+
<!-- @sideeffect Overwrites auto-generated sections of CLAUDE.md, preserves Discoveries section -->
|
|
5
|
+
<!-- @example /sync-claude-md | Re-scan project and update CLAUDE.md -->
|
|
3
6
|
|
|
4
7
|
# Sync CLAUDE.md
|
|
5
8
|
|
package/.claude/commands/test.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<!-- @description Runs your test suite. Auto-detects Jest, Vitest, Pytest, Go, RSpec, or falls back to npm test. -->
|
|
2
2
|
<!-- @version 1 -->
|
|
3
|
+
<!-- @param scope | string | optional | File, directory, or pattern to limit test run. Runs full suite if omitted. -->
|
|
4
|
+
<!-- @response success | Test suite passes. -->
|
|
5
|
+
<!-- @response failure | Test suite fails with non-zero exit code. -->
|
|
6
|
+
<!-- @sideeffect Executes detected test runner command -->
|
|
7
|
+
<!-- @example /test | Run full test suite -->
|
|
8
|
+
<!-- @example /test src/auth | Run tests in src/auth directory -->
|
|
9
|
+
<!-- @example /test --coverage | Run tests with coverage report -->
|
|
3
10
|
|
|
4
11
|
# Run Tests
|
|
5
12
|
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
<!-- @description Validates your claude-code-autoconfig installation against the latest published version. -->
|
|
2
|
+
<!-- @version 1 -->
|
|
3
|
+
<!-- @response valid | Install validated — all checks passed. -->
|
|
4
|
+
<!-- @response issues | Validation found {N} issue(s) with fix suggestions. -->
|
|
5
|
+
<!-- @sideeffect Read-only. Downloads latest package to temp dir for comparison, then cleans up. -->
|
|
6
|
+
<!-- @example /validate-cca-install | Run full installation validation -->
|
|
7
|
+
Validate the current claude-code-autoconfig installation. Reports what's correct, what's outdated, and what's missing. **Does not modify anything.**
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
- `/validate-cca-install` — run a full validation check
|
|
11
|
+
|
|
12
|
+
## Step 1: Fetch the latest package metadata
|
|
13
|
+
|
|
14
|
+
Query the npm registry for the latest published version and its file manifest:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
python3 -c "
|
|
18
|
+
import json, urllib.request
|
|
19
|
+
url = 'https://registry.npmjs.org/claude-code-autoconfig/latest'
|
|
20
|
+
data = json.loads(urllib.request.urlopen(url, timeout=10).read())
|
|
21
|
+
print(json.dumps({'version': data.get('version', 'unknown')}))
|
|
22
|
+
"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Store the latest version as `$LATEST_VERSION`.
|
|
26
|
+
|
|
27
|
+
## Step 2: Download and extract the latest package to a temp directory
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
TMPDIR=$(mktemp -d)
|
|
31
|
+
npm pack claude-code-autoconfig@latest --pack-destination "$TMPDIR" 2>/dev/null
|
|
32
|
+
tar -xzf "$TMPDIR"/*.tgz -C "$TMPDIR"
|
|
33
|
+
echo "$TMPDIR/package"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Store the extracted path as `$PKG_DIR`. This gives us the ground truth for what files and versions should be installed.
|
|
37
|
+
|
|
38
|
+
## Step 3: Validate installed files
|
|
39
|
+
|
|
40
|
+
Run this Python script. Substitute `$PKG_DIR` with the temp package path and `$PROJECT_DIR` with the current working directory.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
python3 -c "
|
|
44
|
+
import json, os, re, sys
|
|
45
|
+
|
|
46
|
+
pkg_dir = '$PKG_DIR'
|
|
47
|
+
project_dir = '$PROJECT_DIR'
|
|
48
|
+
claude_dir = os.path.join(project_dir, '.claude')
|
|
49
|
+
|
|
50
|
+
def parse_version(content):
|
|
51
|
+
m = re.search(r'<!-- @version (\d+) -->', content)
|
|
52
|
+
return int(m.group(1)) if m else 0
|
|
53
|
+
|
|
54
|
+
def parse_description(content):
|
|
55
|
+
m = re.search(r'<!-- @description (.+?) -->', content)
|
|
56
|
+
return m.group(1).strip() if m else ''
|
|
57
|
+
|
|
58
|
+
issues = []
|
|
59
|
+
info = []
|
|
60
|
+
|
|
61
|
+
# --- 1. Check expected directories ---
|
|
62
|
+
expected_dirs = ['commands', 'agents', 'docs', 'feedback', 'hooks', 'scripts']
|
|
63
|
+
for d in expected_dirs:
|
|
64
|
+
local = os.path.join(claude_dir, d)
|
|
65
|
+
if not os.path.isdir(local):
|
|
66
|
+
issues.append(f'MISSING DIR: .claude/{d}/ does not exist')
|
|
67
|
+
else:
|
|
68
|
+
info.append(f'OK: .claude/{d}/ exists')
|
|
69
|
+
|
|
70
|
+
# --- 2. Check command files and versions ---
|
|
71
|
+
dev_only = ['publish.md']
|
|
72
|
+
pkg_cmds_dir = os.path.join(pkg_dir, '.claude', 'commands')
|
|
73
|
+
local_cmds_dir = os.path.join(claude_dir, 'commands')
|
|
74
|
+
|
|
75
|
+
if os.path.isdir(pkg_cmds_dir) and os.path.isdir(local_cmds_dir):
|
|
76
|
+
pkg_cmds = set(f for f in os.listdir(pkg_cmds_dir) if f.endswith('.md') and f not in dev_only)
|
|
77
|
+
local_cmds = set(f for f in os.listdir(local_cmds_dir) if f.endswith('.md') and f not in dev_only)
|
|
78
|
+
|
|
79
|
+
# Missing commands
|
|
80
|
+
for f in sorted(pkg_cmds - local_cmds):
|
|
81
|
+
issues.append(f'MISSING CMD: .claude/commands/{f} not installed')
|
|
82
|
+
|
|
83
|
+
# Extra commands (user-added, just note them)
|
|
84
|
+
for f in sorted(local_cmds - pkg_cmds):
|
|
85
|
+
if f not in dev_only:
|
|
86
|
+
info.append(f'EXTRA CMD: .claude/commands/{f} (user-added, not in package)')
|
|
87
|
+
|
|
88
|
+
# Version comparison for shared commands
|
|
89
|
+
for f in sorted(pkg_cmds & local_cmds):
|
|
90
|
+
pkg_content = open(os.path.join(pkg_cmds_dir, f), encoding='utf-8').read()
|
|
91
|
+
local_content = open(os.path.join(local_cmds_dir, f), encoding='utf-8').read()
|
|
92
|
+
pkg_v = parse_version(pkg_content)
|
|
93
|
+
local_v = parse_version(local_content)
|
|
94
|
+
if local_v < pkg_v:
|
|
95
|
+
issues.append(f'OUTDATED CMD: /{f.replace(\".md\",\"\")} is v{local_v}, latest is v{pkg_v}')
|
|
96
|
+
elif local_v > pkg_v:
|
|
97
|
+
info.append(f'AHEAD CMD: /{f.replace(\".md\",\"\")} is v{local_v}, package has v{pkg_v} (local is newer)')
|
|
98
|
+
else:
|
|
99
|
+
info.append(f'OK CMD: /{f.replace(\".md\",\"\")} v{local_v}')
|
|
100
|
+
|
|
101
|
+
# --- 3. Check agent files ---
|
|
102
|
+
pkg_agents_dir = os.path.join(pkg_dir, '.claude', 'agents')
|
|
103
|
+
local_agents_dir = os.path.join(claude_dir, 'agents')
|
|
104
|
+
if os.path.isdir(pkg_agents_dir) and os.path.isdir(local_agents_dir):
|
|
105
|
+
pkg_agents = set(os.listdir(pkg_agents_dir))
|
|
106
|
+
local_agents = set(os.listdir(local_agents_dir))
|
|
107
|
+
for f in sorted(pkg_agents - local_agents):
|
|
108
|
+
issues.append(f'MISSING AGENT: .claude/agents/{f} not installed')
|
|
109
|
+
for f in sorted(pkg_agents & local_agents):
|
|
110
|
+
info.append(f'OK AGENT: .claude/agents/{f}')
|
|
111
|
+
|
|
112
|
+
# --- 4. Check docs ---
|
|
113
|
+
pkg_docs_dir = os.path.join(pkg_dir, '.claude', 'docs')
|
|
114
|
+
local_docs_dir = os.path.join(claude_dir, 'docs')
|
|
115
|
+
if os.path.isdir(pkg_docs_dir):
|
|
116
|
+
for f in os.listdir(pkg_docs_dir):
|
|
117
|
+
if f.endswith('.html'):
|
|
118
|
+
if os.path.isdir(local_docs_dir) and f in os.listdir(local_docs_dir):
|
|
119
|
+
info.append(f'OK DOC: .claude/docs/{f}')
|
|
120
|
+
else:
|
|
121
|
+
issues.append(f'MISSING DOC: .claude/docs/{f} not installed')
|
|
122
|
+
|
|
123
|
+
# --- 5. Check settings.json ---
|
|
124
|
+
settings_path = os.path.join(claude_dir, 'settings.json')
|
|
125
|
+
if os.path.isfile(settings_path):
|
|
126
|
+
try:
|
|
127
|
+
settings = json.loads(open(settings_path, encoding='utf-8').read())
|
|
128
|
+
if 'permissions' in settings:
|
|
129
|
+
info.append('OK: settings.json exists with permissions')
|
|
130
|
+
else:
|
|
131
|
+
issues.append('SETTINGS: settings.json exists but has no permissions block')
|
|
132
|
+
except json.JSONDecodeError:
|
|
133
|
+
issues.append('SETTINGS: settings.json exists but is invalid JSON')
|
|
134
|
+
else:
|
|
135
|
+
issues.append('MISSING: .claude/settings.json not found')
|
|
136
|
+
|
|
137
|
+
# --- 6. Check CLAUDE.md ---
|
|
138
|
+
claude_md = os.path.join(project_dir, 'CLAUDE.md')
|
|
139
|
+
if os.path.isfile(claude_md):
|
|
140
|
+
content = open(claude_md, encoding='utf-8').read()
|
|
141
|
+
if 'AUTO-GENERATED BY /autoconfig' in content:
|
|
142
|
+
info.append('OK: CLAUDE.md exists with autoconfig marker')
|
|
143
|
+
else:
|
|
144
|
+
info.append('NOTE: CLAUDE.md exists but missing autoconfig marker (may be manually written)')
|
|
145
|
+
else:
|
|
146
|
+
issues.append('MISSING: CLAUDE.md not found (run /autoconfig to generate)')
|
|
147
|
+
|
|
148
|
+
# --- 7. Check hooks reference integrity ---
|
|
149
|
+
if os.path.isfile(settings_path):
|
|
150
|
+
try:
|
|
151
|
+
settings = json.loads(open(settings_path, encoding='utf-8').read())
|
|
152
|
+
hooks = settings.get('hooks', {})
|
|
153
|
+
for event, matchers in hooks.items():
|
|
154
|
+
if isinstance(matchers, list):
|
|
155
|
+
for matcher in matchers:
|
|
156
|
+
cmd = matcher.get('command', '')
|
|
157
|
+
# Extract file paths from hook commands
|
|
158
|
+
for token in cmd.split():
|
|
159
|
+
if token.endswith('.js') and '.claude/' in token:
|
|
160
|
+
hook_path = token.replace('.claude/', '')
|
|
161
|
+
full_path = os.path.join(claude_dir, hook_path)
|
|
162
|
+
if os.path.isfile(full_path):
|
|
163
|
+
info.append(f'OK HOOK: {token} exists')
|
|
164
|
+
else:
|
|
165
|
+
issues.append(f'BROKEN HOOK: {token} referenced in settings.json but file not found')
|
|
166
|
+
except:
|
|
167
|
+
pass
|
|
168
|
+
|
|
169
|
+
# --- Output ---
|
|
170
|
+
print(json.dumps({'issues': issues, 'info': info}, indent=2))
|
|
171
|
+
"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Step 4: Clean up temp directory
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
rm -rf "$TMPDIR"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Step 5: Display the report
|
|
181
|
+
|
|
182
|
+
Format the results as a clear report. Use this structure:
|
|
183
|
+
|
|
184
|
+
If there are **no issues**:
|
|
185
|
+
|
|
186
|
+
> **Install validated — all checks passed.**
|
|
187
|
+
>
|
|
188
|
+
> - Latest version: {version}
|
|
189
|
+
> - {count} commands, {count} agents, {count} hooks — all current
|
|
190
|
+
>
|
|
191
|
+
> Your installation is up to date.
|
|
192
|
+
|
|
193
|
+
If there are **issues**:
|
|
194
|
+
|
|
195
|
+
> **Validation found {N} issue(s):**
|
|
196
|
+
>
|
|
197
|
+
> {list each issue with a brief explanation}
|
|
198
|
+
>
|
|
199
|
+
> **To fix:** run `npx claude-code-autoconfig@latest` (or `--force` for a clean reinstall).
|
|
200
|
+
|
|
201
|
+
Always list the OK items in a collapsed/brief summary (don't enumerate every OK item unless the user asks). Focus attention on the issues.
|
|
202
|
+
|
|
203
|
+
## Step 6: Stop
|
|
204
|
+
|
|
205
|
+
Do NOT take any action to fix issues. The user decides what to do next.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.container {
|
|
37
|
-
max-width:
|
|
37
|
+
max-width: 1100px;
|
|
38
38
|
margin: 0 auto;
|
|
39
39
|
padding: 40px 20px;
|
|
40
40
|
min-height: 100vh;
|
|
@@ -395,8 +395,7 @@
|
|
|
395
395
|
|
|
396
396
|
.tree-content {
|
|
397
397
|
padding: 16px 16px 8px 16px;
|
|
398
|
-
overflow
|
|
399
|
-
overflow-x: hidden;
|
|
398
|
+
overflow: auto;
|
|
400
399
|
flex: 1;
|
|
401
400
|
min-height: 0;
|
|
402
401
|
}
|
|
@@ -745,7 +744,7 @@
|
|
|
745
744
|
background: var(--bg-secondary);
|
|
746
745
|
border: 1px solid var(--bg-elevated);
|
|
747
746
|
border-radius: 12px;
|
|
748
|
-
max-width:
|
|
747
|
+
max-width: 1000px;
|
|
749
748
|
width: 100%;
|
|
750
749
|
max-height: 80vh;
|
|
751
750
|
display: flex;
|
|
@@ -913,6 +912,11 @@
|
|
|
913
912
|
<span class="tree-file-icon">📄</span>
|
|
914
913
|
<span class="file">test.md</span>
|
|
915
914
|
</div>
|
|
915
|
+
<div class="tree-item indent-3 hidden" data-info="validate-cca-install" data-parent="commands">
|
|
916
|
+
<span class="tree-spacer"></span>
|
|
917
|
+
<span class="tree-file-icon">📄</span>
|
|
918
|
+
<span class="file">validate-cca-install.md</span>
|
|
919
|
+
</div>
|
|
916
920
|
<div class="tree-item indent-2 folder-row hidden collapsed" data-info="agents" data-folder="agents" data-parent="claude-dir">
|
|
917
921
|
<span class="tree-chevron">›</span>
|
|
918
922
|
<span class="tree-folder-icon">📁</span>
|
|
@@ -1196,7 +1200,7 @@
|
|
|
1196
1200
|
item.style.position = '';
|
|
1197
1201
|
});
|
|
1198
1202
|
|
|
1199
|
-
treeSide.style.width = (maxWidth + 32) + 'px';
|
|
1203
|
+
treeSide.style.width = Math.round((maxWidth + 32) * 1.25) + 'px';
|
|
1200
1204
|
treeSide.style.paddingLeft = '8px';
|
|
1201
1205
|
treeSide.style.paddingRight = '8px';
|
|
1202
1206
|
}
|
|
@@ -1263,7 +1267,7 @@
|
|
|
1263
1267
|
title: '.claude/ Directory',
|
|
1264
1268
|
desc: 'Commands, rules, settings, and these docs. Keeps configuration organized as your project grows.'
|
|
1265
1269
|
},
|
|
1266
|
-
|
|
1270
|
+
'rules': {
|
|
1267
1271
|
title: 'rules/',
|
|
1268
1272
|
desc: 'Path-scoped context that loads when Claude works on matching files.'
|
|
1269
1273
|
},
|
|
@@ -1285,54 +1289,59 @@
|
|
|
1285
1289
|
},
|
|
1286
1290
|
'autoconfig-update': {
|
|
1287
1291
|
title: 'autoconfig-update.md',
|
|
1288
|
-
desc: 'Manages and installs updates to Claude Code configuration.',
|
|
1292
|
+
desc: 'Manages and installs updates to Claude Code configuration.<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>updates-available</code></td><td style="padding: 4px 8px;">Displays list of pending updates with install/review options.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>up-to-date</code></td><td style="padding: 4px 8px;">All updates are already installed.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Pulls latest update files from npm, executes update instructions, tracks applied updates</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/autoconfig-update</code> <span style="opacity: 0.6;">— Check for and install configuration updates</span></div></div></div>',
|
|
1289
1293
|
trigger: '/autoconfig-update'
|
|
1290
1294
|
},
|
|
1291
1295
|
'autoconfig': {
|
|
1292
1296
|
title: 'autoconfig.md',
|
|
1293
|
-
desc: '
|
|
1297
|
+
desc: 'Analyzes your project and populates CLAUDE.md with real context. Re-run anytime your stack changes.<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px;">CLAUDE.md populated, settings configured, docs opened in browser.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>no-project</code></td><td style="padding: 4px 8px;">No project detected — asks user to confirm directory.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Generates CLAUDE.md, settings.json, hooks, and MEMORY.md</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/autoconfig</code> <span style="opacity: 0.6;">— Analyze project and configure Claude</span></div></div></div>',
|
|
1294
1298
|
trigger: '/autoconfig'
|
|
1295
1299
|
},
|
|
1296
1300
|
'commit-and-push': {
|
|
1297
1301
|
title: 'commit-and-push.md',
|
|
1298
|
-
desc: 'Runs tests, then stages all changes, generates a conventional commit message, commits, and pushes.',
|
|
1302
|
+
desc: 'Runs tests, then stages all changes, generates a conventional commit message, commits, and pushes.<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px;">Changes committed and pushed to current branch.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>test-failure</code></td><td style="padding: 4px 8px;">Tests failed — no commit made.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Runs test suite, stages all changes, creates git commit, pushes to remote</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/commit-and-push</code> <span style="opacity: 0.6;">— Run tests, commit, and push</span></div></div></div>',
|
|
1299
1303
|
trigger: '/commit-and-push'
|
|
1300
1304
|
},
|
|
1301
1305
|
'enable-retro': {
|
|
1302
1306
|
title: 'enable-retro.md',
|
|
1303
|
-
desc: '(Experimental) Enable Claude to log tech debt it encounters into .claude/retro.',
|
|
1307
|
+
desc: '(Experimental) Enable Claude to log tech debt it encounters into .claude/retro.<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px;">Retro enabled — Claude will log tech debt to .claude/retro/ when encountered.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Creates .claude/retro/README.md, adds agent, updates CLAUDE.md</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/enable-retro</code> <span style="opacity: 0.6;">— Activate tech debt tracking</span></div></div></div>',
|
|
1304
1308
|
trigger: '/enable-retro'
|
|
1305
1309
|
},
|
|
1306
1310
|
'gls': {
|
|
1307
1311
|
title: 'gls.md',
|
|
1308
|
-
desc: '
|
|
1312
|
+
desc: 'Get the latest screenshot(s) and display them.<div style="margin-top: 12px;"><strong>Parameters</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Name</th><th style="padding: 4px 8px;">Type</th><th style="padding: 4px 8px;">Required</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>count</code></td><td style="padding: 4px 8px;"><code>integer</code></td><td style="padding: 4px 8px;">optional</td><td style="padding: 4px 8px;">Number of screenshots to display. Use /gls-N syntax. Default: 1. Min: 1.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>path</code></td><td style="padding: 4px 8px;"><code>string</code></td><td style="padding: 4px 8px;">optional</td><td style="padding: 4px 8px;">Screenshot directory path. Saved for future use. Auto-detected if omitted.</td></tr></table></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px;">Displays requested screenshot(s) from newest to oldest.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>no-screenshots</code></td><td style="padding: 4px 8px;">Directory exists but contains no image files.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>no-directory</code></td><td style="padding: 4px 8px;">Unable to detect screenshot directory — prompts for path.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Saves detected screenshot path to command file on first run</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/gls</code> <span style="opacity: 0.6;">— Display the most recent screenshot</span></div><div><code>/gls-3</code> <span style="opacity: 0.6;">— Display the 3 most recent screenshots</span></div><div><code>/gls /path/to/dir</code> <span style="opacity: 0.6;">— Use a specific screenshot directory</span></div></div></div>',
|
|
1309
1313
|
trigger: '/gls'
|
|
1310
1314
|
},
|
|
1311
1315
|
'publish': {
|
|
1312
1316
|
title: 'publish.md',
|
|
1313
|
-
desc: 'Runs tests, bumps version, commits, and publishes to npm.',
|
|
1317
|
+
desc: 'Runs tests, bumps version, commits, and publishes to npm.<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div>',
|
|
1314
1318
|
trigger: '/publish'
|
|
1315
1319
|
},
|
|
1316
1320
|
'recover-context': {
|
|
1317
1321
|
title: 'recover-context.md',
|
|
1318
|
-
desc: 'Recovers conversation context from the session transcript after compaction.<div style="margin-top:
|
|
1322
|
+
desc: 'Recovers conversation context from the session transcript after compaction.<div style="margin-top: 12px;"><strong>Parameters</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Name</th><th style="padding: 4px 8px;">Type</th><th style="padding: 4px 8px;">Required</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>minutes</code></td><td style="padding: 4px 8px;"><code>integer</code></td><td style="padding: 4px 8px;">required</td><td style="padding: 4px 8px;">How far back to recover, in minutes. Leading dash optional. Min: 1.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>--show</code></td><td style="padding: 4px 8px;"><code>flag</code></td><td style="padding: 4px 8px;">optional</td><td style="padding: 4px 8px;">Opens the extracted transcript in your default editor.</td></tr></table></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px;">~{tokens} tokens recovered ({N} messages across {sessions} session(s), last {minutes} min).</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>no-transcript</code></td><td style="padding: 4px 8px;">No transcript files found.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>no-messages</code></td><td style="padding: 4px 8px;">No messages found in the requested time range.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Reads .jsonl transcripts from ~/.claude/projects/, writes temp file</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/recover-context -60</code> <span style="opacity: 0.6;">— Last 60 minutes of conversation</span></div><div><code>/recover-context 120</code> <span style="opacity: 0.6;">— Last 2 hours (dash optional)</span></div><div><code>/recover-context -60 --show</code> <span style="opacity: 0.6;">— Last 60 min + open transcript file</span></div></div></div>',
|
|
1319
1323
|
trigger: '/recover-context'
|
|
1320
1324
|
},
|
|
1321
1325
|
'show-docs': {
|
|
1322
1326
|
title: 'show-docs.md',
|
|
1323
|
-
desc: 'Opens the interactive docs in your browser.',
|
|
1327
|
+
desc: 'Opens the interactive docs in your browser.<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px;">Docs synced and opened in default browser.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>no-docs</code></td><td style="padding: 4px 8px;">Docs file not found — run /autoconfig first.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Runs sync-docs.js to refresh content, opens browser</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/show-docs</code> <span style="opacity: 0.6;">— Open interactive documentation</span></div></div></div>',
|
|
1324
1328
|
trigger: '/show-docs'
|
|
1325
1329
|
},
|
|
1326
1330
|
'sync-claude-md': {
|
|
1327
1331
|
title: 'sync-claude-md.md',
|
|
1328
|
-
desc: 'Re-analyzes your project and updates CLAUDE.md to reflect current state.',
|
|
1332
|
+
desc: 'Re-analyzes your project and updates CLAUDE.md to reflect current state.<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px;">CLAUDE.md updated with current project state.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Overwrites auto-generated sections of CLAUDE.md, preserves Discoveries section</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/sync-claude-md</code> <span style="opacity: 0.6;">— Re-scan project and update CLAUDE.md</span></div></div></div>',
|
|
1329
1333
|
trigger: '/sync-claude-md'
|
|
1330
1334
|
},
|
|
1331
1335
|
'test': {
|
|
1332
1336
|
title: 'test.md',
|
|
1333
|
-
desc: 'Runs your test suite. Auto-detects Jest, Vitest, Pytest, Go, RSpec, or falls back to npm test.',
|
|
1337
|
+
desc: 'Runs your test suite. Auto-detects Jest, Vitest, Pytest, Go, RSpec, or falls back to npm test.<div style="margin-top: 12px;"><strong>Parameters</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Name</th><th style="padding: 4px 8px;">Type</th><th style="padding: 4px 8px;">Required</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>scope</code></td><td style="padding: 4px 8px;"><code>string</code></td><td style="padding: 4px 8px;">optional</td><td style="padding: 4px 8px;">File, directory, or pattern to limit test run. Runs full suite if omitted.</td></tr></table></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px;">Test suite passes.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>failure</code></td><td style="padding: 4px 8px;">Test suite fails with non-zero exit code.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Executes detected test runner command</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/test</code> <span style="opacity: 0.6;">— Run full test suite</span></div><div><code>/test src/auth</code> <span style="opacity: 0.6;">— Run tests in src/auth directory</span></div><div><code>/test --coverage</code> <span style="opacity: 0.6;">— Run tests with coverage report</span></div></div></div>',
|
|
1334
1338
|
trigger: '/test'
|
|
1335
1339
|
},
|
|
1340
|
+
'validate-cca-install': {
|
|
1341
|
+
title: 'validate-cca-install.md',
|
|
1342
|
+
desc: 'Validates your claude-code-autoconfig installation against the latest published version.<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div><div style="margin-top: 12px;"><strong>Responses</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>valid</code></td><td style="padding: 4px 8px;">Install validated — all checks passed.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px; white-space: nowrap;"><code>issues</code></td><td style="padding: 4px 8px;">Validation found {N} issue(s) with fix suggestions.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">Read-only. Downloads latest package to temp dir for comparison, then cleans up.</div></div><div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;"><div><code>/validate-cca-install</code> <span style="opacity: 0.6;">— Run full installation validation</span></div></div></div>',
|
|
1343
|
+
trigger: '/validate-cca-install'
|
|
1344
|
+
},
|
|
1336
1345
|
'create-retro-item-agent': {
|
|
1337
1346
|
title: 'create-retro-item.md',
|
|
1338
1347
|
desc: 'Creates a formatted retro item when tech debt or improvements are spotted.',
|
|
@@ -1569,7 +1578,7 @@ CRITICAL: A plausible-looking cause from code reading is NOT confirmed evidence.
|
|
|
1569
1578
|
|
|
1570
1579
|
> Run \`/autoconfig\` to populate this based on your project.`
|
|
1571
1580
|
},
|
|
1572
|
-
|
|
1581
|
+
'autoconfig-update': {
|
|
1573
1582
|
filename: 'autoconfig-update.md',
|
|
1574
1583
|
content: `<!-- @applied
|
|
1575
1584
|
-->
|
|
@@ -1772,19 +1781,19 @@ The arguments are: $ARGUMENTS
|
|
|
1772
1781
|
- Strip the leading \`-\` from the number and treat it as the number of minutes to look back
|
|
1773
1782
|
- Check if \`--show\` flag is present
|
|
1774
1783
|
|
|
1775
|
-
## Step 2:
|
|
1784
|
+
## Step 2: List candidate transcript files
|
|
1776
1785
|
|
|
1777
|
-
|
|
1786
|
+
List all \`.jsonl\` transcript files sorted by most recently modified:
|
|
1778
1787
|
|
|
1779
1788
|
\`\`\`bash
|
|
1780
|
-
ls -t ~/.claude/projects/*/*.jsonl 2>/dev/null | head -
|
|
1789
|
+
ls -t ~/.claude/projects/*/*.jsonl 2>/dev/null | head -20
|
|
1781
1790
|
\`\`\`
|
|
1782
1791
|
|
|
1783
|
-
If no
|
|
1792
|
+
If no transcripts are found, tell the user and stop. Store the list as \`$TRANSCRIPT_FILES\` (one path per line).
|
|
1784
1793
|
|
|
1785
|
-
## Step 3:
|
|
1794
|
+
## Step 3: Identify which files to parse (lazy probing)
|
|
1786
1795
|
|
|
1787
|
-
|
|
1796
|
+
For each file in \`$TRANSCRIPT_FILES\` (starting from most recent), probe its time range by reading only the **first and last timestamp** — do NOT parse the full file yet. Run this script, substituting \`$MINUTES\` and \`$TRANSCRIPT_FILES\`:`
|
|
1788
1797
|
},
|
|
1789
1798
|
'show-docs': {
|
|
1790
1799
|
filename: 'show-docs.md',
|
|
@@ -1857,6 +1866,39 @@ Run tests for this project.
|
|
|
1857
1866
|
If no scope provided, run the full test suite. Otherwise run tests matching the scope (file, directory, or pattern).
|
|
1858
1867
|
|
|
1859
1868
|
Detect the test command from project config (package.json scripts, pytest, go test, etc.) and execute it.`
|
|
1869
|
+
},
|
|
1870
|
+
'validate-cca-install': {
|
|
1871
|
+
filename: 'validate-cca-install.md',
|
|
1872
|
+
content: `Validate the current claude-code-autoconfig installation. Reports what's correct, what's outdated, and what's missing. **Does not modify anything.**
|
|
1873
|
+
|
|
1874
|
+
Usage:
|
|
1875
|
+
- \`/validate-cca-install\` — run a full validation check
|
|
1876
|
+
|
|
1877
|
+
## Step 1: Fetch the latest package metadata
|
|
1878
|
+
|
|
1879
|
+
Query the npm registry for the latest published version and its file manifest:
|
|
1880
|
+
|
|
1881
|
+
\`\`\`bash
|
|
1882
|
+
python3 -c "
|
|
1883
|
+
import json, urllib.request
|
|
1884
|
+
url = 'https://registry.npmjs.org/claude-code-autoconfig/latest'
|
|
1885
|
+
data = json.loads(urllib.request.urlopen(url, timeout=10).read())
|
|
1886
|
+
print(json.dumps({'version': data.get('version', 'unknown')}))
|
|
1887
|
+
"
|
|
1888
|
+
\`\`\`
|
|
1889
|
+
|
|
1890
|
+
Store the latest version as \`$LATEST_VERSION\`.
|
|
1891
|
+
|
|
1892
|
+
## Step 2: Download and extract the latest package to a temp directory
|
|
1893
|
+
|
|
1894
|
+
\`\`\`bash
|
|
1895
|
+
TMPDIR=$(mktemp -d)
|
|
1896
|
+
npm pack claude-code-autoconfig@latest --pack-destination "$TMPDIR" 2>/dev/null
|
|
1897
|
+
tar -xzf "$TMPDIR"/*.tgz -C "$TMPDIR"
|
|
1898
|
+
echo "$TMPDIR/package"
|
|
1899
|
+
\`\`\`
|
|
1900
|
+
|
|
1901
|
+
Store the extracted path as \`$PKG_DIR\`. This gives us the ground truth for what files and versions should be installed.`
|
|
1860
1902
|
},
|
|
1861
1903
|
'create-retro-item-agent': {
|
|
1862
1904
|
filename: 'create-retro-item.md',
|
|
@@ -82,33 +82,103 @@ function extractDescription(content, ext) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* Extract
|
|
86
|
-
*
|
|
85
|
+
* Extract structured Swagger-style metadata from command file content.
|
|
86
|
+
* Parses @param, @response, @sideeffect, and @example comments.
|
|
87
87
|
*/
|
|
88
|
-
function
|
|
88
|
+
function extractSwaggerMeta(content) {
|
|
89
|
+
const params = [];
|
|
90
|
+
const responses = [];
|
|
91
|
+
const examples = [];
|
|
92
|
+
let sideeffect = null;
|
|
93
|
+
|
|
89
94
|
const lines = content.split(/\r?\n/);
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
for (const line of lines) {
|
|
96
|
+
const paramMatch = line.match(/<!--\s*@param\s+(.+?)\s*-->/);
|
|
97
|
+
if (paramMatch) {
|
|
98
|
+
const parts = paramMatch[1].split('|').map(s => s.trim());
|
|
99
|
+
if (parts.length >= 4) {
|
|
100
|
+
params.push({ name: parts[0], type: parts[1], required: parts[2], desc: parts[3] });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const respMatch = line.match(/<!--\s*@response\s+(.+?)\s*-->/);
|
|
104
|
+
if (respMatch) {
|
|
105
|
+
const parts = respMatch[1].split('|').map(s => s.trim());
|
|
106
|
+
if (parts.length >= 2) {
|
|
107
|
+
responses.push({ status: parts[0], desc: parts[1] });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
const exMatch = line.match(/<!--\s*@example\s+(.+?)\s*-->/);
|
|
111
|
+
if (exMatch) {
|
|
112
|
+
const parts = exMatch[1].split('|').map(s => s.trim());
|
|
113
|
+
if (parts.length >= 2) {
|
|
114
|
+
examples.push({ usage: parts[0], desc: parts[1] });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const seMatch = line.match(/<!--\s*@sideeffect\s+(.+?)\s*-->/);
|
|
118
|
+
if (seMatch) {
|
|
119
|
+
sideeffect = seMatch[1].trim();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return { params, responses, examples, sideeffect };
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Build Swagger-style HTML from extracted metadata.
|
|
128
|
+
*/
|
|
129
|
+
function buildSwaggerHtml(meta) {
|
|
130
|
+
const parts = [];
|
|
131
|
+
|
|
132
|
+
// Parameters table
|
|
133
|
+
if (meta.params.length > 0) {
|
|
134
|
+
let table = '<div style="margin-top: 12px;"><strong>Parameters</strong>';
|
|
135
|
+
table += '<table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;">';
|
|
136
|
+
table += '<tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Name</th><th style="padding: 4px 8px;">Type</th><th style="padding: 4px 8px;">Required</th><th style="padding: 4px 8px;">Description</th></tr>';
|
|
137
|
+
for (const p of meta.params) {
|
|
138
|
+
table += `<tr style="border-bottom: 1px solid var(--border);">`;
|
|
139
|
+
table += `<td style="padding: 4px 8px; white-space: nowrap;"><code>${p.name}</code></td>`;
|
|
140
|
+
table += `<td style="padding: 4px 8px;"><code>${p.type}</code></td>`;
|
|
141
|
+
table += `<td style="padding: 4px 8px;">${p.required}</td>`;
|
|
142
|
+
table += `<td style="padding: 4px 8px;">${p.desc}</td>`;
|
|
143
|
+
table += `</tr>`;
|
|
144
|
+
}
|
|
145
|
+
table += '</table></div>';
|
|
146
|
+
parts.push(table);
|
|
147
|
+
} else {
|
|
148
|
+
parts.push('<div style="margin-top: 12px;"><strong>Parameters</strong><div style="margin-top: 4px; opacity: 0.6;">None</div></div>');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Responses table
|
|
152
|
+
if (meta.responses.length > 0) {
|
|
153
|
+
let table = '<div style="margin-top: 12px;"><strong>Responses</strong>';
|
|
154
|
+
table += '<table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em;">';
|
|
155
|
+
table += '<tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px;">Status</th><th style="padding: 4px 8px;">Description</th></tr>';
|
|
156
|
+
for (const r of meta.responses) {
|
|
157
|
+
table += `<tr style="border-bottom: 1px solid var(--border);">`;
|
|
158
|
+
table += `<td style="padding: 4px 8px; white-space: nowrap;"><code>${r.status}</code></td>`;
|
|
159
|
+
table += `<td style="padding: 4px 8px;">${r.desc}</td>`;
|
|
160
|
+
table += `</tr>`;
|
|
161
|
+
}
|
|
162
|
+
table += '</table></div>';
|
|
163
|
+
parts.push(table);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Side effects
|
|
167
|
+
if (meta.sideeffect) {
|
|
168
|
+
parts.push(`<div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">${meta.sideeffect}</div></div>`);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Examples
|
|
172
|
+
if (meta.examples.length > 0) {
|
|
173
|
+
let html = '<div style="margin-top: 12px;"><strong>Examples</strong><div style="margin-top: 6px; background: var(--bg-elevated); border-radius: 6px; padding: 8px 12px; font-family: monospace; font-size: 0.85em;">';
|
|
174
|
+
for (const ex of meta.examples) {
|
|
175
|
+
html += `<div><code>${ex.usage}</code> <span style="opacity: 0.6;">— ${ex.desc}</span></div>`;
|
|
105
176
|
}
|
|
177
|
+
html += '</div></div>';
|
|
178
|
+
parts.push(html);
|
|
106
179
|
}
|
|
107
|
-
if (usageLines.length === 0) return null;
|
|
108
180
|
|
|
109
|
-
|
|
110
|
-
const listItems = usageLines.map(l => `<li>${l}</li>`).join('');
|
|
111
|
-
return `<div style="margin-top: 10px;"><strong>Usage:</strong><ul style="margin: 6px 0 0 0; padding-left: 20px; list-style: disc;">${listItems}</ul></div>`;
|
|
181
|
+
return parts.length > 0 ? parts.join('') : null;
|
|
112
182
|
}
|
|
113
183
|
|
|
114
184
|
/**
|
|
@@ -200,9 +270,10 @@ function scanFiles() {
|
|
|
200
270
|
const desc = extractDescription(content, ext) || `${file} in ${folder}/`;
|
|
201
271
|
const trigger = deriveTrigger(folder, file, content);
|
|
202
272
|
const preview = generatePreview(content, ext);
|
|
203
|
-
const
|
|
273
|
+
const swagger = (folder === 'commands') ? extractSwaggerMeta(content) : null;
|
|
274
|
+
const swaggerHtml = swagger ? buildSwaggerHtml(swagger) : null;
|
|
204
275
|
|
|
205
|
-
entries.push({ key, folder, file, desc, trigger, preview,
|
|
276
|
+
entries.push({ key, folder, file, desc, trigger, preview, swaggerHtml });
|
|
206
277
|
}
|
|
207
278
|
}
|
|
208
279
|
|
|
@@ -349,8 +420,8 @@ function generateTreeInfo(entries) {
|
|
|
349
420
|
if (entry.isEmptyFolder) continue;
|
|
350
421
|
|
|
351
422
|
let fullDesc = entry.desc;
|
|
352
|
-
if (entry.
|
|
353
|
-
fullDesc += entry.
|
|
423
|
+
if (entry.swaggerHtml) {
|
|
424
|
+
fullDesc += entry.swaggerHtml;
|
|
354
425
|
}
|
|
355
426
|
const escapedDesc = fullDesc.replace(/'/g, "\\'");
|
|
356
427
|
lines.push(` '${entry.key}': {`);
|
package/README.md
CHANGED
|
@@ -53,7 +53,8 @@ your-project/
|
|
|
53
53
|
│ ├── recover-context.md # /recover-context - restore context after compaction
|
|
54
54
|
│ ├── show-docs.md # /show-docs - interactive walkthrough
|
|
55
55
|
│ ├── sync-claude-md.md # /sync-claude-md - update CLAUDE.md
|
|
56
|
-
│
|
|
56
|
+
│ ├── test.md # /test - run tests
|
|
57
|
+
│ └── validate-cca-install.md # /validate-cca-install - verify installation
|
|
57
58
|
├── agents/ # Agent definitions
|
|
58
59
|
│ ├── create-retro-item.md # Retro item creation agent
|
|
59
60
|
│ └── docs-refresh.md # Docs sync agent
|
|
@@ -106,6 +107,7 @@ Run `/sync-claude-md` anytime your project evolves to keep the configuration cur
|
|
|
106
107
|
| `/commit-and-push` | Stages, commits with good message, and pushes |
|
|
107
108
|
| `/recover-context` | Recovers conversation context after compaction |
|
|
108
109
|
| `/gls` | Views latest screenshot for visual context |
|
|
110
|
+
| `/validate-cca-install` | Validates installation against latest published version |
|
|
109
111
|
| `/enable-retro` | (Experimental) Enable tech debt tracking |
|
|
110
112
|
|
|
111
113
|
### Updates
|
package/bin/cli.js
CHANGED
|
@@ -617,7 +617,13 @@ const bootstrapMode = process.argv.includes('--bootstrap');
|
|
|
617
617
|
if (bootstrapMode || insideClaude) {
|
|
618
618
|
if (!bootstrapMode) {
|
|
619
619
|
// insideClaude without --bootstrap: show guidance
|
|
620
|
-
console.log(
|
|
620
|
+
console.log();
|
|
621
|
+
console.log('\x1b[32m%s\x1b[0m', `✅ Autoconfig installed successfully.`);
|
|
622
|
+
console.log();
|
|
623
|
+
console.log('\x1b[33m%s\x1b[0m', `⚡ NEXT STEP: Type ${launchCommand} below and press Enter to complete setup.`);
|
|
624
|
+
console.log();
|
|
625
|
+
console.log('\x1b[90m%s\x1b[0m', ` (This CLI can't auto-trigger slash commands inside an active Claude session.`);
|
|
626
|
+
console.log('\x1b[90m%s\x1b[0m', ` Just type "${launchCommand}" at the prompt and Claude will handle the rest.)`);
|
|
621
627
|
console.log();
|
|
622
628
|
}
|
|
623
629
|
process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-autoconfig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.144",
|
|
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",
|