eklavya 1.26.0 → 1.27.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/dist/artifacts.js +214 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/assets/artifact-template.html +144 -0
- package/dist/assets/dashboard.html +119 -2
- package/dist/assets/tutor/SKILL.md +7 -0
- package/dist/cli-memory.js +6 -3
- package/dist/cli-memory.js.map +1 -1
- package/dist/cli.js +85 -2
- package/dist/cli.js.map +1 -1
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -1
- package/dist/dashboard.js +41 -1
- package/dist/dashboard.js.map +1 -1
- package/dist/hooks/memory-lib.js +1 -1
- package/dist/hooks/memory-lib.js.map +1 -1
- package/dist/hooks/session-start.js +10 -2
- package/dist/hooks/session-start.js.map +1 -1
- package/dist/install-lock.js +155 -0
- package/dist/install-lock.js.map +1 -0
- package/dist/install.js +64 -45
- package/dist/install.js.map +1 -1
- package/dist/memory/reservation.js +15 -5
- package/dist/memory/reservation.js.map +1 -1
- package/dist/memory/worker.js +72 -31
- package/dist/memory/worker.js.map +1 -1
- package/dist/migrations/015_event_link_indexes.sql +24 -0
- package/dist/paths.js +8 -0
- package/dist/paths.js.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/agents/explainer.md +55 -0
- package/dist/plugin/agents/tutor.md +7 -0
- package/dist/plugin/hooks/CLAUDE.md +14 -2
- package/dist/plugin/hooks/run.mjs +104 -21
- package/dist/plugin/skills/CLAUDE.md +7 -0
- package/dist/plugin/skills/tutor/SKILL.md +7 -0
- package/dist/tools/config_tools.js +4 -0
- package/dist/tools/config_tools.js.map +1 -1
- package/dist/tools/record_attempt.js +25 -1
- package/dist/tools/record_attempt.js.map +1 -1
- package/dist/update.js +7 -83
- package/dist/update.js.map +1 -1
- package/dist/user-skill/eklavya/SKILL.md +8 -0
- package/dist/user-skill/eklavya-artifacts/SKILL.md +116 -0
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: eklavya-artifacts
|
|
3
|
+
description: "Use when the user asks for an Eklavya artifact, an explainer page, a visual doc, a one-pager, a report, a diagram writeup, or to \"make this into a page\" — or asks Eklavya to explain a concept or a question they got wrong as a page. Writes a local HTML file under ~/.eklavya/artifacts/<project>/ and opens it. Not for publishing a shareable link."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Eklavya artifacts
|
|
7
|
+
|
|
8
|
+
An artifact is a single self-contained HTML page on this machine, filed under
|
|
9
|
+
`~/.eklavya/artifacts/<project>/` and listed in the Artifacts section of
|
|
10
|
+
`eklavya dashboard`. It never becomes a link: nothing here publishes, uploads or
|
|
11
|
+
shares, and the page makes no request except for its web fonts.
|
|
12
|
+
|
|
13
|
+
**Announce at start:** "Writing this as an Eklavya artifact."
|
|
14
|
+
|
|
15
|
+
## Step 1: Find the binary
|
|
16
|
+
|
|
17
|
+
`eklavya` is usually not on `PATH`. Resolve it once:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
command -v eklavya || command -v "$HOME/.eklavya/runtime/node_modules/.bin/eklavya"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Write the printed path into every later command — shell variables do not
|
|
24
|
+
survive between tool calls. On Windows it is `eklavya.cmd` in that same `.bin`
|
|
25
|
+
directory. If both print nothing, use `npx -y eklavya`; if that fails too,
|
|
26
|
+
Eklavya is not installed — say so and give `npx eklavya install`.
|
|
27
|
+
|
|
28
|
+
## Step 2: Start the page
|
|
29
|
+
|
|
30
|
+
Run it from the directory the work is about, so it is filed under that project
|
|
31
|
+
(a worktree files under its main checkout):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
eklavya artifacts new "<Title>" --description "<one line: what this page answers>"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Add `--kind explainer --concept <slug>` when the page explains an Eklavya
|
|
38
|
+
concept, so the dashboard links it to that concept.
|
|
39
|
+
|
|
40
|
+
It prints the path of a new file, already carrying the Eklavya template: the
|
|
41
|
+
design tokens inlined, dark by default, the print stylesheet, the PDF and HTML
|
|
42
|
+
download buttons, the title, the lede and the metadata the dashboard reads.
|
|
43
|
+
Never write a page from scratch and never pick the path yourself — `new` is the
|
|
44
|
+
one place both are decided, and a page without its metadata is listed as a bare
|
|
45
|
+
filename.
|
|
46
|
+
|
|
47
|
+
## Step 3: Write the content
|
|
48
|
+
|
|
49
|
+
Edit the file: replace the `<!-- CONTENT … -->` comment with the page, and
|
|
50
|
+
adjust the lede if the description was too short. Leave the `<head>`, the
|
|
51
|
+
`.actions` toolbar and its script alone.
|
|
52
|
+
|
|
53
|
+
**Write for the person reading it.** Plain English first: what the thing *does*
|
|
54
|
+
before what it is called. One idea per section under an `<h2>`. A concrete
|
|
55
|
+
example — a timeline, a snippet with the broken and the fixed line — beats a
|
|
56
|
+
paragraph of definition. Name the gotcha at the end, in plain terms.
|
|
57
|
+
|
|
58
|
+
**Draw whenever an idea has moving parts.** A sequence, a branch, a
|
|
59
|
+
before/after, a hierarchy or a number worth comparing is a diagram that has not
|
|
60
|
+
been drawn yet; two or three in a medium page is normal.
|
|
61
|
+
|
|
62
|
+
| The thing being explained | Draw |
|
|
63
|
+
|---|---|
|
|
64
|
+
| Ordered process, pipeline | Step / flow diagram |
|
|
65
|
+
| Decision, branch, retry | Gate or decision diagram |
|
|
66
|
+
| Who calls whom, over time | Sequence diagram |
|
|
67
|
+
| Boxes and boundaries | Architecture diagram |
|
|
68
|
+
| States and transitions | State diagram |
|
|
69
|
+
| Two options side by side | Comparison table plus a before/after pair |
|
|
70
|
+
|
|
71
|
+
Draw them as **inline SVG** inside `<figure>`, with the template's classes —
|
|
72
|
+
`.svg-box`, `.svg-box-spot` (the one node that matters), `.svg-line`,
|
|
73
|
+
`.svg-line-spot`, `.svg-label`, `.svg-small`, `.svg-muted` — and a
|
|
74
|
+
`<figcaption>` that states the takeaway, not the title. Never a raster image,
|
|
75
|
+
ASCII boxes or a Mermaid script: inline SVG themes and prints, the others do
|
|
76
|
+
not.
|
|
77
|
+
|
|
78
|
+
**Stay on the design system.** Components already in the template: `.eyebrow`,
|
|
79
|
+
`.lede`, `.card`, `.grid`, `.chip` (`.warn`, `.bad`), `.stat` (`.k`, `.v`,
|
|
80
|
+
`.d`), `.callout`, `td.num`. Any new CSS names a role — `--bg --panel --mass
|
|
81
|
+
--ink --dim --faint --line --line-2 --spot --spot-soft --warning --error` —
|
|
82
|
+
never a raw hex, and keeps `border-radius: 0`. One accent, verdigris `--spot`,
|
|
83
|
+
spent sparingly. No emoji.
|
|
84
|
+
|
|
85
|
+
**Keep it one file.** Everything inline. An external stylesheet, script or
|
|
86
|
+
image breaks the HTML download, which hands over the page itself.
|
|
87
|
+
|
|
88
|
+
Print rules the template already carries, and that new CSS must not undo:
|
|
89
|
+
`break-inside: avoid` only on things shorter than a page (rows, cards,
|
|
90
|
+
figures); never on a tall wrapper, or the PDF gets half-empty pages. No
|
|
91
|
+
`@page` margin — it prints a white frame round a dark page. No
|
|
92
|
+
`prefers-color-scheme` block: dark is the default, and `data-mode="paper"` on
|
|
93
|
+
`<html>` is the light ground.
|
|
94
|
+
|
|
95
|
+
## Step 4: Open it
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
eklavya artifacts open "<the path new printed>"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Report the path in one line. Do not mention links, publishing or sharing.
|
|
102
|
+
|
|
103
|
+
`eklavya artifacts list` shows every page, newest first (`--here` for this
|
|
104
|
+
project, `--json` for the ids); `eklavya dashboard` then **Artifacts** is the
|
|
105
|
+
searchable view.
|
|
106
|
+
|
|
107
|
+
## Common mistakes
|
|
108
|
+
|
|
109
|
+
| Mistake | Fix |
|
|
110
|
+
|---|---|
|
|
111
|
+
| Writing the file into the project repository | Artifacts live under `~/.eklavya/artifacts/`, always — `new` puts them there |
|
|
112
|
+
| A wall of prose describing a sequence | That is a step diagram. Draw it |
|
|
113
|
+
| Raw hex, rounded cards, drop shadows | Role tokens, square chrome, hairlines |
|
|
114
|
+
| `html2pdf` or `jspdf` from a CDN | The PDF button is `window.print()` plus the print stylesheet |
|
|
115
|
+
| A PDF page two-thirds empty | A `break-inside: avoid` on a block taller than a page |
|
|
116
|
+
| White band on top and bottom of the PDF | The print dialog's *Headers and footers* setting; CSS cannot reach it |
|
package/package.json
CHANGED