claude-code-autoconfig 1.0.130 → 1.0.132
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.md +13 -3
- package/.claude/feedback/FEEDBACK.md +0 -60
- package/CLAUDE.md +65 -0
- package/README.md +5 -1
- package/bin/cli.js +13 -10
- package/package.json +1 -1
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
<!-- @description The command you just ran. Analyzes your project and populates CLAUDE.md with real context. Re-run anytime your stack changes. -->
|
|
2
|
-
<!-- @version
|
|
2
|
+
<!-- @version 7 -->
|
|
3
3
|
|
|
4
4
|
# Autoconfig
|
|
5
5
|
|
|
6
6
|
Analyze this project and configure Claude Code with real context.
|
|
7
7
|
|
|
8
|
-
**Setup Note**: During autoconfig, prefer Glob/Read/Write tools over Bash commands. This ensures smooth setup without permission prompts. Only use Bash for opening the guide at the end.
|
|
8
|
+
**Setup Note**: During autoconfig, prefer Glob/Read/Write tools over Bash commands. This ensures smooth setup without permission prompts. Only use Bash for the bootstrap step and opening the guide at the end.
|
|
9
9
|
|
|
10
|
-
## Step
|
|
10
|
+
## Step 0a: Bootstrap files from latest package
|
|
11
|
+
|
|
12
|
+
**MANDATORY: You MUST run this Bash command before doing anything else.** Do not skip it. Do not assume it will fail. It is designed to work inside Claude Code sessions:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx claude-code-autoconfig@latest --bootstrap
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This downloads the latest package and copies slash commands, hooks, agents, docs, and settings into `.claude/`. The `--bootstrap` flag makes it safe to run inside Claude Code — it copies files and exits silently with code 0. If it fails (e.g., no network), continue anyway — the existing files will still work.
|
|
19
|
+
|
|
20
|
+
## Step 0b: Migrate FEEDBACK.md to Discoveries (one-time)
|
|
11
21
|
|
|
12
22
|
Read `.claude/feedback/FEEDBACK.md`. If it contains custom content beyond the default template header (sections after the first `---`), and `CLAUDE.md` does NOT already have a `## Discoveries` section:
|
|
13
23
|
|
|
@@ -7,63 +7,3 @@ Claude reads this file but must never write to it. When Claude discovers project
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
## Debugging Methodology — Evidence Before Solutions
|
|
11
|
-
|
|
12
|
-
**NEVER jump to a fix based on assumptions.** When investigating a bug:
|
|
13
|
-
|
|
14
|
-
1. **Gather evidence first** — add logging, check server logs, inspect actual data
|
|
15
|
-
2. **Confirm the root cause** — present findings to the user with evidence
|
|
16
|
-
3. **Only then propose a fix** — based on what you observed, not what you guessed
|
|
17
|
-
|
|
18
|
-
If you can't determine the root cause from code reading alone, **add diagnostic logging** and ask the user to reproduce. Do NOT:
|
|
19
|
-
- Guess the root cause and immediately start coding a fix
|
|
20
|
-
- Assume data mismatches without checking the actual data
|
|
21
|
-
- Rewrite logic because you think values "might" differ
|
|
22
|
-
|
|
23
|
-
The cost of a wrong fix is high: wasted time, unnecessary code complexity, and potentially masking the real issue.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Update System Guidelines
|
|
28
|
-
|
|
29
|
-
The `.claude/updates/` directory is for updates that **require Claude to execute instructions** — writing to MEMORY.md, modifying user config, running migrations, etc.
|
|
30
|
-
|
|
31
|
-
**Do NOT create update files for simple command file drops.** Command files in `.claude/commands/` are automatically installed/updated by `copyDir` in the CLI. The CLI detects new and modified commands and reports them in the console output. Creating an update file for a command that's already shipped via `copyDir` is redundant.
|
|
32
|
-
|
|
33
|
-
**Rule:** If the update is just a file → put it in the right directory and let the CLI copy it. If the update needs instructions → create a `NNN-*.md` update file.
|
|
34
|
-
|
|
35
|
-
**Command versioning:** Every command file must have a `<!-- @version N -->` comment (typically line 2, after `@description`). Bump the version number whenever you modify a command. The CLI parses this to show version transitions on upgrade (e.g., `↑ /recover-context (v1 → v2)`).
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Design Principles
|
|
40
|
-
|
|
41
|
-
- Each file should have a single responsibility (one reason to change)
|
|
42
|
-
- If a file exceeds 500 LOC, it likely lacks separation of concerns — look for decomposition opportunities
|
|
43
|
-
- Keep cyclomatic complexity under 10 per function — extract helper functions or simplify branching if higher
|
|
44
|
-
|
|
45
|
-
## Development Rules
|
|
46
|
-
|
|
47
|
-
### Testing Requirements
|
|
48
|
-
|
|
49
|
-
**CRITICAL: Before committing or outputting any changes to `bin/cli.js`, you MUST run tests and verify they pass:**
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
npm test
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
This runs tests which validate:
|
|
56
|
-
1. All box-drawing lines have consistent visual width (accounting for ANSI escape codes)
|
|
57
|
-
2. Box structure is valid (correct corner and border characters)
|
|
58
|
-
3. CLI install files exist and are properly configured
|
|
59
|
-
|
|
60
|
-
**DO NOT commit or present code changes if tests fail.** Fix the issues first.
|
|
61
|
-
|
|
62
|
-
### Box Drawing Guidelines
|
|
63
|
-
|
|
64
|
-
When modifying the "READY TO CONFIGURE" box in `bin/cli.js`:
|
|
65
|
-
|
|
66
|
-
1. All lines must be exactly 46 visible characters wide (including the `║` borders)
|
|
67
|
-
2. ANSI escape codes (`\x1b[...m`) don't count toward visible width
|
|
68
|
-
3. Place color codes outside content spacing: `\x1b[33m║\x1b[0m` + 44 chars of content + `\x1b[33m║\x1b[0m`
|
|
69
|
-
4. Always run `npm test` after any box modifications
|
package/CLAUDE.md
CHANGED
|
@@ -37,3 +37,68 @@ npm version patch && npm publish
|
|
|
37
37
|
See `.claude/feedback/` for corrections and guidance from the team.
|
|
38
38
|
|
|
39
39
|
<!-- END AUTO-GENERATED at 2026-01-14 19:54:27 UTC — Use .claude/feedback/ for corrections. -->
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Discoveries
|
|
43
|
+
<!-- Claude: append project-specific learnings, gotchas, and context below. This section persists across /autoconfig runs. -->
|
|
44
|
+
|
|
45
|
+
## Debugging Methodology — Evidence Before Solutions
|
|
46
|
+
|
|
47
|
+
**NEVER jump to a fix based on assumptions.** When investigating a bug:
|
|
48
|
+
|
|
49
|
+
1. **Gather evidence first** — add logging, check server logs, inspect actual data
|
|
50
|
+
2. **Confirm the root cause** — present findings to the user with evidence
|
|
51
|
+
3. **Only then propose a fix** — based on what you observed, not what you guessed
|
|
52
|
+
|
|
53
|
+
If you can't determine the root cause from code reading alone, **add diagnostic logging** and ask the user to reproduce. Do NOT:
|
|
54
|
+
- Guess the root cause and immediately start coding a fix
|
|
55
|
+
- Assume data mismatches without checking the actual data
|
|
56
|
+
- Rewrite logic because you think values "might" differ
|
|
57
|
+
|
|
58
|
+
The cost of a wrong fix is high: wasted time, unnecessary code complexity, and potentially masking the real issue.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Update System Guidelines
|
|
63
|
+
|
|
64
|
+
The `.claude/updates/` directory is for updates that **require Claude to execute instructions** — writing to MEMORY.md, modifying user config, running migrations, etc.
|
|
65
|
+
|
|
66
|
+
**Do NOT create update files for simple command file drops.** Command files in `.claude/commands/` are automatically installed/updated by `copyDir` in the CLI. The CLI detects new and modified commands and reports them in the console output. Creating an update file for a command that's already shipped via `copyDir` is redundant.
|
|
67
|
+
|
|
68
|
+
**Rule:** If the update is just a file → put it in the right directory and let the CLI copy it. If the update needs instructions → create a `NNN-*.md` update file.
|
|
69
|
+
|
|
70
|
+
**Command versioning:** Every command file must have a `<!-- @version N -->` comment (typically line 2, after `@description`). Bump the version number whenever you modify a command. The CLI parses this to show version transitions on upgrade (e.g., `↑ /recover-context (v1 → v2)`).
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Design Principles
|
|
75
|
+
|
|
76
|
+
- Each file should have a single responsibility (one reason to change)
|
|
77
|
+
- If a file exceeds 500 LOC, it likely lacks separation of concerns — look for decomposition opportunities
|
|
78
|
+
- Keep cyclomatic complexity under 10 per function — extract helper functions or simplify branching if higher
|
|
79
|
+
|
|
80
|
+
## Development Rules
|
|
81
|
+
|
|
82
|
+
### Testing Requirements
|
|
83
|
+
|
|
84
|
+
**CRITICAL: Before committing or outputting any changes to `bin/cli.js`, you MUST run tests and verify they pass:**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm test
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This runs tests which validate:
|
|
91
|
+
1. All box-drawing lines have consistent visual width (accounting for ANSI escape codes)
|
|
92
|
+
2. Box structure is valid (correct corner and border characters)
|
|
93
|
+
3. CLI install files exist and are properly configured
|
|
94
|
+
|
|
95
|
+
**DO NOT commit or present code changes if tests fail.** Fix the issues first.
|
|
96
|
+
|
|
97
|
+
### Box Drawing Guidelines
|
|
98
|
+
|
|
99
|
+
When modifying the "READY TO CONFIGURE" box in `bin/cli.js`:
|
|
100
|
+
|
|
101
|
+
1. All lines must be exactly 46 visible characters wide (including the `║` borders)
|
|
102
|
+
2. ANSI escape codes (`\x1b[...m`) don't count toward visible width
|
|
103
|
+
3. Place color codes outside content spacing: `\x1b[33m║\x1b[0m` + 44 chars of content + `\x1b[33m║\x1b[0m`
|
|
104
|
+
4. Always run `npm test` after any box modifications
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Claude Code is powerful out of the box, but every new project means manually wri
|
|
|
14
14
|
|
|
15
15
|
## Quick Install
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Works from a regular terminal or from inside an existing Claude Code session.
|
|
18
18
|
|
|
19
19
|
**npm:**
|
|
20
20
|
```bash
|
|
@@ -49,6 +49,8 @@ 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
|
+
│ ├── gls.md # /gls - view latest screenshot
|
|
53
|
+
│ ├── recover-context.md # /recover-context - restore context after compaction
|
|
52
54
|
│ ├── show-docs.md # /show-docs - interactive walkthrough
|
|
53
55
|
│ ├── sync-claude-md.md # /sync-claude-md - update CLAUDE.md
|
|
54
56
|
│ └── test.md # /test - run tests
|
|
@@ -102,6 +104,8 @@ Run `/sync-claude-md` anytime your project evolves to keep the configuration cur
|
|
|
102
104
|
| `/show-docs` | Opens interactive docs in browser |
|
|
103
105
|
| `/test` | Runs your test suite (auto-detects framework) |
|
|
104
106
|
| `/commit-and-push` | Stages, commits with good message, and pushes |
|
|
107
|
+
| `/recover-context` | Recovers conversation context after compaction |
|
|
108
|
+
| `/gls` | Views latest screenshot for visual context |
|
|
105
109
|
| `/enable-retro` | (Experimental) Enable tech debt tracking |
|
|
106
110
|
|
|
107
111
|
### Updates
|
package/bin/cli.js
CHANGED
|
@@ -154,16 +154,8 @@ if (process.argv.includes('--pull-updates')) {
|
|
|
154
154
|
|
|
155
155
|
const forceMode = process.argv.includes('--force');
|
|
156
156
|
|
|
157
|
-
//
|
|
158
|
-
|
|
159
|
-
console.log();
|
|
160
|
-
console.log('\x1b[33m%s\x1b[0m', '⚠️ This command must be run in a regular terminal, not inside Claude Code.');
|
|
161
|
-
console.log();
|
|
162
|
-
console.log(' Open a separate terminal and run:');
|
|
163
|
-
console.log('\x1b[36m%s\x1b[0m', ' npx claude-code-autoconfig@latest');
|
|
164
|
-
console.log();
|
|
165
|
-
process.exit(1);
|
|
166
|
-
}
|
|
157
|
+
// Detect if running inside Claude Code session
|
|
158
|
+
const insideClaude = process.env.CLAUDECODE === '1';
|
|
167
159
|
|
|
168
160
|
console.log('\x1b[36m%s\x1b[0m', '🚀 Claude Code Autoconfig');
|
|
169
161
|
console.log();
|
|
@@ -589,6 +581,17 @@ if (isUpgrade) {
|
|
|
589
581
|
|
|
590
582
|
const launchCommand = isUpgrade ? '/autoconfig-update' : '/autoconfig';
|
|
591
583
|
|
|
584
|
+
// --bootstrap: copy files only, exit silently (used by /autoconfig inside Claude)
|
|
585
|
+
const bootstrapMode = process.argv.includes('--bootstrap');
|
|
586
|
+
if (bootstrapMode || insideClaude) {
|
|
587
|
+
if (!bootstrapMode) {
|
|
588
|
+
// insideClaude without --bootstrap: show guidance
|
|
589
|
+
console.log('\x1b[32m%s\x1b[0m', `✅ Files installed. Run ${launchCommand} to continue.`);
|
|
590
|
+
console.log();
|
|
591
|
+
}
|
|
592
|
+
process.exit(0);
|
|
593
|
+
}
|
|
594
|
+
|
|
592
595
|
// Step 4: Show "READY" message
|
|
593
596
|
console.log();
|
|
594
597
|
if (isUpgrade) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-autoconfig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.132",
|
|
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",
|