Skip to content

A task is started with a declared file scope and a profile, and only one task is active per checkout

majordomus start requires --scope: the repository paths this task may touch. It records the scope, the profile, the owner and the git state in state/current.yaml. While that record's outcome is active, a second start in the same checkout is refused with exit code 15. A task ends by finish or by handover --close; the next start archives the old record rather than discarding it.

guaranteed Deterministic and blocking. Implemented, and a behavioural test proves it.

A scope path that escapes the repository root is refused. Starting a second task while one is active is refused.

What it means

majordomus start requires --scope: the repository paths this task may touch. It records the scope, the profile, the owner and the git state in state/current.yaml. While that record's outcome is active, a second start in the same checkout is refused with exit code 15. A task ends by finish or by handover --close; the next start archives the old record rather than discarding it.

How it works

lib/start.sh splits --scope on commas (repeated flags accumulate), normalises each path — no leading ./, no trailing /, no .., no absolute paths — and refuses anything that escapes the repository. It writes the record atomically and appends task.started to the ledger. Scope is then read by check and finish, which normalise both sides again before comparing, so a hand-edited entry with a trailing slash still contains its files.

How to see it

majordomus start "fix auth" --scope lib/auth/,./test/auth
# started t-…  profile=implementation  scope=lib/auth,test/auth
majordomus start "second" --scope lib/other
# majordomus: task t-… is active ('fix auth'); run majordomus handover or majordomus finish first

What it does not cover

One task per checkout is enforced; one checkout per concurrent writer is advice. Two sessions sharing one checkout will block each other's pushes until scopes are declared — which is what happened while this site was built, and why the design asks for a worktree per writer.

Why it exists

In the source environment the scope declaration was an optional second step after creating a worktree; ten of eighteen active worktrees had never declared one, which made the blocking check unreachable in the majority case. If a step can be skipped it will be; here the declaration is part of start.

Detail rendered from docs/claims/scoped-task.md.

Provenance

defined in
read it on this site · docs/CLI.md
implemented in
lib/start.sh · majordomus start
proved by
test/cases/04_start_check.sh
claim id
scoped-task

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh 04_start_check

Where this claim is used

Related claims same implementation

The moments this answers