Reusable collaboration guide for AI coding agents.
- This monorepo uses host-provided external services for E2E.
- Do not start frontend, backend, db, or redis inside Codex unless explicitly asked.
- Before writing code, provide a short implementation approach and wait for approval.
- Before killing any process/port or running force-cleanup commands, check current state and wait for approval.
- If requirements are ambiguous, ask clarifying questions before implementation.
- After code changes, always list edge cases and generate test cases covering those scenarios (happy path, failure path, and boundary/edge inputs).
- If a task needs changes in more than 3 files, split into smaller sub-tasks first.
- When corrected, reflect briefly on what failed and how to prevent recurrence.
- Test philosophy:
- Investigate root cause.
- Fix the bug.
- Keep/add tests to prevent regression.
- In Plan Mode, once the user explicitly approves and asks to execute (for example: "Implement the plan"), treat that as execution approval.
- After this handoff, do not pause again for intermediate coding/testing approvals.
- Only pause when:
- destructive or high-risk actions are required,
- external credentials/access are missing,
- product decisions are still ambiguous and cannot be inferred.
Run continuously until completion:
- Implement changes.
- Continuously run type/compile checks during implementation:
- Frontend (TypeScript): run typecheck every logical batch and once more before finalizing.
- Backend (Java): run compile check every logical batch and once more before finalizing.
- Run relevant unit/integration tests.
- Run affected user-flow checks (e2e/browser automation where applicable).
- If failures appear, fix and rerun.
- Return final summary with:
- what changed,
- test evidence,
- edge cases and residual risks.
Do not stop before integration/e2e validation unless blocked by a real external dependency.
- Prefer non-destructive commands by default.
- Never use force-reset/destructive cleanup unless explicitly approved.
- Do not revert unrelated local changes.
- Use minimal scope edits and keep diffs focused.
- Add or update tests for each behavior change.
- Include at least:
- happy path,
- failure path,
- boundary/edge inputs.
- If skipping tests, explain why and what risk remains.
- Prefer deterministic, fast tests first; run broader suites when risk warrants.
- Type/compile check frequency guidance:
- small change: once after implementation + once before final response,
- medium/large change: every logical sub-task + final full pass.
- After UI/UX changes, run e2e tests via agent-browser to verify user-facing flows work correctly.
- Reuse a single session name per task (for example:
qa) when possible. - At task end, always run teardown:
- list active sessions,
- close all sessions created in this task,
- report residual processes and request approval before force cleanup.
- If environment enforces permission prompts, use approved command prefixes and persistent policy where available.
- Keep project-specific startup/test commands in dedicated docs or scripts:
docs/RUNNING.mddocs/RUNNING_TEST.mdscripts/*.sh
- In this file, keep only reusable policy and workflow rules.
- Prefer stable script entry points over long inline shell pipelines.
- Summary-style documents must be saved under
docs/summary/*/**.md(summarysubfolders are the category).
Project/domain-specific patterns (for example, data validation conventions or mapper/service contracts) should live in dedicated docs and be referenced here:
- Example:
docs/patterns/empty-collection-handling.md - Example:
docs/patterns/api-error-handling.md
Keep this file concise and policy-focused.