← The stack
STACK GUIDE · BOTH
Tests, CI and security
An agent's work is done when the tests pass, not when it says so. Every pull request runs everything.
Tests
- Vitest for TypeScript rules and components
- Playwright for the main path through the product in a real browser
- pytest for Python workers, against the mock portals
Checks on every pull request
- ESLint and tsc for TypeScript, Ruff and pyright for Python
- Dependency audit (npm audit, pip-audit) and a secret scan (gitleaks)
- A preview deploy link posted on the pull request
Before launch
- OWASP top 10 review of every form and API route
- Backups tested by restoring them
- One command install timed on a clean machine
LEARN HOW IT WORKS
Four ideas to understand.
You direct the agent, so you need these in your head. Ask the agent to teach them with your own code.
- 1Unit versus end to end tests. Testing one rule against testing the whole path.
- 2CI. Why tests run on every pull request, not on your laptop.
- 3Common attacks. Injection, broken access control and leaked secrets, in plain words.
- 4Backups. A backup only counts once you have restored it.
Explain how tests, ci and security works in our product, in plain words, for someone who will direct the code but not type it. Use our own repo as the example. Cover: unit versus end to end tests, ci, common attacks, backups. Then ask me three questions to check I understood.
ASK YOUR AGENT TO BUILD IT
A brief to start from.
Fill in the brackets with your product and paste it into your agent.
Add a GitHub Actions workflow that runs on every pull request: install, lint (ESLint, Ruff), type check (tsc, pyright), Vitest, pytest, Playwright against a preview build, npm audit, pip-audit and gitleaks. Fail the run on any error. Show me the workflow before committing it.