Skip to main content
Version: 0.60.3

KR-HK-002: Kiro File Hook Missing Patterns - Kiro Hooks

Summary​

  • Rule ID: KR-HK-002
  • Severity: HIGH
  • Category: Kiro Hooks
  • Normative Level: MUST
  • Auto-Fix: No
  • Verified On: 2026-10-17

Applicability​

  • Tool: kiro
  • Version Range: unspecified
  • Spec Revision: IDE 0.x .kiro.hook

Evidence Sources​

Test Coverage Metadata​

  • Unit tests: true
  • Fixture tests: true
  • E2E tests: false

Examples​

The following examples demonstrate what triggers this rule and how to fix it.

Invalid​

{
"when": {
"type": "fileEdited"
},
"then": {
"type": "runCommand",
"command": "npm run lint"
}
}

Valid​

{
"when": {
"type": "fileEdited",
"patterns": [
"**/*.ts"
]
},
"then": {
"type": "runCommand",
"command": "npm run lint"
}
}