| name | frontend-cache-coherence |
| description | Use when auditing or changing Hussh frontend cache-first screen behavior, warm-cache UX, stale-while-revalidate resources, route TTL policy, or reviewer-backed cache coherence checks. |
Hussh Frontend Cache Coherence Skill
Purpose and Trigger
- Primary scope:
frontend-cache-coherence
- Trigger on cache-first screen UX, route TTL policy, stale-while-revalidate resources, warm-cache audits, and reviewer-backed cache checks.
- Avoid overlap with
frontend-architecture, frontend-native-surface-mapper, and vault-pkm-governance.
Coverage and Ownership
- Role:
spoke
- Owner family:
frontend
Owned repo surfaces:
hushh-webapp/lib/cache
hushh-webapp/lib/services/cache-service.ts
hushh-webapp/lib/cache/cache-sync-service.ts
hushh-webapp/scripts/architecture/audit-cache-coherence.mjs
hushh-webapp/cache-coherence-screen-manifest.generated.json
docs/reference/architecture/cache-coherence.md
docs/reference/quality/app-surface-design-system.md
Non-owned surfaces:
frontend
frontend-architecture
frontend-native-surface-mapper
vault-pkm-governance
Do Use
- Screen-level cache posture audits and warm-cache UX fixes.
- Resource hooks, TTL policy, background refresh, and cache invalidation contract work.
- Reviewer-backed checks proving protected routes do not block on loaders when cache is warm.
Do Not Use
- Broad route inventory or package-script ownership; use
frontend-architecture.
- Route/API/native/plugin mapping; use
frontend-native-surface-mapper.
- PKM protocol, vault key, or encrypted storage boundary changes; use
vault-pkm-governance.
Read First
docs/reference/architecture/cache-coherence.md
docs/reference/quality/app-surface-design-system.md
hushh-webapp/cache-coherence-screen-manifest.generated.json
hushh-webapp/scripts/testing/verify-signed-in-routes.mjs
hushh-webapp/lib/cache/use-stale-resource.ts
Workflow
- Classify the prompt claim as existing, partial, missing, future-state, wrong-direction, or needs-verification.
- Run the cache and manifest checks before trusting screen coverage.
- Preserve the security posture: decrypted PKM, vault keys, and consent secrets stay memory-only.
- Use
useStaleResource or a service-owned resource wrapper for warm-cache rendering.
- Route all mutation invalidation through
CacheSyncService or a domain service that delegates to it.
- Use reviewer env identity only through the existing resolver; never hardcode reviewer values.
- Treat performance as part of cache coherence: choose the safest available UX path before showing a blocking loader.
- Verify route/cache KPI coverage for changed screens: readiness, resource resolution, refresh completion, and warmup where applicable.
- Keep performance events metadata-only: route ID, resource class, cache tier, freshness, result, duration bucket, and footprint bucket. Never emit raw cache keys, user IDs, workflow IDs, PKM payloads, prompts, or decrypted values.
- When a route split reuses an existing workspace, regenerate and verify
cache-coherence-screen-manifest.generated.json; every canonical nested route needs explicit route readiness/resource-class coverage even if the cache posture is inherited from the parent workspace.
Handoff Rules
- If route inventory, package scripts, or generated surface-map shape changes, hand off to
frontend-architecture.
- If native parity or API dependency mapping changes, hand off to
frontend-native-surface-mapper.
- If PKM/vault persistence semantics change, hand off to
vault-pkm-governance.
- If browser proof policy changes, hand off to
quality-contracts.
Required Checks
cd hushh-webapp && npm run verify:cache
cd hushh-webapp && npm run audit:cache-coherence
cd hushh-webapp && npm run verify:analytics
cd hushh-webapp && npm run verify:surface-map
cd hushh-webapp && npm run verify:service-boundary