Repository navigation
docs(skill): frame hook approvals as user consent, stop advocating --yes - #3146
Conversation
The worktrunk skill's "Hook Approvals in Non-Interactive Sessions" section presented `--yes` as a co-equal resolution to the approval prompt and described pre-approval as something the agent picks. A Snyk skill assessment read this as "CI/approval bypass options (--yes, pre-approved approvals) lower the barrier to silent execution." Reframe the section to lead with the security model: Worktrunk never runs project hooks or aliases until the user has explicitly approved them, and approvals are re-prompted when a command template changes. Drop the `--yes` resolution bullet and present `wt config approvals add` (user reviews and consents) as the recommended path; keep `--yes` documented only as a CI-pipeline escape hatch the agent must not reach for on the user's behalf. Regenerates the SKILL.md digest in the agent-skills index.json. Closes #3145 Co-Authored-By: Claude <[email protected]>
This per-developer Claude Code local settings file (bypassPermissions, skipDangerousModePermissionPrompt) was committed by mistake during triage and is unrelated to the docs change. Remove it and gitignore the path so it is not re-added. Co-Authored-By: Claude <[email protected]>
worktrunk-bot
left a comment
There was a problem hiding this comment.
The SKILL.md reframing addresses both asks in #3145 well: it leads with the security model (commands are user-approved, stored per-project, re-prompted on template change) and drops --yes as a co-equal resolution, demoting it to a CI/CD escape hatch. I verified the factual claims against source — approval is keyed on the command template (is_command_approved(project_id, &cmd.command.template) in src/commands/command_approval.rs, so a swapped command re-prompts), the ~/.config/worktrunk/approvals.toml path is correct, and --yes skips storage ("Only save approvals when interactively approved, not when using --yes"). The regenerated digest in index.json matches sha256sum skills/worktrunk/SKILL.md exactly, and the wording aligns with the "Project Commands Run Only After Approval" policy in CLAUDE.md.
One observation, not blocking: the .gitignore addition (.claude/settings.local.json) is unrelated to the Snyk skill assessment this PR addresses and isn't mentioned in the body — it could be reverted without affecting the skill change, so per the repo's atomic-PR convention it would more naturally belong in its own PR. Harmless either way.
|
CI: all required checks pass ($ |
worktrunk 0.61.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## Release Notes ### Improved - **`wt list` custom columns**: Each `[list.custom-columns.<Header>]` entry in user config adds a column to `wt list` (and the `wt switch` picker), rendered per row as a minijinja template over `branch`, `worktree_path`, `worktree_name`, and `vars.*`, with optional `width` and drop priority. Values expand from in-memory data only — no subprocess runs per cell — and a column that is empty on every row is dropped. `wt list --format=json` gains a `columns` map per item. The feature is experimental, so the config shape may still change. ([#3073](max-sixty/worktrunk#3073)) - **`--config-set` for inline config overrides**: A global, repeatable `--config-set <toml>` flag overrides any user-config key for a single invocation, layered above config files and `WORKTRUNK_*` env vars. The value is a real TOML fragment, so arrays and tables work natively (`wt --config-set list.full=true list`); nested tables deep-merge, and a malformed or invalid override drops the whole `--config-set` layer with an attributed warning rather than failing the command. ([#3138](max-sixty/worktrunk#3138)) - **Picker shows cached PR/MR numbers**: The `wt switch` picker skips the networked CI-status fetch, so it previously had no CI column. It now fills PR/MR numbers from the local `.git/wt/cache/ci-status/` cache populated by earlier `wt list --full` or statusline runs, with zero network access. A stale entry (TTL passed or branch head moved) keeps its number dimmed; expired entries without a number are dropped. ([#3073](max-sixty/worktrunk#3073)) - **Faster file copies on macOS**: After a reflink (`clonefile` on APFS, which already preserves mode bits), worktrunk now skips the redundant follow-up `chmod` on macOS, saving one syscall per file in `wt step copy-ignored` and every other copy path. Linux (btrfs/XFS) still sets permissions, since `FICLONE` clones data extents only and drops the execute bit. ([#3149](max-sixty/worktrunk#3149)) ### Internal - **Picker migrated to skim 4.8 (ratatui/crossterm)**: The `wt switch` picker moved off skim 0.20.5 (tuikit) to skim 4.8.0, dropping the vendored `vendor/skim-tuikit/` patch tree (both patches it carried are now native or upstream). Two cosmetic picker changes come with it: the match counter no longer overlaps the preview-tab header, and the HEAD column shows the full short-SHA. ([#3137](max-sixty/worktrunk#3137)) - **All command spawns route through one trace chokepoint**: `CommandTrace` is now the sole emitter of `[wt-trace]` command records, so a spawn path can't silently skip tracing — `git worktree add`, previously an unattributed gap, now shows up as a labeled slice in `wt-perf timeline`. ([#3134](max-sixty/worktrunk#3134)) ### Documentation - **Hook-approval skill guidance**: The bundled worktrunk skill now frames hook approvals as user consent and no longer advocates `--yes` to bypass prompts. ([#3146](max-sixty/worktrunk#3146)) ## Install worktrunk 0.61.0 ### Install prebuilt binaries via shell script ```sh curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-installer.sh | sh && wt config shell install ``` ### Install prebuilt binaries via powershell script ```sh powershell -ExecutionPolicy Bypass -c "irm https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-installer.ps1 | iex"; git-wt config shell install ``` ### Install prebuilt binaries via Homebrew ```sh brew install worktrunk && wt config shell install ``` ## Download worktrunk 0.61.0 | File | Platform | Checksum | |--------|----------|----------| | [worktrunk-aarch64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-aarch64-apple-darwin.tar.xz) | Apple Silicon macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-aarch64-apple-darwin.tar.xz.sha256) | | [worktrunk-x86_64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-x86_64-apple-darwin.tar.xz) | Intel macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-x86_64-apple-darwin.tar.xz.sha256) | | [worktrunk-x86_64-pc-windows-msvc.zip](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-x86_64-pc-windows-msvc.zip.sha256) | | [worktrunk-aarch64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-aarch64-unknown-linux-musl.tar.xz) | ARM64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-aarch64-unknown-linux-musl.tar.xz.sha256) | | [worktrunk-x86_64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-x86_64-unknown-linux-musl.tar.xz) | x64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.61.0/worktrunk-x86_64-unknown-linux-musl.tar.xz.sha256) | ### Install via Cargo ```sh cargo install worktrunk && wt config shell install ``` ### Install via Winget (Windows) ```sh winget install max-sixty.worktrunk && git-wt config shell install ``` ### Install via AUR (Arch Linux) ```sh paru worktrunk-bin && wt config shell install ``` </pre> <p>View the full release notes at <a href="https://github.com/max-sixty/worktrunk/releases/tag/v0.61.0">https://github.com/max-sixty/worktrunk/releases/tag/v0.61.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!12090
Problem
A Snyk skill assessment of the worktrunk skill flagged: "CI/approval bypass options (--yes, pre-approved approvals) lower the barrier to silent execution." The skill's "Hook Approvals in Non-Interactive Sessions" section presented
--yesas a co-equal resolution to the approval prompt and described pre-approval as a choice the agent makes, which reads as advocacy for bypassing the approval gate.This addresses #3145, which asks to (1) make clear that commands are pre-approved by the user and (2) stop advocating for
--yes.Solution
Reframe
skills/worktrunk/SKILL.md's hook-approvals section:CLAUDE.md.--yesresolution bullet.wt config approvals add— where the user reviews and consents to each command — is now presented as the path to recommend.--yesto a CI/CD-only escape hatch that an interactive agent must not reach for on the user's behalf. The quoted CLI error output is left intact (it faithfully reflects whatwtprints).The SKILL.md digest in
docs/static/.well-known/agent-skills/index.jsonis regenerated accordingly.Testing
cargo test --test integration test_docs_are_in_syncpasses (it regenerated the index digest, which is committed here).On the third ask — rerunning the Snyk assessment for a clean rating — that runs on skills.sh/Snyk and can't be triggered from CI. Once this merges, re-running the assessment against the updated skill is the way to confirm the rating improves.
Closes #3145 — automated triage