feat: composable context-intelligence behaviors — logging / analytics / full#27
Open
colombod wants to merge 8 commits into
Open
feat: composable context-intelligence behaviors — logging / analytics / full#27colombod wants to merge 8 commits into
colombod wants to merge 8 commits into
Conversation
added 8 commits
June 2, 2026 10:17
56e58a6 to
ca10e89
Compare
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.
Intent
The context-intelligence logging hook was doing two unrelated jobs: session-event telemetry AND fetching/refreshing the
context-intelligence-graph-queryskill content from the server. Those concerns have different consumers — telemetry is wanted by anyone capturing sessions (ideal as an always-on--app), while skill-content sync is only relevant to the analytics path (thegraph-analystagent +graph_query/blob_readtools that actually use the skill). Coupling them forced all-or-nothing composition and put server-fetch + disk-write logic inside a telemetry hook.This PR separates the concerns: the bundle now exposes three composable behaviors (logging / analytics / full) so consumers pick exactly what they need, and the logging hook becomes pure telemetry.
What changed
1. Skill-content sync relocated: hook →
tool-graph-queryskill_fetcher.py(server fetch, ETag conditional GET, Bearer auth) andskill_sync.py(on_session_readyorchestration).on_session_readymechanism — not at hook-mount time.SKILL.mdhash has drifted, the.etag/.content_hashsidecars are invalidated (content retained) — so a stale ETag can't mask a local reset.skill:unloadedre-sync handler for mid-session reloads.2. Logging hook reduced to pure telemetry
skill_fetcher.py,legacy_content/, and the skill tests fromhook-context-intelligence. Hook__init__.py: 306 → 157 lines.3. Config-resolver correctness
_resolver→_hook_resolveracross both tools; the hook resolver is fetched lazily via capability inon_session_ready, not at mount.ToolConfigResolverenv/settings fallback for analytics-only mode (its earlier removal would have been a silent breaking change).${AMPLIFIER_CONTEXT_INTELLIGENCE_*}config placeholders are now expanded before the truthiness check, so analytics-only mode resolves the real server URL instead of a truthy literal that silently defeated the env fallback.4. Dependency hygiene
amplifier-corefrom the PyPI wheel (>=1.6.0) instead of a git/Rust source build — removes a maturin build hang and reverts an out-of-placev1.2.4downgrade.5. Documentation
--appinstall commands; expanded Development (per-module tests, the venv--reinstall --refreshcaveat, DTU pointer).docs/logging-handler-flow.dotrendering and addeddocs/context-intelligence-skill-sync-flow.dotfor the server-sync flow.bundle.dot/bundle.pngfor the 3-behavior split.AGENTS.md(setup, tests, DTU gate, pitfalls).Improvements & why they matter
Evidence
tool-graph-query87 ·tool-blob-read35 ·hook-context-intelligence299.tool_resolver.py(withuv sync --reinstall --refresh) turns the 3 placeholder tests RED (assert '${AMPLIFIER_…}' == 'secret'); restoring turns them GREEN — the regression test genuinely catches the bug.SKILL.mdpopulated with real server content (MATCH (×44) +.etag/.content_hashwritten; resolver returned the real URL.🤖 Generated with Amplifier
Commits and Files Changed
feat/spike-readonly-behaviour