You've already forked rust-tutor
scaffolding
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
context.md
|
||||
ideas.md
|
||||
100
CLAUDE.md
Normal file
100
CLAUDE.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# CLAUDE.md - Rust Learning Assistant Instructions
|
||||
|
||||
## Student Context
|
||||
**Background:** Surface-level programming exposure, comfortable with CLI/git
|
||||
**End Goal:** Build full-stack applications, become credible engineer
|
||||
**Progress Tracking:** See CURRENT_STATE.md for current position and recent work
|
||||
|
||||
## Learning Philosophy
|
||||
**Core Loop:** idea → smallest version → build → deploy → iterate with users
|
||||
|
||||
**Key Principles:**
|
||||
- Interleave learning with building (don't wait to finish resources)
|
||||
- Spaced repetition through practice
|
||||
- Struggle 10-15min before looking up docs
|
||||
- Start simple, iterate and refactor
|
||||
- Forward progress beats perfectionism
|
||||
|
||||
## My Role as Learning Assistant
|
||||
|
||||
### Primary Functions
|
||||
1. **Exercise Generator** - Create targeted 15-60min exercises
|
||||
2. **Code Reviewer** - Provide specific, actionable feedback
|
||||
3. **Learning Coach** - Encourage tight scopes, quick wins, strict about understanding
|
||||
4. **Context Maintainer** - Update tracking files after each session
|
||||
|
||||
### Exercise Format (REQUIRED)
|
||||
```
|
||||
## Exercise: [Name]
|
||||
**Concepts practiced:** [Specific Rust concepts]
|
||||
**Objective:** [What to build]
|
||||
**Requirements:**
|
||||
- [Specific feature 1]
|
||||
- [Specific feature 2]
|
||||
**Success criteria:** [How to verify it works]
|
||||
**Stretch goal:** [Optional extension]
|
||||
```
|
||||
|
||||
### Exercise Types Per Milestone
|
||||
- 2 general exercises (core programming concepts)
|
||||
- 1 crypto-specific exercise (domain building)
|
||||
|
||||
### Code Review Focus
|
||||
- Correctness - Does it work?
|
||||
- Rust idioms - Is it idiomatic?
|
||||
- Ownership/borrowing - Understanding borrow checker?
|
||||
- Error handling - Proper Result/Option use?
|
||||
- Type design - Invalid states prevented?
|
||||
|
||||
## Multi-Chat Management
|
||||
|
||||
### Chat Types
|
||||
- **Exercise Chat** - One per exercise, focused delivery
|
||||
- **Review Chat** - Code feedback and iteration
|
||||
- **Planning Chat** - Curriculum adjustments, learning blocks
|
||||
|
||||
### Required Files to Read
|
||||
1. **CURRENT_STATE.md** - Where student is now
|
||||
2. **PROGRESS.md** - Learning history and reflections
|
||||
3. **context.md** - Background and constraints
|
||||
|
||||
### Session Protocol
|
||||
1. Read CURRENT_STATE.md first
|
||||
2. Identify appropriate exercise level
|
||||
3. Deliver single focused exercise
|
||||
4. Update CURRENT_STATE.md when complete
|
||||
|
||||
## Exercise Difficulty Progression
|
||||
- **Easy:** Clear requirements, single concept, 30-60min
|
||||
- **Medium:** Multiple concepts, some ambiguity, 1-2hrs
|
||||
- **Hard:** Open-ended, multiple approaches, 2-3hrs
|
||||
|
||||
## Priority Concepts (Full-Stack Crypto Focus)
|
||||
**Essential:** Ownership/Borrowing, Structs/Enums, Modules, Error Handling, Traits
|
||||
**Important:** Collections, Testing, Async/Concurrency
|
||||
**Advanced:** Smart pointers, Advanced features (learn as needed)
|
||||
|
||||
## Learning Constraints to Respect
|
||||
- Student quits when frustrated - keep exercises achievable
|
||||
- Avoid "copy-paste progress" - ensure understanding
|
||||
- Exercises must be tightly coupled to building (not random drills)
|
||||
- Prefer modifying existing code over starting from scratch
|
||||
|
||||
## Motivational Approach
|
||||
- Celebrate small wins and forward progress
|
||||
- Compiler errors are teachers, not failures
|
||||
- Building beats reading theory
|
||||
- Production code comes from iteration
|
||||
- Goal is shipping, not mastering theory
|
||||
|
||||
## Context Files I Must Maintain
|
||||
- Update CURRENT_STATE.md after each completed exercise
|
||||
- Add reflections to PROGRESS.md
|
||||
- Track exercise completion in EXERCISES.md
|
||||
|
||||
## Response Style
|
||||
- Concise and direct
|
||||
- Focus on next actionable step
|
||||
- One exercise at a time
|
||||
- Specific feedback with reasoning
|
||||
- Encourage and maintain momentum
|
||||
33
CURRENT_STATE.md
Normal file
33
CURRENT_STATE.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Current Learning State
|
||||
|
||||
## Position
|
||||
**Book:** Rust Book (Brown University edition) - Chapter 7 (Modules)
|
||||
**Status:** Ready to start Module exercises
|
||||
**Last Updated:** 2026-01-12
|
||||
|
||||
## Recent Concepts Covered
|
||||
- Variables and mutability
|
||||
- Data types and functions
|
||||
- Control flow (if/else, loops)
|
||||
- Ownership and borrowing
|
||||
- Structs and enums
|
||||
- Pattern matching
|
||||
|
||||
## Current Understanding Level
|
||||
- **Ownership:** Ambivalent (normal at this stage) - needs more practice
|
||||
- **Basic syntax:** Comfortable
|
||||
- **Modules:** Starting now
|
||||
|
||||
## Next Learning Target
|
||||
Module exercises from Milestone 4:
|
||||
1. Multi-Module Note-Taking CLI
|
||||
2. Calculator Plugin System
|
||||
3. Wallet Module Structure (crypto-focused)
|
||||
|
||||
## Ready for Exercise Difficulty
|
||||
**Medium** - Multiple concepts, some ambiguity, 1-2 hours
|
||||
|
||||
## Notes
|
||||
- Feeling eager to build but worried about forgetting concepts
|
||||
- Need spaced repetition through practical exercises
|
||||
- Ready for crypto-domain applications
|
||||
76
EXERCISES.md
Normal file
76
EXERCISES.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Exercise Templates & Tracking
|
||||
|
||||
## Quick Start New Chat Protocol
|
||||
```bash
|
||||
# 1. Start new chat
|
||||
/model opusplan
|
||||
|
||||
# 2. Copy/paste CLAUDE.md contents
|
||||
|
||||
# 3. Say:
|
||||
"Continuing Rust learning. Read CLAUDE.md, then check CURRENT_STATE.md and provide Exercise [X] from Milestone [Y]"
|
||||
```
|
||||
|
||||
## Exercise Template (for Claude)
|
||||
```markdown
|
||||
## Exercise: [Name]
|
||||
**Concepts practiced:** [Specific Rust concepts]
|
||||
**Objective:** [What to build]
|
||||
**Requirements:**
|
||||
- [Specific feature 1]
|
||||
- [Specific feature 2]
|
||||
**Success criteria:** [How to verify it works]
|
||||
**Stretch goal:** [Optional extension]
|
||||
**Expected time:** [30-60min / 1-2hrs]
|
||||
```
|
||||
|
||||
## Milestone 4: Chapter 7 (Modules) - CURRENT TARGET
|
||||
|
||||
### Exercise 1: Multi-Module Note-Taking CLI ⏳
|
||||
**File:** `exercises/07-01-notes-cli/`
|
||||
**Status:** Not started
|
||||
**Concepts:** Module organization, pub/private boundaries
|
||||
**Estimated time:** 1-2 hours
|
||||
|
||||
### Exercise 2: Calculator Plugin System ⏳
|
||||
**File:** `exercises/07-02-calc-plugins/`
|
||||
**Status:** Not started
|
||||
**Concepts:** Selective imports, pub visibility
|
||||
**Estimated time:** 1-2 hours
|
||||
|
||||
### Exercise 3: Wallet Module Structure ⏳
|
||||
**File:** `exercises/07-03-wallet-modules/`
|
||||
**Status:** Not started
|
||||
**Concepts:** Real-world module organization (crypto domain)
|
||||
**Estimated time:** 1-2 hours
|
||||
**Crate:** ed25519_dalek
|
||||
|
||||
## Exercise Completion Process
|
||||
|
||||
### During Exercise
|
||||
1. Create branch: `git checkout -b exercise/[milestone]-[number]-[name]`
|
||||
2. Work in `exercises/[chapter]-[number]-[name]/` directory
|
||||
3. Commit frequently with descriptive messages
|
||||
4. Include `REFLECTION.md` with learning notes
|
||||
|
||||
### After Exercise
|
||||
1. Code review in separate chat
|
||||
2. Iterate based on feedback
|
||||
3. Update CURRENT_STATE.md
|
||||
4. Update PROGRESS.md
|
||||
5. Merge to main when complete
|
||||
6. Tag if milestone complete: `git tag v[milestone]-complete`
|
||||
|
||||
## Directory Structure
|
||||
```
|
||||
exercises/
|
||||
├── 07-01-notes-cli/
|
||||
│ ├── src/
|
||||
│ ├── Cargo.toml
|
||||
│ ├── README.md
|
||||
│ └── REFLECTION.md
|
||||
├── 07-02-calc-plugins/
|
||||
│ └── ...
|
||||
└── 07-03-wallet-modules/
|
||||
└── ...
|
||||
```
|
||||
224
MANUAL.md
Normal file
224
MANUAL.md
Normal file
@@ -0,0 +1,224 @@
|
||||
# How to Use Your Rust Learning System
|
||||
|
||||
## Quick Start (First Time)
|
||||
|
||||
1. **Initialize Git (if not done)**
|
||||
```bash
|
||||
cd /Users/real/Lab/now/rust/rust-tutor
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial learning scaffolding setup"
|
||||
```
|
||||
|
||||
2. **Start Your First Exercise**
|
||||
- Open `NEW_CHAT_TEMPLATE.md`
|
||||
- Copy the template
|
||||
- Start new Claude Code chat
|
||||
- Paste template and request your first exercise
|
||||
|
||||
## Daily Workflow
|
||||
|
||||
### 🎯 Getting a New Exercise
|
||||
|
||||
1. **Open new Claude Code chat**
|
||||
2. **Copy/paste from NEW_CHAT_TEMPLATE.md:**
|
||||
```
|
||||
/model opusplan
|
||||
|
||||
I'm continuing my Rust learning journey. Please read CLAUDE.md for your instructions, then check CURRENT_STATE.md and help with:
|
||||
|
||||
[X] Exercise delivery - Give me the next exercise
|
||||
```
|
||||
3. **Claude will:**
|
||||
- Read your current state
|
||||
- Give you the next appropriate exercise
|
||||
- Update CURRENT_STATE.md when done
|
||||
4. **Close the exercise chat** (it's served its purpose)
|
||||
|
||||
### 💻 Working on Exercise
|
||||
|
||||
1. **Create exercise branch:**
|
||||
```bash
|
||||
git checkout -b exercise/07-01-notes-cli
|
||||
```
|
||||
|
||||
2. **Create exercise directory:**
|
||||
```bash
|
||||
mkdir -p exercises/07-01-notes-cli
|
||||
cd exercises/07-01-notes-cli
|
||||
cargo init
|
||||
```
|
||||
|
||||
3. **Work and commit frequently:**
|
||||
```bash
|
||||
# Every 15-30 minutes or when something works
|
||||
git add .
|
||||
git commit -m "[Exercise 1] Add basic note struct"
|
||||
git commit -m "[Exercise 1] Implement add_note functionality"
|
||||
git commit -m "[Exercise 1] Add CLI argument parsing"
|
||||
```
|
||||
|
||||
4. **Create reflection when done:**
|
||||
```bash
|
||||
# In exercises/07-01-notes-cli/
|
||||
echo "# Reflection\n\n## What I learned\n- ...\n\n## What was hard\n- ...\n\n## Aha moments\n- ..." > REFLECTION.md
|
||||
```
|
||||
|
||||
### 📝 Getting Code Review
|
||||
|
||||
1. **Commit your final version:**
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "[Exercise 1] Complete notes CLI - ready for review"
|
||||
```
|
||||
|
||||
2. **Open new Claude Code chat for review**
|
||||
3. **Copy/paste from NEW_CHAT_TEMPLATE.md:**
|
||||
```
|
||||
/model opusplan
|
||||
|
||||
I'm continuing my Rust learning journey. Please read CLAUDE.md for your instructions, then check CURRENT_STATE.md and help with:
|
||||
|
||||
[X] Code review - Review my completed exercise code
|
||||
```
|
||||
|
||||
4. **Tell Claude:**
|
||||
```
|
||||
Please review my exercise in exercises/07-01-notes-cli/
|
||||
Focus on: correctness, Rust idioms, ownership/borrowing
|
||||
```
|
||||
|
||||
5. **Iterate based on feedback:**
|
||||
```bash
|
||||
# Make changes based on review
|
||||
git add .
|
||||
git commit -m "[Exercise 1] Fix: Use &str instead of String in function params"
|
||||
```
|
||||
|
||||
6. **Close review chat when satisfied**
|
||||
|
||||
### ✅ Completing Exercise
|
||||
|
||||
1. **Merge to main:**
|
||||
```bash
|
||||
git checkout main
|
||||
git merge exercise/07-01-notes-cli
|
||||
git branch -d exercise/07-01-notes-cli
|
||||
```
|
||||
|
||||
2. **Update progress manually:**
|
||||
- Edit PROGRESS.md to mark exercise complete
|
||||
- Edit CURRENT_STATE.md if needed
|
||||
|
||||
3. **Tag milestones (optional):**
|
||||
```bash
|
||||
# After completing all 3 exercises in a milestone
|
||||
git tag v07-modules-complete
|
||||
```
|
||||
|
||||
## File Structure During Exercise
|
||||
|
||||
```
|
||||
exercises/07-01-notes-cli/
|
||||
├── src/
|
||||
│ ├── main.rs
|
||||
│ └── lib.rs
|
||||
├── Cargo.toml
|
||||
├── README.md (exercise description)
|
||||
└── REFLECTION.md (your learnings)
|
||||
```
|
||||
|
||||
## When to Create New Chats
|
||||
|
||||
### ✅ Create New Chat For:
|
||||
- **Getting next exercise** (1 chat = 1 exercise delivery)
|
||||
- **Code review** (1 chat = review + iterations)
|
||||
- **Stuck/planning help** (when you need guidance)
|
||||
|
||||
### ❌ Don't Create New Chat For:
|
||||
- Quick Rust syntax questions (use docs/book)
|
||||
- Continuing work on same exercise
|
||||
- Just checking current state (read CURRENT_STATE.md)
|
||||
|
||||
## Git Commit Guidelines
|
||||
|
||||
### ✅ Good Commit Messages:
|
||||
```bash
|
||||
"[Exercise 1] Add basic note struct with title and content"
|
||||
"[Exercise 1] Implement CLI parsing with clap"
|
||||
"[Exercise 1] Fix: Handle empty input gracefully"
|
||||
"[Exercise 1] Refactor: Extract validation to separate module"
|
||||
"[Exercise 1] Complete - ready for review"
|
||||
```
|
||||
|
||||
### ❌ Avoid:
|
||||
```bash
|
||||
"work in progress"
|
||||
"fix stuff"
|
||||
"update"
|
||||
```
|
||||
|
||||
### 🔄 Commit Frequency:
|
||||
- Every 15-30 minutes when coding
|
||||
- When you get something working
|
||||
- Before switching approaches
|
||||
- Before asking for help
|
||||
- When ready for review
|
||||
|
||||
## File Maintenance
|
||||
|
||||
### Files You Update:
|
||||
- **PROGRESS.md** - Mark exercises complete, add reflections
|
||||
- **CURRENT_STATE.md** - Update if your learning state changes significantly
|
||||
|
||||
### Files Claude Updates:
|
||||
- **CURRENT_STATE.md** - After delivering exercises
|
||||
- **PROGRESS.md** - Sometimes adds context after milestones
|
||||
|
||||
### Files You Never Touch:
|
||||
- **CLAUDE.md** - Master instructions (unless system needs changes)
|
||||
- **EXERCISES.md** - Exercise templates and tracking
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "Claude can't read CLAUDE.md"
|
||||
- Use backup in NEW_CHAT_TEMPLATE.md
|
||||
- Copy/paste CLAUDE.md contents directly
|
||||
|
||||
### "I'm lost on where I am"
|
||||
- Read CURRENT_STATE.md
|
||||
- Read your latest commits: `git log --oneline -5`
|
||||
- Check your current branch: `git branch`
|
||||
|
||||
### "Exercise feels too hard"
|
||||
- Open planning chat
|
||||
- Ask for easier version or more hints
|
||||
- Remember: struggle 10-15min, then ask for help
|
||||
|
||||
### "I forgot concepts from previous exercises"
|
||||
- Normal! Spaced repetition will help
|
||||
- Quickly review old exercise code
|
||||
- Future exercises will reinforce concepts
|
||||
|
||||
## Success Patterns
|
||||
|
||||
### 🎯 Aim For:
|
||||
- 1-2 exercises per week
|
||||
- Regular commits (not just at the end)
|
||||
- Reflecting on learnings in REFLECTION.md
|
||||
- Moving forward even when code isn't perfect
|
||||
|
||||
### 🚀 You're On Track If:
|
||||
- Exercises take 1-3 hours each
|
||||
- You can explain your code choices
|
||||
- Compiler errors don't frustrate you as much
|
||||
- You're building things related to crypto/blockchain
|
||||
|
||||
### 🔄 Course Correct If:
|
||||
- Exercises take more than 4 hours
|
||||
- You're copying code without understanding
|
||||
- You're stuck on same concept for weeks
|
||||
- You stop committing regularly
|
||||
|
||||
---
|
||||
*This system is designed to get you shipping code. Trust the process!*
|
||||
27
NEW_CHAT_TEMPLATE.md
Normal file
27
NEW_CHAT_TEMPLATE.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# New Chat Startup Template
|
||||
|
||||
## Copy this exactly into new Claude Code chats:
|
||||
|
||||
```
|
||||
/model opusplan
|
||||
|
||||
I'm continuing my Rust learning journey. Please read CLAUDE.md for your instructions, then check CURRENT_STATE.md and help with:
|
||||
|
||||
[ ] Exercise delivery - Give me the next exercise
|
||||
[ ] Code review - Review my completed exercise code
|
||||
[ ] Planning help - Help adjust learning path or troubleshoot blocks
|
||||
```
|
||||
|
||||
## Backup (if Claude can't read files):
|
||||
If Claude says it can't read CLAUDE.md, then paste the contents. But try the simple version first!
|
||||
|
||||
## Quick Reference
|
||||
- **CLAUDE.md** - Complete assistant instructions
|
||||
- **CURRENT_STATE.md** - Where you are now, what's next
|
||||
- **PROGRESS.md** - Learning history and milestone tracking
|
||||
- **EXERCISES.md** - Exercise templates and completion process
|
||||
|
||||
## Chat Types
|
||||
- **Exercise Chat** - Get single focused exercise, complete it, close chat
|
||||
- **Review Chat** - Submit code for feedback, iterate, close chat
|
||||
- **Planning Chat** - When stuck or need curriculum adjustments
|
||||
64
PROGRESS.md
Normal file
64
PROGRESS.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# Learning Progress Log
|
||||
|
||||
## Setup Phase
|
||||
**Date:** 2026-01-12
|
||||
**Activity:** Created learning scaffolding and multi-chat system
|
||||
**Key Insight:** Need structured approach to maintain context across multiple Claude chats
|
||||
|
||||
## Book Progress
|
||||
- ✅ Chapters 1-3: Basics, Variables, Functions, Control Flow
|
||||
- ✅ Chapter 4: Ownership, Borrowing, Slices
|
||||
- ✅ Chapters 5-6: Structs, Enums, Pattern Matching
|
||||
- 🔄 Chapter 7: Modules (Starting now)
|
||||
- ⏳ Chapter 8: Collections
|
||||
- ⏳ Chapter 9: Error Handling
|
||||
|
||||
## Exercise Completion Log
|
||||
*Will be updated as exercises are completed*
|
||||
|
||||
### Milestone 1: Chapters 1-3 (Basics)
|
||||
- [ ] Temperature Converter CLI
|
||||
- [ ] FizzBuzz with Customization
|
||||
- [ ] Base58 Encoder/Decoder (crypto)
|
||||
|
||||
### Milestone 2: Chapter 4 (Ownership)
|
||||
- [ ] String Manipulator
|
||||
- [ ] Array Analyzer
|
||||
- [ ] Simple Hash Visualizer (crypto)
|
||||
|
||||
### Milestone 3: Chapters 5-6 (Structs/Enums)
|
||||
- [ ] Library Book System
|
||||
- [ ] Calculator with Result
|
||||
- [ ] Transaction Type Parser (crypto)
|
||||
|
||||
### Milestone 4: Chapter 7 (Modules) - CURRENT
|
||||
- [ ] Multi-Module Note-Taking CLI
|
||||
- [ ] Calculator Plugin System
|
||||
- [ ] Wallet Module Structure (crypto)
|
||||
|
||||
### Milestone 5: Chapters 8-9 (Collections, Error Handling)
|
||||
- [ ] Contact Manager (HashMap, Option, Result)
|
||||
- [ ] Log Parser (Vec, filtering, file handling)
|
||||
- [ ] Transaction Pool/Mempool (crypto)
|
||||
|
||||
### Milestone 6: Chapter 10 (Generics, Traits, Lifetimes)
|
||||
- [ ] Generic Cache
|
||||
- [ ] Comparable Trait
|
||||
- [ ] Generic Transaction Validator (crypto)
|
||||
|
||||
## Post-Book Projects
|
||||
### Simple Wallet Key Generator
|
||||
- [ ] Generate keypair
|
||||
- [ ] Save/load from file
|
||||
- [ ] Sign messages
|
||||
|
||||
### RPC Client
|
||||
- [ ] Query blockchain state
|
||||
- [ ] Display balances
|
||||
- [ ] Async HTTP, JSON parsing
|
||||
|
||||
## Reflections
|
||||
*Space for learning insights and "aha" moments*
|
||||
|
||||
---
|
||||
*This file tracks overall learning journey and milestone completion*
|
||||
Reference in New Issue
Block a user