Prompt Engineering and Vibe Coding
Learn to write prompts that give repeatable results, then use an AI coding assistant to build a small task and notes feature in one Next.js and TypeScript practice repository. Vibe coding here means prototyping and iterating on code through conversation with an AI, then adding review and verification before anything goes towards production. You turn a fuzzy idea into a specification, work in small reviewed changes, check the assistant's assumptions, test through real entry points and ship with evidence and a rollback plan. Modules 1–3 are beginner, modules 4–8 are intermediate, and modules 9–10 cover advanced production readiness. No experience is needed for the prompt basics; module 3 introduces Git and the command line before the coding labs, and Git, GitHub & GitHub Actions and Frontend with React and Next.js fill in more depth. GitHub Copilot is taught concretely, with portable templates for other assistants; its free tier is enough for the labs, and model API calls can be replaced by saved fixture responses.
What you will be able to do
- Write explicit prompts with a goal, context, constraints and answer format, and evaluate the responses
- Turn a feature idea into a specification with acceptance criteria and reusable prompt templates
- Measure prompt changes against versioned fixtures, rubrics and a baseline
- Guide a coding assistant through small, scoped changes inside clear permission and data boundaries
- Verify generated code with tests, browser checks, type checks and diff review
- Ship a feature with an evidence-based pull request, a release checklist and a tested rollback
Roadmap
Bar length shows each module's share of study time.
- 16h 30m3 topics
Tasks, context and output
Beginner. How to state a task clearly, use examples and boundaries, and ask a model to show its assumptions and uncertainty. No prior experience needed.
Show topicsNot startedRewrite a vague prompt into one with a goal, audience, context, constraints and answer format, and show the difference on the same fixture.
- State the goal and the audience
- Give only the context that matters
- Set constraints and a length limit
- Specify the answer format
- Compare vague and specific versions on one fixture
Choose between zero-shot and few-shot prompts, fence off input with clear delimiters and test the examples for contradictions and gaps.
- Compare zero-shot and few-shot prompts
- Pick examples that cover the edge cases
- Delimit input with tags or fences
- Write acceptance criteria for the answer
- Find contradictions and gaps in examples
Prompt a model to list its assumptions, ask for clarification when the task is unclear and back its answer with evidence that can be checked independently.
- Ask for stated assumptions
- Let the model ask clarifying questions
- Request evidence and sources
- Ask for a short decision rationale
- Check claims independently
- 28h3 topics
Structured and reusable prompts
Beginner. Structured output you can validate, prompt templates with versions, and choosing what goes into the context window.
Show topicsNot startedRequest output that matches a JSON schema, validate it in code and handle missing values and refusals without crashing.
- Describe the shape with a JSON schema
- Validate results with Zod
- Handle missing values and refusals
- Tell UI formatting from API guarantees
- Retry or fall back on invalid output
Build a versioned prompt template with named variables and representative inputs that keeps trusted instructions apart from reference material.
- Name variables and their types
- Keep representative test inputs
- Assign an owner and version notes
- Separate instructions from reference text
- Review template changes like code
Choose which files and examples go into a prompt and compare quality, latency and token cost across prompt revisions.
- Pick files and examples on purpose
- Order long context for recall
- Count tokens per revision
- Use caching for stable prefixes
- Compare quality, latency and cost
Module resources:OpenAI: structured outputs ↗ - 37h 30m3 topics
From idea to a small prototype
Beginner. The vibe coding workflow, giving a coding assistant the right repository context, and the Git loop for small changes. Introduces Git and the command line.
Show topicsNot startedTurn a feature idea into a user story, acceptance criteria and a short implementation checklist with prototype and review checkpoints.
- Write a user story
- Add testable acceptance criteria
- Break work into a short checklist
- Mark prototype and review checkpoints
- Decide when a prototype is done
Point a coding assistant at the relevant files, types, examples and conventions and add scoped repository instructions it supports.
- Attach the files that matter
- Share data types and examples
- State project conventions
- Add repository custom instructions
- Check what context the assistant used
Read the working tree, create a branch, review the assistant's plan, make one bounded edit and inspect the diff before committing.
- Learn the basic terminal commands
- Read git status and the log
- Create a branch with git switch
- Review the plan before any edit
- Inspect git diff before committing
- 49h3 topics
Measure improvement
Intermediate. Versioned evaluation fixtures, choosing between graders, and comparing prompt candidates against a baseline.
Show topicsNot startedBuild a versioned fixture set of normal, edge and high-cost failure cases, each with the expected behaviour written down.
- Collect normal cases
- Add edge cases and empty input
- Include costly failure cases
- Write the expected behaviour per case
- Version fixtures with the prompt
Pick deterministic checks, human review or a rubric-based model grader for each criterion and calibrate graders against reviewed examples.
- Use exact and schema checks first
- Write a scoring rubric
- Run a model grader on the rubric
- Calibrate against human-reviewed examples
- Record grader uncertainty
Run a candidate prompt against the baseline on accuracy, format validity, latency and cost and decide with a pass threshold.
- Freeze a baseline prompt and model
- Score accuracy and format validity
- Track latency and cost
- Set pass thresholds
- Note reproducibility limits
Module resources:OpenAI: evaluation best practices ↗ - 59h3 topics
Use focused prompts for real engineering tasks
Intermediate. Implementing from a spec, debugging with evidence, and refactoring and reviewing generated code.
Show topicsNot startedUse a reusable brief to get a minimal change limited to named files, following project conventions and meeting observable acceptance tests.
- Write a reusable implementation brief
- Limit the files in scope
- Restate project conventions
- Name observable acceptance tests
- Reject changes outside the scope
Give the assistant reproduction steps, logs and expected versus actual behaviour, get ranked hypotheses and verify the fix with the smallest diagnostic.
- Write reproduction steps
- Share logs and the error output
- State expected and actual behaviour
- Ask for ranked hypotheses
- Add one diagnostic and verify the fix
Define behaviour invariants before a refactor and review the generated code for correctness, complexity, accessibility and unintended changes.
- Write behaviour invariants
- Fix the test scope first
- Keep public interfaces compatible
- Review for complexity and accessibility
- Spot unintended changes in the diff
Module resources:Copilot cookbook ↗ - 68h 30m3 topics
Verify code through normal entry points
Intermediate. A test strategy for generated code, checking UI in a real browser, and running the repository's checks before review.
Show topicsNot startedMap each requirement to unit, integration or end-to-end checks, including invalid input, empty states, authorisation and regression cases.
- Map requirements to test levels
- Cover invalid input and empty states
- Test authorisation boundaries
- Add a regression test per bug
- Set up Vitest in Next.js
Exercise browser flows, keyboard access, mobile layout, loading and error states and capture evidence tied to each acceptance criterion.
- Drive the flow with Playwright
- Check keyboard access and focus
- Test mobile viewports
- Cover loading and error states
- Save screenshots as evidence
Run lint, type checks, tests and the build, inspect package and lockfile changes and write a compact pull request review.
- Run lint and the type check
- Run tests and the build
- Inspect new packages
- Read lockfile changes
- Write a compact review
Module resources:Next.js: testing ↗ - 77h 30m3 topics
Manage workspace and data access
Intermediate. Permission boundaries for chat, edit and agent modes, handling untrusted content, and keeping data and secrets private.
Show topicsNot startedCompare chat, edit and agent modes and limit repository, network and tool access so consequential actions need approval.
- Compare chat, edit and agent modes
- Limit files and repositories in scope
- Restrict network and terminal access
- Require approval for risky actions
- Review the action log
Treat tool output, web pages, tickets and documents as data and test that the assistant stays in scope when given a benign instruction conflict.
- Name sources of untrusted content
- Mark data apart from instructions
- Plant a benign conflicting instruction
- Check the assistant stays in scope
- Limit what a hijacked step can do
Use synthetic data and secret placeholders, configure provider data settings and review dependencies and generated migrations before they land.
- Use synthetic data and placeholders
- Exclude sensitive files from context
- Check provider data settings
- Verify dependency provenance
- Review generated migrations
- 88h 30m3 topics
Use external context responsibly
Intermediate. Connecting a read-only MCP context source, planned handoffs to an agent, and a shared prompt pack for a team.
Show topicsNot startedConnect a small read-only MCP context source in an optional lab and explain its trust, credentials, capability scope and audit trail.
- Explain MCP hosts, clients and servers
- Add a read-only server in VS Code
- Scope credentials and capabilities
- Decide which servers to trust
- Keep an audit trail of tool calls
Write a scoped plan with review checkpoints for an agent task and stop or roll back the change when validation fails.
- Write a scoped task plan
- Set review checkpoints
- Isolate work on a branch or worktree
- Stop when validation fails
- Roll back with git revert
Maintain versioned prompt files for planning, implementation, debugging, code review, test design and documentation, each with expected output.
- Pick the core task templates
- Store prompts as files in the repo
- Write expected output per template
- Add version notes
- Review and retire old prompts
- 97h2 topics
Production readiness
Advanced. Release checks and rollback for AI-assisted changes, and finding subtle risks in generated code.
Show topicsNot startedReview configuration, migrations, release checks and monitoring and simulate a failed release and its rollback in a local or preview environment.
- Check environment configuration
- Plan expand-and-contract migrations
- Run the release checklist
- Watch for errors after release
- Simulate a failure and roll back
Use repository evidence to find idempotency, concurrency, backward-compatibility and operational problems in generated code.
- Check idempotency of writes
- Question concurrency assumptions
- Test backward compatibility
- Review logging and error handling
- Back each finding with evidence
Module resources:Next.js: production checklist ↗ - 1017h3 topics
Ship a small feature with evidence
Advanced. Spec, build and release a small task or notes feature with a prompt pack, acceptance matrix, decision log and a demonstrated rollback.
Show topicsNot startedWrite a feature brief with constraints, first prompt versions, expected behaviour, an acceptance matrix and a baseline test plan before any code.
- Write the feature brief and constraints
- Draft the first prompt versions
- Build the acceptance matrix
- Write a baseline test plan
- Start the decision log
Build the feature in small reviewed changes, record prompt iterations including one failure that changed the next prompt, fix one real bug and review the diff.
- Build in small reviewed commits
- Record before-and-after prompts
- Log a failure that changed a prompt
- Fix one real bug with a test
- Write diff review notes
Run tests and accessibility checks, open a pull request with evidence, validate a local or preview release and demonstrate a rollback.
- Run tests and accessibility checks
- Attach test output to the pull request
- Validate a preview or local release
- Demonstrate the rollback
- Finish the release checklist
Module resources:GitHub: creating a pull request ↗