Skip to content

Commit a86a82e

Browse files
committed
chore: add git operation restrictions to CLAUDE.md
1 parent da159fc commit a86a82e

File tree

1 file changed

+5
-39
lines changed

1 file changed

+5
-39
lines changed

CLAUDE.md

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1616
| G-4 | For changes >300 LOC or >3 files, **ask for confirmation**. | ❌ Refactor large modules without human guidance. |
1717
| G-5 | Stay within the current task context. Inform the dev if it'd be better to start afresh. | ❌ Continue work from a prior prompt after "new task" – start a fresh session. |
1818
| G-6 | Modify API contracts only with explicit developer approval and clear documentation. | ❌ Change API contracts (e.g., endpoints, DTOs, mapping logic) without approval. |
19+
| G-7 | Use git commands only when explicitly requested by the developer. | ❌ Stage, commit, or push changes without explicit developer request. |
1920

2021
## Plan & Review
2122

@@ -105,52 +106,17 @@ Each feature follows feature slice architecture patterns with three layers:
105106

106107
- **presentation/** - UI components, UI-wise hooks
107108
- **application/** - Business logic, state management, logic-wise hooks
108-
- **infrastructure/** - Reexports from centralized API lib, feature-specific wrappers
109-
- **types/** - Type reexports from API lib, feature-specific types
110-
111-
### API Architecture
112-
113-
The centralized API layer (`src/lib/api/`) is organized by domain and endpoint structure:
114-
115-
```
116-
src/lib/api/
117-
├── auth/
118-
│ ├── login/
119-
│ │ ├── login-dto.ts # Login types
120-
│ │ └── login-command.ts # Login functionality
121-
│ └── users/{user-id}/
122-
│ ├── user-dto.ts # User types
123-
│ └── user-query.ts # User queries
124-
├── carts/
125-
│ ├── {cart-id}/
126-
│ │ ├── cart-dto.ts # Cart types
127-
│ │ ├── cart-query.ts # Cart queries
128-
│ │ ├── cart-products-query.ts # Cart products
129-
│ │ ├── add-to-cart-command.ts # Add to cart
130-
│ │ ├── clear-cart-command.ts # Clear cart
131-
│ │ └── purchase-command.ts # Purchase
132-
│ └── cart-query-keys.ts # Cart query keys
133-
└── products/
134-
├── {product-id}/
135-
│ ├── product-dto.ts # Product types
136-
│ └── product-query.ts # Single product
137-
├── products-list/
138-
│ ├── products-list-dto.ts # Products list types
139-
│ └── products-list-query.ts # Products list
140-
└── products-query-keys.ts # Product query keys
141-
```
109+
- **infrastructure/** - Data fetching, external APIs, contracts, DTOs
110+
- **types/** - Type definitions
142111

143112
### Key Patterns
144113

145114
- **Co-location** - Related files (component + story + test) are grouped together
146-
- **Centralized API** - All API logic consolidated in `src/lib/api/` with endpoint-based organization
147-
- **Type centralization** - Types defined in API lib, reexported through features
148-
- **Kebab-case naming** - Consistent kebab-case naming for all API files
149-
- **No barrel exports** - Direct imports instead of index.ts files
150115
- **MSW handlers** - API mocking is centralized in `test-lib/handlers/`
151116
- **Fixture pattern** - Test data generation in `test-lib/fixtures/`
152117
- **Strong typing** - Comprehensive TypeScript usage with branded types
153-
- **Component Composition**: Features export composed components for pages to use
118+
- **Component Composition**: Features export composed components for pages to use,
119+
- **Centralized API** - All API logic consolidated in `src/lib/api/` with endpoint-based organization
154120

155121
### Path Resolution
156122

0 commit comments

Comments
 (0)