Skip to content

Commit 573c033

Browse files
authored
Merge pull request #2 from DojoCodingLabs/daniel/doj-2441-prerequisites-progress
feat: show prerequisite status in /progress (DOJ-2441)
2 parents 990ba76 + cbf2164 commit 573c033

1 file changed

Lines changed: 35 additions & 3 deletions

File tree

commands/progress.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Skills Seen But Not Quizzed 🆕 ([count])
5151
─────────────────────────────
5252
[Concepts encountered but never quizzed]
5353
54-
Skills Locked 🔒
55-
────────────────
56-
[Next few skills to unlock, with what prerequisite they need]
54+
Next Skills 🎯
55+
──────────────
56+
[Ready-to-learn and still-locked concepts with prerequisite status — see step 3b]
5757
5858
Recent Achievements 🏆
5959
──────────────────────
@@ -64,6 +64,38 @@ Recent Achievements 🏆
6464
Free & Open Source — github.com/dojocodinglabs/code-sensei
6565
```
6666

67+
3b. Build the **Next Skills** section by reading `data/concept-tree.json`:
68+
69+
- Iterate over every concept in every category of `concept-tree.json`.
70+
- Include concepts that have at least one prerequisite AND are not yet in `concepts_mastered`.
71+
- A concept is **ready to learn** when ALL prerequisites are in `concepts_mastered` but the concept itself is not yet mastered (it may or may not be in `concepts_seen`).
72+
- A concept is **still locked** when at least one prerequisite is missing from `concepts_mastered`.
73+
- For each included concept, check each prerequisite ID against `concepts_mastered`:
74+
- Mastered prerequisite → mark with ✅
75+
- Unmastered prerequisite → mark with ❌
76+
- Sort the concepts so that **"Ready to learn"** concepts (all prerequisites ✅) appear first, followed by concepts that still have unmet prerequisites (at least one ❌), ordered by fewest unmet prerequisites first.
77+
- Skip concepts whose prerequisites array is empty — those are always available and do not belong in this section.
78+
- Skip concepts the user has already mastered.
79+
- Format each concept as one line:
80+
81+
```
82+
[🟢 or 🔒] [concept-id] — needs: [prereq-id] [✅ or ❌], [prereq-id] [✅ or ❌]
83+
```
84+
85+
Use `🟢` and append ` (Ready to learn!)` when all prerequisites are ✅. Use `🔒` when at least one prerequisite is still missing.
86+
87+
Example output:
88+
89+
```
90+
Next Skills 🎯
91+
──────────────
92+
🟢 state — needs: react-components ✅ (Ready to learn!)
93+
🔒 middleware — needs: routes ✅, servers ❌
94+
🔒 effects — needs: state ❌, async-await ❌
95+
```
96+
97+
If there are no remaining concepts with prerequisites that are not yet mastered, omit this section entirely.
98+
6799
4. If the user is new (no profile), show a welcome instead:
68100

69101
```

0 commit comments

Comments
 (0)