KURAL
Commands

kural advise

Analyze a directory's structure and suggest prioritized improvements

Analyzes one directory (or a JSON file describing a planned directory) and prints ordered recommendations: what to split, what to merge, what's misplaced, what has weak identity. Use it when audit has surfaced too many findings to act on — advise distills them into an action plan for one region.

Synopsis

kural advise <path> [flags]
kural advise --from-file <file> [flags]

Flags

FlagShortTypeDescription
<path>stringDirectory to analyze (positional, required unless --from-file is used).
--from-file <file>-fstringJSON file with name/description pairs — advises on a planned directory (description mode).
--leafbooleanUse leaf vectors instead of identity (snapshot mode only).
--depth <n>-dstringRecursion depth into subdirectories. Default 1.
--provider <name>-pstringEmbedding provider — for description mode only.
--model <id>-mstringModel ID override — description mode only.
--api-key <key>-kstringAPI key — description mode only.
--jsonbooleanEmit results as JSON.

Examples

Analyze one directory in the current snapshot:

kural advise src/analysis/audits

Recurse two levels and use leaf vectors:

kural advise src/shell --depth 2 --leaf

Advise on a planned directory described in a JSON file:

kural advise --from-file proposed-layout.json

When to use it

  • When audit surfaces many findings at onceadvise orders them by impact and groups related ones into a single recommendation.
  • Before splitting a directory — description mode lets you feed a proposed layout and see how it scores before writing any code.
  • During code review, to produce a short, ordered list of structural issues reviewers can walk through.
  • Concept: Audits — the underlying findings that advise prioritizes.
  • Companion: kural audit — the unfiltered finding list.

On this page