openpencil/AGENTS.md
Kayshen-X 22da4eed3c chore(repo): retire agent-native; root is now a pure Cargo workspace
- Remove the Zig `agent-native` git submodule (no Rust crate depends on it;
  the built-in agent runtime is the Rust `agent` crate under vendor/agent).
- Make the repo root a pure Cargo workspace: delete root package.json + bun.lock;
  move all web-SDK JS/Bun tooling into packages/ (new packages/package.json
  workspace root, generate-iconify-catalog.mjs, and the oxlint/oxfmt configs).
- Scrub agent-native from all docs and fix README dev commands + prerequisites
  to reflect the Rust product (cargo directly; bun tooling runs from packages/).
- Drop the deleted-root-package.json read from the op-host-web ci_workflow test.
2026-07-01 22:16:04 +08:00

1.8 KiB

AGENTS.md

This file provides guidance to Codex when working with code in this repository.

The TypeScript OpenPencil has been retired. apps/web, apps/desktop, apps/cli, and the pen-* packages are gone. The product is Rust (crates/) + a wasm-backed web SDK (packages/op-web-sdk*). See git history (last TS tag v0.7.5) for the retired code.

For full guidance see CLAUDE.md (this directory). Authoritative Rust architecture lives in crates/CLAUDE.md; remaining packages in packages/CLAUDE.md.

Commands

Tooling is Cargo (Rust — the product). The root has no package.json; the JS/Bun tooling for the web SDK lives under packages/ — run SDK/JS scripts from there.

  • Web dev server (Rust): bash scripts/start-web-rust.sh
  • Build (Rust): cargo build --workspace --release
  • Tests (Rust): cargo test --workspace; single crate: cargo test -p <crate>
  • Type check: cargo check --workspace; wasm: cargo check --target wasm32-unknown-unknown -p op-host-web --no-default-features --features web
  • Lint / format (Rust): cargo clippy --workspace --all-targets -- -D warnings / cargo fmt --all
  • Lint / format (TS SDK): from packages/: bun run lint (oxlint) / bun run format (oxfmt)
  • Desktop app: cargo build -p op-host-desktop → binary openpencil-desktop
  • CLI: cargo build -p op-cli → binary op
  • Iconify catalog (Rust assets): from packages/: bun run generate-iconify-catalog

Conventions

  • Single files ≤ 800 lines; one component/widget per file.
  • .rs snake_case, .ts/.tsx kebab-case; source comments in English.
  • Conventional Commits: <type>(<scope>): <subject> — scopes: editor, canvas, panels, ai, codegen, variables, figma, mcp, desktop, web, renderer, sdk, cli, agent, i18n.