Skip to content

[feature] enablement: ensure consuming repos ignore the .meshloop/ store #44

Closed

Description

@smota

Background & Problem Statement

The first meshloop plan in a consuming repository creates the local store at <repo>/.meshloop/state.sqlite (default_db in crates/meshloop-cli/src/compose.rs:86). Nothing in the enablement or installation flow tells the target repository to ignore it. Meshloop's own .gitignore has /.meshloop/ and **/.meshloop/, but consuming repositories don't get that.

Seen on 0.3.0 in smota/holoself: after one meshloop plan, git status showed ?? .meshloop/. A broad git add . would have committed the SQLite store, with its WAL/SHM files, and its run history (objectives, task descriptions, attempt records) to a public repository. Worktrees are fine: default_worktree_base puts them in the sibling directory ../.meshloop-worktrees/<repo>, outside the repository.

docs/install.md:112 mentions where the database lives, but neither meshloop bundle --dest . nor the install steps add, suggest or check an ignore rule.

Proposed Solution

Make ignoring the store part of enabling Meshloop in a repository, without silently editing user files:

  1. meshloop bundle --dest <repo> (the enablement step): check whether .meshloop/ is ignored (git check-ignore -q .meshloop/state.sqlite). If it isn't, either append a marked block to <repo>/.gitignore with a flag (for example --gitignore), or print the exact line to add and report it in the JSON output as gitignore: missing.
  2. First store creation: when plan/run creates .meshloop/ inside a Git work tree and the path is not ignored, write .meshloop/.gitignore containing *. This is self-contained, never touches the user's root .gitignore, and protects the store even when the bundle step was skipped. Report it once on stderr.
  3. meshloop doctor: add a check, e.g. store_ignored: true|false, with the remediation line.
  4. Docs: add the ignore step to docs/install.md / docs/start.md next to the database location.

Requirements

  • A fresh repository that runs meshloop plan never shows .meshloop/ as untracked.
  • The root .gitignore is modified only with explicit consent (flag or prompt), and the block is idempotent and marked.
  • doctor --json reports whether the store path is ignored.
  • A custom --db path outside the work tree is not flagged.

Acceptance criteria

  • Test: temporary Git repo, meshloop plan --fixture-only … → git status --porcelain does not list .meshloop/.
  • Test: bundle --dest <tmp-repo> without the flag leaves .gitignore byte-identical and reports gitignore: missing. With the flag, it appends the block once, and a rerun makes no change.
  • Test: doctor --json returns store_ignored: false before and true after.
  • Install docs list the step.

🤖 Generated with Claude Code

Activity

  1. smota commented on Oct 7, 2026

    @smota
    OwnerAuthor

    Workflow status — claimed by Claude Code (Opus 5.5 orchestrator).

  2. smota commented on Oct 7, 2026

    @smota
    OwnerAuthor

    Workflow status — implementation done; PR #49 (branch work/store-ignore-plan-retry @ dbfe0b1). Local clippy/test/xtask check pass; CI pending. Next owner: independent reviewer.

  3. added and removed on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    drafted-by:claudeIssue, plan, or spec drafted by Claude in the current sessionenhancementNew feature or requestimplemented-by:claudeImplementation completed by Claude Code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions