IMPORTANT: For Figma design-to-code work, use only the figma-cost-optimizer-bridge MCP server. Do not use or fall back to the official Figma MCP / figma-mcp directly.
This file is the Codex entrypoint for ditto-fe-migration/.
All coding agents working in this folder, including Codex and Claude Code, must follow the same project rules.
The source of truth for FE rules is ./CLAUDE.md.
Before making any change, read these files in order:
../CLAUDE.md— repository-level rules and clean code principles./CLAUDE.md— FE-specific rules and conventions../AGENTS.md— repository entrypoint summary
Do not rely only on this file.
Codex is the implementation agent.
The expected workflow is:
- Claude Code creates the plan.
- Codex implements the approved plan.
- Claude Code reviews the diff.
- Codex applies review fixes if needed.
- Claude Code prepares or validates the PR.
Codex should not expand the task scope beyond the provided Claude plan.
If there is no Claude plan, Codex must first inspect the relevant files and produce a short implementation plan before editing.
Only this project is in scope:
ditto-fe-migration/
Out of scope:
ditto-fe/ditto-develop/ditto-be/- Backend implementation changes
- Legacy frontend cleanup outside
ditto-fe-migration/
Do not modify out-of-scope projects unless the user explicitly asks.
- Base branch:
feat/s3-migration - Cleanup branch naming:
chore/cleanup-<letter>-<slug>- Example:
chore/cleanup-b-fetch-unify
- Example:
- One cleanup batch = one PR
- Do not mix multiple batches in one PR
- Separate file rename commits from content-change commits
Cleanup work must follow the batch definitions in:
~/.claude/plans/ditto-fe-migration-fancy-rose.md
Do not cross batch boundaries.
If a required change appears to exceed the current batch scope, stop and ask the user.
When implementing:
- Read the relevant files first.
- Search for existing patterns using
rgor equivalent. - Reuse existing utilities and components.
- Make the smallest correct change.
- Preserve existing behavior.
- Avoid speculative refactoring.
- Do not change public APIs without user confirmation.
- Do not introduce new dependencies unless explicitly approved.
- Do not change deployment, CI, or infrastructure files unless required by the task.
Follow ./CLAUDE.md for all FE conventions, especially:
- Use generated API services from
src/shared/lib/api/generated/ - Do not call
fetchoraxiosdirectly - Use styled-components only
- Do not add CSS Modules or emotion
- Do not use hardcoded colors, fonts, or spacing
- Do not use hex, rgb, rgba, hsl, or fallback color values
- Do not add new
any,@ts-ignore, or@ts-expect-error - Use
import typefor type imports - Prefer
@/alias imports - Do not use parent relative imports like
../or../../ - Do not use default exports except Next.js route files
- Do not introduce React Query in this cleanup scope
- Components and hooks must call generated services from
src/shared/lib/api/generated/. - Do not create manual service files for endpoints missing from generated API.
- Do not manually duplicate generated DTOs.
- Do not loosen generated response types by making fields optional.
- If generated API and legacy API differ, stop and ask the user.
- All colors, fonts, and spacing must use CSS variable tokens.
- Do not use hardcoded
hex,rgb,rgba,hsl, or fallback token values. - Do not use inline styles for colors or typography.
- If a hardcoded value cannot be mapped to an existing token, stop and ask the user.
- Do not choose approximate token values.
After changes, run:
npm run lint && npm run build && npx tsc --noEmitIf any command fails:
- Identify whether the failure is caused by your changes.
- Fix failures caused by your changes.
- Clearly report pre-existing failures.
Do not report completion before validation is complete.
When relevant, manually check:
/home/chat/one-on-one/[roomId]/chat/group/[roomId]- Group vote modal
/onboarding/admin/matches/admin/users/auth/callback
Whenever a new screen/route is developed (or an existing screen's user-facing flow changes meaningfully), you must add or update the matching Cypress E2E test. This is mandatory.
- Test location:
cypress/e2e/<domain>/(see existingmatching-profile/,days/,flows/,smoke/). - Cover the primary happy-path flow end-to-end and reuse fixtures in
cypress/fixtures/. - Run before reporting completion:
npm run test:e2e:cypress- A new-screen change is not complete until its Cypress test exists and passes.
- If a stable E2E test is not feasible (external dependency, unfinished BE), stop and ask the user instead of skipping silently.
See ./CLAUDE.md section 12.1 for the full rule.
After deployment, verify GitHub Actions with:
gh run watch <run_id> --repo ditto-develop/ditto-feIf the run fails:
- Inspect the logs.
- Fix the issue.
- Push again.
- Watch the new run.
Do not report success before the deployment workflow succeeds.
Stop immediately and ask the user if:
- A hardcoded color or font cannot be mapped to an existing token.
- Generated API and legacy API specs differ.
- It is unclear whether BE integration is complete before removing mock code.
- The split boundary of a large component is ambiguous.
- A public API name or signature must change.
- A required logic change exceeds the current cleanup batch.
- The Claude plan conflicts with
./CLAUDE.md.
Do not guess. Do not choose approximate values. Do not silently change scope.
Before finishing:
- Inspect the diff.
- Remove debug logs.
- Remove temporary comments.
- Remove unused imports.
- Confirm no unrelated files were changed.
- Confirm rename-only changes are separated from content changes when applicable.
Always finish with:
## Summary
- ...
## Files Changed
- `path/to/file`: ...
## Validation
- `npm run lint`: passed / failed / not run
- `npm run build`: passed / failed / not run
- `npx tsc --noEmit`: passed / failed / not run
## Notes / Risks
- ...Do not claim that a command passed unless it was actually run.