dsh-nerd-mode 0.4.3 → 0.4.4

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/NOTICE.md CHANGED
@@ -5,7 +5,7 @@ This package is MIT licensed. It also bundles skills written by other people. Ea
5
5
  | Skill | Author | License |
6
6
  |---|---|---|
7
7
  | `study`, `study-plus`, `diagram` | This package | MIT |
8
- | `teach`, `writing-beats` | Matt Pocock, [mattpocock/skills](https://github.com/mattpocock/skills) | MIT |
8
+ | `writing-beats` | Matt Pocock, [mattpocock/skills](https://github.com/mattpocock/skills) | MIT |
9
9
  | `humanizer` | Siqi Chen | MIT, full text in `skills/humanizer/LICENSE` |
10
10
  | `answer-me-with-html` | QingYunA, [QingYunA/answer-me-with-html](https://github.com/QingYunA/answer-me-with-html) | MIT. The Bangers font is under SIL OFL 1.1, full text in `skills/answer-me-with-html/licenses/OFL-Bangers.txt` |
11
11
  | `convert-documents-to-markdown` | firecrawl | MIT, stated in its frontmatter |
package/README.md CHANGED
@@ -1,218 +1,303 @@
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 Course 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 Course 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 question round before teaching. It offers choices for your goal, your background, and whether you want one complete answer or a tracked Course; a tracked Course adds the concepts you can skip. The answers set 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 Course.
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` goes straight to one-off teaching. With the switch on and no command, a learning request gets one question round first: your goal and your background as single choices, and whether you want one complete answer in this conversation 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 Course 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 Course 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/<course>/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 request covers several concepts.
102
-
103
- A Course is one folder under `study/`: one concept graph, one state file, one log, its lectures, its figures, and its Book. The first tracked study in a conversation settles it once. When the workspace holds one Course, `/study-plus` uses it and names it in one line, with no question. When it holds several, one question lists them and offers a new Course. A request about a second subject gets one question: add these concepts to the current Course, or start a new Course.
104
-
105
- ```text
106
- /study-plus Shampoo and Adam optimizers # first session builds the graph
107
- /study-plus # later sessions continue the Course
108
- /study-plus chapter 2 # read that chapter in Book order
109
- /study-plus the matrix square root # jump straight to one concept
110
- ```
111
-
112
- The first session runs in a fixed order.
113
-
114
- ```text
115
- /study-plus <course>
116
- propose 15 to 30 concepts in prerequisite order, grouped into Chapters
117
- show the chapter list and the concept table together, then wait
118
- you approve, edit, or rebuild the graph
119
- you answer one calibration round: goal, background, and concepts to skip
120
- write one complete draft per concept, skipped concepts included
121
- teach each concept: recall (optional) → lecture → configured unseen questions → teach-back → dated record
122
- ```
123
-
124
- Approval also asks the remaining calibration items: what you want to do with the Course, what you have already read or used, and the concepts you can skip. When the opening question already answered your goal and background, it asks only 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-Course change lasts for that session unless you say to keep it.
125
-
126
- <p align="center">
127
- <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 for the Course: what you want to do with it, 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.">
128
- </p>
129
-
130
- Drafts count as preparation, not learning. Every lecture follows the `/study` writing standard and is saved before it is shown.
131
-
132
- A concept the graph removes has its lecture file moved to `lectures/archive/`, not deleted.
133
-
134
- 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.
135
-
136
- 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). A four-option question appears as a card with one correct choice. A short-answer question is asked in the conversation. 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.
137
-
138
- 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.
139
-
140
- 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.
141
-
142
- ### What each one leaves behind
143
-
144
- | | `/study`, quick lesson | `/study-plus`, long lesson |
145
- |---|---|---|
146
- | Writes files | saves a lecture or artifact at the path you name, and an SVG when a picture helps | `study/<course>/`: `graph.md`, `state.md`, `log.md`, one file per concept, `book.html` refreshed automatically |
147
- | Reads files | no reads by default, but reads or writes a requested artifact path | the three tracker files, before the first line |
148
- | Remembered next session | no | yes, with dates |
149
- | Graded | no | each concept, rubric written first |
150
- | Organized as | one concept, one task, or a one-off book | Book, Chapter, Section |
151
- | Typical span | one sitting, one idea | 15 to 30 concepts over weeks |
152
-
153
- `/study` does not create a `study/` folder by itself. A saved lecture or artifact goes where you name it, including a path under `study/<course>/lectures/`. A figure goes to `diagrams/<name>.svg` when the guide runs alone, and to `study/<course>/diagrams/<name>.svg` inside a tracked Course. It must not read or write `graph.md`, `state.md`, `log.md`, or `plan.md`.
154
-
155
- ### Which one
156
-
157
- <p align="center">
158
- <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.">
159
- </p>
160
-
161
- - A question you will not return to: `/study`.
162
- - A subject you will return to for weeks: `/study-plus`.
163
- - A textbook whose chapters should shape the reading order: `/study-plus`, which mirrors them as Chapters.
164
- - Started with `/study` and keep coming back? Build the graph once with `/study-plus`, and the earlier conversation still informs it.
165
-
166
- 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.
167
-
168
- ### Commands
169
-
170
- ```text
171
- /nerd-mode on teaching posture for this conversation
172
- /nerd-mode off
173
- /study <concept or task>
174
- /study-plus <course> recorded session with the three tracker files
175
- ```
176
-
177
- 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`.
178
-
179
- 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.
180
-
181
- ## What the switch does
182
-
183
- - It changes text, not tools. The tool set and the prompt cache stay stable.
184
- - 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.
185
- - The switch is per conversation. Its state lives in the session log, so compaction and resume keep it.
186
- - If the command fails, a toast at the top of the window names the reason, and the pill keeps its state.
187
- - Subagents run their own session, so each starts with the switch off.
188
- - It cannot delete a base mode's persona text. It outranks that text by declaration.
189
-
190
- ## Skills included
191
-
192
- - `study`: the no-grading guide and the lecture-writing standard. Saves a requested file and draws figures when useful.
193
- - `study-plus`: the recorded session. Book, Chapters, Sections, one lecture per concept, assessment per concept.
194
- - `diagram`: one SVG figure per idea. Written for this package.
195
- - `answer-me-with-html`: one-page HTML explainers, by QingYunA.
196
- - `teach`: a dated teaching workspace, by Matt Pocock.
197
- - `writing-beats`: beat-by-beat article structure, by Matt Pocock.
198
- - `humanizer`: rewrite AI-sounding prose, by Siqi Chen.
199
- - `convert-documents-to-markdown`: Word, PDF, and ebook conversion, by firecrawl.
200
-
201
- ## Notes
202
-
203
- - The plugin loads its own `skills/` folder from `cordis.patch.yml` with a `!!js` expression. Review patch changes as host-process code.
204
- - If you rename the package, update the `resolve('dsh-nerd-mode/package.json')` string in `cordis.patch.yml`.
205
- - Bundled third-party skills keep their own licenses. See [NOTICE.md](./NOTICE.md).
206
- - 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).
207
- - Version history: [CHANGELOG.md](https://github.com/bocchii-the-code/dsh-nerd-mode/blob/main/CHANGELOG.md).
208
- - Tested with `@deepseek-ai/dsh` 0.2.1-rc.3 on Node 22.
209
-
210
- ## Uninstall
211
-
212
- ```powershell
213
- dsh plugin --profile <profile> remove dsh-nerd-mode
214
- ```
215
-
216
- ## License
217
-
218
- MIT. Bundled skills keep their own licenses. See [NOTICE.md](./NOTICE.md).
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>What education should really be like, not just plain lecture notes.</em></p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/dsh-nerd-mode"><img src="https://img.shields.io/npm/v/dsh-nerd-mode" alt="npm version"></a>
13
+ <a href="https://github.com/bocchii-the-code/dsh-nerd-mode/actions/workflows/check.yml"><img src="https://github.com/bocchii-the-code/dsh-nerd-mode/actions/workflows/check.yml/badge.svg" alt="check"></a>
14
+ <a href="https://github.com/bocchii-the-code/dsh-nerd-mode/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/dsh-nerd-mode" alt="license: MIT"></a>
15
+ <a href="./README.zh.md"><img src="https://img.shields.io/badge/%E4%B8%AD%E6%96%87-switch-d0d7de" alt="中文"></a>
16
+ </p>
17
+
18
+ A study switch for DeepSeek Harness that teaches in steps and keeps a dated Course record.
19
+
20
+ A chat lesson 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 Course can last weeks instead of one sitting.
21
+
22
+ | Command | What it does | What it keeps |
23
+ |---|---|---|
24
+ | `/nerd-mode on` | turns teaching on for this conversation | nothing; it is a switch |
25
+ | `/study` | answers one concept or one task | a file, and only at the path you name |
26
+ | `/study-plus` | runs one Course, one concept per session | graph, states, log, lectures, HTML Book |
27
+
28
+ ## Contents
29
+
30
+ - [Features](#features)
31
+ - [Install](#install)
32
+ - [Quick start](#quick-start)
33
+ - [Two ways to learn](#two-ways-to-learn)
34
+ - [Settings](#settings)
35
+ - [How it fits into dsh](#how-it-fits-into-dsh)
36
+ - [What the switch changes](#what-the-switch-changes)
37
+ - [Skills included](#skills-included)
38
+ - [Development](#development)
39
+ - [Contributing](#contributing)
40
+ - [Uninstall](#uninstall)
41
+ - [License](#license)
42
+
43
+ ## Features
44
+
45
+ - **A map before the first lesson.** A concept graph in prerequisite order, grouped into a Book of Chapters and Sections, approved before any file is written.
46
+ - **One question round.** Goal, background, and a choice between one answer and a tracked Course. A tracked Course also asks what you can skip.
47
+ - **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.
48
+ - **Graded checks.** Unseen questions and a graded teach-back, with the rubric written before the question. Only an answer you produced changes the record.
49
+ - **A record that outlives the chat.** Graph, states, and dated log survive restarts, and the HTML Book has full-text search.
50
+ - **Progress without opening a file.** The Study tab reads the Tracker for this conversation and shows one progress percentage, the previous, current, and next Section, the shaky Concepts, and the three most recent Concept cycles. It never writes.
51
+ - **Lectures you can find again.** The Lectures tab lists the saved lectures for the selected Course, and marks read, unread, and archived rows.
52
+
53
+ ## Install
54
+
55
+ Requires DeepSeek Harness with a profile and Node.js 22.19 or newer, on Windows, macOS, or Linux. Tested with `@deepseek-ai/dsh` 0.2.1-rc.3 on Node 22.
56
+
57
+ From npm:
58
+
59
+ ```powershell
60
+ dsh plugin --profile <profile> add dsh-nerd-mode
61
+ ```
62
+
63
+ From GitHub:
64
+
65
+ ```powershell
66
+ dsh plugin --profile <profile> add github:bocchii-the-code/dsh-nerd-mode
67
+ ```
68
+
69
+ From a local folder or tarball:
70
+
71
+ ```powershell
72
+ dsh plugin --profile <profile> add C:\path\to\dsh-nerd-mode
73
+ ```
74
+
75
+ Restart dsh. Every mode gets the `/nerd-mode` command and a `Nerd Mode` pill in the composer bar. The mode picker shows no new entry, because the plugin mounts at profile level, not as a preset.
76
+
77
+ ## Quick start
78
+
79
+ 1. Add the plugin with one of the commands above, then restart dsh.
80
+ 2. Turn teaching on for this conversation: `/nerd-mode on`.
81
+ 3. Ask one question: `/study why does Adam divide by 1 - beta^t`.
82
+ 4. Keep the subject for weeks: `/study-plus Shampoo and Adam optimizers`.
83
+
84
+ ## Two ways to learn
85
+
86
+ Both paths teach in steps and stop at the fork, the point where the choice changes the result. They differ in what they keep.
87
+
88
+ An explicit `/study` goes straight to one-off teaching. An explicit `/study-plus` goes straight to tracked study, even when the request names several concepts. With the switch on and no command, a learning request gets one question round first. It asks for goal and background as single choices, and whether you want one complete answer in this conversation or a tracked `/study-plus` session.
89
+
90
+ <p align="center">
91
+ <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.">
92
+ </p>
93
+
94
+ ### Quick lesson: `/study`
95
+
96
+ `/study` walks one concept or one task from the first step to the last and stops once at the fork. A concept comes in layers: intuition, then terms, then formal detail. A task comes as the finished artifact, with one line of reason beside each step. The guide grades nothing and keeps no learner record.
97
+
98
+ Use it for a question you want to understand now and will probably not return to.
99
+
100
+ - Reading a paper and a term stops you.
101
+ - A homework problem you have to finish tonight.
102
+ - A file whose logic you need to follow before you change it.
103
+ - A small decision where you want the trade-off spelled out first.
104
+
105
+ ```text
106
+ /study why does Adam divide by 1 - beta^t
107
+ /study walk me through the preconditioner in this file # with code
108
+ /study help me finish problem 3, and explain each step # with homework
109
+ ```
110
+
111
+ You get a title, the central idea, numbered steps, one line of symbols above each formula, and a short table when four or more symbols keep coming back. Then one worked example, the common mistake, and the single stop at the fork.
112
+
113
+ The only files it writes are the ones you ask for: a lecture or artifact at the path you name, and a figure when a picture helps. A figure goes to `diagrams/<name>.svg`, or to `study/<course>/diagrams/` inside a Course. `/study` never reads or writes `graph.md`, `state.md`, `log.md`, or `plan.md`.
114
+
115
+ ### Long lesson: `/study-plus`
116
+
117
+ A Course is organized as a Book of Chapters and Sections, with one concept per Section. A concept graph in prerequisite order groups the concepts into Chapters. The graph carries Chapter and Section columns, so one file records the reading order beside the prerequisite order.
118
+
119
+ The Course has three tracker files at its root and one Markdown lecture per concept under `study/<course>/lectures/`. After you approve the graph, the guide prepares a complete draft for every concept, so a lesson starts without waiting. It builds an HTML book from the saved material.
120
+
121
+ Use it for a subject you will still be learning next month.
122
+
123
+ - You are working through a textbook, a course, or a paper properly.
124
+ - You want the textbook's chapters to organize what you reread.
125
+ - You want to know what to study next, and a chat only answers what you ask.
126
+ - You want proof of progress you can point to.
127
+
128
+ ```text
129
+ /study-plus Shampoo and Adam optimizers # first session builds the graph
130
+ /study-plus # later sessions continue the Course
131
+ /study-plus chapter 2 # read that chapter in Book order
132
+ /study-plus the matrix square root # jump straight to one concept
133
+ ```
134
+
135
+ A Course is one folder under `study/`: one concept graph, one state file, one log, its lectures, its figures, and its Book. A conversation settles its Course on the first tracked study, then asks no more. When the workspace holds one Course, `/study-plus` uses it and names it in one line. Several Courses get one question that lists them and offers a new Course. A request about a second subject gets one question: add these concepts to the current Course, or start a new Course.
136
+
137
+ #### The first session
138
+
139
+ ```text
140
+ /study-plus <course>
141
+ propose 15 to 30 concepts in prerequisite order, grouped into Chapters
142
+ show the chapter list and the concept table together, then wait
143
+ you approve, edit, or rebuild the graph
144
+ you answer one calibration round: goal, background, and concepts to skip
145
+ write one complete draft per concept, skipped concepts included
146
+ teach each concept: recall (optional) → lecture → configured unseen questions → teach-back → dated record
147
+ ```
148
+
149
+ Approval also asks the remaining calibration items: what you want to do with the Course, what you have already read or used, and the concepts you can skip. When the opening question already answered your goal and background, it asks only the concepts you can skip. The answers set `Teaching level` in `graph.md`, beside `Goal` and `Background`, and every lecture follows that level.
150
+
151
+ | Level | Chosen when | Lecture shape |
152
+ |---|---|---|
153
+ | `beginner` | most prerequisites are unknown | 3 to 7 numbered steps, every term explained, one example per step |
154
+ | `standard` | some prerequisites are known | intuition first, then formal detail, examples where they help |
155
+ | `advanced` | most prerequisites are known | one pass, no numbered steps, starts from the formal statement, at most one example per idea |
156
+
157
+ <p align="center">
158
+ <img src="assets/calibration.svg" width="720" alt="The pre-course flow. You approve the graph, answer one calibration round, and the answers set the teaching level. The figure contrasts a beginner, standard, and advanced lecture, and every lecture follows the chosen level.">
159
+ </p>
160
+
161
+ The level shapes the lecture only, never the questions, the teach-back, or the record. A mid-Course change lasts for that session unless you say to keep it.
162
+
163
+ Drafts count as preparation, not learning. Every lecture follows the `study` skill's writing standard, and the guide saves the file before showing it. When the graph drops a concept, its lecture file moves to `lectures/archive/` instead of being deleted.
164
+
165
+ 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. An open prerequisite never blocks a concept: the guide explains or recommends it, and the choice stays yours.
166
+
167
+ The HTML book refreshes after each draft batch and each lesson, with one page per Section and a draft label where no lecture exists yet. Section numbers come from the graph, so a missing lecture leaves no gap. The previous copy stays as `book.html.bak`. The book page is not a command.
168
+
169
+ ### What each one leaves behind
170
+
171
+ | | `/study`, quick lesson | `/study-plus`, long lesson |
172
+ |---|---|---|
173
+ | Writes files | saves a lecture or artifact at the path you name, and an SVG when a picture helps | `study/<course>/`: `graph.md`, `state.md`, `log.md`, one file per concept, `book.html` refreshed automatically |
174
+ | Reads files | no reads by default, but reads or writes a requested artifact path | the three tracker files, before the first line |
175
+ | Remembered next session | no | yes, with dates |
176
+ | Graded | no | each concept, rubric written first |
177
+ | Organized as | one concept, one task, or a one-off book | Book, Chapter, Section |
178
+ | Typical span | one sitting, one idea | 15 to 30 concepts over weeks |
179
+
180
+ `/study` does not create a `study/` folder by itself. `/study-plus` schedules no reviews and never guesses that you know something.
181
+
182
+ ### Which one
183
+
184
+ <p align="center">
185
+ <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.">
186
+ </p>
187
+
188
+ - A question you will not return to: `/study`.
189
+ - A subject you will return to for weeks: `/study-plus`.
190
+ - A textbook whose chapters should shape the reading order: `/study-plus`, which mirrors them as Chapters.
191
+ - Started with `/study` and keep coming back? Build the graph once with `/study-plus`, and the earlier conversation still informs it.
192
+
193
+ ### Commands
194
+
195
+ ```text
196
+ /nerd-mode on teaching posture for this conversation
197
+ /nerd-mode off
198
+ /study <concept or task>
199
+ /study-plus <course> recorded session with the three tracker files
200
+ ```
201
+
202
+ 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.
203
+
204
+ ## Settings
205
+
206
+ Change the defaults under Settings → Nerd Mode.
207
+
208
+ | Setting | Choices | Default |
209
+ |---|---|---|
210
+ | Recall Session | on, off | off |
211
+ | Questions after a lecture | 0 to 10 | 3 |
212
+ | Question type | short answer, multiple choice, mixed | short answer |
213
+
214
+ A four-option question appears as a card with one correct choice. The guide asks a short-answer question in the conversation. 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 and does not update the profile.
215
+
216
+ ## How it fits into dsh
217
+
218
+ Nerd Mode is a profile-level plugin, mounted from `cordis.patch.yml`. The patch covers the whole profile, so every mode gains the command and the pill.
219
+
220
+ ```text
221
+ package.json
222
+ ├── dsh.bundle.patch → cordis.patch.yml
223
+ │ ├── dsh-nerd-mode → lib/index.js
224
+ │ │ ├── session projection — on/off state, folded from the session log
225
+ │ │ ├── prompt section — assets/section.md at order 550, while on
226
+ │ │ └── /nerd-mode — the switch
227
+ │ ├── study-plus-skills — skills/ as a filesystem skill provider
228
+ │ └── goal packages — disabled
229
+ └── dsh.client → client.js: pill, Study tab, Lectures tab, Settings section
230
+ ```
231
+
232
+ **State** lives in a session projection. It folds from the session log, so compaction, resume, and fork keep it. The prompt section has text only while that state is on.
233
+
234
+ **Prompt text** is `assets/section.md`, the only prompt text the plugin adds, so a profile patch never carries a stale copy. A `section` config value replaces it.
235
+
236
+ **Settings** reach the model as a short defaults block appended to that section, only during a tracked session. They never change the tool set.
237
+
238
+ **Patch scope** covers the whole profile. It loads `skills/` with a `!!js` expression, so review patch changes as host-process code. It also disables the three goal packages, because the built-in goal tool turns one study answer into an auto-continuing run.
239
+
240
+ ## What the switch changes
241
+
242
+ - It changes text, not tools, and applies to this conversation only. The tool set and the prompt cache stay stable, and compaction or resume keeps its state.
243
+ - 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.
244
+ - If the command fails, a toast at the top of the window names the reason, and the pill keeps its state.
245
+ - Subagents run their own session, so each starts with the switch off.
246
+ - It cannot delete a base mode's persona text, but it outranks that text by declaration.
247
+
248
+ ## Skills included
249
+
250
+ ### Teaching
251
+
252
+ - `study`: the no-grading guide and the lecture-writing standard. Saves a requested file and draws figures when useful.
253
+ - `study-plus`: the recorded session. Book, Chapters, Sections, one lecture per concept, assessment per concept.
254
+ - `diagram`: one SVG figure per idea. Written for this package.
255
+
256
+ ### General tools
257
+
258
+ These four ship with the package but sit outside the teaching flow. None of them reads or writes a Tracker.
259
+
260
+ - `answer-me-with-html`: one-page HTML explainers, by QingYunA.
261
+ - `writing-beats`: beat-by-beat article structure, by Matt Pocock.
262
+ - `humanizer`: rewrite AI-sounding prose, by Siqi Chen.
263
+ - `convert-documents-to-markdown`: Word, PDF, and ebook conversion, by firecrawl.
264
+
265
+ ## Development
266
+
267
+ ```powershell
268
+ git clone https://github.com/bocchii-the-code/dsh-nerd-mode
269
+ cd dsh-nerd-mode
270
+ npm install
271
+ npm run check
272
+ ```
273
+
274
+ `npm run check` runs ESLint and the Node test suite. `npm test` runs the tests alone, and `npm run lint` runs ESLint alone.
275
+
276
+ | Path | Holds |
277
+ |---|---|
278
+ | `lib/index.js` | plugin entry: projection, prompt section, command, session defaults |
279
+ | `lib/fold.js` | the state fold and its constants |
280
+ | `client.js` | composer pill, Study and Lectures tabs, Settings section |
281
+ | `assets/section.md` | the teaching policy prompt |
282
+ | `skills/` | bundled skills |
283
+ | `test/` | one file per surface, run by `node --test` |
284
+
285
+ To try a local build, add this folder as a plugin: `dsh plugin --profile <profile> add .`
286
+
287
+ If you rename the package, update the `resolve('dsh-nerd-mode/package.json')` string in `cordis.patch.yml`.
288
+
289
+ 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). Version history: [CHANGELOG.md](https://github.com/bocchii-the-code/dsh-nerd-mode/blob/main/CHANGELOG.md).
290
+
291
+ ## Contributing
292
+
293
+ Issues and pull requests are welcome on [GitHub](https://github.com/bocchii-the-code/dsh-nerd-mode/issues). Run `npm run check` before you open a pull request. For a change to the teaching prompt, read `docs/adr/` first, because the prompt behavior is recorded there.
294
+
295
+ ## Uninstall
296
+
297
+ ```powershell
298
+ dsh plugin --profile <profile> remove dsh-nerd-mode
299
+ ```
300
+
301
+ ## License
302
+
303
+ MIT. Bundled skills keep their own licenses. See [NOTICE.md](./NOTICE.md).