Imported from drgnxd/wtctl (
AGENTS.md). Install upstream withnpx skills add drgnxd/wtctl. Copyright stays with the author.
Repository Rules
wtctl is a single Rust binary that manages detached task worktrees. Keep it
small, standard-library first, and fail closed.
Build and test
- Keep Cargo output outside the checkout, for example
CARGO_TARGET_DIR="$XDG_CACHE_HOME/wtctl-target"; atarget/inside a task worktree is ignored data that keeps the worktree from being removed. nix developprovides cargo, rustc, clippy, rustfmt, git, and lsof.- Before committing, run:
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo clippy --all-targets --features test-agent-names -- -D warningscargo testandcargo test --features test-agent-namesnix flake checkandnix build
- The CLI tests in
tests/cli.rsneed thetest-agent-namesfeature, which letsWTCTL_AGENT_NAMESname the agent process. Never enable it in release builds or read that variable outside the feature gate.
Conventions
- Commits follow the Conventional Commits subject format in English; see
CONTRIBUTING.md. CI checks subject syntax. - This repository is public. Keep documentation, examples, and test fixtures consumer-neutral: use synthetic values and generic filenames; never copy a consumer repository's paths, filenames, labels, or data.
- Comments explain why, never what.
