Jeden/Docs

CLI command

jeden context

Ask the context advisor what to read for a task instead of searching for it.

Exact invocation#

Shell
jeden context [recommend] "<task>" [--limit n] [--source list] [--json] [--cwd path]

Inputs and options#

  • A bare first word is taken as the task, so the verb may be omitted: jeden context "why does signing fail" is jeden context recommend.
  • --source takes any comma-separated subset of files, ground-truth, memory, transcripts, or all. Without it, context.advisor.sources decides, which defaults to files,memory.
  • --limit is how many recommendations to return, a whole number above zero; without it context.advisor.limit decides, and a request with neither is refused as limit-undeclared. Every selected source is awaited until it answers, fails or observes its caller's cancellation; an acknowledgement alone does not mean that source has stopped. --cwd selects the workspace whose project configuration and memory scope apply. Jeden Desktop's Context screen takes the same count in its Recommendations field.

Output and state effect#

Prints ranked recommendations and then the state of every source consulted. It reads only: no session is created, no memory is written, and no configuration changes. The verbs are recommend, prompt and sources.

Refusals and boundaries#

  • The functionality is jeden.context; jeden errors show jeden.context prints every cause with its test (tests/context/command.mjs). Each refusal prints what failed, why and what was observed, then fix: … and cause: jeden.context.&lt;cause&gt;. Read before any source is asked, each exit 2: verb-missing (no word at all), task-missing (&lt;verb&gt; answers for a task, and the command line holds only options), option-unknown (an option the verb does not take; prompt takes neither --limit nor --source), limit-missing, limit-invalid (--limit takes a whole number of recommendations above zero, and `X` is not one), source-missing (--source with no list, or a list of separators only), source-unknown (the context advisor has no source named X, observed: the sources there are) and argument-unexpected (a word after sources).
  • Exit 1, from the configuration: configured-source-unknown (context.advisor.sources names a source the advisor does not have; a typo never narrows the answer silently), sources-none (it holds only separators; recommend only) and limit-undeclared (recommend only). signal-unregistered, exit 69: the operating system refused the Ctrl-C handler, registered only once the request was read whole; no source starts without it.
  • Standalone context commands register cooperative Ctrl-C cancellation; on Unix they also receive SIGTERM and SIGHUP through the same token. Registration never overwrites an existing handler. A cancellation request is not proof of completed cleanup; inspect the terminal source results.
  • A command line of the wrong form (an unknown command or option, a missing, unexpected or invalid argument, a missing confirmation) prints the error and the usage and exits 2; a refusal that retrying unchanged can help (a dependency down or not answering, a rate limit) exits 69; any other refusal or failure exits 1. A refusal a functionality declares ends with fix: … and cause: &lt;operation&gt;.&lt;cause&gt;, and jeden errors show &lt;operation&gt; lists every cause of that functionality.