Commands
kural place
Find the directory where new code should live
Takes a natural-language description of code you're about to write, embeds it, and ranks every directory in the snapshot by fit. Answers the core kural question — where should this code live? — before you commit to a path.
Synopsis
kural place "<description>" [flags]The description is a required positional argument. Quote it so the shell treats it as one argument.
Flags
| Flag | Short | Type | Description |
|---|---|---|---|
<description> | string | Natural-language description of the code (positional, required). | |
--provider <name> | -p | string | Embedding provider — openrouter, openai, vercel (default), ollama. |
--model <id> | -m | string | Model ID override. |
--api-key <key> | -k | string | API key. Falls back to AI_GATEWAY_API_KEY. |
--json | boolean | Emit ranked candidates as JSON. |
Use the same provider/model you used for kural snapshot generate — vector spaces aren't portable across models.
Examples
kural place "parses CLI flags for the audit command"
kural place "retries failed HTTP requests with exponential backoff" --jsonWhen to use it
- Before adding a new file, especially when several directories feel plausible.
- In an AI coding loop, to give the agent a ranked list of candidate homes instead of letting it guess.
- When refactoring, to sanity-check where a piece of logic has drifted — if
placeranks a different directory first than where the code currently lives, you likely have amisplacedfinding waiting.
Related
- Concept: Placement — how the ranking is computed.
- Companion:
kural brief— same input, different question (what already exists in this area?).