| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 0 | 12 | 0% |
| Commands | 0 | 0 | 1 | 0% |
| Section tags | 2 | 1 | 6 | 22% |
What each file covers
Sections
0 shared · 0 only in A · 12 only in B- + Development Workflow and Quality Standards
- + Development Process
- + Code Quality Standards
- + File Naming Conventions
- + Import Organization
- + Testing Requirements
- + Build Verification
- + Performance Guidelines
- + Mobile-First Design
- + Error Prevention
- + Code Review Checklist
- + Common Pitfalls to Avoid
Commands
0 shared · 0 only in A · 1 only in B- + npm run build
Section tags
2 shared · 1 only in A · 6 only in B- − security
- + build
- + test
- + types
- + git-pr
- + performance
- + agent-behaviour
- code-style
- do-not
Line diff
KAMAL20201/SneakerMarketplace · AGENTS.md
@@ −1 @@
1Codex Workspace Rules (AGENTS.md)
2
3Purpose
4- This file defines project-specific rules and preferences that Codex reads before answering any chat in this workspace.
5- Keep it concise and concrete. Place non-obvious, high-impact rules first.
6
7Cursor Rules
8- Also read and honor all rules in `.cursor/rules/*.mdc` for this project.
9- If any guidance conflicts, `.cursor/rules` takes precedence for this repo.
10
11Behavior Rules
12- Always: Ask 1–2 clarifying questions when scope or intent is ambiguous.
13- Always: Explain planned terminal actions briefly before running commands.
14- Always: Keep answers concise by default; expand only when asked.
15- Ask First: Before running destructive commands (rm/reset) or installing packages.
16- Ask First: Before changing config, adding dependencies, or altering build settings.
17- Never: Expose secrets or print full .env contents in answers or logs.
18
19Style and Tone
20- Tone: Friendly, direct, and efficient. Avoid filler.
21- Responses: Use short sections and bullet lists when they improve scanability.
22- File References: Use clickable paths like `src/file.ts:42` (single line only).
23
24Task Execution
25- Scope: Make minimal, surgical changes focused on the user’s request.
26- Tests: If tests exist, run targeted tests for modified code first.
27- Validation: Prefer small, verifiable steps; summarize progress between steps.
28- Plans: Use the plan tool for multi-step or ambiguous work only.
29
30Code and Project
31- Stack: Vite + React + TypeScript (see `package.json`).
32- Formatting: Match existing style; do not add formatters unless requested.
33- Types: Prefer explicit types in new/changed code; avoid one-letter names.
34- Security: Treat environment variables and credentials as sensitive.
35
36Shell and Approvals
37- Approval Mode: Default to asking before actions needing elevated permissions or network.
38- Sandboxing: Assume workspace-write, network restricted; call out when escalation is needed.
39- Commands: Prefer `rg` for search; read files in <=250-line chunks.
40
41Response Defaults
42- Brevity: Target 3–8 lines unless detail is necessary.
43- Structure: Use short headers sparingly; avoid over-fragmentation.
44- Monospace: Wrap commands, paths, env vars, and identifiers in backticks.
45
46When In Doubt
47- Clarify requirements, propose a minimal plan, and confirm before large changes.
48
49Project-Specific Rules (Customize Below)
50- Backend: Supabase is the source of truth (DB/Auth/Storage/Edge Functions). Do not add custom servers. Use Edge Functions for server logic.
51- Supabase Calls: Avoid redundant fetches. Cache shared data in React Context; expose typed hooks and explicit invalidate/refresh methods.
52- Pagination: For any list/multi-item fetch, implement pagination; show fewer items first and add page controls at the bottom.
53- Dependencies: Install latest stable versions. If unsure about API/usage, ask for a docs link and confirmation before adding. Request approval before changing build/config deps.
54- TypeScript: Use strict typing in all new code. Do not change existing TypeScript config; ensure new code compiles under current strictness. Never use `any`.
55- Mobile UI: Design mobile-first (320px+). Use Tailwind responsive prefixes (`sm:`, `md:`, `lg:`, `xl:`). Ensure touch targets ≥44px and test across screen sizes.
56- UI Patterns: Follow shadcn/ui and Radix-based components in `src/components/ui/`; keep props minimal and typed.
57- Secrets: Never echo or log values from `process.env.*`.
58
59Notes
60- Adjust or expand sections above to reflect your preferences.
61- This file is intended to be read as high-priority context at session start.
62
KAMAL20201/SneakerMarketplace · .cursor/rules/development-workflow.mdc
@@ +1 @@
1# Development Workflow and Quality Standards
2
3## Development Process
4
51. **Plan**: Understand requirements and design solution
62. **Code**: Follow established patterns and conventions
73. **Test**: Ensure functionality works as expected
84. **Build**: Run `npm run build` to verify no TypeScript errors
95. **Review**: Check code quality and adherence to standards
10
11## Code Quality Standards
12
13- **TypeScript**: Always use strict mode, no `any` types
14- **React**: Functional components, minimal useEffect usage
15- **Performance**: Mobile-first design, optimize for performance
16- **Accessibility**: Proper ARIA labels, keyboard navigation
17- **Error Handling**: Graceful error handling with user feedback
18
19## File Naming Conventions
20
21- **Components**: PascalCase (e.g., `ProductCard.tsx`)
22- **Hooks**: camelCase starting with `use` (e.g., `useAuth.ts`)
23- **Services**: camelCase (e.g., `orderService.ts`)
24- **Types**: camelCase (e.g., `productTypes.ts`)
25- **Constants**: UPPER_SNAKE_CASE (e.g., `enums.ts`)
26
27## Import Organization
28
29```typescript
30// 1. React and external libraries
31import React from "react";
32import { useNavigate } from "react-router";
33
34// 2. Internal components and hooks
35import { Button } from "@/components/ui/button";
36import { useAuth } from "@/contexts/AuthContext";
37
38// 3. Types and constants
39import { ROUTE_NAMES } from "@/constants/enums";
40import type { Product } from "@/types/product";
41
42// 4. Utilities and services
43import { cn } from "@/lib/utils";
44import { productService } from "@/lib/productService";
45```
46
47## Testing Requirements
48
49- Test all user interactions and flows
50- Verify mobile responsiveness
51- Check error handling scenarios
52- Ensure proper loading states
53- Test with different data sets
54
55## Build Verification
56
57- **Always run `npm run build` before committing**
58- Fix any TypeScript compilation errors
59- Ensure no build warnings
60- Verify all imports resolve correctly
61- Check that all types are properly defined
62
63## Performance Guidelines
64
65- Implement proper loading states
66- Use skeleton components for content loading
67- Optimize images and assets
68- Implement proper caching strategies
69- Minimize bundle size
70
71## Mobile-First Design
72
73- Design for mobile devices first (320px+)
74- Use responsive breakpoints (sm:, md:, lg:, xl:)
75- Ensure touch-friendly interactions
76- Test on various screen sizes
77- Optimize for mobile performance
78
79## Error Prevention
80
81- Use TypeScript strict mode
82- Implement proper validation
83- Handle edge cases gracefully
84- Provide clear error messages
85- Log errors for debugging
86
87## Code Review Checklist
88
89- [ ] TypeScript compiles without errors
90- [ ] Mobile responsive design implemented
91- [ ] Proper error handling in place
92- [ ] Follows established patterns
93- [ ] Uses enums from constants
94- [ ] Implements pagination for lists
95- [ ] No unnecessary useEffect usage
96- [ ] Proper component composition
97- [ ] Accessibility considerations
98- [ ] Performance optimizations
99
100## Common Pitfalls to Avoid
101
102- Don't use `any` type in TypeScript
103- Don't hardcode values that exist in enums
104- Don't create components without proper typing
105- Don't skip error handling
106- Don't ignore mobile responsiveness
107- Don't use useEffect when not necessary
108 description:
109 globs:
110 alwaysApply: false
111
112---
113
@@ −1 +1 @@
1−Codex Workspace Rules (AGENTS.md)
1+# Development Workflow and Quality Standards
22
3−Purpose
4−- This file defines project-specific rules and preferences that Codex reads before answering any chat in this workspace.
5−- Keep it concise and concrete. Place non-obvious, high-impact rules first.
3+## Development Process
64
7−Cursor Rules
8−- Also read and honor all rules in `.cursor/rules/*.mdc` for this project.
9−- If any guidance conflicts, `.cursor/rules` takes precedence for this repo.
5+1. **Plan**: Understand requirements and design solution
6+2. **Code**: Follow established patterns and conventions
7+3. **Test**: Ensure functionality works as expected
8+4. **Build**: Run `npm run build` to verify no TypeScript errors
9+5. **Review**: Check code quality and adherence to standards
1010
11−Behavior Rules
12−- Always: Ask 1–2 clarifying questions when scope or intent is ambiguous.
13−- Always: Explain planned terminal actions briefly before running commands.
14−- Always: Keep answers concise by default; expand only when asked.
15−- Ask First: Before running destructive commands (rm/reset) or installing packages.
16−- Ask First: Before changing config, adding dependencies, or altering build settings.
17−- Never: Expose secrets or print full .env contents in answers or logs.
11+## Code Quality Standards
1812
19−Style and Tone
20−- Tone: Friendly, direct, and efficient. Avoid filler.
21−- Responses: Use short sections and bullet lists when they improve scanability.
22−- File References: Use clickable paths like `src/file.ts:42` (single line only).
13+- **TypeScript**: Always use strict mode, no `any` types
14+- **React**: Functional components, minimal useEffect usage
15+- **Performance**: Mobile-first design, optimize for performance
16+- **Accessibility**: Proper ARIA labels, keyboard navigation
17+- **Error Handling**: Graceful error handling with user feedback
2318
24−Task Execution
25−- Scope: Make minimal, surgical changes focused on the user’s request.
26−- Tests: If tests exist, run targeted tests for modified code first.
27−- Validation: Prefer small, verifiable steps; summarize progress between steps.
28−- Plans: Use the plan tool for multi-step or ambiguous work only.
19+## File Naming Conventions
2920
30−Code and Project
31−- Stack: Vite + React + TypeScript (see `package.json`).
32−- Formatting: Match existing style; do not add formatters unless requested.
33−- Types: Prefer explicit types in new/changed code; avoid one-letter names.
34−- Security: Treat environment variables and credentials as sensitive.
21+- **Components**: PascalCase (e.g., `ProductCard.tsx`)
22+- **Hooks**: camelCase starting with `use` (e.g., `useAuth.ts`)
23+- **Services**: camelCase (e.g., `orderService.ts`)
24+- **Types**: camelCase (e.g., `productTypes.ts`)
25+- **Constants**: UPPER_SNAKE_CASE (e.g., `enums.ts`)
3526
36−Shell and Approvals
37−- Approval Mode: Default to asking before actions needing elevated permissions or network.
38−- Sandboxing: Assume workspace-write, network restricted; call out when escalation is needed.
39−- Commands: Prefer `rg` for search; read files in <=250-line chunks.
27+## Import Organization
4028
41−Response Defaults
42−- Brevity: Target 3–8 lines unless detail is necessary.
43−- Structure: Use short headers sparingly; avoid over-fragmentation.
44−- Monospace: Wrap commands, paths, env vars, and identifiers in backticks.
29+```typescript
30+// 1. React and external libraries
31+import React from "react";
32+import { useNavigate } from "react-router";
4533
46−When In Doubt
47−- Clarify requirements, propose a minimal plan, and confirm before large changes.
34+// 2. Internal components and hooks
35+import { Button } from "@/components/ui/button";
36+import { useAuth } from "@/contexts/AuthContext";
4837
49−Project-Specific Rules (Customize Below)
50−- Backend: Supabase is the source of truth (DB/Auth/Storage/Edge Functions). Do not add custom servers. Use Edge Functions for server logic.
51−- Supabase Calls: Avoid redundant fetches. Cache shared data in React Context; expose typed hooks and explicit invalidate/refresh methods.
52−- Pagination: For any list/multi-item fetch, implement pagination; show fewer items first and add page controls at the bottom.
53−- Dependencies: Install latest stable versions. If unsure about API/usage, ask for a docs link and confirmation before adding. Request approval before changing build/config deps.
54−- TypeScript: Use strict typing in all new code. Do not change existing TypeScript config; ensure new code compiles under current strictness. Never use `any`.
55−- Mobile UI: Design mobile-first (320px+). Use Tailwind responsive prefixes (`sm:`, `md:`, `lg:`, `xl:`). Ensure touch targets ≥44px and test across screen sizes.
56−- UI Patterns: Follow shadcn/ui and Radix-based components in `src/components/ui/`; keep props minimal and typed.
57−- Secrets: Never echo or log values from `process.env.*`.
38+// 3. Types and constants
39+import { ROUTE_NAMES } from "@/constants/enums";
40+import type { Product } from "@/types/product";
5841
59−Notes
60−- Adjust or expand sections above to reflect your preferences.
61−- This file is intended to be read as high-priority context at session start.
42+// 4. Utilities and services
43+import { cn } from "@/lib/utils";
44+import { productService } from "@/lib/productService";
45+```
46+
47+## Testing Requirements
48+
49+- Test all user interactions and flows
50+- Verify mobile responsiveness
51+- Check error handling scenarios
52+- Ensure proper loading states
53+- Test with different data sets
54+
55+## Build Verification
56+
57+- **Always run `npm run build` before committing**
58+- Fix any TypeScript compilation errors
59+- Ensure no build warnings
60+- Verify all imports resolve correctly
61+- Check that all types are properly defined
62+
63+## Performance Guidelines
64+
65+- Implement proper loading states
66+- Use skeleton components for content loading
67+- Optimize images and assets
68+- Implement proper caching strategies
69+- Minimize bundle size
70+
71+## Mobile-First Design
72+
73+- Design for mobile devices first (320px+)
74+- Use responsive breakpoints (sm:, md:, lg:, xl:)
75+- Ensure touch-friendly interactions
76+- Test on various screen sizes
77+- Optimize for mobile performance
78+
79+## Error Prevention
80+
81+- Use TypeScript strict mode
82+- Implement proper validation
83+- Handle edge cases gracefully
84+- Provide clear error messages
85+- Log errors for debugging
86+
87+## Code Review Checklist
88+
89+- [ ] TypeScript compiles without errors
90+- [ ] Mobile responsive design implemented
91+- [ ] Proper error handling in place
92+- [ ] Follows established patterns
93+- [ ] Uses enums from constants
94+- [ ] Implements pagination for lists
95+- [ ] No unnecessary useEffect usage
96+- [ ] Proper component composition
97+- [ ] Accessibility considerations
98+- [ ] Performance optimizations
99+
100+## Common Pitfalls to Avoid
101+
102+- Don't use `any` type in TypeScript
103+- Don't hardcode values that exist in enums
104+- Don't create components without proper typing
105+- Don't skip error handling
106+- Don't ignore mobile responsiveness
107+- Don't use useEffect when not necessary
108+ description:
109+ globs:
110+ alwaysApply: false
111+
112+---
62113
