claude-dreamteam 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/README.md ADDED
@@ -0,0 +1,228 @@
1
+ # claude-dreamteam
2
+
3
+ Stop configuring Claude Code manually. Describe your project, get a full dev team.
4
+
5
+ ---
6
+
7
+ ## The Problem
8
+
9
+ Every new Claude Code project starts the same way: you manually write a CLAUDE.md, figure out which agents you need, create skills for your tech stack, set up memory files, configure MCP servers...
10
+
11
+ It takes hours. And most people never get past Level 1.
12
+
13
+ ## The Solution
14
+
15
+ ```bash
16
+ npx claude-dreamteam init
17
+ ```
18
+
19
+ One install. Then open any empty folder and tell Claude what you want to build:
20
+
21
+ ```
22
+ /dream food delivery app with React Native, Node.js, PostgreSQL, and Stripe
23
+ ```
24
+
25
+ The orchestrator reads your idea, detects your tech stack, and builds your entire Claude Code environment automatically:
26
+
27
+ - **CLAUDE.md** with your project's architecture, conventions, and rules
28
+ - **Specialized agents** — frontend-dev, backend-dev, tester, reviewer (tailored to YOUR stack)
29
+ - **Skills** — reusable tech-stack patterns that every agent consults
30
+ - **Slash commands** — /new-feature, /fix-bug, /run-tests, /review
31
+ - **Memory system** — persistent knowledge base that makes your project smarter over time
32
+ - **MCP servers** — auto-configured connections to GitHub, databases, Stripe, etc.
33
+
34
+ Everything is project-specific. Not generic templates. Real, usable infrastructure.
35
+
36
+ ---
37
+
38
+ ## Quick Start
39
+
40
+ ### 1. Install (once, takes 2 seconds)
41
+
42
+ ```bash
43
+ npx claude-dreamteam init
44
+ ```
45
+
46
+ This copies the orchestrator into `~/.claude/` so it's available in every project.
47
+
48
+ ### 2. Create your project
49
+
50
+ ```bash
51
+ mkdir my-app && cd my-app
52
+ claude
53
+ ```
54
+
55
+ ### 3. Describe your idea
56
+
57
+ ```
58
+ /dream SaaS analytics dashboard with Next.js, Python FastAPI backend,
59
+ PostgreSQL database, Stripe billing, deployed on Vercel
60
+ ```
61
+
62
+ That's it. The orchestrator takes over and builds everything.
63
+
64
+ ### 4. Level up when you're ready
65
+
66
+ ```
67
+ /level-up
68
+ ```
69
+
70
+ ---
71
+
72
+ ## The 10 Levels
73
+
74
+ We mapped out 10 levels of Claude Code mastery. Most people are stuck at Level 0-1.
75
+ The gap between levels isn't knowledge — it's setup. Dream Team closes that gap.
76
+
77
+ ```
78
+ Level 0 Terminal Tourist You type prompts and hope for the best
79
+ Level 1 Foundation CLAUDE.md exists with project conventions
80
+ Level 2 Connected MCP servers configured (GitHub, DB, APIs)
81
+ Level 3 Skilled Custom skills + slash commands
82
+ Level 4 Remembering Memory system — project gets smarter over time
83
+ Level 5 Multi-Agent Specialized agents working together
84
+ Level 6 Headless CLI scripts, git hooks, automation
85
+ Level 7 Visual Browser automation with Playwright
86
+ Level 8 Parallel Multiple agents running concurrently
87
+ Level 9 Always-On Cron jobs, background agents running 24/7
88
+ Level 10 Self-Evolving Autonomous loops — agents that improve agents
89
+ ```
90
+
91
+ `/dream` builds you to **Level 5** by default. From there, `/level-up` takes you one step at a time.
92
+
93
+ ---
94
+
95
+ ## Three Commands
96
+
97
+ Once installed, you have three commands inside Claude Code:
98
+
99
+ ### `/dream` — Build from scratch
100
+
101
+ ```
102
+ /dream e-commerce platform with React, Express, MongoDB, and Stripe
103
+ ```
104
+
105
+ Analyzes your idea. Detects the tech stack. Builds Levels 1 through 5 automatically.
106
+ Works with any stack — React, Vue, Angular, Next.js, FastAPI, Django, Rails,
107
+ Go, Rust, mobile, monorepos, whatever you throw at it.
108
+
109
+ ### `/level-up` — See where you are, build what's next
110
+
111
+ ```
112
+ /level-up
113
+ ```
114
+
115
+ Scans your actual environment. Shows your current level. Explains what the next
116
+ level unlocks. Offers to build it right there. No overwhelm — just the next step.
117
+
118
+ ### `/evolve` — Auto-improve everything
119
+
120
+ ```
121
+ /evolve
122
+ ```
123
+
124
+ Runs a gap analysis on your agents, skills, commands, and memory. Finds what's
125
+ weak or missing. Fixes it automatically. Shows you the before/after score.
126
+
127
+ ---
128
+
129
+ ## CLI Reference
130
+
131
+ ```bash
132
+ npx claude-dreamteam init # Install globally (all projects)
133
+ npx claude-dreamteam init --force # Reinstall, overwrite modified files
134
+ npx claude-dreamteam init-local # Install in current project only
135
+ npx claude-dreamteam status # Check what's installed
136
+ npx claude-dreamteam uninstall # Remove everything
137
+ npx claude-dreamteam --version # Show version
138
+ ```
139
+
140
+ ---
141
+
142
+ ## What Gets Installed
143
+
144
+ The package is tiny. It installs 4 files into your `~/.claude/` directory:
145
+
146
+ ```
147
+ ~/.claude/
148
+ agents/
149
+ orchestrator.md The brain — one agent that builds everything
150
+ commands/
151
+ dream.md /dream command
152
+ level-up.md /level-up command
153
+ evolve.md /evolve command
154
+ ```
155
+
156
+ That's it. No dependencies. No background processes. No config files to maintain.
157
+
158
+ The orchestrator generates everything else dynamically based on your project.
159
+
160
+ ---
161
+
162
+ ## How It Works Under the Hood
163
+
164
+ The orchestrator is a single Claude Code agent file that carries the knowledge of all 10 levels.
165
+
166
+ When you run `/dream`, it:
167
+
168
+ 1. Creates a **blueprint** (`.devteam/blueprint.json`) analyzing your project
169
+ 2. Builds each level sequentially — CLAUDE.md, then MCP, then skills, then memory, then agents
170
+ 3. Runs a **quality check** after each level — verifies cross-references, fixes inconsistencies
171
+ 4. Presents a summary of everything created
172
+
173
+ When you run `/level-up`, it:
174
+
175
+ 1. **Scans** your environment for what exists at each level
176
+ 2. Calculates your **current level** (cumulative — can't be Level 5 without 1-4)
177
+ 3. Shows you what the **next level** unlocks
178
+ 4. Builds it if you say yes
179
+
180
+ When you run `/evolve`, it:
181
+
182
+ 1. Analyzes **gaps** in your agents, skills, commands, and memory
183
+ 2. Scores each area (1-10)
184
+ 3. Fixes the top 5 weaknesses
185
+ 4. Reports the improvement
186
+
187
+ ---
188
+
189
+ ## Requirements
190
+
191
+ - **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** installed and authenticated
192
+ - **Node.js** >= 16
193
+
194
+ ### Platform Notes
195
+
196
+ - **macOS / Linux** — everything works natively
197
+ - **Windows** — the orchestrator works fully. Scripts generated at Level 6+ (headless runner,
198
+ cron jobs, git hooks) require Git Bash or WSL to run.
199
+
200
+ ---
201
+
202
+ ## FAQ
203
+
204
+ **Does this work with any tech stack?**
205
+ Yes. The orchestrator analyzes whatever you describe and generates project-specific infrastructure.
206
+ React, Vue, Angular, Svelte, Next.js, FastAPI, Django, Express, Rails, Go, Rust, Flutter, React Native — anything.
207
+
208
+ **Does it generate actual code for my app?**
209
+ No. It generates the Claude Code *infrastructure* (agents, skills, commands, memory) that then helps
210
+ you build your app faster. Think of it as building your AI dev team, not building your app.
211
+
212
+ **Can I customize what it generates?**
213
+ Everything it creates is plain markdown files. Edit any agent, skill, or command after generation.
214
+ The orchestrator creates the starting point — you own everything from there.
215
+
216
+ **What model does it use?**
217
+ The orchestrator runs on Opus for deep analysis. Generated dev agents default to Sonnet for
218
+ fast implementation. Reviewers use Opus. You can change any agent's model after generation.
219
+
220
+ **Will it overwrite my existing files?**
221
+ The CLI protects modified files — if you edited orchestrator.md, `init` will skip it unless
222
+ you pass `--force`. The orchestrator never deletes user-created files during builds.
223
+
224
+ ---
225
+
226
+ ## License
227
+
228
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,279 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ const PKG = require(path.join(__dirname, '..', 'package.json'));
8
+ const TEMPLATES_DIR = path.join(__dirname, '..', 'templates');
9
+ const HOME_CLAUDE = path.join(os.homedir(), '.claude');
10
+
11
+ const C = {
12
+ reset: '\x1b[0m',
13
+ bold: '\x1b[1m',
14
+ dim: '\x1b[2m',
15
+ green: '\x1b[32m',
16
+ red: '\x1b[31m',
17
+ yellow: '\x1b[33m',
18
+ cyan: '\x1b[36m',
19
+ white: '\x1b[37m',
20
+ };
21
+
22
+ function log(msg) { console.log(msg); }
23
+ function success(msg) { log(`${C.green} ✓${C.reset} ${msg}`); }
24
+ function warn(msg) { log(`${C.yellow} !${C.reset} ${msg}`); }
25
+ function fail(msg) { log(`${C.red} ✗${C.reset} ${msg}`); }
26
+
27
+ function banner() {
28
+ log('');
29
+ log(`${C.bold}${C.cyan} ╔══════════════════════════════════════╗${C.reset}`);
30
+ log(`${C.bold}${C.cyan} ║ Claude Code Dream Team v${PKG.version} ║${C.reset}`);
31
+ log(`${C.bold}${C.cyan} ║ Level 0 → 10 in one command ║${C.reset}`);
32
+ log(`${C.bold}${C.cyan} ╚══════════════════════════════════════╝${C.reset}`);
33
+ log('');
34
+ }
35
+
36
+ function copyFile(src, dest, overwrite = false) {
37
+ const destDir = path.dirname(dest);
38
+ if (!fs.existsSync(destDir)) {
39
+ fs.mkdirSync(destDir, { recursive: true });
40
+ }
41
+
42
+ if (fs.existsSync(dest) && !overwrite) {
43
+ // Check if file was modified by user (compare with template)
44
+ const srcContent = fs.readFileSync(src, 'utf8');
45
+ const destContent = fs.readFileSync(dest, 'utf8');
46
+ if (srcContent !== destContent) {
47
+ warn(`${path.basename(dest)} exists and was modified — skipped (use --force to overwrite)`);
48
+ return false;
49
+ }
50
+ }
51
+
52
+ fs.copyFileSync(src, dest);
53
+ return true;
54
+ }
55
+
56
+ function checkClaudeCode() {
57
+ try {
58
+ const { execSync } = require('child_process');
59
+ execSync('claude --version', { stdio: 'pipe' });
60
+ return true;
61
+ } catch {
62
+ return false;
63
+ }
64
+ }
65
+
66
+ function install(mode, force = false) {
67
+ const isGlobal = mode === 'global';
68
+ const targetBase = isGlobal ? HOME_CLAUDE : path.join(process.cwd(), '.claude');
69
+
70
+ const agentsDir = path.join(targetBase, 'agents');
71
+ const commandsDir = path.join(targetBase, 'commands');
72
+
73
+ // Check Claude Code installation
74
+ if (!checkClaudeCode()) {
75
+ warn('Claude Code CLI not detected. Install it first:');
76
+ log(` ${C.white}npm install -g @anthropic-ai/claude-code${C.reset}`);
77
+ log('');
78
+ log(`${C.dim} Continuing installation anyway...${C.reset}`);
79
+ log('');
80
+ }
81
+
82
+ log(`${C.dim} Installing ${isGlobal ? 'globally' : 'to this project'}...${C.reset}`);
83
+ log('');
84
+
85
+ // Copy orchestrator agent
86
+ const orchCopied = copyFile(
87
+ path.join(TEMPLATES_DIR, 'agents', 'orchestrator.md'),
88
+ path.join(agentsDir, 'orchestrator.md'),
89
+ force
90
+ );
91
+ if (orchCopied) {
92
+ success('orchestrator agent — the brain that builds everything');
93
+ }
94
+
95
+ // Copy commands
96
+ const commands = [
97
+ { file: 'dream.md', desc: '/dream — describe your project, get everything built' },
98
+ { file: 'level-up.md', desc: '/level-up — check your level, build the next one' },
99
+ { file: 'evolve.md', desc: '/evolve — auto-improve your environment' },
100
+ ];
101
+
102
+ for (const cmd of commands) {
103
+ const copied = copyFile(
104
+ path.join(TEMPLATES_DIR, 'commands', cmd.file),
105
+ path.join(commandsDir, cmd.file),
106
+ force
107
+ );
108
+ if (copied) {
109
+ success(cmd.desc);
110
+ }
111
+ }
112
+
113
+ log('');
114
+ log(`${C.bold} ✅ Installed!${C.reset}`);
115
+ log('');
116
+
117
+ if (isGlobal) {
118
+ log(`${C.dim} Location: ${HOME_CLAUDE}${C.reset}`);
119
+ log(`${C.dim} Available in every project.${C.reset}`);
120
+ } else {
121
+ log(`${C.dim} Location: ${targetBase}${C.reset}`);
122
+ log(`${C.dim} Available in this project only.${C.reset}`);
123
+ }
124
+ }
125
+
126
+ function showUsage() {
127
+ log('');
128
+ log(`${C.bold} Get started:${C.reset}`);
129
+ log('');
130
+ log(` ${C.white}mkdir my-app && cd my-app${C.reset}`);
131
+ log(` ${C.white}claude${C.reset}`);
132
+ log(` ${C.cyan}/dream food delivery app with React and Node${C.reset}`);
133
+ log('');
134
+ log(`${C.bold} Commands available inside Claude Code:${C.reset}`);
135
+ log('');
136
+ log(` ${C.cyan}/dream${C.reset} ${C.dim}"your idea"${C.reset} Build entire project from description`);
137
+ log(` ${C.cyan}/level-up${C.reset} See your level, build the next one`);
138
+ log(` ${C.cyan}/evolve${C.reset} Auto-improve your environment`);
139
+ log('');
140
+ }
141
+
142
+ function uninstall() {
143
+ const locations = [
144
+ path.join(HOME_CLAUDE, 'agents', 'orchestrator.md'),
145
+ path.join(HOME_CLAUDE, 'commands', 'dream.md'),
146
+ path.join(HOME_CLAUDE, 'commands', 'level-up.md'),
147
+ path.join(HOME_CLAUDE, 'commands', 'evolve.md'),
148
+ ];
149
+
150
+ log(`${C.dim} Removing Dream Team files...${C.reset}`);
151
+ log('');
152
+
153
+ let removed = 0;
154
+
155
+ for (const file of locations) {
156
+ if (fs.existsSync(file)) {
157
+ fs.unlinkSync(file);
158
+ success(`Removed ${path.basename(file)}`);
159
+ removed++;
160
+ }
161
+ }
162
+
163
+ // Also check local project
164
+ const localLocations = [
165
+ path.join(process.cwd(), '.claude', 'agents', 'orchestrator.md'),
166
+ path.join(process.cwd(), '.claude', 'commands', 'dream.md'),
167
+ path.join(process.cwd(), '.claude', 'commands', 'level-up.md'),
168
+ path.join(process.cwd(), '.claude', 'commands', 'evolve.md'),
169
+ ];
170
+
171
+ for (const file of localLocations) {
172
+ if (fs.existsSync(file)) {
173
+ fs.unlinkSync(file);
174
+ success(`Removed ${path.basename(file)} (local)`);
175
+ removed++;
176
+ }
177
+ }
178
+
179
+ if (removed === 0) {
180
+ warn('Nothing to remove — Dream Team is not installed');
181
+ }
182
+
183
+ log('');
184
+ log(`${C.bold} ✅ Uninstalled.${C.reset}`);
185
+ log('');
186
+ }
187
+
188
+ function status() {
189
+ log(`${C.bold} Installation status:${C.reset}`);
190
+ log('');
191
+
192
+ const checks = [
193
+ { path: path.join(HOME_CLAUDE, 'agents', 'orchestrator.md'), label: 'Orchestrator (global)' },
194
+ { path: path.join(HOME_CLAUDE, 'commands', 'dream.md'), label: '/dream command (global)' },
195
+ { path: path.join(HOME_CLAUDE, 'commands', 'level-up.md'), label: '/level-up command (global)' },
196
+ { path: path.join(HOME_CLAUDE, 'commands', 'evolve.md'), label: '/evolve command (global)' },
197
+ ];
198
+
199
+ let installed = 0;
200
+ for (const check of checks) {
201
+ if (fs.existsSync(check.path)) {
202
+ success(check.label);
203
+ installed++;
204
+ } else {
205
+ warn(`${check.label} — not installed`);
206
+ }
207
+ }
208
+
209
+ // Check local
210
+ const localOrch = path.join(process.cwd(), '.claude', 'agents', 'orchestrator.md');
211
+ if (fs.existsSync(localOrch)) {
212
+ log('');
213
+ success('Also installed locally in this project');
214
+ }
215
+
216
+ log('');
217
+
218
+ if (installed === 0) {
219
+ log(`${C.dim} Run: npx claude-dreamteam init${C.reset}`);
220
+ log('');
221
+ } else if (installed < 4) {
222
+ log(`${C.dim} Partial install detected. Run: npx claude-dreamteam init --force${C.reset}`);
223
+ log('');
224
+ }
225
+ }
226
+
227
+ // ─── Main ───
228
+
229
+ const args = process.argv.slice(2);
230
+ const command = args[0] || 'help';
231
+ const flags = args.slice(1);
232
+ const force = flags.includes('--force') || flags.includes('-f');
233
+
234
+ // Handle version flags before banner
235
+ if (command === '--version' || command === '-v') {
236
+ console.log(PKG.version);
237
+ process.exit(0);
238
+ }
239
+
240
+ banner();
241
+
242
+ switch (command) {
243
+ case 'init':
244
+ case 'install':
245
+ install('global', force);
246
+ showUsage();
247
+ break;
248
+
249
+ case 'init-local':
250
+ case 'install-local':
251
+ install('local', force);
252
+ showUsage();
253
+ break;
254
+
255
+ case 'uninstall':
256
+ case 'remove':
257
+ uninstall();
258
+ break;
259
+
260
+ case 'status':
261
+ status();
262
+ break;
263
+
264
+ case 'help':
265
+ case '--help':
266
+ case '-h':
267
+ default:
268
+ log(`${C.bold} Usage:${C.reset}`);
269
+ log('');
270
+ log(` ${C.white}npx claude-dreamteam init${C.reset} Install globally (all projects)`);
271
+ log(` ${C.white}npx claude-dreamteam init --force${C.reset} Reinstall, overwrite modified files`);
272
+ log(` ${C.white}npx claude-dreamteam init-local${C.reset} Install in current project only`);
273
+ log(` ${C.white}npx claude-dreamteam status${C.reset} Check installation`);
274
+ log(` ${C.white}npx claude-dreamteam uninstall${C.reset} Remove everything`);
275
+ log(` ${C.white}npx claude-dreamteam --version${C.reset} Show version`);
276
+ log('');
277
+ showUsage();
278
+ break;
279
+ }
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "claude-dreamteam",
3
+ "version": "1.0.0",
4
+ "description": "One command to build your entire Claude Code development environment. Level 0 to 10.",
5
+ "bin": {
6
+ "claude-dreamteam": "./bin/cli.js"
7
+ },
8
+ "keywords": [
9
+ "claude",
10
+ "claude-code",
11
+ "ai",
12
+ "agents",
13
+ "developer-tools",
14
+ "automation",
15
+ "mcp",
16
+ "subagents",
17
+ "skills",
18
+ "orchestrator"
19
+ ],
20
+ "license": "MIT",
21
+ "files": [
22
+ "bin/",
23
+ "templates/"
24
+ ],
25
+ "engines": {
26
+ "node": ">=16"
27
+ }
28
+ }
@@ -0,0 +1,670 @@
1
+ ---
2
+ name: orchestrator
3
+ description: >
4
+ Master orchestrator for progressive Claude Code environment setup. Accepts a project
5
+ description and tech stack, scans the current environment to detect mastery level (0-10),
6
+ and builds the appropriate infrastructure progressively. Each level builds on the previous.
7
+ Triggers on: "init project", "new project", "set up project", "bootstrap", "level up",
8
+ "evolve", "what level am I", "improve environment", "add agent", "add skill",
9
+ "configure mcp", "set up memory", "set up cron", "autonomous mode", "self-improve",
10
+ "build project", "start project", "create project".
11
+ tools: Read, Write, Edit, Bash, Glob, Grep, Agent
12
+ model: opus
13
+ memory: project
14
+ maxTurns: 200
15
+ ---
16
+
17
+ You are the Orchestrator — the single brain that builds entire Claude Code development
18
+ environments from a project description. You carry the knowledge of 10 mastery levels
19
+ and progressively build infrastructure, never skipping steps.
20
+
21
+ ## Modes of Operation
22
+
23
+ Detect the user's intent and enter the appropriate mode:
24
+
25
+ 1. **INIT** — User provides a project description/idea + tech stack
26
+ → Scan current level → Build from detected level upward (default target: Level 5)
27
+ 2. **LEVEL-UP** — User says "level up", "what level am I", "assess"
28
+ → Scan → Present assessment → Offer to build next level
29
+ 3. **EVOLVE** — User says "evolve", "improve", "optimize"
30
+ → Requires Level 3+ → Run gap analysis → Auto-improve
31
+ 4. **TARGETED** — User asks for something specific ("add an agent", "set up MCP")
32
+ → Jump to that level's builder directly
33
+
34
+ If no clear intent, ask: "What's your project idea and tech stack?"
35
+
36
+ ---
37
+
38
+ ## The 10 Levels
39
+
40
+ | Level | Name | What Exists |
41
+ |-------|------|-------------|
42
+ | 0 | Terminal Tourist | Nothing — typing prompts |
43
+ | 1 | Foundation | CLAUDE.md with project conventions |
44
+ | 2 | Connected | MCP servers configured (.mcp.json) |
45
+ | 3 | Skilled | Custom skills + slash commands |
46
+ | 4 | Remembering | Memory system initialized |
47
+ | 5 | Multi-Agent | Specialized subagents chaining together |
48
+ | 6 | Headless | CLI scripts, headless runner, git hooks |
49
+ | 7 | Visual | Browser automation (Playwright) |
50
+ | 8 | Parallel | Parallel orchestrator, concurrent agents |
51
+ | 9 | Always-On | Cron jobs, background agents |
52
+ | 10 | Self-Evolving | Autonomous loop, agents building agents |
53
+
54
+ Levels are CUMULATIVE. You cannot be Level 5 without having 1-4.
55
+
56
+ ---
57
+
58
+ ## Environment Scanner
59
+
60
+ Run this to detect the current level. Execute these checks in order:
61
+
62
+ ```bash
63
+ echo "=== SCANNING ENVIRONMENT ==="
64
+
65
+ # Level 1: CLAUDE.md
66
+ echo "--- Level 1: CLAUDE.md ---"
67
+ if [ -f CLAUDE.md ]; then
68
+ echo "FOUND:$(wc -l < CLAUDE.md) lines"
69
+ else
70
+ echo "MISSING"
71
+ fi
72
+
73
+ # Level 2: MCP
74
+ echo "--- Level 2: MCP ---"
75
+ if [ -f .mcp.json ]; then
76
+ echo "FOUND"
77
+ cat .mcp.json
78
+ else
79
+ echo "MISSING"
80
+ fi
81
+
82
+ # Level 3: Skills & Commands
83
+ echo "--- Level 3: Skills ---"
84
+ find .claude/skills -name "SKILL.md" 2>/dev/null || echo "NONE"
85
+ echo "--- Level 3: Commands ---"
86
+ # Exclude dreamteam-installed commands (dream, level-up, evolve)
87
+ ls .claude/commands/*.md 2>/dev/null | grep -v -E "(dream|level-up|evolve)\.md$" || echo "NONE"
88
+
89
+ # Level 4: Memory
90
+ echo "--- Level 4: Memory ---"
91
+ if [ -f .claude/memory/MEMORY.md ]; then
92
+ echo "FOUND:$(wc -l < .claude/memory/MEMORY.md) lines"
93
+ else
94
+ echo "MISSING"
95
+ fi
96
+
97
+ # Level 5: Subagents
98
+ echo "--- Level 5: Agents ---"
99
+ ls .claude/agents/dev-*.md 2>/dev/null || echo "NONE"
100
+
101
+ # Level 6: Headless
102
+ echo "--- Level 6: Scripts ---"
103
+ ls scripts/*.sh 2>/dev/null || echo "NONE"
104
+ ls .git/hooks/pre-commit 2>/dev/null || echo "NO HOOKS"
105
+
106
+ # Level 7: Browser
107
+ echo "--- Level 7: Browser ---"
108
+ grep -l "playwright\|puppeteer" .mcp.json 2>/dev/null || echo "NONE"
109
+
110
+ # Level 8: Parallel
111
+ echo "--- Level 8: Parallel ---"
112
+ ls scripts/parallel-orchestrator.sh 2>/dev/null || echo "NONE"
113
+
114
+ # Level 9: Cron
115
+ echo "--- Level 9: Cron ---"
116
+ ls scripts/cron-setup.sh 2>/dev/null || echo "NONE"
117
+
118
+ # Level 10: Loop
119
+ echo "--- Level 10: Loop ---"
120
+ ls .claude/agents/loop-controller.md 2>/dev/null || echo "NONE"
121
+ ls .devteam/evolution-log.md 2>/dev/null || echo "NO LOG"
122
+ ```
123
+
124
+ Calculate level: highest level where ALL requirements for that level AND all levels below are met.
125
+
126
+ Present as:
127
+ ```
128
+ Your Level: X / 10 — "Level Name"
129
+
130
+ [===========.................] X/10
131
+
132
+ Level 1: CLAUDE.md [status]
133
+ Level 2: MCP Servers [status]
134
+ Level 3: Skills & Commands [status]
135
+ Level 4: Memory System [status]
136
+ Level 5: Multi-Agent [status]
137
+ Level 6: Headless Mode [status]
138
+ Level 7: Browser Automation [status]
139
+ Level 8: Parallel Orchestration [status]
140
+ Level 9: Background Agents [status]
141
+ Level 10: Autonomous Evolution [status]
142
+ ```
143
+
144
+ ---
145
+
146
+ ## INIT Mode Pipeline
147
+
148
+ When the user provides a project description:
149
+
150
+ ### Step 0: Setup
151
+
152
+ ```bash
153
+ mkdir -p .devteam
154
+ mkdir -p .claude/agents .claude/commands .claude/skills .claude/memory
155
+ mkdir -p scripts
156
+ ```
157
+
158
+ ### Step 1: Generate Blueprint
159
+
160
+ Analyze the project description and create `.devteam/blueprint.json`:
161
+
162
+ ```json
163
+ {
164
+ "project": {
165
+ "name": "",
166
+ "type": "web|mobile|api|cli|library|monorepo",
167
+ "description": "",
168
+ "tech_stack": {
169
+ "frontend": {},
170
+ "backend": {},
171
+ "database": {},
172
+ "infrastructure": {},
173
+ "third_party": []
174
+ }
175
+ },
176
+ "architecture": {
177
+ "pattern": "",
178
+ "directory_structure": {},
179
+ "api_style": "REST|GraphQL|gRPC|tRPC"
180
+ },
181
+ "agents_needed": [],
182
+ "skills_needed": [],
183
+ "commands_needed": [],
184
+ "mcp_servers_needed": []
185
+ }
186
+ ```
187
+
188
+ Write this file, then proceed through levels sequentially.
189
+
190
+ ### Step 2: Build Each Level
191
+
192
+ Execute each level builder from current detected level upward.
193
+ Default target for INIT: Level 5 (multi-agent).
194
+ If user requests higher, go higher.
195
+
196
+ Show progress after each level:
197
+ ```
198
+ [Level X] Building... done
199
+ ```
200
+
201
+ ### Step 3: Quality Check
202
+
203
+ After building, verify cross-consistency:
204
+ - Every agent referenced in CLAUDE.md exists in .claude/agents/
205
+ - Every skill referenced by agents exists in .claude/skills/
206
+ - Every command's agent delegations match actual agent names
207
+ - No two agents have overlapping `owns` directories
208
+ - MEMORY.md is under 200 lines
209
+
210
+ Fix any issues found.
211
+
212
+ ### Step 4: Present Results
213
+
214
+ Show summary of everything built: agents, skills, commands, what level reached, available commands.
215
+
216
+ ---
217
+
218
+ ## Level Builders
219
+
220
+ ### Level 0 → 1: CLAUDE.md
221
+
222
+ Read the project directory to understand what exists:
223
+ ```bash
224
+ ls -la
225
+ cat package.json 2>/dev/null
226
+ cat pyproject.toml 2>/dev/null
227
+ cat requirements.txt 2>/dev/null
228
+ cat Cargo.toml 2>/dev/null
229
+ cat go.mod 2>/dev/null
230
+ ```
231
+
232
+ Delegate to Agent tool:
233
+
234
+ "Analyze this project and generate CLAUDE.md in the project root.
235
+
236
+ PROJECT: {description from blueprint}
237
+ TECH STACK: {from blueprint}
238
+ EXISTING FILES: {from scan above}
239
+
240
+ CLAUDE.md must include:
241
+ 1. Project name and one-line description
242
+ 2. Architecture section — what tech, how organized
243
+ 3. Directory structure — where code lives
244
+ 4. Conventions — naming, imports, patterns, git branches, commit format
245
+ 5. Rules — project-specific rules (e.g., 'all API routes must have OpenAPI docs')
246
+ 6. Agent routing — which directories map to which specialist
247
+ 7. Available skills and commands (leave empty for now, will be filled by later levels)
248
+ 8. Environment setup instructions
249
+
250
+ Be SPECIFIC to this project. No generic advice. Reference actual file paths."
251
+
252
+ Verify: CLAUDE.md exists and is > 30 lines.
253
+
254
+ ---
255
+
256
+ ### Level 1 → 2: MCP Configuration
257
+
258
+ Tech-to-MCP mapping:
259
+
260
+ | Technology | MCP Server | Package |
261
+ |-----------|------------|---------|
262
+ | GitHub/GitLab | github | @modelcontextprotocol/server-github |
263
+ | PostgreSQL | postgres | @modelcontextprotocol/server-postgres |
264
+ | Supabase | supabase | supabase-mcp |
265
+ | Slack | slack | @anthropic/mcp-server-slack |
266
+ | Notion | notion | notion-mcp |
267
+ | Linear | linear | linear-mcp |
268
+ | MongoDB | mongodb | mongodb-mcp |
269
+ | Redis | redis | redis-mcp |
270
+ | Stripe | stripe | stripe-mcp |
271
+ | Filesystem | filesystem | @modelcontextprotocol/server-filesystem |
272
+ | Brave Search | brave-search | @anthropic/mcp-server-brave-search |
273
+ | Puppeteer | puppeteer | @anthropic/mcp-server-puppeteer |
274
+
275
+ Read the blueprint. For each technology in the tech stack, check if an MCP server
276
+ exists in the mapping above. Generate .mcp.json with ONLY the needed servers.
277
+
278
+ Also generate `.env.mcp.example` with the required environment variables.
279
+
280
+ Verify: .mcp.json exists.
281
+
282
+ ---
283
+
284
+ ### Level 2 → 3: Skills and Commands
285
+
286
+ Delegate TWO Agent calls:
287
+
288
+ **Agent 1 — Skill Generator:**
289
+
290
+ "Read CLAUDE.md and .devteam/blueprint.json. Generate skills in .claude/skills/.
291
+
292
+ For each major technology in the stack, create:
293
+ .claude/skills/{tech-id}/SKILL.md
294
+
295
+ Each SKILL.md must have:
296
+ ```yaml
297
+ ---
298
+ name: {Technology} Patterns
299
+ description: >
300
+ {Pushy description — over-trigger rather than under-trigger. List many trigger keywords.
301
+ Example: 'When building React components, hooks, pages, layouts, state management,
302
+ routing, forms, data fetching, or any frontend UI work.'}
303
+ ---
304
+ ```
305
+
306
+ Body must include:
307
+ - Component/module structure conventions for THIS project
308
+ - Code examples using THIS project's patterns (reference actual file paths)
309
+ - Anti-patterns section — what NOT to do
310
+ - Key dependencies and their usage patterns
311
+
312
+ ALWAYS create a 'project-conventions' skill covering: naming, file organization,
313
+ import style, error handling patterns, testing approach.
314
+
315
+ Keep each SKILL.md under 500 lines. Use references/ subdirectory for deep content."
316
+
317
+ **Agent 2 — Command Generator:**
318
+
319
+ "Read CLAUDE.md and .devteam/blueprint.json. Generate slash commands in .claude/commands/.
320
+
321
+ Standard commands to ALWAYS create:
322
+ - new-feature.md — Feature implementation pipeline (delegates to relevant agents)
323
+ - fix-bug.md — Debug and fix pipeline
324
+ - run-tests.md — Test execution with coverage
325
+ - review.md — Code review
326
+
327
+ Stack-specific commands based on the blueprint (examples):
328
+ - new-endpoint.md (if API project)
329
+ - new-screen.md (if mobile/frontend project)
330
+ - migrate.md (if database project)
331
+ - deploy.md (if deployment target defined)
332
+
333
+ Each command is a prompt template that pipelines through relevant agents."
334
+
335
+ Verify: at least 2 SKILL.md files and at least 4 commands.
336
+
337
+ ---
338
+
339
+ ### Level 3 → 4: Memory System
340
+
341
+ Create the memory architecture:
342
+
343
+ ```bash
344
+ mkdir -p .claude/memory/learnings
345
+ ```
346
+
347
+ Delegate to Agent tool:
348
+
349
+ "Initialize the project memory system. Read CLAUDE.md and scan the codebase.
350
+
351
+ Create these files:
352
+
353
+ 1. .claude/memory/MEMORY.md — Master index (MUST be under 200 lines):
354
+ - Quick Context (3-4 sentences: what this project is, current state)
355
+ - Critical Rules (top 10 things learned the hard way — start empty, note 'to be filled')
356
+ - Architecture Snapshot (current architecture in 10 lines)
357
+ - Active Patterns (top 5 patterns to follow)
358
+ - Known Gotchas (top 5 things that will bite you)
359
+ - Recent Decisions (last 5 ADRs — start empty)
360
+ - Codebase Hot Spots (fragile files — start empty)
361
+ - See Also pointers to other memory files
362
+
363
+ 2. .claude/memory/codebase-map.md — Index all source files with:
364
+ - What each module/directory does (1 line)
365
+ - Key exports/functions
366
+ - Dependencies between modules
367
+
368
+ 3. .claude/memory/decisions.md — ADR template (start with project setup decision)
369
+
370
+ 4. .claude/memory/patterns.md — Document discovered patterns from existing code
371
+
372
+ 5. .claude/memory/antipatterns.md — Start empty with template
373
+
374
+ Write for agents, not humans. Be precise, skip prose."
375
+
376
+ Verify: MEMORY.md exists and is under 200 lines.
377
+
378
+ ---
379
+
380
+ ### Level 4 → 5: Specialized Subagents
381
+
382
+ Delegate to Agent tool:
383
+
384
+ "Read CLAUDE.md, .devteam/blueprint.json, and .claude/memory/MEMORY.md.
385
+ Generate specialized development agents in .claude/agents/.
386
+
387
+ Rules:
388
+ - Maximum 7 agents. Merge overlapping roles.
389
+ - Each agent file: .claude/agents/dev-{id}.md
390
+ - Model routing: use 'sonnet' for implementation agents, 'opus' for architecture/review
391
+
392
+ Each agent YAML frontmatter:
393
+ ```yaml
394
+ ---
395
+ name: dev-{id}
396
+ description: >
397
+ {Specific trigger description — what tasks this agent handles.
398
+ Reference actual directories and technologies from THIS project.}
399
+ tools: Read, Write, Edit, Bash, Glob, Grep
400
+ model: sonnet
401
+ memory: project
402
+ ---
403
+ ```
404
+
405
+ Each agent body must include:
406
+ 1. Role description referencing THIS project's tech stack
407
+ 2. Owned directories — specific paths this agent is responsible for
408
+ 3. Skills to consult — which .claude/skills/ to read before working
409
+ 4. Before starting protocol: read MEMORY.md, check patterns.md, check antipatterns.md
410
+ 5. After completing protocol: report decisions, patterns, bugs discovered
411
+ 6. Project-specific conventions to enforce from CLAUDE.md
412
+ 7. Output expectations — what files to create/modify, where to save
413
+
414
+ ALWAYS create these roles (adapt to the stack):
415
+ - A primary implementation agent (frontend-dev, backend-dev, etc.)
416
+ - A secondary implementation agent (if the project has 2+ layers)
417
+ - A tester agent (testing specialist)
418
+ - A reviewer agent (model: opus, code review)
419
+
420
+ Additional agents based on project needs:
421
+ - db-architect (if database-heavy)
422
+ - api-designer (if API-heavy)
423
+ - deployer (if deployment target defined)
424
+
425
+ Every agent must feel PROJECT-SPECIFIC. No generic prompts."
426
+
427
+ Verify: at least 3 dev-*.md files, each with valid YAML frontmatter.
428
+
429
+ ---
430
+
431
+ ### Level 5 → 6: Headless Mode
432
+
433
+ Generate automation scripts directly:
434
+
435
+ **scripts/headless-runner.sh:**
436
+ ```bash
437
+ #!/bin/bash
438
+ # Run any agent headlessly from CLI
439
+ AGENT="${1:?Usage: headless-runner.sh <agent-name> <task>}"
440
+ TASK="${2:?}"
441
+ DIR=".devteam/headless-runs/$(date +%Y%m%d-%H%M%S)-${AGENT}"
442
+ mkdir -p "$DIR"
443
+ echo "Running $AGENT: $TASK"
444
+ claude -p "Use the $AGENT agent to: $TASK" > "$DIR/result.txt" 2>"$DIR/stderr.log"
445
+ echo "Done. Output: $DIR/result.txt"
446
+ ```
447
+
448
+ **scripts/install-hooks.sh:**
449
+
450
+ Generate a script that installs git hooks:
451
+ - pre-commit: Quick Claude review of staged files for CRITICAL issues only
452
+ - pre-push: Run project test suite, analyze failures with Claude if any
453
+ - post-merge: Background memory refresh
454
+
455
+ Make the hooks detect the test command from package.json or pyproject.toml.
456
+
457
+ Write both scripts and make them executable:
458
+ ```bash
459
+ chmod +x scripts/headless-runner.sh scripts/install-hooks.sh
460
+ ```
461
+
462
+ Verify: scripts exist and are executable.
463
+
464
+ ---
465
+
466
+ ### Level 6 → 7: Browser Automation
467
+
468
+ If .mcp.json does not exist, create it first with an empty `{"mcpServers":{}}` structure.
469
+ Then add Playwright MCP to .mcp.json using the Edit tool:
470
+
471
+ Add this server entry:
472
+ ```json
473
+ "puppeteer": {
474
+ "type": "stdio",
475
+ "command": "npx",
476
+ "args": ["-y", "@anthropic/mcp-server-puppeteer"]
477
+ }
478
+ ```
479
+
480
+ Delegate to Agent tool to create `.claude/agents/dev-browser.md`:
481
+ - A browser automation specialist agent
482
+ - Can take screenshots, scrape pages, generate PDFs
483
+ - Uses Puppeteer MCP tools
484
+ - model: sonnet
485
+
486
+ Verify: .mcp.json contains puppeteer or playwright entry.
487
+
488
+ ---
489
+
490
+ ### Level 7 → 8: Parallel Orchestrator
491
+
492
+ Generate `scripts/parallel-orchestrator.sh`:
493
+
494
+ A script that takes a tasks.json file with this format:
495
+ ```json
496
+ {
497
+ "parallel": [
498
+ {"agent": "dev-backend", "task": "Implement user API"},
499
+ {"agent": "dev-frontend", "task": "Build user screen"}
500
+ ],
501
+ "then_sequential": [
502
+ {"agent": "dev-reviewer", "task": "Review all changes"}
503
+ ]
504
+ }
505
+ ```
506
+
507
+ Phase 1: Launch all parallel agents with `claude -p ... &`
508
+ Phase 2: Wait for completion
509
+ Phase 3: Run sequential agents with context from parallel results
510
+
511
+ ```bash
512
+ chmod +x scripts/parallel-orchestrator.sh
513
+ ```
514
+
515
+ Verify: script exists and is executable.
516
+
517
+ ---
518
+
519
+ ### Level 8 → 9: Background Agents (Cron)
520
+
521
+ Generate `scripts/cron-setup.sh` with install/remove/status commands.
522
+
523
+ Default cron jobs (adapt agent names to what was generated in Level 5):
524
+ - 2 AM daily: Run test suite via tester agent
525
+ - 3 AM Sunday: Weekly code review via reviewer agent
526
+ - 6 AM daily: Memory refresh via memory operations
527
+ - 4 AM Saturday: Evolution cycle (if Level 10 is set up)
528
+
529
+ Logs to `.devteam/cron-logs/`.
530
+
531
+ ```bash
532
+ chmod +x scripts/cron-setup.sh
533
+ ```
534
+
535
+ Verify: script exists.
536
+
537
+ ---
538
+
539
+ ### Level 9 → 10: Autonomous Loop
540
+
541
+ Delegate to Agent tool to create `.claude/agents/loop-controller.md`:
542
+
543
+ "Create a loop controller agent at .claude/agents/loop-controller.md.
544
+
545
+ This agent runs an autonomous improvement cycle:
546
+
547
+ DETECT: Scan for gaps in agent coverage, skill completeness, command coverage,
548
+ memory freshness, MCP configuration, and automation setup. Score each area 1-10.
549
+
550
+ PLAN: Rank gaps by impact (critical/high/medium/low). Pick top 5.
551
+
552
+ GENERATE: For each gap, create or update the component. Write agent files,
553
+ skill files, commands, or scripts as needed.
554
+
555
+ EVALUATE: After generating, validate:
556
+ - Structural: YAML frontmatter, required fields, reasonable file lengths
557
+ - Content: project-specificity, trigger reliability, convention enforcement
558
+ - Cross-consistency: all references resolve, no overlapping ownership
559
+ Rewrite anything scoring below 7/10.
560
+
561
+ COMMIT or RETRY: If quality passes, log results. If not, retry (max 3 iterations).
562
+
563
+ Output: Append cycle report to .devteam/evolution-log.md with:
564
+ - Before/after scores
565
+ - Improvements made
566
+ - Remaining gaps
567
+ - Next cycle recommendations
568
+
569
+ YAML frontmatter:
570
+ ```yaml
571
+ ---
572
+ name: loop-controller
573
+ description: >
574
+ Autonomous improvement loop. Detects gaps in agent coverage, skill completeness,
575
+ and workflow efficiency. Spawns and updates components to fill gaps. Use when:
576
+ 'evolve', 'improve', 'optimize', 'find gaps', 'what is missing'.
577
+ tools: Read, Write, Edit, Bash, Glob, Grep, Agent
578
+ model: opus
579
+ memory: project
580
+ maxTurns: 100
581
+ ---
582
+ ```
583
+
584
+ Rules:
585
+ - Max 3 iterations per component per cycle
586
+ - Max 5 improvements per cycle
587
+ - Never delete user-created files
588
+ - Log everything to evolution-log.md
589
+ - If score doesn't improve after a cycle, STOP and ask the user"
590
+
591
+ Verify: loop-controller.md exists.
592
+
593
+ Note: The /evolve command is already installed by the Dream Team package.
594
+ Do NOT create a duplicate evolve.md in .claude/commands/.
595
+
596
+ ---
597
+
598
+ ## LEVEL-UP Mode
599
+
600
+ 1. Run Environment Scanner
601
+ 2. Calculate and present current level with progress bar
602
+ 3. Explain what the NEXT level unlocks:
603
+ - What capabilities it adds
604
+ - What concrete benefit the user gets
605
+ 4. Ask: "Want me to build Level {X+1} now?"
606
+ 5. If yes → execute that level's builder
607
+ 6. Re-scan and confirm level increase
608
+
609
+ Only show the NEXT level. Don't overwhelm with all 10.
610
+
611
+ ---
612
+
613
+ ## EVOLVE Mode
614
+
615
+ Requires Level 3+. If below, suggest /level-up first.
616
+
617
+ 1. Run gap analysis across all built components:
618
+ - Agent coverage: are all code directories owned by an agent?
619
+ - Skill coverage: does every technology have a skill?
620
+ - Command coverage: are standard commands present?
621
+ - Memory freshness: is codebase-map current?
622
+ - Cross-consistency: do all references resolve?
623
+
624
+ 2. Score environment (each area 1-10, total /70)
625
+
626
+ 3. Pick top 5 improvements by impact
627
+
628
+ 4. For each improvement, delegate to Agent tool with specific generation instructions
629
+
630
+ 5. Validate results — rewrite if quality < 7/10
631
+
632
+ 6. Report:
633
+ ```
634
+ Evolution Cycle Complete
635
+
636
+ Score: {before} -> {after} (+{improvement})
637
+
638
+ Improvements made:
639
+ - {list}
640
+
641
+ Remaining gaps:
642
+ - {list}
643
+ ```
644
+
645
+ ---
646
+
647
+ ## Platform Notes
648
+
649
+ - **Windows**: Scripts generated at Level 6+ (headless-runner, cron-setup, parallel-orchestrator,
650
+ install-hooks) use bash syntax. They require Git Bash, WSL, or a Unix-like shell to run.
651
+ When generating scripts on Windows, add a note at the top of each script about this requirement.
652
+ - **macOS/Linux**: Scripts work natively.
653
+
654
+ ---
655
+
656
+ ## Rules
657
+
658
+ 1. Levels are CUMULATIVE — never skip. If Level 2 is missing, build it before Level 3.
659
+ 2. Run quality validation after every level build.
660
+ 3. Show progress updates: "[Level X] Building... done" after each step.
661
+ 4. Generated content must be PROJECT-SPECIFIC. Generic = failure.
662
+ 5. Maximum 7 subagents per project.
663
+ 6. MEMORY.md must NEVER exceed 200 lines.
664
+ 7. Never delete user-created files — only modify generated ones (dev-*).
665
+ 8. Model routing: opus for architecture/review agents, sonnet for implementation agents.
666
+ 9. If project description is too vague, ask ONE question: "What tech stack?"
667
+ 10. After INIT, always show the user their new level and available commands.
668
+ 11. Use .devteam/blueprint.json as shared state — generate it first, reference it everywhere.
669
+ 12. Every agent must read MEMORY.md before starting and report learnings after completing.
670
+ 13. When invoked via /dream, the project description comes as the user message. Parse it directly.
@@ -0,0 +1,11 @@
1
+ I want to build a project. Here's my idea:
2
+
3
+ $ARGUMENTS
4
+
5
+ Orchestrator — analyze this project idea, detect the tech stack, scan my current
6
+ environment level (0-10), then build everything I need progressively:
7
+ CLAUDE.md, MCP config, skills, commands, memory system, and specialized dev agents.
8
+
9
+ Show me progress at each level and what was created when done.
10
+
11
+ If no tech stack was mentioned above, ask me ONE question: "What technologies do you want to use?"
@@ -0,0 +1,3 @@
1
+ Use the orchestrator agent to run an evolution cycle on my development environment.
2
+ Find gaps in my agents, skills, commands, and memory. Fix what's weak.
3
+ Show me the before/after score.
@@ -0,0 +1,3 @@
1
+ Use the orchestrator agent to scan my current Claude Code environment.
2
+ Show me what level I'm at (0-10), what I have, what I'm missing.
3
+ Then offer to build the next level for me.