Skip to content

fix(adapters): stop overwriting the tracked generic instructions template - #6

Open
realM1lF wants to merge 1 commit into
mainfrom
fix/generic-instructions-local
Open

realM1lF wants to merge 1 commit into
mainfrom
fix/generic-instructions-local

Conversation

@realM1lF

Copy link
Copy Markdown
Contributor

Summary

install-adapters.py wrote the generated agents block into adapters/generic/instructions.md. That file is tracked, and the generated block contains the absolute paths of the machine that ran the installer. sa sync pull calls the installer too, so the core repo was left dirty after every session start on every machine. A careless git add -A would publish a teammate's home path and username to this public repo.

The generated block now goes to adapters/generic/instructions.local.md, matching the existing *.local.* convention in .gitignore. The tracked instructions.md keeps its $SHARED_AGENTS_HOME placeholders, which is what people read on GitHub before they have a local install.

  • scripts/install-adapters.py: write to instructions.local.md, plus a comment saying why the tracked template must stay untouched; the generic tool hint points at the generated file
  • .gitignore: ignore adapters/generic/instructions.local.md
  • adapters/generic/README.md: document both files and which is which
  • adapters/aider/README.md, docs/adapters.md: point at the generated file

Test plan

  • python3 scripts/install-adapters.py install "$PWD" --tools generic --non-interactive creates adapters/generic/instructions.local.md with the absolute paths of this machine
  • adapters/generic/instructions.md is unchanged after that run
  • git status stays clean afterwards; the generated file does not show up as untracked
  • Reviewer with an existing install: run sa sync and confirm the repo stays clean

🤖 Generated with Claude Code

…late

install-adapters.py wrote the generated agents block, which contains the absolute
paths of the current machine, into adapters/generic/instructions.md. That file is
tracked, so every 'sa install' (and every 'sa sync pull', which calls the installer)
left the core repo dirty. A careless commit would publish a teammate's home path
to the public repo.

The generated block now goes to adapters/generic/instructions.local.md, matching the
existing *.local.* convention, and is git-ignored. The tracked instructions.md keeps
its $SHARED_AGENTS_HOME placeholders for reading on GitHub before a local install.
Docs and the generic tool hint point at the generated file.
@cursor

cursor Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Install output path and documentation only; no auth, sync hooks, or adapter merge logic changed beyond where the generic block is written.

Overview
sa install (and sync paths that run the installer) no longer writes machine-specific absolute paths into the tracked adapters/generic/instructions.md. That was dirtying the core repo after every session and risked committing a teammate’s home path.

Generated copy-paste blocks now go to git-ignored adapters/generic/instructions.local.md, aligned with other *.local.* files. The tracked instructions.md stays a placeholder template for GitHub; docs and the generic adapter hint in install-adapters.py point users at the local file after install.

Reviewed by Cursor Bugbot for commit 1d0082c. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

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

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant