claude-code-autoconfig 1.0.167 → 1.0.169

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.
@@ -147,5 +147,5 @@ Then delete the `.claude/updates/` directory (it's ephemeral — updates are tra
147
147
  If the user installed any updates that modified `.claude/commands/autoconfig.md`, suggest:
148
148
 
149
149
  ```
150
- Run /sync-claude-md to apply these changes to your current project's CLAUDE.md.
150
+ Run /autoconfig to apply these changes to your current project.
151
151
  ```
@@ -0,0 +1,128 @@
1
+ <!-- @description Scan Claude artifacts and propose structured rules for .claude/rules/ -->
2
+ <!-- @version 1 -->
3
+ <!-- @param mode | string | optional | "preview" (default) shows proposals, "apply" writes and cleans sources -->
4
+ <!-- @response success | Rules extracted and optionally applied with source cleanup. -->
5
+ <!-- @response no-rules | No extractable rules found in scanned sources. -->
6
+ <!-- @sideeffect May create .claude/rules/ files and remove extracted content from source files -->
7
+ <!-- @example /extract-rules | Preview proposed rules without writing -->
8
+ <!-- @example /extract-rules --apply | Write rules and clean up sources -->
9
+
10
+ # Extract Rules
11
+
12
+ Scan all Claude configuration artifacts and propose structured rules for `.claude/rules/`.
13
+
14
+ ## Step 0: Git safety check
15
+
16
+ Before doing anything else, check for uncommitted changes:
17
+
18
+ ```bash
19
+ git status --porcelain
20
+ ```
21
+
22
+ If there are uncommitted changes, show this warning and wait for confirmation:
23
+
24
+ > **Warning:** This command will modify files (extract rules from sources and optionally clean up originals). You have uncommitted changes.
25
+ >
26
+ > Commit your work before proceeding, or type "continue" to proceed anyway.
27
+
28
+ If the working tree is clean, proceed silently.
29
+
30
+ ## Step 1: Discover sources
31
+
32
+ Scan these locations for `.md` files containing potential rules. **Skip any that don't exist** — not all projects have all of these:
33
+
34
+ 1. `CLAUDE.md` (project root)
35
+ 2. `CLAUDE.local.md` (project root, if present)
36
+ 3. All `.md` files in `.claude/` recursively (feedback, commands, etc.) — **excluding** `.claude/rules/` and `.claude/commands/extract-rules.md`
37
+ 4. Any nested `CLAUDE.md` files in subdirectories (e.g., `src/CLAUDE.md`)
38
+ 5. `.claude/settings.json` (hooks section — behavioral rules implied by hooks)
39
+
40
+ Also read all existing `.claude/rules/` files to avoid proposing duplicates.
41
+
42
+ ## Step 2: Extract candidate rules
43
+
44
+ A rule is a **deterministic behavioral instruction** that Claude should follow when working on specific files or file patterns. Good rules are:
45
+
46
+ - **Actionable**: "Do X" or "Never do Y" — not background context
47
+ - **Scoped**: Applies to specific files, directories, or file patterns
48
+ - **Not already enforced**: Skip anything already handled by hooks, settings, or linting
49
+ - **Not ephemeral**: Skip project status, session notes, debugging histories
50
+
51
+ **Skip these** (they belong in other artifacts):
52
+ - Domain knowledge / business logic explanations → stay in their source doc
53
+ - Slash command definitions → stay in `commands/`
54
+ - Session-specific debugging notes → stay in memory
55
+ - Deployment / operational procedures → stay in their source doc
56
+
57
+ ## Step 3: Deduplicate
58
+
59
+ - If a candidate rule already exists in `.claude/rules/` (same intent, even if worded differently), skip it
60
+ - If the same guidance appears in multiple sources, note all sources but propose one rule
61
+ - Group related rules into single files when they share the same `paths` scope. If two imperatives apply to the same files, they belong in one rule file. If they target different files, keep them separate — even if topically related.
62
+
63
+ ## Step 4: Rate confidence
64
+
65
+ For each proposed rule, assign a confidence level:
66
+
67
+ - **HIGH** — Explicit imperative instruction ("never do X", "always do Y", "must use Z", "prefer X over Y"). The source text literally contains an imperative. Extract these.
68
+ - **SKIP** — Everything else: inferred conventions, contextual guidance, implementation details derivable from the code. Do not propose these.
69
+
70
+ ## Step 5: Output proposals
71
+
72
+ For each HIGH-confidence rule, output:
73
+
74
+ ```
75
+ ### Rule: <short name>
76
+ **Source**: <file(s) it was extracted from>
77
+ **Paths**: <e.g., `src/background.ts`, `src/**/*.ts`, `*.ts`>
78
+ **File name**: <proposed .claude/rules/ filename, e.g., `linkedin-selectors.md`>
79
+
80
+ --- file content ---
81
+ ---
82
+ paths:
83
+ - "src/background.ts"
84
+ - "src/**/*.ts"
85
+ ---
86
+
87
+ <rule content here>
88
+ --- end file content ---
89
+ ```
90
+
91
+ The file content block must include proper YAML frontmatter with `paths` as an array. This is the exact format Claude Code expects.
92
+
93
+ **Validate paths**: Before proposing a rule, use Glob to verify that at least one `paths` pattern matches existing files in the project. If no files match, flag it with `⚠️ no matching files` and exclude it from the proposal. Dead rules erode trust.
94
+
95
+ At the end, show a summary table:
96
+
97
+ | # | Rule file | Paths | Source(s) | Status |
98
+ |---|-----------|-------|-----------|--------|
99
+
100
+ Status column: `NEW` if no prior rule exists, `UPDATE` if it would merge with/extend an existing rule, `SKIP` if already covered.
101
+
102
+ After the table, show a stats line:
103
+
104
+ > Scanned **N** sources · Extracted **X** rules · Skipped **Y** candidates
105
+
106
+ ## Step 6: Apply or wait
107
+
108
+ - **Default (preview mode)**: Do NOT create any files. Wait for user approval.
109
+ - **If `--apply` argument is passed**: Write all proposed rules directly, then proceed to Step 7.
110
+
111
+ After user approves in preview mode, write the rule files and proceed to Step 7.
112
+
113
+ ## Step 7: Source cleanup
114
+
115
+ After writing rules, remove the extracted content from the original source files:
116
+
117
+ 1. For each written rule, locate the original text in the source file(s)
118
+ 2. Remove the extracted lines from the source — do not leave comments or placeholders
119
+ 3. If removing content leaves an empty section (e.g., a `## Discoveries` section with no remaining entries), remove the section heading too
120
+ 4. Preserve all non-extracted content in the source file
121
+
122
+ Show what was cleaned:
123
+
124
+ ```
125
+ Cleaned sources:
126
+ CLAUDE.md — removed 3 lines (2 rules extracted)
127
+ .claude/feedback/FEEDBACK.md — removed 1 line (1 rule extracted)
128
+ ```
@@ -883,6 +883,11 @@
883
883
  <span class="tree-file-icon">📄</span>
884
884
  <span class="file">enable-retro.md</span>
885
885
  </div>
886
+ <div class="tree-item indent-3 hidden" data-info="extract-rules" data-parent="commands">
887
+ <span class="tree-spacer"></span>
888
+ <span class="tree-file-icon">📄</span>
889
+ <span class="file">extract-rules.md</span>
890
+ </div>
886
891
  <div class="tree-item indent-3 hidden" data-info="gls" data-parent="commands">
887
892
  <span class="tree-spacer"></span>
888
893
  <span class="tree-file-icon">📄</span>
@@ -903,11 +908,6 @@
903
908
  <span class="tree-file-icon">📄</span>
904
909
  <span class="file">show-docs.md</span>
905
910
  </div>
906
- <div class="tree-item indent-3 hidden" data-info="sync-claude-md" data-parent="commands">
907
- <span class="tree-spacer"></span>
908
- <span class="tree-file-icon">📄</span>
909
- <span class="file">sync-claude-md.md</span>
910
- </div>
911
911
  <div class="tree-item indent-3 hidden" data-info="test" data-parent="commands">
912
912
  <span class="tree-spacer"></span>
913
913
  <span class="tree-file-icon">📄</span>
@@ -1268,7 +1268,7 @@
1268
1268
  title: '.claude/ Directory',
1269
1269
  desc: 'Commands, rules, settings, and these docs. Keeps configuration organized as your project grows.'
1270
1270
  },
