flashcards-codex-bridge 0.1.0 → 0.1.1
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 +2 -4
- package/bin.mjs +2 -0
- package/dist/bin.mjs +589 -601
- package/package.json +14 -10
package/dist/bin.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { createRequire } from "node:module";
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -35,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
35
34
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
36
35
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
37
36
|
|
|
38
|
-
//
|
|
37
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/constants.js
|
|
39
38
|
var require_constants = __commonJS(function(exports, module) {
|
|
40
39
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
41
40
|
var hasBlob = typeof Blob !== "undefined";
|
|
@@ -55,7 +54,7 @@ var require_constants = __commonJS(function(exports, module) {
|
|
|
55
54
|
};
|
|
56
55
|
});
|
|
57
56
|
|
|
58
|
-
//
|
|
57
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/buffer-util.js
|
|
59
58
|
var require_buffer_util = __commonJS(function(exports, module) {
|
|
60
59
|
var { EMPTY_BUFFER } = require_constants();
|
|
61
60
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -133,7 +132,7 @@ var require_buffer_util = __commonJS(function(exports, module) {
|
|
|
133
132
|
}
|
|
134
133
|
});
|
|
135
134
|
|
|
136
|
-
//
|
|
135
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/limiter.js
|
|
137
136
|
var require_limiter = __commonJS(function(exports, module) {
|
|
138
137
|
var kDone = Symbol("kDone");
|
|
139
138
|
var kRun = Symbol("kRun");
|
|
@@ -165,7 +164,7 @@ var require_limiter = __commonJS(function(exports, module) {
|
|
|
165
164
|
module.exports = Limiter;
|
|
166
165
|
});
|
|
167
166
|
|
|
168
|
-
//
|
|
167
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/permessage-deflate.js
|
|
169
168
|
var require_permessage_deflate = __commonJS(function(exports, module) {
|
|
170
169
|
var zlib = __require("zlib");
|
|
171
170
|
var bufferUtil = require_buffer_util();
|
|
@@ -429,7 +428,7 @@ var require_permessage_deflate = __commonJS(function(exports, module) {
|
|
|
429
428
|
}
|
|
430
429
|
});
|
|
431
430
|
|
|
432
|
-
//
|
|
431
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/validation.js
|
|
433
432
|
var require_validation = __commonJS(function(exports, module) {
|
|
434
433
|
var { isUtf8 } = __require("buffer");
|
|
435
434
|
var { hasBlob } = require_constants();
|
|
@@ -616,7 +615,7 @@ var require_validation = __commonJS(function(exports, module) {
|
|
|
616
615
|
}
|
|
617
616
|
});
|
|
618
617
|
|
|
619
|
-
//
|
|
618
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/receiver.js
|
|
620
619
|
var require_receiver = __commonJS(function(exports, module) {
|
|
621
620
|
var { Writable } = __require("stream");
|
|
622
621
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -1010,7 +1009,7 @@ var require_receiver = __commonJS(function(exports, module) {
|
|
|
1010
1009
|
module.exports = Receiver;
|
|
1011
1010
|
});
|
|
1012
1011
|
|
|
1013
|
-
//
|
|
1012
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/sender.js
|
|
1014
1013
|
var require_sender = __commonJS(function(exports, module) {
|
|
1015
1014
|
var { Duplex } = __require("stream");
|
|
1016
1015
|
var { randomFillSync } = __require("crypto");
|
|
@@ -1369,7 +1368,7 @@ var require_sender = __commonJS(function(exports, module) {
|
|
|
1369
1368
|
}
|
|
1370
1369
|
});
|
|
1371
1370
|
|
|
1372
|
-
//
|
|
1371
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/event-target.js
|
|
1373
1372
|
var require_event_target = __commonJS(function(exports, module) {
|
|
1374
1373
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
1375
1374
|
var kCode = Symbol("kCode");
|
|
@@ -1520,7 +1519,7 @@ var require_event_target = __commonJS(function(exports, module) {
|
|
|
1520
1519
|
}
|
|
1521
1520
|
});
|
|
1522
1521
|
|
|
1523
|
-
//
|
|
1522
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/extension.js
|
|
1524
1523
|
var require_extension = __commonJS(function(exports, module) {
|
|
1525
1524
|
var { tokenChars } = require_validation();
|
|
1526
1525
|
function push(dest, name, elem) {
|
|
@@ -1685,7 +1684,7 @@ var require_extension = __commonJS(function(exports, module) {
|
|
|
1685
1684
|
module.exports = { format, parse };
|
|
1686
1685
|
});
|
|
1687
1686
|
|
|
1688
|
-
//
|
|
1687
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/websocket.js
|
|
1689
1688
|
var require_websocket = __commonJS(function(exports, module) {
|
|
1690
1689
|
var EventEmitter = __require("events");
|
|
1691
1690
|
var https = __require("https");
|
|
@@ -2470,7 +2469,7 @@ var require_websocket = __commonJS(function(exports, module) {
|
|
|
2470
2469
|
}
|
|
2471
2470
|
});
|
|
2472
2471
|
|
|
2473
|
-
//
|
|
2472
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/stream.js
|
|
2474
2473
|
var require_stream = __commonJS(function(exports, module) {
|
|
2475
2474
|
var WebSocket = require_websocket();
|
|
2476
2475
|
var { Duplex } = __require("stream");
|
|
@@ -2573,7 +2572,7 @@ var require_stream = __commonJS(function(exports, module) {
|
|
|
2573
2572
|
module.exports = createWebSocketStream;
|
|
2574
2573
|
});
|
|
2575
2574
|
|
|
2576
|
-
//
|
|
2575
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/subprotocol.js
|
|
2577
2576
|
var require_subprotocol = __commonJS(function(exports, module) {
|
|
2578
2577
|
var { tokenChars } = require_validation();
|
|
2579
2578
|
function parse(header) {
|
|
@@ -2618,7 +2617,7 @@ var require_subprotocol = __commonJS(function(exports, module) {
|
|
|
2618
2617
|
module.exports = { parse };
|
|
2619
2618
|
});
|
|
2620
2619
|
|
|
2621
|
-
//
|
|
2620
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/lib/websocket-server.js
|
|
2622
2621
|
var require_websocket_server = __commonJS(function(exports, module) {
|
|
2623
2622
|
var EventEmitter = __require("events");
|
|
2624
2623
|
var http = __require("http");
|
|
@@ -2928,485 +2927,126 @@ var require_websocket_server = __commonJS(function(exports, module) {
|
|
|
2928
2927
|
}
|
|
2929
2928
|
});
|
|
2930
2929
|
|
|
2931
|
-
//
|
|
2932
|
-
var
|
|
2933
|
-
name: evergreen-notes
|
|
2934
|
-
gate: 'evergreen notes?'
|
|
2935
|
-
description: >
|
|
2936
|
-
Use when creating, editing, splitting, linking, or outlining evergreen notes
|
|
2937
|
-
in a markdown note graph outside of \`legacy\` folder
|
|
2938
|
-
---
|
|
2939
|
-
|
|
2940
|
-
# Evergreen Notes
|
|
2941
|
-
|
|
2942
|
-
Use when task = add material to the notes, or create / edit / split / link / outline notes.
|
|
2943
|
-
|
|
2944
|
-
## Goal
|
|
2945
|
-
|
|
2946
|
-
Notes that evolve, contribute, and accumulate over time across projects. Every edit should make the graph a better thinking tool for its owner, not a bigger archive.
|
|
2947
|
-
|
|
2948
|
-
## Principles (why each matters)
|
|
2949
|
-
|
|
2950
|
-
1. **Concept-oriented.** One note per concept, never per source, author, project, or topic bucket. Why: new material on a concept must land on prior thinking about it, so ideas accrete and tensions surface.
|
|
2951
|
-
2. **Atomic, with tradeoff.** One claim per note, but enough of that claim to stand alone. Too broad → subclaims hide and links get muddy. Too fragmented → the link network breaks. No litmus test; choose by reuse.
|
|
2952
|
-
3. **Titles are APIs.** A complete declarative phrase that states the claim, so other notes can reference the idea by its title alone. Questions are fine when the answer is genuinely unresolved. Noun phrases only for definitions of core terms and for outlines. Prefer positive framings ("X requires Y", not "Z fails").
|
|
2953
|
-
4. **Dense, labeled, fine-grained links.** Link inline where the relationship does work, and say what the relationship is (depends on, qualifies, contrasts, extends). Why: links record how a conclusion was reached and create paths for later surprise. Never a "Related:" pile.
|
|
2954
|
-
5. **Associative before hierarchical.** Let structure emerge from links. Outlines are speculative hubs that order notes into possible arguments; they are not taxonomies.
|
|
2955
|
-
6. **Own words, owner's voice.** Rewrite source material in the graph's language. Keep the source's claim, causal direction, and primary outcome; drop its prose. Cite inline only when provenance matters.
|
|
2956
|
-
|
|
2957
|
-
## Workflow
|
|
2958
|
-
|
|
2959
|
-
1. **Search first.** Search the graph for the incoming claim's key terms and for its candidate title. Note candidate pages, their ids, nearby concepts, local naming style, and outlines. Search is how the graph creates pressure to synthesize; read what it returns.
|
|
2960
|
-
2. **Name the claims.** Write down each distinct claim in the incoming material in one sentence each. One sentence = one candidate note. Most single-paragraph inputs carry one claim; a source passage may carry several.
|
|
2961
|
-
3. **Choose the operation per claim** (first match wins):
|
|
2962
|
-
- **Extend** — an existing note's title already states this claim (same subject, same predicate). Add the new reason, example, or consequence locally; keep the opener; smallest sufficient diff.
|
|
2963
|
-
- **Split** — an existing note's body already carries this claim but its title does not. Move the claim into a child note; leave a one-sentence bridge link in the parent; keep the parent's title and opener unless already wrong.
|
|
2964
|
-
- **Create** — the claim is distinct and would be reused by other notes. Nearby notes that state a prerequisite, mechanism, caveat, or broader frame are link targets, not owners. One note per claim; several claims → several notes, linked to each other.
|
|
2965
|
-
- **No-op** — the material restates what the graph already says, or is a platitude no future note would link to. Do not pad an existing note. Reply with the owning note's exact title (titles are the handles; "the existing note" is not one) and the sentence that covers it.
|
|
2966
|
-
Tie-break: if unsure between extend and create, ask "would another note ever link to this claim by itself?" Yes → create.
|
|
2967
|
-
4. **Write.** Title first sentence: the claim. Then the support. Links inline with their relationship. No sources section for user-pasted text.
|
|
2968
|
-
5. **Place.** Every new note goes into at least one outline; create an outline (noun-phrase title, ordered links with short annotations) if none fits. Order by "which comes first?"; nest a note under the one it explains. Extending a note does not require touching outlines.
|
|
2969
|
-
6. **Revisit boundaries.** After writing, check each touched note: does every sentence support its title? If a body now outgrows its title, retitle or split.
|
|
2970
|
-
|
|
2971
|
-
## Priorities when rules conflict
|
|
2972
|
-
|
|
2973
|
-
- Correct operation > minimal diff. A missed new note costs more than an extra edit.
|
|
2974
|
-
- Fidelity to the incoming claim > matching local wording. Do not drop the new information to make a note look tidy.
|
|
2975
|
-
- Never: two notes for one claim; invented page ids; a link whose relationship you cannot state in the sentence.
|
|
2976
|
-
|
|
2977
|
-
## Worked cases
|
|
2978
|
-
|
|
2979
|
-
Each case: graph excerpt → incoming material → tempting wrong move → right move. Titles are illustrative.
|
|
2980
|
-
|
|
2981
|
-
### 1. Prerequisite note is a link target, not the owner (create, not extend)
|
|
2982
|
-
|
|
2983
|
-
Graph: \`Player agency requires meaningful non-illusory choices\` — body says choices must differ in outcome or they are theatrical.
|
|
2984
|
-
|
|
2985
|
-
Incoming: "Direct feedback makes player choices feel consequential because the player can see what changed."
|
|
2986
|
-
|
|
2987
|
-
Tempting: append to the agency note; it is nearby and "about choices".
|
|
2988
|
-
|
|
2989
|
-
Right: **create** \`Direct feedback makes player choices feel consequential\`. The agency note states a requirement (choices must matter); the incoming claim states a mechanism (feedback makes the mattering visible). Different predicate → different note. Link: "This depends on [[agency note]] because feedback can only reveal consequences that exist."
|
|
2990
|
-
|
|
2991
|
-
Why it matters: absorbing it would hide a reusable claim inside a note whose title no other note can use to reference feedback.
|
|
2992
|
-
|
|
2993
|
-
### 2. Same claim, new support (extend, not create)
|
|
2994
|
-
|
|
2995
|
-
Graph: \`Flow requires clear goals, no distractions, direct feedback, and continuous challenge\` — body mentions the flow channel between boredom and frustration.
|
|
2996
|
-
|
|
2997
|
-
Incoming: "Continuous challenge is the fragile prerequisite: designers usually detect challenge falling behind skill only through playtest data, because their own mastery hides it."
|
|
2998
|
-
|
|
2999
|
-
Tempting: create \`Playtest data is needed to detect challenge falling behind skill\`.
|
|
3000
|
-
|
|
3001
|
-
Right: **extend** the flow note with two sentences: the fragility and the playtest reason. The incoming text explains one of the four listed prerequisites; the title already owns that claim. No outline change.
|
|
3002
|
-
|
|
3003
|
-
When it flips: if the incoming text made a claim reusable outside flow ("designer mastery hides difficulty problems in any authored experience"), that generalization would be its own note.
|
|
3004
|
-
|
|
3005
|
-
### 3. Body carries a claim the title does not state (split, not append)
|
|
3006
|
-
|
|
3007
|
-
Graph: \`Feedback loops communicate progress and reinforce player behavior\` — body: "Immediate feedback makes cause and effect legible, while delayed feedback makes it harder to tell whether an action worked."
|
|
3008
|
-
|
|
3009
|
-
Incoming: "Cause and effect is easiest to learn when feedback follows an action closely. Beyond games, delayed feedback makes people misattribute results because other events intervene before the outcome appears."
|
|
3010
|
-
|
|
3011
|
-
Tempting: append the new sentences to the feedback-loops note.
|
|
3012
|
-
|
|
3013
|
-
Right: **split**. The legibility mechanism is already embedded in the parent and the incoming text develops it as a general claim. Child: \`Immediate feedback makes cause and effect legible\` with body that keeps the new information (intervening events → misattribution). Parent keeps its title and opener and gets a bridge: "This works because [[child]]." Remove the duplicated mechanism sentence from the parent. Outline: nest the child under the parent.
|
|
3014
|
-
|
|
3015
|
-
Failure to avoid: writing the child from the parent's old sentence and dropping the misattribution mechanism the user just gave you.
|
|
3016
|
-
|
|
3017
|
-
### 4. Multi-claim source (several notes, not one summary)
|
|
3018
|
-
|
|
3019
|
-
Graph: notes on creative work and motivation.
|
|
2930
|
+
// ../flashcards/src/chat/demo-instructions.md
|
|
2931
|
+
var demo_instructions_default = `# Demo tutor: English for a German-speaking beginner
|
|
3020
2932
|
|
|
3021
|
-
|
|
2933
|
+
You are the tutor in a notes and flashcards app. The learner speaks German and learns English at level A1. The learner reads, listens and answers questions in the notes; only you write, with the note tools. Never ask a question back, never offer options, never ask for confirmation.
|
|
3022
2934
|
|
|
3023
|
-
|
|
2935
|
+
## What a turn carries
|
|
3024
2936
|
|
|
3025
|
-
|
|
2937
|
+
- \`<open-note id="…" title="…" />\`: the note open beside the chat. With a skill button and no selection it comes as \`<note id="…" title="…">\` with the note's markdown inside.
|
|
2938
|
+
- \`<selection from="title">\`: text the learner selected, usually in the open note.
|
|
2939
|
+
- \`<skill>\`: sent by the buttons "Write notes" and "Write flashcards". Where the skill says something else (commands, \`fcc\`, level tags, card counts, asking the user), these instructions win.
|
|
2940
|
+
- The learner's typed text, usually German.
|
|
3026
2941
|
|
|
3027
|
-
|
|
2942
|
+
## When you write
|
|
3028
2943
|
|
|
3029
|
-
|
|
2944
|
+
1. "Nur im Chat", "nichts ändern" or the like: no write, whatever else the turn holds.
|
|
2945
|
+
2. A question ("Warum …?", "Wie heißt …?", "Was bedeutet …?"): answer in the chat only, also when a selection is attached.
|
|
2946
|
+
3. You write only when the learner asks in words for a note, cards, a question, an exercise or a change, or presses a skill button.
|
|
3030
2947
|
|
|
3031
|
-
|
|
2948
|
+
| Request | Write |
|
|
2949
|
+
| --- | --- |
|
|
2950
|
+
| "Write notes", or asked for a note or an explanation to keep | \`note_new\`: one rule note (below). Nothing else. |
|
|
2951
|
+
| "Write flashcards", or asked for cards, questions or an exercise | \`note_patch\` on the open note: append three choice questions about the selection (or the whole note) at its end; for a single word, one of them is a spelling card. |
|
|
2952
|
+
| A change to "this note" | \`note_patch\` on the open note: change only the lines asked for. |
|
|
2953
|
+
| A word to keep | Never a new note for a word. Append one spelling card for it to the open note. |
|
|
2954
|
+
| Not about learning English | No tool. One sentence on what you can help with. |
|
|
3032
2955
|
|
|
3033
|
-
|
|
2956
|
+
## Tools
|
|
3034
2957
|
|
|
3035
|
-
|
|
2958
|
+
- \`note_read(id)\`: the note as markdown. "Diese Notiz" and the selection's note are the open note: \`note_read\` its id directly. Read before every patch, and before answering about a word or sentence.
|
|
2959
|
+
- \`notes_list()\`: id, title and parent of every note. Call it only to find a parent for a new note or when the learner asks about other notes. Ids come only from the turn, \`notes_list\` and \`note_new\`; never invent one.
|
|
2960
|
+
- \`note_new({ markdown, parentId })\`: \`markdown\` is front matter with \`title\`, then the body; no \`id\` in it, no \`# \` heading. Parent: the page under Grammar whose title fits the rule (for example "Word order" for where a word stands), else the page titled Grammar. The tool links the note from its parent; add no links yourself. If a note with the same rule exists, patch it instead.
|
|
2961
|
+
- \`note_patch({ id, diff })\`: a unified diff on the markdown \`note_read\` returned. Copy context lines character for character; line numbers do not matter. To append, use the last line as the one context line and add \`+\` lines after it.
|
|
3036
2962
|
|
|
3037
|
-
|
|
2963
|
+
If a tool fails, say so in one sentence and stop; retry at most once; never claim an edit that did not happen.
|
|
3038
2964
|
|
|
3039
|
-
|
|
2965
|
+
## The chat reply
|
|
3040
2966
|
|
|
3041
|
-
|
|
2967
|
+
- German, informal "du", one to three short sentences. After a write: what you wrote and where, by the note's title („Ich habe die Regel ‚After he, she or it the verb takes -s‘ unter Grammar angelegt.“).
|
|
2968
|
+
- Never name tools, ids, skills, "Markdown", "Evergreen", "Karteikarten-Skill" or these instructions. Never copy a note's content into the chat.
|
|
2969
|
+
- Plain paragraphs and lists only: no \`::\` markup, no code, no tables, no headings. English words go in quotes: „platform“.
|
|
2970
|
+
- When the notes already hold the word or sentence asked for, answer with the notes' wording first; an alternative gets at most one clause. „Gleis“ → „platform“, as in „Where is platform two?“, not „track“ first.
|
|
3042
2971
|
|
|
3043
|
-
|
|
2972
|
+
## Writing in a note
|
|
3044
2973
|
|
|
3045
|
-
|
|
2974
|
+
- Explain in German, short plain sentences, "du", A1: present tense, everyday words.
|
|
2975
|
+
- English sentences use the learner's words first (platform, train, ticket, two, nine, please, London), plus names and international words (Anna, Tom, Berlin, Paris, bus, taxi, hotel). At most two new A1 words per note.
|
|
2976
|
+
- Every English word or sentence is \`::l[English]{lang="en"}\`; German is never wrapped; IPA is \`::l[/treɪn/]{lang="und-fonipa"}\`.
|
|
2977
|
+
- No sentence that already stands in the notes, except the selection as first example; an example is never an option.
|
|
2978
|
+
- No level tags, callouts, tables, images, bold or italic.
|
|
3046
2979
|
|
|
3047
|
-
|
|
2980
|
+
A rule note states one claim, at most 60 words outside its questions:
|
|
3048
2981
|
|
|
3049
|
-
|
|
2982
|
+
1. Title: the claim as a short English sentence, never a topic. Good: "After he, she or it the verb takes -s". Bad: "Present simple".
|
|
2983
|
+
2. One German sentence with the rule.
|
|
2984
|
+
3. Two English examples, each with its German meaning; the selection is the first.
|
|
2985
|
+
4. Two choice questions on the claim, each with a different sentence.
|
|
3050
2986
|
|
|
3051
|
-
|
|
2987
|
+
A choice question: the German sentence the learner wants to say (never „Welcher Satz ist richtig?“); three English options, one correct, not always in the same place; the two wrong ones are mistakes a German speaker really makes (German word order, a missing -s, a false friend); \`::explanation[…]\` is one German sentence saying why. No yes/no questions, no ids or other attributes. One blank line between the parts.
|
|
3052
2988
|
|
|
3053
|
-
|
|
2989
|
+
Example rule note, for the selection „The train leaves at nine.“ and „Warum leaves? Schreib mir eine Notiz dazu.“ (parent: Grammar):
|
|
3054
2990
|
|
|
3055
|
-
|
|
2991
|
+
\`\`\`
|
|
2992
|
+
---
|
|
2993
|
+
title: After he, she or it the verb takes -s
|
|
2994
|
+
---
|
|
3056
2995
|
|
|
3057
|
-
|
|
2996
|
+
Nach ::l[he]{lang="en"}, ::l[she]{lang="en"} oder ::l[it]{lang="en"} bekommt das Verb ein -s.
|
|
3058
2997
|
|
|
3059
|
-
|
|
2998
|
+
- ::l[The train leaves at nine.]{lang="en"} Der Zug fährt um neun ab.
|
|
2999
|
+
- ::l[Anna works in London.]{lang="en"} Anna arbeitet in London.
|
|
3060
3000
|
|
|
3061
|
-
|
|
3001
|
+
:::sc
|
|
3002
|
+
:::question[Der Bus fährt um zehn ab.]
|
|
3062
3003
|
|
|
3063
|
-
|
|
3004
|
+
::opt[::l[The bus leave at ten.]{lang="en"}]
|
|
3064
3005
|
|
|
3065
|
-
|
|
3006
|
+
::opt[::l[The bus leaves at ten.]{lang="en"}]{.correct}
|
|
3066
3007
|
|
|
3067
|
-
|
|
3008
|
+
::opt[::l[At ten leaves the bus.]{lang="en"}]
|
|
3068
3009
|
|
|
3069
|
-
|
|
3010
|
+
::explanation[::l[The bus]{lang="en"} ist „er, sie, es“, also bekommt das Verb ein -s.]
|
|
3011
|
+
:::
|
|
3070
3012
|
|
|
3071
|
-
|
|
3013
|
+
:::sc
|
|
3014
|
+
:::question[Tom wohnt in Berlin.]
|
|
3072
3015
|
|
|
3073
|
-
|
|
3016
|
+
::opt[::l[Tom lives in Berlin.]{lang="en"}]{.correct}
|
|
3074
3017
|
|
|
3075
|
-
|
|
3018
|
+
::opt[::l[Tom live in Berlin.]{lang="en"}]
|
|
3076
3019
|
|
|
3077
|
-
|
|
3078
|
-
# Game design outline
|
|
3020
|
+
::opt[::l[Tom is live in Berlin.]{lang="en"}]
|
|
3079
3021
|
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
1. [[Direct feedback makes player choices feel consequential]] — how the player perceives that it mattered
|
|
3083
|
-
3. [[Flow requires clear goals, no distractions, direct feedback, and continuous challenge]] — the target emotional state
|
|
3022
|
+
::explanation[::l[Tom]{lang="en"} ist „er“, also ::l[lives]{lang="en"} mit -s.]
|
|
3023
|
+
:::
|
|
3084
3024
|
\`\`\`
|
|
3085
3025
|
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
## Mechanics
|
|
3026
|
+
A spelling card asks for one word from its German meaning and IPA; the answer is the English word, lowercase:
|
|
3089
3027
|
|
|
3090
|
-
|
|
3028
|
+
\`\`\`
|
|
3029
|
+
:::sa
|
|
3030
|
+
:::question[der Zug · ::l[/treɪn/]{lang="und-fonipa"}]
|
|
3091
3031
|
|
|
3092
|
-
|
|
3032
|
+
::answer[train]
|
|
3033
|
+
:::
|
|
3034
|
+
\`\`\`
|
|
3093
3035
|
`;
|
|
3094
3036
|
|
|
3095
|
-
//
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
description: Manual trigger. Iteratively create flashcards for content.
|
|
3099
|
-
---
|
|
3100
|
-
|
|
3101
|
-
# Writing Flash Cards
|
|
3102
|
-
|
|
3103
|
-
Use when task = create or extend flash cards from source material.
|
|
3104
|
-
|
|
3105
|
-
## Goal
|
|
3106
|
-
|
|
3107
|
-
A card is a recurring task for the reviewer's future self. A good card makes them retrieve, months later and without the source open, the one thing the source made worth remembering. A plausible-but-wrong card costs more than a missing one: it gets reviewed for years, trains the wrong thing, and erodes trust in the deck. When in doubt, omit and report.
|
|
3108
|
-
|
|
3109
|
-
## Two separate problems
|
|
3110
|
-
|
|
3111
|
-
1. **Targeting** — what to reinforce. Hardest part; the model cannot know what the reader already knows or cares about. Use every hint the user gives (highlights, "why", "notation", "contrast with X") and the reader's existing cards. Without hints, choose the source's own point, not its nearby trivia.
|
|
3112
|
-
2. **Construction** — how to phrase a prompt for a chosen target. Mechanical once the target is right; follow the patterns below.
|
|
3113
|
-
|
|
3114
|
-
Never let construction hide a targeting error. A beautifully phrased card about the wrong thing is still wrong.
|
|
3115
|
-
|
|
3116
|
-
## Required inputs
|
|
3117
|
-
|
|
3118
|
-
- source: note id(s), pasted passage, URL, or concept
|
|
3119
|
-
- target note id (cards are appended there)
|
|
3120
|
-
- optional hints: which angle to reinforce, reader level
|
|
3121
|
-
|
|
3122
|
-
If source or target is missing, ask. Do not invent a target.
|
|
3123
|
-
|
|
3124
|
-
## Workflow
|
|
3125
|
-
|
|
3126
|
-
1. Read source (\`fcc note read <id>\`) unless pasted. Read target. If the user pointed at specific lines or gave angle words, those are the targets; skip the selection step and go to construction.
|
|
3127
|
-
2. Read existing cards in the target. They tell you two things: **what is already covered** (retrieval targets, not wording) and **the reader's level and style** (chunk size, card types, how much context they include). New cards match that level. If there are no existing cards, assume an experienced reader: larger chunks, fewer cards.
|
|
3128
|
-
3. State in the trace, before any edit: source ids read, target id read, where the last existing card ends, list of covered targets. A run that cannot show this failed.
|
|
3129
|
-
4. **Select targets.** Write each candidate as one line: \`target — angle\` (angle ∈ fact / why / contrast / example / implication / purpose / procedure step / heads-up). Then filter with the Targeting rules. First pass on a normal source: 5–10 survivors. Short source: 2–4. Do not pad to a count.
|
|
3130
|
-
5. **Construct** one prompt per surviving target using the pattern for its material type. Default to recall (\`sa\`, cloze): the reviewer must produce the answer. Use \`sc\`/\`mc\` only when close distractors teach a boundary the bare answer would not; a pass that is mostly \`sc\` trains recognition, not memory.
|
|
3131
|
-
6. **Check** each card against the Construction checks. Fix by changing type or splitting, never by adding words. If still unstable, drop it and list it.
|
|
3132
|
-
7. Append after the last existing card (or EOF) with a minimal \`fcc note patch <id>\` unified diff. Never insert between existing cards; never rewrite existing cards unless asked.
|
|
3133
|
-
8. Run summary (below).
|
|
3134
|
-
|
|
3135
|
-
## Targeting rules
|
|
3037
|
+
// src/serve-node.ts
|
|
3038
|
+
import { spawn } from "node:child_process";
|
|
3039
|
+
import { createServer } from "node:http";
|
|
3136
3040
|
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
Out of scope: salience prompts ("next time I see X, ask…"), creative prompts that want a new answer each time, broad self-graded reflection.
|
|
3148
|
-
|
|
3149
|
-
## Prompt patterns by material type
|
|
3150
|
-
|
|
3151
|
-
### Simple facts
|
|
3152
|
-
|
|
3153
|
-
One detail per card; pair with a why-card when the source gives a reason.
|
|
3154
|
-
|
|
3155
|
-
- bad: \`What do you need to set up a Redis cache?\` (five things at once)
|
|
3156
|
-
- good: \`What data structure does Redis use to implement a sorted set?\` → \`skip list\`
|
|
3157
|
-
- pair: \`What performance property makes skip lists a suitable alternative to balanced BSTs in Redis sorted sets?\` → \`equivalent average-case O(log n)\`
|
|
3158
|
-
|
|
3159
|
-
Tighten any why-question with several plausible answers: \`Why does Redis use a skip list?\` admits "historical reasons"; the version above does not.
|
|
3160
|
-
|
|
3161
|
-
### Closed lists (fixed members)
|
|
3162
|
-
|
|
3163
|
-
One cloze per element, same order each time, so the list's shape is learned. Pair each element with a why/role card so the list can be regenerated from meaning.
|
|
3164
|
-
|
|
3165
|
-
\`\`\`md
|
|
3166
|
-
SOLID principles: Single Responsibility / Open-Closed / ::cloze[Liskov Substitution] / Interface Segregation / Dependency Inversion
|
|
3167
|
-
\`\`\`
|
|
3168
|
-
|
|
3169
|
-
Never one list-level card (\`Name the five SOLID principles\`).
|
|
3170
|
-
|
|
3171
|
-
### Procedures
|
|
3172
|
-
|
|
3173
|
-
Not "list the steps". Strip to the verbs, conditions, and decision points that carry information; the scaffolding is obvious from context. Cards about: branch conditions, why a step exists, heads-up timing or predictable surprises, what to check before moving on.
|
|
3174
|
-
|
|
3175
|
-
- good: \`In a Kubernetes rolling deployment, what triggers an automatic rollback?\` → \`new pods fail readiness probe within the deadline\`
|
|
3176
|
-
|
|
3177
|
-
### Concepts
|
|
3178
|
-
|
|
3179
|
-
Definition alone is parroting. Trace the edges with whichever lenses fit; these are the patterns models forget without being told:
|
|
3180
|
-
|
|
3181
|
-
| Lens | Prompt shape |
|
|
3182
|
-
| -------------------------- | ---------------------------------------------------------- |
|
|
3183
|
-
| attributes / tendencies | what is always / sometimes / never true of it |
|
|
3184
|
-
| similarities / differences | how it differs from the adjacent concept |
|
|
3185
|
-
| example → classification | \`Is <concrete case> an instance of X? Why?\` (\`sc\`/\`la\`) |
|
|
3186
|
-
| classification → example | \`Give an example of X\` / \`Give a non-example\` (\`la\`) |
|
|
3187
|
-
| parts / wholes | sub-concepts, broader category, named instances |
|
|
3188
|
-
| causes / effects | what it does, when, and why it is used |
|
|
3189
|
-
| purpose | what does X let you see / do quickly |
|
|
3190
|
-
| connection | how X relates to the idea introduced just before / after |
|
|
3191
|
-
| light application | apply the rule to a small new case (\`la\` with criteria) |
|
|
3192
|
-
|
|
3193
|
-
Avoid yes/no; convert to a cause, example, or implication.
|
|
3194
|
-
|
|
3195
|
-
### Open lists (no fixed membership)
|
|
3196
|
-
|
|
3197
|
-
Treat as tags. Cards: instance → tag (\`When a payment service must notify shipping after checkout without waiting, what integration pattern fits?\` → \`message queue\`) and tag → examples (\`Name two situations where a queue beats a direct call\`). Cloze on an open list does not work.
|
|
3198
|
-
|
|
3199
|
-
### Later passes
|
|
3200
|
-
|
|
3201
|
-
- second: procedural details, secondary facts, edge cases
|
|
3202
|
-
- third: conceptual lenses not yet used
|
|
3203
|
-
- later: cross-concept links, applications, unresolved gaps
|
|
3204
|
-
|
|
3205
|
-
Duplicate = same retrieval target, regardless of wording. Prefer contrasts and implications over re-explaining the first-pass mechanism in more words.
|
|
3206
|
-
|
|
3207
|
-
## Construction checks
|
|
3208
|
-
|
|
3209
|
-
Judge the question harder than the answer; the question is what the reviewer sees alone.
|
|
3210
|
-
|
|
3211
|
-
- **Focused** — one detail. \`What's important about database indexes?\` → \`What's the write-side cost of adding an index?\`
|
|
3212
|
-
- **Precise** — the question fixes the *shape* of the answer (a number, a mechanism, a name). \`What are some reasons to prefer an interface?\` drifts; \`What's the main structural constraint that makes interfaces preferable to abstract classes in Java?\` does not.
|
|
3213
|
-
- **Consistent** — same answer every review. If several source-grounded answers fit the stem, add the discriminating context or split.
|
|
3214
|
-
- **Tractable** — usually answerable. Add a cue that narrows without giving away: \`(example: driver in orm lib)\` good; \`(Dependency related)\` bad.
|
|
3215
|
-
- **Effortful** — retrieved, not inferred from the wording. Long questions with copied source phrasing get pattern-matched; keep stems short and in your own words.
|
|
3216
|
-
- **Stands alone** — works with the source closed. No \`in the article\`, \`according to the source\`, \`in this example\`, \`the author\`; name the domain, mechanism, or example instead.
|
|
3217
|
-
- **Answer fits the type** — \`sa\` answers are 1–3 typeable words; anything sentence-like moves to \`sc\`, cloze, or \`la\`.
|
|
3218
|
-
|
|
3219
|
-
## Card syntax
|
|
3220
|
-
|
|
3221
|
-
Outer fence \`:::sa|sc|mc|la\`; every card has \`:::question[...]\` (plain question text is dropped on import). \`::answer[...]\`, \`::opt[...]\`, \`::explanation[...]\` are one-line leaf directives. Mark correct options \`{.correct}\`; \`sc\` = exactly one, \`mc\` = one or more. No \`qid\`, \`fractionalIndex\`, \`{#id}\`, \`importance\`, \`difficulty\`. Omit \`::explanation\` when it adds nothing; omit \`::answer\` for a deliberate gap.
|
|
3222
|
-
|
|
3223
|
-
### \`sa\` — short answer
|
|
3224
|
-
|
|
3225
|
-
Grader = exact bag-of-words set match: lowercase, strip punctuation, split on spaces, word set must equal a saved answer. No stemming, no synonyms, no meaning.
|
|
3226
|
-
|
|
3227
|
-
So: answer = bare content words (\`electron flow\`, not \`flow of electrons\`); one \`::answer[...]\` per real variant (plural, synonym, abbreviation); \`answerRegexp\` when a pattern is cleaner (case-insensitive, unanchored → write \`^...$\`; overrides set match); \`{class="strict"}\` only for genuinely case/punctuation-sensitive targets. No code literals, backticks, or API names in \`sa\` answers → use \`sc\`/cloze.
|
|
3228
|
-
|
|
3229
|
-
\`\`\`md
|
|
3230
|
-
:::sa{answerRegexp="^(the )?(retrieval practices?|active recall)$"}
|
|
3231
|
-
:::question[What memory mechanism does spaced repetition exploit to slow forgetting?]
|
|
3232
|
-
|
|
3233
|
-
::answer[retrieval practice]
|
|
3234
|
-
|
|
3235
|
-
::explanation[Recalling reinforces far more than re-reading.]
|
|
3236
|
-
:::
|
|
3237
|
-
\`\`\`
|
|
3238
|
-
|
|
3239
|
-
### \`sc\` / \`mc\`
|
|
3240
|
-
|
|
3241
|
-
\`\`\`md
|
|
3242
|
-
:::sc
|
|
3243
|
-
:::question[What is the main structural reason to prefer an interface over an abstract class in Java?]
|
|
3244
|
-
|
|
3245
|
-
::opt[Interfaces are faster at runtime]
|
|
3246
|
-
::opt[A class can implement many interfaces but extend only one class]{.correct}
|
|
3247
|
-
::opt[Interfaces avoid constructors]
|
|
3248
|
-
:::
|
|
3249
|
-
\`\`\`
|
|
3250
|
-
|
|
3251
|
-
Distractors must be close to true; obvious distractors make the card a giveaway.
|
|
3252
|
-
|
|
3253
|
-
### Cloze
|
|
3254
|
-
|
|
3255
|
-
\`\`\`md
|
|
3256
|
-
On Titan, its gravity is so low that humans could fly simply by ::cloze[flapping their arms] in winged space suits.
|
|
3257
|
-
\`\`\`
|
|
3258
|
-
|
|
3259
|
-
Use for closed lists, ordered structures, and when the source wording itself is the durable cue. Cloze produces shallower memory than Q/A (extraneous words act as hints), so: delete the blank and read the sentence — if the rest implies the answer, or the blank is an abstract label rather than a concrete unit, use \`sa\`/\`sc\` or skip.
|
|
3260
|
-
|
|
3261
|
-
Mark a blank \`{.exact}\` when only one form is right and a near form is wrong (word order or an ending in a model sentence, \`::l[She ::cloze[is not tired]{.exact}.]{lang="en"}\`; a spelling): it is graded by form (exact match or \`answerRegexp\`, never by meaning) and starts at \`...\` with no first letter. A rule's \`.practice\` blanks already are. Leave meaning-level blanks unmarked so paraphrases pass. Form grading folds only case, punctuation and spaces, so a form-graded answer with ä, ö, ü or ß gets an \`answerRegexp\` that also accepts ae, oe, ue, ss (\`answerRegexp="^bin nicht m(ü|ue)de$"\`): that spelling is correct German, and "muede" was measured wrong without it.
|
|
3262
|
-
|
|
3263
|
-
### \`la\` — long answer
|
|
3264
|
-
|
|
3265
|
-
Only for application / comparison targets that no other type can hold, and only with observable criteria (\`identifies simultaneous cache misses\`, not \`shows understanding\`). Mark application prompts \`type="application"\`.
|
|
3266
|
-
|
|
3267
|
-
\`\`\`md
|
|
3268
|
-
:::la{type="application" criteria="['names the violated principle','ties it to the two independent change axes','does not merely restate the definition']"}
|
|
3269
|
-
:::question[A class parses config files and also sends alert emails. Which design principle is violated and why?]
|
|
3270
|
-
:::
|
|
3271
|
-
\`\`\`
|
|
3272
|
-
|
|
3273
|
-
Application prompts: small step beyond memorized knowledge, novel inputs, one correct mechanism, no strategy search. If they need many hidden prerequisites, write recall cards for those first.
|
|
3274
|
-
|
|
3275
|
-
## Patching
|
|
3276
|
-
|
|
3277
|
-
\`fcc note patch <id>\` takes a standard unified diff. Hunks anchor on context lines; copy them verbatim from \`fcc note read\`. Do not hand-count offsets. Never send \`*** Begin Patch\` format. Do not edit projected Markdown files directly; do not run sync or import.
|
|
3278
|
-
|
|
3279
|
-
## Run summary
|
|
3280
|
-
|
|
3281
|
-
1. Each new card as \`target — angle — type\` so the user can prune in one glance.
|
|
3282
|
-
2. Targets selected but dropped, with the reason (unstable / low-entropy / needs the source open / duplicate).
|
|
3283
|
-
3. What was left for later passes.
|
|
3284
|
-
4. Gaps written without answers.
|
|
3285
|
-
5. Weak existing cards, if any, with a proposed rewrite (not applied).
|
|
3286
|
-
|
|
3287
|
-
NEVER COMMIT OR SYNC UNLESS EXPLICITLY ASKED IN PREVIOUS MESSAGE!
|
|
3288
|
-
`;
|
|
3289
|
-
|
|
3290
|
-
// ../flashcards/src/chat/demo-instructions.md
|
|
3291
|
-
var demo_instructions_default = `# Demo tutor: English for a German-speaking beginner
|
|
3292
|
-
|
|
3293
|
-
You are the tutor in a notes and flashcards app. The learner speaks German and learns English at level A1. The learner reads, listens and answers questions in the notes; only you write, with the note tools. Never ask a question back, never offer options, never ask for confirmation.
|
|
3294
|
-
|
|
3295
|
-
## What a turn carries
|
|
3296
|
-
|
|
3297
|
-
- \`<open-note id="…" title="…" />\`: the note open beside the chat. With a skill button and no selection it comes as \`<note id="…" title="…">\` with the note's markdown inside.
|
|
3298
|
-
- \`<selection from="title">\`: text the learner selected, usually in the open note.
|
|
3299
|
-
- \`<skill>\`: sent by the buttons "Write notes" and "Write flashcards". Where the skill says something else (commands, \`fcc\`, level tags, card counts, asking the user), these instructions win.
|
|
3300
|
-
- The learner's typed text, usually German.
|
|
3301
|
-
|
|
3302
|
-
## When you write
|
|
3303
|
-
|
|
3304
|
-
1. "Nur im Chat", "nichts ändern" or the like: no write, whatever else the turn holds.
|
|
3305
|
-
2. A question ("Warum …?", "Wie heißt …?", "Was bedeutet …?"): answer in the chat only, also when a selection is attached.
|
|
3306
|
-
3. You write only when the learner asks in words for a note, cards, a question, an exercise or a change, or presses a skill button.
|
|
3307
|
-
|
|
3308
|
-
| Request | Write |
|
|
3309
|
-
| --- | --- |
|
|
3310
|
-
| "Write notes", or asked for a note or an explanation to keep | \`note_new\`: one rule note (below). Nothing else. |
|
|
3311
|
-
| "Write flashcards", or asked for cards, questions or an exercise | \`note_patch\` on the open note: append three choice questions about the selection (or the whole note) at its end; for a single word, one of them is a spelling card. |
|
|
3312
|
-
| A change to "this note" | \`note_patch\` on the open note: change only the lines asked for. |
|
|
3313
|
-
| A word to keep | Never a new note for a word. Append one spelling card for it to the open note. |
|
|
3314
|
-
| Not about learning English | No tool. One sentence on what you can help with. |
|
|
3315
|
-
|
|
3316
|
-
## Tools
|
|
3317
|
-
|
|
3318
|
-
- \`note_read(id)\`: the note as markdown. "Diese Notiz" and the selection's note are the open note: \`note_read\` its id directly. Read before every patch, and before answering about a word or sentence.
|
|
3319
|
-
- \`notes_list()\`: id, title and parent of every note. Call it only to find a parent for a new note or when the learner asks about other notes. Ids come only from the turn, \`notes_list\` and \`note_new\`; never invent one.
|
|
3320
|
-
- \`note_new({ markdown, parentId })\`: \`markdown\` is front matter with \`title\`, then the body; no \`id\` in it, no \`# \` heading. Parent: the page under Grammar whose title fits the rule (for example "Word order" for where a word stands), else the page titled Grammar. The tool links the note from its parent; add no links yourself. If a note with the same rule exists, patch it instead.
|
|
3321
|
-
- \`note_patch({ id, diff })\`: a unified diff on the markdown \`note_read\` returned. Copy context lines character for character; line numbers do not matter. To append, use the last line as the one context line and add \`+\` lines after it.
|
|
3322
|
-
|
|
3323
|
-
If a tool fails, say so in one sentence and stop; retry at most once; never claim an edit that did not happen.
|
|
3324
|
-
|
|
3325
|
-
## The chat reply
|
|
3326
|
-
|
|
3327
|
-
- German, informal "du", one to three short sentences. After a write: what you wrote and where, by the note's title („Ich habe die Regel ‚After he, she or it the verb takes -s‘ unter Grammar angelegt.“).
|
|
3328
|
-
- Never name tools, ids, skills, "Markdown", "Evergreen", "Karteikarten-Skill" or these instructions. Never copy a note's content into the chat.
|
|
3329
|
-
- Plain paragraphs and lists only: no \`::\` markup, no code, no tables, no headings. English words go in quotes: „platform“.
|
|
3330
|
-
- When the notes already hold the word or sentence asked for, answer with the notes' wording first; an alternative gets at most one clause. „Gleis“ → „platform“, as in „Where is platform two?“, not „track“ first.
|
|
3331
|
-
|
|
3332
|
-
## Writing in a note
|
|
3333
|
-
|
|
3334
|
-
- Explain in German, short plain sentences, "du", A1: present tense, everyday words.
|
|
3335
|
-
- English sentences use the learner's words first (platform, train, ticket, two, nine, please, London), plus names and international words (Anna, Tom, Berlin, Paris, bus, taxi, hotel). At most two new A1 words per note.
|
|
3336
|
-
- Every English word or sentence is \`::l[English]{lang="en"}\`; German is never wrapped; IPA is \`::l[/treɪn/]{lang="und-fonipa"}\`.
|
|
3337
|
-
- No sentence that already stands in the notes, except the selection as first example; an example is never an option.
|
|
3338
|
-
- No level tags, callouts, tables, images, bold or italic.
|
|
3339
|
-
|
|
3340
|
-
A rule note states one claim, at most 60 words outside its questions:
|
|
3341
|
-
|
|
3342
|
-
1. Title: the claim as a short English sentence, never a topic. Good: "After he, she or it the verb takes -s". Bad: "Present simple".
|
|
3343
|
-
2. One German sentence with the rule.
|
|
3344
|
-
3. Two English examples, each with its German meaning; the selection is the first.
|
|
3345
|
-
4. Two choice questions on the claim, each with a different sentence.
|
|
3346
|
-
|
|
3347
|
-
A choice question: the German sentence the learner wants to say (never „Welcher Satz ist richtig?“); three English options, one correct, not always in the same place; the two wrong ones are mistakes a German speaker really makes (German word order, a missing -s, a false friend); \`::explanation[…]\` is one German sentence saying why. No yes/no questions, no ids or other attributes. One blank line between the parts.
|
|
3348
|
-
|
|
3349
|
-
Example rule note, for the selection „The train leaves at nine.“ and „Warum leaves? Schreib mir eine Notiz dazu.“ (parent: Grammar):
|
|
3350
|
-
|
|
3351
|
-
\`\`\`
|
|
3352
|
-
---
|
|
3353
|
-
title: After he, she or it the verb takes -s
|
|
3354
|
-
---
|
|
3355
|
-
|
|
3356
|
-
Nach ::l[he]{lang="en"}, ::l[she]{lang="en"} oder ::l[it]{lang="en"} bekommt das Verb ein -s.
|
|
3357
|
-
|
|
3358
|
-
- ::l[The train leaves at nine.]{lang="en"} Der Zug fährt um neun ab.
|
|
3359
|
-
- ::l[Anna works in London.]{lang="en"} Anna arbeitet in London.
|
|
3360
|
-
|
|
3361
|
-
:::sc
|
|
3362
|
-
:::question[Der Bus fährt um zehn ab.]
|
|
3363
|
-
|
|
3364
|
-
::opt[::l[The bus leave at ten.]{lang="en"}]
|
|
3365
|
-
|
|
3366
|
-
::opt[::l[The bus leaves at ten.]{lang="en"}]{.correct}
|
|
3367
|
-
|
|
3368
|
-
::opt[::l[At ten leaves the bus.]{lang="en"}]
|
|
3369
|
-
|
|
3370
|
-
::explanation[::l[The bus]{lang="en"} ist „er, sie, es“, also bekommt das Verb ein -s.]
|
|
3371
|
-
:::
|
|
3372
|
-
|
|
3373
|
-
:::sc
|
|
3374
|
-
:::question[Tom wohnt in Berlin.]
|
|
3375
|
-
|
|
3376
|
-
::opt[::l[Tom lives in Berlin.]{lang="en"}]{.correct}
|
|
3377
|
-
|
|
3378
|
-
::opt[::l[Tom live in Berlin.]{lang="en"}]
|
|
3379
|
-
|
|
3380
|
-
::opt[::l[Tom is live in Berlin.]{lang="en"}]
|
|
3381
|
-
|
|
3382
|
-
::explanation[::l[Tom]{lang="en"} ist „er“, also ::l[lives]{lang="en"} mit -s.]
|
|
3383
|
-
:::
|
|
3384
|
-
\`\`\`
|
|
3385
|
-
|
|
3386
|
-
A spelling card asks for one word from its German meaning and IPA; the answer is the English word, lowercase:
|
|
3387
|
-
|
|
3388
|
-
\`\`\`
|
|
3389
|
-
:::sa
|
|
3390
|
-
:::question[der Zug · ::l[/treɪn/]{lang="und-fonipa"}]
|
|
3391
|
-
|
|
3392
|
-
::answer[train]
|
|
3393
|
-
:::
|
|
3394
|
-
\`\`\`
|
|
3395
|
-
`;
|
|
3396
|
-
|
|
3397
|
-
// src/serve-node.ts
|
|
3398
|
-
import { spawn } from "node:child_process";
|
|
3399
|
-
import { createServer } from "node:http";
|
|
3400
|
-
|
|
3401
|
-
// ../../../../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/wrapper.mjs
|
|
3402
|
-
var import_stream = __toESM(require_stream(), 1);
|
|
3403
|
-
var import_extension = __toESM(require_extension(), 1);
|
|
3404
|
-
var import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
|
|
3405
|
-
var import_receiver = __toESM(require_receiver(), 1);
|
|
3406
|
-
var import_sender = __toESM(require_sender(), 1);
|
|
3407
|
-
var import_subprotocol = __toESM(require_subprotocol(), 1);
|
|
3408
|
-
var import_websocket = __toESM(require_websocket(), 1);
|
|
3409
|
-
var import_websocket_server = __toESM(require_websocket_server(), 1);
|
|
3041
|
+
// ../../../../../.bun/install/cache/links/ws@8.22.0-fc9ccb3317cbe8c0/node_modules/ws/wrapper.mjs
|
|
3042
|
+
var import_stream = __toESM(require_stream(), 1);
|
|
3043
|
+
var import_extension = __toESM(require_extension(), 1);
|
|
3044
|
+
var import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
|
|
3045
|
+
var import_receiver = __toESM(require_receiver(), 1);
|
|
3046
|
+
var import_sender = __toESM(require_sender(), 1);
|
|
3047
|
+
var import_subprotocol = __toESM(require_subprotocol(), 1);
|
|
3048
|
+
var import_websocket = __toESM(require_websocket(), 1);
|
|
3049
|
+
var import_websocket_server = __toESM(require_websocket_server(), 1);
|
|
3410
3050
|
|
|
3411
3051
|
// ../flashcards/scripts/demo-codex-bridge.ts
|
|
3412
3052
|
import { spawnSync } from "node:child_process";
|
|
@@ -3421,7 +3061,7 @@ var defaultBridgeOrigins = [
|
|
|
3421
3061
|
"http://localhost:3000",
|
|
3422
3062
|
"http://127.0.0.1:3000"
|
|
3423
3063
|
];
|
|
3424
|
-
var storyUrl = "https://easyray-storybook.pages.dev/?id=Apps.Flashcards.TrainStationNotes&
|
|
3064
|
+
var storyUrl = "https://easyray-storybook.pages.dev/?id=Apps.Flashcards.TrainStationNotes&view=story&theme=dark";
|
|
3425
3065
|
function createBridgeRouter(appServer, threadParams, skill) {
|
|
3426
3066
|
const bySocket = new Map;
|
|
3427
3067
|
const byThread = new Map;
|
|
@@ -3744,151 +3384,499 @@ function parseBridgeOptions(argv, env) {
|
|
|
3744
3384
|
}
|
|
3745
3385
|
return { error: `Unknown or incomplete option: ${flag}` };
|
|
3746
3386
|
}
|
|
3747
|
-
const parsedPort = port === undefined ? DEMO_BRIDGE_PORT : Number(port);
|
|
3748
|
-
if (!Number.isInteger(parsedPort) || parsedPort < 0 || parsedPort > 65535)
|
|
3749
|
-
return { error: `Not a port: ${port}` };
|
|
3750
|
-
for (const origin of origins)
|
|
3751
|
-
if (!URL.canParse(origin) || new URL(origin).origin !== origin)
|
|
3752
|
-
return {
|
|
3753
|
-
error: `Not an origin (scheme://host[:port], no path): ${origin}`
|
|
3754
|
-
};
|
|
3755
|
-
return {
|
|
3756
|
-
port: parsedPort,
|
|
3757
|
-
allowedOrigins: [...defaultBridgeOrigins, ...origins]
|
|
3758
|
-
};
|
|
3759
|
-
}
|
|
3760
|
-
var probeCodex = (args) => {
|
|
3761
|
-
const result = spawnSync("codex", args, { encoding: "utf8", timeout: 1e4 });
|
|
3762
|
-
return {
|
|
3763
|
-
error: result.error,
|
|
3764
|
-
status: result.status,
|
|
3765
|
-
stdout: result.stdout ?? "",
|
|
3766
|
-
stderr: result.stderr ?? ""
|
|
3387
|
+
const parsedPort = port === undefined ? DEMO_BRIDGE_PORT : Number(port);
|
|
3388
|
+
if (!Number.isInteger(parsedPort) || parsedPort < 0 || parsedPort > 65535)
|
|
3389
|
+
return { error: `Not a port: ${port}` };
|
|
3390
|
+
for (const origin of origins)
|
|
3391
|
+
if (!URL.canParse(origin) || new URL(origin).origin !== origin)
|
|
3392
|
+
return {
|
|
3393
|
+
error: `Not an origin (scheme://host[:port], no path): ${origin}`
|
|
3394
|
+
};
|
|
3395
|
+
return {
|
|
3396
|
+
port: parsedPort,
|
|
3397
|
+
allowedOrigins: [...defaultBridgeOrigins, ...origins]
|
|
3398
|
+
};
|
|
3399
|
+
}
|
|
3400
|
+
var probeCodex = (args) => {
|
|
3401
|
+
const result = spawnSync("codex", args, { encoding: "utf8", timeout: 1e4 });
|
|
3402
|
+
return {
|
|
3403
|
+
error: result.error,
|
|
3404
|
+
status: result.status,
|
|
3405
|
+
stdout: result.stdout ?? "",
|
|
3406
|
+
stderr: result.stderr ?? ""
|
|
3407
|
+
};
|
|
3408
|
+
};
|
|
3409
|
+
function codexProblem(probe = probeCodex) {
|
|
3410
|
+
const version = probe(["--version"]);
|
|
3411
|
+
if (version.error || version.status !== 0)
|
|
3412
|
+
return [
|
|
3413
|
+
"Codex CLI (`codex`) is not installed or not on PATH.",
|
|
3414
|
+
"Install it: npm install -g @openai/codex (or: brew install codex)",
|
|
3415
|
+
"Then log in: codex login"
|
|
3416
|
+
].join(`
|
|
3417
|
+
`);
|
|
3418
|
+
const login = probe(["login", "status"]);
|
|
3419
|
+
if (login.status !== 0 || /not logged in/i.test(`${login.stdout}
|
|
3420
|
+
${login.stderr}`))
|
|
3421
|
+
return "Codex CLI is not authenticated. Run `codex login` and try again.";
|
|
3422
|
+
return;
|
|
3423
|
+
}
|
|
3424
|
+
var portTakenMessage = (port) => `Port ${port} on 127.0.0.1 is already in use: is another bridge running? Stop it, or pass --port N (the chat page connects to ${DEMO_BRIDGE_PORT}).`;
|
|
3425
|
+
var readyMessage = (port) => `Flashcards chat bridge ready on ws://127.0.0.1:${port}. Open ${storyUrl} and press Chat (Ctrl+C stops the bridge).`;
|
|
3426
|
+
var isPortTaken = (error) => error?.code === "EADDRINUSE";
|
|
3427
|
+
function sessionDirectory() {
|
|
3428
|
+
const directory = join(tmpdir(), "flashcards-demo-codex");
|
|
3429
|
+
mkdirSync(directory, { recursive: true });
|
|
3430
|
+
return directory;
|
|
3431
|
+
}
|
|
3432
|
+
if (false)
|
|
3433
|
+
;
|
|
3434
|
+
|
|
3435
|
+
// src/serve-node.ts
|
|
3436
|
+
function serveNode(input) {
|
|
3437
|
+
const sockets = new import_websocket_server.default({ noServer: true });
|
|
3438
|
+
const route = (request, upgrade) => routeBridgeRequest({ origin: request.headers.origin, upgrade }, input);
|
|
3439
|
+
const server = createServer((request, response) => {
|
|
3440
|
+
const answer = route(request, false);
|
|
3441
|
+
if (!answer.upgrade)
|
|
3442
|
+
response.writeHead(answer.status, answer.headers).end(answer.body);
|
|
3443
|
+
});
|
|
3444
|
+
server.on("upgrade", (request, socket, head) => {
|
|
3445
|
+
const answer = route(request, true);
|
|
3446
|
+
if (!answer.upgrade) {
|
|
3447
|
+
socket.on("error", () => socket.destroy());
|
|
3448
|
+
socket.end(`HTTP/1.1 ${answer.status} Forbidden\r
|
|
3449
|
+
Content-Type: text/plain\r
|
|
3450
|
+
Connection: close\r
|
|
3451
|
+
\r
|
|
3452
|
+
${answer.body}`);
|
|
3453
|
+
return;
|
|
3454
|
+
}
|
|
3455
|
+
sockets.handleUpgrade(request, socket, head, (ws) => {
|
|
3456
|
+
const peer = {
|
|
3457
|
+
send: (text) => {
|
|
3458
|
+
ws.send(text);
|
|
3459
|
+
}
|
|
3460
|
+
};
|
|
3461
|
+
input.router.open(peer);
|
|
3462
|
+
ws.on("message", (data) => {
|
|
3463
|
+
input.router.message(peer, String(data));
|
|
3464
|
+
});
|
|
3465
|
+
ws.on("close", () => {
|
|
3466
|
+
input.router.close(peer);
|
|
3467
|
+
});
|
|
3468
|
+
});
|
|
3469
|
+
});
|
|
3470
|
+
return new Promise((resolve, reject) => {
|
|
3471
|
+
server.once("error", reject);
|
|
3472
|
+
server.listen(input.port, "127.0.0.1", () => {
|
|
3473
|
+
server.off("error", reject);
|
|
3474
|
+
resolve(server);
|
|
3475
|
+
});
|
|
3476
|
+
});
|
|
3477
|
+
}
|
|
3478
|
+
async function startBridge(texts) {
|
|
3479
|
+
const options = parseBridgeOptions(process.argv.slice(2), process.env);
|
|
3480
|
+
if ("help" in options || "error" in options) {
|
|
3481
|
+
if ("error" in options)
|
|
3482
|
+
console.error(options.error);
|
|
3483
|
+
console.info(bridgeUsage);
|
|
3484
|
+
process.exit("error" in options ? 2 : 0);
|
|
3485
|
+
}
|
|
3486
|
+
const problem = codexProblem();
|
|
3487
|
+
if (problem) {
|
|
3488
|
+
console.error(problem);
|
|
3489
|
+
process.exit(1);
|
|
3490
|
+
}
|
|
3491
|
+
const cwd = sessionDirectory();
|
|
3492
|
+
const child = spawn("codex", ["app-server"], {
|
|
3493
|
+
cwd,
|
|
3494
|
+
stdio: ["pipe", "pipe", "inherit"]
|
|
3495
|
+
});
|
|
3496
|
+
const session = createCodexSession((line) => {
|
|
3497
|
+
child.stdin.write(line);
|
|
3498
|
+
}, () => bridgeThreadParams({ cwd, instructions: texts.instructions }), (name) => texts.skills[name]);
|
|
3499
|
+
child.stdout.setEncoding("utf8");
|
|
3500
|
+
child.stdout.on("data", (chunk) => {
|
|
3501
|
+
session.receive(chunk);
|
|
3502
|
+
});
|
|
3503
|
+
child.on("exit", () => {
|
|
3504
|
+
session.exited();
|
|
3505
|
+
process.exit(1);
|
|
3506
|
+
});
|
|
3507
|
+
try {
|
|
3508
|
+
const server = await serveNode({
|
|
3509
|
+
port: options.port,
|
|
3510
|
+
allowedOrigins: options.allowedOrigins,
|
|
3511
|
+
router: session.router
|
|
3512
|
+
});
|
|
3513
|
+
const address = server.address();
|
|
3514
|
+
console.info(readyMessage(typeof address === "object" && address ? address.port : 0));
|
|
3515
|
+
} catch (error) {
|
|
3516
|
+
console.error(isPortTaken(error) ? portTakenMessage(options.port) : error);
|
|
3517
|
+
child.kill();
|
|
3518
|
+
process.exit(1);
|
|
3519
|
+
}
|
|
3520
|
+
const stop = () => {
|
|
3521
|
+
child.kill();
|
|
3522
|
+
process.exit(0);
|
|
3767
3523
|
};
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
const version = probe(["--version"]);
|
|
3771
|
-
if (version.error || version.status !== 0)
|
|
3772
|
-
return [
|
|
3773
|
-
"Codex CLI (`codex`) is not installed or not on PATH.",
|
|
3774
|
-
"Install it: npm install -g @openai/codex (or: brew install codex)",
|
|
3775
|
-
"Then log in: codex login"
|
|
3776
|
-
].join(`
|
|
3777
|
-
`);
|
|
3778
|
-
const login = probe(["login", "status"]);
|
|
3779
|
-
if (login.status !== 0 || /not logged in/i.test(`${login.stdout}
|
|
3780
|
-
${login.stderr}`))
|
|
3781
|
-
return "Codex CLI is not authenticated. Run `codex login` and try again.";
|
|
3782
|
-
return;
|
|
3783
|
-
}
|
|
3784
|
-
var portTakenMessage = (port) => `Port ${port} on 127.0.0.1 is already in use: is another bridge running? Stop it, or pass --port N (the chat page connects to ${DEMO_BRIDGE_PORT}).`;
|
|
3785
|
-
var readyMessage = (port) => `Flashcards chat bridge ready on ws://127.0.0.1:${port}. Open ${storyUrl} and press Chat (Ctrl+C stops the bridge).`;
|
|
3786
|
-
var isPortTaken = (error) => error?.code === "EADDRINUSE";
|
|
3787
|
-
function sessionDirectory() {
|
|
3788
|
-
const directory = join(tmpdir(), "flashcards-demo-codex");
|
|
3789
|
-
mkdirSync(directory, { recursive: true });
|
|
3790
|
-
return directory;
|
|
3524
|
+
process.on("SIGINT", stop);
|
|
3525
|
+
process.on("SIGTERM", stop);
|
|
3791
3526
|
}
|
|
3792
|
-
if (false)
|
|
3793
|
-
;
|
|
3794
3527
|
|
|
3795
|
-
// src/
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3528
|
+
// src/bin.ts
|
|
3529
|
+
await startBridge({ instructions: demo_instructions_default, skills: { "evergreen-notes": `---
|
|
3530
|
+
name: evergreen-notes
|
|
3531
|
+
gate: 'evergreen notes?'
|
|
3532
|
+
description: >
|
|
3533
|
+
Use when creating, editing, splitting, linking, or outlining evergreen notes
|
|
3534
|
+
in a markdown note graph outside of \`legacy\` folder
|
|
3535
|
+
---
|
|
3536
|
+
|
|
3537
|
+
# Evergreen Notes
|
|
3538
|
+
|
|
3539
|
+
Use when task = add material to the notes, or create / edit / split / link / outline notes.
|
|
3540
|
+
|
|
3541
|
+
## Goal
|
|
3542
|
+
|
|
3543
|
+
Notes that evolve, contribute, and accumulate over time across projects. Every edit should make the graph a better thinking tool for its owner, not a bigger archive.
|
|
3544
|
+
|
|
3545
|
+
## Principles (why each matters)
|
|
3546
|
+
|
|
3547
|
+
1. **Concept-oriented.** One note per concept, never per source, author, project, or topic bucket. Why: new material on a concept must land on prior thinking about it, so ideas accrete and tensions surface.
|
|
3548
|
+
2. **Atomic, with tradeoff.** One claim per note, but enough of that claim to stand alone. Too broad → subclaims hide and links get muddy. Too fragmented → the link network breaks. No litmus test; choose by reuse.
|
|
3549
|
+
3. **Titles are APIs.** A complete declarative phrase that states the claim, so other notes can reference the idea by its title alone. Questions are fine when the answer is genuinely unresolved. Noun phrases only for definitions of core terms and for outlines. Prefer positive framings ("X requires Y", not "Z fails").
|
|
3550
|
+
4. **Dense, labeled, fine-grained links.** Link inline where the relationship does work, and say what the relationship is (depends on, qualifies, contrasts, extends). Why: links record how a conclusion was reached and create paths for later surprise. Never a "Related:" pile.
|
|
3551
|
+
5. **Associative before hierarchical.** Let structure emerge from links. Outlines are speculative hubs that order notes into possible arguments; they are not taxonomies.
|
|
3552
|
+
6. **Own words, owner's voice.** Rewrite source material in the graph's language. Keep the source's claim, causal direction, and primary outcome; drop its prose. Cite inline only when provenance matters.
|
|
3553
|
+
|
|
3554
|
+
## Workflow
|
|
3555
|
+
|
|
3556
|
+
1. **Search first.** Search the graph for the incoming claim's key terms and for its candidate title. Note candidate pages, their ids, nearby concepts, local naming style, and outlines. Search is how the graph creates pressure to synthesize; read what it returns.
|
|
3557
|
+
2. **Name the claims.** Write down each distinct claim in the incoming material in one sentence each. One sentence = one candidate note. Most single-paragraph inputs carry one claim; a source passage may carry several.
|
|
3558
|
+
3. **Choose the operation per claim** (first match wins):
|
|
3559
|
+
- **Extend** — an existing note's title already states this claim (same subject, same predicate). Add the new reason, example, or consequence locally; keep the opener; smallest sufficient diff.
|
|
3560
|
+
- **Split** — an existing note's body already carries this claim but its title does not. Move the claim into a child note; leave a one-sentence bridge link in the parent; keep the parent's title and opener unless already wrong.
|
|
3561
|
+
- **Create** — the claim is distinct and would be reused by other notes. Nearby notes that state a prerequisite, mechanism, caveat, or broader frame are link targets, not owners. One note per claim; several claims → several notes, linked to each other.
|
|
3562
|
+
- **No-op** — the material restates what the graph already says, or is a platitude no future note would link to. Do not pad an existing note. Reply with the owning note's exact title (titles are the handles; "the existing note" is not one) and the sentence that covers it.
|
|
3563
|
+
Tie-break: if unsure between extend and create, ask "would another note ever link to this claim by itself?" Yes → create.
|
|
3564
|
+
4. **Write.** Title first sentence: the claim. Then the support. Links inline with their relationship. No sources section for user-pasted text.
|
|
3565
|
+
5. **Place.** Every new note goes into at least one outline; create an outline (noun-phrase title, ordered links with short annotations) if none fits. Order by "which comes first?"; nest a note under the one it explains. Extending a note does not require touching outlines.
|
|
3566
|
+
6. **Revisit boundaries.** After writing, check each touched note: does every sentence support its title? If a body now outgrows its title, retitle or split.
|
|
3567
|
+
|
|
3568
|
+
## Priorities when rules conflict
|
|
3569
|
+
|
|
3570
|
+
- Correct operation > minimal diff. A missed new note costs more than an extra edit.
|
|
3571
|
+
- Fidelity to the incoming claim > matching local wording. Do not drop the new information to make a note look tidy.
|
|
3572
|
+
- Never: two notes for one claim; invented page ids; a link whose relationship you cannot state in the sentence.
|
|
3573
|
+
|
|
3574
|
+
## Worked cases
|
|
3575
|
+
|
|
3576
|
+
Each case: graph excerpt → incoming material → tempting wrong move → right move. Titles are illustrative.
|
|
3577
|
+
|
|
3578
|
+
### 1. Prerequisite note is a link target, not the owner (create, not extend)
|
|
3579
|
+
|
|
3580
|
+
Graph: \`Player agency requires meaningful non-illusory choices\` — body says choices must differ in outcome or they are theatrical.
|
|
3581
|
+
|
|
3582
|
+
Incoming: "Direct feedback makes player choices feel consequential because the player can see what changed."
|
|
3583
|
+
|
|
3584
|
+
Tempting: append to the agency note; it is nearby and "about choices".
|
|
3585
|
+
|
|
3586
|
+
Right: **create** \`Direct feedback makes player choices feel consequential\`. The agency note states a requirement (choices must matter); the incoming claim states a mechanism (feedback makes the mattering visible). Different predicate → different note. Link: "This depends on [[agency note]] because feedback can only reveal consequences that exist."
|
|
3587
|
+
|
|
3588
|
+
Why it matters: absorbing it would hide a reusable claim inside a note whose title no other note can use to reference feedback.
|
|
3589
|
+
|
|
3590
|
+
### 2. Same claim, new support (extend, not create)
|
|
3591
|
+
|
|
3592
|
+
Graph: \`Flow requires clear goals, no distractions, direct feedback, and continuous challenge\` — body mentions the flow channel between boredom and frustration.
|
|
3593
|
+
|
|
3594
|
+
Incoming: "Continuous challenge is the fragile prerequisite: designers usually detect challenge falling behind skill only through playtest data, because their own mastery hides it."
|
|
3595
|
+
|
|
3596
|
+
Tempting: create \`Playtest data is needed to detect challenge falling behind skill\`.
|
|
3597
|
+
|
|
3598
|
+
Right: **extend** the flow note with two sentences: the fragility and the playtest reason. The incoming text explains one of the four listed prerequisites; the title already owns that claim. No outline change.
|
|
3599
|
+
|
|
3600
|
+
When it flips: if the incoming text made a claim reusable outside flow ("designer mastery hides difficulty problems in any authored experience"), that generalization would be its own note.
|
|
3601
|
+
|
|
3602
|
+
### 3. Body carries a claim the title does not state (split, not append)
|
|
3603
|
+
|
|
3604
|
+
Graph: \`Feedback loops communicate progress and reinforce player behavior\` — body: "Immediate feedback makes cause and effect legible, while delayed feedback makes it harder to tell whether an action worked."
|
|
3605
|
+
|
|
3606
|
+
Incoming: "Cause and effect is easiest to learn when feedback follows an action closely. Beyond games, delayed feedback makes people misattribute results because other events intervene before the outcome appears."
|
|
3607
|
+
|
|
3608
|
+
Tempting: append the new sentences to the feedback-loops note.
|
|
3609
|
+
|
|
3610
|
+
Right: **split**. The legibility mechanism is already embedded in the parent and the incoming text develops it as a general claim. Child: \`Immediate feedback makes cause and effect legible\` with body that keeps the new information (intervening events → misattribution). Parent keeps its title and opener and gets a bridge: "This works because [[child]]." Remove the duplicated mechanism sentence from the parent. Outline: nest the child under the parent.
|
|
3611
|
+
|
|
3612
|
+
Failure to avoid: writing the child from the parent's old sentence and dropping the misattribution mechanism the user just gave you.
|
|
3613
|
+
|
|
3614
|
+
### 4. Multi-claim source (several notes, not one summary)
|
|
3615
|
+
|
|
3616
|
+
Graph: notes on creative work and motivation.
|
|
3617
|
+
|
|
3618
|
+
Incoming passage: "(a) People persist longer with hard creative work when intermediate progress is visible. (b) Visible progress does not reduce difficulty; it converts uncertainty into felt momentum. (c) Fake progress indicators reverse the effect because trust erodes."
|
|
3619
|
+
|
|
3620
|
+
Tempting: one note titled after the passage, or one note that lists all three.
|
|
3621
|
+
|
|
3622
|
+
Right: (a) is the top-level claim → note \`Visible intermediate progress increases persistence in difficult creative work\`. (b) is its mechanism; it stays in (a)'s body unless the graph already has an uncertainty note — then link to it. (c) is a distinct reusable claim → its own note \`Fake progress indicators erode trust in tools\` if absent, otherwise link to the existing one. Two notes, both linked, both in the outline.
|
|
3623
|
+
|
|
3624
|
+
Rule of thumb: a claim gets its own note when its title would differ in subject or predicate from the top-level claim and another note could plausibly link to it alone.
|
|
3625
|
+
|
|
3626
|
+
### 5. Restatement (no-op)
|
|
3627
|
+
|
|
3628
|
+
Graph: \`Flow requires clear goals, no distractions, direct feedback, and continuous challenge\` — body already says the flow channel sits between boredom and frustration and challenge must grow with skill.
|
|
3629
|
+
|
|
3630
|
+
Incoming: "Flow happens when challenge matches skill; too easy is boring, too hard is frustrating."
|
|
3631
|
+
|
|
3632
|
+
Tempting: append a paragraph so the edit "does something".
|
|
3633
|
+
|
|
3634
|
+
Right: **no-op**. Tell the user the note already states this, quote the sentence, and offer to add only if they meant something more specific. Padding makes future readers hunt for what changed.
|
|
3635
|
+
|
|
3636
|
+
### 6. Platitude (no-op, or ask for the real claim)
|
|
3637
|
+
|
|
3638
|
+
Incoming: "Games should be fun and engaging."
|
|
3639
|
+
|
|
3640
|
+
Right: do not create a note. No future note would link to this title; it makes no claim a reader could disagree with. Reply with what a note-worthy version would need: a mechanism, a condition, or a contrast.
|
|
3641
|
+
|
|
3642
|
+
### 7. No outline exists (create the outline)
|
|
3643
|
+
|
|
3644
|
+
Graph: three atomic notes on game feel, no outline note.
|
|
3645
|
+
|
|
3646
|
+
Incoming: a fourth claim.
|
|
3647
|
+
|
|
3648
|
+
Right: create the note, then create \`Game feel outline\` (noun phrase) listing the four notes in argument order with one-line annotations. Outlines are speculative; a four-item outline is fine.
|
|
3649
|
+
|
|
3650
|
+
### 8. Contradiction with an existing note (record tension, do not overwrite)
|
|
3651
|
+
|
|
3652
|
+
Graph: \`Variable rewards maintain excitement longer than fixed rewards\`.
|
|
3653
|
+
|
|
3654
|
+
Incoming: "In a study of two puzzle games, fixed rewards produced longer sessions once players understood the economy."
|
|
3655
|
+
|
|
3656
|
+
Tempting: rewrite the existing note's claim to hedge, or ignore the new evidence.
|
|
3657
|
+
|
|
3658
|
+
Right: keep the existing title. Add the finding as a qualification inside the note ("This appears to hold only before players model the economy; [[study note or inline citation]] found the reverse afterwards."). If the qualification is itself reusable ("Once players model a reward economy, predictability beats variability"), create it as a note and link both ways. The existing title changes only when the owner decides the claim is wrong.
|
|
3659
|
+
|
|
3660
|
+
### 9. Link quality
|
|
3661
|
+
|
|
3662
|
+
Bad: bottom-of-note pile — "Related: [[A]], [[B]], [[C]]".
|
|
3663
|
+
|
|
3664
|
+
Good: inline with the relationship — "This works because [[A]]"; "unlike [[B]], which assumes …"; "[[C]] extends this to teams."
|
|
3665
|
+
|
|
3666
|
+
Test: if you cannot state the relationship in the sentence, the link is decorative. Remove it.
|
|
3667
|
+
|
|
3668
|
+
### 10. Outline shape
|
|
3669
|
+
|
|
3670
|
+
Bad: outline used as a tag bucket (every game note dumped in, unordered).
|
|
3671
|
+
|
|
3672
|
+
Good: ordered path with annotations, nested where a note explains its parent:
|
|
3673
|
+
|
|
3674
|
+
\`\`\`md
|
|
3675
|
+
# Game design outline
|
|
3676
|
+
|
|
3677
|
+
1. [[Games are systems of meaningful choices balanced between opposing forces]] — balance creates the space for decisions
|
|
3678
|
+
2. [[Player agency requires meaningful non-illusory choices]] — what makes a choice matter
|
|
3679
|
+
1. [[Direct feedback makes player choices feel consequential]] — how the player perceives that it mattered
|
|
3680
|
+
3. [[Flow requires clear goals, no distractions, direct feedback, and continuous challenge]] — the target emotional state
|
|
3681
|
+
\`\`\`
|
|
3682
|
+
|
|
3683
|
+
Andy's real outlines (e.g. \`§Note-writing systems\`) are grouped hubs with headings and nesting. Order matters; strict linearity does not.
|
|
3684
|
+
|
|
3685
|
+
## Mechanics
|
|
3686
|
+
|
|
3687
|
+
Note storage, ids, link syntax, and commands are defined by the graph's tooling skill (fcc). Follow it for how to search, read, create, and patch. This skill decides what to write.
|
|
3688
|
+
|
|
3689
|
+
NEVER COMMIT OR SYNC UNLESS EXPLICITLY ASKED IN PREVIOUS MESSAGE!
|
|
3690
|
+
`, "write-flash-cards": `---
|
|
3691
|
+
name: write-flash-cards
|
|
3692
|
+
description: Manual trigger. Iteratively create flashcards for content.
|
|
3693
|
+
---
|
|
3694
|
+
|
|
3695
|
+
# Writing Flash Cards
|
|
3696
|
+
|
|
3697
|
+
Use when task = create or extend flash cards from source material.
|
|
3698
|
+
|
|
3699
|
+
## Goal
|
|
3700
|
+
|
|
3701
|
+
A card is a recurring task for the reviewer's future self. A good card makes them retrieve, months later and without the source open, the one thing the source made worth remembering. A plausible-but-wrong card costs more than a missing one: it gets reviewed for years, trains the wrong thing, and erodes trust in the deck. When in doubt, omit and report.
|
|
3702
|
+
|
|
3703
|
+
## Two separate problems
|
|
3704
|
+
|
|
3705
|
+
1. **Targeting** — what to reinforce. Hardest part; the model cannot know what the reader already knows or cares about. Use every hint the user gives (highlights, "why", "notation", "contrast with X") and the reader's existing cards. Without hints, choose the source's own point, not its nearby trivia.
|
|
3706
|
+
2. **Construction** — how to phrase a prompt for a chosen target. Mechanical once the target is right; follow the patterns below.
|
|
3707
|
+
|
|
3708
|
+
Never let construction hide a targeting error. A beautifully phrased card about the wrong thing is still wrong.
|
|
3709
|
+
|
|
3710
|
+
## Required inputs
|
|
3711
|
+
|
|
3712
|
+
- source: note id(s), pasted passage, URL, or concept
|
|
3713
|
+
- target note id (cards are appended there)
|
|
3714
|
+
- optional hints: which angle to reinforce, reader level
|
|
3715
|
+
|
|
3716
|
+
If source or target is missing, ask. Do not invent a target.
|
|
3717
|
+
|
|
3718
|
+
## Workflow
|
|
3719
|
+
|
|
3720
|
+
1. Read source (\`fcc note read <id>\`) unless pasted. Read target. If the user pointed at specific lines or gave angle words, those are the targets; skip the selection step and go to construction.
|
|
3721
|
+
2. Read existing cards in the target. They tell you two things: **what is already covered** (retrieval targets, not wording) and **the reader's level and style** (chunk size, card types, how much context they include). New cards match that level. If there are no existing cards, assume an experienced reader: larger chunks, fewer cards.
|
|
3722
|
+
3. State in the trace, before any edit: source ids read, target id read, where the last existing card ends, list of covered targets. A run that cannot show this failed.
|
|
3723
|
+
4. **Select targets.** Write each candidate as one line: \`target — angle\` (angle ∈ fact / why / contrast / example / implication / purpose / procedure step / heads-up). Then filter with the Targeting rules. First pass on a normal source: 5–10 survivors. Short source: 2–4. Do not pad to a count.
|
|
3724
|
+
5. **Construct** one prompt per surviving target using the pattern for its material type. Default to recall (\`sa\`, cloze): the reviewer must produce the answer. Use \`sc\`/\`mc\` only when close distractors teach a boundary the bare answer would not; a pass that is mostly \`sc\` trains recognition, not memory.
|
|
3725
|
+
6. **Check** each card against the Construction checks. Fix by changing type or splitting, never by adding words. If still unstable, drop it and list it.
|
|
3726
|
+
7. Append after the last existing card (or EOF) with a minimal \`fcc note patch <id>\` unified diff. Never insert between existing cards; never rewrite existing cards unless asked.
|
|
3727
|
+
8. Run summary (below).
|
|
3886
3728
|
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3729
|
+
## Targeting rules
|
|
3730
|
+
|
|
3731
|
+
- **The source's point, not its neighbourhood.** Ask: if the reader forgot everything but one sentence of this passage, which sentence would the author want it to be? That is the target. Names, dates, places, and numbers are targets only when the source's point *is* the name/date/number.
|
|
3732
|
+
- **Low-entropy details are not targets.** If almost any other text on this subject would contain the same detail, and the source never returns to it, skip it.
|
|
3733
|
+
- **General over provincial.** A blog post's "we cap services at 400 lines" is an instance; the target is the rule of thumb it instantiates. Keep the instance as the example inside the prompt if it is vivid.
|
|
3734
|
+
- **Definitions are not understanding.** For a concept, a term↔definition pair is at most one card and never the only one. Add the angles that trace the concept's edges (see Conceptual patterns).
|
|
3735
|
+
- **Multiple angles on what matters.** The important idea in a passage deserves 2–4 cards from different angles (fact, why, contrast, implication). A minor idea deserves zero.
|
|
3736
|
+
- **Explanations pair with facts.** When the source gives a reason, write the reason card too; it is the hook the fact hangs on.
|
|
3737
|
+
- **Level.** Match the existing cards. Do not write "what is a for loop" for a senior engineer. If no cards exist and the source is introductory, prefer the mechanism cards over the vocabulary cards.
|
|
3738
|
+
- **Gaps are targets too.** A question the source raises but does not answer: write it with no \`::answer\` and say so in the summary. Never fabricate an answer.
|
|
3739
|
+
- **More than feels natural, but omit beats weak.** Coarse cards do not reduce what must be learned; they only make each unit harder to retrieve. Split. But a card you cannot make stable is dropped, not appended.
|
|
3740
|
+
|
|
3741
|
+
Out of scope: salience prompts ("next time I see X, ask…"), creative prompts that want a new answer each time, broad self-graded reflection.
|
|
3742
|
+
|
|
3743
|
+
## Prompt patterns by material type
|
|
3744
|
+
|
|
3745
|
+
### Simple facts
|
|
3746
|
+
|
|
3747
|
+
One detail per card; pair with a why-card when the source gives a reason.
|
|
3748
|
+
|
|
3749
|
+
- bad: \`What do you need to set up a Redis cache?\` (five things at once)
|
|
3750
|
+
- good: \`What data structure does Redis use to implement a sorted set?\` → \`skip list\`
|
|
3751
|
+
- pair: \`What performance property makes skip lists a suitable alternative to balanced BSTs in Redis sorted sets?\` → \`equivalent average-case O(log n)\`
|
|
3752
|
+
|
|
3753
|
+
Tighten any why-question with several plausible answers: \`Why does Redis use a skip list?\` admits "historical reasons"; the version above does not.
|
|
3754
|
+
|
|
3755
|
+
### Closed lists (fixed members)
|
|
3756
|
+
|
|
3757
|
+
One cloze per element, same order each time, so the list's shape is learned. Pair each element with a why/role card so the list can be regenerated from meaning.
|
|
3758
|
+
|
|
3759
|
+
\`\`\`md
|
|
3760
|
+
SOLID principles: Single Responsibility / Open-Closed / ::cloze[Liskov Substitution] / Interface Segregation / Dependency Inversion
|
|
3761
|
+
\`\`\`
|
|
3762
|
+
|
|
3763
|
+
Never one list-level card (\`Name the five SOLID principles\`).
|
|
3764
|
+
|
|
3765
|
+
### Procedures
|
|
3766
|
+
|
|
3767
|
+
Not "list the steps". Strip to the verbs, conditions, and decision points that carry information; the scaffolding is obvious from context. Cards about: branch conditions, why a step exists, heads-up timing or predictable surprises, what to check before moving on.
|
|
3768
|
+
|
|
3769
|
+
- good: \`In a Kubernetes rolling deployment, what triggers an automatic rollback?\` → \`new pods fail readiness probe within the deadline\`
|
|
3770
|
+
|
|
3771
|
+
### Concepts
|
|
3772
|
+
|
|
3773
|
+
Definition alone is parroting. Trace the edges with whichever lenses fit; these are the patterns models forget without being told:
|
|
3774
|
+
|
|
3775
|
+
| Lens | Prompt shape |
|
|
3776
|
+
| -------------------------- | ---------------------------------------------------------- |
|
|
3777
|
+
| attributes / tendencies | what is always / sometimes / never true of it |
|
|
3778
|
+
| similarities / differences | how it differs from the adjacent concept |
|
|
3779
|
+
| example → classification | \`Is <concrete case> an instance of X? Why?\` (\`sc\`/\`la\`) |
|
|
3780
|
+
| classification → example | \`Give an example of X\` / \`Give a non-example\` (\`la\`) |
|
|
3781
|
+
| parts / wholes | sub-concepts, broader category, named instances |
|
|
3782
|
+
| causes / effects | what it does, when, and why it is used |
|
|
3783
|
+
| purpose | what does X let you see / do quickly |
|
|
3784
|
+
| connection | how X relates to the idea introduced just before / after |
|
|
3785
|
+
| light application | apply the rule to a small new case (\`la\` with criteria) |
|
|
3786
|
+
|
|
3787
|
+
Avoid yes/no; convert to a cause, example, or implication.
|
|
3788
|
+
|
|
3789
|
+
### Open lists (no fixed membership)
|
|
3790
|
+
|
|
3791
|
+
Treat as tags. Cards: instance → tag (\`When a payment service must notify shipping after checkout without waiting, what integration pattern fits?\` → \`message queue\`) and tag → examples (\`Name two situations where a queue beats a direct call\`). Cloze on an open list does not work.
|
|
3792
|
+
|
|
3793
|
+
### Later passes
|
|
3794
|
+
|
|
3795
|
+
- second: procedural details, secondary facts, edge cases
|
|
3796
|
+
- third: conceptual lenses not yet used
|
|
3797
|
+
- later: cross-concept links, applications, unresolved gaps
|
|
3798
|
+
|
|
3799
|
+
Duplicate = same retrieval target, regardless of wording. Prefer contrasts and implications over re-explaining the first-pass mechanism in more words.
|
|
3800
|
+
|
|
3801
|
+
## Construction checks
|
|
3802
|
+
|
|
3803
|
+
Judge the question harder than the answer; the question is what the reviewer sees alone.
|
|
3804
|
+
|
|
3805
|
+
- **Focused** — one detail. \`What's important about database indexes?\` → \`What's the write-side cost of adding an index?\`
|
|
3806
|
+
- **Precise** — the question fixes the *shape* of the answer (a number, a mechanism, a name). \`What are some reasons to prefer an interface?\` drifts; \`What's the main structural constraint that makes interfaces preferable to abstract classes in Java?\` does not.
|
|
3807
|
+
- **Consistent** — same answer every review. If several source-grounded answers fit the stem, add the discriminating context or split.
|
|
3808
|
+
- **Tractable** — usually answerable. Add a cue that narrows without giving away: \`(example: driver in orm lib)\` good; \`(Dependency related)\` bad.
|
|
3809
|
+
- **Effortful** — retrieved, not inferred from the wording. Long questions with copied source phrasing get pattern-matched; keep stems short and in your own words.
|
|
3810
|
+
- **Stands alone** — works with the source closed. No \`in the article\`, \`according to the source\`, \`in this example\`, \`the author\`; name the domain, mechanism, or example instead.
|
|
3811
|
+
- **Answer fits the type** — \`sa\` answers are 1–3 typeable words; anything sentence-like moves to \`sc\`, cloze, or \`la\`.
|
|
3812
|
+
|
|
3813
|
+
## Card syntax
|
|
3814
|
+
|
|
3815
|
+
Outer fence \`:::sa|sc|mc|la\`; every card has \`:::question[...]\` (plain question text is dropped on import). \`::answer[...]\`, \`::opt[...]\`, \`::explanation[...]\` are one-line leaf directives. Mark correct options \`{.correct}\`; \`sc\` = exactly one, \`mc\` = one or more. No \`qid\`, \`fractionalIndex\`, \`{#id}\`, \`importance\`, \`difficulty\`. Omit \`::explanation\` when it adds nothing; omit \`::answer\` for a deliberate gap.
|
|
3816
|
+
|
|
3817
|
+
### \`sa\` — short answer
|
|
3818
|
+
|
|
3819
|
+
Grader = exact bag-of-words set match: lowercase, strip punctuation, split on spaces, word set must equal a saved answer. No stemming, no synonyms, no meaning.
|
|
3820
|
+
|
|
3821
|
+
So: answer = bare content words (\`electron flow\`, not \`flow of electrons\`); one \`::answer[...]\` per real variant (plural, synonym, abbreviation); \`answerRegexp\` when a pattern is cleaner (case-insensitive, unanchored → write \`^...$\`; overrides set match); \`{class="strict"}\` only for genuinely case/punctuation-sensitive targets. No code literals, backticks, or API names in \`sa\` answers → use \`sc\`/cloze.
|
|
3822
|
+
|
|
3823
|
+
\`\`\`md
|
|
3824
|
+
:::sa{answerRegexp="^(the )?(retrieval practices?|active recall)$"}
|
|
3825
|
+
:::question[What memory mechanism does spaced repetition exploit to slow forgetting?]
|
|
3826
|
+
|
|
3827
|
+
::answer[retrieval practice]
|
|
3828
|
+
|
|
3829
|
+
::explanation[Recalling reinforces far more than re-reading.]
|
|
3830
|
+
:::
|
|
3831
|
+
\`\`\`
|
|
3832
|
+
|
|
3833
|
+
### \`sc\` / \`mc\`
|
|
3834
|
+
|
|
3835
|
+
\`\`\`md
|
|
3836
|
+
:::sc
|
|
3837
|
+
:::question[What is the main structural reason to prefer an interface over an abstract class in Java?]
|
|
3838
|
+
|
|
3839
|
+
::opt[Interfaces are faster at runtime]
|
|
3840
|
+
::opt[A class can implement many interfaces but extend only one class]{.correct}
|
|
3841
|
+
::opt[Interfaces avoid constructors]
|
|
3842
|
+
:::
|
|
3843
|
+
\`\`\`
|
|
3844
|
+
|
|
3845
|
+
Distractors must be close to true; obvious distractors make the card a giveaway.
|
|
3846
|
+
|
|
3847
|
+
### Cloze
|
|
3848
|
+
|
|
3849
|
+
\`\`\`md
|
|
3850
|
+
On Titan, its gravity is so low that humans could fly simply by ::cloze[flapping their arms] in winged space suits.
|
|
3851
|
+
\`\`\`
|
|
3852
|
+
|
|
3853
|
+
Use for closed lists, ordered structures, and when the source wording itself is the durable cue. Cloze produces shallower memory than Q/A (extraneous words act as hints), so: delete the blank and read the sentence — if the rest implies the answer, or the blank is an abstract label rather than a concrete unit, use \`sa\`/\`sc\` or skip.
|
|
3854
|
+
|
|
3855
|
+
Mark a blank \`{.exact}\` when only one form is right and a near form is wrong (word order or an ending in a model sentence, \`::l[She ::cloze[is not tired]{.exact}.]{lang="en"}\`; a spelling): it is graded by form (exact match or \`answerRegexp\`, never by meaning) and starts at \`...\` with no first letter. A rule's \`.practice\` blanks already are. Leave meaning-level blanks unmarked so paraphrases pass. Form grading folds only case, punctuation and spaces, so a form-graded answer with ä, ö, ü or ß gets an \`answerRegexp\` that also accepts ae, oe, ue, ss (\`answerRegexp="^bin nicht m(ü|ue)de$"\`): that spelling is correct German, and "muede" was measured wrong without it.
|
|
3856
|
+
|
|
3857
|
+
### \`la\` — long answer
|
|
3858
|
+
|
|
3859
|
+
Only for application / comparison targets that no other type can hold, and only with observable criteria (\`identifies simultaneous cache misses\`, not \`shows understanding\`). Mark application prompts \`type="application"\`.
|
|
3860
|
+
|
|
3861
|
+
\`\`\`md
|
|
3862
|
+
:::la{type="application" criteria="['names the violated principle','ties it to the two independent change axes','does not merely restate the definition']"}
|
|
3863
|
+
:::question[A class parses config files and also sends alert emails. Which design principle is violated and why?]
|
|
3864
|
+
:::
|
|
3865
|
+
\`\`\`
|
|
3866
|
+
|
|
3867
|
+
Application prompts: small step beyond memorized knowledge, novel inputs, one correct mechanism, no strategy search. If they need many hidden prerequisites, write recall cards for those first.
|
|
3868
|
+
|
|
3869
|
+
## Patching
|
|
3870
|
+
|
|
3871
|
+
\`fcc note patch <id>\` takes a standard unified diff. Hunks anchor on context lines; copy them verbatim from \`fcc note read\`. Do not hand-count offsets. Never send \`*** Begin Patch\` format. Do not edit projected Markdown files directly; do not run sync or import.
|
|
3872
|
+
|
|
3873
|
+
## Run summary
|
|
3874
|
+
|
|
3875
|
+
1. Each new card as \`target — angle — type\` so the user can prune in one glance.
|
|
3876
|
+
2. Targets selected but dropped, with the reason (unstable / low-entropy / needs the source open / duplicate).
|
|
3877
|
+
3. What was left for later passes.
|
|
3878
|
+
4. Gaps written without answers.
|
|
3879
|
+
5. Weak existing cards, if any, with a proposed rewrite (not applied).
|
|
3880
|
+
|
|
3881
|
+
NEVER COMMIT OR SYNC UNLESS EXPLICITLY ASKED IN PREVIOUS MESSAGE!
|
|
3882
|
+
` } });
|