diff --git a/AGENTS.md b/AGENTS.md index 19692cdcbe5ce0a29b649934b1107d15202c9746..4fc6249eb0fb207a734b1d0b3957d70eb0b33381 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,9 +9,9 @@ - Contributions are through pr.pico.sh. If you're asked to open a PR or contribute or review a PR or similar and you have the skill, read that. If you don't have the skill, somehow fetch the contents of `https://git.secluded.site/agent-skills/blob/main/skills/collaborating-through-pr-pico-sh/SKILL.md?raw=1`. It's markdown, but served as raw plain text, so curl or any other UA will do fine. If you're not contributing/reviewing yet, don't read it yet. ## Essential commands -- Format: `make fmt` +- Format: `jj fix` (rustfmt via repo-level jj config) - Lint (warnings are errors): `cargo clippy --quiet -- -D warnings` -- Full local gate: `make ci` (runs fmt + check + test) +- Verify after changes: `make verify` (formats, typechecks, lints, and tests in one pass) ## Implementation details - Initialization requirement: most commands call `require_root()` and fail unless `.td/` exists somewhere in current dir ancestry (`db::find_root`). Only `init` and `skill` avoid this path. diff --git a/Makefile b/Makefile index b7536e170dc71fd98eec8d5161aa3c10f99f39db..82139128a17fc33d98f2401c346e685616b2e23e 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,14 @@ BINDIR := $(or $(XDG_BIN_HOME),$(XDG_BIN_DIR),$(HOME)/.local/bin) -.PHONY: all check test fmt clippy ci install +.PHONY: all check test fmt clippy verify install all: fmt check test -ci: fmt - @cargo check --quiet 2>&1 || true - @cargo clippy --quiet -- -D warnings 2>&1 || true - @cargo test --quiet 2>&1 | grep -E '(^test |^running|test result|FAILED|error)' +verify: + @jj fix + @out=$$(cargo check --quiet 2>&1) || { printf '%s\n' "$$out"; exit 1; }; echo '✓ check' + @out=$$(cargo clippy --quiet -- -D warnings 2>&1) || { printf '%s\n' "$$out"; exit 1; }; echo '✓ clippy' + @out=$$(cargo test --quiet 2>&1) || { printf '%s\n' "$$out"; exit 1; }; echo '✓ tests' check: @cargo check --quiet @@ -17,7 +18,7 @@ test: @cargo test --quiet fmt: - @cargo fmt + @jj fix clippy: @cargo clippy --quiet -- -D warnings