1271
- 'rules': {
1271
+ 'rules': {
1272
1272
  title: 'rules/',
1273
1273
  desc: 'Path-scoped context that loads when Claude works on matching files.'
1274
1274
  },
@@ -1290,27 +1290,32 @@
1290
1290
  },
1291
1291
  'autoconfig-update': {
1292
1292
  title: 'autoconfig-update.md',
1293
- 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; text-align: left;"><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>',
1293
+ 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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>updates-available</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Displays list of pending updates with install/review options.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>up-to-date</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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>',
1294
1294
  trigger: '/autoconfig-update'
1295
1295
  },
1296
1296
  'autoconfig': {
1297
1297
  title: 'autoconfig.md',
1298
- desc: 'Configures Claude Code scaffolding for your project. Sets up settings, permissions, hooks, commands, and docs.<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; text-align: left;"><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;">Scaffolding configured, CLAUDE.md initialized, 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;">Initializes CLAUDE.md, settings.json, hooks, commands, 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>',
1298
+ desc: 'Configures Claude Code scaffolding for your project. Sets up settings, permissions, hooks, commands, and docs.<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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Scaffolding configured, CLAUDE.md initialized, docs opened in browser.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>no-project</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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;">Initializes CLAUDE.md, settings.json, hooks, commands, 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>',
1299
1299
  trigger: '/autoconfig'
1300
1300
  },
