claude-code-autoconfig 1.0.80 → 1.0.82
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.
|
@@ -58,6 +58,43 @@ Look for these indicators to understand the project:
|
|
|
58
58
|
- `.github/workflows/` → GitHub Actions
|
|
59
59
|
- `serverless.yml` → Serverless Framework
|
|
60
60
|
|
|
61
|
+
## Step 2b: Detect Version Divergence
|
|
62
|
+
|
|
63
|
+
Scan for version declarations across the project. Multiple version sources that disagree can cause release failures (e.g., package.json says 1.0.74 but a hardcoded constant says 1.0.72).
|
|
64
|
+
|
|
65
|
+
**Version Sources to Check:**
|
|
66
|
+
|
|
67
|
+
| Source | Detection Method |
|
|
68
|
+
|--------|------------------|
|
|
69
|
+
| `package.json` | Parse JSON, read `version` field |
|
|
70
|
+
| `**/*.{ts,js,mjs}` | Regex: `/(?:export\s+)?(?:const\|let\|var)\s+((?:BASE_\|APP_\|LIB_)?VERSION)\s*=\s*['"](\d+\.\d+\.\d+)['"]/i` |
|
|
71
|
+
| `**/manifest.json` | Parse JSON, read `version` field |
|
|
72
|
+
| `**/manifest.config.{ts,js}` | Regex: `/version:\s*['"](\d+\.\d+\.\d+)['"]/` |
|
|
73
|
+
| `**/Info.plist` | Regex: `/<key>CFBundleShortVersionString<\/key>\s*<string>(\d+\.\d+\.\d+)<\/string>/` |
|
|
74
|
+
| `**/build.gradle` | Regex: `/versionName\s+['"](\d+\.\d+\.\d+)['"]/` |
|
|
75
|
+
| `pyproject.toml` | Parse TOML, read `project.version` or `tool.poetry.version` |
|
|
76
|
+
| `Cargo.toml` | Parse TOML, read `package.version` |
|
|
77
|
+
|
|
78
|
+
**Algorithm:**
|
|
79
|
+
|
|
80
|
+
1. Glob for each file pattern
|
|
81
|
+
2. Extract version using the appropriate method (JSON parse, regex, TOML parse)
|
|
82
|
+
3. Collect results as `{ file, identifier, version }`
|
|
83
|
+
4. Compare all collected versions
|
|
84
|
+
5. **If all versions match** → no action needed
|
|
85
|
+
6. **If versions diverge** → flag for CLAUDE.md
|
|
86
|
+
|
|
87
|
+
**Skip these locations** (generated/vendored):
|
|
88
|
+
- `node_modules/**`
|
|
89
|
+
- `dist/**`
|
|
90
|
+
- `build/**`
|
|
91
|
+
- `.git/**`
|
|
92
|
+
|
|
93
|
+
**Edge Cases:**
|
|
94
|
+
- If version field references a function or variable (not a literal), note it as "dynamic"
|
|
95
|
+
- For monorepos, compare root package.json against workspace packages
|
|
96
|
+
- If only one version source exists, no comparison needed — skip silently
|
|
97
|
+
|
|
61
98
|
## Step 3: Populate CLAUDE.md
|
|
62
99
|
|
|
63
100
|
Focus on what Claude Code actually needs to work effectively. Claude can explore the codebase itself — don't document what it can discover.
|
|
@@ -81,6 +118,21 @@ Replace `{TIMESTAMP}` with the current UTC time in format `YYYY-MM-DD HH:MM:SS`
|
|
|
81
118
|
- **Commands**: How to run, test, build, deploy — Claude needs these to execute tasks
|
|
82
119
|
- **Non-obvious conventions**: Multi-schema databases, monorepo structure, unusual patterns Claude wouldn't infer
|
|
83
120
|
|
|
121
|
+
**Include if divergence detected (from Step 2b):**
|
|
122
|
+
- **Version Management**: Only add this section if version divergence was found
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
## Version Management
|
|
126
|
+
|
|
127
|
+
⚠️ Multiple version sources detected with different values:
|
|
128
|
+
- `package.json:version` → "X.Y.Z"
|
|
129
|
+
- `{file}:{identifier}` → "A.B.C"
|
|
130
|
+
|
|
131
|
+
Verify which source is authoritative before releases.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Place this section near the top (after Tech Stack, before Commands) since version issues block releases.
|
|
135
|
+
|
|
84
136
|
**Include if relevant:**
|
|
85
137
|
- **Deployment flow**: If non-standard or involves multiple steps
|
|
86
138
|
- **Key architectural decisions**: Only if Claude would make wrong assumptions without them
|
|
@@ -30,6 +30,15 @@ Scan for current project indicators:
|
|
|
30
30
|
**Infrastructure:**
|
|
31
31
|
- Docker, Terraform, CI/CD configs
|
|
32
32
|
|
|
33
|
+
**Version Divergence Check:**
|
|
34
|
+
Scan for version declarations that may have drifted out of sync:
|
|
35
|
+
- `package.json:version`
|
|
36
|
+
- Hardcoded constants like `BASE_VERSION`, `APP_VERSION` in `*.ts`, `*.js`
|
|
37
|
+
- Platform configs: `manifest.json`, `Info.plist`, `build.gradle`
|
|
38
|
+
- Language configs: `pyproject.toml`, `Cargo.toml`
|
|
39
|
+
|
|
40
|
+
If multiple sources exist with different values, include a `## Version Management` section in CLAUDE.md warning about the divergence. If all versions match (or only one source exists), remove any existing Version Management section.
|
|
41
|
+
|
|
33
42
|
## Step 3: Update CLAUDE.md
|
|
34
43
|
|
|
35
44
|
CLAUDE.md uses markers to identify auto-generated content:
|
package/.claude/hooks/format.js
CHANGED
package/bin/cli.js
CHANGED
|
@@ -27,7 +27,7 @@ const WINDOWS_RESERVED = ['CON', 'PRN', 'AUX', 'NUL', 'COM1', 'COM2', 'COM3', 'C
|
|
|
27
27
|
'LPT6', 'LPT7', 'LPT8', 'LPT9'];
|
|
28
28
|
|
|
29
29
|
// Files/folders installed by autoconfig - don't backup these
|
|
30
|
-
const AUTOCONFIG_FILES = ['commands', 'guide', 'agents', 'migration'];
|
|
30
|
+
const AUTOCONFIG_FILES = ['commands', 'guide', 'agents', 'migration', 'hooks'];
|
|
31
31
|
|
|
32
32
|
function isReservedName(name) {
|
|
33
33
|
const baseName = name.replace(/\.[^.]*$/, '').toUpperCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-autoconfig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.82",
|
|
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",
|
package/.claude/hooks/.gitkeep
DELETED
|
File without changes
|