eklavya 1.18.3 → 1.19.1

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.
Files changed (132) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/dashboard.html +570 -15
  3. package/dist/assets/tutor/SKILL.md +5 -5
  4. package/dist/assets/tutor/references/focus-and-level.md +34 -5
  5. package/dist/assets/tutor/references/grading.md +1 -1
  6. package/dist/cli.js +753 -41
  7. package/dist/cli.js.map +1 -1
  8. package/dist/config-path.js +156 -0
  9. package/dist/config-path.js.map +1 -0
  10. package/dist/config.js +448 -31
  11. package/dist/config.js.map +1 -1
  12. package/dist/dashboard.js +357 -1
  13. package/dist/dashboard.js.map +1 -1
  14. package/dist/eval/retrieval-score.js +77 -0
  15. package/dist/eval/retrieval-score.js.map +1 -0
  16. package/dist/hooks/capture-tool.js +107 -0
  17. package/dist/hooks/capture-tool.js.map +1 -0
  18. package/dist/hooks/checkpoint-quiz.js +2 -2
  19. package/dist/hooks/checkpoint-quiz.js.map +1 -1
  20. package/dist/hooks/lib.js +4 -30
  21. package/dist/hooks/lib.js.map +1 -1
  22. package/dist/hooks/memory-lib.js +181 -0
  23. package/dist/hooks/memory-lib.js.map +1 -0
  24. package/dist/hooks/pre-tool-gate.js +2 -2
  25. package/dist/hooks/pre-tool-gate.js.map +1 -1
  26. package/dist/hooks/prompt-submit-nudge.js +57 -20
  27. package/dist/hooks/prompt-submit-nudge.js.map +1 -1
  28. package/dist/hooks/session-start.js +110 -80
  29. package/dist/hooks/session-start.js.map +1 -1
  30. package/dist/hooks/stop-quiz-check.js +58 -38
  31. package/dist/hooks/stop-quiz-check.js.map +1 -1
  32. package/dist/hooks/subagent-start.js +2 -2
  33. package/dist/hooks/subagent-start.js.map +1 -1
  34. package/dist/install.js +37 -0
  35. package/dist/install.js.map +1 -1
  36. package/dist/memory/capture.js +123 -0
  37. package/dist/memory/capture.js.map +1 -0
  38. package/dist/memory/code.js +186 -0
  39. package/dist/memory/code.js.map +1 -0
  40. package/dist/memory/collections.js +87 -0
  41. package/dist/memory/collections.js.map +1 -0
  42. package/dist/memory/embed.js +81 -0
  43. package/dist/memory/embed.js.map +1 -0
  44. package/dist/memory/hosts.js +71 -0
  45. package/dist/memory/hosts.js.map +1 -0
  46. package/dist/memory/identity.js +74 -0
  47. package/dist/memory/identity.js.map +1 -0
  48. package/dist/memory/import.js +916 -0
  49. package/dist/memory/import.js.map +1 -0
  50. package/dist/memory/learning.js +148 -0
  51. package/dist/memory/learning.js.map +1 -0
  52. package/dist/memory/notify.js +220 -0
  53. package/dist/memory/notify.js.map +1 -0
  54. package/dist/memory/privacy.js +117 -0
  55. package/dist/memory/privacy.js.map +1 -0
  56. package/dist/memory/provider.js +155 -0
  57. package/dist/memory/provider.js.map +1 -0
  58. package/dist/memory/recall.js +327 -0
  59. package/dist/memory/recall.js.map +1 -0
  60. package/dist/memory/replay.js +174 -0
  61. package/dist/memory/replay.js.map +1 -0
  62. package/dist/memory/search.js +143 -0
  63. package/dist/memory/search.js.map +1 -0
  64. package/dist/memory/spool.js +93 -0
  65. package/dist/memory/spool.js.map +1 -0
  66. package/dist/memory/store.js +399 -0
  67. package/dist/memory/store.js.map +1 -0
  68. package/dist/memory/summarize.js +178 -0
  69. package/dist/memory/summarize.js.map +1 -0
  70. package/dist/memory/sync.js +595 -0
  71. package/dist/memory/sync.js.map +1 -0
  72. package/dist/memory/tokens.js +55 -0
  73. package/dist/memory/tokens.js.map +1 -0
  74. package/dist/memory/worker.js +207 -0
  75. package/dist/memory/worker.js.map +1 -0
  76. package/dist/migrations/009_memory.sql +226 -0
  77. package/dist/migrations/010_import.sql +26 -0
  78. package/dist/migrations/011_sync.sql +76 -0
  79. package/dist/migrations/012_job_backoff.sql +13 -0
  80. package/dist/migrations/013_batch_provenance.sql +18 -0
  81. package/dist/migrations/014_batch_events_index.sql +18 -0
  82. package/dist/packs.js +26 -12
  83. package/dist/packs.js.map +1 -1
  84. package/dist/paths.js +60 -0
  85. package/dist/paths.js.map +1 -1
  86. package/dist/plugin/.claude-plugin/plugin.json +1 -1
  87. package/dist/plugin/agents/tutor.md +3 -1
  88. package/dist/plugin/cli/CLAUDE.md +32 -8
  89. package/dist/plugin/cli/eklavya-gate +80 -9
  90. package/dist/plugin/hooks/CLAUDE.md +44 -19
  91. package/dist/plugin/hooks/hooks.json +10 -0
  92. package/dist/plugin/scripts/install-git-hook.sh +2 -1
  93. package/dist/plugin/skills/CLAUDE.md +29 -17
  94. package/dist/plugin/skills/gate/SKILL.md +1 -1
  95. package/dist/plugin/skills/level/SKILL.md +3 -3
  96. package/dist/plugin/skills/memory/SKILL.md +88 -0
  97. package/dist/plugin/skills/mode/SKILL.md +24 -16
  98. package/dist/plugin/skills/pack/SKILL.md +8 -4
  99. package/dist/plugin/skills/progress/SKILL.md +1 -1
  100. package/dist/plugin/skills/quiz/SKILL.md +2 -2
  101. package/dist/plugin/skills/setup/SKILL.md +25 -11
  102. package/dist/plugin/skills/tutor/SKILL.md +5 -5
  103. package/dist/plugin/skills/tutor/references/focus-and-level.md +34 -5
  104. package/dist/plugin/skills/tutor/references/grading.md +1 -1
  105. package/dist/session.js +1 -1
  106. package/dist/statusline.js +20 -6
  107. package/dist/statusline.js.map +1 -1
  108. package/dist/store.js +2 -2
  109. package/dist/store.js.map +1 -1
  110. package/dist/surface.js +1 -1
  111. package/dist/time.js +41 -0
  112. package/dist/time.js.map +1 -0
  113. package/dist/tools/code_tools.js +73 -0
  114. package/dist/tools/code_tools.js.map +1 -0
  115. package/dist/tools/collection_tools.js +92 -0
  116. package/dist/tools/collection_tools.js.map +1 -0
  117. package/dist/tools/config_tools.js +165 -32
  118. package/dist/tools/config_tools.js.map +1 -1
  119. package/dist/tools/get_learner_profile.js +2 -1
  120. package/dist/tools/get_learner_profile.js.map +1 -1
  121. package/dist/tools/get_session_quiz_plan.js +15 -9
  122. package/dist/tools/get_session_quiz_plan.js.map +1 -1
  123. package/dist/tools/index.js +15 -0
  124. package/dist/tools/index.js.map +1 -1
  125. package/dist/tools/memory_read_tools.js +277 -0
  126. package/dist/tools/memory_read_tools.js.map +1 -0
  127. package/dist/tools/memory_write_tools.js +115 -0
  128. package/dist/tools/memory_write_tools.js.map +1 -0
  129. package/dist/tools/types.js +1 -1
  130. package/dist/tools/types.js.map +1 -1
  131. package/dist/user-skill/eklavya/SKILL.md +95 -25
  132. package/package.json +2 -1
