From 66b1f0d02951c8f514c015b92ae40b00ea969a11 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 30 Mar 2026 09:59:09 +0200 Subject: [PATCH] feat(agents): add AGENTS.md and CLAUDE.md with pre-commit rules - Add AGENTS.md: require make test before every non-doc commit and document the npm vendor asset workflow - Add CLAUDE.md: instruct agents to read AGENTS.md at conversation start - Add npm-install dependency to test-e2e Makefile target Co-Authored-By: Claude Sonnet 4.6 --- AGENTS.md | 13 +++++++++++++ CLAUDE.md | 5 +++++ Makefile | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..30e3944 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,13 @@ +# Agent Instructions + +## Pre-Commit Validation + +- You MUST run `make test` before every commit whenever the staged change includes at least one file that is not `.md` or `.rst`, unless explicitly instructed otherwise. +- You MUST commit only after all tests pass. +- You MUST NOT commit automatically without explicit confirmation from the user. + +## Vendor Assets + +- Browser vendor assets (Bootstrap, Font Awesome, etc.) are managed via npm. +- Run `npm install` inside `app/` to populate `app/static/vendor/` before starting the dev server or running e2e tests. +- Never commit `app/node_modules/` or `app/static/vendor/` — both are gitignored and generated at build time. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..834cd62 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +# CLAUDE.md + +## Startup + +You MUST read `AGENTS.md` and follow all instructions in it at the start of every conversation before doing anything else. diff --git a/Makefile b/Makefile index 6228ca0..d2a5d60 100644 --- a/Makefile +++ b/Makefile @@ -145,7 +145,7 @@ security: install-dev test-security $(PYTHON) -m pip_audit -r /tmp/portfolio-runtime-requirements.txt .PHONY: test-e2e -test-e2e: +test-e2e: npm-install # Run Cypress end-to-end tests via act (stop portfolio container to free port first). -docker stop portfolio 2>/dev/null || true $(ACT) workflow_dispatch -W .github/workflows/tests.yml -j e2e