Goal
Add Kiro hooks to automate mechanical compliance steps that currently rely on AI memory via steering files.
Rationale
JavaParser has a self-referential build where modifying generator source requires running generators before building. Currently the steering files tell the AI to remind the developer. Hooks make this deterministic and zero-context-cost.
Planned Hooks
1. Run Code Generators on Generator Source Change
- Trigger: File changed in
javaparser-core-generators/src/**/*.java
- Action:
./run_core_generators.sh
- Post-check:
git diff --exit-code — notify if generated files changed
2. Rebuild Metamodel on AST Node Change
- Trigger: File changed in
javaparser-core/src/main/java/com/github/javaparser/ast/**/*.java
- Action:
./run_core_metamodel_generator.sh && ./run_core_generators.sh
- Post-check:
git diff --exit-code
3. Verify Pre-PR Compliance
- Trigger: User-triggered (before PR submission)
- Action: Run generators + checkstyle + verify empty diff
Design Principle
- Hooks handle mechanical steps that should never be skipped
- Steering handles judgment and reasoning that need intelligence
Tasks
Goal
Add Kiro hooks to automate mechanical compliance steps that currently rely on AI memory via steering files.
Rationale
JavaParser has a self-referential build where modifying generator source requires running generators before building. Currently the steering files tell the AI to remind the developer. Hooks make this deterministic and zero-context-cost.
Planned Hooks
1. Run Code Generators on Generator Source Change
javaparser-core-generators/src/**/*.java./run_core_generators.shgit diff --exit-code— notify if generated files changed2. Rebuild Metamodel on AST Node Change
javaparser-core/src/main/java/com/github/javaparser/ast/**/*.java./run_core_metamodel_generator.sh && ./run_core_generators.shgit diff --exit-code3. Verify Pre-PR Compliance
Design Principle
Tasks
javaparser-contributor/hooks/