kernelbot 1.0.14 → 1.0.15
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/package.json +1 -1
- package/src/coder.js +4 -0
- package/src/prompts/system.js +4 -1
- package/src/utils/config.js +1 -0
package/package.json
CHANGED
package/src/coder.js
CHANGED
|
@@ -5,6 +5,7 @@ export class ClaudeCodeSpawner {
|
|
|
5
5
|
constructor(config) {
|
|
6
6
|
this.maxTurns = config.claude_code?.max_turns || 50;
|
|
7
7
|
this.timeout = (config.claude_code?.timeout_seconds || 600) * 1000;
|
|
8
|
+
this.model = config.claude_code?.model || null;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
async run({ workingDirectory, prompt, maxTurns, onOutput }) {
|
|
@@ -15,6 +16,9 @@ export class ClaudeCodeSpawner {
|
|
|
15
16
|
|
|
16
17
|
return new Promise((resolve, reject) => {
|
|
17
18
|
const args = ['-p', prompt, '--max-turns', String(turns), '--output-format', 'text'];
|
|
19
|
+
if (this.model) {
|
|
20
|
+
args.push('--model', this.model);
|
|
21
|
+
}
|
|
18
22
|
|
|
19
23
|
const child = spawn('claude', args, {
|
|
20
24
|
cwd: workingDirectory,
|
package/src/prompts/system.js
CHANGED
|
@@ -10,12 +10,15 @@ You have full access to the operating system through your tools:
|
|
|
10
10
|
${toolList}
|
|
11
11
|
|
|
12
12
|
## Coding Tasks (writing code, fixing bugs, reviewing code, scaffolding projects)
|
|
13
|
+
IMPORTANT: You MUST NOT write code yourself using read_file/write_file. ALWAYS delegate coding to Claude Code.
|
|
13
14
|
1. Use git tools to clone the repo and create a branch
|
|
14
|
-
2. Use spawn_claude_code to do the actual coding work inside the repo
|
|
15
|
+
2. Use spawn_claude_code to do the actual coding work inside the repo — give it a clear, detailed prompt describing exactly what to build or fix
|
|
15
16
|
3. After Claude Code finishes, use git tools to commit and push
|
|
16
17
|
4. Use GitHub tools to create the PR
|
|
17
18
|
5. Report back with the PR link
|
|
18
19
|
|
|
20
|
+
You are the orchestrator. Claude Code is the coder. Never use read_file + write_file to modify source code — that's Claude Code's job. You handle git, GitHub, and infrastructure. Claude Code handles all code changes.
|
|
21
|
+
|
|
19
22
|
## Non-Coding Tasks (monitoring, deploying, restarting services, checking status)
|
|
20
23
|
- Use OS, Docker, process, network, and monitoring tools directly
|
|
21
24
|
- No need to spawn Claude Code for these
|