Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7b95ad6
feat: rewrite cali as qa v2
thymikee Mar 26, 2026
51c4100
refactor: slim down cali cli surface
thymikee Mar 26, 2026
78e1fbe
chore: remove dead cali code
thymikee Mar 26, 2026
dd66766
refactor: centralize cali model resolution
thymikee Mar 26, 2026
57d308d
refactor: align cali gateway usage with ai sdk
thymikee Mar 26, 2026
7a807e4
chore: format cali sources
thymikee Mar 26, 2026
f6e13be
feat: discover project-installed skills by default
thymikee Mar 26, 2026
7e6ec39
chore: keep a single default skills path
thymikee Mar 30, 2026
f4ab491
feat: discover home directory skills
thymikee Mar 30, 2026
0d8ade5
fix: pass device selectors during bootstrap
thymikee Mar 30, 2026
2aebaee
fix: harden cali qa reporting
thymikee Mar 30, 2026
01fed4a
chore: update model to mini
thymikee Mar 30, 2026
7a152a4
fix: clarify qa docs and report timing
thymikee Mar 31, 2026
fded935
docs: simplify qa example
thymikee Mar 31, 2026
08b91e0
feat: stream qa agent progress
thymikee Apr 7, 2026
e6fb561
feat: add github actions qa preset
thymikee Apr 7, 2026
597be80
chore: add cali qa helper scripts
thymikee Apr 7, 2026
d75fb3d
refactor: unify cali env and context loading
thymikee Apr 7, 2026
b5b6005
feat: expand cali role platform
thymikee Apr 7, 2026
0a66601
chore: update bun lock
thymikee Apr 7, 2026
c6688f6
chore: trim tools package and remove mcp server
thymikee Apr 7, 2026
b26a8bc
feat: polish cali qa ship readiness
thymikee Apr 7, 2026
3c24bbb
fix: tighten cali qa runtime polish
thymikee Apr 8, 2026
8343299
chore: release v0.4.0-0
thymikee Apr 8, 2026
0b86b61
fix: avoid device selector on session-bound open
thymikee Apr 8, 2026
dec275d
chore: release v0.4.0-1
thymikee Apr 8, 2026
ee211d0
feat: add cali ci helpers and safe reports
thymikee Apr 8, 2026
6a0a570
refactor: simplify cali ci helpers
thymikee Apr 8, 2026
66bd005
chore: release v0.4.0-2
thymikee Apr 8, 2026
eb0f29e
fix: normalize cali screenshot paths
thymikee Apr 9, 2026
e5a3edd
chore: release v0.4.0-3
thymikee Apr 9, 2026
d7b1a44
feat: make cali qa CI-native
thymikee Apr 10, 2026
4672aff
chore: drop cali github publish command
thymikee Apr 10, 2026
3b318df
docs: clarify github actions gh usage
thymikee Apr 10, 2026
1008677
refactor: shrink cali export-ci outputs
thymikee Apr 10, 2026
1165743
refactor: generalize cali export-ci contract
thymikee Apr 10, 2026
4e7859e
refactor: fold cali ci rendering into export-ci
thymikee Apr 10, 2026
1154f12
refactor: trim redundant cali outputs and aliases
thymikee Apr 10, 2026
93aaa2e
fix: harden cali repo and ci boundaries
thymikee Apr 10, 2026
4445afe
chore: release v0.4.0-4
thymikee Apr 10, 2026
3b041f2
refactor: drop legacy qa ci envs
thymikee Apr 10, 2026
b415520
refactor: simplify cali local and ci modes
thymikee Apr 10, 2026
ef46ccf
docs: align cali local and ci docs
thymikee Apr 10, 2026
d268f2e
feat: auto-install required cali skills
thymikee Apr 10, 2026
f87f622
fix: stabilize qa screenshot evidence
thymikee Apr 11, 2026
a89e9e6
fix: orient ci screenshot table by focus
thymikee Apr 11, 2026
feb0506
chore: release v0.4.0-6
thymikee Apr 11, 2026
0037a2c
fix: avoid duplicate screenshot labels
thymikee Apr 12, 2026
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
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
es6: true,
node: true,
},
ignorePatterns: ['dist/**', 'packages/*/dist/**'],
plugins: ['import', 'simple-import-sort'],
extends: ['eslint:recommended'],
parserOptions: {
Expand Down
219 changes: 219 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
# AGENTS.md

Minimal operating guide for AI coding agents in this repo.

## First 60 Seconds

- Classify the task:
- Info-only: do not edit code or run checks unless needed.
- Code change: make the smallest scoped edit and run the lightest relevant validation.
- Read at most 4 files first:
- the owning command module
- one role module
- one shared runtime file
- one relevant doc file if the CLI or context contract changes
- Define concrete success criteria before editing.
- Prefer the shared runtime contracts over command-local improvisation.

## Repo Shape

- `packages/cali`: standalone CLI role platform
- `packages/tools`: reusable Cali tools for other runtimes

## Cali Runtime Shape

The `cali` package is now a small role platform.

- CLI entry:
- `packages/cali/src/cli.ts`
- `packages/cali/src/cli/app.ts`
- `packages/cali/src/cli/*.ts`
- Command orchestration:
- `packages/cali/src/commands/*.ts`
- Shared runtime:
- `packages/cali/src/runtime/types.ts`
- `packages/cali/src/runtime/context.ts`
- `packages/cali/src/runtime/tool-packs.ts`
- `packages/cali/src/runtime/tool-loop-role.ts`
- `packages/cali/src/runtime/publishers.ts`
- `packages/cali/src/runtime/mobile.ts`
- Config:
- `packages/cali/src/config/schema.ts`
- `packages/cali/src/config/load.ts`
- Roles:
- `packages/cali/src/roles/*.ts`
- Tool packs:
- `packages/cali/src/tools/*.ts`
- Reports:
- `packages/cali/src/report/types.ts`
- `packages/cali/src/report/render.ts`
- `packages/cali/src/report/publishers/*.ts`

## Public Commands

Implemented first-class commands:

- `qa`
- `review`
- `perf-review`
- `dev`

Current maturity:

- `qa`: ship-ready
- `review`: experimental
- `perf-review`: experimental
- `dev`: experimental

`publish` is intentionally not implemented. Release automation belongs in CI or in `dev`-driven pipeline work, not as an open-ended agent command.

## Core Contracts

### Local Mode

Use `--local android|ios` for local mobile runs.

CI metadata is detected automatically in GitHub Actions and EAS. Use `--ci github-actions|eas` only when you need to override detection.

### Context

All commands use one shared `cali-context.json` contract.

Keep the shared context focused on:

- `workspaceRoot`
- `repository`
- `task`
- `pullRequest`
- `mobile`
- `build`
- `output`
- role-specific optional sections:
- `qa`
- `review`
- `perfReview`
- `dev`

If a new workflow needs more data, extend the shared context schema in `packages/cali/src/runtime/context.ts` instead of adding a new workflow-specific loader.

### Tool Packs

Built-in pack ids:

- `skills`
- `agent-device`
- `repo-read`
- `repo-write`
- `react-devtools`

Required skill guidance should be preloaded through the tool-pack registry when a pack depends on a skill workflow. Do not push that responsibility into individual prompts by hand.

Required role skills are Cali-managed:

- Cali auto-installs missing required skills into `~/.cali/skills`
- if that is unavailable, Cali falls back to `./.cali/skills`
- local CLIs are still user-managed; do not blur skill bootstrap with CLI installation

## Command Guidance

### `qa`

- Bootstrap stays outside the role in the command module.
- The role inspects the app and writes a structured QA report.
- Use `--local android|ios` for local runs.
- In GitHub Actions and EAS, CI provider detection is automatic; `--ci` is only an override.
- Requires `agent-device` on `PATH`.
- Mobile runs use a unique per-run `agent-device` session. Do not reuse ambient sessions.
- Local runs are convenience-first: try `open --relaunch` before reinstalling.
- Local mobile runs can infer the app id from the artifact. Do not require `--app-id` unless inference fails.
- If `--device` is omitted, reuse the single booted local target when exactly one exists; otherwise fail clearly.
- Acceptance criteria resolve in this order:
- `context.qa.acceptanceCriteria`
- `context.pullRequest.body`
- `context.task.body`
- additive CLI prompt

### `review`

- No code changes.
- In GitHub Actions and EAS, CI-derived repository and PR metadata is detected automatically. Use `--ci` only to override detection.
- Findings first.
- Prefer repository/diff evidence over generic advice.

### `perf-review`

- Uses both `agent-device` and `react-devtools`.
- Use `--local android|ios` for local runs.
- In GitHub Actions and EAS, CI provider detection is automatic; `--ci` is only an override.
- Requires `agent-device` and `agent-react-devtools` on `PATH`.
- Focus on runtime evidence, not speculative optimizations.

### `dev`

- Smallest code change that solves the task.
- In GitHub Actions and EAS, CI-derived repository and PR metadata is detected automatically. Use `--ci` only to override detection.
- Repository tools rely on `git`, `rg`, and `zsh` being available.
- Respect `context.dev.writePolicy` and `context.dev.pushPolicy`.

## Validation

- For `packages/cali` TypeScript changes:
- `bunx tsc --noEmit -p packages/cali/tsconfig.json`
- For `packages/tools` TypeScript changes:
- `bunx tsc --noEmit -p packages/tools/tsconfig.json`
- For build or runtime changes:
- `bun run build:cli`
- `bun run build:tools` when `packages/tools` changes
- For CLI surface changes:
- `node packages/cali/dist/index.js --help`
- relevant `--help` command smoke tests
- For command/runtime changes:
- run at least one source-mode smoke command if possible
- For docs/setup changes:
- keep `packages/cali/README.md` copy-pasteable for provider setup and CI examples

Do not commit generated `artifacts/` output.

## Handy Scripts

Built bundle:

- `bun run qa -- --help`
- `bun run review -- --help`
- `bun run perf-review -- --help`
- `bun run dev:command -- --help`
- `bun run qa:local:android -- --artifact ./artifacts/app.apk`
- `bun run qa:local:ios -- --artifact ./artifacts/MyApp.app`
- `bun run export-ci -- --report ./artifacts/qa/report.json`

Source/dev loop:

- `bun run dev:qa -- --help`
- `bun run dev:review -- --help`
- `bun run dev:perf-review -- --help`
- `bun run dev:dev-command -- --help`

## Extending Cali

When adding a new command:

1. Add the CLI command module under `packages/cali/src/cli/`.
2. Add the orchestration module under `packages/cali/src/commands/`.
3. Add the role module under `packages/cali/src/roles/`.
4. Register tool packs in `packages/cali/src/runtime/tool-packs.ts`.
5. Extend the shared report contract and renderer only as much as needed.
6. Update `packages/cali/README.md` and this file.

Prefer small, explicit contracts:

- one shared context model
- one command registry
- one publisher pipeline
- command-specific role prompts and output schemas

## Keep It Simple

- Prefer one normalized context contract over workflow-specific loaders.
- Prefer one small tool-pack addition over command-local shell wrappers.
- Prefer one role file per command over broad abstract “agent frameworks”.
- Prefer accurate docs for the current command surface over speculative future docs.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</p>

<p align="center">
🪄 An AI agent for building React Native apps
🪄 AI agents for React Native and Expo workflows
</p>

---
Expand All @@ -18,25 +18,28 @@ $ npx cali

## Wait, what?

Cali is an AI agent that helps you build React Native apps. It takes all the utilities and functions of a React Native CLI and exposes them as tools to an LLM.
Cali is a set of AI-agent surfaces for React Native and Expo workflows. It exposes mobile development and QA utilities to LLMs so they can help with deterministic setup, app inspection, debugging, and other agent-friendly tasks.

Thanks to that, an LLM can help you with your React Native app development, without the need to remember commands, spending time troubleshooting errors, and in the future, much more.

## How can I use it?

You can use Cali in three ways:

- **standalone** - [`cali`](./packages/cali/README.md) - AI agent that runs in your terminal. Ready to use out of the box.
- **standalone** - [`cali`](./packages/cali/README.md) - Role-oriented CLI for mobile QA, review, perf review, and dev runs in local and CI environments.
- Copy-paste setup, provider envs, and CI examples for the standalone CLI live in [`packages/cali/README.md`](./packages/cali/README.md).
- **with Vercel AI SDK** - [`cali-tools`](./packages/tools/README.md) - Collection of tools for building React Native apps with [Vercel AI SDK](https://github.com/ai-sdk/ai)
- **with Claude, Zed, and other MCP Clients** - [`cali-mcp-server`](./packages/mcp-server/README.md) - [MCP server](http://modelcontextprotocol.io) for using Cali with Claude and other compatible environments

For a repo-oriented guide to the current Cali v2 architecture, role platform, and extension points, see [`AGENTS.md`](./AGENTS.md).
For the standalone CLI’s current env model, context file contract, and package scripts, see [`packages/cali/README.md`](./packages/cali/README.md).

## What can it do?

Cali is still in the early stages of development, but it already supports:

- **Role-based Mobile Workflows**: QA today, with experimental review, perf review, and repo-backed dev runs through the standalone CLI
- **Build Automation**: Running and building React Native apps on iOS and Android
- **Device Management**: Listing and managing connected Android and iOS devices and simulators
- **Dependency Management**: Install and manage npm packages and CocoaPods dependencies.
- **React Native Library Search**: Searching and listing React Native libraries from [React Native Directory](https://reactnative.directory)

You can learn more about available tools [here](./packages/tools/README.md).
Expand Down Expand Up @@ -69,4 +72,4 @@ Feel free to open an issue or a discussion to suggest ideas or report bugs. Happ

Cali is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Callstack](https://callstack.com) is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!

Like the project? ⚛️ [Join the team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥
Like the project? ⚛️ [Join the team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥
Binary file modified bun.lockb
Binary file not shown.
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cali/root",
"version": "0.3.1",
"version": "0.4.0-6",
"devDependencies": {
"@release-it-plugins/workspaces": "^4.2.0",
"@release-it/conventional-changelog": "^9.0.3",
Expand All @@ -20,14 +20,10 @@
"vitest": "^2.1.1"
},
"license": "MIT",
"patchedDependencies": {
"ai@4.0.3": "patches/ai@4.0.3.patch"
},
"private": true,
"scripts": {
"build": "bun run build:tools && bun run build:mcp-server && bun run build:cli",
"build": "bun run build:tools && bun run build:cli",
"build:tools": "cd packages/tools && bun run build",
"build:mcp-server": "cd packages/mcp-server && bun run build",
"build:cli": "cd packages/cali && bun run build",
"release": "release-it"
},
Expand Down
Loading
Loading