Skip to content

Layer

one portable .ai/ directory, readable without the tool: .ai/repo/ is tracked and canonical, .ai/local/ is this checkout's own and ignored; doctor proves the manifest resolves, every section it names exists, and nothing under local/ is tracked

one portable .ai/ directory, readable without the tool: .ai/repo/ is tracked and canonical, .ai/local/ is this checkout's own and ignored; doctor proves the manifest resolves, every section it names exists, and nothing under local/ is tracked

Where it lives

The command that acts on it

majordomus init

Create the .ai/ layer in this repository, and refuse to overwrite an existing one.

  • generated-output-mutating
majordomus init [--extend] [--personal | --shared]

See it refuse, and accept

init is the only command that runs before the .ai/ layer exists. It seeds the manifest, the policy, the profiles, the vendored rule baseline and the empty sections from the skeleton, and it never touches .ai/local/.

Given this repository

# An empty git repository: no AI layer at all.
git commit -q --allow-empty -m base 2>/dev/null || true

Run

$ majordomus init

Output contains

  • ^created$
  • .ai/repo/policy.yaml
  • next: majordomus update

exit 0

The skeleton is copied in, the ignore line for .ai/local/ is added, and the two hook lines the policy needs are printed together with the command that will verify they were added. init does not install hooks itself.

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 init

Output contains

  • already exists

exit 15

Exit 15 is REFUSED, not an error. Overwriting a policy someone has edited is the kind of silent loss this tool exists to prevent, so it stops and names the flag that adds without overwriting.

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 init --extend

Output contains

  • nothing to add

exit 0

--extend seeds only the files the layer lacks and rewrites nothing. On a complete layer it says so; the files under .ai/repo/ belong to the repository from the moment they were created.

What enforces it

What is guaranteed

The moments this answers

Searches the titles and descriptions of every page this site publishes.