Skip to content

feat: agent name aliases (Phase 1 of Agent Teams)#133

Open
LeoLin990405 wants to merge 2 commits intobfly123:mainfrom
LeoLin990405:feat/agent-name-aliases
Open

feat: agent name aliases (Phase 1 of Agent Teams)#133
LeoLin990405 wants to merge 2 commits intobfly123:mainfrom
LeoLin990405:feat/agent-name-aliases

Conversation

@LeoLin990405
Copy link
Contributor

Summary

Phase 1 of Agent Teams (#81): adds a/b/c/d shorthand aliases for providers.

  • lib/aliases.py — 3-layer alias config (hardcoded defaults < ~/.ccb/aliases.json < .ccb/aliases.json)
  • bin/ask — integrates alias resolution before parse_qualified_provider, supports colon-instance syntax
  • test/test_aliases.py — 22 tests all passing, including integration with parse_qualified_provider

Default Aliases

Alias Provider
a codex
b gemini
c claude
d opencode
e droid
f copilot
g codebuddy
h qwen

Usage

ask a "hello"          # → codex
ask b:review "hello"   # → gemini:review
ask kimi "hello"       # unchanged (non-aliases pass through)
ask --help             # shows alias table

Design Decisions

  • Zero daemon changes — alias resolution happens entirely in bin/ask client
  • Config hierarchy — project .ccb/aliases.json > global ~/.ccb/aliases.json > defaults
  • Backward compatible — non-aliases pass through unchanged
  • Works with multi-instanceask a:review resolves to codex:review, then parse_qualified_provider splits normally

Phased Roadmap

Phase Content Status
1 Agent aliases (this PR)
2 Team config + role definitions Planned
3 Task distribution + smart routing Planned
4 Inter-agent communication Planned

Closes #81 (Phase 1)

Test plan

  • pytest test/test_aliases.py -v — 22/22 passed
  • Regression tests — 48/48 passed (zero regressions)
  • Manual: ask a "hello" routes to codex
  • Manual: ask a:review "hello" routes to codex with instance
  • Manual: ask kimi "hello" unchanged behavior

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
@LeoLin990405 LeoLin990405 mentioned this pull request Mar 11, 2026
…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
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.

结合Agent Teams

1 participant