Skip to content

feat: a session says when a newer adf release is available - #92

Draft
mauricios wants to merge 3 commits into
mainfrom
feat/release-available-notice
Draft

mauricios wants to merge 3 commits into
mainfrom
feat/release-available-notice

Conversation

@mauricios

Copy link
Copy Markdown
Contributor

Closes #88.

  • plugins/adf/hooks/session-context.sh: when the release in the stamp on AGENTS.md's first line (or CLAUDE.md's) is behind the framework repository's newest vX.Y.Z tag, prints "adf vX.Y.Z is available (this project is on vA.B.C) — run /adf:upgrade".
  • Asks with git ls-remote --tags --refs at most once a day, caches in ${XDG_CACHE_HOME:-~/.cache}/adf/ (outside the repository), gives up after 2 seconds, and says nothing offline or on a timeout; a failed check is cached too, so an offline machine doesn't wait every session. Pre-release tags are ignored.
  • Once per session (session ids kept in the cache folder).
  • UPDATE_CHECK in .claude/hooks/config.sh (skeleton) and _lib.sh's default: "1"; empty turns it off.
  • File writes go through tee: the Claude Directory check rejects redirects to computed paths.
  • Tests in evals/static/test-hooks.sh with a local repository standing in for the network: behind, current, offline, a hanging remote, cache hit, stale cache, once per session, off, unfilled stamp, no stamp.
  • CHANGELOG entry with its Upgrade impact.

scripts/build-committed.py --check and ./evals/run-evals.sh pass.

🤖 Generated with Claude Code

mauricios and others added 3 commits October 18, 2026 10:19
The session-context hook compares the release in AGENTS.md's stamp with
the framework repository's newest vX.Y.Z tag, asked with git ls-remote at
most once a day, cached under ~/.cache/adf, with a 2-second timeout and
silence offline. Once per session; UPDATE_CHECK in config.sh turns it off.

Closes #88

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mauricios

Copy link
Copy Markdown
Contributor Author

On hold. The concern is the overhead it adds to every session. Measured: on a cached day the hook takes the same time with the check on or off; the first session of the day on a machine waits up to 2 s for git ls-remote (about 1 s on a normal network). If this resumes, the daily check could run in the background so no session waits, with the notice showing from the next session.

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.

Say when a newer adf release is available

1 participant