Skip to content

Commit 3383b38

Browse files
dbejarano820claude
andcommitted
feat: show prerequisite status for locked skills in /progress
Add locked skills section to progress command showing prerequisites with mastery status and "ready to learn" indicators. Closes DOJ-2441 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b96a272 commit 3383b38

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

β€Žcommands/progress.mdβ€Ž

Lines changed: 33 additions & 2 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 πŸ”’
54+
πŸ”’ Locked Skills
5555
────────────────
56-
[Next few skills to unlock, with what prerequisite they need]
56+
[Concepts whose prerequisites are not all mastered β€” see step 3b]
5757
5858
Recent Achievements πŸ†
5959
──────────────────────
@@ -64,6 +64,37 @@ Recent Achievements πŸ†
6464
Free & Open Source β€” github.com/dojocodinglabs/code-sensei
6565
```
6666

67+
3b. Build the **Locked Skills** section by reading `data/concept-tree.json`:
68+
69+
- Iterate over every concept in every category of `concept-tree.json`.
70+
- A concept is **locked** if it has at least one entry in its `prerequisites` array AND not all of those prerequisites appear in the user's `concepts_mastered` list.
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+
- For each locked concept, check each prerequisite ID against `concepts_mastered`:
73+
- Mastered prerequisite β†’ mark with βœ…
74+
- Unmastered prerequisite β†’ mark with ❌
75+
- Sort the locked 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.
76+
- Skip concepts whose prerequisites array is empty β€” those are not locked, they are always available.
77+
- Skip concepts the user has already mastered.
78+
- Format each locked concept as one line:
79+
80+
```
81+
πŸ”’ [concept-id] β€” needs: [prereq-id] [βœ… or ❌], [prereq-id] [βœ… or ❌]
82+
```
83+
84+
Append ` (Ready to learn!)` at the end of the line when all prerequisites are βœ….
85+
86+
Example output:
87+
88+
```
89+
πŸ”’ Locked Skills
90+
────────────────
91+
πŸ”’ state-management β€” needs: react-components βœ…, objects βœ… (Ready to learn!)
92+
πŸ”’ middleware β€” needs: routes βœ…, servers ❌
93+
πŸ”’ effects β€” needs: state ❌, async-await ❌
94+
```
95+
96+
If there are no locked concepts (the user has mastered or seen everything), omit this section entirely.
97+
6798
4. If the user is new (no profile), show a welcome instead:
6899

69100
```

0 commit comments

Comments
Β (0)