CLI command
jeden contracts
Print Jeden's contracts as one text, and install them into a file another program reads as a system prompt.
Exact invocation#
jeden contracts [render|status|install|uninstall] [--file <path>] [--json] [--cwd path]Inputs and options#
- No action defaults to
render, which prints the task contract and the communication contract in force (Jeden's default, the operator's own text, or none) in the conversation language;--cwdselects the project layer and--jsonwraps the text. status,installanduninstallneed the target--file <path>.
Output and state effect#
install writes the rendered text between the lines <!-- jeden contracts: start --> and <!-- jeden contracts: end -->, replacing the previous block and leaving the rest of the file alone, through an atomic rename; it prints Installed the Jeden contracts into <path> or <path> already carries the Jeden contracts. uninstall removes that block and nothing else, through the same atomic rename, and prints Removed the Jeden contracts from <path> or <path> carries no Jeden contracts; with --json both print path and changed. status prints current, stale, or absent with the path and exits 0 only when current. Jeden's own sessions take the contracts from the binary and need no install.
Refusals and boundaries#
- The functionality is
jeden.contracts;jeden errors show jeden.contractsprints every cause with its test (tests/contracts/command.mjs). Before any file is read, each exit2and naming the usage line:verb-unknown,argument-unexpected(unknown contracts option: X; status takes only --file <path>),file-missing(contracts install, uninstall and status require --file <path>, and the command line names noneorends after --file) andfile-twice(contracts accepts exactly one --file target; the last path is never silently preferred). - Exit
1:file-unreadable(cannot read <path>),markers-malformed(malformed Jeden contract markers: expected one start followed by one end, observed: how many start and end lines the file holds; nothing is written and status does not call it absent),directory-uncreatableandfile-unwritable(the file keeps what it held). Replacement and removal preserve every byte outside the matched block, including surrounding spaces and newlines. - Without
--json,statusexits1onblock-absent(absent: <path> carries no Jeden contracts) andblock-stale, whose fix isrun jeden contracts install --file <path>; with--jsonit answers thestateand exits0. - 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.