dsh-nerd-mode 0.2.1 → 0.4.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 +215 -163
- package/README.zh.md +217 -163
- package/assets/calibration.svg +69 -0
- package/assets/choose-a-mode.svg +48 -0
- package/assets/nerd.svg +22 -0
- package/assets/two-paths.svg +93 -0
- package/client.js +1375 -161
- package/cordis.patch.yml +28 -19
- package/lib/index.js +121 -1
- package/package.json +15 -3
- package/skills/study/SKILL.md +78 -86
- package/skills/study-plus/SKILL.md +239 -185
- package/skills/study-plus/scripts/book-client.js +286 -0
- package/skills/study-plus/scripts/book-data.mjs +289 -0
- package/skills/study-plus/scripts/build-book.mjs +149 -0
- package/skills/writing-beats/agents/openai.yaml +1 -1
- package/assets/icon-dark.svg +0 -5
- package/assets/icon-light.svg +0 -5
package/README.md
CHANGED
|
@@ -1,163 +1,215 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
The
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/nerd.svg" width="280" alt="A hand-drawn nerd with thick glasses and two buck teeth">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Nerd Mode for DeepSeek Harness</h1>
|
|
6
|
+
|
|
7
|
+
<hr>
|
|
8
|
+
|
|
9
|
+
<p align="center"><em>One concept at a time, with a record that outlives the chat.</em></p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="./README.zh.md"><img src="https://img.shields.io/badge/%E4%B8%AD%E6%96%87-switch-d0d7de" alt="中文"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
A chat lesson usually ends when the answer arrives. Nothing checks that you understood it, and nothing survives the tab closing. Nerd Mode makes dsh teach in steps, stop where the choice changes the result, and keep a dated record when a subject deserves one. A topic can then last weeks instead of one sitting.
|
|
16
|
+
|
|
17
|
+
## Key features
|
|
18
|
+
|
|
19
|
+
- One switch for the whole conversation. `/nerd-mode on` teaches every learning-shaped request and leaves feature work, searches, and commands alone.
|
|
20
|
+
- Two ways to learn. `/study` answers one concept or one task in chat and keeps nothing. `/study-plus` runs one topic over weeks with a dated record.
|
|
21
|
+
- A map before the first lesson. A concept graph in prerequisite order, grouped into a Book of Chapters and Sections, approved by you before any file is written.
|
|
22
|
+
- One calibration round per topic. It asks your goal, your background, and the concepts you can skip, then sets a teaching level that every lecture follows.
|
|
23
|
+
- Teaching that stops at the fork. The guide explains in steps and stops where the choice changes the result, instead of handing over a finished answer.
|
|
24
|
+
- Evidence, not impressions. Unseen questions and a graded teach-back, with the rubric written before the question. Only an answer you produced changes the record.
|
|
25
|
+
- A record that outlives the chat. The graph, the states, and the dated log survive restarts, and the HTML Book rebuilds after each batch and each lesson, with full-text search.
|
|
26
|
+
- Lectures you can find again. The Lectures card lists every saved lecture in the workspace, grouped by topic.
|
|
27
|
+
|
|
28
|
+
## Requirements
|
|
29
|
+
|
|
30
|
+
- DeepSeek Harness with a profile.
|
|
31
|
+
- Node.js 22.19 or newer.
|
|
32
|
+
- Windows, macOS, or Linux.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
From npm:
|
|
37
|
+
|
|
38
|
+
```powershell
|
|
39
|
+
dsh plugin --profile <profile> add dsh-nerd-mode
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
From GitHub:
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
dsh plugin --profile <profile> add github:bocchii-the-code/dsh-nerd-mode
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
From a local folder or tarball:
|
|
49
|
+
|
|
50
|
+
```powershell
|
|
51
|
+
dsh plugin --profile <profile> add C:\path\to\dsh-nerd-mode
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Restart dsh. Every mode gains the `/nerd-mode` command and a `Nerd Mode` pill in the composer bar. The mode picker gains no new entry, because the plugin mounts at profile level rather than as a preset.
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
Ask a question and Nerd Mode takes one of two paths. Both teach in steps and stop at the fork, the point where the choice changes the result. They differ in what they keep.
|
|
59
|
+
|
|
60
|
+
<p align="center">
|
|
61
|
+
<img src="assets/two-paths.svg" width="720" alt="Two panels side by side. On the left, /study takes one question and one answer, then ends. On the right, /study-plus builds a concept graph, Book, Chapters, and Sections, keeps one lecture per concept, and records each lesson across weeks.">
|
|
62
|
+
</p>
|
|
63
|
+
|
|
64
|
+
### Quick lesson: `/study`
|
|
65
|
+
|
|
66
|
+
It walks one concept or one task from the first step to the last and stops once at the fork. A concept comes in layers, from intuition to terms to formal detail. A task comes as the finished artifact, with one line of reason beside each step. It keeps no learner record and grades nothing. It saves a lecture or artifact only when you name a path, and it may draw an SVG figure when a picture helps. The lecture-writing rules that `/study-plus` follows are the ones in this skill.
|
|
67
|
+
|
|
68
|
+
Use it for a question you want to understand now and will probably not return to.
|
|
69
|
+
|
|
70
|
+
- Reading a paper and a term stops you.
|
|
71
|
+
- A homework problem you have to finish tonight.
|
|
72
|
+
- A file whose logic you need to follow before you change it.
|
|
73
|
+
- A small decision where you want the trade-off spelled out before you pick.
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
/study why does Adam divide by 1 - beta^t
|
|
77
|
+
/study walk me through the preconditioner in this file # with code
|
|
78
|
+
/study help me finish problem 3, and explain each step # with homework
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Type the command, or turn the switch on and just ask. With the switch on, a learning-shaped request gets this shape by default.
|
|
82
|
+
|
|
83
|
+
An explicit `/study-plus` goes straight to tracked study, even when the request names several concepts. An explicit `/study`, or a request that arrives through Nerd Mode without a command, asks one question when it names two or more independent concepts: a one-off book-style answer in chat, or a tracked `/study-plus` session. The one-off answer uses a title, chapter headings, and section headings in plain Markdown.
|
|
84
|
+
|
|
85
|
+
You get a title, the central idea, numbered steps, one line of symbols above each formula, and a short table only when four or more symbols keep coming back. Then one worked example, the common mistake, and the single stop at the fork. For a task, you get the finished artifact with its reasoning.
|
|
86
|
+
|
|
87
|
+
It does not score, keep a learner record, or continue a topic across sessions. A saved lecture or artifact goes only where you ask, at the path you name.
|
|
88
|
+
|
|
89
|
+
### Long lesson: `/study-plus`
|
|
90
|
+
|
|
91
|
+
It organizes one topic as a Book of Chapters and Sections, with one concept per Section. It builds a concept graph in prerequisite order, groups the concepts into Chapters, and teaches and assesses one concept in each Concept cycle. The graph carries Chapter and Section columns, so one file records the reading order beside the prerequisite order. It keeps three tracker files and saves one Markdown file per concept under `study/<slug>/lectures/`. Once you approve the graph it prepares a complete draft for every concept, so a lesson starts without waiting. It builds an HTML book from the saved material and refreshes that page whenever the material changes.
|
|
92
|
+
|
|
93
|
+
Use it for a subject you will still be learning next month.
|
|
94
|
+
|
|
95
|
+
- You are working through a textbook, a course, or a paper properly.
|
|
96
|
+
- You want the textbook's chapters to organize what you reread.
|
|
97
|
+
- You want to know what to study next, and a chat only answers what you ask.
|
|
98
|
+
- You want evidence of progress, not an impression of it.
|
|
99
|
+
- You keep looking things up and forgetting them.
|
|
100
|
+
|
|
101
|
+
An explicit `/study-plus` starts tracked study directly and does not ask the one-off book question, even when the topic covers several concepts.
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
/study-plus Shampoo and Adam optimizers # first session builds the graph
|
|
105
|
+
/study-plus # later sessions continue the topic
|
|
106
|
+
/study-plus chapter 2 # read that chapter in Book order
|
|
107
|
+
/study-plus the matrix square root # jump straight to one concept
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
The first session runs in a fixed order.
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
/study-plus <topic>
|
|
114
|
+
propose 15 to 30 concepts in prerequisite order, grouped into Chapters
|
|
115
|
+
show the chapter list and the concept table together, then wait
|
|
116
|
+
you approve, edit, or rebuild the graph
|
|
117
|
+
you answer one calibration round: goal, background, and concepts to skip
|
|
118
|
+
write one complete draft per concept, skipped concepts included
|
|
119
|
+
teach each concept: recall (optional) → lecture → configured unseen questions → teach-back → dated record
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Approval also runs one calibration round: what you want to do with the topic, what you have already read or used, and the concepts you can skip. The answers set `Teaching level` in `graph.md`, beside `Goal` and `Background`, and every lecture follows that level. It shapes the lecture only, never the questions, the teach-back, or the record. A mid-topic change lasts for that session unless you say to keep it.
|
|
123
|
+
|
|
124
|
+
<p align="center">
|
|
125
|
+
<img src="assets/calibration.svg" width="720" alt="The pre-course flow. You approve 15 to 30 concepts grouped by chapter, then answer one question round, once per topic: what you want to do with the topic, what you have read or used, and which concepts you can skip. The answers set a teaching level in graph.md, and every lecture follows it. A beginner lecture uses numbered steps, explains every term, and gives an example per step. A standard lecture gives the intuition first, then the formal detail, with examples where they help. An advanced lecture goes in one pass with no numbered steps, starts from the formal statement, and uses at most one example per idea.">
|
|
126
|
+
</p>
|
|
127
|
+
|
|
128
|
+
Drafts count as preparation, not learning. Every lecture follows the `/study` writing standard and is saved before it is shown.
|
|
129
|
+
|
|
130
|
+
A concept the graph removes has its lecture file moved to `lectures/archive/`, not deleted.
|
|
131
|
+
|
|
132
|
+
Later sessions read the tracker files first. You pick a Chapter or a Concept, and it names that Concept, its state, and the state of its prerequisites in one line. Nothing forces a prerequisite order.
|
|
133
|
+
|
|
134
|
+
Profile defaults live under Settings -> Nerd Mode. They cover whether each tracked session opens with a Recall Session, and how many unseen questions follow a lecture, in which form (short answer, four-option multiple choice, or mixed). Save applies to the next session, Cancel discards a draft, and Restore defaults returns to recall off, 3 questions, short answer. A preference stated inside one `/study-plus` request wins for that session only.
|
|
135
|
+
|
|
136
|
+
You get a reading order and a prerequisite order, any concept you choose, a graded check for that concept, a saved lecture, and a record that survives restarts. The HTML book refreshes after each draft batch and each lesson, with one page per saved Section in its original order, full text search, and a draft label on unprepared reading.
|
|
137
|
+
|
|
138
|
+
It schedules no reviews and never guesses that you know something. Only an answer you produced changes the record. An open prerequisite never blocks a concept. It explains or recommends the prerequisite, and the choice stays yours.
|
|
139
|
+
|
|
140
|
+
### What each one leaves behind
|
|
141
|
+
|
|
142
|
+
| | `/study`, quick lesson | `/study-plus`, long lesson |
|
|
143
|
+
|---|---|---|
|
|
144
|
+
| Writes files | saves a lecture or artifact at the path you name, and an SVG when a picture helps | `study/<topic>/`: `graph.md`, `state.md`, `log.md`, one file per concept, `book.html` refreshed automatically |
|
|
145
|
+
| Reads files | no reads by default, but reads or writes a requested artifact path | the three tracker files, before the first line |
|
|
146
|
+
| Remembered next session | no | yes, with dates |
|
|
147
|
+
| Graded | no | each concept, rubric written first |
|
|
148
|
+
| Organized as | one concept, one task, or a one-off book | Book, Chapter, Section |
|
|
149
|
+
| Typical span | one sitting, one idea | 15 to 30 concepts over weeks |
|
|
150
|
+
|
|
151
|
+
`/study` does not create a `study/` folder by itself. A saved lecture or artifact goes where you name it, including a path under `study/<topic>/lectures/`. A figure goes to `diagrams/<topic>/` unless you name another path. It must not read or write `graph.md`, `state.md`, `log.md`, or `plan.md`.
|
|
152
|
+
|
|
153
|
+
### Which one
|
|
154
|
+
|
|
155
|
+
<p align="center">
|
|
156
|
+
<img src="assets/choose-a-mode.svg" width="720" alt="A question, will you come back to this subject, forks into No and Yes. No leads to /study for one sitting with no record kept. Yes leads to /study-plus for weeks of lessons with a dated record. A curved arrow marked still coming back points from /study to /study-plus.">
|
|
157
|
+
</p>
|
|
158
|
+
|
|
159
|
+
- A question you will not return to: `/study`.
|
|
160
|
+
- A subject you will return to for weeks: `/study-plus`.
|
|
161
|
+
- A textbook whose chapters should shape the reading order: `/study-plus`, which mirrors them as Chapters.
|
|
162
|
+
- Started with `/study` and keep coming back? Build the graph once with `/study-plus`, and the earlier conversation still informs it.
|
|
163
|
+
|
|
164
|
+
One example. You are reading the Shampoo paper and hit the preconditioner. `/study what does the Shampoo preconditioner actually do` settles it in one sitting. If you decide to read the paper properly over a month, open `/study-plus Shampoo and Adam optimizers` and let it order the concepts first.
|
|
165
|
+
|
|
166
|
+
### Commands
|
|
167
|
+
|
|
168
|
+
```text
|
|
169
|
+
/nerd-mode on teaching posture for this conversation
|
|
170
|
+
/nerd-mode off
|
|
171
|
+
/study <concept or task>
|
|
172
|
+
/study-plus <topic> recorded session with the three tracker files
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The book page is not a command. `/study-plus` refreshes it after each draft batch and each lesson, and keeps the previous copy as `book.html.bak`.
|
|
176
|
+
|
|
177
|
+
The pill in the composer bar sends `/nerd-mode`. It sits left of Full Throttle, stays visible in both states, and goes dim when off.
|
|
178
|
+
|
|
179
|
+
## What the switch does
|
|
180
|
+
|
|
181
|
+
- It changes text, not tools. The tool set and the prompt cache stay stable.
|
|
182
|
+
- Teaching applies to learning-shaped requests only: explain a concept, tutor homework, walk through code, prepare for an exam. A feature request, a search, a config edit, or a command runs as usual.
|
|
183
|
+
- The switch is per conversation. Its state lives in the session log, so compaction and resume keep it.
|
|
184
|
+
- If the command fails, a toast at the top of the window names the reason, and the pill keeps its state.
|
|
185
|
+
- Subagents run their own session, so each starts with the switch off.
|
|
186
|
+
- It cannot delete a base mode's persona text. It outranks that text by declaration.
|
|
187
|
+
|
|
188
|
+
## Skills included
|
|
189
|
+
|
|
190
|
+
- `study`: the no-grading guide and the lecture-writing standard. Saves a requested file and draws figures when useful.
|
|
191
|
+
- `study-plus`: the recorded session. Book, Chapters, Sections, one lecture per concept, assessment per concept.
|
|
192
|
+
- `diagram`: one SVG figure per idea. Written for this package.
|
|
193
|
+
- `answer-me-with-html`: one-page HTML explainers, by QingYunA.
|
|
194
|
+
- `teach`: a dated teaching workspace, by Matt Pocock.
|
|
195
|
+
- `writing-beats`: beat-by-beat article structure, by Matt Pocock.
|
|
196
|
+
- `humanizer`: rewrite AI-sounding prose, by Siqi Chen.
|
|
197
|
+
- `convert-documents-to-markdown`: Word, PDF, and ebook conversion, by firecrawl.
|
|
198
|
+
|
|
199
|
+
## Notes
|
|
200
|
+
|
|
201
|
+
- The plugin loads its own `skills/` folder from `cordis.patch.yml` with a `!!js` expression. Review patch changes as host-process code.
|
|
202
|
+
- If you rename the package, update the `resolve('dsh-nerd-mode/package.json')` string in `cordis.patch.yml`.
|
|
203
|
+
- Bundled third-party skills keep their own licenses. See [NOTICE.md](./NOTICE.md).
|
|
204
|
+
- Design notes: [SPEC v3](./docs/specs/2026-10-28-study-plus-v3.md), [v2, historical](./docs/specs/2026-10-27-study-plus-v2.md), [session defaults spec](./docs/specs/2026-10-28-nerd-mode-settings.md), [GLOSSARY.md](./GLOSSARY.md), `docs/adr/`. Doc layout: [docs/README.md](./docs/README.md).
|
|
205
|
+
- Tested with `@deepseek-ai/dsh` 0.2.1-rc.3 on Node 22.
|
|
206
|
+
|
|
207
|
+
## Uninstall
|
|
208
|
+
|
|
209
|
+
```powershell
|
|
210
|
+
dsh plugin --profile <profile> remove dsh-nerd-mode
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
MIT. Bundled skills keep their own licenses. See [NOTICE.md](./NOTICE.md).
|