diff --git a/.claude/commands/veet-add-tests.md b/.claude/commands/veet-add-tests.md index d546e7a..09c04b5 100644 --- a/.claude/commands/veet-add-tests.md +++ b/.claude/commands/veet-add-tests.md @@ -11,9 +11,15 @@ Add additional test cases to an existing problem to make it more challenging or ## Problem Problem name: $ARGUMENTS (if empty, ask which problem) +## Find the problem +First, find the veetcode problems directory: +```bash +VEET_DIR=$(veet problems-dir 2>/dev/null || echo "$HOME/.veetcode/problems") +``` + ## Process -1. Read the existing solution.py and tests.py for the problem +1. Read the existing solution.py and tests.py from $VEET_DIR/*/{problem-name}/ 2. Analyze what edge cases are NOT covered 3. Ask the user what kind of tests they want: - Edge cases (empty, single element, boundaries) diff --git a/.claude/commands/veet-explain.md b/.claude/commands/veet-explain.md index a2bac6e..4a60d58 100644 --- a/.claude/commands/veet-explain.md +++ b/.claude/commands/veet-explain.md @@ -10,9 +10,15 @@ After the user has solved a problem (or given up), explain the optimal solution ## Problem Problem name: $ARGUMENTS (if empty, ask which problem) +## Find the problem +First, find the veetcode problems directory: +```bash +VEET_DIR=$(veet problems-dir 2>/dev/null || echo "$HOME/.veetcode/problems") +``` + ## Process -1. Read their solution.py to see their implementation +1. Read their solution.py from $VEET_DIR/*/{problem-name}/ to see their implementation 2. Provide explanation covering: ### For a CORRECT solution: diff --git a/.claude/commands/veet-generate.md b/.claude/commands/veet-generate.md index 4bd58ea..70e2059 100644 --- a/.claude/commands/veet-generate.md +++ b/.claude/commands/veet-generate.md @@ -31,10 +31,14 @@ Before writing any files, mentally design: - Edge cases ### Step 3: Create Directory +First, find the veetcode problems directory: ```bash -mkdir -p problems/{difficulty}/{problem-name} +VEET_DIR=$(veet problems-dir 2>/dev/null || echo "$HOME/.veetcode/problems") +mkdir -p "$VEET_DIR/{difficulty}/{problem-name}" ``` +All file operations should use `$VEET_DIR/{difficulty}/{problem-name}/` as the base path. + ### Step 4: Write solution.py (SKELETON ONLY) Write ONLY the skeleton - never include the solution! @@ -119,7 +123,7 @@ class TestEdgeCases: You MUST verify the tests are solvable before telling the user. Run this verification using inline Python - DO NOT write the solution to any file: ```bash -cd problems/{difficulty}/{problem-name} && python -c " +cd "$VEET_DIR/{difficulty}/{problem-name}" && python -c " import sys from types import ModuleType @@ -155,9 +159,9 @@ Only after verification passes, tell the user: ``` ✅ Problem created and verified! -📁 Location: problems/{difficulty}/{problem-name}/ -📝 Edit: solution.py -🚀 Run: uv run veetcode → select "{problem-name}" +📁 Location: $VEET_DIR/{difficulty}/{problem-name}/ +📝 Open: veet open {problem-name} +🚀 Run: veet → select "{problem-name}" Good luck! ``` diff --git a/.claude/commands/veet-hint.md b/.claude/commands/veet-hint.md index 5acfcfd..4be804b 100644 --- a/.claude/commands/veet-hint.md +++ b/.claude/commands/veet-hint.md @@ -38,5 +38,10 @@ Problem name: $ARGUMENTS (if empty, ask which problem they need help with) - Ask if they want more specific hints after each level - Encourage them to try implementing after each hint -## Read the problem first -Read: problems/*/$ARGUMENTS/solution.py (find the matching problem directory) +## Find the problem +First, find the veetcode problems directory: +```bash +VEET_DIR=$(veet problems-dir 2>/dev/null || echo "$HOME/.veetcode/problems") +``` + +Then read: $VEET_DIR/*/$ARGUMENTS/solution.py (find the matching problem directory)