Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/setup/install-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ ln -sf ../../.agents/skills/magpie-setup .github/skills/magpie-setup
cat >> .gitignore <<'GITIGNORE'

# Magpie — gitignored snapshot of the framework, refreshed
# by /magpie-setup upgrade. Build artefact, not source.
/.apache-magpie/
# by /magpie-setup upgrade. Build artefact, not source. No trailing
# slash: worktree-init makes this a symlink to the main checkout's
# snapshot, and a directory-only pattern would not match it.
/.apache-magpie

# Per-machine local-pin file. Records what THIS machine fetched and
# when. Compared against the committed .apache-magpie.lock to
Expand Down
15 changes: 13 additions & 2 deletions skills/setup/adopt.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,10 @@ idempotent — re-add them if they're missing.
**Base entries — always needed**:

```text
/.apache-magpie/
/.apache-magpie
/.apache-magpie.local.lock
/.apache-magpie-local/
/.apache-magpie-sources/
/.apache-magpie-sources
/.apache-magpie.sources.local.lock
/.claude/settings.local.json
/.claude/hooks/agent-guard.py
Expand All @@ -592,6 +592,17 @@ __pycache__/
*.pyc
```

`/.apache-magpie` and `/.apache-magpie-sources` carry **no trailing
slash** on purpose. In the main checkout both are directories, but
[`worktree-init`](worktree-init.md#step-1--create-the-snapshot-symlink)
replaces each with a **symlink** to the main checkout's copy so every
worktree shares one framework state. A `dir/`-style pattern matches
only directories, so a trailing slash would leave both entries
untracked-but-not-ignored in every worktree — `git status` noise, and
one `git add -A` away from committing a machine-local absolute-path
symlink. Without the slash the pattern matches the directory, its
contents, and the symlink alike, so the main checkout is unaffected.

The `/.apache-magpie-sources/` and
`/.apache-magpie.sources.local.lock` lines keep the gitignored
fetch of every [trusted external skill
Expand Down
12 changes: 9 additions & 3 deletions skills/setup/verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ Check that the entries from
[`adopt.md` Step 7](adopt.md) are present in
`<repo-root>/.gitignore`. Required:

- `/.apache-magpie/` (snapshot path)
- `/.apache-magpie` (snapshot path — **no trailing slash**, so the
pattern also matches the symlink `worktree-init` puts there; a
`/.apache-magpie/` entry is a finding, not a pass)
- `/.apache-magpie.local.lock` (per-machine state)
- `/.claude/settings.local.json` (per-machine project-scope
settings — written to by
Expand All @@ -177,8 +179,12 @@ variation):
`.goose/skills/`, …) — the same two-line block keyed on its own
dir.

- ✗ if `/.apache-magpie/` is not gitignored — the snapshot
is at risk of being accidentally committed.
- ✗ if `/.apache-magpie` is not gitignored — the snapshot
is at risk of being accidentally committed. Check this from a
**worktree** as well as the main checkout: a legacy
`/.apache-magpie/` entry passes in the main checkout (directory)
and fails in every worktree (symlink). Remediation is dropping the
trailing slash, not adding a second entry.
- ✗ if `/.apache-magpie.local.lock` is not gitignored —
per-machine state would leak into the repo.
- ✗ if `/.claude/settings.local.json` is not gitignored —
Expand Down