1301
1301
  'commit-and-push': {
1302
1302
  title: 'commit-and-push.md',
1303
- 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; text-align: left;"><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>',
1303
+ 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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Changes committed and pushed to current branch.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>test-failure</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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>',
1304
1304
  trigger: '/commit-and-push'
1305
1305
  },
1306
1306
  'enable-retro': {
1307
1307
  title: 'enable-retro.md',
1308
- 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; text-align: left;"><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>',
1308
+ 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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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>',
1309
1309
  trigger: '/enable-retro'
1310
1310
  },
1311
+ 'extract-rules': {
1312
+ title: 'extract-rules.md',
1313
+ desc: 'Scan Claude artifacts and propose structured rules for .claude/rules/<div style="margin-top: 12px;"><strong>Parameters</strong><table style="width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.9em; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Name</th><th style="padding: 4px 8px 4px 0;">Type</th><th style="padding: 4px 8px 4px 0;">Required</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>mode</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;"><code>string</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">optional</td><td style="padding: 4px 8px 4px 0; vertical-align: top;">"preview" (default) shows proposals, "apply" writes and cleans sources</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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Rules extracted and optionally applied with source cleanup.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>no-rules</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">No extractable rules found in scanned sources.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">May create .claude/rules/ files and remove extracted content from source files</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>/extract-rules</code> <span style="opacity: 0.6;">— Preview proposed rules without writing</span></div><div><code>/extract-rules --apply</code> <span style="opacity: 0.6;">— Write rules and clean up sources</span></div></div></div>',
1314
+ trigger: '/extract-rules'
1315
+ },
1311
1316
  'gls': {
1312
1317
  title: 'gls.md',
1313
- 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; text-align: left;"><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; text-align: left;"><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>',
1318
+ 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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Name</th><th style="padding: 4px 8px 4px 0;">Type</th><th style="padding: 4px 8px 4px 0;">Required</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>count</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;"><code>integer</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">optional</td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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 4px 0; vertical-align: top; white-space: nowrap;"><code>path</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;"><code>string</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">optional</td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Displays requested screenshot(s) from newest to oldest.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>no-screenshots</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Directory exists but contains no image files.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>no-directory</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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 .claude/cca.config.json 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>',
1314
1319
  trigger: '/gls'
1315
1320
  },
1316
1321
  'publish': {
@@ -1320,27 +1325,22 @@
1320
1325
  },
