kpkn-nutrition-ai

Translate and harden KPKN nutrition AI parsing for Android-native Kotlin/Compose.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/rotnitxe/KPKNFit --skill kpkn-nutrition-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kpkn-nutrition-ai
Source: https://github.com/rotnitxe/KPKNFit/tree/main/kpkn-nutrition-ai
Command: npx skills add https://github.com/rotnitxe/KPKNFit --skill kpkn-nutrition-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It helps you translate and safely evolve the KPKN nutrition AI workflow so Android free-form food logging produces trustworthy, review-aware results with correct save semantics and deterministic fallback.

Core Features & Use Cases

  • Android-first translation and validation: Port or validate behavior from the PWA nutrition pipeline into Kotlin/Compose, especially around free-form logging and drawer UX.
  • Robust AI + deterministic fallback: Ensure parsing never fails hard when local AI is missing or slow, while preserving the analyze-when-requested flow.
  • Correct resolution and persistence: Guarantee proper transformation from parsed items to LoggedFood, then write-through state updates into NutritionRepository (including Room-backed persistence) so the screen and stored logs stay consistent.
  • Locale-aware food parsing: Preserve Spanish/Chilean parsing intent, aliases/tokens, and protected phrases so behavior does not regress during refactors.
  • Guardrails against false certainty: Keep analysisEngine, modelVersion, containsEstimatedItems, and requiresReview semantics coherent and reflected honestly in the UI.

Quick Start

Use the kpkn-nutrition-ai skill to validate a proposed change to Local AI nutrition parsing in android-native and confirm the unresolved/estimated/review-required behavior and NutritionRepository save semantics still match the PWA oracle for the impacted flow.

Frequently Asked Questions about kpkn-nutrition-ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement fallback logic for local AI nutrition parsing in Kotlin?

Local AI nutrition parsing fallback in Kotlin ensures parseFreeFormNutrition degrades gracefully when the model is missing or slow, preserving safe contracts and deterministic behavior instead of failing hard.

How does Room-backed persistence work with StateFlow for LoggedFood in Android?

Room-backed persistence with StateFlow maintains write-through behavior in NutritionRepository, ensuring LoggedFood scaling and macros update both the Compose UI screen state and stored logs consistently.

What is the best way to port PWA nutrition parsing behavior to Android Compose?

Porting PWA nutrition parsing to Android Compose requires using the PWA as a behavioral oracle to validate that parsing orchestration, review-aware semantics, and locale-aware tokens produce matching results.

Does Kotlin nutrition parsing support Spanish or Chilean locale food tokens?

Kotlin nutrition parsing supports Spanish and Chilean locale intent by preserving aliases, tokens, and protected phrases during refactors so locale-aware food parsing behavior does not regress.

Why does my ParsedMealDescription contract break during Android refactoring?

ParsedMealDescription contracts break during refactoring when parsing orchestration merge logic fails to preserve safe contracts, requiring validation against the PWA oracle to ensure review-aware semantics remain coherent.

Can I use Compose UI to display requiresReview and containsEstimatedItems flags?

Compose UI can display requiresReview and containsEstimatedItems flags by reflecting analysisEngine and modelVersion semantics honestly in the FoodLoggerDrawer UX to guard against false certainty.