Skip to content

fix(skill): use native Gemini prompt for semantic cache - #2396

Open
zrh805 wants to merge 1 commit into
Graphify-Labs:v8from
zrh805:codex/fix-gemini-cache-prompt
Open

fix(skill): use native Gemini prompt for semantic cache#2396
zrh805 wants to merge 1 commit into
Graphify-Labs:v8from
zrh805:codex/fix-gemini-cache-prompt

Conversation

@zrh805

@zrh805 zrh805 commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • route split-host skill semantic cache reads and writes through shared prompt_kwargs
  • use SPEC_PATH for subagent extraction, and _extraction_system(deep=DEEP_MODE) for the direct Gemini extraction path
  • regenerate skill artifacts and expected snapshots
  • update skillgen regression coverage for the shared prompt identity

Tests

  • uv run --frozen python -m tools.skillgen --check
  • uv run --frozen python -m tools.skillgen --audit-coverage
  • uv run --frozen python -m tools.skillgen --schema-singleton
  • uv run --frozen python -m tools.skillgen --monolith-roundtrip
  • uv run --frozen python -m tools.skillgen --always-on-roundtrip
  • uv run --frozen pytest tests/test_skillgen.py
  • uv run --frozen ruff check tests/test_skillgen.py
  • git diff --check
  • uv run --frozen graphify update .

Fixes #2303

@graphify-labs graphify-labs 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.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Graphify reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).


Graphify review — findings

This PR updates the graphify skill files (skill-agents.md, skill-amp.md, skill-claw.md, and other platform variants) and their corresponding expected-output fixtures/tests to add a second cache-prompt code path for native Gemini extraction. The extraction cache steps (B0 and B3) now branch on whether GEMINI_API_KEY/GOOGLE_API_KEY is set, using _extraction_system(deep=DEEP_MODE) as the prompt identity on the Gemini direct path instead of the SPEC_PATH file used on the subagent path. The surface area spans the generated skill markdown across many platforms, the skillgen fragment/expected files, and the skillgen test suite. The intent is to keep cache reads and writes aligned to the same prompt fingerprint the native Gemini extractor uses so cached files aren't missed (referencing issue #2303).

No blocking issues surfaced. 4 lower-confidence candidates did not survive cross-model review.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 852 functions depend on the 852 functions this change touches.

Health — grade A; 1 existing hotspot(s) in the area this change touches (pre-existing, not introduced here):

  • test_audit_catches_a_dropped_non_allowlisted_heading() — 0 callers, 6 callees (medium)

Verification — 852 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 852 function(s) in the blast radius were not formally verified this run

@zrh805
zrh805 force-pushed the codex/fix-gemini-cache-prompt branch from 166b196 to 9cfc035 Compare August 3, 2026 01:42

@graphify-labs graphify-labs 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.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Graphify reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).


Graphify review — findings

This PR updates the graphify skill files (and their generated/expected counterparts plus skillgen fragments and tests) to handle prompt identity differently for the Gemini direct extraction path versus the subagent path. In the cache read (Step B0) and cache write (Step B3) steps, it now branches on whether GEMINI_API_KEY/GOOGLE_API_KEY is set, passing prompt=_extraction_system(deep=DEEP_MODE) for the Gemini native extractor instead of prompt_file=SPEC_PATH. Accompanying documentation, expected-output fixtures, and skillgen tests are updated to reflect this dual-path prompt-kwargs behavior (referencing #2303).

No blocking issues surfaced. 4 lower-confidence candidates did not survive cross-model review.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 852 functions depend on the 852 functions this change touches.

Health — grade A; 1 existing hotspot(s) in the area this change touches (pre-existing, not introduced here):

  • test_audit_catches_a_dropped_non_allowlisted_heading() — 0 callers, 6 callees (medium)

Verification — 852 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 852 function(s) in the blast radius were not formally verified this run

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.

SKILL.md Step B0 checks the cache with the wrong prompt key on the Gemini path — cache never replays, every run re-bills full extraction

1 participant