eklavya 1.77.0 → 1.79.0
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 +1 -1
- package/dist/assets/artifact-template.html +15 -0
- package/dist/assets/dashboard.html +37 -2
- package/dist/assets/tokens.css +22 -0
- package/dist/cli.js +3 -1
- package/dist/cli.js.map +1 -1
- package/dist/dashboard.js +22 -0
- package/dist/dashboard.js.map +1 -1
- package/dist/eval/explainer-score.js +1 -1
- package/dist/eval/explainer-score.js.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/agents/explainer.md +11 -5
- package/dist/plugin/skills/setup/SKILL.md +1 -1
- package/dist/telemetry.js +4 -0
- package/dist/telemetry.js.map +1 -1
- package/dist/tools/index.js +5 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/user-skill/eklavya/SKILL.md +25 -12
- package/dist/user-skill/eklavya-artifacts/SKILL.md +132 -20
- package/package.json +1 -1
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,cAAc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oBAAE,QAAQ,CAAC,EAAE,EAAE,cAAc,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC5D,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,QAAQ,CAAC,EAAE,EAAE,cAAc,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBACxC,6DAA6D;gBAC7D,OAAO,QAAQ,CAAC;oBACd,KAAK,EAAE,aAAa;oBACpB,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;iBACzD,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -262,18 +262,27 @@ the learning history. Two cases it can't fix on its own, and `doctor` says which
|
|
|
262
262
|
`~/.claude/skills/eklavya/`. Never overwrite it. Tell them to move theirs
|
|
263
263
|
first, then run `eklavya install`.
|
|
264
264
|
|
|
265
|
-
**Auto mode denied
|
|
266
|
-
panel_sync (mcp) denied by auto mode
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
265
|
+
**Auto mode denied an Eklavya tool.** A message such as `plugin:eklavya:eklavya -
|
|
266
|
+
panel_sync (mcp) denied by auto mode`, or a denial of `get_session_quiz_plan`
|
|
267
|
+
with an odd reason like "Irreversible Local Destruction", means Claude Code's
|
|
268
|
+
auto mode refused a call Eklavya's hooks or panel make on their own; a plugin
|
|
269
|
+
cannot grant its own permissions. When they ask you to fix it, read
|
|
270
|
+
`~/.claude/settings.json` and add these ten to `permissions.allow`, keeping every
|
|
271
|
+
existing entry and adding none twice:
|
|
270
272
|
`mcp__plugin_eklavya_eklavya__panel_sync`,
|
|
271
|
-
`mcp__plugin_eklavya_eklavya__panel_answer
|
|
272
|
-
`mcp__plugin_eklavya_eklavya__present_question
|
|
273
|
-
|
|
274
|
-
`
|
|
275
|
-
`
|
|
276
|
-
|
|
273
|
+
`mcp__plugin_eklavya_eklavya__panel_answer`,
|
|
274
|
+
`mcp__plugin_eklavya_eklavya__present_question`,
|
|
275
|
+
`mcp__plugin_eklavya_eklavya__log_session_concepts`,
|
|
276
|
+
`mcp__plugin_eklavya_eklavya__get_session_quiz_plan`,
|
|
277
|
+
`mcp__plugin_eklavya_eklavya__record_attempt`,
|
|
278
|
+
`mcp__plugin_eklavya_eklavya__upsert_concepts`,
|
|
279
|
+
`mcp__plugin_eklavya_eklavya__get_learner_profile`,
|
|
280
|
+
`mcp__plugin_eklavya_eklavya__memory_search` and
|
|
281
|
+
`mcp__plugin_eklavya_eklavya__memory_get`.
|
|
282
|
+
Create `permissions.allow` if it is missing, and leave the file valid JSON. Do not
|
|
283
|
+
allow the whole `mcp__plugin_eklavya_eklavya` server instead: that would also let
|
|
284
|
+
`memory_write`, `memory_delete` and `set_config` run unasked. Show them the entries
|
|
285
|
+
you added. If the denial continues, a restart of Claude Code reloads the settings.
|
|
277
286
|
`eklavya:eklavya-explainer denied by auto mode` needs no fix and has none: auto
|
|
278
287
|
mode drops `Agent` allow rules, so do not add one. The panel asks once more,
|
|
279
288
|
then queues a prompt for you to start the explainer; do that and tell them
|
|
@@ -297,7 +306,11 @@ full field list is https://eklavya-run.web.app/docs/usage-analytics/. Besides th
|
|
|
297
306
|
learning, memory and settings counts it has a `feedback` event: whether
|
|
298
307
|
`feedback.enabled` is on, how many prompt reviews were made and how many were
|
|
299
308
|
acknowledged, and three `feature_use` counts of how the Feedback page was
|
|
300
|
-
reached. Never the prompt or anything a review says.
|
|
309
|
+
reached. Never the prompt or anything a review says. It also counts, as
|
|
310
|
+
`feature_use`, which dashboard workflows are opened, whether an explainer opened
|
|
311
|
+
in the dashboard was scrolled to 25, 50, 75 and 100 percent, which setting was
|
|
312
|
+
changed from the dashboard or the CLI (the key, never the value), and MCP tool
|
|
313
|
+
calls that returned an error.
|
|
301
314
|
|
|
302
315
|
Restarting Claude Code is what picks up a repaired install — the plugin and MCP
|
|
303
316
|
server are read at session start. The only background process is the dashboard,
|
|
@@ -65,22 +65,129 @@ paragraph of definition. Name the gotcha at the end, in plain terms.
|
|
|
65
65
|
before/after, a hierarchy or a number worth comparing is a diagram that has not
|
|
66
66
|
been drawn yet; two or three in a medium page is normal.
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
**Pick the diagram from the idea, not from habit.** Every page so far has been
|
|
69
|
+
one left-to-right row of boxes. Choose the type that matches the shape of the
|
|
70
|
+
thing, and when a page has two or three diagrams, make them different types.
|
|
71
|
+
|
|
72
|
+
| The idea | Draw | Colour it by |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| Ordered steps, a pipeline | **Step flow** | actor or phase |
|
|
75
|
+
| Who calls whom, over time | **Sequence** (lifelines, numbered messages) | one colour per participant |
|
|
76
|
+
| A choice, a retry, a guard | **Decision** (diamonds, yes/no edges) | the outcome: `.svg-ok` / `.svg-bad` |
|
|
77
|
+
| Several actors or layers share a job | **Swimlane** | one lane per actor |
|
|
78
|
+
| Parts and boundaries | **Layered architecture** (nested zones) | the layer or trust boundary |
|
|
79
|
+
| States and transitions | **State machine** | the kind of state; terminal state in `-spot` |
|
|
80
|
+
| Before vs after, broken vs fixed | **Split panel** | `.svg-bad` left, `.svg-ok` right, only for a real fault and its fix |
|
|
81
|
+
| Quantities, costs, counts | **Bars** (`.svg-bar-N`, value printed on each) | the series |
|
|
82
|
+
| Parent and child, nesting | **Tree** | depth or kind |
|
|
83
|
+
| Time and overlap | **Timeline strip** (one row per actor, bars on an axis) | the actor |
|
|
84
|
+
| A cycle that feeds itself | **Loop** (nodes on a ring, arrows clockwise) | the phase |
|
|
85
|
+
| Two measures, four verdicts | **Quadrant** (2×2 with labelled corners) | the quadrant |
|
|
86
|
+
| Narrowing or ranking | **Funnel / pyramid** (stacked bars, count on each) | the stage |
|
|
87
|
+
| Tables and their links | **Schema / ER** (box per table, key columns, lines with 1 / n) | the owner of the data |
|
|
88
|
+
| Many things against many | **Matrix / heatmap** (grid, one tint per cell, value printed) | the value band |
|
|
89
|
+
| What overlaps, what is only in one | **Venn** (two or three circles, `fill-opacity` via `-soft`) | the set |
|
|
90
|
+
|
|
91
|
+
**Before drawing, decide in one line**: the type, the one thing the reader should
|
|
92
|
+
take away, and what you will leave out. Deleting a box usually improves a
|
|
93
|
+
diagram more than adding one. Avoid:
|
|
94
|
+
|
|
95
|
+
- a generic row of identical rounded boxes when a lane, layer or axis would
|
|
96
|
+
show the structure;
|
|
97
|
+
- decoration with no meaning (icons, gradients, extra arrows, a legend for one colour);
|
|
98
|
+
- a colour used on everything: colour the groups, and let `-spot` mark the one
|
|
99
|
+
thing that matters;
|
|
100
|
+
- a diagram of a list (use a table) or of a single shape (use a sentence);
|
|
101
|
+
- invented detail: every label is a real name from the code or the question.
|
|
102
|
+
|
|
103
|
+
Layout: snap coordinates, widths and gaps to multiples of 4 so edges line up;
|
|
104
|
+
keep 16px between a shape and its text; one idea per diagram, at most about
|
|
105
|
+
eight nodes. Give every `<svg>` a `<title>` and a one-sentence `<desc>` as its
|
|
106
|
+
first children, as well as `role="img"` and `aria-label`.
|
|
107
|
+
|
|
108
|
+
Draw them as **inline SVG** inside `<figure>`, with a `<figcaption>` that
|
|
109
|
+
states the takeaway, not the title. Never a raster image, ASCII boxes or a
|
|
110
|
+
Mermaid script: inline SVG themes and prints, the others do not. The first
|
|
111
|
+
`<figure>` diagram is the page's thumbnail in the dashboard's Artifacts
|
|
112
|
+
gallery, so put the one that explains the page first.
|
|
113
|
+
|
|
114
|
+
SVG classes (all role colours, so both grounds work):
|
|
115
|
+
|
|
116
|
+
- Neutral: `.svg-box`, `.svg-line`, `.svg-label`, `.svg-small`, `.svg-muted`,
|
|
117
|
+
`.svg-chip`, `.svg-axis`, `.svg-lane`, `.svg-life` (lifeline), `.svg-dash`
|
|
118
|
+
(add to a line for "optional" or "reply"), `.svg-head` (arrowhead).
|
|
119
|
+
- **Categories 1–5**: `.svg-box-N` (tinted fill, coloured edge), `.svg-line-N`,
|
|
120
|
+
`.svg-bar-N`, `.svg-text-N` (coloured heading), `.svg-head-N` (arrowhead).
|
|
121
|
+
Colour means *a group*: assign 1 to the first actor, 2 to the second, and keep
|
|
122
|
+
it for the whole page. Use at most four categories in one diagram, and put
|
|
123
|
+
the group's name in text on or beside every coloured shape, so the diagram
|
|
124
|
+
still reads in print and without colour. A legend is a row of small
|
|
125
|
+
`.svg-box-N` squares with a `.svg-small` label.
|
|
126
|
+
- State: `.svg-ok` (fixed, allowed), `.svg-bad` (broken, rejected),
|
|
127
|
+
`.svg-box-spot` / `.svg-line-spot` (the one node or edge the page is about).
|
|
128
|
+
|
|
129
|
+
Arrowheads: put one `<defs>` in the diagram,
|
|
130
|
+
`<marker id="a1" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto"><path class="svg-head" d="M0 0L8 4L0 8z"/></marker>`,
|
|
131
|
+
and set `marker-end="url(#a1)"` on a line. Marker ids are shared by the whole
|
|
132
|
+
page, so use `a1`, `a2`, `a3`, … across diagrams, never the same id twice. Give every
|
|
133
|
+
`<svg>` a `viewBox`, `role="img"` and an `aria-label`; keep text at least 11px
|
|
134
|
+
at the viewBox size and keep the width at 640 so it fits a phone.
|
|
135
|
+
|
|
136
|
+
Skeletons (copy, then change the words and the numbers):
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<!-- Sequence: lifelines, one colour per participant -->
|
|
140
|
+
<svg viewBox="0 0 640 220" role="img" aria-label="Browser asks the API, which asks the database">
|
|
141
|
+
<defs><marker id="a1" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto"><path class="svg-head" d="M0 0L8 4L0 8z"/></marker></defs>
|
|
142
|
+
<rect class="svg-box-1" x="40" y="10" width="120" height="34"/><text class="svg-text-1" x="100" y="32" text-anchor="middle">Browser</text>
|
|
143
|
+
<rect class="svg-box-2" x="260" y="10" width="120" height="34"/><text class="svg-text-2" x="320" y="32" text-anchor="middle">API</text>
|
|
144
|
+
<rect class="svg-box-3" x="480" y="10" width="120" height="34"/><text class="svg-text-3" x="540" y="32" text-anchor="middle">Database</text>
|
|
145
|
+
<line class="svg-life" x1="100" y1="44" x2="100" y2="210"/><line class="svg-life" x1="320" y1="44" x2="320" y2="210"/><line class="svg-life" x1="540" y1="44" x2="540" y2="210"/>
|
|
146
|
+
<line class="svg-line-1" x1="100" y1="86" x2="316" y2="86" marker-end="url(#a1)"/><text class="svg-small" x="110" y="78">1 GET /orders</text>
|
|
147
|
+
<line class="svg-line-2" x1="320" y1="126" x2="536" y2="126" marker-end="url(#a1)"/><text class="svg-small" x="330" y="118">2 SELECT</text>
|
|
148
|
+
<line class="svg-line-3 svg-dash" x1="536" y1="166" x2="324" y2="166" marker-end="url(#a1)"/><text class="svg-small" x="360" y="158">3 rows</text>
|
|
149
|
+
</svg>
|
|
150
|
+
|
|
151
|
+
<!-- Swimlane: a band per actor, steps inside it -->
|
|
152
|
+
<svg viewBox="0 0 640 200" role="img" aria-label="The client validates, the server saves">
|
|
153
|
+
<defs><marker id="a2" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto"><path class="svg-head-1" d="M0 0L8 4L0 8z"/></marker></defs>
|
|
154
|
+
<rect class="svg-lane" x="0" y="0" width="640" height="90"/><text class="svg-text-1" x="12" y="20">Client</text>
|
|
155
|
+
<rect class="svg-lane" x="0" y="100" width="640" height="90"/><text class="svg-text-2" x="12" y="120">Server</text>
|
|
156
|
+
<rect class="svg-box-1" x="110" y="30" width="140" height="44"/><text class="svg-label" x="180" y="57" text-anchor="middle">Validate form</text>
|
|
157
|
+
<rect class="svg-box-2" x="330" y="130" width="140" height="44"/><text class="svg-label" x="400" y="157" text-anchor="middle">Save order</text>
|
|
158
|
+
<path class="svg-line-1" d="M250 52H290V152H326" marker-end="url(#a2)"/>
|
|
159
|
+
</svg>
|
|
160
|
+
|
|
161
|
+
<!-- Decision: diamond, outcomes coloured by result -->
|
|
162
|
+
<svg viewBox="0 0 640 180" role="img" aria-label="If the token is expired, refresh it, otherwise send the request">
|
|
163
|
+
<polygon class="svg-box-spot" points="120,20 200,70 120,120 40,70"/><text class="svg-label" x="120" y="74" text-anchor="middle">Expired?</text>
|
|
164
|
+
<line class="svg-line-spot" x1="200" y1="70" x2="330" y2="70"/><text class="svg-small" x="250" y="60">yes</text>
|
|
165
|
+
<rect class="svg-box-2" x="330" y="48" width="150" height="44"/><text class="svg-label" x="405" y="75" text-anchor="middle">Refresh token</text>
|
|
166
|
+
<line class="svg-line" x1="120" y1="120" x2="120" y2="150"/><text class="svg-small" x="130" y="140">no</text>
|
|
167
|
+
<rect class="svg-ok" x="40" y="150" width="160" height="26"/><text class="svg-label" x="120" y="168" text-anchor="middle">Send request</text>
|
|
168
|
+
</svg>
|
|
169
|
+
|
|
170
|
+
<!-- State machine: rounded states, labelled edges -->
|
|
171
|
+
<svg viewBox="0 0 640 140" role="img" aria-label="An order goes from draft to paid to shipped">
|
|
172
|
+
<defs><marker id="a3" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto"><path class="svg-head" d="M0 0L8 4L0 8z"/></marker></defs>
|
|
173
|
+
<rect class="svg-box-1" x="20" y="50" width="130" height="40"/><text class="svg-text-1" x="85" y="75" text-anchor="middle">draft</text>
|
|
174
|
+
<rect class="svg-box-2" x="260" y="50" width="130" height="40"/><text class="svg-text-2" x="325" y="75" text-anchor="middle">paid</text>
|
|
175
|
+
<rect class="svg-box-spot" x="490" y="50" width="130" height="40"/><text class="svg-label" x="555" y="75" text-anchor="middle">shipped</text>
|
|
176
|
+
<line class="svg-line" x1="150" y1="70" x2="258" y2="70" marker-end="url(#a3)"/><text class="svg-small" x="170" y="62">pay()</text>
|
|
177
|
+
<line class="svg-line" x1="390" y1="70" x2="488" y2="70" marker-end="url(#a3)"/><text class="svg-small" x="408" y="62">ship()</text>
|
|
178
|
+
</svg>
|
|
179
|
+
|
|
180
|
+
<!-- Bars: value printed on every bar -->
|
|
181
|
+
<svg viewBox="0 0 640 150" role="img" aria-label="Query time before 840 ms, after 60 ms">
|
|
182
|
+
<line class="svg-axis" x1="110" y1="10" x2="110" y2="130"/>
|
|
183
|
+
<text class="svg-small" x="10" y="42">before</text><rect class="svg-bar-2" x="110" y="26" width="440" height="24"/><text class="svg-label" x="558" y="43">840 ms</text>
|
|
184
|
+
<text class="svg-small" x="10" y="92">after</text><rect class="svg-bar-1" x="110" y="76" width="34" height="24"/><text class="svg-label" x="152" y="93">60 ms</text>
|
|
185
|
+
</svg>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Whatever the type, it shows the real mechanism of *this*
|
|
189
|
+
page, with the real names from the code, not a generic boxes-and-arrows
|
|
190
|
+
picture. Check it at phone width (labels not clipped, nothing overlapping).
|
|
84
191
|
|
|
85
192
|
**Stay on the design system.** Components already in the template: `.eyebrow`,
|
|
86
193
|
`.lede`, `.card`, `.grid`, `.chip` (`.warn`, `.bad`), `.stat` (`.k`, `.v`,
|
|
@@ -98,10 +205,13 @@ follows Eklavya's rules:
|
|
|
98
205
|
`--line-2`; accent `--spot`, `--spot-soft` (tints), `--spot-ink` (text on a
|
|
99
206
|
`--spot` fill); state `--warning`, `--error`. `--faint-2` is for disabled
|
|
100
207
|
marks only, never readable text.
|
|
101
|
-
- **One accent**, verdigris `--spot`, spent a handful of times: the
|
|
102
|
-
matters, a key number, a link.
|
|
103
|
-
|
|
104
|
-
colour
|
|
208
|
+
- **One accent for the page**, verdigris `--spot`, spent a handful of times: the
|
|
209
|
+
node that matters, a key number, a link. **Diagrams may also use the five
|
|
210
|
+
category roles** `--viz-1` … `--viz-5` (teal, amber, blue, violet, rose) and
|
|
211
|
+
their `-soft` tints, through the `.svg-*-N` classes only. A colour names a
|
|
212
|
+
group and always carries a word. `--warning` and `--error` mean a real
|
|
213
|
+
warning or mistake: use `.svg-bad` for a fault, never a category colour.
|
|
214
|
+
No other hues, and no category colour outside a diagram.
|
|
105
215
|
- **Square and flat.** `border-radius: 0` on every box, chip and table; circles
|
|
106
216
|
only for dots. Separate with 1px hairlines, not shadows.
|
|
107
217
|
- **Type through the variables**: `--font-disp` (Archivo) for headings,
|
|
@@ -143,6 +253,8 @@ searchable view.
|
|
|
143
253
|
|---|---|
|
|
144
254
|
| Writing the file into the project repository | Artifacts live under `~/.eklavya/artifacts/`, always — `new` puts them there |
|
|
145
255
|
| A wall of prose describing a sequence | That is a step diagram. Draw it |
|
|
256
|
+
| Every diagram is a grey row of boxes | Pick the type from the table; colour by actor or layer |
|
|
257
|
+
| A colour with no label, or the same marker id in two diagrams | Name the group in text; `a1`, `a2`, … once each |
|
|
146
258
|
| Raw hex, rounded cards, drop shadows | Role tokens, square chrome, hairlines |
|
|
147
259
|
| `html2pdf` or `jspdf` from a CDN | The PDF button is `window.print()` plus the print stylesheet |
|
|
148
260
|
| A PDF page two-thirds empty | A `break-inside: avoid` on a block taller than a page |
|
package/package.json
CHANGED