Learning
Kiro IDE

Gyakorlati workflow példák

Spec-driven feature fejlesztés, codebase megértés, bugfix, migráció és agent hook minták.

Gyakorlati workflow példák

Új funkció fejlesztése spec-driven megközelítéssel

Ez az ajánlott workflow komplex új funkciók esetén:

1. lépés – Spec indítása:

I want to add a product review system to the e-commerce app.
Users should be able to write reviews with ratings, and other
users should be able to filter products by average rating.

A Kiro ekkor elkezdi a háromfázisú specifikációt.

2. lépés – Requirements átnézése és jóváhagyása:

LGTM. Proceed to design.

Vagy visszajelzéssel:

Add a requirement: users can only submit one review per product.
Also, guest users should be able to read but not write reviews.

3. lépés – Design átnézése:

Jóváhagyás után:

LGTM

4. lépés – Tasks végrehajtása:

A Kiro feladatlistát generál. Az egyes feladatokon a "Start Task" gombbal lehet végigmenni. A Kiro az implementációt elvégzi, a developer ellenőrzi és iterál.


Meglévő kódbázis megértése

Egy ismeretlen projektbe lépve:

Give me a high-level overview of this codebase.
What are the main modules? How does data flow from
the API to the UI? What are the key architectural decisions?

Majd részletesebben:

@src/lib/auth.ts
@src/middleware.ts

Walk me through the complete authentication flow.
How is the token refreshed? What happens when it expires?

Bug javítás workflow

Users report that the cart total doesn't update correctly
after applying a discount code. The issue happens only
when multiple discount codes are applied in sequence.

@src/store/cartStore.ts
@src/hooks/useDiscountCode.ts
@src/components/CartSummary.tsx

Identify the root cause and provide a fix.

Technológia migrálás

We need to migrate our state management from Redux to Zustand.
Start with the user authentication slice.

@src/store/authSlice.ts
@src/store/index.ts
@src/components/ (only files that import from the auth slice)

Create an equivalent Zustand store, update all consumers,
and make sure the TypeScript types are preserved.

Agent Hook – automatikus tesztgenerálás

{
  "name": "Auto Test Generator",
  "description": "Generates test files for new React components",
  "enabled": true,
  "when": {
    "type": "fileCreated",
    "patterns": ["src/components/**/*.tsx"]
  },
  "instructions": "When a new React component is created, generate a corresponding test file in __tests__/ with basic render tests, snapshot test, and tests for any props that accept callbacks. Use Vitest and React Testing Library."
}

Agent Hook – automatikus dokumentáció frissítés

{
  "name": "API Docs Updater",
  "description": "Updates API documentation when endpoint files change",
  "enabled": true,
  "when": {
    "type": "fileEdited",
    "patterns": ["src/api/**/*.ts"]
  },
  "instructions": "When an API file is modified, update the corresponding section in docs/api.md. Add or update the endpoint description, parameters, response format, and example usage. Keep the existing structure."
}

Rövid összefoglaló

  • A spec-driven workflow (prompt → requirements → design → tasks) komplex funkciókhoz ideális.
  • Agent Hook-ok automatizálják az ismétlődő feladatokat: tesztírás, dokumentálás, kódminőség-ellenőrzés.
  • A Kiro meglévő kódbázis megértésében is hatékony eszköz, nemcsak új kód írásakor.

On this page