claude-code-autoconfig 1.0.173 → 1.0.175
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/docs/autoconfig.docs.html +44 -2
- package/.claude/rules/readme-sync.md +26 -0
- package/CHANGELOG.md +6 -6
- package/README.md +8 -2
- package/bin/cli.js +1 -1
- package/package.json +1 -1
|
@@ -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>
|
|
@@ -1263,7 +1268,7 @@
|
|
|
1263
1268
|
title: '.claude/ Directory',
|
|
1264
1269
|
desc: 'Commands, rules, settings, and these docs. Keeps configuration organized as your project grows.'
|
|
1265
1270
|
},
|
|
1266
|
-
|
|
1271
|
+
'rules': {
|
|
1267
1272
|
title: 'rules/',
|
|
1268
1273
|
desc: 'Path-scoped context that loads when Claude works on matching files.'
|
|
1269
1274
|
},
|
|
@@ -1303,6 +1308,11 @@
|
|
|
1303
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>',
|
|
1304
1309
|
trigger: '/enable-retro'
|
|
1305
1310
|
},
|
|
1311
|
+
'extract-rules': {
|
|
1312
|
+
title: 'extract-rules.md',
|
|
1313
|
+
desc: 'Scan Claude artifacts and extract structured rules into .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>select</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;">Write only specific rules by number: "1,3,5". Default: all.</td></tr><tr style="border-bottom: 1px solid var(--border);"><td style="padding: 4px 8px 4px 0; vertical-align: top; white-space: nowrap;"><code>keep-sources</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;"><code>boolean</code></td><td style="padding: 4px 8px 4px 0; vertical-align: top;">optional</td><td style="padding: 4px 8px 4px 0; vertical-align: top;">Write rules but skip source cleanup (Step 8)</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, written, and sources cleaned up.</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;">Creates .claude/rules/ files and removes 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;">— Scan, propose, prompt for approval, write, and clean up</span></div><div><code>/extract-rules --keep-sources</code> <span style="opacity: 0.6;">— Write rules without modifying source files</span></div><div><code>/extract-rules --select 1,3</code> <span style="opacity: 0.6;">— Write only rules #1 and #3</span></div></div></div>',
|
|
1314
|
+
trigger: '/extract-rules'
|
|
1315
|
+
},
|
|
1306
1316
|
'gls': {
|
|
1307
1317
|
title: 'gls.md',
|
|
1308
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>',
|
|
@@ -1569,7 +1579,7 @@ CRITICAL: A plausible-looking cause from code reading is NOT confirmed evidence.
|
|
|
1569
1579
|
|
|
1570
1580
|
> Run \`/autoconfig\` to populate this based on your project.`
|
|
1571
1581
|
},
|
|
1572
|
-
|
|
1582
|
+
'autoconfig-update': {
|
|
1573
1583
|
filename: 'autoconfig-update.md',
|
|
1574
1584
|
content: `<!-- @applied
|
|
1575
1585
|
-->
|
|
@@ -1689,6 +1699,38 @@ Each item is a structured story file with:
|
|
|
1689
1699
|
|
|
1690
1700
|
- "Fix retro #001" — Work on a specific item
|
|
1691
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. Auto memory files — memory often contains misplaced imperatives that should be promoted to rules. To find the memory directory, list \`~/.claude/projects/\` and fuzzy-match against the current project path. The directory name encodes the path with dashes replacing separators, but encoding varies by platform and may not be consistent for paths with spaces, special characters, or deep nesting. **Discovery strategy**: list all directories under \`~/.claude/projects/\`, then find the one whose name best matches the current working directory (check if the directory name contains key path segments like the project folder name). Read \`MEMORY.md\` in that directory, then each \`.md\` file it links to. If no match is found or the memory directory can't be read, skip this source silently.`
|
|
1692
1734
|
},
|
|
1693
1735
|
'gls': {
|
|
1694
1736
|
filename: 'gls.md',
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "package.json"
|
|
4
|
+
- "README.md"
|
|
5
|
+
- "bin/cli.js"
|
|
6
|
+
- ".claude/commands/*.md"
|
|
7
|
+
- ".claude/docs/*.html"
|
|
8
|
+
- ".claude/scripts/sync-docs.js"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Before any publish to npm — whether via `/publish`, `npm publish`, `npm version`, or any other method — you MUST complete both steps below. Never skip either.
|
|
12
|
+
|
|
13
|
+
## 1. Sync README.md
|
|
14
|
+
|
|
15
|
+
Compare README.md against the current project state. Check:
|
|
16
|
+
|
|
17
|
+
1. File tree matches actual `.claude/` directory contents
|
|
18
|
+
2. Slash commands table matches actual `.claude/commands/` files (names, descriptions, versions)
|
|
19
|
+
3. Feature sections reflect current capabilities
|
|
20
|
+
4. No references to nonexistent commands, files, or removed features
|
|
21
|
+
|
|
22
|
+
Update and commit if anything is out of date.
|
|
23
|
+
|
|
24
|
+
## 2. Regenerate interactive HTML docs
|
|
25
|
+
|
|
26
|
+
Run `node .claude/scripts/sync-docs.js` to rebuild `.claude/docs/autoconfig.docs.html` from the current `.claude/` directory. Commit the regenerated file if it changed.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.0.175
|
|
4
|
+
- fix: include extract-rules command in user installs
|
|
5
|
+
|
|
6
|
+
## v1.0.174
|
|
7
|
+
- feat: add pre-publish rules for README and docs sync
|
|
8
|
+
|
|
3
9
|
## v1.0.173
|
|
4
10
|
- feat: ship /extract-rules to users
|
|
5
11
|
|
|
@@ -141,9 +147,3 @@
|
|
|
141
147
|
## v1.0.126
|
|
142
148
|
- feat: add FEEDBACK.md migration to /autoconfig Step 0
|
|
143
149
|
|
|
144
|
-
## v1.0.125
|
|
145
|
-
- feat: auto-migrate FEEDBACK.md to Discoveries during CLI upgrade
|
|
146
|
-
|
|
147
|
-
## v1.0.124
|
|
148
|
-
- fix: remove Step 0 from /autoconfig, clarify terminal requirement
|
|
149
|
-
|
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ 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 - scan & extract rules
|
|
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
|
|
@@ -64,7 +65,11 @@ your-project/
|
|
|
64
65
|
├── docs/ # Interactive documentation
|
|
65
66
|
│ └── autoconfig.docs.html # Open with /show-docs
|
|
66
67
|
├── updates/ # Pending config updates
|
|
67
|
-
├── rules/ # Path-scoped context
|
|
68
|
+
├── rules/ # Path-scoped context rules
|
|
69
|
+
│ ├── deploy-approval.md # Require approval before publish
|
|
70
|
+
│ └── readme-sync.md # Sync README & docs before publish
|
|
71
|
+
├── scripts/ # Utility scripts
|
|
72
|
+
│ └── sync-docs.js # Regenerate interactive HTML docs
|
|
68
73
|
├── .mcp.json # MCP server configs (empty placeholder)
|
|
69
74
|
└── settings.json # Permissions & security
|
|
70
75
|
```
|
|
@@ -104,6 +109,7 @@ Autoconfig is **self-configuring**. Run `/autoconfig` and Claude:
|
|
|
104
109
|
| `/recover-context` | Recovers conversation context after compaction |
|
|
105
110
|
| `/gls` | Views latest screenshot for visual context |
|
|
106
111
|
| `/validate-cca-install` | Validates installation against latest published version |
|
|
112
|
+
| `/extract-rules` | Scan Claude artifacts and extract structured rules |
|
|
107
113
|
| `/enable-retro` | (Experimental) Enable tech debt tracking |
|
|
108
114
|
|
|
109
115
|
### Updates
|
|
@@ -153,7 +159,7 @@ Work through items anytime: *"Hey Claude, fix retro #001"*
|
|
|
153
159
|
|
|
154
160
|
### Rules
|
|
155
161
|
|
|
156
|
-
The `rules/` directory
|
|
162
|
+
The `rules/` directory contains path-scoped context rules that activate when Claude edits matching files. Autoconfig ships with publish-safety rules; you can add your own or use `/extract-rules` to generate rules from existing Claude artifacts.
|
|
157
163
|
|
|
158
164
|
**Want optimized rules for your project?**
|
|
159
165
|
Reach out: [info@adac1001.com](mailto:info@adac1001.com)
|
package/bin/cli.js
CHANGED
|
@@ -327,7 +327,7 @@ const hooksSrc = path.join(packageDir, '.claude', 'hooks');
|
|
|
327
327
|
const scriptsSrc = path.join(packageDir, '.claude', 'scripts');
|
|
328
328
|
|
|
329
329
|
// Files that exist in the dev repo but should never be installed to user projects
|
|
330
|
-
const DEV_ONLY_FILES = ['publish.md'
|
|
330
|
+
const DEV_ONLY_FILES = ['publish.md'];
|
|
331
331
|
|
|
332
332
|
function copyDir(src, dest) {
|
|
333
333
|
fs.mkdirSync(dest, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-autoconfig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.175",
|
|
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",
|