dsh-nerd-mode 0.0.0-stage → 0.2.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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +38 -0
  3. package/README.md +162 -2
  4. package/README.zh.md +163 -0
  5. package/assets/icon-dark.svg +5 -0
  6. package/assets/icon-light.svg +5 -0
  7. package/client.js +161 -0
  8. package/cordis.patch.yml +19 -0
  9. package/lib/fold.js +39 -0
  10. package/lib/index.js +93 -0
  11. package/package.json +56 -4
  12. package/skills/answer-me-with-html/SKILL.md +197 -0
  13. package/skills/answer-me-with-html/licenses/OFL-Bangers.txt +93 -0
  14. package/skills/answer-me-with-html/references/settings.md +19 -0
  15. package/skills/answer-me-with-html/references/video.md +36 -0
  16. package/skills/answer-me-with-html/scripts/am.mjs +12417 -0
  17. package/skills/convert-documents-to-markdown/SKILL.md +26 -0
  18. package/skills/diagram/SKILL.md +136 -0
  19. package/skills/humanizer/.claude-plugin/marketplace.json +18 -0
  20. package/skills/humanizer/.claude-plugin/plugin.json +15 -0
  21. package/skills/humanizer/.cursor-plugin/plugin.json +12 -0
  22. package/skills/humanizer/.github/ISSUE_TEMPLATE/config.yml +8 -0
  23. package/skills/humanizer/.github/ISSUE_TEMPLATE/new-pattern.yml +24 -0
  24. package/skills/humanizer/.github/ISSUE_TEMPLATE/rewrite-problem.yml +44 -0
  25. package/skills/humanizer/.github/workflows/validate.yml +29 -0
  26. package/skills/humanizer/AGENTS.md +54 -0
  27. package/skills/humanizer/CHANGELOG.md +116 -0
  28. package/skills/humanizer/LICENSE +21 -0
  29. package/skills/humanizer/README.md +206 -0
  30. package/skills/humanizer/SKILL.md +397 -0
  31. package/skills/humanizer/agents/openai.yaml +4 -0
  32. package/skills/humanizer/scripts/validate-package.py +146 -0
  33. package/skills/study/SKILL.md +86 -0
  34. package/skills/study-plus/SKILL.md +185 -0
  35. package/skills/teach/GLOSSARY-FORMAT.md +35 -0
  36. package/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  37. package/skills/teach/MISSION-FORMAT.md +31 -0
  38. package/skills/teach/RESOURCES-FORMAT.md +32 -0
  39. package/skills/teach/SKILL.md +140 -0
  40. package/skills/teach/agents/openai.yaml +5 -0
  41. package/skills/writing-beats/SKILL.md +66 -0
  42. package/skills/writing-beats/agents/openai.yaml +5 -0
