diff --git a/extensions/code-tutor/README.md b/extensions/code-tutor/README.md index e63cb04..ed0ab56 100644 --- a/extensions/code-tutor/README.md +++ b/extensions/code-tutor/README.md @@ -4,6 +4,8 @@ Turns the current codebase into a personal CS course. The agent reads your repo A GitHub Copilot App **canvas extension**: the agent and the user share the same live state through the same action handlers, and the view renders with Preact + htm and a vendored kit, with no build step and no `package.json`. + + ## What it does - **Extracts CS concepts from the code** and files each under a category (algorithm, data structure, complexity, theory, pattern, paradigm, concurrency, system). @@ -15,6 +17,82 @@ A GitHub Copilot App **canvas extension**: the agent and the user share the same - **Code review**: flags good / ok / bad spots (perf, wrong data structures, suboptimal algorithms). When the board knows its GitHub `owner/repo`, each issue gets a one-click **Fix in a new session** deep link (`ghapp://session/new`) that opens a dedicated Copilot session to run the fix; otherwise it copies a ready-to-run prompt for the agent to pick up. - **Freshness tracking**: fingerprints the code (git HEAD + newest file mtime) at analysis time, re-checks on a visibility-gated timer, and shows a "code changed, refresh" banner plus an always-available Refresh button. Code Tutor never re-analyzes on its own; analysis is the agent's job, so the Refresh button injects a re-analysis prompt into the current Copilot session. +## A guided tour + +Every shot below comes from the built-in demo board (see [Demo mode](#demo-mode)), so you can reproduce them yourself. + +### Adjustable reading level + + + +One global slider from ELI5 to Wizard. Drag it and every topic re-explains itself at that depth. + +### Concept library cache + + + +Generic, codebase-independent explanations are cached once and reused across boards. A reused one is tagged, so you know it did not cost another model call. + +### Filed by category, filtered by progress + + + +Each concept is filed under a category (algorithm, data structure, complexity, theory, pattern, paradigm, concurrency, system). Filter by category or by how far along you are. + +### Points at real code + + + +Every topic and finding links to a file and line range. Expand a reference to read the real source, highlighted, straight from disk. + +### Mark your understanding + + + +Track each topic as Understood, Not understood, Revisit, or New. The header ring shows how much you have understood. + +### Ask and clarify + + + +Ask questions per topic or globally, at a chosen level. Answers land in the panel without polluting the chat. + +### Code review + + + +Good / ok / bad spots with the reasoning. When the board knows its `owner/repo`, each issue gets a one-click **Fix in a new session** deep link. + +### Freshness tracking + + + +The board fingerprints the code and flags when it drifts. The Refresh button hands a re-analysis prompt to the agent. + +## Demo mode + +Want to see Code Tutor fully populated without analyzing a repo first? Seed a demo board: + +``` +node demo/seed.mjs # writes a "demo" board to your COPILOT_HOME +node demo/seed.mjs --domain demo # pick the board name (default: demo) +node demo/seed.mjs --home