mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 00:03:32 +08:00
chore: improve AI-agent context (CLAUDE.md auto-load + AGENTS.md tweaks) (#13028)
* chore: import AGENTS.md from CLAUDE.md so Claude Code loads project instructions Claude Code does not yet natively support AGENTS.md. The previous CLAUDE.md was a human-readable redirect, but the agent never followed it. Using the @AGENTS.md import directive (which Claude Code does support) makes the project instructions auto-load. * chore: clarify dev-deps sync and pre-commit workflow in AGENTS.md - Note that running tests inside a sub-package needs uv sync --group dev --package <name>; the default sync skips sub-package dev deps and leaves things like fakeredis uninstalled. - Tighten the pre-commit workflow section: pre-commit hooks already run ruff/biome on commit, so the previous 5-step manual sequence overstated what's needed.
This commit is contained in:
committed by
GitHub
parent
94981c443d
commit
bc927abef2
13
AGENTS.md
13
AGENTS.md
@ -155,6 +155,7 @@ Required fixtures: `component_class`, `default_kwargs`, `file_names_mapping`
|
||||
- Database tests may fail in batch but pass individually
|
||||
- Pre-commit hooks require `uv run git commit`
|
||||
- Always use `uv run` when running Python commands
|
||||
- When running tests inside a sub-package (e.g. `langflow-base`, `lfx`), sync that package's dev group first: `uv sync --group dev --package langflow-base`. The default `uv sync` only resolves the top-level workspace and may leave dev-only test deps (e.g. `fakeredis`) uninstalled.
|
||||
|
||||
### Graph Testing Pattern
|
||||
|
||||
@ -178,11 +179,13 @@ This updates: `pyproject.toml`, `src/backend/base/pyproject.toml`, `src/frontend
|
||||
|
||||
## Pre-commit Workflow
|
||||
|
||||
1. Run `make format_backend` (FIRST - saves time on lint fixes)
|
||||
2. Run `make format_frontend`
|
||||
3. Run `make lint`
|
||||
4. Run `make unit_tests`
|
||||
5. Commit changes (use `uv run git commit` if pre-commit hooks are enabled)
|
||||
Pre-commit hooks run ruff and biome automatically on `git commit`, so manual
|
||||
formatting is not required. To avoid an extra commit cycle when you have many
|
||||
changes:
|
||||
|
||||
1. Run `make format_backend` once before staging - fixes most ruff issues up front.
|
||||
2. Run `uv run git commit` (the `uv run` ensures pre-commit finds the right Python).
|
||||
3. If you touched backend code, run `make unit_tests` locally for faster feedback than CI.
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# CLAUDE.md
|
||||
|
||||
See [AGENTS.md](./AGENTS.md) for project instructions.
|
||||
@AGENTS.md
|
||||
|
||||
This project uses [AGENTS.md](https://agents.md/) as the standard for providing context to AI coding agents. The AGENTS.md file contains all the information needed to understand and contribute to this codebase.
|
||||
This project uses [AGENTS.md](https://agents.md/) as the standard for providing context to AI coding agents. The `@AGENTS.md` import above tells Claude Code to load `AGENTS.md` automatically; other tools that natively support `AGENTS.md` will pick it up directly.
|
||||
|
||||
Reference in New Issue
Block a user