fix(skill): use native Gemini prompt for semantic cache - #2396
Conversation
There was a problem hiding this comment.
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
166b196 to
9cfc035
Compare
There was a problem hiding this comment.
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
Summary
prompt_kwargsSPEC_PATHfor subagent extraction, and_extraction_system(deep=DEEP_MODE)for the direct Gemini extraction pathTests
uv run --frozen python -m tools.skillgen --checkuv run --frozen python -m tools.skillgen --audit-coverageuv run --frozen python -m tools.skillgen --schema-singletonuv run --frozen python -m tools.skillgen --monolith-roundtripuv run --frozen python -m tools.skillgen --always-on-roundtripuv run --frozen pytest tests/test_skillgen.pyuv run --frozen ruff check tests/test_skillgen.pygit diff --checkuv run --frozen graphify update .Fixes #2303