beads/website/versioned_docs/version-1.0.5/cli-reference/prime.md
matt wilkie b55472412b
docs: snapshot versioned docs for 1.0.5 release (#4246)
The v1.0.5 tag shipped with cmd/bd/version.go bumped to 1.0.5 but without
the Docusaurus version snapshot, so check-version-consistency (via
scripts/check-docs-version.sh) went red on main: versions.json and
docusaurus.config.ts lastVersion were still 1.0.4 and
website/versioned_docs/version-1.0.5 was missing.

Create the 1.0.5 docs snapshot to restore consistency:
- docusaurus docs:version 1.0.5 (versions.json + versioned_docs + sidebar)
- set docusaurus.config.ts lastVersion to 1.0.5
- regenerate versioned CLI reference (stamps "Reference for bd v1.0.5")
- regenerate website/static/llms-full.txt

Verified: scripts/check-versions.sh and scripts/check-doc-flags.sh pass.

Refs: mybd-4qku

Agent-Signature: claude-opus-4-8-medium on behalf of matt wilkie
2026-05-28 21:51:26 -07:00

1.5 KiB

id title slug sidebar_position
prime bd prime /cli-reference/prime 500

Generated from bd help --doc prime

bd prime

Output essential Beads workflow context in AI-optimized markdown format.

Automatically detects if MCP server is active and adapts output:

  • MCP mode: Brief workflow reminders (~50 tokens)
  • CLI mode: Full command reference (~1-2k tokens)

Designed for Claude Code, Gemini CLI, and Codex SessionStart hooks to prevent agents from forgetting bd workflow after context compaction.

Config options:

  • no-git-ops: When true, outputs stealth mode (no git commands in session close protocol). Set via: bd config set no-git-ops true Useful when you want to control when commits happen manually.

    Workflow customization:

    • Place a .beads/PRIME.md file in the local clone or resolved workspace to override the default output entirely.
    • Use --export to dump the default content for customization.
    • Use --memories-only for hook contexts that should inject only persistent memories.
bd prime [flags]

Flags:

      --export          Output default content (ignores PRIME.md override)
      --full            Force full CLI output (ignore MCP detection)
      --hook-json       Wrap output in the SessionStart hook JSON envelope (Claude Code, Gemini CLI, Codex)
      --mcp             Force MCP mode (minimal output)
      --memories-only   Output only persistent memories for compact hook contexts
      --stealth         Stealth mode (no git operations, flush only)