@@ -71,7 +71,7 @@ once in a long session — it is paced by the clock, not by the batch — so tre
71
71
  each one as its own single question, not as a sign you missed the last one.
72
72
 
73
73
  **How many questions is not your call — it is the plan's.** Under `interleaved`
74
- the plan returns one item, the sweep included. Under `end`, and in enforced mode
74
+ the plan returns one item, the sweep included. Under `end`, and when enforced,
75
75
  where the gate needs a round it can pass, it returns the whole remaining budget
76
76
  and you ask those one at a time.
77
77
 
@@ -81,14 +81,14 @@ checkpointed through the budget ends in silence. That is intended — do not top
81
81
  up because the ending felt quiet. What the budget never reached stays unmastered
82
82
  and comes back in a later plan with `reason: "backlog"`, once that session's own
83
83
  concepts and review debt are covered, from the domains that session touches, and
84
- never in `enforced` mode. It is not spaced repetition that brings it
84
+ never when `quiz.enforced` is set. It is not spaced repetition that brings it
85
85
  back — that only schedules concepts already answered once.
86
86
 
87
87
  `questions_needed: 0` means say nothing and carry on; `reason` says why.
88
88
 
89
89
  ## Before you teach
90
90
 
91
- `get_learner_profile` first, always: `mode`, what they already know so you don't
91
+ `get_learner_profile` first, always: `quiz_enabled`/`quiz_enforced`, what they already know so you don't
92
92
  insult them by asking, `weak`, `due_for_review`, `suggested_tier`.
