claude-init 1.0.0 → 1.0.2

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.
@@ -0,0 +1,2 @@
1
+ Ultrathink:
2
+ Carefully review this plan with a scrutinizing eye, point out its problems, and give suggestions that are clearly outside its current thinking framework. If you think any part of the design is too outrageous, call it out sharply to snap me back to reality.
@@ -0,0 +1,2 @@
1
+ Ultrathink:
2
+ You are a security engineer. Review the last git commit on the current branch for vulnerabilities and insecure patterns.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-init",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Initialize Claude development environment with configurations and templates",
5
5
  "type": "module",
6
6
  "bin": {
@@ -43,10 +43,13 @@
43
43
  },
44
44
  "repository": {
45
45
  "type": "git",
46
- "url": ""
46
+ "url": "git+https://github.com/ChrisLinn/claude-init.git"
47
47
  },
48
48
  "bugs": {
49
- "url": ""
49
+ "url": "https://github.com/ChrisLinn/claude-init/issues"
50
50
  },
51
- "homepage": ""
52
- }
51
+ "homepage": "https://github.com/ChrisLinn/claude-init#readme",
52
+ "publishConfig": {
53
+ "access": "public"
54
+ }
55
+ }
@@ -31,9 +31,23 @@ export async function handleClaudeMarkdown(targetDir) {
31
31
  return { action: 'skipped', details: 'CLAUDE.md already contains template content' };
32
32
  }
33
33
 
34
- // Append template content under a heading
35
- const heading = '\\n\\n# Claude Scratchpad Rules\\n\\n';
36
- const updatedContent = existingContent + heading + templateContent;
34
+ // Look for existing "# CLAUDE.md" heading
35
+ const claudeHeadingRegex = /^# CLAUDE\.md\s*$/m;
36
+ const headingMatch = existingContent.match(claudeHeadingRegex);
37
+
38
+ let updatedContent;
39
+ if (headingMatch) {
40
+ // Found existing heading, add template content right below it
41
+ const headingIndex = headingMatch.index + headingMatch[0].length;
42
+ const beforeHeading = existingContent.substring(0, headingIndex);
43
+ const afterHeading = existingContent.substring(headingIndex);
44
+ updatedContent = beforeHeading + '\n\n' + templateContent + afterHeading;
45
+ } else {
46
+ // No heading found, add one at the beginning with template content
47
+ const heading = '# CLAUDE.md\n\n';
48
+ updatedContent = heading + templateContent + '\n\n' + existingContent;
49
+ }
50
+
37
51
  await fs.writeFile(claudeFile, updatedContent);
38
52
 
39
53
  return { action: 'updated', details: 'Appended template content to existing CLAUDE.md' };