Learning
Kiro IDE

Best practice-ek

Steering karbantartás, hatékony promptolás, iteráció, hook tervezés és spec-ek értéke.

Best practice-ek

Steering fájlok karbantartása

Legyen konkrét és tömör:

<!-- ❌ Rossz -->
# Conventions
We try to write good code.

<!-- ✅ Jó -->
# Naming Conventions
- Components: PascalCase, feature-prefix (ProductCard, UserAvatar)
- Hooks: camelCase, use-prefix (useProductList, useCartTotal)
- Store actions: verb-noun (setUser, clearCart, updateQuantity)

Mindig adj magyarázatot:

<!-- ❌ Csak szabály -->
Always use server components.

<!-- ✅ Kontextus és ok -->
Default to Server Components (no "use client" directive).
Add "use client" only when you need: event handlers, useState,
useEffect, or browser-only APIs. This improves performance by
reducing the client-side JavaScript bundle.

Hatékony promptolás

Adj meg kimeneti formátumot:

Create TypeScript interfaces for the User and Order entities.
Format: one interface per file in src/types/, with JSDoc comments
for each field, and export from src/types/index.ts.

Hivatkozz meglévő mintákra:

@src/components/ProductCard.tsx

Create a similar OrderCard component for the orders list.
Follow the same structure, prop types pattern, and styling approach.

Iterálj, ne írj mindent egyszerre:

# 1. lépés
Create the Zustand store for the shopping cart with
add, remove, and update quantity actions.

# 2. lépés (ha az előző kész és tesztelt)
@src/store/cartStore.ts
Add a derived selector that calculates the total price
including discounts and taxes.

Hook-ok tervezése

  • Minden hook egy jól definiált, szűk felelősségi körrel rendelkezzen
  • Tesztelj manuálisan az éles bekapcsolás előtt
  • Kezdd enabled: false értékkel, és csak akkor aktiváld, ha stabil
  • Írj részletes instructions-t – az AI pontosan annyit ért, amennyit leírsz

Specifikációk értékesítése a csapatban

A spec fájlokat mindig commitold a Git-be. Értékük:

  • Új fejlesztő gyorsabban megérti a rendszert
  • Code review-nál van referenciapontod
  • Az AI kontextusa pontos marad hosszú távon
  • Visszakövethetők az architektúrális döntések

Rövid összefoglaló

  • A steering fájlok legyenek konkrétak, kontextust adók és rendszeresen karbantartottak.
  • Iteratív, lépésenkénti fejlesztés jobb eredményt ad, mint egyetlen nagy prompt.
  • A spec fájlok Git-ben való tárolása értékes csapatdokumentációvá teszi őket.

On this page