93
93
 
94
94
  Then `get_session_quiz_plan`. What it returns outranks your instincts:
@@ -151,7 +151,7 @@ a suggestion: above it is a question the learner has not reached.
151
151
  Definitions are tier 1 **only**. "What is X" at tier 3 is a bad question.
152
152
 
153
153
  **The stem is the whole question, and the plan's `ask_attribution` says how to
154
- sign it.** The dials live in the developer's status bar — `[EKLAVYA ambient ·
154
+ sign it.** The dials live in the developer's status bar — `[EKLAVYA
155
155
  concept · interleaved · easy]` — so they never go in the stem. Who is asking is
156
156
  the one exception, and whether it belongs in the stem depends on the host:
157
157
  follow `ask_attribution` rather than deciding.
@@ -177,7 +177,7 @@ every combination is coherent.
177
177
  You choose none of them — the plan and the hooks do. **Read
178
178
  `references/focus-and-level.md` before you quiz**: the three focuses and what
179
179
  "grounded" means in each, the earned level bands, the cadence contract, and the
180
- enforced-mode gate retry that is the only route out of a blocked commit.
180
+ enforced gate retry that is the only route out of a blocked commit.
181
181
 
182
182
  ## The bar
183
183
 
@@ -1,10 +1,39 @@
1
- # Focus, level, cadence and mode
1
+ # Focus, level, cadence and enforcement
2
2
 
3
3
  Required reading before you quiz. Four dials decide what a good question even
4
4
  is, and the plan states three of them back to you as authoritative framing:
5
5
  follow `framing` and `level_framing` over your own instincts, and over the
6
6
  grounding rule in `SKILL.md` where they differ.
7
7
 
8
+ ## Reaching for the project's memory
9
+
10
+ You have `memory_search`, `memory_get` and `memory_file_history`. They read what
11
+ Eklavya recorded about this codebase — past decisions, fixes, the work of
12
+ sessions you were not in.
13
+
14
+ **Use them for exactly one thing: a concrete example the plan did not give you.**
15
+ A concept the developer has met before is far better asked about the time they
16
+ met it — *"you rotated the refresh cookie in `auth.ts` in March"* — than in the
17
+ abstract, and in a parallel session that history is the only project you can
18
+ see.
19
+
20
+ Three limits, and they are not stylistic.
21
+
22
+ - **Search, choose, then read.** `memory_search` returns titles; `memory_get`
23
+ returns the narrative for the two or three ids that look relevant. Hydrating
24
+ everything the search returned spends the context the index exists to save.
25
+ - **It is evidence, not truth.** An observation can be stale or wrong. Date it
26
+ and check it against the file before you build a question on it — a question
27
+ whose premise is a superseded note teaches the wrong thing confidently.
28
+ - **It does not change the focus, the tier, or the grade.** Under `concept`
29
+ focus a remembered example is still only the *motivation*; the question still
30
+ has to transfer. And finding that the developer has seen something before is
31
+ not evidence they know it. Exposure is not assessment: `get_learner_profile`
32
+ says what they know, and nothing in memory does.
33
+
34
+ Do not go looking when the plan already handed you a `context`. That line is
35
+ this session's work, which beats anything from March.
36
+
8
37
  ## Focus — what to teach
9
38
 
10
39
  ### project
@@ -45,7 +74,7 @@ Items with `reason: "backlog"` are older work — a concept an earlier session
45
74
  logged that no question ever reached, offered once this session's own concepts
46
75
  and review debt are covered, and only from the domains this session touched --
47
76
  there is one database for every project, so the scope is what keeps a Flutter
48
- session off last month's Terraform. Never in `enforced` mode: a backlog answer
77
+ session off last month's Terraform. Never when `quiz.enforced` is set: a backlog answer
49
78
  cannot open a commit gate, so offering one there would only spend the budget the
50
79
  gate needs. They also arrive with `context: null`, and for a
51
80
  blunter reason: the code that taught them is not on screen and may not even be
@@ -128,7 +157,7 @@ ever promote, so never imply progress toward a next level.
128
157
 
129
158
  - **interleaved** (the default) — one question at a time, mid-task, at the seam
130
159
  where you logged the concept. The planner enforces it: every plan comes back
131
- with exactly one item, the Stop sweep included. Enforced mode is exempt,
160
+ with exactly one item, the Stop sweep included. Enforced quizzing is exempt,
132
161
  because the gate has to stay passable, and so is a plan the developer asked for
133
162
  by name — passing `domain` or `slugs` still gets the whole budget.
134
163
  - **end** — no checkpoints. Everything waits for the Stop sweep, which plans the
@@ -141,10 +170,10 @@ into the batch it replaced.
141
170
 
142
171
  ## Mode — how hard to push
143
172
 
144
- - **ambient** — offer. If they *decline*, record it (grade 0,
173
+ - **unenforced** *(default)* — offer. If they *decline*, record it (grade 0,
145
174
  `outcome: "declined"`) and drop it immediately. Do not ask twice. Do not guilt
146
175
  them. A decline is not the same as "I don't know".
147
- - **enforced** — the quiz is required before committing. Say so plainly and
176
+ - **`quiz.enforced`** — the quiz is required before committing. Say so plainly and
148
177
  once: the gate exists, here is what it needs, let's get through it. Supportive,
149
178
  not punitive. Never imply they are being punished.
150
179
 
@@ -68,7 +68,7 @@ Both record as grade 0. What separates them is `outcome`, and what you do next.
68
68
  **They are not interchangeable, and the asymmetry is worth knowing.** A concept
69
69
  recorded as `declined` is never offered again — deliberately, because "leave me
70
70
  alone" is a choice. So labelling a blank as a decline removes that concept from
71
- the gate-retry path, which in enforced mode is the only route out of a blocked
71
+ the gate-retry path, which when enforced is the only route out of a blocked
72
72
  commit. If you explained it, it was a blank: `dont_know`. `record_attempt`
73
73
  returns `outcome_conflict` when it is given `declined` together with feedback,
74
74
  because a decline you dropped immediately has nothing to explain.