23 typescript rules available
Kiro's 23 TypeScript rules are almost all AWS patterns (Cognito, EventBridge, CDK, Step Functions, AppSync, CloudFormation and more); 18 are short. The steering file below focuses on CDK infrastructure code in TypeScript, the common thread across them.
Kiro, built and operated by AWS, uses steering files: Markdown documents in .kiro/steering/ that give the agent persistent project knowledge. Front matter controls when each file is included: always, when matching files are in context, manually by #name, or automatically by description. Kiro also includes AGENTS.md files.
.kiro/steering/typescript.mdStarting point, not a tested configuration for your repository. Included when files matching fileMatchPattern are in context. Review the instructions, adapt the file paths and run your project's existing checks.
--- inclusion: fileMatch fileMatchPattern: ["**/*.ts", "**/*.tsx"] --- # TypeScript instructions for Kiro ## Focus for this project - Grant permissions with the construct grant methods (for example table.grantReadData(fn)) instead of wildcard IAM policies. - Set explicit removal policies on stateful resources and say which ones retain data. - Run cdk synth (and the project's CDK tests) before marking an infrastructure task complete; never run cdk deploy without being asked. ## TypeScript conventions - Keep "strict": true. Note that noUncheckedIndexedAccess is a separate flag that strict does not enable; respect whichever setting tsconfig.json has. - Use unknown, not any, for untrusted data and narrow it with type guards or a schema validator before use. - Model variants as discriminated unions and end switch statements with an exhaustive never check. - Do not add non-null assertions (!) or as casts to silence an error; fix the type instead and explain any cast that remains. ## Before you finish - Run npx tsc --noEmit plus the project's lint and test scripts and report the actual output. If you cannot run them, say so and list the exact commands instead of saying they pass. - Summarize which of the rules above affected the change. - When working from a spec, reference the task you are completing and do not mark it done until the checks above have run.
Create your own Kiro rules for TypeScript and share with the community.
Ask for a small change to one matching file. Check the tool's loaded context or instruction view, inspect the diff for the requested convention, and run the relevant build or test. A well-formatted file does not guarantee the model follows every instruction.
Front matter must be at the very beginning of a steering file to be recognized. Kiro supports AGENTS.md. According to the steering docs, AGENTS.md files do not support inclusion modes and are always included, so keep scoped guidance in .kiro/steering/ files instead.
Documentation checked 2026-11-05: Kiro docs: SteeringKiro home page
Illustrative input and expected result. This example is a verification guide, not a recorded model run.
You use Kiro to add infrastructure with AWS CDK and want least-privilege permissions and a synth check before the task is done.
Add a DynamoDB table and a Lambda that reads from it to the existing stack.
A Table and Function in the stack, table.grantReadData(fn), a stated removal policy, an assertion test if the project has CDK tests, and cdk synth output.
Content reviewed 2026-11-05. Confirm instruction activation in your installed client before relying on it.
Implement EventBridge event patterns