Imported from attunehq/t3threads (
AGENTS.md). Install upstream withnpx skills add attunehq/t3threads. Copyright stays with the author.
Agent instructions
Read CONTRIBUTING.md for setup, project layout, design notes, and release steps.
Commands
npm run checkruns the type checker, tests, and build. It must pass before you finish.npm run dev -- ARGSruns the CLI from source.npm pack && npm run test:packagetests the installed package. Run it when you change packaging,bin, postinstall, or startup.
Rules
- Define each command once in
src/cli.ts. incur exposes it to the CLI, MCP, and the Fetch API; do not add separate handlers. - Give read commands the
readOnlyMCP annotation and commands that change threads thewriteannotation. Commands that change state must callrequirePost. - Never open T3's database or change T3's credential files. Reach T3 only through its HTTP and WebSocket APIs.
- Send writes through
orchestration.dispatchCommandover WebSocket. The HTTP dispatch route skips T3's thread and worktree bootstrap. - Never print, log, or pass tokens in process arguments. Do not return raw errors from credential commands to callers.
- Persist a command ID before any durable dispatch, and reuse it on retry.
- Tests must not need accounts, a running T3, or model calls. Use the protocol
fixture in
test/fixture.tsfor T3 behavior. - When command behavior changes, update
README.md,skills/t3threads/SKILL.md, and the MCPinstructionsinsrc/cli.ts. - Keep
README.mdfor users: what t3threads does, why they want it, and how to use it. Put development details inCONTRIBUTING.md.