Only the codes this command can produce. The full contract is on the commands index.
0ok
2usage
10contract unmet
12missing artifact
15refused
One scoped task at a time
start records what you are about to do and which paths it may touch. The scope is a claim you will be held to by check and by finish.
Beginning a task
task already active
no
Given this repository
# A repository with Majordomus installed and projections generated, and one commit of work.
"$MJ" init >/dev/null
"$MJ" update >/dev/null
mkdir -p lib docs
echo a > lib/a
echo d > docs/d
git add . && git commit -qm base
Run
$ majordomus start narrow the parser --scope lib
Output contains
^started t-
profile=implementation
scope=lib
exit0
The identity fields — repository, branch, head, worktree — are computed from git and never authored. What you supply is the description, the scope and the profile.
Starting a second task while one is active
task already active
yes
Given this repository
# ... and an active task scoped to lib, with work done inside that scope.
. "$FIXTURE_SETUP/installed.sh"
"$MJ" start "narrow the parser" --scope lib >/dev/null
echo work >> lib/a
Run
$ majordomus start something else --scope lib
Output contains
is active
exit15
One active task per checkout. Two open claims on the same working copy cannot both be enforced, so the second is refused and told what to do first.
Reference
Begin a scoped task.
Arguments:<task> one line. --scope <path>[,<path>...] required. --profile <name> default from policy.profiles.default. --owner <string> free-form, default
$USER.
Reads: policy, profile, git state.
Writes:state/current.yaml and one task.started line to state/ledger.jsonl.
Behaviour:
Refuses (15) if state/current.yaml exists and its outcome is not terminal. One
active task per checkout: hand the existing task over (handover --close) or finish
it first. No flag discards an active task.
Normalises each scope path: strips trailing /, canonicalises, refuses paths outside
the repository. Records the normalised form.
Reads every other worktree from git worktree list and, where one has an active
task, reports any scope that contains or is contained by this scope. Reported, not
blocked: that is a coordination fact for the person, not a rule. Git is the registry;
there is no sidecar file.
Records repository_id, branch, head, working_tree from git. Never from
arguments.
Every case below runs in CI on Linux and macOS. The site refuses to build if a public command has no behavioural case, no negative case, or no demonstration.