| 1 | import type { DocsModesDict } from "../types"; |
| 2 | |
| 3 | /** |
| 4 | * English reference dictionary for `app/[locale]/docs/modes/page.tsx` |
| 5 | * ("Set modes and approvals"). Checked against docs/MODES.md (modes, |
| 6 | * postures, persistence), docs/INSTALL.md §10 (approval keys, Ask applies |
| 7 | * workspace edits), and docs/CONFIGURATION.md (`[approval]`). |
| 8 | */ |
| 9 | export const docsModes: DocsModesDict = { |
| 10 | metaTitle: "Set modes and approvals · Codewhale Docs", |
| 11 | metaDescription: |
| 12 | "Choose Plan, Work, or Operate for the kind of work, and Ask, Auto-Review, or Full Access for how often Codewhale stops to ask you.", |
| 13 | bodyClassName: "text-ink-soft leading-relaxed", |
| 14 | title: "Set modes and approvals", |
| 15 | lede: |
| 16 | "Two separate controls decide what Codewhale does on its own. The mode sets the kind of work — look, change, or coordinate. The approval setting decides when it stops to ask you. Change either one from the keyboard at any time between turns.", |
| 17 | sections: [ |
| 18 | { |
| 19 | id: "modes", |
| 20 | title: "Pick a mode", |
| 21 | blocks: [ |
| 22 | { |
| 23 | rows: [ |
| 24 | [ |
| 25 | "Plan", |
| 26 | "Look and plan only. Codewhale can read the workspace and research, but it cannot edit files or run shell commands. Use it to understand a codebase or agree on an approach first.", |
| 27 | ], |
| 28 | [ |
| 29 | "Work", |
| 30 | "Everyday coding. Codewhale reads, edits, and runs commands, within the approval setting you chose. This is the default.", |
| 31 | ], |
| 32 | [ |
| 33 | "Operate", |
| 34 | "Larger goals. Same permissions as Work, but Codewhale plans named steps, hands independent steps to sub-agents in parallel, and checks each result before it reports done.", |
| 35 | ], |
| 36 | ], |
| 37 | }, |
| 38 | { |
| 39 | p: "Press Tab with an empty composer to cycle Plan → Work → Operate, or type `/mode` to open the picker. You can also switch directly:", |
| 40 | }, |
| 41 | { code: "/mode plan\n/mode work\n/mode operate", lang: "Codewhale" }, |
| 42 | { |
| 43 | p: "The mode you pick becomes the mode your next session starts in. Codewhale refuses mode changes while a turn is running; press Esc to stop the turn first.", |
| 44 | }, |
| 45 | ], |
| 46 | }, |
| 47 | { |
| 48 | id: "approvals", |
| 49 | title: "Choose when it asks", |
| 50 | blocks: [ |
| 51 | { |
| 52 | p: "Press Shift+Tab to cycle Ask → Auto-Review → Full Access. Plan is always read-only, whatever you pick here.", |
| 53 | }, |
| 54 | { |
| 55 | rows: [ |
| 56 | [ |
| 57 | "Ask", |
| 58 | "The default. File edits inside the workspace are applied and shown to you as a diff. Shell commands and other consequential tools stop for your approval.", |
| 59 | ], |
| 60 | [ |
| 61 | "Auto-Review", |
| 62 | "Never stops to ask. Calls that are provably safe run. Publishing and destructive background actions are always blocked. Anything else gets one independent model review; high-risk calls and failed reviews are denied, not run.", |
| 63 | ], |
| 64 | [ |
| 65 | "Full Access", |
| 66 | "No approval prompts. Repository rules and managed policy still block what they block. Use it only in a workspace you trust.", |
| 67 | ], |
| 68 | ], |
| 69 | }, |
| 70 | { |
| 71 | note: "Ask applies workspace file edits without asking. Commit or stash anything you care about before you start, and use [Review what changed](/docs/review) to check or roll back edits.", |
| 72 | }, |
| 73 | ], |
| 74 | }, |
| 75 | { |
| 76 | id: "prompt", |
| 77 | title: "Answer an approval prompt", |
| 78 | blocks: [ |
| 79 | { |
| 80 | p: "When Codewhale stops at an approval, it shows the exact command. Answer with one key:", |
| 81 | }, |
| 82 | { |
| 83 | rows: [ |
| 84 | ["y", "Allow this call once."], |
| 85 | ["a", "Allow it for the rest of this session."], |
| 86 | ["n", "Deny it. Codewhale is told the call was refused."], |
| 87 | ["Esc", "Stop the whole turn."], |
| 88 | ], |
| 89 | codeTerms: true, |
| 90 | }, |
| 91 | { |
| 92 | p: "The highlighted option on a new prompt is Deny, so pressing Enter without reading refuses the call. To change that, or to deny prompts that wait too long, set it in `~/.codewhale/config.toml`:", |
| 93 | }, |
| 94 | { |
| 95 | code: `[approval] |
| 96 | default_selection = "allow_once" # default: "deny" |
| 97 | timeout_seconds = 300 # default: wait indefinitely`, |
| 98 | lang: "config.toml", |
| 99 | }, |
| 100 | ], |
| 101 | }, |
| 102 | ], |
| 103 | next: [ |
| 104 | { |
| 105 | href: "/docs/review", |
| 106 | label: "Review what changed", |
| 107 | note: "See the diff for a session and roll files back to an earlier turn.", |
| 108 | }, |
| 109 | { |
| 110 | href: "/docs/sandbox", |
| 111 | label: "Limit what commands can touch", |
| 112 | note: "An approval is not a sandbox. See what the operating system enforces on each platform.", |
| 113 | }, |
| 114 | { |
| 115 | href: "/docs/subagents", |
| 116 | label: "Run agents in parallel", |
| 117 | note: "What Operate does with independent steps, and how to watch it.", |
| 118 | }, |
| 119 | ], |
| 120 | sourceNote: "Source documents: docs/MODES.md, docs/INSTALL.md §10, docs/CONFIGURATION.md · Update docs-map.ts when changing.", |
| 121 | }; |
| 122 |