Skip to content

Commit ef26d0e

Browse files
committed
update agents guidance
1 parent e498990 commit ef26d0e

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,35 @@
1313
## Build, Test, and Development Commands
1414
This repo is Docker-only; do not use system Ruby/Bundler.
1515
- Start/stop: `make up`, `make down`, logs with `make logs`.
16+
- Prod/dev switch: `STREAMSOURCE_ENV=prod make up` uses `docker-compose.prod.yml` plus base compose.
1617
- Rails console: `make shell` or `docker compose exec web bin/rails console`.
1718
- Migrations: `make migrate`.
1819
- Tests: `make test` or `docker compose exec web bin/test [path]`.
19-
- Lint/security: `docker compose exec web bundle exec rubocop`, `docker compose exec web bundle exec brakeman -q -w2`.
20+
- Lint: `make lint` (runs RuboCop + ESLint).
21+
- Rebuild: `make rebuild` (clean + rebuild containers).
22+
- Security: `docker compose exec web bundle exec brakeman -q -w2`, `docker compose exec web bundle exec bundler-audit check --update`.
2023
- JS/CSS build: `docker compose exec web yarn build` and `docker compose exec web yarn build:css`.
2124

2225
## Coding Style & Naming Conventions
2326
- Indentation: 2 spaces (EditorConfig).
2427
- Ruby: RuboCop (Rails/RSpec), line length 120, prefer double quotes.
2528
- JavaScript: ESLint Standard; single quotes, no semicolons, 2-space indent.
2629
- Naming: specs use `*_spec.rb`; factories live in `spec/factories/`.
30+
- Gemfile entries must be alphabetized within each group (Bundler/OrderedGems).
2731

2832
## Testing Guidelines
2933
- Framework: RSpec with FactoryBot; avoid fixtures.
3034
- Run a single spec: `docker compose exec web bin/test spec/models/user_spec.rb`.
3135
- Coverage target is >90% (see `docs/LINTING.md`); add edge-case coverage for controllers and services.
36+
- CI uses the `RspecJunitFormatter`; keep `rspec_junit_formatter` in the test group.
37+
38+
## Test Helpers & Auth
39+
- Prefer real login helpers over controller stubbing; avoid `allow_any_instance_of` in request specs.
40+
- `sign_in_admin` posts top-level `email`/`password` params (admin sessions controller does not use nested params).
41+
42+
## CI/Workflow Notes
43+
- GitHub Actions versions are bumped in both `.github/workflows/pr-validation.yml` and `.github/workflows/deploy.yml`.
44+
- JavaScript linting runs via `yarn lint` (alias of ESLint).
3245

3346
## Commit & Pull Request Guidelines
3447
- Commit messages are short, imperative, and lowercase (e.g., “simplify makefile”).

0 commit comments

Comments
 (0)