CLI command
jeden context
Ask the context advisor what to read for a task instead of searching for it.
Exact invocation#
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"isjeden context recommend. --sourcetakes any comma-separated subset offiles,ground-truth,memory,transcripts, orall. Without it,context.advisor.sourcesdecides, which defaults tofiles,memory.--limitis how many recommendations to return, a whole number above zero; without itcontext.advisor.limitdecides, and a request with neither is refused aslimit-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.--cwdselects 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.contextprints every cause with its test (tests/context/command.mjs). Each refusal prints what failed, why and what was observed, thenfix: …andcause: jeden.context.<cause>. Read before any source is asked, each exit2:verb-missing(no word at all),task-missing(<verb> answers for a task, and the command line holds only options),option-unknown(an option the verb does not take;prompttakes neither--limitnor--source),limit-missing,limit-invalid(--limit takes a whole number of recommendations above zero, and `X` is not one),source-missing(--sourcewith no list, or a list of separators only),source-unknown(the context advisor has no source named X, observed: the sources there are) andargument-unexpected(a word aftersources). - Exit
1, from the configuration:configured-source-unknown(context.advisor.sourcesnames a source the advisor does not have; a typo never narrows the answer silently),sources-none(it holds only separators;recommendonly) andlimit-undeclared(recommendonly).signal-unregistered, exit69: 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) exits69; any other refusal or failure exits1. A refusal a functionality declares ends withfix: …andcause: <operation>.<cause>, andjeden errors show <operation>lists every cause of that functionality.