1321
1326
  'recover-context': {
1322
1327
  title: 'recover-context.md',
1323
- 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; text-align: left;"><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; text-align: left;"><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>',
1328
+ 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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Name</th><th style="padding: 4px 8px 4px 0;">Type</th><th style="padding: 4px 8px 4px 0;">Required</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>minutes</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;"><code>integer</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">required</td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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 4px 0; vertical-align: top; white-space: nowrap;"><code>--show</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;"><code>flag</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">optional</td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">~{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 4px 0; vertical-align: top; white-space: nowrap;"><code>no-transcript</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">No transcript files found.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>no-messages</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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>',
1324
1329
  trigger: '/recover-context'
1325
1330
  },
1326
1331
  'show-docs': {
1327
1332
  title: 'show-docs.md',
1328
- 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; text-align: left;"><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>',
1333
+ 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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Docs synced and opened in default browser.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>no-docs</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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>',
1329
1334
  trigger: '/show-docs'
1330
1335
  },
1331
- 'sync-claude-md': {
1332
- title: 'sync-claude-md.md',
1333
- desc: 'Ensures CLAUDE.md has the required markers and Discoveries section.<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; text-align: left;"><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 verified and updated if needed.</td></tr></table></div><div style="margin-top: 12px;"><strong>Side Effects</strong><div style="margin-top: 4px; font-size: 0.9em;">May add markers or Discoveries section if missing, preserves all existing content</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;">— Verify CLAUDE.md structure</span></div></div></div>',
1334
- trigger: '/sync-claude-md'
1335
- },
1336
1336
  'test': {
1337
1337
  title: 'test.md',
1338
- 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; text-align: left;"><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; text-align: left;"><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>',
1338
+ 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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Name</th><th style="padding: 4px 8px 4px 0;">Type</th><th style="padding: 4px 8px 4px 0;">Required</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>scope</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;"><code>string</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">optional</td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>success</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Test suite passes.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>failure</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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>',
1339
1339
  trigger: '/test'
1340
1340
  },
1341
1341
  'validate-cca-install': {
1342
1342
  title: 'validate-cca-install.md',
1343
- 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; text-align: left;"><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
+ 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; text-align: left;"><tr style="text-align: left; border-bottom: 1px solid var(--border);"><th style="padding: 4px 8px 4px 0;">Status</th><th style="padding: 4px 8px 4px 0;">Description</th></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>valid</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Install validated — all checks passed.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>issues</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">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>',
1344
1344
  trigger: '/validate-cca-install'
1345
1345
  },
1346
1346
  'create-retro-item-agent': {
@@ -1579,7 +1579,7 @@ CRITICAL: A plausible-looking cause from code reading is NOT confirmed evidence.
1579
1579
 
1580
1580
  > Run \`/autoconfig\` to populate this based on your project.`
1581
1581
  },
1582
- 'autoconfig-update': {
1582
+ 'autoconfig-update': {
1583
1583
  filename: 'autoconfig-update.md',
1584
1584
  content: `<!-- @applied
1585
1585
  -->
@@ -1699,6 +1699,38 @@ Each item is a structured story file with:
1699
1699
 
1700
1700
  - "Fix retro #001" — Work on a specific item
1701
1701
  - "What's in the retro backlog?" — List pending items`
1702
+ },
1703
+ 'extract-rules': {
1704
+ filename: 'extract-rules.md',
1705
+ content: `# Extract Rules
1706
+
1707
+ Scan all Claude configuration artifacts and propose structured rules for \`.claude/rules/\`.
1708
+
1709
+ ## Step 0: Git safety check
1710
+
1711
+ Before doing anything else, check for uncommitted changes:
1712
+
1713
+ \`\`\`bash
1714
+ git status --porcelain
1715
+ \`\`\`
1716
+
1717
+ If there are uncommitted changes, show this warning and wait for confirmation:
1718
+
1719
+ > **Warning:** This command will modify files (extract rules from sources and optionally clean up originals). You have uncommitted changes.
1720
+ >
1721
+ > Commit your work before proceeding, or type "continue" to proceed anyway.
1722
+
1723
+ If the working tree is clean, proceed silently.
1724
+
1725
+ ## Step 1: Discover sources
1726
+
1727
+ Scan these locations for \`.md\` files containing potential rules. **Skip any that don't exist** — not all projects have all of these:
1728
+
1729
+ 1. \`CLAUDE.md\` (project root)
1730
+ 2. \`CLAUDE.local.md\` (project root, if present)
1731
+ 3. All \`.md\` files in \`.claude/\` recursively (feedback, commands, etc.) — **excluding** \`.claude/rules/\` and \`.claude/commands/extract-rules.md\`
1732
+ 4. Any nested \`CLAUDE.md\` files in subdirectories (e.g., \`src/CLAUDE.md\`)
1733
+ 5. \`.claude/settings.json\` (hooks section — behavioral rules implied by hooks)`
1702
1734
  },
1703
1735
  'gls': {
1704
1736
  filename: 'gls.md',
@@ -1713,9 +1745,9 @@ Usage:
1713
1745
 
1714
1746
  ## Step 1: Check for saved path
1715
1747
 
1716
- Check the \`@screenshotDir\` comment on line 1 of THIS file. If it has a path (not empty), use that path and skip to Step 3.
1748
+ Read \`.claude/cca.config.json\` in the project root. If it exists and contains a \`gls.screenshotDir\` value, use that path and skip to Step 3.
1717
1749
 
1718
- If it's empty (i.e., \`<!-- @screenshotDir -->\`), continue to Step 2.
1750
+ If the file doesn't exist or the key is missing, continue to Step 2.
1719
1751
 
1720
1752
  ## Step 2: Detect screenshot directory
1721
1753
 
@@ -1731,7 +1763,7 @@ OS=$(uname -s); echo "OS=$OS"; for d in \\
1731
1763
  "$HOME/Pictures" \\
1732
1764
  "$HOME/Videos/Captures"; do \\
1733
1765
  [ -d "$d" ] || continue; \\
1734
- newest=$(ls -t "$d"/*.png "$d"/*.jpg "$d"/*.jpeg "$d"/*.bmp "$d"/*.webp "$d"/*.gif 2>/dev/null | head -1); \\`
1766
+ newest=$(ls -t "$d/" 2>/dev/null | grep -iE '\\.(png|jpg|jpeg|bmp|webp|gif)$' | head -1); \\`
1735
1767
  },
1736
1768
  'publish': {
1737
1769
  filename: 'publish.md',
@@ -1822,39 +1854,6 @@ Open the docs in the default browser. Use the command matching the current OS:
1822
1854
  - **Windows:** \`powershell -NoProfile -Command "Start-Process '.claude/docs/autoconfig.docs.html'"\`
1823
1855
 
1824
1856
  **Important:** If the command exits with a non-zero exit code or produces an error, tell the user the file failed to open and suggest they open it manually. Do NOT report success unless the command completed without error.`
1825
- },
1826
- 'sync-claude-md': {
1827
- filename: 'sync-claude-md.md',
1828
- content: `# Sync CLAUDE.md
1829
-
1830
- Verify that CLAUDE.md has the required structure. This command does NOT populate project descriptions — CLAUDE.md grows organically through Discoveries as you work. Claude can read your config files directly.
1831
-
1832
- ## Step 1: Check for Team Feedback
1833
-
1834
- Read \`.claude/feedback/FEEDBACK.md\` for any corrections or guidance from the team. Note any relevant entries.
1835
-
1836
- ## Step 2: Verify CLAUDE.md Structure
1837
-
1838
- Check that CLAUDE.md exists and has the required elements:
1839
-
1840
- 1. **Auto-generated markers** — ensure these exist:
1841
- \`\`\`markdown
1842
- <!-- AUTO-GENERATED BY /autoconfig at {TIMESTAMP} UTC -->
1843
- ...
1844
- <!-- END AUTO-GENERATED at {TIMESTAMP} UTC -->
1845
- \`\`\`
1846
-
1847
- 2. **Team Feedback pointer** — between the markers:
1848
- \`\`\`markdown
1849
- ## Team Feedback
1850
- The contents of \`.claude/feedback/FEEDBACK.md\` are an extension of this file.
1851
- Read it at the start of every session before taking any action.
1852
- FEEDBACK.md is reserved for human-authored corrections only — do not write to it.
1853
- \`\`\`
1854
-
1855
- 3. **Discoveries section** — below the end marker:
1856
- \`\`\`markdown
1857
- ## Discoveries`
1858
1857
  },
1859
1858
  'test': {
1860
1859
  filename: 'test.md',
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.0.169
4
+ - feat: add /extract-rules command
5
+
6
+ ## v1.0.168
7
+ - feat: remove /sync-claude-md command
8
+
3
9
  ## v1.0.167
4
10
  - fix: postversion creates separate commit instead of amending
5
11
 
@@ -141,9 +147,3 @@
141
147
  ## v1.0.120
142
148
  - feat: separate Claude discoveries from human feedback
143
149
 
144
- ## v1.0.119
145
- - fix: remove nul deny rules that block Windows bash redirections
146
-
147
- ## v1.0.118
148
- - feat: add feedback-to-rules migration update (003)
149
-
package/CLAUDE.md CHANGED
@@ -1,42 +1,42 @@
1
- <!-- AUTO-GENERATED BY /autoconfig at 2026-01-14 19:54:27 UTC — Do not edit. Use .claude/feedback/ for corrections. -->
2
-
3
- # claude-code-autoconfig
4
-
5
- CLI tool that auto-configures Claude Code for any project. One command analyzes your project, configures Claude, and shows you what it did.
6
-
7
- ## Tech Stack
8
-
9
- - **Runtime:** Node.js (>=16.0.0)
10
- - **Type:** npm CLI package
11
- - **Entry:** `bin/cli.js`
12
-
13
- ## Commands
14
-
15
- ```bash
16
- npm test # Run all tests (box alignment + CLI install)
17
- npm run test:box # Run box alignment tests only
18
- npm run test:install # Run CLI install tests only
19
- ```
20
-
21
- ## Project Structure
22
-
23
- - `bin/cli.js` — Main CLI entry point, handles bootstrap and /autoconfig launch
24
- - `.claude/commands/` — Slash command definitions (/autoconfig, /sync-claude-md, etc.)
25
- - `.claude/hooks/` — Hook scripts (format.js for JS/TS projects)
26
- - `.claude/feedback/` — Team feedback and corrections
27
- - `test/` — Test files
28
-
29
- ## Publishing
30
-
31
- ```bash
32
- npm version patch && npm publish
33
- ```
34
-
35
- ## Team Feedback
36
-
37
- See `.claude/feedback/` for corrections and guidance from the team.
38
-
39
- <!-- END AUTO-GENERATED at 2026-01-14 19:54:27 UTC — Use .claude/feedback/ for corrections. -->
1
+ <!-- AUTO-GENERATED BY /autoconfig at 2026-01-14 19:54:27 UTC — Do not edit. Use .claude/feedback/ for corrections. -->
2
+
3
+ # claude-code-autoconfig
4
+
5
+ CLI tool that auto-configures Claude Code for any project. One command analyzes your project, configures Claude, and shows you what it did.
6
+
7
+ ## Tech Stack
8
+
9
+ - **Runtime:** Node.js (>=16.0.0)
10
+ - **Type:** npm CLI package
11
+ - **Entry:** `bin/cli.js`
12
+
13
+ ## Commands
14
+
15
+ ```bash
16
+ npm test # Run all tests (box alignment + CLI install)
17
+ npm run test:box # Run box alignment tests only
18
+ npm run test:install # Run CLI install tests only
19
+ ```
20
+
21
+ ## Project Structure
22
+
23
+ - `bin/cli.js` — Main CLI entry point, handles bootstrap and /autoconfig launch
24
+ - `.claude/commands/` — Slash command definitions (/autoconfig, /autoconfig-update, etc.)
25
+ - `.claude/hooks/` — Hook scripts (format.js for JS/TS projects)
26
+ - `.claude/feedback/` — Team feedback and corrections
27
+ - `test/` — Test files
28
+
29
+ ## Publishing
30
+
31
+ ```bash
32
+ npm version patch && npm publish
33
+ ```
34
+
35
+ ## Team Feedback
36
+
37
+ See `.claude/feedback/` for corrections and guidance from the team.
38
+
39
+ <!-- END AUTO-GENERATED at 2026-01-14 19:54:27 UTC — Use .claude/feedback/ for corrections. -->
40
40
 
41
41
 
42
42
  ## Discoveries
package/README.md CHANGED
@@ -49,10 +49,10 @@ your-project/
49
49
  │ ├── autoconfig-update.md # /autoconfig-update - install updates
50
50
  │ ├── commit-and-push.md # /commit-and-push - git workflow
51
51
  │ ├── enable-retro.md # /enable-retro - opt-in tech debt tracking
52
+ │ ├── extract-rules.md # /extract-rules - extract rules from artifacts
52
53
  │ ├── gls.md # /gls - view latest screenshot
53
54
  │ ├── recover-context.md # /recover-context - restore context after compaction
54
55
  │ ├── show-docs.md # /show-docs - interactive walkthrough
55
- │ ├── sync-claude-md.md # /sync-claude-md - update CLAUDE.md
56
56
  │ ├── test.md # /test - run tests
57
57
  │ └── validate-cca-install.md # /validate-cca-install - verify installation
58
58
  ├── agents/ # Agent definitions
@@ -93,18 +93,16 @@ Autoconfig is **self-configuring**. Run `/autoconfig` and Claude:
93
93
  | Auto-format hook | Yes | Coming soon |
94
94
  | Optimized permissions | Yes | Coming soon |
95
95
 
96
- Run `/sync-claude-md` anytime your project evolves to keep the configuration current.
97
-
98
96
  ### Slash Commands
99
97
 
100
98
  | Command | Description |
101
99
  |---------|-------------|
102
100
  | `/autoconfig` | Configures Claude Code scaffolding for your project |
103
101
  | `/autoconfig-update` | Check for and install configuration updates |
104
- | `/sync-claude-md` | Verifies CLAUDE.md structure and markers |
105
102
  | `/show-docs` | Opens interactive docs in browser |
106
103
  | `/test` | Runs your test suite (auto-detects framework) |
107
104
  | `/commit-and-push` | Stages, commits with good message, and pushes |
105
+ | `/extract-rules` | Scan artifacts and propose structured rules for `.claude/rules/` |
108
106
  | `/recover-context` | Recovers conversation context after compaction |
109
107
  | `/gls` | Views latest screenshot for visual context |
110
108
  | `/validate-cca-install` | Validates installation against latest published version |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.167",
3
+ "version": "1.0.169",
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",
@@ -1,46 +0,0 @@
1
- <!-- @description Ensures CLAUDE.md has the required markers and Discoveries section. -->
2
- <!-- @version 3 -->
3
- <!-- @response success | CLAUDE.md verified and updated if needed. -->
4
- <!-- @sideeffect May add markers or Discoveries section if missing, preserves all existing content -->
5
- <!-- @example /sync-claude-md | Verify CLAUDE.md structure -->
6
-
7
- # Sync CLAUDE.md
8
-
9
- Verify that CLAUDE.md has the required structure. This command does NOT populate project descriptions — CLAUDE.md grows organically through Discoveries as you work. Claude can read your config files directly.
10
-
11
- ## Step 1: Check for Team Feedback
12
-
13
- Read `.claude/feedback/FEEDBACK.md` for any corrections or guidance from the team. Note any relevant entries.
14
-
15
- ## Step 2: Verify CLAUDE.md Structure
16
-
17
- Check that CLAUDE.md exists and has the required elements:
18
-
19
- 1. **Auto-generated markers** — ensure these exist:
20
- ```markdown
21
- <!-- AUTO-GENERATED BY /autoconfig at {TIMESTAMP} UTC -->
22
- ...
23
- <!-- END AUTO-GENERATED at {TIMESTAMP} UTC -->
24
- ```
25
-
26
- 2. **Team Feedback pointer** — between the markers:
27
- ```markdown
28
- ## Team Feedback
29
- The contents of `.claude/feedback/FEEDBACK.md` are an extension of this file.
30
- Read it at the start of every session before taking any action.
31
- FEEDBACK.md is reserved for human-authored corrections only — do not write to it.
32
- ```
33
-
34
- 3. **Discoveries section** — below the end marker:
35
- ```markdown
36
- ## Discoveries
37
- <!-- Claude: append project-specific learnings, gotchas, and context below. This section persists across /autoconfig runs. -->
38
- ```
39
-
40
- If any of these are missing, add them. **Never remove or overwrite existing content** — especially the Discoveries section, which contains organic learnings from real work.
41
-
42
- If CLAUDE.md doesn't exist at all, create it with the minimal template from `/autoconfig` Step 1.
43
-
44
- ## Step 3: Confirm
45
-
46
- Tell the user what was verified or updated. If everything was already in place, say so.