feat: task distribution + smart routing (Phase 3 of Agent Teams)#135
Open
LeoLin990405 wants to merge 3 commits intobfly123:mainfrom
Open
feat: task distribution + smart routing (Phase 3 of Agent Teams)#135LeoLin990405 wants to merge 3 commits intobfly123:mainfrom
LeoLin990405 wants to merge 3 commits intobfly123:mainfrom
Conversation
Add a/b/c/d... shorthand aliases for providers so users can type `ask a "hello"` instead of `ask codex "hello"`. - New lib/aliases.py: 3-layer config (defaults < ~/.ccb/ < .ccb/) - Updated bin/ask: alias resolution before parse_qualified_provider - New test/test_aliases.py: 22 tests covering all paths Relates to bfly123#81
…ly123#81) Add team configuration system allowing named agents with provider, model, role, and skills. Team agent names override aliases. - New lib/team_config.py: team config loading from .ccb/team.json - Updated bin/ask: team agent resolution (priority over aliases) - New test/test_team_config.py: 38 tests covering all paths Example .ccb/team.json: { "name": "dev-team", "strategy": "skill_based", "agents": [ {"name": "researcher", "provider": "gemini", "model": "3f", "role": "research"}, {"name": "coder", "provider": "codex", "model": "o3", "role": "implementation"} ] } Usage: ask researcher "hello" → routes to gemini Relates to bfly123#81
…fly123#81) Add smart task routing that auto-selects the best provider based on message content analysis using keyword matching and team skill matching. - New lib/task_router.py: keyword rules, team skill matching, auto_route - Updated bin/ask: --auto flag for automatic provider selection - New test/test_task_router.py: 46 tests covering all routing paths Usage: ask --auto "帮我写一个 React 前端组件" → gemini (keywords: react, 前端) ask --auto "分析算法复杂度" → codex (keywords: 算法, 复杂度) ask --auto "翻译这段话" → kimi (keywords: 翻译) With team config, team skill matching takes priority over keywords. Relates to bfly123#81
This was referenced Mar 11, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 概述
Phase 3 of Agent Teams (#81): 添加智能任务路由,根据消息内容自动选择最佳 provider。
Adds smart task routing that auto-selects the best provider based on message content.
新文件 / New Files
lib/task_router.py(210 行) — 关键词匹配、team 技能匹配、统一路由入口test/test_task_router.py(278 行) — 46 个测试覆盖所有路由路径修改 / Modified
bin/ask— 新增--auto标志,重构参数解析以支持自动模式使用方式 / Usage
路由规则 / Routing Rules
关键词 → Provider 映射 / Keyword → Provider mapping:
路由优先级 / Resolution order:
设计要点 / Design
route_by_keywords()接受自定义 rules 和 fallbackbin/ask客户端完成阶段路线图 / Phased Roadmap
Relates to #81
测试计划 / Test plan
pytest test/test_task_router.py -v— 46/46 passedpytest test/test_team_config.py -v— 38/38 passedpytest test/test_aliases.py -v— 22/22 passedask --auto "React 前端"→ geminiask --auto "算法分析"→ codexask --auto "翻译"→ kimi