Skip to content
Open
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
24 changes: 24 additions & 0 deletions .github/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Agent Instructions

## Package Management

This project uses **pnpm** exclusively for package management in the frontend (`invokeai/frontend/web/`).

- ✅ Use `pnpm` commands (e.g., `pnpm install`, `pnpm run`)
- ❌ Never use `npm` or `yarn` commands
- ❌ Never suggest creating or using `package-lock.json` or `yarn.lock`
- ✅ The lock file is `pnpm-lock.yaml`

Use the following pnpm commands for typical operations:

- pnpm -C invokeai/frontend/web install
- pnpm -C invokeai/frontend/web build
- pnpm -C invokeai/frontend/web lint:tsc
- pnpm -C invokeai/frontend/web lint:dpdm
- pnpm -C invokeai/frontend/web lint:eslint
- pnpm -C invokeai/frontend/web lint:prettier

## Project Structure

- Backend: Python in `invokeai/`
- Frontend: TypeScript/React in `invokeai/frontend/web/` (uses pnpm)
11 changes: 11 additions & 0 deletions .github/workflows/frontend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Fail if package-lock.json is added/modified (pnpm only)
shell: bash
working-directory: .
run: |
set -euo pipefail
git fetch --no-tags --prune --depth=1 origin "${{ github.base_ref }}"
if git diff --name-only "origin/${{ github.base_ref }}...HEAD" | grep -E '(^|/)package-lock\.json$'; then
echo "::error::package-lock.json was added or modified. This repo uses pnpm only."
exit 1
fi

- name: check for changed frontend files
if: ${{ inputs.always_run != true }}
id: changed-files
Expand Down
3 changes: 2 additions & 1 deletion invokeai/frontend/web/scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"type": "module"
"type": "module",
"packageManager": "pnpm@10.12.4"
}