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.
- package/.claude/.kickoff-hint.txt +51 -0
- package/.claude/ANCHORS.md +40 -0
- package/.claude/MEMORY.md +34 -0
- package/.claude/PROJECT_LOG.md +101 -0
- package/.claude/THINKING_CHAIN_GUIDE.md +287 -0
- package/.claude/commands/commit-push-pr.md +59 -0
- package/.claude/commands/commit.md +53 -0
- package/.claude/commands/pr.md +76 -0
- package/.claude/commands/review.md +61 -0
- package/.claude/commands/sessions.md +62 -0
- package/.claude/commands/skill-create.md +131 -0
- package/.claude/commands/test.md +56 -0
- package/.claude/commands/todos.md +99 -0
- package/.claude/commands/verify-work.md +63 -0
- package/.claude/hooks/code-formatter.cjs +187 -0
- package/.claude/hooks/code-tracer.cjs +331 -0
- package/.claude/hooks/conversation-recorder.cjs +340 -0
- package/.claude/hooks/decision-tracker.cjs +398 -0
- package/.claude/hooks/export.cjs +329 -0
- package/.claude/hooks/multi-session.cjs +181 -0
- package/.claude/hooks/privacy-filter.js +224 -0
- package/.claude/hooks/project-kickoff.cjs +114 -0
- package/.claude/hooks/rag-skill-loader.cjs +159 -0
- package/.claude/hooks/session-end.sh +61 -0
- package/.claude/hooks/sync-to-log.sh +83 -0
- package/.claude/hooks/thinking-silent.cjs +145 -0
- package/.claude/hooks/tl-summary.sh +54 -0
- package/.claude/hooks/todo-manager.cjs +248 -0
- package/.claude/hooks/verify-work.cjs +134 -0
- package/.claude/sessions/active-sessions.json +444 -0
- package/.claude/settings.local.json +36 -2
- package/.claude/thinking-routes/.last-sync +1 -0
- package/.claude/thinking-routes/QUICKREF.md +98 -0
- package/CHANGELOG.md +56 -0
- package/DEV_TOOLS_GUIDE.md +190 -0
- package/PROJECT_STRUCTURE.md +10 -1
- package/README.md +20 -6
- package/cli.js +85 -824
- package/config/defaults.json +34 -0
- package/development/todos/INDEX.md +14 -58
- package/lib/commands.js +698 -0
- package/lib/config.js +71 -0
- package/lib/utils.js +62 -0
- 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.
|
|
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/
|
|
27
|
+
"url": "git+https://github.com/sumulige/sumulige-claude.git"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=16.0.0"
|