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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ mcps.local.yaml
# Local install config + private team data (nested git — never commit to core)
config.local.yaml
**/config.local.yaml
adapters/generic/instructions.local.md
team/
.gitmodules

Expand Down
2 changes: 1 addition & 1 deletion adapters/aider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ read:
Or run:

```bash
aider --read "$SHARED_AGENTS_HOME/adapters/generic/instructions.md"
aider --read "$SHARED_AGENTS_HOME/adapters/generic/instructions.local.md"
```

## Sync
Expand Down
7 changes: 5 additions & 2 deletions adapters/generic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ For tools not yet in [`manifest.json`](../manifest.json).
Every **`sa install`** run refreshes:

```
adapters/generic/instructions.md
adapters/generic/instructions.local.md
```

Copy that block into your tool's global config file.
Copy that block into your tool's global config file. It carries the absolute paths of
your machine and is git-ignored. [`instructions.md`](instructions.md) next to it is the
tracked template with `$SHARED_AGENTS_HOME` placeholders, for reading on GitHub before
a local install.

## Common global paths (ecosystem convention)

Expand Down
2 changes: 1 addition & 1 deletion docs/adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ See [Contributing](/docs/contributing).

## Generic fallback

If your CLI is not in the manifest, copy [adapters/generic/instructions.md](https://github.com/netgrade-digital/shared-agents/blob/main/adapters/generic/instructions.md) into your global agent config and set `$SHARED_AGENTS_HOME`.
If your CLI is not in the manifest, copy [adapters/generic/instructions.md](https://github.com/netgrade-digital/shared-agents/blob/main/adapters/generic/instructions.md) into your global agent config and set `$SHARED_AGENTS_HOME`. After `sa install`, `adapters/generic/instructions.local.md` holds the same block with the absolute paths of your machine already filled in.

---

Expand Down
6 changes: 4 additions & 2 deletions scripts/install-adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def check_tool(tool: dict, home: str, repo_home: Path | None = None) -> ToolRepo
bins_found=bins_found,
config_paths=config_paths,
docs=docs,
message="Use adapters/generic/instructions.md for unsupported CLIs",
message="Use adapters/generic/instructions.local.md for unsupported CLIs",
)

if tid == "openclaw":
Expand Down Expand Up @@ -672,7 +672,9 @@ def run_install(
messages.extend(install_tool(repo_home, home, tool, dry_run))
configured.append(tool["name"])

generic = repo_home / "adapters" / "generic" / "instructions.md"
# Machine-specific output: absolute paths of THIS machine. Never the tracked
# template (adapters/generic/instructions.md), or every install dirties the repo.
generic = repo_home / "adapters" / "generic" / "instructions.local.md"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uninstall deletes tracked template file

High Severity

uninstall-adapters.py still unlinks the tracked adapters/generic/instructions.md template instead of the new instructions.local.md output. sa uninstall --keep-repo therefore deletes the public template from the checkout and leaves the machine-specific file behind.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1d0082c. Configure here.

if not dry_run:
generic.parent.mkdir(parents=True, exist_ok=True)
generic.write_text(
Expand Down
Loading