Setup, checks, scripts and rules, for working on this repo.
agent-task runs on Bun, which mise installs for it. With mise installed:
git clone https://github.com/cniska/agent-task.git
cd agent-task
mise trust && mise installmise installinstalls Bun, actionlint and the dependencies, and thebun installits postinstall runs calls thepreparescript, which pointscore.hooksPathat.githooks/. Only in the clone, never in a worktree, does it putagent-taskin~/.bun/binwithbun link, so removing a worktree never leaves the command pointing at a deleted checkout. Add~/.bun/binto yourPATHif it is not there yet.bin/agent-taskfinds Bun through mise in$MISE_DATA_DIR, or~/.local/share/misewhen that is unset, never throughXDG_DATA_HOME, so a test or command that pointsXDG_DATA_HOMEat a scratch directory still runs the CLI;scripts/source-launcher.test.ts, in the check, holds this. If you setXDG_DATA_HOMEfor your whole shell, setMISE_DATA_DIRto where mise keeps its installs..worktree-hooks/setupsets up a task worktree the same way, without linking the CLI..githooks/holds the commit-subject, format and no-comments gates, and runsbun run checkbefore each commit.
bun run checkruns lint, typecheck, knip and the tests. Lint is oxlint with type information,oxfmt --checkand actionlint over the workflows;bun run formatformats with oxfmt, and the format gate runs it before each commit.bun run acceptanceruns the acceptance suite. Each acceptance test gets 20 seconds rather than Bun's default 5, since one drives git and the CLI many times and under heavy load took longer than 5; the release criteria, which compile the binary, set their own 60.- No test asks a release channel:
src/test-env.tsand the acceptance harness setAGENT_TASK_NO_UPDATE_CHECK, the unit tests pass in a stand-in fetch, and AC-47 and AC-48 run over a state file checked that day. npm/agent-taskis the npm package's launcher, a POSIX shell scriptscripts/build-npm.tsfills with the release builds;scripts/launcher.test.ts, in the check, runs it over the layoutsnpmandbuninstall, with no runtime onPATH.
scripts/build-compiled.sh <outfile> [<target>]compiles the CLI into one executable that needs no Bun, for this machine or for the target given,darwin-arm64orlinux-x64.scripts/smoke.sh <executable> <version>is the release's smoke test: the executable prints the version, runsstart,listanddoneon a made-up brief in a scratch repository and passesdoctorthere.scripts/build-release.shbuilds one target's release files intodist/: it compiles the targetTARGETnames, runs the smoke on it, and writes its tarball and.sha256. It refuses an unsetTARGET, and a machine of another platform.scripts/build-npm.ts <release files> <out>builds the three npm packages from the release's tarballs.
ship.toml names scripts/build-release.sh and scripts/build-npm.ts as the build commands agent-ship's release workflow runs. Its assemble copies install.sh and writes SHA256SUMS.txt once every target is built, as Releasing says.
AGENTS.md holds the rules every change follows, SPEC.md states what must hold, and src/README.md maps the modules.