Metadata
| Status | abandoned ‖ paused |
|---|---|
| Created | 2026-04-26T12:52:50.010651414+00:00 |
Description
Description
Today wg init -x claude writes a partial config (sets [agent] model, leaves [tiers] empty). wg setup is interactive-only, hard to escape, and shows confusing labels. wg config reset doesn't exist. All four problems share one fix: a per-executor default-config registry that everything calls into.
Spec
-
defaults module (e.g.
src/config/defaults.rs):pub fn for_executor(executor: Executor) -> Configreturning a complete, working Config.- For claude: agent.model=claude:opus, tiers={fast=claude:haiku, standard=claude:sonnet, premium=claude:opus}, models.evaluator=claude:haiku, models.assigner=claude:haiku, coordinator.model=claude:sonnet (orchestration tier), no model_registry entries that aren't claude.
- For amplifier, codex, shell, nex: equivalent complete defaults appropriate to each.
- Unit-tested: every executor returns a Config that round-trips through TOML and has no empty required tables.
-
wg init -x uses defaults::for_executor() instead of hand-built partial config.
- Add
--dry-runflag that prints the would-be config and exits without writing. - On success, print a one-line summary: 'Wrote .wg/config.toml: executor=claude, model=claude:opus, tiers=haiku/sonnet/opus'.
- Add
-
wg setup rework:
- After provider/executor pick, show a diff-style preview: current config vs proposed defaults.
- Prompt: [a]ccept / [c]ustomize / [q]uit. Quit leaves existing config untouched.
- Add
--non-interactivemode with required--executorflag; uses defaults::for_executor() with no prompts. - Provider menu labels disambiguated: 'Anthropic API (direct, needs ANTHROPIC_API_KEY)' vs 'Claude Code CLI (uses local claude binary)' — and they map to different executor configs (or same executor with different auth).
- Print '(Ctrl-C to exit; nothing saved until final confirm)' at the top.
-
wg config reset (new command):
- Calls defaults::for_executor(current_executor_or_claude).
--keep-keyspreserves [[llm_endpoints.endpoints]] entries and api_key_file paths.--dry-runprints diff vs current.--yesskips confirmation.- Always writes timestamped backup config.toml.bak-YYYY-MM-DDTHHMMSS.
Validation
- Failing tests written first: test_default_config_claude_complete, test_default_config_amplifier_complete, test_init_dry_run_no_write, test_setup_non_interactive_writes_defaults, test_config_reset_keep_keys_preserves_endpoints, test_config_reset_creates_backup
- Implementation makes all tests pass
- cargo build + cargo test pass with no regressions
-
Manual smoke (in scratch dir):
wg init -x claudeproduces config with populated [tiers];wg setup --non-interactive --executor claudeworks without prompts;wg config reset --dry-runprints diff;wg setupinteractive shows escape hint and disambiguated provider labels
Depends on
- (none)
Required by
- (none)
Log
- 2026-04-26T12:52:50.010526600+00:00 Task paused
- 2026-04-26T13:00:39.501121104+00:00 Task abandoned