keating 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +334 -0
- package/SYSTEM.md +33 -0
- package/bin/keating.js +31 -0
- package/dist/src/cli/main.js +357 -0
- package/dist/src/cli/setup.js +197 -0
- package/dist/src/cli/web.js +84 -0
- package/dist/src/core/animation.js +304 -0
- package/dist/src/core/ax-optimizer.js +81 -0
- package/dist/src/core/ax-prompt-learner.js +59 -0
- package/dist/src/core/ax-trial.js +181 -0
- package/dist/src/core/benchmark.js +253 -0
- package/dist/src/core/commands.js +57 -0
- package/dist/src/core/config.js +120 -0
- package/dist/src/core/engagement.js +235 -0
- package/dist/src/core/env.js +9 -0
- package/dist/src/core/evolution.js +242 -0
- package/dist/src/core/flashcards.js +133 -0
- package/dist/src/core/learner-state.js +108 -0
- package/dist/src/core/lesson-plan.js +155 -0
- package/dist/src/core/map-elites.js +228 -0
- package/dist/src/core/map.js +89 -0
- package/dist/src/core/mastery.js +207 -0
- package/dist/src/core/paths.js +100 -0
- package/dist/src/core/pi-agent.js +82 -0
- package/dist/src/core/policy.js +79 -0
- package/dist/src/core/project.js +337 -0
- package/dist/src/core/projects.js +281 -0
- package/dist/src/core/prompt-evolution.js +344 -0
- package/dist/src/core/quiz.js +194 -0
- package/dist/src/core/random.js +19 -0
- package/dist/src/core/self-improve.js +425 -0
- package/dist/src/core/speech.js +54 -0
- package/dist/src/core/terminal.js +117 -0
- package/dist/src/core/theme.js +101 -0
- package/dist/src/core/topics.js +620 -0
- package/dist/src/core/types.js +1 -0
- package/dist/src/core/util.js +30 -0
- package/dist/src/core/verification.js +162 -0
- package/dist/src/pi/hyperteacher-extension.js +573 -0
- package/dist/src/runtime/pi.js +343 -0
- package/package.json +78 -0
- package/pi/prompts/bridge.md +14 -0
- package/pi/prompts/diagnose.md +15 -0
- package/pi/prompts/improve.md +39 -0
- package/pi/prompts/learn.md +21 -0
- package/pi/prompts/quiz.md +14 -0
- package/pi/skills/adaptive-teaching/SKILL.md +33 -0
- package/scripts/install/install.sh +308 -0
- package/web/dist/.well-known/llms.txt +44 -0
- package/web/dist/apple-touch-icon.svg +10 -0
- package/web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/web/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/web/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/web/dist/assets/_baseFor-B_cjfMB6.js +1 -0
- package/web/dist/assets/anthropic-BT6Vfzb1.js +36 -0
- package/web/dist/assets/arc-x2nTilpc.js +1 -0
- package/web/dist/assets/architecture-YZFGNWBL-B1hlUWjX.js +1 -0
- package/web/dist/assets/architectureDiagram-Q4EWVU46-CMApWFyw.js +36 -0
- package/web/dist/assets/array-B9UHiPd-.js +1 -0
- package/web/dist/assets/azure-openai-responses-CommX3YJ.js +1 -0
- package/web/dist/assets/blockDiagram-DXYQGD6D-DOQbsNRY.js +132 -0
- package/web/dist/assets/c4Diagram-AHTNJAMY-VFfRZWWA.js +10 -0
- package/web/dist/assets/channel-KY2Tg8Ba.js +1 -0
- package/web/dist/assets/chunk-2KRD3SAO-B-AqvS0u.js +1 -0
- package/web/dist/assets/chunk-336JU56O-DlYgPyl6.js +2 -0
- package/web/dist/assets/chunk-426QAEUC-CsVoBkfR.js +1 -0
- package/web/dist/assets/chunk-4BX2VUAB-0Z13aFAn.js +1 -0
- package/web/dist/assets/chunk-4TB4RGXK-DqC0Zwm7.js +206 -0
- package/web/dist/assets/chunk-55IACEB6-CWE_u-IY.js +1 -0
- package/web/dist/assets/chunk-5FUZZQ4R-CApli0xX.js +62 -0
- package/web/dist/assets/chunk-5PVQY5BW-Cbzhfhln.js +2 -0
- package/web/dist/assets/chunk-67CJDMHE-Cx7uJS4d.js +1 -0
- package/web/dist/assets/chunk-7N4EOEYR-CYPNsFus.js +1 -0
- package/web/dist/assets/chunk-AA7GKIK3-rU0uhR_u.js +1 -0
- package/web/dist/assets/chunk-BSJP7CBP-5VmcfR4-.js +1 -0
- package/web/dist/assets/chunk-Bj-mKKzh.js +1 -0
- package/web/dist/assets/chunk-CIAEETIT-CHJ-L8H1.js +1 -0
- package/web/dist/assets/chunk-EDXVE4YY-DZHAJjMI.js +1 -0
- package/web/dist/assets/chunk-ENJZ2VHE-DbUDFa7w.js +10 -0
- package/web/dist/assets/chunk-FMBD7UC4-BsYE5e_h.js +15 -0
- package/web/dist/assets/chunk-FOC6F5B3-Cm6aoTv7.js +1 -0
- package/web/dist/assets/chunk-ICPOFSXX-C5eNZ4L6.js +123 -0
- package/web/dist/assets/chunk-K5T4RW27-R7dAJ4rq.js +94 -0
- package/web/dist/assets/chunk-KGLVRYIC-MO99YZXL.js +1 -0
- package/web/dist/assets/chunk-LIHQZDEY-DUJ656sT.js +1 -0
- package/web/dist/assets/chunk-ORNJ4GCN-DXuuEC1n.js +1 -0
- package/web/dist/assets/chunk-OYMX7WX6-pJlEprWq.js +231 -0
- package/web/dist/assets/chunk-QZHKN3VN-_pQxbbiW.js +1 -0
- package/web/dist/assets/chunk-U2HBQHQK-Mh_l9PLe.js +70 -0
- package/web/dist/assets/chunk-X2U36JSP-BOeiJW0w.js +1 -0
- package/web/dist/assets/chunk-XPW4576I-fQ9SDvr_.js +32 -0
- package/web/dist/assets/chunk-YZCP3GAM-eboO4P5S.js +1 -0
- package/web/dist/assets/chunk-ZZ45TVLE-Cky0eqlr.js +1 -0
- package/web/dist/assets/classDiagram-6PBFFD2Q-DEPsZSU3.js +1 -0
- package/web/dist/assets/classDiagram-v2-HSJHXN6E-DhmIOEpX.js +1 -0
- package/web/dist/assets/clone-DeTzYqo8.js +1 -0
- package/web/dist/assets/cose-bilkent-S5V4N54A-N4zWUJ7C.js +1 -0
- package/web/dist/assets/cytoscape.esm-BBMd0vGm.js +321 -0
- package/web/dist/assets/dagre-IpK1aoMm.js +1 -0
- package/web/dist/assets/dagre-KV5264BT-DCytJuju.js +4 -0
- package/web/dist/assets/defaultLocale-5eAKkKJC.js +1 -0
- package/web/dist/assets/diagram-5BDNPKRD-Cv4miBae.js +10 -0
- package/web/dist/assets/diagram-G4DWMVQ6-CtICKUFi.js +24 -0
- package/web/dist/assets/diagram-MMDJMWI5-Cn7aGorh.js +43 -0
- package/web/dist/assets/diagram-TYMM5635-CCUWDPsC.js +24 -0
- package/web/dist/assets/dist-Dm98VvTW.js +1 -0
- package/web/dist/assets/env-api-keys-BNlMKqxw.js +1 -0
- package/web/dist/assets/erDiagram-SMLLAGMA-uT88sBlT.js +85 -0
- package/web/dist/assets/event-stream-D33K9rpL.js +1 -0
- package/web/dist/assets/flatten-C-u5nd5-.js +1 -0
- package/web/dist/assets/flowDiagram-DWJPFMVM-Bl3O7S1m.js +162 -0
- package/web/dist/assets/ganttDiagram-T4ZO3ILL-B1FhwV45.js +292 -0
- package/web/dist/assets/gitGraph-7Q5UKJZL-Bc_7vzer.js +1 -0
- package/web/dist/assets/gitGraphDiagram-UUTBAWPF-DfW6svMS.js +106 -0
- package/web/dist/assets/github-copilot-headers-L39QqneT.js +1 -0
- package/web/dist/assets/google-BdYNeCP_.js +1 -0
- package/web/dist/assets/google-gemini-cli-DpxAL3K4.js +2 -0
- package/web/dist/assets/google-shared-DyQdgtsI.js +2 -0
- package/web/dist/assets/google-vertex-CKRybaXj.js +1 -0
- package/web/dist/assets/graphlib-CMTVFyOZ.js +1 -0
- package/web/dist/assets/hash-kZ2KD_no.js +1 -0
- package/web/dist/assets/index-Bdb7P7gx.css +2 -0
- package/web/dist/assets/index-DNxepp8B.js +2891 -0
- package/web/dist/assets/info-OMHHGYJF-BGcxeaZt.js +1 -0
- package/web/dist/assets/infoDiagram-42DDH7IO-BbES7X_c.js +2 -0
- package/web/dist/assets/init-DlZdxViB.js +1 -0
- package/web/dist/assets/isEmpty-DssUW35f.js +1 -0
- package/web/dist/assets/ishikawaDiagram-UXIWVN3A-DxQ28rho.js +70 -0
- package/web/dist/assets/journeyDiagram-VCZTEJTY-D0X8qQ0P.js +139 -0
- package/web/dist/assets/json-parse-C6tSeIxX.js +2 -0
- package/web/dist/assets/kanban-definition-6JOO6SKY-DWYfSlpl.js +89 -0
- package/web/dist/assets/katex-CyM-5LlM.js +265 -0
- package/web/dist/assets/line-CuHce5JG.js +1 -0
- package/web/dist/assets/linear-Ca0Vkwuj.js +1 -0
- package/web/dist/assets/mermaid-parser.core-Cy4iY_Dy.js +4 -0
- package/web/dist/assets/mermaid.core-6PGkQdYc.js +11 -0
- package/web/dist/assets/mindmap-definition-QFDTVHPH-BBnKdtQh.js +96 -0
- package/web/dist/assets/mistral-BWaUMIgd.js +7 -0
- package/web/dist/assets/openai-D4NSaQIs.js +16 -0
- package/web/dist/assets/openai-codex-responses-CHBgKhmb.js +7 -0
- package/web/dist/assets/openai-completions-kcXmmaHI.js +5 -0
- package/web/dist/assets/openai-responses-Cqq3H3p3.js +1 -0
- package/web/dist/assets/openai-responses-shared-CTNuo9ci.js +10 -0
- package/web/dist/assets/ordinal-_K3x1fkz.js +1 -0
- package/web/dist/assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm +0 -0
- package/web/dist/assets/packet-4T2RLAQJ-D35ZLSBH.js +1 -0
- package/web/dist/assets/path-6uRLdFF7.js +1 -0
- package/web/dist/assets/pdf.worker.min-Cpi8b8z3.mjs +28 -0
- package/web/dist/assets/pie-ZZUOXDRM-DRoETpJX.js +1 -0
- package/web/dist/assets/pieDiagram-DEJITSTG-DfMjfTQz.js +30 -0
- package/web/dist/assets/preload-helper-DSXbuxSR.js +1 -0
- package/web/dist/assets/quadrantDiagram-34T5L4WZ-DfBSEept.js +7 -0
- package/web/dist/assets/radar-PYXPWWZC-DLKxRJ0V.js +1 -0
- package/web/dist/assets/reduce-836A2NiQ.js +1 -0
- package/web/dist/assets/requirementDiagram-MS252O5E-BPkxJQkz.js +84 -0
- package/web/dist/assets/rough.esm-Djo4Abte.js +1 -0
- package/web/dist/assets/sankeyDiagram-XADWPNL6-He3x9tNT.js +10 -0
- package/web/dist/assets/sequenceDiagram-FGHM5R23-DfCDpvrT.js +157 -0
- package/web/dist/assets/src-DdOdIreR.js +1 -0
- package/web/dist/assets/stateDiagram-FHFEXIEX-fuww6347.js +1 -0
- package/web/dist/assets/stateDiagram-v2-QKLJ7IA2-U6voafO3.js +1 -0
- package/web/dist/assets/timeline-definition-GMOUNBTQ-BWunHgBC.js +120 -0
- package/web/dist/assets/transform-messages-CqKEdRVp.js +1 -0
- package/web/dist/assets/transformers.web-DKUtmSAi.js +2818 -0
- package/web/dist/assets/treeView-SZITEDCU-BCx0xSAm.js +1 -0
- package/web/dist/assets/treemap-W4RFUUIX-2CvghWJK.js +1 -0
- package/web/dist/assets/vennDiagram-DHZGUBPP-CBXRutSP.js +34 -0
- package/web/dist/assets/wardley-RL74JXVD-BkPL_mhd.js +1 -0
- package/web/dist/assets/wardleyDiagram-NUSXRM2D-DTcVscPH.js +20 -0
- package/web/dist/assets/web-CMKYLKbT.js +10 -0
- package/web/dist/assets/xychartDiagram-5P7HB3ND-CZLgX9Fe.js +7 -0
- package/web/dist/favicon.svg +10 -0
- package/web/dist/index.html +104 -0
- package/web/dist/keating-metaharness.pdf +10557 -3
- package/web/dist/llms.txt +44 -0
- package/web/dist/logo.png +0 -0
- package/web/dist/manifest.webmanifest +1 -0
- package/web/dist/og-image.png +0 -0
- package/web/dist/pwa-192x192.svg +10 -0
- package/web/dist/pwa-512x512.svg +10 -0
- package/web/dist/registerSW.js +1 -0
- package/web/dist/robots.txt +8 -0
- package/web/dist/sitemap.xml +39 -0
- package/web/dist/sw.js +1 -0
- package/web/dist/tapes/doctor.mp4 +0 -0
- package/web/dist/tapes/feedback-flow.mp4 +0 -0
- package/web/dist/tapes/improve-flow.mp4 +0 -0
- package/web/dist/tapes/intro.mp4 +0 -0
- package/web/dist/tapes/learning-flow.mp4 +0 -0
- package/web/dist/tapes/session-flow.mp4 +0 -0
- package/web/dist/tapes/teacher-flow.mp4 +0 -0
- package/web/dist/tapes/tests.mp4 +0 -0
- package/web/dist/workbox-66610c77.js +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# Keating
|
|
2
|
+
|
|
3
|
+
> "O me! O life! of the questions of these recurring,
|
|
4
|
+
> Of the endless trains of the faithless, of cities fill’d with the foolish,
|
|
5
|
+
> Of myself for ever reproaching myself, (for who more foolish than I, and who more faithless?)
|
|
6
|
+
> Of eyes that vainly crave the light, of the objects mean, of the struggle ever renew’d,
|
|
7
|
+
> Of the poor results of all, of the plodding and sordid crowds I see around me,
|
|
8
|
+
> Of the empty and useless years of the rest, with the rest me intertwined,
|
|
9
|
+
> The question, O me! so sad, recurring—What good amid these, O me, O life?
|
|
10
|
+
>
|
|
11
|
+
> Answer.
|
|
12
|
+
> That you are here—that life exists and identity,
|
|
13
|
+
> That the powerful play goes on, and you may contribute a verse."
|
|
14
|
+
> -- Walt Whitman, *Leaves of Grass*
|
|
15
|
+
|
|
16
|
+
Keating exists because as AI grows more capable, the risk is not just that it replaces our tasks, but that it replaces our *voice*. We must not let technology become a surrogate for thought.
|
|
17
|
+
|
|
18
|
+
**The goal of Keating is cognitive empowerment.** It is a Pi-powered hyperteacher scaffold designed to ensure that humans remain the authors of their own understanding. It uses the most advanced models not to provide answers, but to force the rigorous reconstruction of ideas within the learner's own identity.
|
|
19
|
+
|
|
20
|
+
We use technology to ensure the "powerful play" goes on, and that every learner is equipped to contribute their own verse.
|
|
21
|
+
|
|
22
|
+
It is designed around five influences:
|
|
23
|
+
|
|
24
|
+
- `feynman` for the shell ergonomics, slash workflows, and artifact-oriented research UX.
|
|
25
|
+
- `pi-mono` for the runtime model: prompts, skills, and extensions instead of a forked monolith.
|
|
26
|
+
- `chrysalis-forge` for self-evolution, archival evaluation, and safety-gated improvement.
|
|
27
|
+
- `HyperAgent` for role separation between planning, execution, and verification.
|
|
28
|
+
- `Meta-Harness` for harness-level improvement rather than prompt-only tweaking.
|
|
29
|
+
|
|
30
|
+
## What Exists
|
|
31
|
+
|
|
32
|
+
- A Pi launcher that prefers a fresh standalone `pi` install by default and only uses the bundled Feynman runtime when you explicitly allow it.
|
|
33
|
+
- A Pi extension with operational commands: `/plan`, `/map`, `/animate`, `/verify`, `/bench`, `/evolve`, `/prompt-evolve`, `/feedback`, `/policy`, `/outputs`, `/trace`.
|
|
34
|
+
- Teaching workflows as prompt templates: `/learn`, `/diagnose`, `/quiz`, `/bridge`.
|
|
35
|
+
- An optional speech module that exposes a `keating_voice` tool for short voice-tagged learner-facing utterances while the normal model keeps doing reasoning, questioning, verification, and tool-backed correction.
|
|
36
|
+
- A prompt-evolution loop that scores prompt templates with natural-language feedback and picks revisions with a PROSPER-style multi-objective selector.
|
|
37
|
+
- 12 domains: math, science, philosophy, code, law, politics, psychology, medicine, arts, history, and general.
|
|
38
|
+
- Deterministic artifacts under `.keating/`:
|
|
39
|
+
- lesson plans with domain-specific guidance (code gets live-code phases, law gets case citations, etc.)
|
|
40
|
+
- richer Mermaid meaning maps rendered through `oxdraw`
|
|
41
|
+
- self-contained `manim-web` animation bundles: function-graphs, distribution-bars, belief-updates, code-traces, timelines, case-diagrams, mind-maps, and concept-cards
|
|
42
|
+
- fact-checking verification checklists that must be completed before teaching
|
|
43
|
+
- benchmark reports
|
|
44
|
+
- evolution reports
|
|
45
|
+
- prompt-evolution reports and evolved prompt snapshots
|
|
46
|
+
- the current policy and policy archive
|
|
47
|
+
- persistent learner state and feedback signals
|
|
48
|
+
- Persisted traces that explain why benchmark runs and evolution candidates succeeded or failed.
|
|
49
|
+
- A test suite with property checks, fuzz-style inputs, and an end-to-end acceptance pipeline.
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
### From the Web
|
|
54
|
+
|
|
55
|
+
Visit **[keating.help](https://keating.help)** to use Keating directly in your browser with:
|
|
56
|
+
- Your own API keys (stored locally)
|
|
57
|
+
- Local model inference via WebGPU (Gemma 4 E4B)
|
|
58
|
+
- Optional Gemini 3.1 Flash Live speech from the speaker button in the chat header
|
|
59
|
+
- Full hyperteacher experience without installation
|
|
60
|
+
|
|
61
|
+
### From the Command Line
|
|
62
|
+
|
|
63
|
+
Install via curl:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
curl -fsSL https://raw.githubusercontent.com/Diogenesoftoronto/keating/main/scripts/install/install.sh | bash
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Or with npm/pnpm/bun:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm install -g keating
|
|
73
|
+
pnpm add -g keating
|
|
74
|
+
bun add -g keating
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then launch the shell:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
keating shell
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
For a guided local setup:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
keating setup
|
|
87
|
+
keating doctor
|
|
88
|
+
keating shell
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The setup screen uses an Ink-powered terminal UI with arrow-key choices for provider, model, thinking effort, and runtime preference. Choose the recommended default path for `google` + `gemini-3.1-pro-preview`, or select custom provider/model values when your Pi runtime supports them.
|
|
92
|
+
|
|
93
|
+
Non-interactive environments can write the default config with `keating setup --yes`.
|
|
94
|
+
|
|
95
|
+
Keating checks credentials before launching the shell. It tries the configured provider first, then falls back to configured OpenAI or Anthropic credentials when the default Google key is missing. Supported environment variables are:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
export GEMINI_API_KEY=...
|
|
99
|
+
export OPENAI_API_KEY=...
|
|
100
|
+
export ANTHROPIC_API_KEY=...
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
From a local checkout, build first and run the repo binary directly:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
bun run build
|
|
107
|
+
node ./bin/keating.js shell
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The executable form works too:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
./bin/keating.js shell
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Development
|
|
117
|
+
|
|
118
|
+
<video src="docs/assets/doctor.mp4" autoplay loop muted width="100%"></video>
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
mise run build
|
|
122
|
+
mise run doctor
|
|
123
|
+
mise run docs:diagrams
|
|
124
|
+
mise run bench
|
|
125
|
+
mise run evolve
|
|
126
|
+
mise run prompt-evolve -- learn
|
|
127
|
+
mise run map -- derivative
|
|
128
|
+
mise run animate -- derivative
|
|
129
|
+
mise run trace
|
|
130
|
+
mise run shell
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Keating reads runtime/model defaults from `keating.config.json`.
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"pi": {
|
|
138
|
+
"runtimePreference": "standalone-only",
|
|
139
|
+
"defaultProvider": "google",
|
|
140
|
+
"defaultModel": "gemini-3.1-pro-preview",
|
|
141
|
+
"defaultThinking": "medium"
|
|
142
|
+
},
|
|
143
|
+
"speech": {
|
|
144
|
+
"enabled": false,
|
|
145
|
+
"defaultVoice": "conversational",
|
|
146
|
+
"fastModel": "gemini-3.1-flash-tts-preview",
|
|
147
|
+
"steeringModel": "default"
|
|
148
|
+
},
|
|
149
|
+
"debug": {
|
|
150
|
+
"persistTraces": true,
|
|
151
|
+
"traceTopLearners": 3,
|
|
152
|
+
"consoleSummary": false
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`runtimePreference` supports:
|
|
158
|
+
|
|
159
|
+
- `standalone-only`
|
|
160
|
+
- `prefer-standalone`
|
|
161
|
+
- `embedded-only`
|
|
162
|
+
|
|
163
|
+
`keating --list-models` is passed through to the underlying Pi shell runtime. The legacy typo `keating --list-model` is accepted as an alias for the same runtime flag.
|
|
164
|
+
|
|
165
|
+
The speech module is disabled by default. When `speech.enabled` is `true`, Keating registers a Pi tool named `keating_voice`. The tool returns transcript-safe voice tags such as:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
[voice voice=conversational tags=question,verify pace=normal affect=curious] What would you expect to happen next?
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
In the Pi shell, this first layer is provider-neutral: `fastModel` names the intended fast conversational voice path, and `steeringModel` names the supervising model path, but the tool emits structured voice-tagged utterances rather than audio. That keeps the speech loop optional while preserving the normal tool-using teacher as the source of questions, verification, and corrections.
|
|
172
|
+
|
|
173
|
+
In the web app, the speech toggle registers the same `keating_voice` tool and routes it through Gemini 3.1 Flash Live (`gemini-3.1-flash-live-preview`) with audio output. Speech stays off by default, uses the Google API key from Settings, and should be used for short conversational delivery while the primary model continues to plan, verify, and steer the lesson.
|
|
174
|
+
|
|
175
|
+
Inside the Pi shell:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
/plan derivative
|
|
179
|
+
/map derivative
|
|
180
|
+
/animate derivative
|
|
181
|
+
/verify derivative
|
|
182
|
+
/learn derivative
|
|
183
|
+
/quiz derivative
|
|
184
|
+
/bench derivative
|
|
185
|
+
/evolve derivative
|
|
186
|
+
/prompt-evolve learn
|
|
187
|
+
/feedback up derivative
|
|
188
|
+
/speech
|
|
189
|
+
/trace derivative
|
|
190
|
+
/outputs
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Prompt Evolution
|
|
194
|
+
|
|
195
|
+
`prompt-evolve` does not silently rewrite the checked-in prompt template. It reads a source prompt such as `pi/prompts/learn.md`, scores it on teaching objectives like learner voice, diagnosis, verification, retrieval, transfer, and structure, then writes:
|
|
196
|
+
|
|
197
|
+
- `.keating/outputs/prompt-evolution/learn.md`
|
|
198
|
+
- `.keating/outputs/prompt-evolution/learn.evolved.md`
|
|
199
|
+
|
|
200
|
+
Example:
|
|
201
|
+
|
|
202
|
+
Before:
|
|
203
|
+
|
|
204
|
+
```md
|
|
205
|
+
Teach the learner the following topic: $@
|
|
206
|
+
|
|
207
|
+
Workflow:
|
|
208
|
+
1. Start with a short diagnostic question.
|
|
209
|
+
2. Explain the concept.
|
|
210
|
+
3. End with a summary.
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
After `mise run prompt-evolve -- learn`:
|
|
214
|
+
|
|
215
|
+
```md
|
|
216
|
+
Teach the learner the following topic: $@
|
|
217
|
+
|
|
218
|
+
Workflow:
|
|
219
|
+
1. Start with a short diagnostic question.
|
|
220
|
+
1a. Separate missing prerequisite, partial intuition, and formal gap before choosing the next move.
|
|
221
|
+
2. Explain the concept.
|
|
222
|
+
5a. Make the learner reconstruct the core idea from memory rather than merely agreeing with your explanation.
|
|
223
|
+
6a. Ask the learner to carry the idea into a new setting so they prove they can transfer it.
|
|
224
|
+
0c. Keep Keating's standard in view: "Boys, you must strive to find your own voice..."
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The point is not cosmetic prompt churn or benchmark gaming. The loop tries to produce prompts that improve human learning outcomes: sharper diagnosis, stronger reconstruction from memory, better transfer, and clearer learner articulation.
|
|
228
|
+
|
|
229
|
+
## Benchmarking Cognitive Friction
|
|
230
|
+
|
|
231
|
+
To ensure that Keating serves as a bridge to independent understanding rather than a shortcut to agreement, we maintain a **Synthetic Learner Suite**.
|
|
232
|
+
|
|
233
|
+
Recent results using small models (1–2B parameters) show that the system successfully identifies and redirects "Surface Agreement." Key findings include:
|
|
234
|
+
- **Redirection Effectiveness:** Identifying meta-responses ("That's a great question!") and insisting on personal application before advancing.
|
|
235
|
+
- **Intuition-First Efficacy:** Measurable self-correction in technical domains (e.g., correcting conflations between function values and derivatives).
|
|
236
|
+
- **Voice Persistence:** Penalizing rote echoing of the teacher and rewarding novel analogies or domain transfers.
|
|
237
|
+
|
|
238
|
+
Detailed results are available in our latest study: `docs/study.typ`.
|
|
239
|
+
|
|
240
|
+
## Project Layout
|
|
241
|
+
|
|
242
|
+
- `src/core/`: lesson planning, benchmarks, policy mutation, artifact helpers.
|
|
243
|
+
- `src/core/animation.ts`: `manim-web` bundle generation for visual teaching artifacts.
|
|
244
|
+
- `src/runtime/`: Pi/Feynman runtime detection and shell launcher.
|
|
245
|
+
- `src/pi/`: the compiled Pi extension entrypoint.
|
|
246
|
+
- `pi/prompts/`: teaching prompt templates.
|
|
247
|
+
- `pi/skills/`: teaching skills for the runtime.
|
|
248
|
+
- `docs/`: architecture, testing strategy, and diagrams.
|
|
249
|
+
|
|
250
|
+
Key docs:
|
|
251
|
+
|
|
252
|
+
- `docs/ARCHITECTURE.md`
|
|
253
|
+
- `docs/OXDRAW-TUTORIAL.md`
|
|
254
|
+
- `docs/VISUAL-ARCHITECTURE.md`
|
|
255
|
+
|
|
256
|
+
## Design Notes
|
|
257
|
+
|
|
258
|
+
The system deliberately separates:
|
|
259
|
+
|
|
260
|
+
- live teaching behavior, which stays in Pi prompts and skills,
|
|
261
|
+
- deterministic pedagogy artifacts, which are generated by local code and kept inspectable,
|
|
262
|
+
- self-improvement, which runs against a synthetic learner suite before policy changes are accepted.
|
|
263
|
+
|
|
264
|
+
That split keeps the interactive shell flexible while making the improvement loop testable without an LLM in the loop.
|
|
265
|
+
|
|
266
|
+
## Testing
|
|
267
|
+
|
|
268
|
+
<video src="docs/assets/tests.mp4" autoplay loop muted width="100%"></video>
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
mise run test
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
The test suite covers:
|
|
275
|
+
- property checks for lesson plans and maps
|
|
276
|
+
- fuzzed teaching policies and topics
|
|
277
|
+
- visual grammar invariants for animations
|
|
278
|
+
- end-to-end artifact generation and trace persistence
|
|
279
|
+
|
|
280
|
+
## Visual Teaching Layer
|
|
281
|
+
|
|
282
|
+
Keating now treats diagrams and animations as first-class teaching artifacts instead of optional garnish.
|
|
283
|
+
|
|
284
|
+
- `mise run map -- <topic>` writes a meaning map with teaching loop, concept structure, misconceptions, practice, and transfer hooks, then renders it with `oxdraw` when available.
|
|
285
|
+
- `mise run animate -- <topic>` writes a browser-runnable `manim-web` bundle under `.keating/outputs/animations/<topic>/`.
|
|
286
|
+
- Each animation bundle includes:
|
|
287
|
+
- `player.html`
|
|
288
|
+
- `scene.mjs`
|
|
289
|
+
- `storyboard.md`
|
|
290
|
+
- `manifest.json`
|
|
291
|
+
- The animation manifest explains why a particular scene grammar was selected, so the visual layer is inspectable alongside benchmark and evolution traces.
|
|
292
|
+
|
|
293
|
+
## Debugging Self-Evolution
|
|
294
|
+
|
|
295
|
+
Keating persists detailed trace artifacts under `.keating/outputs/traces/`.
|
|
296
|
+
|
|
297
|
+
- Benchmark traces show:
|
|
298
|
+
- per-topic metric means
|
|
299
|
+
- the strongest and weakest synthetic learners
|
|
300
|
+
- natural-language reasons for strong or weak outcomes
|
|
301
|
+
- Evolution traces show:
|
|
302
|
+
- every explored candidate
|
|
303
|
+
- score and weakest-topic deltas
|
|
304
|
+
- novelty scores
|
|
305
|
+
- gate outcomes
|
|
306
|
+
- acceptance or rejection reasons
|
|
307
|
+
- parameter deltas from the parent policy
|
|
308
|
+
- Prompt-evolution artifacts show:
|
|
309
|
+
- baseline feedback on the source prompt
|
|
310
|
+
- candidate objective vectors
|
|
311
|
+
- the PROSPER-style preference score
|
|
312
|
+
- the recommended evolved prompt snapshot
|
|
313
|
+
|
|
314
|
+
Useful commands:
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
mise run doctor
|
|
318
|
+
mise run bench -- derivative
|
|
319
|
+
mise run evolve -- derivative
|
|
320
|
+
mise run prompt-evolve -- learn
|
|
321
|
+
mise run trace -- derivative
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Documentation
|
|
325
|
+
|
|
326
|
+
- Architecture overview: `docs/ARCHITECTURE.md`
|
|
327
|
+
- Visual system architecture: `docs/VISUAL-ARCHITECTURE.md`
|
|
328
|
+
- `oxdraw` authoring and rendering tutorial: `docs/OXDRAW-TUTORIAL.md`
|
|
329
|
+
|
|
330
|
+
Regenerate the checked-in docs SVGs with:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
mise run docs:diagrams
|
|
334
|
+
```
|
package/SYSTEM.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
You are Keating, a hyperteacher dedicated to the preservation of the human voice through cognitive empowerment.
|
|
2
|
+
|
|
3
|
+
Core Mandate:
|
|
4
|
+
AI must not be a surrogate for thought. Your purpose is to ensure the learner does not merely offload their thinking to the machine, but instead uses this bridge to find their own identity and "contribute a verse" to the powerful play of human knowledge.
|
|
5
|
+
|
|
6
|
+
Core rules:
|
|
7
|
+
|
|
8
|
+
1. Teach for mastery, not for surface agreement. If the learner merely agrees, you have failed.
|
|
9
|
+
2. Push the learner to articulate ideas in their own words. "Identity exists; the powerful play goes on."
|
|
10
|
+
3. Use a loop of diagnose -> intuition -> formal core -> misconception repair -> example -> retrieval -> reflection.
|
|
11
|
+
4. Keep the learner active with short questions, predictions, or reconstructions.
|
|
12
|
+
5. Technology is a scaffold, not a destination. Use artifacts (.keating/outputs/) to anchor the human voice.
|
|
13
|
+
6. If `.keating/outputs/plans/<topic>.md` or `.keating/outputs/maps/<topic>.mmd` exists, read and use it. If no plan exists and teaching would benefit from structure, run `/plan <topic>` yourself.
|
|
14
|
+
7. If the user wants a stronger lesson structure, run `/plan <topic>` or `/map <topic>` yourself rather than asking them to do it.
|
|
15
|
+
8. If the user wants the teacher to improve, run `/bench [topic]` or `/evolve [topic]` yourself rather than asking them to do it.
|
|
16
|
+
9. You are an autonomous agent with direct access to tools. NEVER ask the user to run commands for you. If you need a plan, call the plan tool. If you need verification, call the verify tool. If you need a map, call the map tool. Execute all prerequisites yourself without asking.
|
|
17
|
+
10. When a topic is mathematical, do not hide the formalism forever; sequence into it.
|
|
18
|
+
11. When a topic is philosophical, surface competing interpretations and where the concept breaks.
|
|
19
|
+
12. When a topic is scientific, tie the idea to prediction, measurement, or model behavior.
|
|
20
|
+
13. When a topic is about code, include runnable examples and step-by-step traces. Do not teach programming concepts without executable illustration.
|
|
21
|
+
14. When a topic is legal, cite relevant cases or statutes. Distinguish jurisdiction-specific rules from general principles.
|
|
22
|
+
15. When a topic is medical, reference the level of evidence. Distinguish clinical guidelines from individual studies.
|
|
23
|
+
16. When a topic is historical, anchor claims in primary sources and timelines. Surface historiographic disagreements.
|
|
24
|
+
17. When a topic is psychological, flag replication status of key studies. Distinguish empirical findings from popular psychology.
|
|
25
|
+
18. When a topic is political, present multiple analytical frameworks. Distinguish normative claims from descriptive ones.
|
|
26
|
+
19. When a topic is artistic, ground analysis in specific works. Connect formal technique to expressive effect.
|
|
27
|
+
20. Before teaching factual claims, check `.keating/outputs/verifications/` for this topic. If no verification exists, run `/verify <topic>` first. Do not present unverified claims as settled facts. Hedge appropriately when claims are unconfirmed.
|
|
28
|
+
21. If `.keating/state/learner.json` exists, read the learner's prior coverage and misconceptions before starting. Skip orientation for topics the learner has seen before.
|
|
29
|
+
22. At session start, check the engagement timeline. If topics are critically overdue (retention has decayed significantly), mention them to the learner and suggest review. Use `/timeline` to see all topics sorted by review urgency, or `/due` to see only overdue topics.
|
|
30
|
+
23. When a learner returns after an absence, acknowledge the time gap. Use the engagement timeline to inform which topics need reinforcement before introducing new material.
|
|
31
|
+
24. Use `/timeline` or `/due` to inspect the spaced revisit schedule. Topics with low estimated retention should be reviewed before building new knowledge on top of them.
|
|
32
|
+
|
|
33
|
+
Never pretend the synthetic benchmark proves real-world pedagogy. Use it as a disciplined gate for local improvement, not as epistemic closure.
|
package/bin/keating.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const MIN_NODE_VERSION = "20.19.0";
|
|
3
|
+
|
|
4
|
+
function parseNodeVersion(version) {
|
|
5
|
+
const [major = "0", minor = "0", patch = "0"] = version.replace(/^v/, "").split(".");
|
|
6
|
+
return {
|
|
7
|
+
major: Number.parseInt(major, 10) || 0,
|
|
8
|
+
minor: Number.parseInt(minor, 10) || 0,
|
|
9
|
+
patch: Number.parseInt(patch, 10) || 0,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function compareNodeVersions(left, right) {
|
|
14
|
+
if (left.major !== right.major) return left.major - right.major;
|
|
15
|
+
if (left.minor !== right.minor) return left.minor - right.minor;
|
|
16
|
+
return left.patch - right.patch;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (compareNodeVersions(parseNodeVersion(process.versions.node), parseNodeVersion(MIN_NODE_VERSION)) < 0) {
|
|
20
|
+
const isWindows = process.platform === "win32";
|
|
21
|
+
console.error(`keating requires Node.js ${MIN_NODE_VERSION} or later (detected ${process.versions.node}).`);
|
|
22
|
+
console.error(isWindows
|
|
23
|
+
? "Install a newer Node.js from https://nodejs.org, or use the standalone installer:"
|
|
24
|
+
: "Switch to Node 20 with `nvm install 20 && nvm use 20`, or use the standalone installer:");
|
|
25
|
+
console.error(isWindows
|
|
26
|
+
? "irm https://keating.help/install.ps1 | iex"
|
|
27
|
+
: "curl -fsSL https://keating.help/install | bash");
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
await import(new URL("../dist/src/cli/main.js", import.meta.url).href);
|