-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup-test-project.sh
More file actions
executable file
·296 lines (260 loc) · 7.15 KB
/
setup-test-project.sh
File metadata and controls
executable file
·296 lines (260 loc) · 7.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
#!/bin/bash
# Setup script for Hello SplitMind test project
PROJECT_NAME="hello-splitmind"
PROJECT_PATH="/Users/jasonbrashear/code/$PROJECT_NAME"
echo "🚀 Setting up test project: $PROJECT_NAME"
echo "=" * 60
# Create project directory
echo "📁 Creating project directory..."
mkdir -p "$PROJECT_PATH"
cd "$PROJECT_PATH"
# Initialize git
echo "🔧 Initializing Git repository..."
git init
git checkout -b main
# Create initial README
echo "# Hello SplitMind Test Project" > README.md
echo "" >> README.md
echo "A simple test project for demonstrating SplitMind's agent coordination system." >> README.md
echo "" >> README.md
echo "## Purpose" >> README.md
echo "This project tests parallel AI agent execution with:" >> README.md
echo "- File conflict prevention" >> README.md
echo "- Dependency management" >> README.md
echo "- Automated merging" >> README.md
echo "- Task prioritization" >> README.md
# Create .gitignore
echo "📝 Creating .gitignore..."
cat > .gitignore << 'EOF'
# Dependencies
node_modules/
# IDE
.vscode/
.idea/
# OS
.DS_Store
# SplitMind
.splitmind/cache/
worktrees/
EOF
# Initial commit
git add README.md .gitignore
git commit -m "Initial commit"
# Create directories
echo "📁 Creating project structure..."
mkdir -p .splitmind
mkdir -p components
mkdir -p data
mkdir -p tests
# Create tasks.md
echo "📝 Creating tasks.md..."
cat > .splitmind/tasks.md << 'EOF'
# tasks.md
## Task: Base HTML
- status: unclaimed
- branch: base-html
- session: null
- description: Create basic HTML structure with doctype, head, and body
- priority: 10
- merge_order: 1
- exclusive_files: [index.html]
- shared_files: []
## Task: Base CSS
- status: unclaimed
- branch: base-css
- session: null
- description: Create basic CSS file with reset and root styles
- priority: 10
- merge_order: 2
- exclusive_files: [styles.css]
- shared_files: []
## Task: Header Component
- status: unclaimed
- branch: header-component
- session: null
- description: Add header section with navigation
- dependencies: [base-html]
- priority: 8
- merge_order: 5
- exclusive_files: [components/header.css]
- shared_files: [index.html]
- initialization_deps: [base-html]
## Task: Footer Component
- status: unclaimed
- branch: footer-component
- session: null
- description: Add footer section with copyright
- dependencies: [base-html]
- priority: 8
- merge_order: 6
- exclusive_files: [components/footer.css]
- shared_files: [index.html]
- initialization_deps: [base-html]
## Task: Theme Styles
- status: unclaimed
- branch: theme-styles
- session: null
- description: Add CSS variables for dark theme
- dependencies: [base-css]
- priority: 7
- merge_order: 7
- exclusive_files: [components/theme.css]
- shared_files: [styles.css]
- initialization_deps: [base-css]
## Task: JavaScript Base
- status: unclaimed
- branch: javascript-base
- session: null
- description: Create main JavaScript file with DOMContentLoaded
- priority: 9
- merge_order: 3
- exclusive_files: [script.js]
- shared_files: []
## Task: Data File
- status: unclaimed
- branch: data-file
- session: null
- description: Create JSON data file with sample content
- priority: 9
- merge_order: 4
- exclusive_files: [data/content.json]
- shared_files: []
## Task: Main Content
- status: unclaimed
- branch: main-content
- session: null
- description: Add main content section between header and footer
- dependencies: [header-component, footer-component]
- priority: 6
- merge_order: 8
- exclusive_files: [components/main.css]
- shared_files: [index.html]
- initialization_deps: [header-component, footer-component]
## Task: Interactive Features
- status: unclaimed
- branch: interactive-features
- session: null
- description: Add JavaScript interactivity and event handlers
- dependencies: [javascript-base, main-content]
- priority: 5
- merge_order: 9
- exclusive_files: [components/interactive.js]
- shared_files: [script.js]
- initialization_deps: [javascript-base, main-content]
## Task: Final Integration
- status: unclaimed
- branch: final-integration
- session: null
- description: Link all CSS and JS files in HTML
- dependencies: [base-html, base-css, javascript-base, header-component, footer-component, theme-styles, main-content, interactive-features]
- priority: 4
- merge_order: 10
- exclusive_files: []
- shared_files: [index.html]
- initialization_deps: [main-content, interactive-features]
EOF
# Create CLAUDE.md
echo "📝 Creating CLAUDE.md..."
cat > CLAUDE.md << 'EOF'
# CLAUDE.md - Hello SplitMind Test Project
## Overview
You are working on a simple test project to demonstrate the SplitMind coordination system. Each task should be completed quickly (1-2 minutes).
## Task Guidelines
1. Keep changes minimal and focused
2. Add clear comments in your code
3. Commit with descriptive messages
4. Complete your specific task only
## File Structure
- `index.html` - Main HTML file
- `styles.css` - Base styles
- `script.js` - Main JavaScript
- `components/` - Component-specific files
- `data/` - Data files
## Task-Specific Instructions
### Base HTML
Create a simple HTML5 structure:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello SplitMind</title>
</head>
<body>
<!-- Components will be added here -->
</body>
</html>
```
### Base CSS
Create a minimal CSS reset:
```css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: system-ui, -apple-system, sans-serif;
line-height: 1.6;
}
```
### Header Component
Add a header element inside body:
```html
<!-- Header Component -->
<header id="main-header">
<h1>Hello SplitMind</h1>
<nav>
<a href="#home">Home</a>
<a href="#about">About</a>
</nav>
</header>
```
### Footer Component
Add a footer element at the end of body:
```html
<!-- Footer Component -->
<footer id="main-footer">
<p>© 2024 SplitMind Test</p>
</footer>
```
### Other Tasks
Follow similar patterns - keep it simple and focused.
## Important
- If your task modifies a shared file (like index.html), make changes only in your designated section
- Add a comment with your task name when modifying shared files
- Keep code simple - this is for testing coordination, not production
EOF
# Create settings.json for Claude
echo "📝 Creating Claude settings..."
mkdir -p .claude
cat > .claude/settings.json << 'EOF'
{
"permissions": {
"allow": [
"Read(**)",
"Edit(**)",
"Write(**)",
"Bash(**)"
]
},
"preferences": {
"autoCommit": false,
"testBeforeCommit": false
}
}
EOF
echo ""
echo "✅ Test project created successfully!"
echo "📍 Location: $PROJECT_PATH"
echo ""
echo "Next steps:"
echo "1. Add project to dashboard:"
echo " curl -X POST http://localhost:8000/api/projects -H \"Content-Type: application/json\" -d '{\"id\": \"hello-splitmind\", \"name\": \"Hello SplitMind Test\", \"path\": \"$PROJECT_PATH\", \"description\": \"Quick test project\", \"max_agents\": 5}'"
echo ""
echo "2. Start orchestrator:"
echo " curl -X POST http://localhost:8000/api/orchestrator/start -H \"Content-Type: application/json\" -d '{\"project_id\": \"hello-splitmind\"}'"
echo ""
echo "3. Monitor progress in the dashboard or with:"
echo " python monitor-test.py"