Skip to content

fix(upgrade): leave agent surfaces alone unless --refresh-agents is passed - #333

Open
ardelperal wants to merge 1 commit into
mainfrom
fix/332-upgrade-no-agent-writes
Open

ardelperal wants to merge 1 commit into
mainfrom
fix/332-upgrade-no-agent-writes

Conversation

@ardelperal

Copy link
Copy Markdown
Owner

Summary

codegraph upgrade no longer rewrites agent surfaces by default. Instructions blocks, MCP entries and hooks are left as they are unless --refresh-agents is passed, and install skips any file that carries a <!-- gentle-ai: marker. Skills directories are never touched by upgrade or install, with or without the refresh flag.

Why

Upgrading to 2.1.1 added a <!-- CODEGRAPH_START --> block to the global CLAUDE.md/AGENTS.md files that gentle-ai manages, contradicting the CodeGraph guidance gentle-ai already installs there.

Changes

  • upgrade: agent-surface refresh is opt-in via --refresh-agents.
  • install: skips files containing a gentle-ai: marker; --refresh keeps that guard.
  • Tests: new __tests__/upgrade-agent-surfaces.test.ts (default upgrade, --refresh-agents, install, install --refresh, gentle-ai marker skip, skills directories unchanged) and an adjusted __tests__/upgrade.test.ts.
  • Docs: README and CHANGELOG.

Testing

npx vitest run __tests__/upgrade-agent-surfaces.test.ts __tests__/upgrade.test.ts: 80 tests pass, run with an isolated HOME.

Closes #332

…assed

`codegraph-vba upgrade` now skips the agent refresh and the Claude
prompt hook by default. `--refresh-agents` restores that behaviour and
the existing environment kill-switches still apply under it.

`install` and `install --refresh` no longer write the CodeGraph block
into an instruction file that already carries a gentle-ai marker. The
file is reported as skipped, and other files are unaffected.

The upgrade summary lists the agent surfaces it did not touch.

Refs #332

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.

upgrade must not rewrite agent instruction files, MCP entries or hooks by default

1 participant