init

init is how a repo becomes Valinor-governed. It propagates the versioned canonical doctrine into the target's AGENTS.mdCLAUDE.md (inlined between the valinor-doctrine anchors, kept byte-identical) and scaffolds the minimum to run the doctrine gate there.

It is safe to re-run: the agent-docs are content-preserving (the block is replaced in place, never duplicated), and each scaffold file is written only when absent — an existing claims.yml / governance.config.yml / README.md / .greptile/config.json / workflow is left untouched. So re-running to pull a doctrine update never clobbers your custom claims, config, or rules.


initinit <targetPath>

Propagate + scaffold

Unlike the other commands, init takes a required target-path argument (not the optional default-path positional) plus flags.

Arguments

  • Name
    targetPath
    Type
    string (required)
    Description

    The repo to govern. The doctrine block is written into its AGENTS.md and CLAUDE.md (a neutral # AGENTS.md / CLAUDE.md H1 is normalised on every run).

Flags

  • Name
    --profile
    Type
    enum
    Description

    technical-app · marketing-site · bizdev-proposal · library. Selects the governance profile.

  • Name
    --maturity
    Type
    enum
    Description

    greenfield · actively-developed · mature · deep-legacy. The adoption maturity that tunes whether whole-tree gates run against everything or only new code.

  • Name
    --mode
    Type
    enum
    Description

    strict · new-code · advisory. The strictness dial; new-code requires a baseline file to grandfather existing findings.

  • Name
    --stack
    Type
    string
    Description

    Overrides the profile-aware default (marketing-sitenextjs, otherwise unknown). Parsed through the GovernanceConfig schema — an invalid value fails closed.

  • Name
    --dry-run
    Type
    flag
    Description

    Print the plan and write nothing.

Scaffold a repo

INIT
init <targetPath>
npx @cmbrcreative/valinor init ./my-repo \
  --profile library \
  --maturity greenfield \
  --mode strict \
  --stack node-ts

What it scaffolds

AGENTS.md / CLAUDE.md      # doctrine block (byte-identical)
governance.config.yml      # from the flags above
claims.yml                 # doctrine-block-present + presence baseline
README.md                  # starter
.greptile/config.json      # the canonical review-rubric rules
.github/workflows/
  valinor-gates.yml        # Node 24; runs npx @cmbrcreative/valinor <gate>

On success init prints a Next steps block pointing at the scaffolded repo's prerequisites — install the App, set the secrets, and connect Greptile. See docs/guide/prerequisites.md for the full setup contract (the same content is surfaced on the help-center's Prerequisites page).

Was this page helpful?