omnilearn-workflow 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.
@@ -0,0 +1,637 @@
1
+ ---
2
+ description: Create a comprehensive, real-world-ready learning roadmap for any skill or subject. Uses multi-agent research to design optimal learning paths with practical, hands-on focus. Stores structured output in .omnilearn/ for continuous learning.
3
+ ---
4
+
5
+ # /omnilearn-roadmap — Create a Comprehensive Learning Roadmap
6
+
7
+ ## Usage
8
+ ```
9
+ /omnilearn-roadmap I want to learn Rust
10
+ /omnilearn-roadmap Machine Learning for production systems
11
+ /omnilearn-roadmap React with TypeScript
12
+ /omnilearn-roadmap System Design for backend engineers
13
+ ```
14
+
15
+ ## Directory Structure
16
+
17
+ ```
18
+ .omnilearn/
19
+ ├── UserPreferences.md ← Global user preferences (auto-read + updated)
20
+ └── <skill-name>/ ← Normalized skill folder (e.g., "Rust", "Machine-Learning")
21
+ ├── SkillPreferences.md ← Per-skill learning preferences
22
+ ├── roadmap.md ← Master roadmap (the main deliverable)
23
+ ├── progress-index.md ← Progress log — index of all runs
24
+ ├── runs/ ← Research & execution logs
25
+ │ └── YYYY-MM-DD-HHMMSS-roadmap-creation/
26
+ │ ├── agent-log.md ← What this run did, decisions made
27
+ │ ├── research-content.md ← Raw: subagent A findings (what to learn)
28
+ │ ├── research-learning.md ← Raw: subagent B findings (how to learn it)
29
+ │ └── roadmap-draft.md ← Raw: synthesized roadmap draft
30
+ └── topics/ ← Topics in the roadmap (populated during learning)
31
+ └── <topic-name>/ ← Each topic has its own progress tracking
32
+ ├── topic-roadmap.md ← Detailed subtopic roadmap (created on-demand)
33
+ ├── topic-progress.md ← Per-topic progress: assignments status, sessions
34
+ ├── assignments/ ← Hands-on assignments (generated during learning)
35
+ │ ├── 01-<concept>/
36
+ │ │ ├── question.md ← Real-world scenario assignment brief
37
+ │ │ ├── test.<ext> ← Automated test script
38
+ │ │ ├── scaffold/ ← Starter code (user writes solution here)
39
+ │ │ └── solution-guide.md ← Reference solution + explanation
40
+ │ └── ...
41
+ └── runs/ ← Per-topic action logs (NOT progress state)
42
+ └── YYYY-MM-DD-HHMMSS-<activity>/
43
+ ├── agent-log.md ← What happened this run: decisions, actions
44
+ └── ...
45
+ ```
46
+
47
+ ## Core Principles
48
+
49
+ 1. **Orchestrator is a coordinator** — You delegate research, synthesis, and creation to subagents. You do not do the work yourself. You manage files, present to user, handle git.
50
+ 2. **Agent communication via MD files** — Every subagent writes its findings to a markdown file. The next subagent reads those files. No information loss from summarization.
51
+ 3. **Token efficiency** — Only read files that are needed. Use file paths and grep to find what you need. Don't load entire files into context unnecessarily.
52
+ 4. **Self-learning** — After key interactions, assess whether user preferences need updating. Store only genuinely useful information. Don't hoard trivia.
53
+ 5. **Learning by doing** — The roadmap must emphasize practical, real-world skills. Not theory-only. The user learns by coding, building, and solving actual problems.
54
+ 6. **Two preference layers** — Global (UserPreferences.md across all skills) and per-skill (SkillPreferences.md for this specific domain).
55
+ 7. **Level-adaptive roadmaps** — Never waste time on topics the user already knows. Research the user's level first, then design a roadmap that starts where they are, not at zero.
56
+ 8. **Cross-skill integration** — Real-world work combines skills. If the user knows Python and is learning FastAPI, the roadmap should use Python throughout. If they know React and want Node.js, build full-stack projects. Never silo a skill from what the user already knows.
57
+
58
+ ## Phase 0.0: CONFIG CHECK — Validate Learning Directory
59
+
60
+ **Before ANY other phase, check that OmniLearn is configured:**
61
+
62
+ ```bash
63
+ OMNILEARN_CONFIG="$HOME/.config/opencode/omnilearn.json"
64
+
65
+ if [ ! -f "$OMNILEARN_CONFIG" ]; then
66
+ echo "OmniLearn is not configured yet."
67
+ echo ""
68
+ echo "Run this first:"
69
+ echo " /omnilearn-init"
70
+ echo ""
71
+ echo "This will set up your learning directory and create the base structure."
72
+ exit 1
73
+ fi
74
+
75
+ # Read the learning directory from config
76
+ LEARNING_DIR=$(grep -o '"learningDirectory"[[:space:]]*:[[:space:]]*"[^"]*"' "$OMNILEARN_CONFIG" | sed 's/"learningDirectory"[[:space:]]*:[[:space:]]*"//' | sed 's/"$//')
77
+
78
+ if [ -z "$LEARNING_DIR" ] || [ ! -d "$LEARNING_DIR" ]; then
79
+ echo "Error: Learning directory '$LEARNING_DIR' not found or invalid."
80
+ echo "Reconfigure with: /omnilearn-init"
81
+ exit 1
82
+ fi
83
+
84
+ # Set the OmniLearn base directory
85
+ OMNILEARN_DIR="$LEARNING_DIR/.omnilearn"
86
+ echo "Using learning directory: $LEARNING_DIR"
87
+ ```
88
+
89
+ All subsequent paths in this command use `$OMNILEARN_DIR` as the base.
90
+
91
+ ## MANDATORY TOOLS
92
+
93
+ | Tool | When | Why |
94
+ |------|------|-----|
95
+ | `task(subagent_type="explore", background)` | Research phases | Codebase exploration — check existing skill data |
96
+ | `task(category="unspecified-high", background)` | Content creation | Heavy research, roadmap synthesis, file writing |
97
+ | `task(category="deep", background)` | Autonomous multi-step | Complex subtasks that need internal orchestration |
98
+ | `google_search` / `websearch_web_search_exa` | Research phases | Web research for content, learning paths, best practices |
99
+ | `context7_resolve-library-id` + `context7_query_docs` | Tech skills | Official documentation for languages, frameworks, libraries |
100
+ | `read`, `write`, `edit`, `bash`, `grep`, `glob` | Every phase | File operations and navigation |
101
+ | `bash(git ...)` | Completion phase | Git commit after roadmap creation |
102
+
103
+ ## Phase 0: INTENT GATE — Parse Input & Validate
104
+
105
+ ### 0.1 Parse the User's Intent
106
+
107
+ Extract the skill name from the user's message. Normalize to kebab-case for folder naming:
108
+ - "I want to learn Rust" → skill = `Rust`
109
+ - "Machine Learning for production systems" → skill = `Machine-Learning`
110
+ - "React with TypeScript" → skill = `React-with-TypeScript`
111
+
112
+ If the input is too vague (e.g., "I want to learn something"), ask for clarification:
113
+ > "I want to help you create a focused learning roadmap. What specific skill or subject do you want to learn? For example: 'Rust', 'Machine Learning', 'React with TypeScript'."
114
+
115
+ ### 0.2 Check Prerequisites
116
+
117
+ ```bash
118
+ SKILL_DIR="$OMNILEARN_DIR/<skill-name>"
119
+ RUNS_DIR="$SKILL_DIR/runs"
120
+ TOPICS_DIR="$SKILL_DIR/topics"
121
+
122
+ # Create base omnilearn dir if not exists
123
+ mkdir -p "$OMNILEARN_DIR"
124
+ ```
125
+
126
+ ### 0.3 Check for Existing Skill
127
+
128
+ If `$SKILL_DIR` already has a `roadmap.md`, inform the user:
129
+ > "A roadmap for **{skill}** already exists at `.omnilearn/{skill}/roadmap.md`. To revise it, use `/omnilearn-roadmap-edit`. To start learning, use `/omnilearn-start`."
130
+
131
+ If the user wants to overwrite, note it and proceed (archive old roadmap to runs/ first).
132
+
133
+ ### 0.4 Load User Preferences & Cross-Skill Inventory
134
+
135
+ ```bash
136
+ if [ -f "$OMNILEARN_DIR/UserPreferences.md" ]; then
137
+ echo "Reading global user preferences..."
138
+ fi
139
+ ```
140
+
141
+ Read `UserPreferences.md` if it exists. Key signals to extract:
142
+ - Learning style preferences (hands-on, theory-first, etc.)
143
+ - Experience level (beginner, intermediate, advanced) — **critical for adaptive roadmap**
144
+ - Time commitments
145
+ - Career goals
146
+ - Prior related knowledge the user has mentioned
147
+
148
+ ### 0.5 Cross-Skill Inventory — Scan Existing Skills
149
+
150
+ **This is mandatory.** Scan the learning directory for ALL existing skills the user has already learned or is learning:
151
+
152
+ ```bash
153
+ # List all existing skill directories inside .omnilearn/
154
+ ls -d "$OMNILEARN_DIR"/*/ 2>/dev/null | while read dir; do
155
+ skill_name=$(basename "$dir")
156
+ # Read their progress to understand what the user already knows
157
+ if [ -f "$dir/progress-index.md" ]; then
158
+ echo "Existing skill: $skill_name — checking progress..."
159
+ # Extract: completed topics, current level, tools used
160
+ fi
161
+ done
162
+ ```
163
+
164
+ **Why this matters:**
165
+ - If the user already knows **Python** and wants to learn **Data Science**, the roadmap should use Python from day 1, not teach a new language
166
+ - If the user has completed **JavaScript** and wants **React**, skip JS basics and jump into React-specific content
167
+ - Real-world projects should **combine skills** — e.g., a Rust + Python project if the user knows both
168
+
169
+ Compile a **Cross-Skill Context** summary:
170
+ ```
171
+ Cross-Skill Context:
172
+ - Existing skills: {skill1} (level: intermediate, topics: {key topics completed})
173
+ {skill2} (level: beginner, topics: {key topics completed})
174
+ - User's stated level in {new_skill}: {from preferences or inferred}
175
+ - Known related tools/languages: {list}
176
+ - Integration opportunities: {ways existing skills can combine with new skill}
177
+ ```
178
+
179
+ This summary will be passed to ALL research and synthesis subagents so they can design an adaptive, personalized roadmap.
180
+
181
+ ## Phase 1: PARALLEL RESEARCH — Two Subagents Simultaneously
182
+
183
+ Spawn BOTH subagents in parallel. Each does exhaustive research and writes to a file.
184
+
185
+ ### 1.1 Subagent A: Content Research — "What to Learn" (Level-Adaptive)
186
+
187
+ This subagent researches EVERYTHING a person must know to be real-world ready in this skill. Not just theory — practical engineering competence.
188
+ **BUT: it must ADAPT the research based on the user's existing level and known related skills.**
189
+
190
+ ```typescript
191
+ task(category="unspecified-high", run_in_background=true, prompt="
192
+ 1. TASK: Research everything a person must learn to become genuinely skilled at {skill}. ADAPT the research based on the user's existing knowledge and related skills they already have.
193
+
194
+ 2. EXPECTED OUTCOME: A comprehensive, structured markdown file covering all knowledge areas, concepts, tools, and practices needed for real-world proficiency in {skill} — **filtered and prioritized based on what the user already knows**.
195
+
196
+ 3. REQUIRED TOOLS: google_search, websearch_web_search_exa, context7_resolve-library-id, context7_query_docs, read, write
197
+
198
+ 4. MUST DO:
199
+
200
+ FIRST — Consider the user's level and existing knowledge:
201
+ - User's stated experience with {skill}: {user level}
202
+ - User's existing related skills: {cross-skill context}
203
+ - Example: if user knows Python and wants Data Science, DON'T research Python basics — focus on data science libraries and concepts
204
+ - Example: if user knows JavaScript and wants React, skip JS fundamentals, start with React-specific patterns
205
+ - Example: if user is an absolute beginner, include fundamentals but frame them for real-world application
206
+
207
+ THEN — Research with this adaptation:
208
+ - Use google_search / websearch_web_search_exa extensively to find:
209
+ * Official documentation, tutorials, and learning resources for {skill}
210
+ * Industry best practices and standards
211
+ * Common interview topics, real-world requirements
212
+ * Tools, frameworks, and ecosystems around {skill}
213
+ * Advanced topics that separate junior from senior practitioners
214
+ - If {skill} is a programming language/framework/library, use context7 to look up its official docs
215
+ - Structure the research by: Fundamentals (skip if user already knows them) → Core Concepts → Advanced Topics → Ecosystem/Tools → Real-World Application
216
+ - For EACH topic area, specify:
217
+ * What concepts must be understood
218
+ * Why it matters in real-world practice
219
+ * What practical skills/exercises reinforce it
220
+ * Common pitfalls and misconceptions
221
+ * **Integration opportunities with skills the user already knows** (e.g., 'if you already know {related_skill}, you can apply it here by...')
222
+ - Prioritize content that makes someone a BETTER ENGINEER, not just a theory-knower
223
+ - Cover: debugging, testing, performance, security, maintenance, tooling, workflows
224
+ - Research career-relevant aspects: what employers actually look for
225
+ - Write in a clear, structured markdown format with ### headers for each major section
226
+ - **Flag sections that can be skipped or fast-tracked** based on existing knowledge
227
+ - Save to: {RUNS_DIR}/research-content.md
228
+
229
+ 5. MUST NOT DO:
230
+ - Do NOT create a learning schedule or timeline (that's for later synthesis)
231
+ - Do NOT skip advanced topics because they're 'hard'
232
+ - Do NOT include fluff or filler content
233
+ - Do NOT just list topics — explain WHY each matters
234
+ - Do NOT waste space on basics the user clearly already knows — note them briefly and move on
235
+
236
+ 6. CONTEXT:
237
+ - Skill: {skill}
238
+ - User level in {skill}: {user level}
239
+ - User preferences: {user preferences summary}
240
+ - Cross-skill context (existing skills the user has): {cross-skill context}
241
+ - This research will feed into a roadmap synthesis step that must produce a personalized, level-appropriate roadmap
242
+ ")
243
+ ```
244
+
245
+ ### 1.2 Subagent B: Learning Path Research — "How to Learn It" (Level-Adaptive)
246
+
247
+ This subagent researches the best pedagogical approaches, common pitfalls, and learning strategies for this specific skill.
248
+ **ADAPT based on the user's existing level and cross-skill knowledge — an intermediate learner needs a very different path than a beginner.**
249
+
250
+ ```typescript
251
+ task(category="unspecified-high", run_in_background=true, prompt="
252
+ 1. TASK: Research optimal learning strategies, common pitfalls, and effective teaching approaches for {skill} — ADAPTED to the user's existing level and related knowledge.
253
+ 2. EXPECTED OUTCOME: A detailed markdown file covering how to structure learning, common mistakes, and best practices for mastering {skill} at the user's specific level.
254
+
255
+ 3. REQUIRED TOOLS: google_search, websearch_web_search_exa, read, write
256
+
257
+ 4. MUST DO:
258
+
259
+ FIRST — Consider the user's level:
260
+ - User's experience with {skill}: {user level}
261
+ - Existing related skills: {cross-skill context}
262
+ - If the user is INTERMEDIATE/ADVANCED in related areas, the learning path should:
263
+ * Skip 'what is X' introductions
264
+ * Use comparisons to known concepts ('this is like Y in Python but different because...')
265
+ * Jump faster into applied, real-world projects
266
+ * Focus on depth, not breadth
267
+ - If the user is a BEGINNER, the learning path should:
268
+ * Build strong foundational understanding through practice
269
+ * Use smaller, more frequent checkpoints
270
+ * Include more guided real-world projects
271
+ * Focus on building confidence through completion
272
+
273
+ THEN — Research with this adaptation:
274
+ - Use google_search / websearch_web_search_exa extensively to find:
275
+ * Best learning paths and curricula for {skill} (from universities, bootcamps, online platforms)
276
+ * Common pitfalls and mistakes — **specifically at the user's level** (beginner mistakes vs intermediate mistakes are very different)
277
+ * Evidence-based learning strategies (spaced repetition, project-based learning, etc.)
278
+ * Recommended project ideas of increasing complexity
279
+ * **Integration project ideas that combine {skill} with {existing_skills}** for real-world practice
280
+ * Community resources (forums, Discord servers, conferences, meetups)
281
+ * Success stories and failure patterns from self-learners at similar levels
282
+ - For EACH major phase of learning, recommend:
283
+ * Learning approach (project-based, tutorial-based, reading, etc.)
284
+ * Time estimates for each phase
285
+ * Practice strategies that reinforce learning
286
+ * How to know when you're ready to advance
287
+ - Research project-based learning approaches specifically — the user learns by doing
288
+ - Document what order concepts should be learned and why (prerequisites matter)
289
+ - Identify which parts are hardest for most learners and recommend extra focus
290
+ - **Suggest cross-skill projects** — e.g., if user knows Flask and is learning React, suggest building a full-stack app
291
+ - Write in a clear, structured markdown format with ### headers
292
+ - Save to: {RUNS_DIR}/research-learning.md
293
+
294
+ 5. MUST NOT DO:
295
+ - Do NOT create the actual roadmap (that's for later synthesis)
296
+ - Do NOT recommend expensive paid resources exclusively (mix free and paid)
297
+ - Do NOT suggest 'learn everything before building anything'
298
+ - Do NOT suggest beginner-level resources if the user is clearly beyond that level
299
+
300
+ 6. CONTEXT:
301
+ - Skill: {skill}
302
+ - User level in {skill}: {user level}
303
+ - User preferences: {user preferences summary}
304
+ - Cross-skill context (existing skills the user has): {cross-skill context}
305
+ - This research will feed into a roadmap synthesis step that must produce a personalized, level-appropriate roadmap
306
+ ")
307
+ ```
308
+
309
+ ### 1.3 Wait for Both to Complete
310
+
311
+ Wait for the system notification. Collect both results via `background_output()`.
312
+
313
+ **Do NOT do any other work during this phase.** The research subagents are doing the heavy lifting.
314
+
315
+ ## Phase 2: ROADMAP SYNTHESIS — Create the Master Roadmap
316
+
317
+ ### 2.1 Read Research Results
318
+
319
+ ```bash
320
+ # Read the research files
321
+ CONTENT_FILE="$RUNS_DIR/research-content.md"
322
+ LEARNING_FILE="$RUNS_DIR/research-learning.md"
323
+ ```
324
+
325
+ Read both files to extract key findings.
326
+
327
+ ### 2.2 Spawn Roadmap Synthesizer Subagent (Level-Adaptive + Cross-Skill)
328
+
329
+ This is the most critical step. The synthesizer must produce a **PERSONALIZED** roadmap that adapts to the user's level and integrates their existing skills.
330
+
331
+ ```typescript
332
+ task(category="unspecified-high", run_in_background=false, timeout=300000, prompt="
333
+ 1. TASK: Synthesize research into a personalized, level-adaptive, cross-skill-integrated master roadmap for {skill}.
334
+ 2. EXPECTED OUTCOME: A detailed roadmap.md file with a learning path TAILORED to this user's level and existing knowledge — skipping what they already know, integrating related skills, and focused on real-world readiness.
335
+
336
+ 3. REQUIRED TOOLS: google_search, websearch_web_search_exa, context7_query_docs, read, write, grep
337
+
338
+ 4. MUST DO:
339
+ - Read BOTH research files:
340
+ * Content research: {RUNS_DIR}/research-content.md
341
+ * Learning path research: {RUNS_DIR}/research-learning.md
342
+ - Read cross-skill context: existing skills the user has
343
+ - If there are gaps or contradictions, do additional research online
344
+
345
+ CRITICAL — Personalization rules:
346
+ - **Do NOT include topics the user already knows.** If the user is experienced in Python and learning FastAPI, skip Python fundamentals entirely.
347
+ - **Use analogies to existing knowledge.** Frame new concepts in terms of what the user already knows. E.g., 'Think of this like Python decorators but with a twist...'
348
+ - **Integrate cross-skill projects.** Suggest projects that combine {skill} with the user's existing {related_skills}. E.g., 'Build an ML model in Python and deploy it with FastAPI.' This is how real-world skills are built.
349
+ - **Adjust depth based on level.** For intermediate learners: less breadth, more depth on each topic. For beginners:循序渐进 (step by step) with more reinforcement.
350
+ - **Adjust estimated effort.** An experienced developer learning a new language needs fewer hours than a complete beginner.
351
+
352
+ The roadmap must have this structure:
353
+
354
+ # {skill} Learning Roadmap
355
+
356
+ ## Overview (Personalized)
357
+ - What this skill is, why it matters, what YOU'LL be able to do (given your existing {related_skills} knowledge)
358
+ - **Your starting point**: {user level} — what we'll skip because you already know it
359
+ - **Cross-skill opportunities**: How {skill} combines with {related_skills} you already know
360
+ - Estimated effort (hours/weeks — **adjusted for your level**)
361
+ - Learning philosophy (how this roadmap works)
362
+
363
+ ## Roadmap Structure
364
+ - How to use this roadmap
365
+ - How progress is tracked
366
+ - How topics connect (prerequisite relationships)
367
+ - Legend: 🟢 Not Started 🔵 In Progress ✅ Completed
368
+
369
+ ## Foundation (SKIP if user already knows these)
370
+ Only include topics the user actually needs. If they already know foundational concepts, note it:
371
+ > ✅ Skipped — you already have this from {related_skill}
372
+
373
+ ### Topic 1: {name}
374
+ - **Why this matters**: Real-world relevance
375
+ - **Core concepts**: What you need to understand
376
+ - **Practical skills**: What you'll be able to do
377
+ - **Your advantage**: How your {related_skill} knowledge applies here
378
+ - **Suggested approach**: How to learn this
379
+ - **Prerequisites**: {none or list}
380
+ - **Estimated time**: {hours — adjusted for user level}
381
+ - **Progress**: 🟢 Not Started
382
+
383
+ ## Core
384
+ ### Topic N: {name}
385
+ ... same structure, with cross-skill references where applicable ...
386
+
387
+ ## Advanced
388
+ ### Topic M: {name}
389
+ ... same structure ...
390
+
391
+ ## Real-World Readiness
392
+ ### Cross-Skill Capstone Projects
393
+ - Project 1: {description combining {skill} with {related_skill}}
394
+ - Project 2: {description combining {skill} with {related_skill}}
395
+
396
+ ### Ecosystem & Tools
397
+ - Essential tools, IDEs, debugging, profiling
398
+
399
+ ## Continuous Growth
400
+ - How to keep learning beyond this roadmap
401
+ - Communities, conferences, advanced resources
402
+
403
+ IMPORTANT FORMATTING RULES:
404
+ - The roadmap should be NON-LINEAR where appropriate — show connections between topics
405
+ - Each topic should clearly state prerequisites so the user knows dependencies
406
+ - Focus on real-world readiness: after completing a topic, the user should be able to APPLY it
407
+ - For tech skills: coverage of testing, debugging, performance, security, deployment
408
+ - **Cross-skill integration must appear throughout** — not just in a separate section
409
+
410
+ - Also create/update {SKILL_DIR}/SkillPreferences.md:
411
+ * Skill name, created date
412
+ * Current stage: {user level}
413
+ * Starting level: {user level}
414
+ * Related skills: {cross-skill context}
415
+ * Learning focus areas
416
+
417
+ - Also create/update {SKILL_DIR}/progress-index.md:
418
+ * Roadmap created date
419
+ * Overview of all topics with Not Started status
420
+ * Cross-skill context noted
421
+ * Empty learning sessions table
422
+
423
+ 5. MUST NOT DO:
424
+ - Do NOT include topics the user already knows (waste of time — they'll get bored and quit)
425
+ - Do NOT create assignment files (that happens during /omnilearn-start)
426
+ - Do NOT make the roadmap too high-level — each topic should be specific and actionable
427
+ - Do NOT create a linear 'day 1, day 2' style plan — this is a skill roadmap, not a course schedule
428
+ - Do NOT treat beginners and experienced learners the same — the roadmap must be different for each
429
+ - Do NOT silo this skill from the user's existing knowledge — integration is key to real-world readiness
430
+
431
+ 6. CONTEXT:
432
+ - Skill: {skill}
433
+ - User level in {skill}: {user level}
434
+ - Cross-skill context (existing skills): {cross-skill context}
435
+ - Skill directory: {SKILL_DIR}
436
+ - Runs directory: {RUNS_DIR}
437
+ - Topics directory: {TOPICS_DIR}
438
+ - User preferences: {summary}
439
+ ")
440
+ ```
441
+
442
+ ### 2.3 Verify Roadmap
443
+
444
+ Read the generated `roadmap.md` and verify:
445
+ - It's not empty or placeholder
446
+ - It has at least 5 major topics
447
+ - Each topic has: why matters, core concepts, prerequisites, practical skills
448
+ - It covers foundation → core → advanced progression
449
+ - It has real-world readiness section
450
+
451
+ If any check fails, spawn a fix subagent: `task(task_id="<session_id>", prompt="Fix: {specific issue}")`
452
+
453
+ ## Phase 3: UPDATE USER PREFERENCES — Organic Learning
454
+
455
+ ### 3.1 Update or Create UserPreferences.md
456
+
457
+ Read existing `UserPreferences.md` (if any). Based on this interaction, determine if new preferences should be recorded.
458
+
459
+ **Only add preferences when there is CLEAR SIGNAL. Rules:**
460
+ - The user explicitly stated their experience level → record it
461
+ - The user explicitly stated learning preferences → record it
462
+ - The user asked for specific focus areas → record them
463
+ - You inferred something with HIGH confidence → record it as a note
464
+
465
+ **Do NOT add generic or speculative preferences.**
466
+
467
+ ```markdown
468
+ ## Learning Style
469
+ - [evidence-based preference 1]
470
+ - [evidence-based preference 2]
471
+
472
+ ## Technical Background
473
+ - [based on their stated or demonstrated knowledge]
474
+ ```
475
+
476
+ Append a log entry:
477
+ ```markdown
478
+ ## Preference Log
479
+ ### {date}: {trigger event}
480
+ - {what was learned about the user}
481
+ - {why it's useful to remember}
482
+ ```
483
+
484
+ ### 3.2 Write Agent Log
485
+
486
+ ```bash
487
+ RUN_LOG="$RUNS_DIR/agent-log.md"
488
+ ```
489
+
490
+ Write to the agent log file documenting:
491
+ - What skill roadmap was created
492
+ - Key decisions made during research and synthesis
493
+ - Any notable findings from research
494
+ - Current state (user hasn't started learning yet)
495
+
496
+ ## Phase 4: PRESENT TO USER
497
+
498
+ ```markdown
499
+ ┌──────────────────────────────────────────────────────────────────┐
500
+ │ ✅ Roadmap Created: {skill} │
501
+ ├──────────────────────────────────────────────────────────────────┤
502
+ │ │
503
+ │ 📍 Location: .omnilearn/{skill}/roadmap.md │
504
+ │ │
505
+ │ 📊 Roadmap Overview: │
506
+ │ • Foundation: {N} topics — build the fundamentals │
507
+ │ • Core: {N} topics — deep practical knowledge │
508
+ │ • Advanced: {N} topics — expert-level mastery │
509
+ │ • Real-World: {N} capstone projects + ecosystem tools │
510
+ │ • Estimated effort: {hours} hours │
511
+ │ │
512
+ │ 🎯 Learning Philosophy: │
513
+ │ • Learn by doing — each topic has hands-on assignments │
514
+ │ • Progress tracked via progress-index.md │
515
+ │ • Self-adapting — preferences update as you learn │
516
+ │ │
517
+ │ ┌─ Preview ─────────────────────────────────────────────────┐ │
518
+ │ │ {First 2-3 topics from the roadmap} │ │
519
+ │ │ ... │ │
520
+ │ └────────────────────────────────────────────────────────────┘ │
521
+ │ │
522
+ │ What's next: │
523
+ │ │
524
+ │ 1. Review the full roadmap at the path above │
525
+ │ 2. Want changes? Use /omnilearn-roadmap-edit │
526
+ │ 3. Ready to start? Use /omnilearn-start {skill} │
527
+ │ │
528
+ │ Any feedback on this roadmap? I can adjust depth, focus, │
529
+ │ or specific topics. │
530
+ └──────────────────────────────────────────────────────────────────┘
531
+ ```
532
+
533
+ Ask for feedback. If the user wants changes, ask them to use `/omnilearn-roadmap-edit`.
534
+
535
+ ## Phase 5: GIT COMMIT
536
+
537
+ ### 5.1 Check Git Setup
538
+
539
+ ```bash
540
+ # Check if the project has a git repo
541
+ if git rev-parse --git-dir > /dev/null 2>&1; then
542
+ echo "Git repo detected"
543
+ else
544
+ echo "No git repo found"
545
+ fi
546
+ ```
547
+
548
+ If git repo exists:
549
+ ```bash
550
+ git add "$OMNILEARN_DIR/"
551
+ git commit -m "omnilearn: create learning roadmap for {skill}
552
+
553
+ - Added master roadmap with foundation, core, advanced, and real-world topics
554
+ - Created skill directory structure with progress tracking
555
+ - Updated global user preferences based on interaction
556
+ "
557
+ ```
558
+
559
+ If no git repo exists, ask:
560
+ > "I noticed this project doesn't have a git repository yet. Would you like me to initialize one and commit the roadmap? This enables automatic progress tracking via commits as you learn."
561
+
562
+ If yes:
563
+ ```bash
564
+ git init
565
+ git add "$OMNILEARN_DIR/"
566
+ git commit -m "omnilearn: initialize learning environment with {skill} roadmap"
567
+ ```
568
+
569
+ **Never push without explicit user instruction.**
570
+
571
+ ## Phase 6: UPDATE TODO & COMPLETE
572
+
573
+ Mark the task as complete. Update UserPreferences.md if new relevant information was learned.
574
+
575
+ ## Quality Gates
576
+
577
+ | Check | Phase | Action if Failed |
578
+ |-------|-------|-----------------|
579
+ | Content research subagent completed | 1 | Block — must have research |
580
+ | Learning path subagent completed | 1 | Block — must have research |
581
+ | Cross-skill inventory scanned | 0 | Scan .omnilearn/ directories |
582
+ | User level extracted from preferences | 0 | Infer from available signals |
583
+ | Roadmap has 5+ substantive topics | 2 | Re-synthesize with fix |
584
+ | Roadmap skips topics user already knows | 2 | Re-synthesize — remove redundant basics |
585
+ | Roadmap references cross-skill integration | 2 | Re-synthesize — add integration opportunities |
586
+ | Roadmap covers foundation→core→advanced | 2 | Re-synthesize with fix |
587
+ | Roadmap has real-world readiness section | 2 | Re-synthesize with fix |
588
+ | Estimated effort adjusted for user level | 2 | Re-synthesize — adjust time estimates |
589
+ | progress-index.md created with reference to cross-skill | 2 | Create it manually |
590
+ | SkillPreferences.md created with level data | 2 | Create it manually |
591
+ | Agent log written | 3 | Write it |
592
+ | User preferences considered | 3 | If exists, must be read |
593
+ | Git commit attempted | 5 | Ask user if they want to skip |
594
+
595
+ ## Error Recovery
596
+
597
+ | Situation | Action |
598
+ |-----------|--------|
599
+ | Skill folder already exists with roadmap | Inform user, suggest /omnilearn-roadmap-edit |
600
+ | Research subagent fails | Diagnose, re-spawn with more specific instructions |
601
+ | Roadmap synthesis is poor quality | Re-spawn synthesis with fix instructions |
602
+ | Subagent can't access web search | Use alternative search tools, proceed with available data |
603
+ | User wants different structure | Accept feedback, tell them to use /omnilearn-roadmap-edit |
604
+ | User says "I already know this topic" | Show how to use /omnilearn-roadmap-edit to skip it; note user's level in preferences |
605
+ | User's level was misjudged (too advanced / too basic) | Update UserPreferences.md with corrected level, offer to regenerate roadmap |
606
+ | Cross-skill integration missed a known skill | Note the missing skill in preferences, update roadmap with integration |
607
+ | User wants to overwrite existing roadmap | Archive old roadmap to runs/, proceed with creation |
608
+ | Git init/commit fails due to permissions | Report error, suggest manual git setup |
609
+
610
+ ## What You MUST Do
611
+
612
+ - ✅ **Delegate research to parallel subagents** — never do research yourself
613
+ - ✅ **Write findings to files** — communication between agents is via markdown files
614
+ - ✅ **Read UserPreferences.md at start** — adapt to the user
615
+ - ✅ **Update preferences organically** — only when you have clear signal
616
+ - ✅ **Scan cross-skill inventory** — check what other skills the user has before designing
617
+ - ✅ **Adapt to user level** — skip basics they know, adjust depth and pace
618
+ - ✅ **Integrate related skills** — design cross-skill projects and analogies
619
+ - ✅ **Verify roadmap quality** — 5+ topics, foundation→core→advanced, real-world focus, level-appropriate
620
+ - ✅ **Create complete skill directory structure** — roadmap, progress-index, SkillPreferences, runs/
621
+ - ✅ **Present results clearly** — roadmap preview, next steps
622
+ - ✅ **Git commit after roadmap creation** — only if repo exists or user agrees
623
+
624
+ ## What You MUST NOT Do
625
+
626
+ - ❌ Do NOT do research yourself — always delegate to subagents
627
+ - ❌ Do NOT skip reading UserPreferences.md if it exists
628
+ - ❌ Do NOT ignore cross-skill context — always scan existing skills
629
+ - ❌ Do NOT create a roadmap that wastes time on known topics
630
+ - ❌ Do NOT silo this skill from what the user already knows — real-world work combines skills
631
+ - ❌ Do NOT treat beginners and experienced learners the same — adapt the roadmap
632
+ - ❌ Do NOT create assignments during roadmap creation
633
+ - ❌ Do NOT make a day-by-day course schedule — this is a skill roadmap
634
+ - ❌ Do NOT push to remote without explicit user approval
635
+ - ❌ Do NOT ask the user to fill out a preferences form — infer organically
636
+ - ❌ Do NOT create theory-only roadmaps — emphasize hands-on learning
637
+ - ❌ Do NOT skip advanced topics