-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·353 lines (281 loc) · 11.5 KB
/
setup.sh
File metadata and controls
executable file
·353 lines (281 loc) · 11.5 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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
#!/usr/bin/env bash
# Personal OS Setup Script
# Creates directories, copies templates, and guides you through goals creation
#
# ┌─────────────────────────────────────────────────────────────────────┐
# │ AGENT INSTRUCTIONS │
# │ │
# │ If you are an AI agent (e.g. Claude Code) reading this file: │
# │ Do NOT execute this script as bash. Instead, walk through the │
# │ setup interactively using your tools. Use AskUserQuestion (or your │
# │ equivalent interactive tool) to gather answers from the user. │
# │ │
# │ Follow these steps: │
# │ │
# │ 1. CREATE WORKSPACE STRUCTURE │
# │ - Ensure these directories exist: Tasks/, Knowledge/ │
# │ - If AGENTS.md doesn't exist, copy from core/templates/AGENTS.md │
# │ - If .gitignore doesn't exist, copy from core/templates/gitignore│
# │ - If BACKLOG.md doesn't exist, create it with a short intro │
# │ │
# │ 2. ASK THE USER THESE 5 QUESTIONS (use AskUserQuestion if you │
# │ have it, otherwise ask inline): │
# │ Q1: "What's your current role?" │
# │ Example: Product Manager, Senior Engineer, Founder, VP │
# │ Q2: "What's your primary professional vision? │
# │ What are you building toward?" │
# │ Example: Become VP Product, Launch a successful product │
# │ Q3: "In 12 months, what would make you think │
# │ 'this was a successful year'?" │
# │ Example: Shipped 3 major features, Built a team of 10 │
# │ Q4: "What are your objectives for THIS QUARTER (next 90 days)?" │
# │ Example: Launch new feature, Improve activation by 20% │
# │ Q5: "What are your top 3 priorities right now? │
# │ (Be brutally honest)" │
# │ Example: 1. Ship Q1 roadmap, 2. Build thought leadership │
# │ │
# │ 3. GENERATE GOALS.md │
# │ Use the answers to populate GOALS.md following the template │
# │ defined at the bottom of this script (search for "cat > GOALS") │
# │ │
# │ 4. SUMMARIZE │
# │ Tell the user what was created and suggest next steps: │
# │ - Review GOALS.md and refine as needed │
# │ - Read AGENTS.md to understand how the AI agent works │
# │ - Start adding tasks or notes to BACKLOG.md │
# │ - Say "process my backlog" to begin triage │
# └─────────────────────────────────────────────────────────────────────┘
set -e
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
print_header() {
echo ""
echo "============================================================"
echo " $1"
echo "============================================================"
echo ""
}
print_success() {
echo -e "${GREEN}✓${NC} $1"
}
print_info() {
echo -e "${BLUE}ℹ${NC} $1"
}
print_warning() {
echo -e "${YELLOW}!${NC} $1"
}
ask_question() {
local prompt="$1"
local example="$2"
local response=""
# Print prompt to terminal (stderr so it's not captured)
echo "" >&2
echo "$prompt" >&2
if [ -n "$example" ]; then
echo -e "${BLUE}$example${NC}" >&2
fi
read -r response
# Return answer to stdout (gets captured)
echo "$response"
}
ask_multiline() {
local prompt="$1"
local response=""
echo ""
echo "$prompt"
echo "(Type your answer, then press Ctrl+D when done)"
echo ""
response=$(cat)
echo "$response"
}
# Start setup
clear
print_header "Welcome to Personal OS Setup"
echo "This setup will help you:"
echo " 1. Create your workspace structure"
echo " 2. Define your goals and priorities"
echo " 3. Configure your AI assistant"
echo ""
echo "Takes about 2 minutes. Be honest and specific."
echo ""
read -p "Press Enter to begin..."
# Create directories
print_header "Creating Workspace"
for dir in "Tasks" "Knowledge"; do
if [ -d "$dir" ]; then
print_info "Directory exists: $dir/"
else
mkdir -p "$dir"
print_success "Created: $dir/"
fi
done
# Copy template files
print_header "Setting Up Templates"
if [ ! -f "AGENTS.md" ] && [ -f "core/templates/AGENTS.md" ]; then
cp "core/templates/AGENTS.md" "AGENTS.md"
print_success "Copied: AGENTS.md"
else
print_info "File exists: AGENTS.md (preserving your version)"
fi
if [ ! -f ".gitignore" ] && [ -f "core/templates/gitignore" ]; then
cp "core/templates/gitignore" ".gitignore"
print_success "Copied: .gitignore"
else
print_info "File exists: .gitignore (preserving your version)"
fi
# Create BACKLOG.md
if [ ! -f "BACKLOG.md" ]; then
cat > "BACKLOG.md" << 'EOF'
# Backlog
Drop raw notes or todos here. Say `process my backlog` when you're ready for triage.
EOF
print_success "Created: BACKLOG.md"
else
print_info "File exists: BACKLOG.md"
fi
# Goals creation
print_header "Building Your Personal Goals"
echo "Now let's create your GOALS.md - the heart of your Personal OS."
echo ""
echo "I'll ask you about your goals and priorities."
echo "This helps your AI agent make smarter decisions about task priorities."
echo ""
echo "Be honest and specific - this is for you, not anyone else."
echo "You can always edit GOALS.md later to refine your thinking."
echo ""
read -p "Ready to dive in? Press Enter to start..."
# Collect answers (keeping it short - 5 essential questions)
# Section 1: Current Situation
print_header "1. Current Situation"
ans_role=$(ask_question \
"What's your current role?" \
"Product Manager, Senior Engineer, Founder, VP Product")
# Section 2: Vision
print_header "2. Your Vision"
ans_vision=$(ask_question \
"What's your primary professional vision? What are you building toward?" \
"Become VP Product, Launch a successful product, Build a thriving consultancy")
# Section 3: Success This Year
print_header "3. Success This Year"
ans_success_12mo=$(ask_question \
"In 12 months, what would make you think 'this was a successful year'?" \
"Shipped 3 major features, Built a team of 10, Became recognized expert in my field")
# Section 4: This Quarter
print_header "4. This Quarter"
ans_q1_goals=$(ask_question \
"What are your objectives for THIS QUARTER (next 90 days)?" \
"Launch new feature, Improve activation by 20%, Build PM practice")
# Section 5: Top Priorities
print_header "5. Top Priorities"
ans_top3=$(ask_question \
"What are your top 3 priorities right now? (Be brutally honest)" \
"1. Ship Q1 roadmap, 2. Build thought leadership, 3. Develop AI product skills")
# Set empty placeholders for sections user can fill in later
ans_company=""
ans_vision_why=""
ans_success_5yr=""
ans_current_focus=""
ans_q1_metrics=""
ans_skills=""
ans_relationships=""
ans_challenges=""
ans_opportunities=""
# Generate GOALS.md
print_header "Generating Your GOALS.md"
CURRENT_DATE=$(date +"%B %d, %Y")
cat > "GOALS.md" << EOF
# Goals & Strategic Direction
*Last updated: ${CURRENT_DATE}*
## Current Context
### What's your current role?
${ans_role}${ans_company:+ at }${ans_company}
### What's your primary professional vision? What are you building toward?
${ans_vision}
${ans_vision_why:+**Why this matters:**
${ans_vision_why}}
## Success Criteria
### In 12 months, what would make you think 'this was a successful year'?
${ans_success_12mo}
### What's your 5-year north star? Where do you want to be?
${ans_success_5yr}
## Current Focus Areas
### What are you actively working on right now?
${ans_current_focus}
### What are your objectives for THIS QUARTER (next 90 days)?
${ans_q1_goals}
${ans_q1_metrics:+**How will you measure success on those quarterly objectives?**
${ans_q1_metrics}}
### What skills do you need to develop to achieve your vision?
${ans_skills}
### What key relationships or network do you need to build?
${ans_relationships}
## Strategic Context
### What's currently blocking you or slowing you down?
${ans_challenges}
### What opportunities are you exploring or considering?
${ans_opportunities}
## Priority Framework
When evaluating new tasks and commitments:
**P0 (Critical/Urgent)** - Must do THIS WEEK:
- Directly advances quarterly objectives
- Time-sensitive opportunities
- Critical stakeholder communication
- Immediate blockers to remove
**P1 (Important)** - This month:
- Builds key skills or expertise
- Advances product strategy
- Significant career development
- High-value learning opportunities
**P2 (Normal)** - Scheduled work:
- Supports broader objectives
- Maintains stakeholder relationships
- Operational efficiency
- General learning and exploration
**P3 (Low)** - Nice to have:
- Administrative tasks
- Speculative projects
- Activities without clear advancement value
## What are your top 3 priorities right now?
${ans_top3}
---
**Your AI assistant uses this document to prioritize tasks and suggest what to work on each day.**
*Review and update this weekly as your priorities shift.*
EOF
print_success "Created: GOALS.md"
# Optional: Install skill packs
print_header "Optional: Install Skill Packs"
echo "Skill packs add extra capabilities to your Personal OS."
echo ""
echo "Available packs:"
echo " - amans-skills: Excalidraw diagrams, design-for-agents, and more"
echo " https://github.com/amanaiproduct/amans-skills"
echo ""
read -p "Install amans-skills pack? (y/N) " install_skills
if [[ "$install_skills" =~ ^[Yy]$ ]]; then
if command -v git &> /dev/null; then
git clone https://github.com/amanaiproduct/amans-skills.git "$HOME/amans-skills" 2>/dev/null && \
print_success "Cloned amans-skills to ~/amans-skills" && \
print_info "Run 'cat ~/amans-skills/SETUP.md' for installation instructions" || \
print_warning "Failed to clone amans-skills. You can install manually later."
else
print_warning "git not found. Install manually: https://github.com/amanaiproduct/amans-skills"
fi
else
print_info "Skipped. You can install later: https://github.com/amanaiproduct/amans-skills"
fi
# Final summary
print_header "Setup Complete!"
echo "Your Personal OS is ready to use."
echo ""
echo "📋 Next Steps:"
echo ""
echo "1. Review GOALS.md and refine as needed"
echo "2. Read AGENTS.md to understand how your AI agent works"
echo "3. Start adding tasks or notes to BACKLOG.md"
echo "4. Tell your AI: 'Read AGENTS.md and help me process my backlog'"
echo ""
print_success "Happy organizing!"
echo ""