用途:wt-setup 只用于 wt 配置相关事务,包括首次设置、现有配置审计、安全编辑、提示词与工作区建议、profile 结构以及校验。它不负责启动工作、协调智能体、落地分支或清理工作树。
主要能力:先检查当前语法,可运行 wt init --help、wt config --help、wt config edit --help、wt config extract --help、wt config inline --help、wt profile create --help、wt doctor --help。对现有配置,可用 git rev-parse --git-common-dir 定位,并用 find 查找 .wt.toml、config.toml、profile.toml,再运行 wt config 与 wt doctor。wt config 是运行时行为的有效事实来源,文件保存用户意图与覆盖,wt config 展示合并层与内置默认值。
使用方式:新配置用 wt init,先以 --dry-run 预览;现有配置用 wt config、wt config edit、wt config extract 或 wt config inline,不要用 wt init 修复。归属选择:<git-common-dir>/wt/config.toml 为个人仓库配置,.wt.toml 为团队项目配置,<git-common-dir>/wt/profiles/<name>/profile.toml 为命名运行时 profile。新配置预设为 minimal、agent、issue、app,可指定 agent、issue provider、site provider 等。示例:wt init --preset agent --agent codex --dry-run --yes,然后 wt init --preset agent --agent codex --yes,最后 wt doctor。
适用场景:配置审计、提示词与工作区建议、profile 结构、工作流策略(pull_request 为 none/draft/ready,landing 为 manual/auto)、配置清理与校验。
限制:不启动任务、不协调智能体、不落地分支、不清理工作树。不要静默移动共享/私有归属,不要将成熟配置规范化为单一形态。修改 [workflow] 只影响之后准备的工作流,不重新解释已有工作流 TOML、运行中的智能体、评审状态、合并祖先、清理或 TaskRun 状态。省略 --profile 表示有效配置,不要臆造默认 profile。配置变更后运行 wt config 与 wt doctor 校验。