.kiro/steering/lessons-learned.md
This file captures project-specific patterns, coding preferences, common pitfalls, and architectural decisions that emerge during development. It serves as a workaround for continuous learning by allowing you to document patterns manually.
How to use this file:
extract-patterns hook will suggest patterns after agent sessionsDocument patterns unique to this project that the team should follow.
// Always use our custom ApiError class for consistent error responses
throw new ApiError(404, 'Resource not found', { resourceId });
Document team preferences that go beyond standard linting rules.
// Group imports: external, internal, types
import { useState } from 'react';
import { Button } from '@/components/ui';
import type { User } from '@/types';
install.sh is additive-only — it won't update existing installationsThe installer skips any file that already exists in the target (if [ ! -f ... ]). Running it against a folder that already has .kiro/ will not overwrite or update hooks, agents, or steering files. To push updates to an existing project, manually copy the changed files or remove the target files first before re-running the installer.
The hooks table and Example 5 in README.md document the action type (runCommand vs askAgent) and behavior of each hook. When changing a hook's then.type or behavior, update both the hook file and the corresponding README entries to avoid misleading documentation.
askAgent over runCommand for file-event hooksrunCommand hooks on fileEdited or fileCreated events spawn a new terminal session every time they fire, creating friction. Use askAgent instead so the agent handles the task inline. Reserve runCommand for userTriggered hooks where a manual, isolated terminal run is intentional (e.g., quality-gate).
Document mistakes that have been made and how to avoid them.
Document key architectural decisions and their rationale.