Skip to content

feat: auto abstraction budget estimation with webapp UI and batch analysis#1

Open
1zero224 wants to merge 4 commits into
mainfrom
feature/auto-budget-only
Open

feat: auto abstraction budget estimation with webapp UI and batch analysis#1
1zero224 wants to merge 4 commits into
mainfrom
feature/auto-budget-only

Conversation

@1zero224

Copy link
Copy Markdown
Owner

Summary

合并 feature/auto-mode-webappfeature/enhanced-deep-doc-generator 两个特性分支,带来自动抽象预算估算、Web UI 和批量分析能力:

Core Features

  • Auto abstraction budget: LLM 自动估算最佳抽象数量,替代人工指定 --max-abstractions
  • Webapp UI: 基于 Flask 的本地 Web 界面,支持目录选择和可视化配置 (webapp/)
  • Batch analysis: batch_analyze.py 支持批量分析多个仓库并输出分析报告(含 checkpoint 断点续跑)
  • Deep doc generator: 增强版文档生成器,含架构图、设计决策分析、FAQ 等(已合并去重)

Changes

  • nodes.py: 新增 _auto_abstraction_budget_prompt_compute_project_stats,auto 模式自动估算预算;MAX_AUTO_ABSTRACTIONS 12→30
  • main.py: 移除已废弃的 --deep 模式,输出切换为英文
  • utils/call_llm.py: 重构 LLM 调用(contextmanager、retry jitter、tempfile 支持、增强缓存)
  • utils/semantic_chunks.py: 改进语义分块策略
  • tests/: 新增 test_main_defaults.py, test_webapp_service.py,增强 test_semantic_chunks.py
  • docs/design.md: 同步更新架构文档

Cleanup

  • 移除 deep_flow.pydeep_nodes.py(功能已合并到主流程)
  • 进度条 Unicode→ASCII,消除终端兼容问题

Test plan

  • python main.py --repo <url> --max-abstractions-mode auto 验证自动预算估算
  • python main.py --repo <url> --max-abstractions-mode fixed --max-abstractions 5 验证固定模式
  • python webapp/server.py 启动 Web UI
  • python -m pytest tests/ 通过全部测试

Hermes Agent and others added 4 commits May 26, 2026 20:56
- Add DeepAnalysisNode: deep dive into each abstraction (design motivation, trade-offs, alternatives)
- Add DesignPatternNode: identify and analyze design patterns used in code
- Add ArchitectureOverviewNode: generate architecture overview with multiple Mermaid diagrams
- Add CodeWalkthroughNode: line-by-line code walkthrough for key files
- Add EnhancedWriteChaptersNode: generate 10x more detailed chapters
- Add TutorialSynthesisNode: final synthesis with quick start, FAQ, glossary
- Add DeepCombineTutorial: combine all deep analysis into final output
- Add --deep flag to main.py for enabling deep analysis mode
- Update README.md with deep analysis mode documentation

Pipeline:
FetchRepo → IdentifyAbstractions → DeepAnalysisNode → DesignPatternNode
→ ArchitectureOverviewNode → AnalyzeRelationships → OrderChapters
→ CodeWalkthroughNode → EnhancedWriteChaptersNode → TutorialSynthesisNode
→ DeepCombineTutorial
- Add 'auto' mode for --max-abstractions: LLM estimates optimal chapter count
  (clamped 3-12) based on project complexity rather than using a fixed cap
- Centralize configuration defaults into app_config.py
- Add Flask webapp for GUI-based tutorial generation
- Add terminal progress bar with per-node timing
- Add token usage summary after each run
- Refactor main.py shared state construction
…enerator

Integrate two parallel feature branches:
- feature/auto-mode-webapp: auto abstraction budget estimation, webapp UI,
  progress bar, token summary, centralized config (app_config.py)
- feature/enhanced-deep-doc-generator: deep analysis mode with
  DeepAnalysisNode, DesignPatternNode, ArchitectureOverviewNode,
  CodeWalkthroughNode, EnhancedWriteChaptersNode, TutorialSynthesisNode

Resolved conflicts in main.py (merged imports) and README.md (combined
usage docs for deep analysis and auto mode features).
…glish output

- Remove deprecated --deep flag and deep_flow.py/deep_nodes.py
- Switch progress bar/output from Chinese to ASCII/English
- Update README to reflect merged feature set
- Increase MAX_AUTO_ABSTRACTIONS from 12 to 30
- Auto budget prompt now includes project scale statistics
- Add batch_analyze.py + checkpoint.json for multi-repo analysis
- Add claw0 analysis documentation output
- Enhance call_llm with retry jitter, tempfile support, contextmanager
- Update tests for call_llm return signature change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant