diff --git a/.gitignore b/.gitignore index 5ef6a52..e3a7542 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts +.env*.local diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000..5106a3f --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,5 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 120, + "proseWrap": "preserve" +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..e943e8f --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,10 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "jsx-a11y", "nextjs"], + "env": { + "browser": true, + "node": true, + "es2024": true + }, + "ignorePatterns": ["node_modules/**", ".next/**", "out/**", "build/**", "next-env.d.ts"] +} diff --git a/ORCA_REFERENCE.md b/ORCA_REFERENCE.md index a953c36..44acfaf 100644 --- a/ORCA_REFERENCE.md +++ b/ORCA_REFERENCE.md @@ -1,138 +1,312 @@ -# orca +# Orca CLI Reference -Coordinated agent run harness. +Orca is an observable agent-lane harness. Callers dispatch work to Codex, +Claude, or Cursor and receive durable, machine-readable state. Orca provides a +substrate for orchestrators; it does not plan, decompose, route, or judge lane +work itself. + +This reference is validated against the built `orca contract` output. When +documentation and the installed CLI disagree, trust `orca contract`. ## Install -```bash +```sh npm install -g orcastrator +# pnpm add -g orcastrator +# yarn global add orcastrator +# bun add -g orcastrator +``` + +## Discover the Contract + +```sh +orca contract +orca agents +orca dispatch --help +``` + +Every lane verb prints exactly one JSON envelope as its final stdout line. +`dispatch` first prints a small handle line so a caller can capture the lane ID +before native agent work begins. `--help` and `-h` are the documented +human-readable exceptions. + +## Quick Start + +```sh +# Internal worker lane (default surface) +orca dispatch --agent codex --cwd . \ + "Review the current diff and report actionable findings" + +# Named, user-followable Codex task +orca dispatch --agent codex --surface task \ + --label "HAPPY-123 — Fix API" \ + --cwd /path/to/existing/worktree \ + "Implement HAPPY-123 and run its focused tests" ``` -## Run Management +The final envelope includes Orca's lane ID and, after native binding, the +agent's session/thread ID. + +## Dispatch Surfaces + +### `lane` (default) + +An internal worker intended to report its result back to the coordinating +agent or script. The lane remains durable so it can be inspected and resumed. -Orca starts each run with a lightweight planning-necessity decision (`needsPlan?`). Multi-step work goes through full planning; simple focused work can execute directly as one task. +### `task` (Codex only) -```bash -orca status # list all runs (default) -orca status --last # most recent run details -orca status --run # specific run details +A deliberately named, durable Codex thread intended for direct user follow-up. +It requires a non-empty `--label`, which Orca applies as the native thread +name. -orca resume --last -orca resume --run -orca resume --run --codex-only --codex-effort high +`--surface task` does not create a Codex Desktop-managed project, worktree, or +handoff environment. Supply an existing checkout or worktree with `--cwd`. +Persistent lane threads may also appear in Codex Desktop: the requested +`user`/`subagent` source is a host-normalized hint, not a visibility filter. -orca cancel --last -orca cancel --run +## Commands -orca answer "yes, use migration A" +### `orca dispatch` + +```text +orca dispatch --agent [--surface lane|task] [--model ] + [--cwd ] [--label