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§
- Init
Options - Options parsed from the
keel initflags.
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.tomltext. Pure and deterministic — the snapshot tests pin its bytes. - run
- Run
keel initforproject.