| 1 | #!/bin/sh |
| 2 | # Keep retired compatibility names out of customer-facing TUI documentation |
| 3 | # and messages. Parser aliases and internal enum names intentionally remain. |
| 4 | set -eu |
| 5 | |
| 6 | repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) |
| 7 | cd "$repo_root" |
| 8 | |
| 9 | docs='docs/MODES.md docs/KEYBINDINGS.md docs/GUIDE.md docs/CONFIGURATION.md docs/FLEET.md' |
| 10 | if grep -En 'YOLO|Multitask|/mode yolo|--yolo|Bypass' $docs; then |
| 11 | printf '%s\n' 'retired TUI vocabulary remains in current product documentation' >&2 |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
| 15 | # Locale message identifiers are internal compatibility names and may still |
| 16 | # contain retired terms (for example `PermissionsPostureBypass`). Inspect only |
| 17 | # the serialized user-facing value so the check enforces the contract above |
| 18 | # without flagging an allowed key. |
| 19 | if grep -En '": "[^"]*(YOLO|Multitask|Bypass)' crates/localization/locales/*.json; then |
| 20 | printf '%s\n' 'retired TUI vocabulary remains in localized product copy' >&2 |
| 21 | exit 1 |
| 22 | fi |
| 23 | |
| 24 | # Founder decision 2026-09-01: `fleet` is the public product term for the |
| 25 | # assembled model team; `Pod` is retired from customer-facing copy. The |
| 26 | # English source locale is the gate; other locale packs migrate with their |
| 27 | # translation sweep. `/pod` and `codewhale pod` remain parser aliases. |
| 28 | if grep -En '": "[^"]*[Pp]od' crates/localization/locales/en.json; then |
| 29 | printf '%s\n' 'retired Pod vocabulary remains in English product copy' >&2 |
| 30 | exit 1 |
| 31 | fi |
| 32 | |
| 33 | if grep -En \ |
| 34 | 'YOLO mode is deprecated|/mode yolo|Bypass permissions|agent · yolo|Plan → Act → Multitask' \ |
| 35 | crates/tui/src/tui/app.rs \ |
| 36 | crates/tui/src/config.rs \ |
| 37 | crates/tui/src/commands/groups/config/config.rs \ |
| 38 | crates/tui/src/commands/groups/skills/restore.rs \ |
| 39 | crates/tui/src/prompts/text.rs; then |
| 40 | printf '%s\n' 'retired TUI vocabulary remains in current product messages' >&2 |
| 41 | exit 1 |
| 42 | fi |
| 43 | |
| 44 | if grep -Ein 'bypass approvals|Act \+ bypass' crates/tui/src/tui/ui.rs; then |
| 45 | printf '%s\n' 'retired permission wording remains in live Plan UI' >&2 |
| 46 | exit 1 |
| 47 | fi |
| 48 | |
| 49 | if grep -En 'mode-derived-yolo-bypass|YOLO derives bypass|settings\.default_mode:.*yolo' \ |
| 50 | crates/tui/src/tui/setup/mod.rs; then |
| 51 | printf '%s\n' 'retired permission wording remains in live Setup UI' >&2 |
| 52 | exit 1 |
| 53 | fi |
| 54 | |
| 55 | if grep -En 'Agent or Yolo|Plan/Agent/Yolo' \ |
| 56 | crates/tui/src/core/engine/tool_catalog.rs crates/tui/src/commands/groups/core/hooks.rs; then |
| 57 | printf '%s\n' 'retired mode wording remains in tool or hooks help' >&2 |
| 58 | exit 1 |
| 59 | fi |
| 60 |