tree-sitter and tree-sitter-python provide pre-built wheels for
Windows/Mac/Linux on Python 3.10-3.12, so no compiler needed.
AST engine is now always installed with base package.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Restructure deps: move llama-cpp-python/tree-sitter to optional
(base install is pure Python, no compiler needed)
- Add __main__.py for pipx/python -m support
- Add GitHub Actions auto-publish on tag push
- Fix install scripts: correct package name, remove Ollama check,
add pipx priority
- Wrap ast_engine imports in try/except for graceful degradation
- Published v1.0.7 to PyPI: pip install kwcode
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Gate _postprocess: expand OFFICE_FORMATS to include "ppt", "演示文稿", "汇报"
(was only matching ".pptx" and "ppt模板", missing common Chinese expressions)
2. Gate prompt: add PPT/幻灯片 examples + negative example (HTML展示≠office)
3. ChatExpert system prompt: add ops guidance — when user asks SSH/docker/nginx,
output command instructions with /bash hint instead of executing directly
Verified with qwen3:8b: 4/4 PPT cases now correctly route to office.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Findings:
- 2 serious: SSH/ops not routable (design gap), PPT misclassified (prompt gap)
- 3 acceptable: search boundary, difficulty boundary, hint quality
- Framework mechanisms all working correctly (auto_decompose 4/4, Gate 8/10)
- Issues are coverage/prompt gaps, not architecture bugs
Decision needed from user:
1. SSH: new ops expert_type vs extend ChatExpert?
2. PPT: add trigger words to Gate prompt (risk of over-triggering)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. TrajectoryCollector.get_by_expert() — method was missing, ab_tester
called it on expert graduation. Added to trajectory_collector.py.
2. auto_decompose integrated into _run_task() — hard tasks now auto-split
via Planner.auto_decompose() + _handle_multi_with_tasks() helper.
3. Pre-search (P1-B) wired into _run_task() — Gate needs_search=true
triggers QueryGenerator + ddg_search before orchestrator.run(),
results passed via pre_search_results parameter.
4. session_md.save_session() wired into REPL exit — SESSION.md now
written on vram_watcher.stop() with recent task summaries.
All 4 issues from WALKTHROUGH_REPORT.md resolved.
311 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixed: Planner._build_dag_from_hints() regex non-greedy \[.*?\] stopped
at first ] inside depends_on:[], causing all auto_decompose to fail.
Changed to greedy \[.*\] — verified with real qwen3:8b model.
Added WALKTHROUGH_REPORT.md documenting 10-scenario system test results:
- 4 issues found (1 bug fixed, 3 unwired features)
- All Gate/QueryGenerator/TokenTracking mechanisms verified working
- 8B model correctly outputs needs_search, subtask_hint, site: queries
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
QueryGenerator prompt upgraded:
- First query: LLM judges which site has best answer (arxiv/github/stackoverflow/etc)
- Remaining queries: broader without site restriction
- Zero new API, zero new dependency — just a prompt change
Also added:
- _clean_query() safety filter (blocks prompt injection attempts)
- 'realtime' intent for pre-search scenarios
- QueryGenerator accepts plain string (not just TaskContext) for flexibility
311 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summarizes 8 issues found in code review:
- 3 dead code (module exists but never called)
- 3 feature conflicts (parallel race, override missing)
- 2 data errors (placeholder never replaced)
Establishes 5 prevention rules:
1. New module → verify call chain (who instantiates, who calls)
2. Parallel feature → check shared mutable state
3. Placeholder → must have TODO comment
4. New feature → check interaction with all existing features
5. Review order: call chain → parallel safety → data truth → combinations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Issues fixed:
1. DebugSubagent now instantiated and injected into orchestrator (was dead code)
2. PromptOptimizer now triggered on expert graduation (was never called)
3. Reranker: already gracefully degrades, no change needed (documented)
4. Checkpoint race condition: skip_checkpoint=True in multi-task mode
5. Hard tasks: TaskPlanner already exists, needs CLI integration (next step)
6. force_plan_mode: now overridable (no_search flag disables it)
7. conversation_history: stores real LLM output instead of user_input
8. Multi-language AST: already correctly scoped to Python-only (no false claims)
Also: mock_run signature updated in test_task_compiler.py for skip_checkpoint param.
311 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows daily progress with version, date, and concise description
of what was optimized/implemented. Links to full CHANGELOG.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Changed guardrail behavior for .env/credentials.json/id_rsa etc:
- Before: write blocked entirely (too restrictive)
- After: auto-backup to .bak before overwrite (preserves original, allows write)
Matches Claude Code behavior: write proceeds but original is preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Dynamic retry budget (orchestrator.py):
- easy tasks: 2 retries (fast fail)
- hard tasks: 4 retries (more chances)
- Based on Turn-Control Strategies paper (arXiv:2510.16786)
2. TaskPlanner (core/task_planner.py):
- 1 LLM call to decompose complex tasks into DAG JSON
- Only triggers on hard + >30 char tasks (saves LLM calls)
- Fails gracefully to single-task execution
- Based on "Hidden Architectural Seam" research
3. Context pollution fix (orchestrator.py):
- Clear debug_info on each retry (ephemeral state)
- Prevents previous debug traces from polluting next attempt
- Based on CodeDelegator EPSS pattern (arXiv:2601.14914)
311 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
README:
- Update test count badge (311)
- Add Reviewer to project structure as 5th meta-expert
- Update flywheel/registry descriptions (SKILL.md not YAML)
- Rewrite contribution section (recommend fork + modify)
- List what's safe to change vs architecture-frozen parts
CHANGELOG:
- Add OpenAI-compatible API auto-detect to Added section
- Add LLMBackend api_key support to Changed
- Add Fixed section for /api/chat vs /v1/chat/completions bug
- Add "weak model + skill > strong model" to Architecture Decisions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
List all 11 papers with specific applications in KWCode,
plus 7 open source projects we drew inspiration from.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Debug Subagent (Debug2Fix paper), DAG TaskCompiler (LLMCompiler),
Prompt Optimizer (SICA), Reflexion persistence
- Remove all Ollama-specific mentions, generalize to "any OpenAI-compatible API"
- Add /multi command usage examples
- Update reference table with all 9 papers and their applications in KWCode
- Update project structure, test count (292), version badge
- Clean up tone, remove personal rant section
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three-layer China network support:
1. Model download: auto-detect HuggingFace connectivity, switch to
ModelScope when unreachable. MODELSCOPE_MODELS mapping added.
2. Search: DDG primary, auto-fallback to cn.bing.com HTML scraping
when DDG fails (SEARCH-RED-5 revised). Zero API keys.
3. Fetch: all httpx calls now support KAIWU_PROXY/HTTPS_PROXY env var
and ~/.kaiwu/config.yaml proxy field.
New module: kaiwu/core/network.py — unified network detection + proxy config.
CLI shows network status hint on startup when China network detected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>