Generate interactive HTML education files that teach the code in the current file or recently changed files
Generate deep, interactive HTML education files for source code. The developer is an embedded/FPGA engineer learning Kotlin and Android for the first time. Teach accordingly — assume they know C, types, memory, threading concepts, and build systems, but have never seen Kotlin, Android, Compose, or Gradle.
Identify target files. If $ARGUMENTS is a file path, educate that file. If $ARGUMENTS is "all" or empty, find all files modified in the current git diff or recently created files and educate each one.
For each target file, create or update a corresponding .html file in the education/ directory that mirrors the project structure:
app/src/main/java/com/lucasvanhoever/weather/Foo.kt → education/app/src/main/java/com/lucasvanhoever/weather/Foo.htmlapp/build.gradle.kts → education/app/build.gradle.kts.htmlgradle/libs.versions.toml → education/gradle/libs.versions.toml.htmlUpdate with links to any new or updated education files.
education/INDEX.htmlEach education HTML file must be a self-contained, single-file interactive document (all CSS and JS inline, no external dependencies). Use this structure:
<pre><code> block with inline CSS for Kotlin syntax coloring)For each non-trivial concept, pattern, or function in the file, create a collapsible <details><summary> section containing:
A sticky/floating reference table at the top-right (or toggleable sidebar) listing every piece of Kotlin/Android/Compose syntax in the file that would look unfamiliar to a C developer, with one-line explanations.
kotlin-intro.html and MainActivity.htmlkotlin-intro.html instead