Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Instructions for Claude when editing `aitm` source. Not for end users.
| ci.yml job | Steps | Why |
| --- | --- | --- |
| `bun` | install, lint, madge circular, typecheck, typecheck:tests | no `bun test` — oven-sh/bun#5090; `typecheck:tests` also covers `packages/aitm/test/`, so integration-file type drift fails CI |
| `node` | npm install, `build (compat runtime)` (`npm run build -w @developerz.ai/ai-claude-compat`), lint, `typecheck --workspaces`, `test:node --workspaces` | per-workspace npm — never shells out to bun |
| `integration` | npm install, `build (compat runtime)` (`npm run build -w @developerz.ai/ai-claude-compat`), `test:integration -w @developerz.ai/aitm` | 20-min budget; `e2e-smoke` self-skips without secrets |
| `node` | `bun install --frozen-lockfile`, `build (compat runtime)` (`npm run build -w @developerz.ai/ai-claude-compat`), lint, `typecheck --workspaces`, `test:node --workspaces` | per-workspace npm scripts; only the install uses bun, from the tracked lockfile |
| `integration` | `bun install --frozen-lockfile`, `build (compat runtime)` (`npm run build -w @developerz.ai/ai-claude-compat`), `test:integration -w @developerz.ai/aitm` | 20-min budget; `e2e-smoke` self-skips without secrets |

`release.yml` publishes via npm OIDC trusted publishing (no NPM_TOKEN), npm pinned 11.5.2 (11.6.x regressed provenance), builds then publishes **ai-claude-compat first**, then aitm.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The package is scoped (`@developerz.ai/aitm`); the installed command is still `a
Installed with bun or npm, `aitm` runs on Node, so Node ≥ 20 must be on your `PATH` even when bun
did the install. Installed with deno, it runs on Deno ≥ 2.0.

Plain ESM + a `bun build --compile` single-file binary. No runtime lock-in.
Plain ESM, published to npm. No runtime lock-in.

## 🚀 Quickstart

Expand Down
2 changes: 1 addition & 1 deletion packages/aitm/docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Architecture

`aitm` — TypeScript rewrite of `claude-task-master`. Bun for local dev; ships portable ESM that runs on Bun, Node ≥ 20, and Deno ≥ 1.40. Autonomous loop: plan a goal into **PR-sized task groups**, work each group on its own branch, open a PR, **auto-merge** (default on), repeat until done. No final verification phase. No release phase.
`aitm` — TypeScript rewrite of `claude-task-master`. Bun for local dev; ships portable ESM that runs on Node ≥ 20 and Deno ≥ 2.0. Autonomous loop: plan a goal into **PR-sized task groups**, work each group on its own branch, open a PR, **auto-merge** (default on), repeat until done. No final verification phase. No release phase.

Two commands only: `aitm start "<goal>"` and `aitm merge-pr`. With automerge on, `start` runs everything end-to-end; `merge-pr` is the manual gate for `--no-automerge` runs.

Expand Down
11 changes: 5 additions & 6 deletions packages/aitm/docs/runtime.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Runtime

Bun is the local dev runtime. Shipped code runs unchanged on **Bun ≥ 1.1, Node ≥ 20, or Deno ≥ 1.40**. Runtime portability is a hard constraint — treat Bun-only API leaks as bugs.
Bun is the local dev runtime. Shipped code runs on **Node ≥ 20** or **Deno ≥ 2.0**; a recent Bun also runs it (`bun --bun aitm`), Bun 1.1 does not. Installed with bun or npm, the `aitm` command itself runs on Node. Runtime portability is a hard constraint — treat Bun-only API leaks as bugs.

## Why Bun for dev

Expand All @@ -9,7 +9,6 @@ Bun is the local dev runtime. Shipped code runs unchanged on **Bun ≥ 1.1, Node
| Native TypeScript | No build step. `bun run src/cli.ts`. |
| Fast cold start | Tight feedback loop. |
| Built-in test runner | `bun test` works out of the box. |
| `bun build --compile` | Single-file binary for distribution. |

Bun is a convenience, not a dependency.

Expand Down Expand Up @@ -57,8 +56,8 @@ CI-fix flow, which always rebases first). Self-merge is governed separately by `
| --- | --- |
| Package manager (dev) | `bun install` |
| Package manager (consumer) | any — `npm`, `pnpm`, `yarn`, `bun` |
| Lockfile | `bun.lockb` committed for dev reproducibility |
| Distribution | Plain ESM published to npm, plus a `bun build --compile` binary attached to GitHub releases |
| Lockfile | `bun.lock` committed; every CI job installs with `bun install --frozen-lockfile` |
Comment thread
developerz-ai[bot] marked this conversation as resolved.
Resolved
| Distribution | Plain ESM published to npm (`@developerz.ai/aitm`). No compiled binary is built, and releases carry no assets. |
| Module system | ESM only. `"type": "module"`. |

