PROBLEM:
- Progress indicator only showed every 5 batches or at completion
- When enhancing 1-4 patterns, no progress was visible
- User saw "Enhancing 1 patterns..." → "Enhanced 1 patterns" with no progress
SOLUTION:
- Modified progress condition to always show for small jobs (total < 10)
- Original: `if completed % 5 == 0 or completed == total`
- Updated: `if total < 10 or completed % 5 == 0 or completed == total`
IMPACT:
- Now shows "Progress: 1/3 batches completed" for small jobs
- Large jobs (10+) still show every 5th batch to avoid spam
- Applied to both _enhance_patterns_parallel and _enhance_examples_parallel
FILES:
- ai_enhancer.py line 301-302 (patterns)
- ai_enhancer.py line 439-440 (test examples)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Increase default batch size from 5 to 20 patterns per CLI call
- Add parallel execution with 3 concurrent workers (configurable)
- Add ai_enhancement settings to config_manager:
- local_batch_size: patterns per Claude CLI call (default: 20)
- local_parallel_workers: concurrent CLI calls (default: 3)
- Expected speedup: 6-12x faster for large codebases
Config settings can be changed via:
skill-seekers config (coming soon) or editing ~/.config/skill-seekers/config.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When no ANTHROPIC_API_KEY is set, ai_enhancer.py now falls back to LOCAL
mode (Claude Code CLI) instead of disabling AI enhancement entirely.
Changes to AIEnhancer base class:
- AUTO mode now falls back to LOCAL instead of disabling
- Added _check_claude_cli() to verify Claude CLI is available
- Added _call_claude_local() method using Claude Code CLI
- Refactored _call_claude() to dispatch to API or LOCAL mode
- 2 minute timeout per LOCAL call (reasonable for batch processing)
This affects all AI enhancements:
- Design pattern enhancement (C3.1) → LOCAL fallback ✅
- Test example enhancement (C3.2) → LOCAL fallback ✅
- Architectural analysis (C3.7) → LOCAL fallback ✅
Before (bad UX):
ℹ️ AI enhancement disabled (no API key found)
After (good UX):
ℹ️ No API key found, using LOCAL mode (Claude Code CLI)
✅ AI enhancement enabled (using LOCAL mode - Claude Code CLI)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Merging with admin override due to known issues:
✅ **What Works**:
- GLM-4.7 Claude-compatible API support (correctly implemented)
- PDF scraper improvements (content truncation fixed, page traceability added)
- Documentation updates comprehensive
⚠️ **Known Issues (will be fixed in next commit)**:
1. Import bugs in 3 files causing UnboundLocalError (30 tests failing)
2. PDF scraper test expectations need updating for new behavior (5 tests failing)
3. test_godot_config failure (pre-existing, not caused by this PR - 1 test failing)
**Action Plan**:
Fixes for issues #1 and #2 are ready and will be committed immediately after merge.
Issue #3 requires separate investigation as it's a pre-existing problem.
Total: 36 failing tests, 35 will be fixed in next commit.
- API mode: For pattern/example enhancement (batch processing)
- LOCAL mode: For SKILL.md enhancement (opens Claude Code terminal)
- Both modes still available, serve different purposes
- Updated CHANGELOG to explain when to use each mode