sumulige-claude 1.0.5 → 1.0.7

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.
Files changed (44) hide show
  1. package/.claude/.kickoff-hint.txt +51 -0
  2. package/.claude/ANCHORS.md +40 -0
  3. package/.claude/MEMORY.md +34 -0
  4. package/.claude/PROJECT_LOG.md +101 -0
  5. package/.claude/THINKING_CHAIN_GUIDE.md +287 -0
  6. package/.claude/commands/commit-push-pr.md +59 -0
  7. package/.claude/commands/commit.md +53 -0
  8. package/.claude/commands/pr.md +76 -0
  9. package/.claude/commands/review.md +61 -0
  10. package/.claude/commands/sessions.md +62 -0
  11. package/.claude/commands/skill-create.md +131 -0
  12. package/.claude/commands/test.md +56 -0
  13. package/.claude/commands/todos.md +99 -0
  14. package/.claude/commands/verify-work.md +63 -0
  15. package/.claude/hooks/code-formatter.cjs +187 -0
  16. package/.claude/hooks/code-tracer.cjs +331 -0
  17. package/.claude/hooks/conversation-recorder.cjs +340 -0
  18. package/.claude/hooks/decision-tracker.cjs +398 -0
  19. package/.claude/hooks/export.cjs +329 -0
  20. package/.claude/hooks/multi-session.cjs +181 -0
  21. package/.claude/hooks/privacy-filter.js +224 -0
  22. package/.claude/hooks/project-kickoff.cjs +114 -0
  23. package/.claude/hooks/rag-skill-loader.cjs +159 -0
  24. package/.claude/hooks/session-end.sh +61 -0
  25. package/.claude/hooks/sync-to-log.sh +83 -0
  26. package/.claude/hooks/thinking-silent.cjs +145 -0
  27. package/.claude/hooks/tl-summary.sh +54 -0
  28. package/.claude/hooks/todo-manager.cjs +248 -0
  29. package/.claude/hooks/verify-work.cjs +134 -0
  30. package/.claude/sessions/active-sessions.json +444 -0
  31. package/.claude/settings.local.json +36 -2
  32. package/.claude/thinking-routes/.last-sync +1 -0
  33. package/.claude/thinking-routes/QUICKREF.md +98 -0
  34. package/CHANGELOG.md +56 -0
  35. package/DEV_TOOLS_GUIDE.md +190 -0
  36. package/PROJECT_STRUCTURE.md +10 -1
  37. package/README.md +20 -6
  38. package/cli.js +85 -824
  39. package/config/defaults.json +34 -0
  40. package/development/todos/INDEX.md +14 -58
  41. package/lib/commands.js +698 -0
  42. package/lib/config.js +71 -0
  43. package/lib/utils.js +62 -0
  44. package/package.json +2 -2
package/lib/config.js ADDED
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Config - Configuration management
3
+ *
4
+ * Loads default config and merges with user config from ~/.claude/config.json
5
+ */
6
+
7
+ const fs = require('fs');
8
+ const path = require('path');
9
+ const defaults = require('../config/defaults.json');
10
+
11
+ const CONFIG_DIR = path.join(process.env.HOME, '.claude');
12
+ const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
13
+
14
+ /**
15
+ * Deep merge two objects
16
+ */
17
+ function deepMerge(target, source) {
18
+ const result = { ...target };
19
+ for (const key in source) {
20
+ if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
21
+ result[key] = deepMerge(target[key] || {}, source[key]);
22
+ } else {
23
+ result[key] = source[key];
24
+ }
25
+ }
26
+ return result;
27
+ }
28
+
29
+ /**
30
+ * Load configuration (defaults + user overrides)
31
+ * @returns {Object} Merged configuration
32
+ */
33
+ exports.loadConfig = function() {
34
+ if (fs.existsSync(CONFIG_FILE)) {
35
+ try {
36
+ const userConfig = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf-8'));
37
+ // Deep merge: user config overrides defaults
38
+ return deepMerge(defaults, userConfig);
39
+ } catch (e) {
40
+ console.warn('Warning: Failed to parse user config, using defaults');
41
+ return defaults;
42
+ }
43
+ }
44
+ return defaults;
45
+ };
46
+
47
+ /**
48
+ * Save configuration to file
49
+ * @param {Object} config - Configuration to save
50
+ */
51
+ exports.saveConfig = function(config) {
52
+ exports.ensureDir(CONFIG_DIR);
53
+ fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
54
+ };
55
+
56
+ /**
57
+ * Ensure a directory exists
58
+ */
59
+ exports.ensureDir = function(dir) {
60
+ if (!fs.existsSync(dir)) {
61
+ fs.mkdirSync(dir, { recursive: true });
62
+ }
63
+ };
64
+
65
+ // Export constants
66
+ exports.CONFIG_DIR = CONFIG_DIR;
67
+ exports.CONFIG_FILE = CONFIG_FILE;
68
+ exports.DEFAULTS = defaults;
69
+
70
+ // Calculate derived paths
71
+ exports.SKILLS_DIR = path.join(CONFIG_DIR, 'skills');
package/lib/utils.js ADDED
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Utils - Common utility functions
3
+ *
4
+ * Extracted from cli.js to eliminate code duplication
5
+ */
6
+
7
+ const fs = require('fs');
8
+ const path = require('path');
9
+
10
+ /**
11
+ * Recursively copy directory contents
12
+ * @param {string} src - Source directory
13
+ * @param {string} dest - Destination directory
14
+ * @param {boolean} overwrite - Whether to overwrite existing files
15
+ * @returns {number} Number of files copied
16
+ */
17
+ exports.copyRecursive = function(src, dest, overwrite = false) {
18
+ if (!fs.existsSync(src)) return 0;
19
+
20
+ if (!fs.existsSync(dest)) {
21
+ fs.mkdirSync(dest, { recursive: true });
22
+ }
23
+
24
+ let count = 0;
25
+ const entries = fs.readdirSync(src, { withFileTypes: true });
26
+
27
+ for (const entry of entries) {
28
+ const srcPath = path.join(src, entry.name);
29
+ const destPath = path.join(dest, entry.name);
30
+
31
+ if (entry.isDirectory()) {
32
+ count += exports.copyRecursive(srcPath, destPath, overwrite);
33
+ } else if (overwrite || !fs.existsSync(destPath)) {
34
+ fs.copyFileSync(srcPath, destPath);
35
+ // Add execute permission for scripts
36
+ if (entry.name.endsWith('.sh') || entry.name.endsWith('.cjs')) {
37
+ fs.chmodSync(destPath, 0o755);
38
+ }
39
+ count++;
40
+ }
41
+ }
42
+ return count;
43
+ };
44
+
45
+ /**
46
+ * Ensure a directory exists
47
+ * @param {string} dir - Directory path
48
+ */
49
+ exports.ensureDir = function(dir) {
50
+ if (!fs.existsSync(dir)) {
51
+ fs.mkdirSync(dir, { recursive: true });
52
+ }
53
+ };
54
+
55
+ /**
56
+ * Convert string to Title Case
57
+ * @param {string} str - Input string
58
+ * @returns {string} Title cased string
59
+ */
60
+ exports.toTitleCase = function(str) {
61
+ return str.replace(/\b\w/g, char => char.toUpperCase());
62
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumulige-claude",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "The Best Agent Harness for Claude Code",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -24,7 +24,7 @@
24
24
  "type": "commonjs",
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "git+https://github.com/sumulige/oh-my-claude.git"
27
+ "url": "git+https://github.com/sumulige/sumulige-claude.git"
28
28
  },
29
29
  "engines": {
30
30
  "node": ">=16.0.0"