## TypeScript
Expand All @@ -75,8 +74,8 @@ CI-fix flow, which always rebases first). Self-merge is governed separately by `

## Testing

- `bun test` locally for speed.
- CI matrix runs the same suite under `bun test` and `node --test` (or `vitest run` with a Node target). Both must pass.
- `bun run test` locally for speed (it sets `AITM_INSTANT_SLEEP=1`, which the timeout-based tests need).
- CI runs the suite under `node --test` only: the `node` and `integration` jobs are authoritative, and CI deliberately runs no `bun test` (Bun's `node:test` shim mis-handles this suite across files, oven-sh/bun#5090). `bin/check` runs the same steps locally.
- Integration tests spin up a throwaway git repo in a tempdir and use a sandboxed `gh` token scoped to a disposable fixture repo.
- Every module has a paired `*.test.ts`. SRP + tested is the bar.

Expand Down
21 changes: 21 additions & 0 deletions packages/aitm/src/cli/help.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import assert from 'node:assert/strict';
import { existsSync } from 'node:fs';
import { readFile } from 'node:fs/promises';
import { test } from 'node:test';
import { PRESET_NAMES } from '../config/provider-presets.ts';
Expand Down Expand Up @@ -79,6 +80,26 @@ test('help: every declared flag token appears in the rendered help', () => {
}
});

// The help text is read by someone who installed the package, which ships no docs directory, so a
// bare `docs/…` path points at nothing. Every pointer is a repository URL, and the path it names must
// still exist in this tree, so moving the docs fails here instead of leaving the help pointing at a 404.
test('help: points at docs a reader can reach, and that still exist', () => {
assert.doesNotMatch(
HELP_TEXT,
/(?<![\w/.-])docs\/[\w./-]+/,
'help names a repo-relative docs path',
);
const prefix = 'https://github.com/developerz-ai/ai-task-master/tree/main/';
const urls = [...HELP_TEXT.matchAll(/https:\/\/\S+/g)].map((m) => m[0]);
assert.ok(urls.length > 0, 'help names no docs URL');
const repoRoot = new URL('../../../../', import.meta.url);
for (const url of urls) {
assert.ok(url.startsWith(prefix), `help URL is not on this repository's main tree: ${url}`);
const local = new URL(url.slice(prefix.length), repoRoot);
assert.ok(existsSync(local), `help URL names a path that does not exist in the tree: ${url}`);
}
});

test('help: has the expected top-level structure', () => {
assert.ok(HELP_TEXT.startsWith('aitm — autonomous task orchestrator'));
assert.match(HELP_TEXT, /\nUsage:\n/);
Expand Down
2 changes: 1 addition & 1 deletion packages/aitm/src/cli/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Exit codes:
1 precondition failure or run blocked
2 cancelled, or invalid/malformed command-line usage

Docs: docs/commands/start.md, docs/commands/merge-pr.md, docs/commands/config.md, docs/commands/profile.md`;
Docs: https://github.com/developerz-ai/ai-task-master/tree/main/packages/aitm/docs/commands`;
}

export const HELP_TEXT = renderHelp();