Presets¶
Presets create a valid version 2 config that is close to a common repository shape. They are starting points, not frameworks or hidden runtime behavior.
| Preset | Source relationship | Generated policy |
|---|---|---|
web-ui |
Components, stories, tests | Story error and test warning |
api |
Go handlers/services and tests | Missing test change is an error |
proto |
Protobuf contracts and generated Go | Missing generated change is an error |
iac |
Terraform and module README | Missing docs change is a warning |
Generate a config¶
kyn init --preset api
The default preset is web-ui. Write a different path with:
kyn init --preset iac --config .kyn/kyn.config.yaml
Kyn refuses to replace an existing file unless --force is present.
Customize safely¶
- Change
groups.source.includeto match real source paths. - Adjust suffix stripping and kin templates for your naming conventions.
- Preview one representative path:
bash
kyn check -c kyn.config.yaml \
--files path/to/representative-source \
--dry-run-resolve
- Run both a failing and passing change set.
- Start noisy policies at
warnbefore making them strict.
See Configure families and rules for every field and real-world recipes for complete adaptations.