dodil/erp-brick-projects

AGENTS.md

Instructions for agents working on this brick

Built from the projects module spec (erp-method modules/projects, v1). The customer signed the PROCESS (item v3 2319d429, project v1 afc6da20); tests/test_process.py fails if application/process.yaml drifts from it. A process change goes through erp-compose change propose, the customer's new signature, then the code. Read erp-platform's BRICKS.md before changing anything — the rules and why each one exists.

Where a change goes

You are changing…It goes in
a business ruledomain/ — and its test in tests/test_rules.py, named for its story
who may do something, or which rows they seeapplication/use_cases.py — the permission, or _sees_*()
a new action for people and agentsa new use case in application/use_cases.py — a route AND a tool
how another module is reachedinfrastructure/seams.py only
a setting the customer editsdomain/values.py (Settings, SETTING_ROWS, check_setting)
a column or tableinfrastructure/tables.py AND schema.sql (append; never drop or rename) and a new migrations/NNNNN_<name>/

Never add an HTTP route or an MCP tool by hand. Never import SQLAlchemy, FastAPI or MCP in domain/. Don't write to another brick's tables — call its seam. Don't write an upsert by hand — use the repository. Business time is work.now() (handed to the domain as now); audit stamps are real time. Nothing sends a client anything.

Before you commit

pytest -q --tb=short     # rules, both doors, the public link, scenarios, process signature, schema
ruff check src tests