Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2.5 KiB
id, title, slug, sidebar_position
| id | title | slug | sidebar_position |
|---|---|---|---|
| init-safety | bd init-safety | /cli-reference/init-safety | 999 |
Generated from bd help --doc init-safety
bd init-safety
bd init flag safety contract.
Every bd init invocation resolves project_id from exactly one explicitly named source (local reinit, remote adoption, or a fresh mint). When the source is ambiguous, bd init refuses.
FLAG SURFACE
bd init Mint a new identity. Bootstraps from origin if it has refs/dolt/data.
bd init --reinit-local Re-initialize local .beads/ over existing local data. Does NOT authorize discarding remote history. If origin has Dolt data this will refuse — pair with --discard-remote to override.
bd init --reinit-local \ Discard the remote's Dolt history and --discard-remote replace it with the local reinit. First bd dolt push after this will be a history-replacing force-push.
bd init --force Deprecated alias for --reinit-local. Kept working for ≥2 releases.
ADOPTING A REMOTE
If you want to use the remote's existing history, use:
bd bootstrap
bd init will automatically suggest this when a remote is detected.
DESTROY-TOKEN (non-interactive only)
When running with no TTY (CI, agents, piped input), --discard-remote requires an explicit --destroy-token value. The token format is:
DESTROY-<issue-prefix>
For example, if your issue prefix is "bd", the token is "DESTROY-bd":
bd init --reinit-local --discard-remote --destroy-token=DESTROY-bd
In interactive (TTY) mode you confirm via a typed prompt instead. The token is not echoed by bd's runtime error messages — this is a deliberate guard against pattern-matched one-liners (see docs/adr/0002-init-safety-invariants.md).
EXIT CODES
10 refused: remote has Dolt history and you passed --force/--reinit-local without --discard-remote 11 refused: existing local data and you declined the destroy confirm 12 refused: --discard-remote passed without a valid --destroy-token (non-interactive mode)
RECOVERY
If you hit a refusal, see docs/RECOVERY.md for step-by-step recovery playbooks for each exit code.
bd init-safety