Writing Flashcards
Overview
Convert one or more documentation URLs into Q/A flashcards that are atomic, source-checkable, and deduplicated against an existing vault. Prefer skipping or minimally updating existing cards; create new cards only for missing, citation-backed facts.
When to Use
- User asks: “make flashcards from this doc/article”, “exam refresh”, “merge docs into my existing vault”.
- You have (or can be given) an existing vault file/folder to deduplicate and update.
When NOT to Use / Refuse
Refuse or stop if any of the following is true:
- No stable source URL/permalink is provided ("I read it yesterday" / screenshots-only / memory-only).
- User wants pure note-taking/summarization, not Q/A recall.
- You cannot cite using the provided URL(s) only and user did not explicitly allow additional sources.
Refusal output rules:
- Do not generate any cards.
- Ask for a stable link/permalink OR a pasted excerpt.
- If the user asked for dedupe/merge, ask for the vault path/file to check.
Hard Output Contract (Non-Negotiable)
Applies whenever you produce cards (stdout or writing into a file).
Exception: if you are refusing/stopping because required inputs are missing, do not output cards. Output a short request for the missing stable URL/permalink and (if deduping/merging is required) the vault path.
When producing cards, your response/output file must contain only flashcards + footnote definitions at the very bottom.
Per card:
- Line 1:
**<question>** #card <optional tags>
#card is mandatory on every card.
- Line 2+:
<answer> (Markdown allowed)
- Final line of the card: footnote markers only, on their own line:
[^slug1][^slug2]
- Nothing may appear after this line (no IDs, separators, extra whitespace blocks).
Global rules:
- No headings, numbering, TOCs, metadata blocks, prose, or file-system commentary in the output.
- Never preface with “available skills / skill match / I will…”; the output must be cards-only.
- Never include tool/harness artifacts like
<task_metadata>...</task_metadata>.
- Separate cards with a single blank line.
- Never put URLs in answer text (citations are footnotes only).
- Exactly one footnote-marker line per card (no markers sprinkled in the answer).
- Footnote definitions are collected at the bottom only:
[^<slug>]: [<Title>](<URL>)
Tag + Linking Rules
#card is mandatory on every card.
- Add other tags only if the user requested them (difficulty, exam code, topic tags).
- Difficulty calibration (only if requested):
#beginner: definitions, defaults, primary purpose.
#advanced: trade-offs, decision rules, key operational limits.
#expert: edge cases, internals, precise failure modes/scenarios.
- Never use wiki links in questions.
- Answers may include wiki links for likely-in-vault concepts (e.g.,
[[Amazon S3]]); otherwise leave unlinked.
Question/Answer Quality
- Atomic and specific: one recall target per card.
- Source-checkable: every answer must be supported by the cited section.
- No marketing language; paraphrase in plain English.
- Forbidden question openings:
Is, Does, Can, Are.
- Reframe as: “What is…”, “How does…”, “What is the behavior of…”, “What is the difference between…”.
- Avoid “Tell me about …”.
Question Style by Difficulty:
| Level |
Goal |
Question Style |
Example |
| #beginner |
Vocabulary & Models |
Simple Recall (Definition, Purpose) |
"What is the default S3 storage class?" |
| #advanced |
Decisions & Trade-offs |
Comparison / Synthesis (Why X over Y?) |
"Why choose S3 Standard over S3 Intelligent-Tiering for predictable workloads?" |
| #expert |
Internals & Edge Cases |
Constraints / Scenarios (What happens if...?) |
"What happens to an SQS batch if one message fails and ReportBatchItemFailures is disabled?" |
Citations, Deep Links, and Slugs
Source rules
- Use only user-provided URL(s). Do not add “helpful” extra sources.
Deep-linking rules
- If the page supports anchors, cite a deep link to the most relevant section.
- Never guess an anchor. Verify it exists in fetched content (the HTML contains
id="anchor", name="anchor", or a link href="#anchor"). If you can’t fetch/verify, do not use an anchor.
- Fallback if no verifiable anchors: cite the closest stable section URL available (often the page URL without an anchor).
Slug rules (derived from source section, not card content)
- Slug identifies the cited source section:
(<url filename> + <anchor>).
- All cards citing the same section must reuse the exact same slug.
- Slug format:
- lowercase
- separator
- strip query strings
- examples:
.../storage-class-intro.html#sc-compare → storage-class-intro-sc-compare
.../optimizing-storage-costs.html → optimizing-storage-costs
Zero-Duplicate + Minimal-Churn Update Policy
Treat the vault as the source of truth for whether a card should exist.
For each candidate fact:
- skip: an equivalent card already exists and is accurate.
- update: only if the card is demonstrably wrong/outdated per the cited section.
- Make the smallest edit that restores correctness.
- Preserve unrelated wording and tags as long as the Hard Output Contract still holds.
- Do not add vault-specific trailing markers (e.g., Obsidian block IDs like
^...) unless the user explicitly asked for them.
- create: only if missing.
If a new source adds authoritative confirmation/context to an existing accurate card:
- Add additional footnote markers to that card’s marker line (still one marker line).
If multiple provided sources overlap:
- Extract the fact once.
- Cite the most authoritative section; add multiple footnotes only if they add distinct value.
Placement Policy (When Writing Into Existing Files)
- If the target file has bottom-of-file footnote definitions (
[^slug]: ...), insert new/updated cards above the first footnote definition.
- If the file has topic headers, insert under the most relevant header but still above bottom-of-file footnotes.
Workflow (Use This Every Time)
- Validate inputs: stable URL(s) present; user allows only those sources.
- Fetch sources: extract candidate facts (definitions, contrasts, limits, if/then behaviors, enumerations); collect verifiable anchors.
- Right-size: produce only as many cards as the source warrants; never pad.
- Vault dedupe: search the vault for each candidate (by topic + synonyms, not just exact wording).
- For each candidate: decide
skip / update / create.
- Assemble output: cards first, then footnote definitions; enforce the Hard Output Contract.
- Final validation checklist (must pass before emitting):
- No non-card text; no headings; no numbering.
- No URLs in answers.
- Every card ends with exactly one footnote-marker line.
- Every footnote marker has exactly one definition at bottom.
- Slugs are section-derived and reused consistently.
- No duplicate cards.
Common Failure Modes (Red Flags → STOP)
- Adding “helpful” explanation outside cards (violates card-only output).
- Using placeholder markers like
[^1] (violates slug policy).
- Adding anything after the footnote-marker line (violates per-card structure).
- Guessing anchors because “it’s probably right” (violates deep-link verification).
- Creating a new card for an already-covered fact (violates zero-duplicate).
- Multi-fact dumping (one card trying to cover an entire comparison table).
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: writing-flashcards3description: Use when user requests spaced-repetition flashcards from a documentation/article URL or wants to merge/update an existing flashcard vault file - enforces strict card-only output formatting, deep-link footnote citations with stable slugs, and zero-duplicate minimal-churn updates based only on provided sources.4---56# Writing Flashcards78## Overview9Convert one or more documentation URLs into Q/A flashcards that are atomic, source-checkable, and deduplicated against an existing vault. Prefer *skipping* or *minimally updating* existing cards; create new cards only for missing, citation-backed facts.1011## When to Use12- User asks: “make flashcards from this doc/article”, “exam refresh”, “merge docs into my existing vault”.13- You have (or can be given) an existing vault file/folder to deduplicate and update.1415## When NOT to Use / Refuse16Refuse or stop if **any** of the following is true:17- No stable source URL/permalink is provided ("I read it yesterday" / screenshots-only / memory-only).18- User wants pure note-taking/summarization, not Q/A recall.19- You cannot cite using the provided URL(s) only and user did not explicitly allow additional sources.2021Refusal output rules:22- Do not generate any cards.23- Ask for a stable link/permalink OR a pasted excerpt.24- If the user asked for dedupe/merge, ask for the vault path/file to check.2526## Hard Output Contract (Non-Negotiable)27Applies whenever you produce cards (stdout or writing into a file).2829**Exception:** if you are refusing/stopping because required inputs are missing, do **not** output cards. Output a short request for the missing stable URL/permalink and (if deduping/merging is required) the vault path.3031When producing cards, your response/output file must contain **only flashcards** + **footnote definitions at the very bottom**.3233Per card:34- Line 1: `**<question>** #card <optional tags>`35 - `#card` is mandatory on every card.36- Line 2+: `<answer>` (Markdown allowed)37- Final line of the card: footnote markers only, on their own line: `[^slug1][^slug2]`38 - Nothing may appear after this line (no IDs, separators, extra whitespace blocks).3940Global rules:41- **No headings, numbering, TOCs, metadata blocks, prose, or file-system commentary** in the output.42- Never preface with “available skills / skill match / I will…”; the output must be cards-only.43- Never include tool/harness artifacts like `<task_metadata>...</task_metadata>`.44- Separate cards with a single blank line.45- **Never put URLs in answer text** (citations are footnotes only).46- **Exactly one footnote-marker line per card** (no markers sprinkled in the answer).47- Footnote definitions are collected at the bottom only:48 - `[^<slug>]: [<Title>](<URL>)`4950## Tag + Linking Rules51- `#card` is mandatory on every card.52- Add other tags only if the user requested them (difficulty, exam code, topic tags).53- Difficulty calibration (only if requested):54 - `#beginner`: definitions, defaults, primary purpose.55 - `#advanced`: trade-offs, decision rules, key operational limits.56 - `#expert`: edge cases, internals, precise failure modes/scenarios.57- Never use wiki links in questions.58- Answers may include wiki links for likely-in-vault concepts (e.g., `[[Amazon S3]]`); otherwise leave unlinked.5960## Question/Answer Quality61- Atomic and specific: one recall target per card.62- Source-checkable: every answer must be supported by the cited section.63- No marketing language; paraphrase in plain English.64- **Forbidden question openings:** `Is`, `Does`, `Can`, `Are`.65 - Reframe as: “What is…”, “How does…”, “What is the behavior of…”, “What is the difference between…”.66- Avoid “Tell me about …”.6768**Question Style by Difficulty:**6970| Level | Goal | Question Style | Example |71| :--- | :--- | :--- | :--- |72| **#beginner** | **Vocabulary & Models** | **Simple Recall** (Definition, Purpose) | "What is the default S3 storage class?" |73| **#advanced** | **Decisions & Trade-offs** | **Comparison / Synthesis** (Why X over Y?) | "Why choose S3 Standard over S3 Intelligent-Tiering for predictable workloads?" |74| **#expert** | **Internals & Edge Cases** | **Constraints / Scenarios** (What happens if...?) | "What happens to an SQS batch if one message fails and `ReportBatchItemFailures` is disabled?" |7576## Citations, Deep Links, and Slugs77### Source rules78- Use **only** user-provided URL(s). Do not add “helpful” extra sources.7980### Deep-linking rules81- If the page supports anchors, cite a deep link to the most relevant section.82- **Never guess an anchor.** Verify it exists in fetched content (the HTML contains `id="anchor"`, `name="anchor"`, or a link `href="#anchor"`). If you can’t fetch/verify, do not use an anchor.83- Fallback if no verifiable anchors: cite the closest stable section URL available (often the page URL without an anchor).8485### Slug rules (derived from source section, not card content)86- Slug identifies the cited source section: `(<url filename> + <anchor>)`.87- All cards citing the same section must reuse the **exact** same slug.88- Slug format:89 - lowercase90 - `-` separator91 - strip query strings92 - examples:93 - `.../storage-class-intro.html#sc-compare` → `storage-class-intro-sc-compare`94 - `.../optimizing-storage-costs.html` → `optimizing-storage-costs`9596## Zero-Duplicate + Minimal-Churn Update Policy97Treat the vault as the source of truth for whether a card should exist.9899For each candidate fact:100- **skip**: an equivalent card already exists and is accurate.101- **update**: only if the card is demonstrably wrong/outdated *per the cited section*.102 - Make the smallest edit that restores correctness.103 - Preserve unrelated wording and tags **as long as** the Hard Output Contract still holds.104 - Do not add vault-specific trailing markers (e.g., Obsidian block IDs like `^...`) unless the user explicitly asked for them.105- **create**: only if missing.106107If a new source adds authoritative confirmation/context to an existing accurate card:108- Add additional footnote markers to that card’s marker line (still one marker line).109110If multiple provided sources overlap:111- Extract the fact once.112- Cite the most authoritative section; add multiple footnotes only if they add distinct value.113114## Placement Policy (When Writing Into Existing Files)115- If the target file has bottom-of-file footnote definitions (`[^slug]: ...`), insert new/updated cards **above the first footnote definition**.116- If the file has topic headers, insert under the most relevant header **but still above** bottom-of-file footnotes.117118## Workflow (Use This Every Time)1191. **Validate inputs**: stable URL(s) present; user allows only those sources.1202. **Fetch sources**: extract candidate facts (definitions, contrasts, limits, if/then behaviors, enumerations); collect verifiable anchors.1213. **Right-size**: produce only as many cards as the source warrants; never pad.1224. **Vault dedupe**: search the vault for each candidate (by topic + synonyms, not just exact wording).1235. For each candidate: decide `skip` / `update` / `create`.1246. **Assemble output**: cards first, then footnote definitions; enforce the Hard Output Contract.1257. **Final validation checklist** (must pass before emitting):126 - No non-card text; no headings; no numbering.127 - No URLs in answers.128 - Every card ends with exactly one footnote-marker line.129 - Every footnote marker has exactly one definition at bottom.130 - Slugs are section-derived and reused consistently.131 - No duplicate cards.132133## Common Failure Modes (Red Flags → STOP)134- Adding “helpful” explanation outside cards (violates card-only output).135- Using placeholder markers like `[^1]` (violates slug policy).136- Adding anything after the footnote-marker line (violates per-card structure).137- Guessing anchors because “it’s probably right” (violates deep-link verification).138- Creating a new card for an already-covered fact (violates zero-duplicate).139- Multi-fact dumping (one card trying to cover an entire comparison table).140141---142> Converted and distributed by [TomeVault](https://tomevault.io/claim/borisnaidis) — claim your Tome and manage your conversions.143<!-- tomevault:4.0:skill_md:2026-04-16 -->