{"_id":"@bnjoroge/quiz-me","_rev":"2-9ba4ad57cacfc46547aa4df89afb02a8","name":"@bnjoroge/quiz-me","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@bnjoroge/quiz-me","version":"0.1.0","_id":"@bnjoroge/quiz-me@0.1.0","maintainers":[{"name":"bnjoroge","email":"williamsriunge@gmail.com"}],"bin":{"quiz-me":"dist/src/cli.js"},"dist":{"shasum":"b75aa30b4af9bbf98edd08c6357b2797987cc3fc","tarball":"https://registry.npmjs.org/@bnjoroge/quiz-me/-/quiz-me-0.1.0.tgz","fileCount":63,"integrity":"sha512-YEJRoKYHvSoQvCdty5LY2MDMnrczLxieIxLx6wmnEKQcJ4epwRv7TmXuGAJ4+kW1vC7UjPmGCvnLsLKhiCW6zA==","signatures":[{"sig":"MEUCIHDlPHoBDq2oJUNIuEmByuDebvhleiSvY5yP5dkgTHfBAiEA1gAGuHzDT8X2ZMMe4crO4QxTZdRPCphDlf2amgghwjQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116210},"type":"module","engines":{"node":">=22.5"},"gitHead":"9495320a937e8bdc9a2bcedf4bdd56bdb08fe62c","scripts":{"test":"npm run build && node --test dist/test/*.test.js","build":"tsc","start":"node dist/src/cli.js serve"},"_npmUser":{"name":"bnjoroge","email":"williamsriunge@gmail.com"},"_npmVersion":"11.12.1","description":"Context-aware quiz plugin for coding agents","directories":{},"_nodeVersion":"26.0.0","dependencies":{"better-sqlite3":"^12.11.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.10","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/quiz-me_0.1.0_1782058355421_0.01808064522505104","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bnjoroge/quiz-me","version":"0.1.1","description":"Context-aware quiz plugin for coding agents","type":"module","bin":{"quiz-me":"dist/src/cli.js"},"scripts":{"build":"tsc","test":"npm run build && node --test dist/test/*.test.js","start":"node dist/src/cli.js serve"},"engines":{"node":">=22.5"},"devDependencies":{"@types/better-sqlite3":"^7.6.13","@types/node":"^22.13.10","typescript":"^5.8.2"},"dependencies":{"better-sqlite3":"^12.11.1"},"gitHead":"5889f292ca373856eb76c84767590ae4f32c9e8c","_id":"@bnjoroge/quiz-me@0.1.1","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-ggyIOhA4cya8/o8MO/mJjfuemRXtVUyU96ZjAdH0YdPpo5UXqxA7ZqJr5iRCOghaBMtQi8Urf3oX9EETzs/sDg==","shasum":"764cda9c2f3dedd4adc3a41b380d3e67aacb26e4","tarball":"https://registry.npmjs.org/@bnjoroge/quiz-me/-/quiz-me-0.1.1.tgz","fileCount":63,"unpackedSize":116208,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC/JyXoXBfh9QjATxbMLiIxmWHCQQGv+ZpZzzohiZ5m6AIhAM88M0Mzn0T45Ku7uacjY6P43lfsDKg0PuhYL+dk3P1h"}]},"_npmUser":{"name":"bnjoroge","email":"williamsriunge@gmail.com"},"directories":{},"maintainers":[{"name":"bnjoroge","email":"williamsriunge@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/quiz-me_0.1.1_1782058521543_0.8835336187142153"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T16:12:35.235Z","modified":"2026-06-21T16:15:21.792Z","0.1.0":"2026-06-21T16:12:35.614Z","0.1.1":"2026-06-21T16:15:21.693Z"},"description":"Context-aware quiz plugin for coding agents","maintainers":[{"name":"bnjoroge","email":"williamsriunge@gmail.com"}],"readme":"# quiz-me\n\nContext-aware quiz plugin for coding agents (Oh My Pi, Claude Code, Codex). Generates quizzes testing your understanding of the current task/code using the host agent's own model — no separate API key.\n\n## Features\n\n- **Three scope modes**: uncommitted changes, whole project, or diff against a branch\n- **Varying difficulty**: recall, apply, analyze questions\n- **Question kinds**: code comprehension, plan-vs-code alignment, design reasoning\n- **SQLite persistence**: quizzes and attempts saved locally\n- **Browser UI**: local HTTP server at `http://127.0.0.1:<port>`\n- **Auto-hook**: fires after code review turns (like Plannotator for plans)\n- **Manual command**: `/quiz-me` on demand\n\n## Install\n\n```bash\nnpm install -g .\n# or from repo:\nnpm install && npm run build\n```\n\n## Usage\n\n```bash\n# Start server (idempotent)\nquiz-me serve\n\n# Generate quiz prompt (agent reads this and POSTs JSON back)\nquiz-me generate --scope uncommitted --difficulty mix\nquiz-me generate --scope whole\nquiz-me generate --scope branch --branch main\n\n# Check status / list quizzes\nquiz-me status\nquiz-me list\n```\n\n## Platform adapters\n\n```bash\nquiz-me install --platform oh-my-pi\nquiz-me install --platform claude-code\nquiz-me install --platform codex\n```\n\n## Architecture\n\nThe agent generates quiz JSON using its own model; the server persists, serves, and grades. See `docs/quiz-me-plugin-plan.md` for full design.\n\n## How it uses your Claude/Codex subscription (no API key)\n\nquiz-me **never calls an LLM directly**. The flow is:\n\n1. `quiz-me generate --scope whole` prints a **prompt template** to stdout\n2. The prompt tells the agent: \"Output ONLY a JSON quiz object matching this schema\"\n3. The **agent's own model** (Claude, Codex, etc.) generates the quiz JSON\n4. The agent POSTs the JSON to `http://127.0.0.1:<port>/api/quizzes`\n5. The server persists to SQLite and opens the browser UI\n\nThere are **zero** OpenAI/Anthropic SDK calls in the quiz-me source — no API key needed.\n\n```bash\nnode dist/src/cli.js generate --scope whole --difficulty mix\n# Agent reads stdout prompt → generates JSON → POSTs to printed URL\n```\n\n## Prompt (what the agent receives)\n\nThe prompt (`src/prompt.ts` → `buildPrompt()`) includes:\n\n- **JSON schema** — exact shape: `{summary, questions[{difficulty, kind, type, prompt, options, answer, explanation, codeRef}]}`\n- **Rules** — MC (4 options), true/false (`\"true\"|\"false\"`), short-answer; difficulty counts (3 recall, 5 apply, 2 analyze); kind distribution\n- **Context sections**:\n  - `## Plan` — contents of `docs/plan.md` (or `PLAN.md`, `plan.md`, etc.)\n  - `## Diff` — unified diff from git (scope-dependent)\n  - `## Files` — file paths + line counts\n\nFull docs: [docs/prompt-and-subscription.md](docs/prompt-and-subscription.md)\n\n## Screenshots (real quiz generated by Claude)\n\nThese screenshots were captured from a real quiz about the quiz-me repo itself, generated by **Claude Sonnet 4** (using its own Anthropic subscription, no proxy) by feeding it the prompt from `quiz-me generate --scope whole --difficulty mix`.\n\n| View | Screenshot |\n|------|------------|\n| Quiz list | ![list](docs/screenshots/claude-01-quiz-list.png) |\n| Multiple choice (Q1: architecture) | ![mc](docs/screenshots/claude-02-question-mc.png) |\n| True/false (Q3) | ![tf](docs/screenshots/claude-03-question-tf.png) |\n| Short answer (Q5) | ![short](docs/screenshots/claude-04-question-short.png) |\n| Results (auto-scored) | ![results](docs/screenshots/claude-05-results.png) |\n\nRe-create them (with Claude directly, bypassing cliproxy):\n```bash\n# Start server\nquiz-me serve\n\n# Generate prompt\nquiz-me generate --scope whole --difficulty mix > /tmp/prompt.txt\nsed '$d' /tmp/prompt.txt > /tmp/prompt-only.txt  # strip POST instruction\n\n# Have Claude generate the quiz (uses its own auth — no proxy)\nenv -u ANTHROPIC_BASE_URL -u ANTHROPIC_AUTH_TOKEN \\\n  claude -p \"$(cat /tmp/prompt-only.txt)\" --print > /tmp/claude-output.txt\n\n# Extract JSON from ```json block\nQUIZ_JSON=$(sed -n '/^```json/,/^```/p' /tmp/claude-output.txt | sed '1d;$d')\n\n# POST to server\ncurl -X POST http://127.0.0.1:4317/api/quizzes?scope=whole \\\n  -H \"Content-Type: application/json\" -d \"$QUIZ_JSON\"\n\n# Open browser\nopen http://127.0.0.1:4317/\n```\n\nSeed the demo quiz: `./scripts/seed-demo.sh 4317` then open `http://127.0.0.1:4317/`.\n","readmeFilename":"README.md"}