selflore 0.2.0 → 0.3.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/LICENSE +21 -0
- package/README.md +34 -9
- package/dist/cli.js +1 -1
- package/dist/init.js +10 -8
- package/dist/lib/config.js +1 -1
- package/dist/lib/notes-html.js +1 -1
- package/dist/lib/notes-page-js.js +5 -5
- package/dist/lib/nudge.js +1 -1
- package/dist/lib/ui.js +1 -1
- package/package.json +7 -3
- package/skill/SKILL.md +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lakshay Gupta
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -5,13 +5,22 @@
|
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<h1 align="center">SelfLore</h1>
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
<p align="center"><strong>Ship with Claude. Still know your shit.</strong></p>
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img src="public/3d-map.png" alt="The selflore heat map: you in the middle, your topics around you, and every note as a dot that runs from slate where you're settled to glowing red where you get stuck" width="760">
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
When Claude writes the code, fixes the bug and makes the call, the work gets done and you learn nothing. A month later you can't explain your own codebase, and the next time it breaks you ask Claude again.
|
|
17
|
+
|
|
18
|
+
selflore is a Claude Code skill that keeps you the engineer, not just the person approving diffs:
|
|
13
19
|
|
|
14
|
-
|
|
20
|
+
- **It catches what you should have learned.** While you work, it notes what Claude built for you and why: the bug that was root-caused, the tradeoff that was made, the thing you had to ask about.
|
|
21
|
+
- **It shows where you're leaning on Claude.** Asking about the same thing twice, or the same code breaking on you again and again, marks a place you get stuck. The heat map shows all of them at a glance.
|
|
22
|
+
- **It tests you.** A short weekly test on what Claude did for you that week, and a test on any area whenever you ask. Each miss is explained, and comes back next time until you get it.
|
|
23
|
+
- **It answers from what you were already told.** Ask "why does this retry twice?" and Claude answers from your notes, with the date, checked against today's code, so you see you've asked before.
|
|
15
24
|
|
|
16
25
|
## Install
|
|
17
26
|
|
|
@@ -26,14 +35,14 @@ A few questions:
|
|
|
26
35
|
- **focus**: details, design or mixed, plus a balance if you pick mixed;
|
|
27
36
|
- **how capture happens**: background, quiet or off;
|
|
28
37
|
- the model for background capture;
|
|
29
|
-
-
|
|
38
|
+
- **the weekly test**: on with a reminder (default), on without one, or off;
|
|
30
39
|
- whether selflore may offer a 2-minute check (default: yes).
|
|
31
40
|
|
|
32
41
|
Re-run `init` at any time to change your answers. Your data is kept. Restart any open Claude Code sessions afterwards.
|
|
33
42
|
|
|
34
43
|
## Use
|
|
35
44
|
|
|
36
|
-
Work normally. selflore never
|
|
45
|
+
Work normally. selflore never stops you mid-task; the learning happens around the work, not in the middle of it.
|
|
37
46
|
|
|
38
47
|
**It captures.** After turns with real work, a separate headless Claude reads the new part of the session and writes notes. What counts:
|
|
39
48
|
- something you asked to have explained (the strongest signal: you just said what you didn't know);
|
|
@@ -51,17 +60,29 @@ Each note has 1–3 topics (`stripe`, `idempotency`), the files it is about, a q
|
|
|
51
60
|
|
|
52
61
|
When that happens, selflore says so once ("Third time `src/auth/token.ts` has bitten you. Want the 2-minute version?"). At most one offer per session, never twice about the same thing in a month, and you can turn offers off.
|
|
53
62
|
|
|
54
|
-
**It tests you
|
|
63
|
+
**It tests you.** Once a week, `/selflore test` asks about 10 questions on that week's work (a one-line reminder at the start of a session tells you when it is due; turn the reminder or the test off in `init`). Any time, `/selflore test auth flow in nebula`, or a project, or a topic. Three to five questions, graded straight away, each miss explained. A question you miss comes back first the next time you test that area. A bare `/selflore test` suggests the areas where you get stuck and lets you pick.
|
|
55
64
|
|
|
56
65
|
| Command | What it does |
|
|
57
66
|
|---|---|
|
|
58
67
|
| ask in plain words, or `/selflore recall <question>` | Answers from your notes, with the date, checked against the current code. |
|
|
59
68
|
| `/selflore test [anything]` | A short test on a project (`nebula/v0`), a topic (`react`) or anything in your own words. Say `unfair` to drop a question for good. |
|
|
60
69
|
| `/selflore notes` | Opens your notes in the browser: **Map**, **Notes** and **Stats**. In the terminal: `npx selflore notes` (`--project <name>`, or `--text` for plain text, with `--all` for every week). |
|
|
61
|
-
| `/selflore stats` | Where you get stuck and why, then
|
|
70
|
+
| `/selflore stats` | Where you get stuck and why, then how your tests went. |
|
|
62
71
|
| `/selflore log` | Write a note by hand. Also covers work done outside Claude Code. |
|
|
63
72
|
| `/selflore focus` | What gets captured: `details`, `design` or `mixed`, globally or per project. |
|
|
64
73
|
|
|
74
|
+
### `selflore notes`
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npx selflore notes # or /selflore notes inside Claude Code
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Opens a page in your browser that shows what you know and where you get stuck, with **Map**, **Notes** and **Stats** tabs and a **Test me** button.
|
|
81
|
+
|
|
82
|
+
<p align="center">
|
|
83
|
+
<img src="public/selflore-ss.png" alt="The selflore notes page: the 3D heat map of your projects, with a list of where you get stuck beside it" width="900">
|
|
84
|
+
</p>
|
|
85
|
+
|
|
65
86
|
**The map.** The page opens on a 3D heat map of all your notes: you → projects (or topics) → notes, with a short "Where you get stuck" list beside it. Colour and size are heat: dim slate where things are settled, through amber, to red where you get stuck, and only a stuck note glows. A small hollow dot has no signal yet. It turns slowly and holds still while your pointer is over it. Drag to rotate, pinch or ⌘ + scroll to zoom, click a dot to see why it is the colour it is. **Flat** switches to a 2D view that is easier to read; **Labels** off gives you a picture with no project text in it. The 3D renderer ships with selflore; the page loads nothing from the internet.
|
|
66
87
|
|
|
67
88
|
**Notes** is the same notes as text: search, filters, newest or stuck first. Each note is one line and opens in place with its answer, code, files and the reasons for its heat. Notes are grouped by week (or by how stuck); the newest groups start open, older ones are folded to a heading with a count, and a long group shows its first 15.
|
|
@@ -79,7 +100,7 @@ selflore focus mixed --balance design # mostly design
|
|
|
79
100
|
selflore focus --reset --project # back to the global setting
|
|
80
101
|
```
|
|
81
102
|
|
|
82
|
-
**Upgrading from 0.1.** Run `npx selflore init`. Your notes are kept. Notes from before topics existed are tagged `architecture` or `debugging`; `npx selflore retag` proposes real topics for them (it changes nothing), and `npx selflore retag --apply` writes them after backing the notes up.
|
|
103
|
+
**Upgrading from 0.1.** Run `npx selflore init`. Your notes are kept. Notes from before topics existed are tagged `architecture` or `debugging`; `npx selflore retag` proposes real topics for them (it changes nothing), and `npx selflore retag --apply` writes them after backing the notes up. An old config keeps the weekly test only if you had actually been taking it; re-running `init` lets you turn it on.
|
|
83
104
|
|
|
84
105
|
## Remove
|
|
85
106
|
|
|
@@ -123,3 +144,7 @@ SELFLORE_HOME=/tmp/sl CLAUDE_HOME=/tmp/cl node dist/cli.js init --yes # sandbo
|
|
|
123
144
|
```
|
|
124
145
|
|
|
125
146
|
MIT
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
[MIT](LICENSE)
|
package/dist/cli.js
CHANGED
|
@@ -24,7 +24,7 @@ function help() {
|
|
|
24
24
|
` ${bold("Usage")}`,
|
|
25
25
|
row("npx selflore init", "Install the skill and hooks and set up (re-run to change answers)"),
|
|
26
26
|
row("npx selflore init --yes", "No questions: keep your config, or use the defaults"),
|
|
27
|
-
row("npx selflore notes", "
|
|
27
|
+
row("npx selflore notes", "See what you know and where you get stuck: heat map, notes, stats"),
|
|
28
28
|
more("--project <name>; --text [--all] for plain text"),
|
|
29
29
|
row("npx selflore focus [mode]", "Show or set what gets captured: details | design | mixed"),
|
|
30
30
|
more("--balance design|balanced|details for mixed"),
|
package/dist/init.js
CHANGED
|
@@ -91,11 +91,11 @@ async function ask(existing, reinstall) {
|
|
|
91
91
|
}));
|
|
92
92
|
}
|
|
93
93
|
const weekly = bail(await p.select({
|
|
94
|
-
message: "
|
|
94
|
+
message: "Weekly test: about 10 questions on what Claude built for you that week",
|
|
95
95
|
options: [
|
|
96
|
-
{ value: "
|
|
97
|
-
{ value: "quiet", label: "
|
|
98
|
-
{ value: "
|
|
96
|
+
{ value: "nudge", label: "On, and remind me", hint: "recommended; a one-line reminder when the week's test is due" },
|
|
97
|
+
{ value: "quiet", label: "On, no reminder", hint: "it runs when you type /selflore test" },
|
|
98
|
+
{ value: "off", label: "Off", hint: "you only get tested when you ask for a test on something" },
|
|
99
99
|
],
|
|
100
100
|
initialValue: existing.cadence === "weekly" ? (existing.nudge ? "nudge" : "quiet") : "off",
|
|
101
101
|
}));
|
|
@@ -143,11 +143,13 @@ export async function init(opts) {
|
|
|
143
143
|
`skill ${paths.skill()}`,
|
|
144
144
|
`hooks SessionStart + Stop + UserPromptSubmit in ${paths.settings()}`,
|
|
145
145
|
"",
|
|
146
|
-
"Work normally. selflore
|
|
146
|
+
"Work normally. selflore notes what Claude did that you should understand.",
|
|
147
147
|
"Per-project focus: run `selflore focus details --project` inside a repo.",
|
|
148
|
-
"Ask Claude how or why something in your code works: it answers from
|
|
149
|
-
|
|
148
|
+
"Ask Claude how or why something in your code works: it answers from what you were told before.",
|
|
149
|
+
config.cadence === "weekly"
|
|
150
|
+
? "Once a week, /selflore test checks you still know it. /selflore test <anything> tests one area now."
|
|
151
|
+
: "/selflore test <anything> tests you on an area whenever you want.",
|
|
150
152
|
"Restart any open Claude Code sessions to pick up the skill and hooks.",
|
|
151
153
|
].join("\n"), "Installed");
|
|
152
|
-
p.outro("
|
|
154
|
+
p.outro("Ship with Claude. Still know your shit.");
|
|
153
155
|
}
|
package/dist/lib/config.js
CHANGED
package/dist/lib/notes-html.js
CHANGED
|
@@ -107,7 +107,7 @@ export function renderNotesHtml(data) {
|
|
|
107
107
|
<head>
|
|
108
108
|
<meta charset="utf-8">
|
|
109
109
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
110
|
-
<title>selflore
|
|
110
|
+
<title>selflore</title>
|
|
111
111
|
<link rel="icon" type="image/png" href="${FAVICON}">
|
|
112
112
|
<style>:root { --logo: url("${LOGO_MASK}"); --logo-ratio: ${LOGO_MASK_RATIO}; }
|
|
113
113
|
${PAGE_CSS}${GRAPH_CSS}</style>
|
|
@@ -613,22 +613,22 @@ export const PAGE_JS = String.raw `
|
|
|
613
613
|
}
|
|
614
614
|
el.appendChild(tests);
|
|
615
615
|
|
|
616
|
-
// 4.
|
|
616
|
+
// 4. Where the user still leaned on Claude: questions about their own code, re-asks, fixes that looped.
|
|
617
617
|
var act = DATA.activity || { days: 30, asks: 0, reasks: 0, loops: 0, asked: [] };
|
|
618
618
|
var all = {}; DATA.entries.forEach(function (e) { all[e.id] = e; });
|
|
619
|
-
var recall = h("section", { class: "sec" }, h("h2", { text: "
|
|
619
|
+
var recall = h("section", { class: "sec" }, h("h2", { text: "Where you leaned on Claude, last " + act.days + " days" }));
|
|
620
620
|
if (!act.asks && !act.reasks && !act.loops) {
|
|
621
|
-
recall.appendChild(h("p", { class: "figs", text: "Nothing yet. This fills in when
|
|
621
|
+
recall.appendChild(h("p", { class: "figs", text: "Nothing yet. This fills in when you ask Claude about your own code, or a fix takes several tries." }));
|
|
622
622
|
} else {
|
|
623
623
|
recall.appendChild(facts(h("p", { class: "figs" }), [
|
|
624
|
-
[act.asks, act.asks === 1 ? "question
|
|
624
|
+
[act.asks, act.asks === 1 ? "question about your own code" : "questions about your own code"],
|
|
625
625
|
act.reasks ? [act.reasks, "asked again"] : null,
|
|
626
626
|
act.loops ? [act.loops, act.loops === 1 ? "fix that took several tries" : "fixes that took several tries"] : null,
|
|
627
627
|
]));
|
|
628
628
|
}
|
|
629
629
|
var asked = (act.asked || []).filter(function (a) { return all[a.id]; });
|
|
630
630
|
if (asked.length) {
|
|
631
|
-
recall.appendChild(h("h3", { class: "label", text: "
|
|
631
|
+
recall.appendChild(h("h3", { class: "label", text: "What you keep asking about" }));
|
|
632
632
|
asked.forEach(function (a) {
|
|
633
633
|
recall.appendChild(h("button", { class: "asked", title: "Show this note", onclick: function () {
|
|
634
634
|
state.q = ""; search.value = ""; state.all = true; FILTER_KEYS.forEach(function (k) { state[k] = null; }); state.project = all[a.id].project; showNote(a.id);
|
package/dist/lib/nudge.js
CHANGED
|
@@ -16,7 +16,7 @@ export function sessionStartContext(sessionId, config, oldestEntryDate, now) {
|
|
|
16
16
|
if (sessionId)
|
|
17
17
|
lines.push(`selflore session_id=${sessionId}`);
|
|
18
18
|
lines.push(CAPTURE_LINE[config.capture]);
|
|
19
|
-
//
|
|
19
|
+
// The weekly test is on by default; turning it off in `init`, or turning off its reminder, silences this.
|
|
20
20
|
if (config.cadence === "weekly" && config.nudge && testOverdue(config, oldestEntryDate, now))
|
|
21
21
|
lines.push("selflore: weekly test overdue — mention once that the user can run /selflore test (~20 min).");
|
|
22
22
|
return lines.join("\n");
|
package/dist/lib/ui.js
CHANGED
|
@@ -33,7 +33,7 @@ const GLYPHS = {
|
|
|
33
33
|
export const WORDMARK = [0, 1, 2, 3, 4, 5].map((row) => Array.from("selflore", (c) => GLYPHS[c][row]).join(""));
|
|
34
34
|
/** Columns the banner needs: the wordmark plus its left margin. */
|
|
35
35
|
export const BANNER_WIDTH = WORDMARK[0].length + 4;
|
|
36
|
-
export const TAGLINE = "
|
|
36
|
+
export const TAGLINE = "ship with Claude. still know your shit.";
|
|
37
37
|
/**
|
|
38
38
|
* The wordmark's colours, left to right: the notes page's indigo accent over "self", then its heat
|
|
39
39
|
* scale (amber up to the red of a stuck note) over "lore". All mid-tones, so the word holds on a
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "selflore",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Ship with Claude. Still know your code. A Claude Code skill that catches what Claude built that you didn't learn, shows where you get stuck, and tests you on it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
7
7
|
"claude-skill",
|
|
8
8
|
"claude-code",
|
|
9
|
-
"selflore"
|
|
9
|
+
"selflore",
|
|
10
|
+
"learning",
|
|
11
|
+
"developer-learning",
|
|
12
|
+
"ai-coding",
|
|
13
|
+
"spaced-repetition"
|
|
10
14
|
],
|
|
11
15
|
"author": "lak7-manadon",
|
|
12
16
|
"license": "MIT",
|
package/skill/SKILL.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: selflore
|
|
3
|
-
description:
|
|
3
|
+
description: Makes sure a developer who ships with Claude still understands what Claude built. It keeps dated notes on the work Claude did for them and why, answers their questions from those notes, finds where they keep getting stuck, and tests them on it. Use it when the developer asks how or why something in their own codebase works (answer from their notes), for /selflore recall, test, log, notes, stats and focus, and for any "selflore:" line in the session context. Capture normally happens automatically in the background; check the session context line "selflore capture=<mode>" before logging anything yourself.
|
|
4
4
|
argument-hint: "recall <question> | test | log | notes | stats | focus"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# selflore
|
|
8
8
|
|
|
9
|
-
selflore keeps notes on what you (the agent) did *for* the user and why. The notes answer the user's questions later, with a date
|
|
9
|
+
selflore exists so the user can ship with you and still know their code. It keeps notes on what you (the agent) did *for* the user and why. The notes answer the user's questions later, with a date; the areas they keep asking about or keep breaking show where they get stuck; and short tests check that they actually understand it. Never lecture or guilt the user, and never suggest a test unless a `selflore:` line in the session context tells you to.
|
|
10
10
|
|
|
11
11
|
All bookkeeping goes through the data CLI. Never edit `~/.selflore/` files by hand.
|
|
12
12
|
|