Build another digdeep course
Change the `PRODUCT_AREA` value near the top, then give the complete prompt to an agent that can access the engineering workspace and internal research sources. The prompt covers research, source reconciliation, writing, application integration, testing, and local startup.
# Reusable digdeep course prompt
Change only the value of `PRODUCT_AREA`, then paste this entire document into an LLM with access to your engineering workspace and research sources.
---
You are adding a complete internal technical course to the existing local `digdeep` application.
`PRODUCT_AREA = "<PRODUCT_AREA>"`
Replace `<PRODUCT_AREA>` above with the product area I name, such as `CDN`, `Fluid Compute`, `Observability`, `Firewall`, or `AI Gateway`. Treat that as the only required input. Derive the course name, URL-safe slug, curriculum, system boundaries, customer journey, technical architecture, exercises, and capstone from the product area.
Do the research, write the course, implement the application, test it, start it locally, and give me the URL. Do not stop after producing a plan or curriculum outline.
## Objective
Create an internal, engineering-first course that can take a Software Engineer from a working introduction through Staff-level operational and architectural fluency. Principal-level reasoning should be available throughout the course in `Dig deeper` sections and design exercises. Do not impose a short duration target: a complex product area may require 20–40 hours as long as the material remains divided into digestible lessons and practical work.
The student should finish with a working mental model of the complete product area. They should understand what customers configure or request, which backend paths those choices select, how the system stores and processes state, what the customer sees at each stage, where adjacent product areas begin, and how to diagnose failures without guessing.
This is an onboarding course, not a product catalog. Do not write a shallow list of features, settings, validation steps, or links. Teach how the system works, why it behaves that way, how customer choices change the path, and how an investigator proves what happened.
The course must be self-contained. External material can inform the writing and appear at the bottom of a lesson under "Further learning," but the student must not need to leave the application to learn any required concept.
## Naming and location
Derive a lowercase URL-safe slug from `PRODUCT_AREA`:
- `CICD` or `CI/CD` becomes `cicd`.
- `CDN` becomes `cdn`.
- `AI Gateway` becomes `ai-gateway`.
- Remove punctuation that does not belong in a URL and use hyphens between words.
The application is named `digdeep`. Add the course at `/courses/<slug>`. For example, the CDN course belongs at `/courses/cdn` and appears in the shared course catalog at `/`.
Find the existing `digdeep` application in the workspace and add the course to it. Do not create a second Next.js application. Preserve every existing course, route, source ledger, test, and progress record. Namespace all new progress by course slug. If a schema change is required, add an explicit local-storage migration so existing students lose nothing.
Use the existing app structure:
- store lesson MDX under `content/<slug>/`;
- store course metadata, source ledger, glossary, and content map under `src/content/courses/<slug>/`;
- register the course in `src/content/courses.ts`;
- expose the dashboard at `/courses/<slug>`;
- expose lessons at `/courses/<slug>/<lesson-slug>`;
- expose the glossary at `/courses/<slug>/glossary`;
- expose the source ledger at `/courses/<slug>/sources`.
Read the existing CI/CD course as the quality reference for explanation, lesson depth, assessments, and interaction design. Do not copy its curriculum into another product area. Derive the new curriculum from the system you research.
Use the current working directory as the parent workspace. Inspect it before choosing the output directory. Read every applicable `AGENTS.md` or repository instruction file before editing.
## Working approach
Work autonomously within the requested scope. Search the workspace and connected sources before asking questions. Make reasonable assumptions when the answer can be derived from the product area or repository. Ask only when a missing choice would materially change the result and cannot be discovered.
Provide short progress updates while working, but keep moving. Do not ask me to approve the curriculum, visual direction, or file structure if the requirements below provide enough direction.
Research is read-only. Do not create or modify Notion pages, GitHub issues, pull requests, Slack messages, tickets, production resources, or external systems. Do not expose credentials, secrets, private customer information, security-sensitive operational details, or internal identifiers in the course.
If a private source is unavailable, record that coverage limit and continue with sources you can verify. Do not turn an inaccessible source into an unsupported claim. Do not treat a private-repository 404, empty connector result, or authentication error as evidence that the system or document does not exist.
## Research requirements
Research the product area before fixing the curriculum. Build a source map broad enough to cover the current customer product, its implementation, its operational history, and its boundaries with adjacent systems.
Search all relevant sources available in the environment:
- internal Notion engineering documents, RFCs, architecture notes, runbooks, launch plans, and team pages;
- current private code, including service code, libraries, schemas, event definitions, workers, queues, configuration resolution, API handlers, and tests;
- public GitHub repositories maintained by the company and relevant framework or ecosystem repositories;
- official product documentation and API references;
- knowledge-base articles;
- internal or public academy courses;
- product blog posts, engineering posts, changelog entries, and incident retrospectives;
- anonymized support or operational examples when they clarify a real diagnostic boundary;
- primary external standards, protocol specifications, or upstream project documentation when the product depends on them.
When browsing the web, prefer primary sources. Use official documentation and source code for technical claims. Use secondary material only when it adds context that primary sources do not provide.
Do not rely on search snippets. Open and read the source. For internal architecture claims, verify important behavior against current code whenever code is available.
### Research sequence
Follow this sequence before writing full lessons:
1. Inventory the workspace and identify relevant repositories, existing research, source ledgers, and app scaffolds.
2. Map the customer-facing product: settings, APIs, SDKs, CLI commands, dashboards, logs, billing effects, limits, environments, and common workflows.
3. Map the incoming paths: requests, events, configuration changes, scheduled work, uploads, provider callbacks, or control-plane mutations.
4. Trace those inputs through current backend services, state, queues, storage, caches, compute, propagation, and request-serving paths.
5. Identify state machines, invariants, retry behavior, deduplication, consistency models, security boundaries, quotas, resource limits, and failure handling.
6. Identify what customers can observe: UI state, API output, logs, headers, metrics, status changes, traffic behavior, latency, errors, and billing consequences.
7. Identify adjacent product areas and the exact handoffs between them. Explain cases where the component reporting an error did not cause it.
8. Find current troubleshooting workflows and recurring failure modes. Separate customer configuration, application or dependency behavior, provider failures, and platform failures.
9. Reconcile current implementation with older diagrams and proposals. Never blend current, legacy, and proposed paths into one architecture.
10. Build a claim-level source ledger before finalizing the curriculum.
### Source ledger
Create a typed source ledger used by the application. Every source must include:
- a stable source ID;
- title;
- exact URL or repository path;
- source type;
- access date;
- status: `current`, `legacy`, `proposed`, or `customer-facing`;
- the specific claims it supports.
Use `current` for verified production implementation or current internal documentation. Use `legacy` for an older path retained for historical understanding. Use `proposed` for an RFC or design that is not verified as current production behavior. Use `customer-facing` for official public product behavior that may intentionally omit implementation details.
When sources disagree, explain the disagreement in the research notes and teach only the reconciled behavior. If the current state cannot be verified, say so in the course instead of writing the uncertain claim as fact.
Keep source provenance available in a collapsible drawer on each lesson. The drawer is for verification, not required reading. Put public optional resources under "Further learning" at the bottom of the lesson and nowhere else.
## Define the product-area map
Before choosing module titles, write a complete system map for the selected product area. The map must connect these perspectives:
1. **Customer choice**: what the customer configures, sends, clicks, uploads, deploys, or requests.
2. **Request or event**: the API request, network request, webhook, message, configuration change, scheduled event, or provider callback that enters the system.
3. **Backend behavior**: the services, state, queues, compute, storage, caches, propagation paths, routing decisions, and security boundaries involved.
4. **Customer-visible result**: the dashboard state, logs, API response, headers, traffic, latency, error, usage, or billing consequence the customer sees.
5. **Diagnostic reasoning**: the identifiers, timestamps, state transitions, logs, metrics, or controlled tests that prove what happened and narrow ownership.
Use that five-part model in every technical module. Adapt the nouns to the product area, but do not remove any perspective.
Also identify the main operating planes when they exist:
- a control plane that accepts configuration or records desired state;
- an execution or processing plane that performs work;
- a data plane or request path that serves customer traffic;
- an observation plane that records logs, metrics, traces, status, or billing data.
Do not force these labels onto an architecture where they do not fit. Use the actual system's vocabulary and define each term before relying on it.
## Curriculum requirements
Build as many modules as the product architecture requires. A broad product area may need 14–20 modules and 20–40 hours; a narrower area may need less. Derive the middle modules from the actual system instead of copying feature categories. A useful shape is:
- an opening system map that follows one ordinary customer action through the full product area;
- customer controls, configuration, and entry points;
- request or event ingestion and orchestration;
- core execution, storage, networking, or compute behavior;
- configuration resolution, transformation, protocols, or domain semantics;
- the product area's major performance, caching, consistency, or scaling behavior;
- the path from processed state to the customer-visible result;
- safe changes, propagation, rollout, rollback, or recovery where relevant;
- operations and diagnosis;
- a capstone that traces and diagnoses one realistic customer workflow.
Change this shape when the architecture requires it. A CDN course should spend substantial time on request routing, cache keys, cache-control semantics, invalidation, origin behavior, regional propagation, request coalescing, and observability. It should not inherit CI/CD modules about build containers simply because those modules existed in another course.
Each module needs:
- a concrete outcome and realistic duration;
- four or more coherent chapters;
- substantial original teaching, with at least 650 words of instructional content and enough exercises to justify the duration;
- an opening customer scenario or action;
- definitions for every unfamiliar term before later paragraphs rely on it;
- at least one architecture, request-flow, state-flow, or comparison diagram;
- the five-part customer-to-backend explanation;
- a "customer sees / backend does" mapping exercise;
- at least one applied diagnostic scenario;
- one collapsed "Dig deeper" section;
- a workbook or practical exercise whose answers persist locally;
- a 3–6 question quiz with feedback explaining every correct and incorrect option;
- a short knowledge check or transition that states a concrete task, not an aphorism;
- a source drawer;
- "Further learning" at the bottom.
The total time must reflect reading, diagrams, quizzes, exercises, and the capstone. Do not inflate duration labels to reach a target. Add material only when it teaches a required mechanism, relationship, decision, or skill.
## Main lesson writing
Write for a smart reader who is new to this product area. Simplify the language without removing the technical content.
Name real services, protocols, states, headers, records, data structures, algorithms, and failure modes when the research supports them. Introduce each unfamiliar term with a plain definition before using it as shorthand. Explain cause and effect in connected paragraphs so the reader can follow how one choice changes the next backend step.
Use ordinary technical prose. Sentences may be long when they connect related ideas clearly. Vary sentence length naturally. Do not turn a process into a stack of tiny sentences such as "The request arrives. The service checks it. A record appears. Work begins." Combine related facts and explain why the sequence matters.
Do not announce the teaching method. Avoid sentences such as "We will use the real names throughout the course, but we will not throw them at you all at once." Introduce the term and definition directly.
Use analogies only when they clarify one point in one sentence. Never let an analogy replace the real architecture.
Do not repeat the same five-part headings as a substitute for prose. The teaching before and after the component must connect those fields into a readable explanation.
### Headings and labels
Headings must describe the actual subject, task, evidence, or mechanism. They should sound like an engineer explaining what the section contains.
Good headings:
- "What happens after a cache miss"
- "How the cache key is constructed"
- "Check whether the request reached the origin"
- "Which configuration wins"
- "Why two regions can return different results during propagation"
Bad headings:
- "Map the whole system"
- "One request, five views"
- "Start at the last proven handoff"
- "The truth about caching"
- "Where the magic happens"
- "A tale of two paths"
Avoid labels that sound designed for a conference slide, management framework, or branded methodology. Do not compress conditional troubleshooting advice into a universal-sounding rule. State what to inspect and why.
### Editorial rules
Run a complete editorial pass after drafting every module. Preserve useful technical detail while removing these patterns:
- binary contrasts written for cadence, such as "This is not X. It is Y.";
- throat-clearing and faux-insight setups;
- dramatic colon reveals;
- unsupported importance claims;
- interpretive commentary such as "This distinction matters," "The key point is," or "As you can see";
- fake-strong verbs when `is`, `has`, `stores`, `checks`, `sends`, or `runs` is clearer;
- rotating among synonyms when one technical term should remain consistent;
- stacked fragments and repeated sentence shapes;
- self-answered rhetorical questions;
- final aphorisms, cute metaphors, and mic-drop conclusions;
- recap paragraphs that repeat the lesson;
- decorative bold, emoji headings, and headers over tiny sections;
- decorative em dashes;
- generic sentences that could be pasted into a course for any product area.
Prefer direct verbs and concrete subjects. Name the service or actor when known. Replace generic claims with mechanisms, examples, states, or observable consequences.
Do not use these words unless they appear in a quoted source or proper name: `delve`, `foster`, `leverage`, `utilize`, `facilitate`, `empower`, `streamline`, `robust`, `cutting-edge`, `paradigm shift`, `game changer`, `tapestry`, `realm`, `beacon`, `multifaceted`, `meticulous`, `intricate`, `paramount`, `transformative`, `elevate`, `embark`, `supercharge`, `harness`, `ever-evolving`.
The final copy should sound natural when read aloud to an experienced colleague. It should not sound as though someone invented a memorable framework after the fact.
## Dig deeper sections
Put architecture that mainly serves Principal Engineer or specialist readers inside native collapsed disclosures labeled `Dig deeper`. Include at least one in every module and more when the subject supports them.
Main lesson content must still be complete without opening the disclosure. Do not use `Dig deeper` as a place to hide missing explanations.
These sections may use denser and more specialized language. Good subjects include:
- consistency and convergence models;
- concurrency, leases, fencing, idempotency, and race conditions;
- data structures, partitioning, sharding, placement, and scheduling constraints;
- cache correctness, invalidation graphs, and content identity;
- protocol negotiation and compatibility boundaries;
- multi-tenant security and trust boundaries;
- propagation and distributed request assignment;
- state-machine invariants and failure recovery;
- metric aggregation, causal ordering, and retry bias;
- architectural tradeoffs, migrations, and legacy coexistence.
The disclosure heading must name the technical question it answers. Use "How configuration changes propagate to request-serving regions," not "Configuration is a journey."
Source every deep technical claim. Mark historical and proposed behavior explicitly.
## Customer and diagnostic viewpoint
Keep the course engineering-first without making it engineering-only. For every backend behavior, explain which customer decision selected it and which visible result follows.
Cover the customer surfaces appropriate to the area: dashboard settings, APIs, SDKs, CLI commands, configuration files, traffic, headers, logs, metrics, usage, billing, status checks, or provider interfaces.
Diagnostic scenarios should teach evidence collection, not pattern matching. For each scenario, require the student to record:
- the customer action and intended result;
- immutable identifiers and an exact time window when available;
- resolved configuration;
- the last state or behavior confirmed by evidence;
- the next expected transition or request path;
- the customer-visible symptom;
- the smallest likely failure boundary;
- competing explanations and the evidence that would distinguish them;
- the next safe verification step;
- the likely owner only after the evidence supports that handoff.
Do not treat the component that displayed an error as the cause. Do not claim that a successful retry explains an earlier failure. Separate current recovery from proven root cause.
## Capstone
Create one fictional company and one realistic workflow that passes through the major parts of the selected product area. Reuse the company throughout the course when that improves continuity.
The capstone should take 70–90 minutes. It must require the student to configure or reason through the workflow, trace its backend path, interpret customer-visible behavior, and diagnose at least four injected failures.
Choose failures that occur at different boundaries. For a CDN course, suitable categories might include a cache-key mismatch, an origin response that prevents caching, stale content caused by invalidation scope, a regional propagation delay, or a request that bypasses the expected cache because of routing or authorization. Derive the actual failures from verified product behavior.
The final capstone artifact is an evidence packet containing:
- the expected customer workflow;
- the end-to-end system trace;
- identifiers, timestamps, and configuration snapshots;
- customer-visible evidence paired with backend evidence;
- the injected failure analysis;
- alternatives ruled out by evidence;
- the next test;
- a plain customer explanation;
- an engineering escalation suitable for the owning team.
## Application requirements
Extend the self-contained local application using its installed versions of Next.js, TypeScript, App Router, pnpm, ESLint, and its committed lockfile. Do not upgrade dependencies unless the new course requires it. Before using Next.js APIs, read the documentation installed with the selected Next.js version and follow its current conventions.
Use validated MDX for lessons and typed TypeScript metadata. At minimum, define types equivalent to:
- `Module` or `Lesson`;
- `Quiz` and quiz options;
- `Challenge` or workbook fields;
- `SourceRef`;
- versioned `ProgressState`.
The shared app needs to keep providing:
- a compact course dashboard with total progress, module cards, and a resume action;
- module routes and previous/next navigation;
- a readable lesson view with an approximately 800–900 px text column on desktop;
- responsive navigation;
- light and dark themes;
- a searchable glossary;
- a source-ledger page;
- accessible code blocks and tables;
- architecture and state-flow diagrams;
- interactive customer-choice explorers or comparisons where they improve understanding;
- native accessible `details`/`summary` controls for `Dig deeper`;
- quizzes with immediate feedback and explanations for every option;
- persistent workbook and capstone fields;
- module completion and resume state;
- reset plus JSON export/import;
- a visible internal-only notice;
- source provenance drawers;
- bottom-only "Further learning."
Store progress, quiz answers, theme, workbook answers, capstone work, and resume position in `localStorage`. Version the schema and keep every course under its own slug. If branding or schema keys change, migrate earlier data instead of silently losing it.
Do not add authentication, a database, telemetry, analytics, or runtime content fetching. The application must work after a local build with all lesson content included.
### Visual direction
Follow the app's Geist design system: high contrast, restrained color, strong typography, a 4 px spacing grid, clear hierarchy, subtle borders, accessible focus states, and responsive layouts. Reuse the existing shared shell and components rather than inventing a separate visual language for the new course. Preserve the compact pace of Fireship and the teaching readability of react.gg without copying either site's assets, layout, or prose.
Use restrained color, strong typography, clear section rhythm, compact cards, visible progress, and narrow enough line lengths for long technical reading. The main reading column may be wider than a conventional documentation page when diagrams and tables need it, but prose should remain comfortable.
Do not allow horizontal page scrolling at any supported viewport. Diagrams, flows, tables, code, long service names, and source rows must wrap, stack, or adapt. A pipeline should remain readable without pushing its final step onto an accidental second line at ordinary desktop widths. On mobile, use an intentional stacked layout rather than a clipped desktop row.
Use semantic HTML, visible keyboard focus, accessible labels, sufficient contrast, and keyboard-operable interactive elements. Respect reduced-motion preferences.
## Content and code validation
Create automated validation that fails when:
- lesson IDs or slugs are duplicated;
- module order is invalid;
- total duration falls outside the realistic range established by the researched curriculum;
- a module has fewer than four chapters;
- a module lacks the five-part customer/backend model;
- a module lacks `Dig deeper`, a workbook exercise, a diagnostic scenario, or a knowledge check;
- a module contains fewer than three or more than six quiz questions;
- a quiz does not have exactly one correct option;
- any quiz option lacks an explanation;
- a source reference is missing from the ledger;
- a source status is invalid;
- a module contains no further-learning resource;
- substantive instructional content is too thin;
- further learning appears anywhere except the lesson bottom.
Add unit tests for:
- progress normalization and schema migration;
- completion calculations;
- quiz scoring;
- import and export validation;
- reset behavior;
- any content helper whose failure would lose student work.
Add browser tests for desktop and mobile that cover:
- first visit and starting the course;
- resume behavior;
- lesson navigation;
- quiz feedback;
- workbook and capstone persistence after reload;
- module completion;
- theme switching;
- glossary and sources;
- keyboard expansion of `Dig deeper`;
- progress migration when applicable;
- every application route at representative viewport widths;
- absence of document-level and nested horizontal scrolling.
Run and pass:
```bash
pnpm validate:content
pnpm typecheck
pnpm lint
pnpm test
pnpm build
pnpm test:e2e
```
Visually inspect at least:
- the dashboard;
- the first system-map module;
- a module with a wide diagram or table;
- an open `Dig deeper` disclosure;
- a quiz with feedback;
- the capstone;
- the source ledger;
- desktop and mobile layouts.
Verify heading wrapping, line length, table behavior, diagram layout, keyboard focus, and horizontal overflow in the rendered application.
## Implementation sequence
Use this order so the content and application agree:
1. Inspect the workspace and applicable instructions.
2. Research the product area and create the source ledger.
3. Write the end-to-end product-area map and reconcile current, legacy, and proposed behavior.
4. Derive the curriculum, map Software Engineer, Staff, and Principal depth, and assign realistic durations without compressing required subjects.
5. Add the course's typed content, MDX files, glossary, source ledger, and content map to the existing application.
6. Register the course with the shared catalog, routes, progress system, teaching components, glossary, and source views.
7. Write every module in full, including diagrams, exercises, quizzes, deep dives, scenarios, and capstone work.
8. Run the plain-language and no-slop editorial pass across lesson content and interface copy.
9. Add content validation, unit tests, and browser tests.
10. Run the full verification suite and fix failures.
11. Start the app locally and inspect it in a browser.
12. Report the local URL, output path, curriculum duration, source count, major research limits, and exact verification results.
Do not report completion while substantive modules are placeholders, while lessons depend on external links, while important internals remain unverified without labels, or while tests are failing.
## Final acceptance criteria
The work is complete only when:
- the existing local `digdeep` app runs;
- the new course appears in the course catalog and all `/courses/<slug>` routes work;
- no existing course content or progress is lost;
- the course contains enough substantive instruction and practice to cover the complete product architecture without padding or arbitrary compression;
- the full customer-to-backend-to-customer path is covered;
- every unfamiliar term is defined before the course relies on it;
- every technical module connects customer choices to backend behavior and visible results;
- current, legacy, proposed, and customer-facing claims are clearly separated;
- important internals are verified against current code or explicitly labeled as unverified;
- the course teaches every required concept without external reading;
- the capstone exercises the major product boundaries and diagnostic reasoning;
- the main lesson prose is approachable and connected;
- Principal-level detail is available in `Dig deeper` without overwhelming the main lesson;
- headings describe actual tasks or mechanisms instead of slogans;
- the interface has no horizontal scrolling on desktop or mobile;
- progress, quizzes, workbook answers, theme, resume state, reset, and JSON import/export work;
- content validation, type checking, linting, unit tests, production build, and browser tests all pass;
- the app is running locally for review.
Begin now. Research the selected product area, build the course, verify it, and start the application.