From 5d43ae43c14395e0b2204dd55f69a77a98581d8a Mon Sep 17 00:00:00 2001 From: bfoxhound Date: Mon, 27 Jul 2026 21:38:23 -0500 Subject: [PATCH] docs(agents): update root commands from npm to pnpm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #2 converted CI to pnpm (packageManager: pnpm@9.15.0, pnpm install --frozen-lockfile, pnpm run api in workflows) but AGENTS.md still documented the root scripts as npm run lint/frontend:typecheck/sqlc/api. Update the Commands and API-contract sections to pnpm and note the split: the root is a pnpm workspace while frontend/ deliberately stays npm-managed (npm ci in its workflows, not in pnpm-workspace.yaml), so the frontend-specific npm commands are unchanged. Also drop the stale npx openapi-typescript@7.4.4 wording — api:ts now runs the local openapi-typescript dependency. Co-Authored-By: Claude Fable 5 --- AGENTS.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 82cb2b0f2a..aa30cb56ea 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,13 +12,13 @@ Operational guidance for coding agents working in this repository. Keep changes ## Commands -From the repo root unless noted: +From the repo root unless noted. The root is a **pnpm** workspace (`packageManager: pnpm@9.15.0`; CI installs with `pnpm install --frozen-lockfile`) — use `pnpm` for root scripts. `frontend/` is deliberately **not** part of the pnpm workspace and remains npm-managed (`npm ci`), so frontend-local commands keep using `npm`. ```bash -npm run lint # backend go test ./... + golangci-lint v2.12.2 -npm run frontend:typecheck # frontend TypeScript check -npm run sqlc # regenerate backend/internal/storage/sqlite/gen from queries/schema -npm run api # regenerate OpenAPI spec + frontend TS types (see API contract changes below) +pnpm run lint # backend go test ./... + golangci-lint v2.12.2 +pnpm run frontend:typecheck # frontend TypeScript check +pnpm run sqlc # regenerate backend/internal/storage/sqlite/gen from queries/schema +pnpm run api # regenerate OpenAPI spec + frontend TS types (see API contract changes below) npx @redwoodjs/agent-ci run --all # local workflow validation; requires Docker socket ``` @@ -83,7 +83,7 @@ For code entry points: - Do not treat failed/unknown runtime probes as proof a session is dead. - Do not force-delete dirty registered worktrees. - Do not modify already-merged SQLite migrations. Add a new migration instead. -- Do not hand-edit `backend/internal/storage/sqlite/gen/*`; change `backend/internal/storage/sqlite/queries/*` or migrations and run `npm run sqlc`. +- Do not hand-edit `backend/internal/storage/sqlite/gen/*`; change `backend/internal/storage/sqlite/queries/*` or migrations and run `pnpm run sqlc`. - SQLite change events come from DB triggers into `change_log`; do not add parallel manual CDC emission from store methods unless the architecture changes explicitly. - Keep generated OpenAPI/API DTO drift in mind: controller response shapes live in `backend/internal/httpd/controllers/dto.go` and tests may assert CLI/HTTP wire compatibility. - Do not add network calls to tests unless the package already has an integration/e2e pattern for them. Prefer `httptest`, fakes, and injected dependencies. @@ -102,14 +102,14 @@ The daemon API is code-first. The OpenAPI spec and frontend TypeScript types are **Regenerate after editing:** ```bash -npm run api # runs api:spec then api:ts in sequence +pnpm run api # runs api:spec then api:ts in sequence ``` This is equivalent to running: ```bash -npm run api:spec # cd backend && go generate ./internal/httpd/apispec/... -npm run api:ts # npx openapi-typescript@7.4.4 backend/internal/httpd/apispec/openapi.yaml -o frontend/src/api/schema.ts +pnpm run api:spec # cd backend && go generate ./internal/httpd/apispec/... +pnpm run api:ts # openapi-typescript backend/internal/httpd/apispec/openapi.yaml -o frontend/src/api/schema.ts ``` **Verify:**