Lesson 2 of 4 · Free to read
Exercises
Exercises — AI-Augmented Workflows end-to-end
Watch & learn
Course video
Course video
Keep a prompt log while you work. Speed without a trail is not a skill — it is luck.
How to use this file
- The main lab (Exercise 1) is the module's signature artifact — produce an evidence pack.
- All exercises require a
PROMPTS.mdand anEVIDENCE.md. - AI hints are starting points; your prompts will be more specific.
Exercise 1 — Ship a feature end-to-end (the lab)
Goal: take a feature request from feature_request_lab/REQUESTS/ from request → production-shaped artifact, with an EVIDENCE.md reviewers will trust.
Time: 100 minutes
Level: intermediate
Modules touched: [17-ai-augmented-workflows, 02, 07, 11, 14]
Setup
- Pre-clone
code-examples/python/feature_request_lab/. - Pick a request from
REQUESTS/. - Open the folder in Cursor with the Reviewer/Editor and Code-Example Author rules manually on when relevant.
Steps
- Read the request. Log the first prompt: a Specify of "smallest change that ships value".
- Branch:
git switch -c feat/<thing>. - Code; read diffs; iterate.
- Tests: list first, generate, run.
- PR:
gh pr createwith body drafted from the prompt log (then edited by you). - Review: AI Reviewer/Editor; adjudicate.
- Deploy: in the lab, "deploy" = green pipeline + simulated
kubectl rolloutscript. - Observe: link or screenshot of the new metric / log line.
- Write
EVIDENCE.mdper the template.
Success criteria
- Merged PR (locally — green tests, lint clean).
EVIDENCE.mdwith ≥6 prompt entries, ≥2 rejections with reasoning, observation evidence, a retro line.- Decisions section names ≥1 alternative considered and the reason for the chosen path.
AI prompt hints
- Specify: "Smallest change to this codebase to ship the request in
REQUEST.md. List the files you'd touch and why. Do not write code yet." - Critique: "Review the diff I'm about to commit. List the 3 weakest assumptions and a test for each."
- Triage: "Given this stack trace, the latency graph, and this anonymised log, what are the 3 most likely root causes?"
Solution sketch
The point is the rhythm. Strong learners cycle through Specify → Iterate → Critique multiple times per step. Weak ones lurch from prompt to prompt without a plan. The evidence pack exposes the difference.
Stretch
- Have another pair review your
EVIDENCE.mdusing the Reviewer/Editor persona. Address the findings.
Exercise 2 — Disengage drill
Goal: deliberately let AI lead you down a wrong path; spot it; disengage; recover. Time: 30 minutes Level: intermediate Modules touched: [17-ai-augmented-workflows, 02-ai-assisted-development]
Setup
- Use the same
feature_request_lab/. - Pick a request you haven't done in Exercise 1.
Steps
- Without thinking carefully, just paste the request into Cursor and accept whatever comes back.
- Run the tests. If they pass, deliberately add a constraint that makes them fail (e.g., "all responses must include a
request_idheader"). - Continue prompting AI for fixes. Notice when AI starts repeating itself or piling complexity.
- Disengage: restart the chat, summarise the actual state in 3 sentences yourself, then re-prompt with bounded scope.
- Document the disengage moment in
PROMPTS.md.
Success criteria
- A clear "disengage" entry in the log with: symptoms (AI repeated itself / context grew unmanageable / wrong frame), the restart prompt, the outcome.
AI prompt hints
- (Use intentionally too-broad prompts to trigger the spiral. Then use bounded restart prompts to recover.)
Solution sketch
The discipline being taught is meta-cognition. Strong learners spot the spiral within 2 prompts; weak ones notice after 6. Either is fine — recording the realisation is the lesson.
Stretch
- Write a 3-sentence personal "disengage checklist" you'd consult in real work.
Exercise 3 — Incident triage with AI (safe version)
Goal: triage the incident from Module 14 using AI as a thought partner without leaking secrets. Time: 45 minutes Level: intermediate Modules touched: [17-ai-augmented-workflows, 14-observability, 15-security-and-supply-chain]
Setup
- Trigger the incident in
code-examples/python/observability_stack/. - Open Grafana.
Steps
- Read the alert. Describe the symptom in plain language (no specifics from the alert that might be sensitive).
- Ask AI for "3 most likely root causes for symptom X in service Y, ranked".
- Fetch one piece of data per hypothesis. Sanitise before sharing with AI (remove user ids, IPs, tokens).
- Critique AI's hypotheses against the data.
- Decide root cause; propose mitigation.
- Log in
TRIAGE.mdandPROMPTS.md— including which data you chose not to share with AI and why.
Success criteria
- Hypothesis matches or near-matches actual root cause.
- ≥1 "did not share with AI because…" entry.
AI prompt hints
- "Given symptom 'p95 latency for
/workrose from 80ms to 600ms over 5 minutes, error rate from 2% to 35%', list 3 ranked root-cause hypotheses for a typical web service." - "Here's a sanitised log line excerpt (no PII, no IPs, no tokens). Does it support hypothesis 2?"
Solution sketch
The "didn't share" entries are the assessment. Strong learners pre-decide what's safe; weak ones over-share then redact later.
Stretch
- Compare time-to-hypothesis with the solo run from Module 14 Exercise 4.
Exercise 4 — Critique another pair's evidence pack
Goal: read another pair's EVIDENCE.md from Exercise 1; produce a structured critique using the Reviewer/Editor persona.
Time: 30 minutes
Level: intermediate
Modules touched: [17-ai-augmented-workflows, 07-version-control-and-collaboration]
Setup
- Trade
EVIDENCE.mdfiles with another pair (commit to a shared branch).
Steps
- Read the pack end-to-end before critiquing.
- Activate the Reviewer/Editor persona in Cursor.
- Produce a
REVIEW.mdwith: strengths, findings (blocker/major/minor/nit), suggested diffs. - Post via
gh pr reviewon the pair's PR (or as a markdown file if no PR).
Success criteria
- ≥2 strengths.
- 3+ findings, each with severity and concrete fix.
- No silent rewrites.
AI prompt hints
- "Act as a senior reviewer. Score this EVIDENCE.md on (1) decisions, (2) prompt log quality, (3) rejection reasoning, (4) observability evidence. Each on a 1–5 scale."
Solution sketch
The cross-critique builds cohort calibration. Patterns emerge: most packs are strong on prompts but weak on rejections.
Stretch
- Aggregate findings across the cohort. What's the most common weakness?
Exercise 5 — Build a "next-prompt suggester" (advanced)
Goal: write a small script that reads your PROMPTS.md and suggests the next prompt based on the loop step.
Time: 60 minutes
Level: advanced
Modules touched: [17-ai-augmented-workflows, 02-ai-assisted-development]
Setup
- Open
code-examples/python/feature_request_lab/. Write a new scripttools/suggest_next.py.
Steps
- Parse
PROMPTS.md(your own log). Extract the loop step from each entry (Plan / Code / Tests / PR / Review / Deploy / Observe). - Determine the current step (the latest entry's step).
- Suggest the next step + the prompt pattern (Specify / Iterate / Constrain / Critique) most likely to help.
- Output the suggestion as a single block ready to paste into Cursor.
Success criteria
- Script runs against your real log and emits a sensible suggestion.
- Script handles missing / malformed entries gracefully.
AI prompt hints
- "Ask Cursor: 'Given this PROMPTS.md format, write a Python parser. Output the parser only.'"
- "Critique the parser's edge cases. What does it miss?"
Solution sketch
A 60-line script. The discipline is in the design: rule-based ("if last step was Code, next is Tests with Specify") is fine — no ML needed.
Stretch
- Wire as a
git hook(post-commit) that prints the suggestion.