-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathorchestrator.sh
More file actions
executable file
Β·151 lines (119 loc) Β· 4.95 KB
/
orchestrator.sh
File metadata and controls
executable file
Β·151 lines (119 loc) Β· 4.95 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
#!/bin/bash
# orchestrator.sh
# Orchestrates three Claude Code instances to implement, review, and commit roadmap items
set -e # Exit on error
ROADMAP_FILE="ROADMAP.md"
PROJECT_DIR="$(pwd)"
echo "π» Solarpunk Utopia Platform - AI Orchestrator π»"
echo "=================================================="
echo ""
# Phase 1: Implementation Agent
echo "π¨ Phase 1: Launching Implementation Agent..."
echo "This agent will claim the next unclaimed roadmap item and implement it."
echo ""
claude --dangerously-skip-permissions --print "
You are the Implementation Agent for the Solarpunk Utopia Platform.
YOUR TASK:
1. Read the ROADMAP.md file carefully
2. Find the next unclaimed item that is not yet marked as 'in progress' or 'done'
3. Update the ROADMAP.md to mark that item as 'in progress' (add a status indicator like β³ or [IN PROGRESS])
4. Read the relevant specification file(s) referenced in the roadmap for that feature
5. Implement the feature according to the specification
6. DO NOT commit any code - just implement and save files
7. When done, output a summary of what you implemented
Remember:
- Follow the project's solarpunk values (no money, no surveillance, offline-first, accessible)
- Only implement what's specified - don't over-engineer
- Write clean, simple code
- The next agent will review your work and write tests
Start by examining the ROADMAP.md and choosing the next item to implement.
"
if [ $? -ne 0 ]; then
echo "β Implementation agent failed!"
exit 1
fi
echo ""
echo "β
Implementation complete!"
echo ""
# Phase 2: Review and Test Agent
echo "π Phase 2: Launching Review and Test Agent..."
echo "This agent will review the implementation using the code review checklist and write tests."
echo ""
claude --dangerously-skip-permissions --print "
You are the Review and Test Agent for the Solarpunk Utopia Platform.
IMPORTANT: Before starting, read the AGENT_CODE_REVIEW_CHECKLIST.md file.
Use it as your guide for this review.
YOUR TASK:
1. Read AGENT_CODE_REVIEW_CHECKLIST.md thoroughly
2. Review the code that was just implemented by the previous agent
3. Use the checklist to verify:
TYPE SAFETY:
- [ ] No \`any\` types without justification
- [ ] Null/undefined properly handled
- [ ] Function return types explicit
ERROR HANDLING:
- [ ] All async operations have try/catch or .catch() handlers
- [ ] Errors include context (what and where)
- [ ] Consistent error pattern (throw OR return {success, error})
SECURITY:
- [ ] All user input sanitized using sanitizeUserContent()
- [ ] IDs validated using requireValidIdentifier()
- [ ] No innerHTML with unsanitized user content
- [ ] No secrets or hardcoded user IDs like 'user-1'
SOLARPUNK VALUES:
- [ ] No tracking or analytics added
- [ ] Works offline (no external API dependencies)
- [ ] Automerge compatible (no undefined values, arrays modified in-place)
CODE QUALITY:
- [ ] Functions are small (single responsibility)
- [ ] No code duplication
- [ ] Uses existing utilities from src/utils/
4. Fix any issues you find based on the checklist
5. Write comprehensive tests for the implemented feature
6. Run the tests to ensure they pass (npm test)
7. DO NOT commit any code - the next agent will do that
Remember:
- Be thorough - the checklist exists because these issues keep recurring
- Tests should cover both happy paths and edge cases
- Check TECH_DEBT_REPORT.md to avoid repeating known issues
Review the recent changes using the checklist and write tests.
"
if [ $? -ne 0 ]; then
echo "β Review and test agent failed!"
exit 1
fi
echo ""
echo "β
Review and testing complete!"
echo ""
# Phase 3: Commit and Documentation Agent
echo "π Phase 3: Launching Commit and Documentation Agent..."
echo "This agent will commit the work, update documentation, and push to GitHub."
echo ""
claude --dangerously-skip-permissions --print "
You are the Commit and Documentation Agent for the Solarpunk Utopia Platform.
YOUR TASK:
1. Review all the changes made by the previous agents
2. Update the ROADMAP.md to mark the completed feature as DONE (use β
or [DONE])
3. Update any relevant documentation files if needed
4. Create a descriptive git commit with:
- A clear commit message describing what was implemented
- Reference to the phase and feature from the roadmap
- The standard project footer:
π» Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
5. Push the commit to GitHub
Remember:
- The commit message should follow the project's style
- Make sure the roadmap accurately reflects the completed work
- Update any other docs that reference this feature
Commit the work and push to GitHub.
"
if [ $? -ne 0 ]; then
echo "β Commit and documentation agent failed!"
exit 1
fi
echo ""
echo "β
All phases complete!"
echo ""
echo "π» Feature successfully implemented, tested, and committed! π»"
echo "=================================================="