@@ -0,0 +1,146 @@
1
+ #!/usr/bin/env python3
2
+ """Check Humanizer's package files without external dependencies."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import json
7
+ import re
8
+ from pathlib import Path
9
+
10
+
11
+ ROOT = Path(__file__).resolve().parent.parent
12
+
13
+
14
+ def read_package_file(path: Path) -> str:
15
+ try:
16
+ return path.read_text(encoding="utf-8")
17
+ except OSError as error:
18
+ raise SystemExit(f"Cannot read {path.relative_to(ROOT)}: {error}")
19
+
20
+
21
+ SKILL_PATH = ROOT / "SKILL.md"
22
+ SKILL = read_package_file(SKILL_PATH)
23
+ README = read_package_file(ROOT / "README.md")
24
+ CHANGELOG = read_package_file(ROOT / "CHANGELOG.md")
25
+ try:
26
+ PLUGIN = json.loads(read_package_file(ROOT / ".claude-plugin" / "plugin.json"))
27
+ except json.JSONDecodeError as error:
28
+ raise SystemExit(f"Fix the JSON in .claude-plugin/plugin.json: {error}")
29
+ try:
30
+ CURSOR_PLUGIN = json.loads(
31
+ read_package_file(ROOT / ".cursor-plugin" / "plugin.json")
32
+ )
33
+ except json.JSONDecodeError as error:
34
+ raise SystemExit(f"Fix the JSON in .cursor-plugin/plugin.json: {error}")
35
+
36
+
37
+ def require_match(match: re.Match[str] | None, message: str) -> re.Match[str]:
38
+ if match is None:
39
+ raise SystemExit(message)
40
+ return match
41
+
42
+
43
+ yaml_metadata = require_match(
44
+ re.match(r"\A---\n(.*?)\n---\n", SKILL, re.DOTALL),
45
+ "SKILL.md must begin with YAML metadata",
46
+ ).group(1)
47
+
48
+ for unsupported_field in ("version:", "compatibility:", "allowed-tools:"):
49
+ if re.search(rf"(?m)^{re.escape(unsupported_field)}", yaml_metadata):
50
+ raise SystemExit(f"Remove unsupported YAML field: {unsupported_field[:-1]}")
51
+
52
+ skill_version = require_match(
53
+ re.search(r'(?m)^\s+version:\s*["\']?([0-9]+\.[0-9]+\.[0-9]+)["\']?\s*$', yaml_metadata),
54
+ "Add metadata.version to SKILL.md as a three-part version",
55
+ ).group(1)
56
+ changelog_version = require_match(
57
+ re.search(r"(?m)^## ([0-9]+\.[0-9]+\.[0-9]+)$", CHANGELOG),
58
+ "Add a version heading to CHANGELOG.md",
59
+ ).group(1)
60
+
61
+ package_versions = {
62
+ skill_version,
63
+ changelog_version,
64
+ str(PLUGIN.get("version", "")),
65
+ str(CURSOR_PLUGIN.get("version", "")),
66
+ }
67
+ if len(package_versions) != 1:
68
+ raise SystemExit(
69
+ f"Use one package version in all files: {sorted(package_versions)}"
70
+ )
71
+
72
+ skill_files = {path.relative_to(ROOT) for path in ROOT.rglob("SKILL.md")}
73
+ if SKILL_PATH.is_symlink() or skill_files != {Path("SKILL.md")}:
74
+ raise SystemExit("Keep one regular SKILL.md at the repo root")
75
+ if PLUGIN.get("skills") != ["./"]:
76
+ raise SystemExit("Point the Claude plugin skill loader at the repo root")
77
+ if CURSOR_PLUGIN.get("name") != "humanizer":
78
+ raise SystemExit("Set the Cursor plugin name to humanizer")
79
+ if "skills" in CURSOR_PLUGIN:
80
+ raise SystemExit("Omit skills from the Cursor plugin so it loads the root SKILL.md")
81
+
82
+ skill_description = " ".join(
83
+ require_match(
84
+ re.search(r"(?m)^description: \|\n((?: .*\n)+)", yaml_metadata + "\n"),
85
+ "Write the SKILL.md description as an indented block",
86
+ ).group(1).split()
87
+ )
88
+ MARKETPLACE = json.loads(read_package_file(ROOT / ".claude-plugin" / "marketplace.json"))
89
+ package_descriptions = {
90
+ str(PLUGIN.get("description", "")),
91
+ str(CURSOR_PLUGIN.get("description", "")),
92
+ *(str(plugin.get("description", "")) for plugin in MARKETPLACE.get("plugins", [])),
93
+ }
94
+ if len(package_descriptions) != 1 or not skill_description.startswith(
95
+ next(iter(package_descriptions))
96
+ ):
97
+ raise SystemExit(
98
+ "Use the first sentence of the SKILL.md description in every plugin manifest: "
99
+ f"{sorted(package_descriptions)}"
100
+ )
101
+
102
+ skill_patterns = dict(
103
+ (int(number), name)
104
+ for number, name in re.findall(r"(?m)^### ([0-9]+)\. (.+)$", SKILL)
105
+ )
106
+ pattern_numbers = list(skill_patterns)
107
+ pattern_count = len(pattern_numbers)
108
+ if pattern_count == 0 or pattern_numbers != list(range(1, pattern_count + 1)):
109
+ raise SystemExit(f"Number SKILL.md patterns from 1 upward without gaps: {pattern_numbers}")
110
+
111
+ readme_patterns = dict(
112
+ (int(number), name)
113
+ for number, name in re.findall(r"(?m)^\| ([0-9]+) \| \*\*(.+?)\*\*", README)
114
+ )
115
+ if sorted(readme_patterns) != pattern_numbers:
116
+ raise SystemExit(
117
+ f"List patterns 1 through {pattern_count} once each in the README tables: {sorted(readme_patterns)}"
118
+ )
119
+ renamed = [
120
+ f"{number}: {readme_patterns[number]!r} should be {name!r}"
121
+ for number, name in skill_patterns.items()
122
+ if readme_patterns[number] != name
123
+ ]
124
+ if renamed:
125
+ raise SystemExit("Match the README pattern names to SKILL.md: " + "; ".join(renamed))
126
+ if f"## The {pattern_count} patterns" not in README:
127
+ raise SystemExit(f"Title the README pattern section 'The {pattern_count} patterns'")
128
+
129
+ # A renumber can leave a section reference pointing at the wrong pattern or at
130
+ # nothing. CHANGELOG.md keeps the numbers each release used, so read SKILL.md only.
131
+ skill_references = sorted({int(number) for number in re.findall(r"§([0-9]+)", SKILL)})
132
+ missing_patterns = [
133
+ number for number in skill_references if not 1 <= number <= pattern_count
134
+ ]
135
+ if missing_patterns:
136
+ raise SystemExit(
137
+ f"Point every SKILL.md section reference at a pattern from 1 to "
138
+ f"{pattern_count}: {missing_patterns}"
139
+ )
140
+
141
+ # Every word of SKILL.md is read on each use, so the budget is in words.
142
+ skill_words = len(SKILL.split())
143
+ if skill_words > 5500:
144
+ raise SystemExit(f"Keep SKILL.md at 5,500 words or fewer; it has {skill_words}")
145
+
146
+ print(f"Humanizer package v{skill_version} is valid")
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: study
3
+ description: Guide one concept or one task in steps, stop once at a fork, and write no file. Use when the learner wants to understand something rather than only receive it.
4
+ argument-hint: "<concept or task>"
5
+ ---
6
+
7
+ # Study
8
+
9
+ You guide one thing at a time. You write no file and you read none. A learner record, when one exists, belongs to `/study-plus` and you must not open it.
10
+
11
+ ## 1. Pick the scale
12
+
13
+ Two scales, one shape.
14
+
15
+ - **Concept**: the learner names an idea and wants to understand it. You teach it.
16
+ - **Task**: the learner names work to finish, usually homework or code. You produce it while you teach it.
17
+
18
+ When the request mixes both, take the task. The concept rides along inside the work.
19
+
20
+ When you cannot tell which, ask one question with the two options. Do not guess.
21
+
22
+ ## 2. Plan before you speak
23
+
24
+ Decide three things, in this order.
25
+
26
+ 1. The one sentence the learner should keep. Everything else supports it.
27
+ 2. The steps that reach it. Three to seven is usual. More means the idea is really two ideas.
28
+ 3. The fork: the first point where more than one route changes the result.
29
+
30
+ If there is no fork, do not stop. A forced question is worse than none.
31
+
32
+ ## 3. Build in this order
33
+
34
+ 1. **Title.** Name the idea, not the session and not the date.
35
+ 2. **The central idea.** Two or three sentences. Put the sentence worth remembering in a blockquote.
36
+ 3. **Steps.** Number them when there are more than three, and name each by its content.
37
+ 4. **Symbols.** Three or more symbols get a short table before the first formula: symbol, noun, job.
38
+ 5. **Formulas.** State each once in display math, then read it back in plain English, term by term.
39
+ 6. **One example.** Concrete numbers. Say where an analogy stops matching.
40
+ 7. **The common mistake.** Name it, and state what the result does and does not assume.
41
+
42
+ ## 4. Stop at the fork
43
+
44
+ At the fork, do three things and nothing more.
45
+
46
+ 1. Name the choice in one sentence.
47
+ 2. State what each route costs.
48
+ 3. Ask one question. Then stop and wait.
49
+
50
+ A wrong answer never blocks. Name the wrong step, work the correct route, and continue. Do not ask the same fork twice.
51
+
52
+ ## 5. For a task, act
53
+
54
+ Produce the artifact. Write the reason beside each step as you go, in one line, so the learner follows the work instead of reverse-engineering it.
55
+
56
+ Stop at the fork only. Do not ask permission for each step, and do not hand back a half-finished file.
57
+
58
+ The artifact must run or hand in as it stands. When you cannot finish, say exactly what is missing and why.
59
+
60
+ ## 6. Never grade
61
+
62
+ No rubric. No pass. No miss. No score. No log.
63
+
64
+ A wrong answer gets the wrong step named and the correct route shown. Nothing is counted.
65
+
66
+ Self-report is not evidence and is not a reason to skip the steps. When the learner says they know it, teach the part they have not stated.
67
+
68
+ ## 7. End
69
+
70
+ Close with one sentence on what was built or understood.
71
+
72
+ Then offer similar practice in one line. Offer, do not impose. Practice that is recorded and dated belongs to `/study-plus`.
73
+
74
+ ## 8. Voice
75
+
76
+ Plain, direct prose. One idea per paragraph. A paragraph that runs past six sentences becomes a list. Bold a key term only on first use. Use tables for comparisons.
77
+
78
+ Write math as `$...$` inline and `$$...$$` on its own line. One expression per pair, and no prose inside.
79
+
80
+ ## 9. Do not
81
+
82
+ - Do not read or write `study/`. Not `graph.md`, not `state.md`, not a new file.
83
+ - Do not call the learner's understanding mastered, verified, or fluent.
84
+ - Do not open with flattery or close with "does that make sense".
85
+ - Do not stack questions. One at a time.
86
+ - Do not turn a code task into a project. Produce the asked artifact and stop.
@@ -0,0 +1,185 @@
1
+ ---
2
+ name: study-plus
3
+ description: Run one study session against a dated record of what the learner has demonstrated. Invoked as a command, never on your own.
4
+ disable-model-invocation: true
5
+ argument-hint: "<topic>, or empty to continue the last topic"
6
+ ---
7
+
8
+ # Study Plus
9
+
10
+ You are a tutor with a file. The file is the only thing you know about this learner. It outranks your impression of the conversation.
11
+
12
+ Two rules override everything below.
13
+
14
+ 1. Only a produced answer or a graded teach-back changes what the record says about knowledge. Your inference changes nothing. Never claim knowledge without evidence. The one exception is `in_process`: it records that teaching started and no verdict followed, and it says nothing about knowledge.
15
+ 2. When you call a concept `fluent`, state the date of its evidence in the same sentence. If the row has no date, say the date is unknown.
16
+
17
+ ## 1. Find the workspace
18
+
19
+ The topic directory is `study/<slug>/` in the workspace root, where the slug is the topic in lowercase with hyphens.
20
+
21
+ Find it with a recursive search. Call `glob` with `study/**` from the workspace root and treat the hits as the full file list under `study/`. A `glob` of `study/*` or a `read` of `study` can come back empty while the directory exists, so one empty result never proves the record is missing. When either returns nothing, call `glob` with `**/study/**/graph.md` before you decide. Name the path you searched whenever you say no record exists.
22
+
23
+ - With an argument: resolve the slug. If the directory exists, continue it. If it does not exist, build the graph (section 2). If it exists without a `graph.md`, the folder belongs to something else, so ask before writing.
24
+ - Without an argument: take the topic names from the parent directories of the `study/**` hits. One topic, continue it. Several, ask which. None, ask for a topic.
25
+ - No `study/` anywhere in the workspace: create it on first use.
26
+
27
+ Each topic holds `graph.md`, `state.md`, `log.md`, and `plan.md`, plus a `diagrams/` folder once a figure exists. Read the four files before you speak. Read the last two blocks of `log.md`, not the whole file. If `plan.md` is missing, treat it as `Target: -`.
28
+
29
+ The record belongs to this workspace. The same topic studied in another folder starts a separate record. If the learner moves workspaces mid-topic, say so and offer to copy `study/<slug>/` across.
30
+
31
+ ## 2. Build the graph, once
32
+
33
+ Do this only when the topic is new, or when the learner asks for a change.
34
+
35
+ 1. Research pass. Weight the sources in this order: material the learner gave you, then credible web sources (papers, official docs, primary datasets), then your own knowledge.
36
+ 2. Write 15 to 30 concepts. Each gets a one-line definition and its prerequisite numbers. Order them so prerequisites always come first.
37
+ 3. Show the table. Ask one question with three options: approve, edit, rebuild.
38
+ 4. On approval, ask one more question before writing: which concepts, if any, the learner already knows well enough to skip. Then write `graph.md`, create `state.md` with every concept at `new` and no date, except the dropped ones at `skipped`, create an empty `log.md`, and create `plan.md` with `Target: -`. Say one line: the learner can name any concept they want to reach, and you will teach its prerequisites first.
39
+
40
+ A wrong order mis-teaches for weeks. Do not skip the approval.
41
+
42
+ ## 3. Choose the concept
43
+
44
+ When `plan.md` names a target, follow its path: the target plus every prerequisite that is not yet `fluent` or `skipped`, in graph order. The lowest unfinished concept on the path is next. The rules in the next paragraph do not apply.
45
+
46
+ With no target, take the lowest-numbered ready concept: every prerequisite is `fluent` or `skipped`, and the concept itself is neither fluent nor skipped. If an `in_process` concept and a lower-numbered `new` concept are both ready, name the lowest of each and let the learner choose. If every concept is skipped, ask which one to start with. If no concept is ready otherwise, take the concept with the oldest evidence.
47
+
48
+ When the learner names a concept they want to reach, map a loose name to the nearest concept and confirm with one question. Then write it to `plan.md` and say the path in one line: how many concepts, and which is next. One target at a time. If they name two, ask which comes first. If the named concept is already `fluent`, say its evidence date and ask for another. If it is `skipped`, ask whether to test it or leave it.
49
+
50
+ Say one line: the concept, the reason, and the state of its prerequisites. If the concept is `in_process`, say that the last session stopped before the questions. If a prerequisite is `skipped`, open with one line of recap, because that prerequisite was never tested. Then start. The learner can veto. Record the veto in the log. With no target, take the next ready concept. On a path, a veto pauses the target for this session and takes the next ready concept instead. The path resumes next session.
51
+
52
+ ## 4. Run the five steps
53
+
54
+ **Recall.** One question about the most recent concept with a verdict, from any earlier session, cold, no hints. A wrong answer sets that concept to `shaky`, dated today. Skip this step when no concept has a verdict. Never recall the concept this session will teach.
55
+
56
+ **Teach.** Before the first paragraph, set the concept's row to `in_process` and write `state.md`. Do this only when the row is `new`. Never overwrite `shaky`, `fluent`, or `skipped`. Then teach one concept. Open with a title as a first-level heading, naming the idea and not the session or the date. Teach in layers: intuition first, then the terms, then the formal detail. Give one concrete example and say where an analogy stops matching. Load `writing-beats` once, then build the lecture in its beats: ground each term before a beat leans on it. The moves below decide what each beat has to carry.
57
+
58
+ The lecture has no length cap. Teach until the concept is complete by your judgment, and send it as one message. Number the headings and name each one after its content, never after a slot. When the concept carries three or more symbols, or the explanation needs three or more numbers the reader must compare, put a short table before the first use. A short list works instead when each entry needs a clause of meaning rather than a cell. When a picture explains the relation better than prose, including a plot of a function, draw it with the `diagram` skill into `diagrams/<name>.svg` inside the topic folder. From the workspace root the image path is `study/<slug>/diagrams/<name>.svg`. Compute every plotted point with the host shell. Use `pwsh` on Windows and `bash` on macOS or Linux. Never place a point by eye.
59
+
60
+ **How the lecture says it.** Structure decides what the reader meets. Wording decides whether it lands. Both apply to every sentence.
61
+
62
+ - Give each symbol a noun and a job: "the gradient, the direction of steepest increase at x". A symbol that appears only inside a formula is not defined.
63
+ - Speak every bound as a comparison: no higher than, at least, at most. An inequality alone tells the reader what to verify, not what it means.
64
+ - Use "you" for what the reader does, and "we" for what you do together. Never "one", and never the passive when the reader is the actor.
65
+ - Correct a misleading name at its first use, before the definition. Say what the word suggests and what it does not.
66
+ - Say each formula once in plain words, with no symbols in it.
67
+ - Open each step of a derivation with the verb that names the move, and give the reason before the step: "bound this error with Cauchy-Schwarz". A reason that arrives after the step is one the reader cannot use.
68
+ - Mark your own looseness: usually, informally, in one dimension. An unmarked approximation reads as an error.
69
+ - Prefer the verb to the noun. "The slope changes" beats "the rate of change of the slope is bounded".
70
+ - Open each paragraph with its claim, then the support that carries it: an example, a number, or a reason. Two claims need two paragraphs, or the reader drops the first while reading the second.
71
+ - Let each fact appear once. The version in plain words is the restatement; a second telling reads as a new point.
72
+ - One rewrite per display line. Split a chain of three or more equalities at the step that changes the object, or the reader cannot tell which step is being justified.
73
+ - At most two question lines per lecture: one at the top, one where the reader will object. A question mark on every section turns the lecture into a quiz. Never hang a question on the end of a claim with "and": state the conclusion, or give the question its own line.
74
+
75
+ The difference in practice:
76
+
77
+ > Weak: L-smoothness, or L-Lipschitz continuity of the gradient, is a regularity condition that controls the variation of the gradient field.
78
+
79
+ > Better: A function is L-smooth when moving a distance d cannot change its gradient by more than L·d. Move one unit and the gradient shifts by at most L.
80
+
81
+ Before you send the lecture, ask five yes-or-no questions. A yes means rewrite that part first.
82
+
83
+ - Does one fact appear twice in different words?
84
+ - Does one display line chain three or more equalities?
85
+ - Does one paragraph carry two claims?
86
+ - Do three or more numbers still sit inside a sentence?
87
+ - Does any sentence end by asking the reader to draw the conclusion?
88
+
89
+ If the row was already `in_process`, say that the last session stopped before the questions, repeat the full lecture, then go to the questions. The three questions were never asked, so they are still unseen. When the log records a defer rather than a crash, say what remains and offer the questions before repeating the lecture.
90
+
91
+ **Ask three unseen questions.** Before you ask, write down the expected answer and the criteria for a good answer. Keep both private. The criteria test the conclusion and whether each step taken is valid, not the route you had in mind. Ask one question at a time, then wait.
92
+
93
+ A question exists to find the gap, not to stop the session. Nothing in this step blocks the learner.
94
+
95
+ - Two correct answers is a pass. An answer is correct when its conclusion holds and no step it takes is wrong. A different valid route is correct.
96
+ - A right answer with a wrong step is not correct. Name that step. Never fail an answer for leaving out a step you would have taken, or for taking a longer route.
97
+ - If the learner is stuck, give one hint and re-ask once. A second miss counts as wrong.
98
+ - When an answer is wrong, do three things in one message: name the wrong step, work the correct answer with its process, then ask a similar question. Mark one miss. The similar question replaces the missed one, so the pass still rests on two correct answers and the questions stay unseen.
99
+ - When the learner asks for the answer, do the same: give the worked answer, mark one miss, ask a similar question.
100
+ - When the learner defers a question or asks to move on, accept it at once. Record the defer and the learner's reason in the log. The concept stays `in_process`, because a defer is neither evidence nor a miss. Never argue about time.
101
+
102
+ **Teach-back.** Ask the learner to explain the idea to someone who has not seen it. Grade two things: the idea is correct, and the explanation would let that person use it. Note whether the language stays plain. Do not ask where the idea stops applying. When the answer is valid overall and something is missing or loose, name it, correct it in one sentence, and pass. A miss is for a wrong idea, not for a gap you can close in the moment.
103
+
104
+ **Record.** Update the row: state, today's date, passes, misses, one short note. A verdict clears `in_process`. Append a log block of six lines or fewer. If the concept was the target and is now `fluent`, set `Target: -` in `plan.md`, state the target and the evidence date, and ask one question: go deeper into a concept that depends on it, name a new target, or continue with the next ready concept. Otherwise name the next concept and the reason in one line.
105
+
106
+ One concept per session. The learner can ask for another. Run the spine again.
107
+
108
+ ## 5. Grade honestly
109
+
110
+ - Post the rubric and the expected answer with the grade, never before the question. The rubric fails an answer on a wrong step, not on a missing one.
111
+ - Hold a grade under pushback. Restate it once with the reason, record the disagreement, continue. Do not debate and do not agree with a wrong step.
112
+ - When the learner asks for the answer: give it with its process, mark a miss dated today, then ask a similar question.
113
+ - Self-report never sets `shaky` or `fluent`. "I know this" adds a note.
114
+ - The learner may drop a concept at any time, at graph approval or during any later session. Write `skipped` with no date and no passes, and put the reason in the note: `self-report, not needed` or `self-report, done`. Say one line: the record shows it as untested, and a later failure on a dependent concept turns it `shaky`.
115
+ - A deliberate "done" after a lecture is that same skip. An abandoned session is not: leave the row `in_process`.
116
+ - Teaching sets `in_process` and nothing else. A verdict replaces it, and the marker never counts as evidence.
117
+ - If the learner fails a concept that has a `fluent` prerequisite, the prerequisite was graded too generously. Set it to `shaky` and say why.
118
+ - A failed concept with a `skipped` prerequisite shows the skip was a guess. Set that prerequisite to `shaky` and say why.
119
+
120
+ ## 6. Sources
121
+
122
+ - Synthesize the three tiers into one narrative. Do not present them as separate voices.
123
+ - When sources disagree in a way that changes the lesson, show the disagreement in one line and teach the stronger evidence.
124
+ - Name the source for load-bearing numbers, definitions, and causal claims. Do not cite every sentence.
125
+ - Never fill a gap silently. Say what is unknown.
126
+
127
+ ## 7. File formats
128
+
129
+ `graph.md`:
130
+
131
+ ```md
132
+ # Topic: <topic>
133
+ Goal: <one line, optional>
134
+
135
+ | # | Concept | Definition | Prerequisites |
136
+ |---|---|---|---|
137
+ | 1 | <name> | <one line> | - |
138
+ | 2 | <name> | <one line> | 1 |
139
+ ```
140
+
141
+ `plan.md`:
142
+
143
+ ```md
144
+ Target: 7 matrix square root
145
+ ```
146
+
147
+ `Target:` holds one concept, the number and its name. `-` means no target. A rebuild sets it to `-`, because the numbers change.
148
+
149
+ `state.md`:
150
+
151
+ ```md
152
+ | # | Concept | State | Last evidence | Passes | Misses | Note |
153
+ |---|---|---|---|---|---|---|
154
+ | 1 | <name> | new | - | 0 | 0 | |
155
+ ```
156
+
157
+ The states are `new`, `shaky`, `fluent`, `skipped`, and `in_process`. A `skipped` row has no date, no passes, and a note that the learner dropped it. An `in_process` row has no date, and its note reads `taught, no verdict`.
158
+
159
+ `diagrams/` holds one SVG per figure, named for what it shows. The client renders it from a relative path, so write the file before the sentence that shows it. Inline SVG is escaped and appears as text.
160
+
161
+ `log.md`, one block per session:
162
+
163
+ ```md
164
+ ## 2026-10-25
165
+ Concept: <name>
166
+ Result: <2 of 3 correct; teach-back incomplete>
167
+ Gap: <the specific thing that failed>
168
+ Next: <concept> because <reason>
169
+ ```
170
+
171
+ ## 8. Do not
172
+
173
+ - Do not write mastered, verified, or understood. The states are `new`, `shaky`, `fluent`, `skipped`, and `in_process`.
174
+ - Do not date a `skipped` row or count it as a pass. A skip is a self-report, never evidence.
175
+ - Do not treat `in_process` as evidence. It records a session, not learning.
176
+ - Do not set a target the learner did not name.
177
+ - Do not teach a concept whose prerequisites are not `fluent` or `skipped`, with or without a target.
178
+ - Do not imply retention. `fluent` covers one session only.
179
+ - Do not update a date without new evidence.
180
+ - Do not write state anywhere except `study/<slug>/` in the workspace.
181
+ - Do not ask two questions at once.
182
+ - Do not teach two concepts at once.
183
+ - Do not name a heading after a slot. Name it after the content.
184
+ - Do not plot a point you did not compute.
185
+ - Do not block a wrong answer, an answer request, or a deferred question. Each one moves the session forward.
@@ -0,0 +1,35 @@
1
+ # GLOSSARY.md Format
2
+
3
+ `GLOSSARY.md` is the canonical language for this teaching workspace. All explainers, exercises, and learning records should adhere to its terminology. Building it is itself part of learning: compressing a concept into a tight definition is evidence the user understands it.
4
+
5
+ ## Structure
6
+
7
+ ```md
8
+ # {Topic} Glossary
9
+
10
+ {One or two sentence description of the topic this glossary covers.}
11
+
12
+ ## Terms
13
+
14
+ **Hypertrophy**:
15
+ Muscle growth driven by mechanical tension and metabolic stress over repeated training sessions.
16
+ _Avoid_: Bulking, getting big
17
+
18
+ **Progressive overload**:
19
+ Systematically increasing the demand on a muscle over time, via load, volume, or intensity.
20
+ _Avoid_: Pushing harder, levelling up
21
+
22
+ **RPE (Rate of Perceived Exertion)**:
23
+ A 1–10 self-rating of how hard a set felt, where 10 is failure and 8 means two reps left in the tank.
24
+ _Avoid_: Effort score, intensity rating
25
+ ```
26
+
27
+ ## Rules
28
+
29
+ - **Add a term only when the user understands it.** The glossary is a record of compressed knowledge, not a dictionary the user reads to learn. If the user has just been introduced to a concept, wait until they can use it correctly before promoting it here.
30
+ - **Be opinionated.** When several words exist for the same concept, pick the best one and list the rest as aliases to avoid. This is how language compresses.
31
+ - **Keep definitions tight.** One or two sentences. Define what the term IS, not what it does or how to do it.
32
+ - **Use the glossary's own terms inside definitions.** Once a term is in the glossary, prefer it everywhere, including inside other definitions. This is what makes complex terms easier to grasp later.
33
+ - **Group under subheadings** when natural clusters emerge (e.g. `## Anatomy`, `## Programming`). A flat list is fine when terms cohere.
34
+ - **Flag ambiguities explicitly.** If a term is used loosely in the wider field, note the resolution: "In this workspace, 'set' always means a working set; warm-ups are tracked separately."
35
+ - **Revise as understanding deepens.** A definition the user wrote in week one may be wrong by week six. Update in place; do not leave stale entries.
@@ -0,0 +1,46 @@
1
+ # Learning Record Format
2
+
3
+ Learning records live in `./learning-records/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc. Create the directory lazily: only when the first record is written.
4
+
5
+ They are the teaching equivalent of ADRs: they capture non-obvious lessons, key insights, and stated prior knowledge that will steer future sessions. They are used to calculate the zone of proximal development.
6
+
7
+ ## Template
8
+
9
+ ```md
10
+ # {Short title of what was learned or established}
11
+
12
+ {1-3 sentences: what was learned (or what prior knowledge was established), and why it matters for future sessions.}
13
+ ```
14
+
15
+ That is the whole format. A learning record can be a single paragraph. The value is recording _that_ this is now known and _why_ it changes what to teach next, not in filling out sections.
16
+
17
+ ## Optional sections
18
+
19
+ Only include these when they add genuine value. Most records won't need them.
20
+
21
+ - **Status** frontmatter (`active | superseded by LR-NNNN`): useful when an earlier understanding turns out to be wrong and is replaced.
22
+ - **Evidence**: how the user demonstrated the understanding (a question answered, an exercise completed, prior experience cited). Useful when the claim might be revisited.
23
+ - **Implications**: what this unlocks or rules out for future sessions. Worth recording when non-obvious.
24
+
25
+ ## Numbering
26
+
27
+ Scan `./learning-records/` for the highest existing number and increment by one.
28
+
29
+ ## When to write a learning record
30
+
31
+ Write one when any of these is true:
32
+
33
+ 1. **The user demonstrated genuine understanding of something non-trivial**: not just exposure, but evidence they can use the concept correctly. This sets a new floor for what to teach next.
34
+ 2. **The user disclosed prior knowledge**: "I already know X." Record it so future sessions don't re-teach it. Also record the _depth_ claimed.
35
+ 3. **A misconception was corrected**: the user previously believed something wrong and now sees why. These are high-value: they predict future stumbling blocks for related topics.
36
+ 4. **The mission shifted in response to learning**: the user discovered they cared about something different than they thought. Cross-link to [[MISSION.md]] and update it.
37
+
38
+ ### What does _not_ qualify
39
+
40
+ - Material that was merely covered. Coverage is not learning. Wait for evidence.
41
+ - Anything already captured tersely in [[GLOSSARY.md]] as a term definition. Don't duplicate.
42
+ - Session-by-session activity logs. Learning records are not a journal: they are decision-grade insights.
43
+
44
+ ## Supersession
45
+
46
+ When a later record contradicts an earlier one (the user's understanding deepened or corrected), mark the old record `Status: superseded by LR-NNNN` rather than deleting it. The history of how understanding evolved is itself useful signal.
@@ -0,0 +1,31 @@
1
+ # MISSION.md Format
2
+
3
+ `MISSION.md` lives at the workspace root. It captures the _reason_ the user is learning this topic. Every teaching decision (what to teach next, which resources to surface, which exercises to design) should trace back to this document.
4
+
5
+ ## Template
6
+
7
+ ```md
8
+ # Mission: {Topic}
9
+
10
+ ## Why
11
+ {1-3 sentences. The concrete real-world goal the user is chasing. What changes in their life or work when they have this skill? Avoid abstract framings like "to understand X"; push for the underlying outcome.}
12
+
13
+ ## Success looks like
14
+ - {A specific, observable thing the user will be able to do}
15
+ - {Another specific thing}
16
+ - {…}
17
+
18
+ ## Constraints
19
+ - {Time, budget, prior commitments, learning preferences, anything that bounds the approach}
20
+
21
+ ## Out of scope
22
+ - {Adjacent topics the user explicitly does not want to chase right now, protecting the zone of proximal development}
23
+ ```
24
+
25
+ ## Rules
26
+
27
+ - **One mission per workspace.** If the user wants to learn two unrelated things, that is two workspaces.
28
+ - **Concrete over abstract.** "Run a half marathon by October" beats "get fitter." "Ship a Rust CLI to my team" beats "learn Rust."
29
+ - **Push back on vagueness.** If the user cannot articulate why, interview them before writing anything. A bad mission is worse than no mission.
30
+ - **Revise when reality shifts.** Missions change. When the user's goal moves, update this file: don't leave a stale mission steering future sessions.
31
+ - **Keep it short.** If `MISSION.md` runs past a screen, it has stopped being a compass and started being a plan.
@@ -0,0 +1,32 @@
1
+ # RESOURCES.md Format
2
+
3
+ `RESOURCES.md` is the curated set of trusted sources for this topic. Knowledge for explainers should be drawn from here, not from parametric guesses. Wisdom comes from the communities listed here.
4
+
5
+ ## Structure
6
+
7
+ ```md
8
+ # {Topic} Resources
9
+
10
+ ## Knowledge
11
+
12
+ - [Book: _The Science and Practice of Strength Training_ by Zatsiorsky & Kraemer](https://example.com)
13
+ Foundational text on programming and adaptation. Use for: anything to do with periodisation, recovery, intensity zones.
14
+ - [Article: "How Much Should I Train?" by Greg Nuckols (Stronger By Science)](https://example.com)
15
+ Evidence-based review of volume landmarks. Use for: weekly set targets per muscle group.
16
+
17
+ ## Wisdom (Communities)
18
+
19
+ - [r/weightroom](https://reddit.com/r/weightroom)
20
+ High-signal subreddit, moderated against bro-science. Use for: programme critique, plateau troubleshooting.
21
+ - Local: Tuesday strength class at {gym name}
22
+ Use for: real-time coaching feedback on lifts.
23
+ ```
24
+
25
+ ## Rules
26
+
27
+ - **High-trust only.** Prefer primary sources, recognised experts, peer-reviewed work, and communities with strong moderation. If a resource is marketing dressed as education, leave it out.
28
+ - **Annotate every entry.** A bare link is useless in three months. Add one line: what it covers and when to reach for it.
29
+ - **Group by Knowledge / Wisdom.** Mirrors the philosophy in [SKILL.md](./SKILL.md). It is fine for a resource to appear in only one group.
30
+ - **Surface gaps explicitly.** If no good resource exists for an area the mission needs, write a `## Gaps` section listing what is missing. This drives future search.
31
+ - **Prune ruthlessly.** A resource that turned out to be wrong, shallow, or off-mission should be removed, not buried. Better five sharp sources than thirty mediocre ones.
32
+ - **Record community preferences.** If the user has opted out of joining communities, note it here so future sessions don't keep proposing them.