Skip to main content

Module init

Module init 

Source
Expand description

keel init — evidence-merged policy generation (dx-spec §1, Level 1).

Walks the project (static scan, §scan), merges in observed traffic from .keel/discovery.db, and writes a keel.toml that “reads like a senior SRE reviewed your codebase”: every target cites file:line evidence, and observed targets carry their real call counts. The generated file is the documentation — deleting any entry just falls back to the same built-in defaults.

Determinism (dx-spec §5): no date in the header unless --stamp, targets and sightings sorted, byte-identical output for identical inputs. --diff previews changes against an existing file without writing.

Structs§

InitOptions
Options parsed from the keel init flags.

Functions§

agents_block
The full fenced block written into AGENTS.md (begin marker, snippet, end marker, trailing newline). Public so the golden test can pin its bytes.
render_keel_toml
Render the full keel.toml text. Pure and deterministic — the snapshot tests pin its bytes.
run
Run keel init for project.