Setup, checks and layout, for working on this repo.
With mise installed:
git clone https://github.com/cniska/agent-record.git
cd agent-record
mise trust && mise installmise installinstalls actionlint, Node, the dependencies and Bun, which the source runs on, and thebun installits postinstall runs calls thepreparescript, which pointscore.hooksPathat.githooks/. Only in the clone, never in a worktree, does it linkagent-recordinto~/.bun/bin, so removing a worktree never leaves the command pointing at a deleted checkout. Add~/.bun/binto yourPATHif it is not there yet..worktree-hooks/setupsets up a task worktree the same way, without linking the CLI.bin/agent-recordruns Bun through mise from$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..githooks/holds the commit-subject, format and no-comments gates.- cniska-skills is one workflow to contribute with: the skills and hooks this repository is worked with.
bun run checkruns the lint (type-aware oxlint,oxfmt --checkand actionlint over.github/workflows/), the typecheck, knip (an export, file or dependency nothing uses) and the tests.bun run acceptanceproves the criteria inSPEC.mdthrough the CLI alone; each test inacceptance/is named for the criteria it proves, andsrc/spec.test.ts, in the check, fails when the tests and the criteria do not cite each other. Each test gets 20 seconds rather than Bun's default 5, since each syncs a fixture home and drives the CLI and git many times, and a loaded machine times that out at 5; the release criteria keep their own 60-second limit.scripts/build-compiled.sh <outfile>compiles the release: one executable, fromsrc/cli-release.ts, that runs with no Bun or checkout and prints its stamped version on--version.npm/agent-recordis 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/smoke.sh <executable> <version>is the release's smoke test: the executable prints the version, then, with its home, data, state and mirror folders all in a fresh scratch folder, runssyncand passesdoctorthere; the release runs it on each build and on each registry install.scripts/release.sh patch|minor|majorbumps the version and tags it;.github/workflows/release.ymlbuilds the tag into a GitHub release, the npm packages and a Homebrew bump, as Releasing says.bun run formatformats the TypeScript insrc/,acceptance/andscripts/with oxfmt, and the format gate runs it before each commit and stages what it changes in the staged files.bun run search-recallrebuilds the search recall fixture from the live record, assrc/query-recall.mddescribes..github/workflows/check.ymlruns the check and the acceptance suite on each push and pull request, andcommits.ymlandno-comments.ymlrun the gates.
- The Claude Code plugin lives in
plugin/, apart from the repository root, so the CLI'sbin/stays off thePATHClaude Code gives a plugin. src/README.mdmaps the modules and the boundaries between them.
AGENTS.md holds the repository's rules, and SPEC.md states what must hold.