Extract summaries from udacity transcripts
Rendered 08 Sep 2026
Values used
nd_id- nd900
Rendered prompt
The task
Read the extracted course content in
nd900/transcripts/and write one markdown summary per course intond900/, plus aREADME.mdindex.Follow the recipe detailed below. Build digests first, write each course doc immediately after reading that course, and keep the frameworks, formulas, worked exercise solutions, glossaries and project requirements rather than just listing topics.
Step-by-step
1. Build reading digests
The raw files are large (~200–300 KB per course) because video transcripts dominate. In this
curriculum every video is paired with a [TEXT - Summary] or [TEXT - Recap] atom that restates
its content, so stripping transcript bodies cuts the reading volume by ~65% while losing almost
nothing. Keep the video titles so the structure stays visible.
import glob, os
DIGEST = "<SCRATCHPAD>/digest"
os.makedirs(DIGEST, exist_ok=True)
for f in sorted(glob.glob("transcripts/*.txt")):
out = []
for line in open(f):
out.append(line.split("]")[0] + "]\n" if line.startswith("[VIDEO") else line)
open(os.path.join(DIGEST, os.path.basename(f)), "w").write("".join(out))
print(f, len(out))
Write digests to the scratchpad, not the project — they're intermediate.
Spot-check one course against its full transcript before trusting the digest. If a course teaches primarily through video with no paired text recaps, read its full file instead.
2. Read each digest
Use the Read tool with offset/limit, not cat — Bash persists large output to a file
instead of putting it in context, which is the opposite of what you want here. Expect ~2 pages per
course at ~25k tokens each.
3. Write each course doc immediately
Write course N's markdown before reading course N+1. Context may be compacted partway through a long extraction; writing as you go means the deliverable is already on disk if that happens.
4. Write the README index last
Table of courses (number, title, part key, lesson count, concept count, project), a short section on
how the courses connect, the instructors, and a description of the transcripts/ format so the raw
files are usable on their own.
What to put in a course doc
Header block
Nanodegree and course key · instructor with their background · lesson/concept counts · a relative link to the raw transcript · the course blurb.
Body
- Course learning objectives verbatim from the course — they're the contract for what the course claims to teach.
- One section per lesson, in order, with the lesson's own summary line as the section subtitle.
- A running-case-study callout if the course has one. These courses each pin every exercise to a single scenario (a fitness tracker, a grocery chain, a party app); naming it up front makes the rest of the doc cohere.
- Glossary tables per lesson, as the courses provide them.
- A project section with scenario options, required deliverables, and grading criteria.
What to keep
Keep the things someone would otherwise have to re-watch the course to recover:
- Formulas and their worked numbers —
TAM = ARPU × potential users, and the actual top-down vs. bottoms-up calculations that produce different answers. - Framework tables — HEART goals/signals/metrics, the six Thinking Hats in order, priority and severity scales, prototyping method trade-offs.
- Model answers to exercises. The instructor's solution is often the most useful content on the page. Include the reasoning, not just the answer.
- Contrastive examples. Good vs. bad, brittle vs. credible, ✅ vs. ❌ — these carry the actual judgment being taught and compress well into a blockquote pair.
- Memorable direct quotes, sparingly, as blockquotes. One or two per lesson.
- Links to templates, further reading, and tools — rewrite the source's inline
<a href>HTML as markdown.
What to drop
Instructor self-introductions beyond one line, prerequisite/tooling boilerplate (compress to a line), Udacity platform mechanics, quiz atoms with no recoverable content, and image placeholders.
Style
- Tables for anything with parallel structure — comparisons, glossaries, phase lists, priority scales. Most of this content is inherently tabular.
- Bold the term being defined at the start of a bullet.
- Blockquotes for direct quotes and for the one-line rules worth remembering.
- Convert source HTML tables to markdown tables; drop the
index-module--*wrapper classes. - Don't pad. A short course gets a short doc — the welcome/onboarding course doesn't need the same treatment as a 100-concept course, and two thin courses can share one file.
Reference output
The nd036 run produced ~128 KB of summaries from 1.04 MB of source:
| Doc | Size | Source |
|---|---|---|
01-welcome-to-the-nanodegree-program.md |
8 KB | 25 KB (+ the 8 KB congratulations course) |
02-product-strategy-for-product-managers.md |
34 KB | 286 KB |
03-product-design.md |
29 KB | 306 KB |
04-product-development.md |
22 KB | 217 KB |
05-product-launch.md |
31 KB | 194 KB |
README.md |
4 KB | — |
Roughly a 9:1 compression, with formulas, worked examples and project requirements preserved.
Gotchas
cat-ing a digest persists it to a file instead of loading it. Use Read.- The Read tool caps a page at ~25k tokens and tells you the offset for the next page. Don't answer from a partial page — a lesson's project requirements are usually at the very end of the file.
- Some
[TEXT]atoms contain raw HTML tables. They're worth converting; they usually hold the densest content in the lesson (priority scales, comparison matrices, worked KPI tables). - Check for cross-course reuse. Later courses re-teach earlier material (TAM appears in both Product Strategy and Product Launch). Summarise it fully once and reference it the second time.
- A course's real spine is often its exercises, not its lecture videos. If a doc reads as a list of topics rather than a set of methods with worked examples, it's missing the exercise solutions.
## The task
> Read the extracted course content in `nd900/transcripts/` and write one markdown summary
> per course into `nd900/`, plus a `README.md` index.
>
> Follow the recipe detailed below.
> Build digests first, write each course doc immediately after reading that course,
> and keep the frameworks, formulas, worked exercise
> solutions, glossaries and project requirements rather than just listing topics.
---
## Step-by-step
### 1. Build reading digests
The raw files are large (~200–300 KB per course) because video transcripts dominate. In this
curriculum **every video is paired with a `[TEXT - Summary]` or `[TEXT - Recap]` atom that restates
its content**, so stripping transcript bodies cuts the reading volume by ~65% while losing almost
nothing. Keep the video *titles* so the structure stays visible.
```python
import glob, os
DIGEST = "<SCRATCHPAD>/digest"
os.makedirs(DIGEST, exist_ok=True)
for f in sorted(glob.glob("transcripts/*.txt")):
out = []
for line in open(f):
out.append(line.split("]")[0] + "]\n" if line.startswith("[VIDEO") else line)
open(os.path.join(DIGEST, os.path.basename(f)), "w").write("".join(out))
print(f, len(out))
```
Write digests to the **scratchpad**, not the project — they're intermediate.
> Spot-check one course against its full transcript before trusting the digest. If a course teaches
> primarily through video with no paired text recaps, read its full file instead.
### 2. Read each digest
Use the **Read tool with `offset`/`limit`**, not `cat` — Bash persists large output to a file
instead of putting it in context, which is the opposite of what you want here. Expect ~2 pages per
course at ~25k tokens each.
### 3. Write each course doc immediately
**Write course N's markdown before reading course N+1.** Context may be compacted partway through a
long extraction; writing as you go means the deliverable is already on disk if that happens.
### 4. Write the README index last
Table of courses (number, title, part key, lesson count, concept count, project), a short section on
how the courses connect, the instructors, and a description of the `transcripts/` format so the raw
files are usable on their own.
---
## What to put in a course doc
### Header block
Nanodegree and course key · instructor with their background · lesson/concept counts · a relative
link to the raw transcript · the course blurb.
### Body
- **Course learning objectives** verbatim from the course — they're the contract for what the course
claims to teach.
- **One section per lesson**, in order, with the lesson's own summary line as the section subtitle.
- **A running-case-study callout** if the course has one. These courses each pin every exercise to a
single scenario (a fitness tracker, a grocery chain, a party app); naming it up front makes the
rest of the doc cohere.
- **Glossary tables per lesson**, as the courses provide them.
- **A project section** with scenario options, required deliverables, and grading criteria.
### What to keep
Keep the things someone would otherwise have to re-watch the course to recover:
- **Formulas and their worked numbers** — `TAM = ARPU × potential users`, and the actual top-down vs.
bottoms-up calculations that produce different answers.
- **Framework tables** — HEART goals/signals/metrics, the six Thinking Hats in order, priority and
severity scales, prototyping method trade-offs.
- **Model answers to exercises.** The instructor's solution is often the most useful content on the
page. Include the reasoning, not just the answer.
- **Contrastive examples.** Good vs. bad, brittle vs. credible, ✅ vs. ❌ — these carry the actual
judgment being taught and compress well into a blockquote pair.
- **Memorable direct quotes**, sparingly, as blockquotes. One or two per lesson.
- **Links** to templates, further reading, and tools — rewrite the source's inline `<a href>` HTML as
markdown.
### What to drop
Instructor self-introductions beyond one line, prerequisite/tooling boilerplate (compress to a
line), Udacity platform mechanics, quiz atoms with no recoverable content, and image placeholders.
### Style
- Tables for anything with parallel structure — comparisons, glossaries, phase lists, priority
scales. Most of this content is inherently tabular.
- Bold the term being defined at the start of a bullet.
- Blockquotes for direct quotes and for the one-line rules worth remembering.
- Convert source HTML tables to markdown tables; drop the `index-module--*` wrapper classes.
- Don't pad. A short course gets a short doc — the welcome/onboarding course doesn't need the same
treatment as a 100-concept course, and two thin courses can share one file.
---
## Reference output
The nd036 run produced ~128 KB of summaries from 1.04 MB of source:
| Doc | Size | Source |
|---|---|---|
| `01-welcome-to-the-nanodegree-program.md` | 8 KB | 25 KB (+ the 8 KB congratulations course) |
| `02-product-strategy-for-product-managers.md` | 34 KB | 286 KB |
| `03-product-design.md` | 29 KB | 306 KB |
| `04-product-development.md` | 22 KB | 217 KB |
| `05-product-launch.md` | 31 KB | 194 KB |
| `README.md` | 4 KB | — |
Roughly a 9:1 compression, with formulas, worked examples and project requirements preserved.
---
## Gotchas
- **`cat`-ing a digest persists it to a file instead of loading it.** Use Read.
- **The Read tool caps a page at ~25k tokens** and tells you the offset for the next page. Don't
answer from a partial page — a lesson's project requirements are usually at the very end of the
file.
- **Some `[TEXT]` atoms contain raw HTML tables.** They're worth converting; they usually hold the
densest content in the lesson (priority scales, comparison matrices, worked KPI tables).
- **Check for cross-course reuse.** Later courses re-teach earlier material (TAM appears in both
Product Strategy and Product Launch). Summarise it fully once and reference it the second time.
- **A course's real spine is often its exercises**, not its lecture videos. If a doc reads as a list
of topics rather than a set of methods with worked examples, it's missing the exercise solutions.