Repository navigation
Conversation
…tartup greeting
The startup greeting now carries the framework version resolved locally,
once per new conversation:
AI-Driven Development On ⚡ · Framework v<version> · [Releases](https://github.com/ai-driven-dev/framework/releases)
<version> is read from the "version" field of .claude-plugin/marketplace.json
at the repository root — the framework release version, kept equal to the "."
entry of .release-please-manifest.json by release-please. When it cannot be
established, the greeting displays "Framework version unknown". The CLI
version, a plugin version, and the root package.json 0.0.0 placeholder are
never substituted.
- AGENTS.md, CLAUDE.md and cli/CLAUDE.md carried three drifted greetings;
they now share one canonical instruction (drift tracked by #619).
- Version-source decision recorded in
aidd_docs/memory/internal/decisions/startup-greeting-resolves-framework-version-locally.md
Verified in new OpenCode sessions: in this worktree the greeting reads
"Framework v5.12.0" after a local read of .claude-plugin/marketplace.json;
in a project without that file it reads "Framework version unknown".
aidd-dev check passes (527 test files, 6866 tests).
Implements the visible behavior of #980. The update-notification half
(CLI surface, plugin-owned startup check, cached remote comparison,
install provenance) stays open.
…g, bumped by release PRs
The greeting in AGENTS.md, CLAUDE.md and cli/CLAUDE.md now carries the literal
release version ("Framework v5.12.0"), annotated with x-release-please-version,
and the three files join the root package's extra-files in
release-please-config.json. Every release PR bumps the stamped version, alongside
marketplace.json: the version is dynamic, delivered by the pull request process.
This replaces the previous runtime-resolution instruction (the agent read
marketplace.json at conversation start): non-deterministic, and "Framework
version unknown" in projects installed from the marketplace, where no
marketplace.json exists at the project root. The agent now repeats the greeting
verbatim.
Decision: aidd_docs/memory/internal/decisions/startup-greeting-carries-the-framework-release-version.md
Verified in new OpenCode sessions in the feature worktree: the greeting shows
v5.12.0 verbatim; with only the agent file present (no marketplace.json) it still
shows v5.12.0; simulating a release PR (Generic updater logic applied to the
annotated lines, 5.12.0 -> 5.13.0) shows v5.13.0. aidd-dev check passes.
Implements the visible behavior of #980. The update-notification half (CLI
surface, plugin-owned startup check, cached remote comparison, install
provenance) stays open.
…script The startup greeting carries the framework release version, stamped by scripts/sync-greeting-version.mjs: the script reads the release version from .claude-plugin/marketplace.json (as cut on the next branch) and rewrites Framework v<semver> on the greeting line of every target — the framework's own agent files (AGENTS.md, CLAUDE.md, cli/CLAUDE.md) and the usage template shipped to user projects (plugins/aidd-context/skills/02-project-memory/assets/templates/AGENTS.md). The usage template gains the greeting (it had none since 4446fff), so a project set up from a release greets with that release's version. A lefthook pre-commit hook (sync-greeting-version, same pattern as sync-readme-counts) runs the script on every commit and re-stages the touched files, so the greeting never drifts from the release. The script is idempotent and supports --check. This replaces the release-please extra-files stamping from the previous commit: the upkeep now belongs to the framework's own transformation script, matching the issue's direction that the framework generates information dynamically with tooling. Decision: aidd_docs/memory/internal/decisions/startup-greeting-carries-the-framework-release-version.md Verified: 5 new tests for the script pass; simulating a release (marketplace version 5.12.0 -> 5.13.0) and running the script re-stamps all four targets to v5.13.0; a new OpenCode session in a project built from the template greets with "Framework v5.12.0" verbatim. aidd-dev check passes.
…tart The greeting no longer carries a version stamped into the agent files: a copied template goes stale at the first upgrade and is shared by every teammate. aidd-context's SessionStart script reads the marketplace version from the installation's own provenance (Claude Code cache, aidd CLI record, local marketplace) and hands it to the conversation, or reports it unknown. A newer release on the same GitHub source and branch is announced from a 24h cache refreshed by a detached child, with the update path of the installation mode; pinned refs, local checkouts and other hosts are never compared and nothing is installed. OpenCode's generated bridge now forwards SessionStart output to every model call (V1 system transform, V2 context hook). The CLI menu gains a CLI version entry over `aidd update --check`. Refs #980
…ctory On Windows a live child's working directory cannot be removed, so the detached refresh held the project for up to its fetch timeout. The test sandbox resolves macOS's symlinked temp dir.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 What & why
Implements #980: the startup greeting names the installed framework release, and a newer release from the same source is announced, read at session start rather than written into the agent files.
This replaces the earlier iterations on this branch. Stamping
Framework v5.12.0into theAGENTS.mdtemplate failed the issue's own criterion ("after an upgrade, a new conversation resolves the updated installed version"). The template is copied into a project once: the version goes stale at the first upgrade, and every teammate shares it whatever they installed. The stamping script, its lefthook entry and its decision record are removed.🛠️ How it works
plugins/aidd-context/hooks/framework-version.cjs, declared inhooks.jsonSessionStartadditionalContext. When a newer release is known, it also returns asystemMessage, which Claude Code and Codex show without going through the modelAGENTS.mdtemplate + the framework's ownAGENTS.md/CLAUDE.md/cli/CLAUDE.mdFramework v{version}, taken from theAIDD framework:context, orFramework version unknown. The update notice is quoted verbatimopencode-hooks-bridge.ts,opencode-events.js.txtSessionStartstdout. It now captures it and adds it to every model call: V1 throughexperimental.chat.system.transform, V2 throughsession.hook("context")menu-use-case.tsaidd update --check(same self-update check and cache, no new checker)Provenance, in resolution order. Anything else is reported as
unknown:<plugins>/cache/<mkt>/<plugin>/<ver>→known_marketplaces.json→ the marketplace clone'smarketplace.json/plugin marketplace update <mkt>, then/pluginaiddCLI copy (OpenCode, Codex flat…).aidd/manifest.json→marketplaces.json(project scope, then user scope)aidd marketplace refresh <mkt>, thenaidd plugin update.claude-plugin/marketplace.jsonRemote check:
raw.githubusercontent.com/<repo>/<ref or HEAD>/.claude-plugin/marketplace.json, which is the same component, source and channel.mainonly ever holds released versions. Pinned tags and commits, local checkouts and non-GitHub hosts are never compared. The result is cached for 24h in the CLI's own cache directory (<aidd config>/cache/framework-release-check.json, purged byaidd clean) and refreshed by a detached child. A session start never waits on the network. An unreachable source keeps the previous answer, or gives none, and never reads as "up to date". Cost of this design: the first session after the cache expires learns nothing new; the next one does.🧪 How to verify
Gates:
lefthook run pre-commit15/15 ✔️ ·lefthook run pre-push: knip ✔️, CLI 6871 passed / 1 skipped ·node --test scripts/__tests__/*.test.js618 passed.New tests:
scripts/__tests__/framework-version.test.js(10): Claude cache layout, newer / equal / older release, stale cache claimed, local directory never compared, CLI copy at project and user scope, pinned ref never compared, unknown install, background refresh against a local HTTP server, unreachable source keeps the previous answer.opencode-hooks-bridge-session-context.integration.test.ts(4): V1 transform, V2 context hook plus disposal, V2 host without a hook API, output parsing.Real remote check:
--refreshagainstraw.githubusercontent.com/ai-driven-dev/framework/HEAD/...recorded"latest":"5.12.0".Real sessions. Each is a new process. Projects were installed by the CLI built from this branch (
aidd setup --source local --ai opencode --plugins aidd-context), with theAGENTS.mdtemplate as their agent file, in a git-ignoredtmp/of the worktree:AI-Driven Development On ⚡ · Framework v5.12.0 · [Releases](…)5.13.0)v5.12.0+AIDD framework v5.13.0 is available (installed: v5.12.0). To update, run \aidd marketplace refresh aidd-framework`, then `aidd plugin update`. Nothing is installed automatically.`5.13.0)… Framework v5.13.0 …, no noticeAI-Driven Development On ⚡ · Framework version unknown · [Releases](…)latest)AI-Driven Development On ⚡ · Framework v5.12.0 · [Releases](…); instrumented, the V1experimental.chat.system.transformcarriedAIDD framework: v5.12.0…framework-version.cjsremovedAI-Driven Development On ⚡ · Framework version unknown · [Releases](…)--plugin-dirlocal plugin… Framework v5.12.0 …;hook_responsecarries the contextknown_marketplaces.jsonwith a GitHub source, newer release in cache/plugin marketplace update aidd-framework;systemMessagepresent in the streamOpenCode, server initialization vs conversation: instrumented, the V2
contexthook fired once per model call and the V1 transform was called only through it, so the context is never injected twice. The scripts run once at plugin initialization, so the version is resolved peropencodeprocess, not per conversation. Memory refresh (update_memory.js) still runs from the sameSessionStarttable.SessionStartcontract (additionalContext,systemMessage) is the one Claude Code honors, and Codex still requires each hook to be trusted once. Kilo's bridge is untouched, so Kilo is unverified. Copilot and Cursor are unverified as before.5.13.0cache entry: no release newer than 5.12.0 exists yet. The resolution and display code paths are the real ones.aiddCLI install reports the version recorded at its lastmarketplace add/refresh, which is the catalog its plugins came from. A user-scope CLI install, whose scripts live outside the project, resolves asunknown.CLAUDE.mdgreeting drops the date/TZ line for the canonical one. In this repo, OpenCode without an AIDD install greets withFramework version unknown. Claude Code with the repo'senabledPluginsresolves it.💬 On the issue comment (challenge)
[Releases]link, which shows the changes.✅ Acceptance criteria (#980)
aidd update --checkand menu System › Check for CLI update, reusing self-updateunknown🔗 Linked issue
Refs #980 (stays open until a Codex session proves the notice)