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
23 changes: 16 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,22 @@ member crates always reference deps as `foo.workspace = true`. New crates go und
## Commands

```bash
cargo check --workspace
cargo clippy --workspace --all-targets -- -D warnings # CI gate
cargo test --workspace
cargo test -p harness-core message:: # filter by path
cargo run -p jarvis # needs OPENAI_API_KEY
cargo check --workspace --exclude jarvis-desktop
cargo clippy --workspace --all-targets --exclude jarvis-desktop -- -D warnings # CI gate
cargo test --workspace --exclude jarvis-desktop
cargo test -p harness-core message:: # filter by path
cargo run -p jarvis # needs OPENAI_API_KEY
cargo build --release -p jarvis
```

`--exclude jarvis-desktop` matches Linux CI: the Tauri crate needs
WebKitGTK + GObject system libs (`libgtk-3-dev`, `libwebkit2gtk-4.1-dev`,
`librsvg2-dev`) that aren't installed on a stock dev box. Drop the flag
once you've installed the GTK toolchain locally, or use the `Makefile`
targets (`make check` / `make lint` / `make test`) which apply the
exclusion automatically — override with `WORKSPACE_EXCLUDE=` on a fully
provisioned machine.

Env vars consumed by the `jarvis` binary: `OPENAI_API_KEY` (required
unless `--mcp-serve` is passed), `JARVIS_MODEL` (default `gpt-4o-mini`),
`OPENAI_BASE_URL`, `JARVIS_ADDR` (default `0.0.0.0:7001`),
Expand Down Expand Up @@ -240,8 +248,9 @@ not read `std::env`. New tools, providers, or middlewares get registered here.
`anyhow` freely.
- **Errors:** library code uses `thiserror`-derived `Error` in `harness-core`; provider
errors get wrapped in `Error::Provider(String)` rather than leaking `reqwest::Error`.
- **Clippy is the gate.** `cargo clippy --workspace --all-targets -- -D warnings` must
pass; the existing code is clean against it.
- **Clippy is the gate.** `cargo clippy --workspace --all-targets --exclude jarvis-desktop -- -D warnings`
must pass; the existing code is clean against it. CI runs the same command
(see `.github/workflows/rust.yml`); `make lint` wraps it.
- **Streaming lives on its own method.** `LlmProvider::complete_stream` is a
parallel entry point to `complete`; don't retrofit `complete`'s return type.
New providers can skip it — the default impl returns a stream that calls
Expand Down
23 changes: 16 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,22 @@ member crates always reference deps as `foo.workspace = true`. New crates go und
## Commands

```bash
cargo check --workspace
cargo clippy --workspace --all-targets -- -D warnings # CI gate
cargo test --workspace
cargo test -p harness-core message:: # filter by path
cargo run -p jarvis # needs OPENAI_API_KEY
cargo check --workspace --exclude jarvis-desktop
cargo clippy --workspace --all-targets --exclude jarvis-desktop -- -D warnings # CI gate
cargo test --workspace --exclude jarvis-desktop
cargo test -p harness-core message:: # filter by path
cargo run -p jarvis # needs OPENAI_API_KEY
cargo build --release -p jarvis
```

`--exclude jarvis-desktop` matches Linux CI: the Tauri crate needs
WebKitGTK + GObject system libs (`libgtk-3-dev`, `libwebkit2gtk-4.1-dev`,
`librsvg2-dev`) that aren't installed on a stock dev box. Drop the flag
once you've installed the GTK toolchain locally, or use the `Makefile`
targets (`make check` / `make lint` / `make test`) which apply the
exclusion automatically — override with `WORKSPACE_EXCLUDE=` on a fully
provisioned machine.

Env vars consumed by the `jarvis` binary:
`JARVIS_PROVIDER` (`openai` (default), `openai-responses`, `anthropic`, `google`, `codex`, `kimi`, or `ollama`),
`OPENAI_API_KEY` / `ANTHROPIC_API_KEY` / `GOOGLE_API_KEY` /
Expand Down Expand Up @@ -978,8 +986,9 @@ are usually marketing / human-PR docs, not agent guidance.
`anyhow` freely.
- **Errors:** library code uses `thiserror`-derived `Error` in `harness-core`; provider
errors get wrapped in `Error::Provider(String)` rather than leaking `reqwest::Error`.
- **Clippy is the gate.** `cargo clippy --workspace --all-targets -- -D warnings` must
pass; the existing code is clean against it.
- **Clippy is the gate.** `cargo clippy --workspace --all-targets --exclude jarvis-desktop -- -D warnings`
must pass; the existing code is clean against it. CI runs the same command
(see `.github/workflows/rust.yml`); `make lint` wraps it.
- **Streaming lives on its own method.** `LlmProvider::complete_stream` is a
parallel entry point to `complete`; don't retrofit `complete`'s return type.
New providers can skip it — the default impl returns a stream that calls
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ IMAGE ?= jarvis:local
WEB_DIR := apps/jarvis-web
WEB_DIST := $(WEB_DIR)/dist

# `jarvis-desktop` is a Tauri shell that requires WebKitGTK + GObject system
# libs on Linux (libgtk-3-dev, libwebkit2gtk-4.1-dev, librsvg2-dev, ...).
# Linux CI excludes it (see .github/workflows/rust.yml) so the default
# workspace targets stay buildable on a stock Ubuntu box without the GTK
# toolchain. Mirror the exclusion here so `make check` matches CI.
# Override `WORKSPACE_EXCLUDE=` (empty) on a machine with the GTK deps
# installed to lint / test the desktop crate too.
WORKSPACE_EXCLUDE ?= --exclude jarvis-desktop

# ---------------------------------------------------------------------------
# Help
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -66,11 +75,11 @@ fmt: ## Format Rust code (rustfmt)

.PHONY: lint
lint: ## Clippy with -D warnings (CI gate)
$(CARGO) clippy --workspace --all-targets -- -D warnings
$(CARGO) clippy --workspace --all-targets $(WORKSPACE_EXCLUDE) -- -D warnings

.PHONY: test
test: ## Run the workspace test suite
$(CARGO) test --workspace
$(CARGO) test --workspace $(WORKSPACE_EXCLUDE)

.PHONY: check
check: lint test ## Run clippy + tests, what CI runs
Expand Down
Loading