claude-agents-delegation 1.0.0
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/LICENSE +24 -0
- package/README.md +128 -0
- package/bin/init.js +42 -0
- package/package.json +39 -0
- package/src/cli.js +63 -0
- package/src/docs/codex-en.js +613 -0
- package/src/docs/codex-tr.js +613 -0
- package/src/docs/gemini-en.js +905 -0
- package/src/docs/gemini-tr.js +905 -0
- package/src/docs/usage-en.js +421 -0
- package/src/docs/usage-tr.js +421 -0
- package/src/generator.js +76 -0
- package/src/templates/claude-md.js +171 -0
- package/src/templates/codex-agents.js +260 -0
- package/src/templates/gemini-agents.js +242 -0
- package/src/templates/investigator.js +481 -0
- package/src/templates/settings-local.js +27 -0
- package/src/utils.js +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
GNU GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
Preamble
|
|
9
|
+
|
|
10
|
+
The GNU General Public License is a free, copyleft license for
|
|
11
|
+
software and other kinds of works.
|
|
12
|
+
|
|
13
|
+
The licenses for most software and other practical works are designed
|
|
14
|
+
to take away your freedom to share and change the works. By contrast,
|
|
15
|
+
the GNU General Public License is intended to guarantee your freedom to
|
|
16
|
+
share and change all versions of a program--to make sure it remains free
|
|
17
|
+
software for all its users. We, the Free Software Foundation, use the
|
|
18
|
+
GNU General Public License for most of our software; it applies also to
|
|
19
|
+
any other work released this way by its authors. You can apply it to
|
|
20
|
+
your programs, too.
|
|
21
|
+
|
|
22
|
+
For the complete license text, see <https://www.gnu.org/licenses/gpl-3.0.txt>
|
|
23
|
+
|
|
24
|
+
Copyright (c) 2026 waroi
|
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# claude-agents-delegation
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/claude-agents-delegation)
|
|
4
|
+
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
5
|
+
|
|
6
|
+
Multi-agent delegation boilerplate for **Claude Code** — run Gemini, Codex, and Claude agents in parallel with simple shorthands.
|
|
7
|
+
|
|
8
|
+
## Quick Start
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx claude-agents-delegation init
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Or with defaults (no prompts):
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx claude-agents-delegation init --yes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What It Does
|
|
21
|
+
|
|
22
|
+
Claude Code is powerful but expensive. This boilerplate redirects simple tasks to cheaper AI models:
|
|
23
|
+
|
|
24
|
+
| Layer | AI | Role | Cost |
|
|
25
|
+
|-------|----|------|------|
|
|
26
|
+
| **Decision** | Claude ✅ | Complex decisions, file writing, architecture | Highest |
|
|
27
|
+
| **Code** | Codex 🟠 | Code analysis, bug fixing, test writing | Medium |
|
|
28
|
+
| **Analysis** | Gemini 🔵 | Bulk text/data analysis, log reading | Cheapest |
|
|
29
|
+
|
|
30
|
+
**Simple rule:** Claude thinks, Codex codes, Gemini reads.
|
|
31
|
+
|
|
32
|
+
## Generated Files
|
|
33
|
+
|
|
34
|
+
Running `init` creates the following in your project:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
your-project/
|
|
38
|
+
├── CLAUDE.md # Delegation rules & shorthands
|
|
39
|
+
└── .claude/
|
|
40
|
+
├── settings.local.json # CLI permissions
|
|
41
|
+
├── agents/
|
|
42
|
+
│ └── investigator.md # Auto-spawned investigation agent
|
|
43
|
+
└── commands/
|
|
44
|
+
├── codex_agents.md # /codex_agents skill
|
|
45
|
+
└── gemini_agents.md # /gemini_agents skill
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Optional docs (USAGE.md, integration guides) are generated when you choose "Full" documentation.
|
|
49
|
+
|
|
50
|
+
## Shorthands
|
|
51
|
+
|
|
52
|
+
Add a shorthand to the end of any Claude Code command:
|
|
53
|
+
|
|
54
|
+
| Shorthand | Agents | Total |
|
|
55
|
+
|-----------|--------|-------|
|
|
56
|
+
| `x3` | 1 Claude + 2 Gemini | 3 |
|
|
57
|
+
| `x5` | 1 Claude + 4 Gemini | 5 |
|
|
58
|
+
| `c` / `c3` | 3 Codex | 3 |
|
|
59
|
+
| `c5` | 5 Codex | 5 |
|
|
60
|
+
| `g` / `g3` | 3 Gemini | 3 |
|
|
61
|
+
| `g5` | 5 Gemini | 5 |
|
|
62
|
+
|
|
63
|
+
**Combine freely:**
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
analyze this project x5 c5
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
= 1 Claude + 4 Gemini + 5 Codex = **10 parallel agents**
|
|
70
|
+
|
|
71
|
+
## Prerequisites
|
|
72
|
+
|
|
73
|
+
### Gemini CLI
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm install -g @google/gemini-cli
|
|
77
|
+
gemini # sign in with Google account
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Codex CLI
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm install -g @openai/codex
|
|
84
|
+
codex login
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Bash (Windows)
|
|
88
|
+
|
|
89
|
+
All commands use bash syntax. On Windows, use **Git Bash** or **WSL**.
|
|
90
|
+
|
|
91
|
+
## Features
|
|
92
|
+
|
|
93
|
+
- **Three-tier delegation** — Claude for decisions, Codex for code, Gemini for bulk analysis
|
|
94
|
+
- **Parallel agents** — Run up to 10 agents simultaneously with simple shorthands
|
|
95
|
+
- **Automatic fallback** — Each agent tries multiple models before failing
|
|
96
|
+
- **Graceful degradation** — If all external agents fail, Claude takes over automatically
|
|
97
|
+
- **Zero dependencies** — Only uses Node.js built-ins
|
|
98
|
+
- **Interactive setup** — Choose tools, docs, and language during init
|
|
99
|
+
- **Skip-existing** — Won't overwrite files that already exist in your project
|
|
100
|
+
|
|
101
|
+
## Usage Examples
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
# Code analysis with 3 Codex agents
|
|
105
|
+
find bugs in src/ c3
|
|
106
|
+
|
|
107
|
+
# Data analysis with 3 Gemini agents
|
|
108
|
+
analyze the log files g3
|
|
109
|
+
|
|
110
|
+
# Full project review with everything
|
|
111
|
+
review this project x5 c5
|
|
112
|
+
|
|
113
|
+
# Quick investigation
|
|
114
|
+
what does this codebase do x3
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Options
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
npx claude-agents-delegation init [--yes]
|
|
121
|
+
|
|
122
|
+
init Generate delegation config files in current directory
|
|
123
|
+
--yes Use defaults (both tools, full docs, English)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
[GPL-3.0](LICENSE)
|
package/bin/init.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { banner, writeFiles, printSuccess } = require('../src/utils');
|
|
5
|
+
const { promptUser, defaultAnswers } = require('../src/cli');
|
|
6
|
+
const { generateFiles } = require('../src/generator');
|
|
7
|
+
|
|
8
|
+
async function main() {
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
const command = args[0];
|
|
11
|
+
|
|
12
|
+
if (command !== 'init') {
|
|
13
|
+
console.log('');
|
|
14
|
+
console.log(' Usage: npx claude-agents-delegation init [--yes]');
|
|
15
|
+
console.log('');
|
|
16
|
+
console.log(' Options:');
|
|
17
|
+
console.log(' init Generate delegation config files in current directory');
|
|
18
|
+
console.log(' --yes Use defaults (both tools, full docs, English)');
|
|
19
|
+
console.log('');
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
banner();
|
|
24
|
+
|
|
25
|
+
const useDefaults = args.includes('--yes') || args.includes('-y');
|
|
26
|
+
const answers = useDefaults ? defaultAnswers() : await promptUser();
|
|
27
|
+
|
|
28
|
+
if (!useDefaults) {
|
|
29
|
+
console.log('');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const files = generateFiles(answers);
|
|
33
|
+
const targetDir = process.cwd();
|
|
34
|
+
const created = writeFiles(files, targetDir);
|
|
35
|
+
|
|
36
|
+
printSuccess(created, answers);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
main().catch((err) => {
|
|
40
|
+
console.error('Error:', err.message);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-agents-delegation",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Multi-agent delegation boilerplate for Claude Code — Gemini + Codex + Claude working together",
|
|
5
|
+
"main": "src/generator.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"claude-agents-delegation": "./bin/init.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"src/",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"keywords": [
|
|
16
|
+
"claude",
|
|
17
|
+
"claude-code",
|
|
18
|
+
"gemini",
|
|
19
|
+
"codex",
|
|
20
|
+
"multi-agent",
|
|
21
|
+
"delegation",
|
|
22
|
+
"ai-agents",
|
|
23
|
+
"cli",
|
|
24
|
+
"boilerplate"
|
|
25
|
+
],
|
|
26
|
+
"author": "waroi",
|
|
27
|
+
"license": "GPL-3.0",
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=16.0.0"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/waroi/claude-multiagent-boiler-plate.git"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/waroi/claude-multiagent-boiler-plate#readme",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/waroi/claude-multiagent-boiler-plate/issues"
|
|
38
|
+
}
|
|
39
|
+
}
|
package/src/cli.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const readline = require('readline');
|
|
4
|
+
|
|
5
|
+
function ask(rl, question, options) {
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
console.log(` ? ${question}`);
|
|
8
|
+
options.forEach((opt, i) => {
|
|
9
|
+
console.log(` (${i + 1}) ${opt.label}${opt.note ? ` — ${opt.note}` : ''}`);
|
|
10
|
+
});
|
|
11
|
+
process.stdout.write(' > ');
|
|
12
|
+
|
|
13
|
+
rl.once('line', (line) => {
|
|
14
|
+
const num = parseInt(line.trim(), 10);
|
|
15
|
+
if (num >= 1 && num <= options.length) {
|
|
16
|
+
resolve(options[num - 1].value);
|
|
17
|
+
} else {
|
|
18
|
+
resolve(options[0].value);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function promptUser() {
|
|
25
|
+
const rl = readline.createInterface({
|
|
26
|
+
input: process.stdin,
|
|
27
|
+
output: process.stdout,
|
|
28
|
+
terminal: !!process.stdin.isTTY
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const tools = await ask(rl, 'Which AI tools will you use?', [
|
|
32
|
+
{ label: 'Gemini only', note: 'text/data analysis', value: 'gemini' },
|
|
33
|
+
{ label: 'Codex only', note: 'code analysis', value: 'codex' },
|
|
34
|
+
{ label: 'Both', note: 'recommended', value: 'both' }
|
|
35
|
+
]);
|
|
36
|
+
|
|
37
|
+
console.log('');
|
|
38
|
+
|
|
39
|
+
const docs = await ask(rl, 'Include documentation files?', [
|
|
40
|
+
{ label: 'Minimal', note: 'config files only', value: 'minimal' },
|
|
41
|
+
{ label: 'Full', note: 'config + guides + usage docs', value: 'full' }
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
let lang = 'en';
|
|
45
|
+
if (docs === 'full') {
|
|
46
|
+
console.log('');
|
|
47
|
+
lang = await ask(rl, 'Documentation language?', [
|
|
48
|
+
{ label: 'English', value: 'en' },
|
|
49
|
+
{ label: 'Turkish', value: 'tr' },
|
|
50
|
+
{ label: 'Both', value: 'both' }
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
rl.close();
|
|
55
|
+
|
|
56
|
+
return { tools, docs, lang };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function defaultAnswers() {
|
|
60
|
+
return { tools: 'both', docs: 'full', lang: 'en' };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
module.exports = { promptUser, defaultAnswers };
|