CompCode Academy

Lesson 2 of 4 · Free to read

Exercises

Exercises — AI-Augmented Workflows end-to-end

Watch & learn

Course video

Open on YouTube
How To Use Cursor AI (Full Tutorial 2025) — Install, chat, agent mode, and core Cursor loop.

Course video

Open on YouTube
From Vibe Coding to Agentic Engineering (Karpathy × Sequoia) — Why vibe coding raises the floor — and engineering raises the ceiling.

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.md and an EVIDENCE.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

Steps

  1. Read the request. Log the first prompt: a Specify of "smallest change that ships value".
  2. Branch: git switch -c feat/<thing>.
  3. Code; read diffs; iterate.
  4. Tests: list first, generate, run.
  5. PR: gh pr create with body drafted from the prompt log (then edited by you).
  6. Review: AI Reviewer/Editor; adjudicate.
  7. Deploy: in the lab, "deploy" = green pipeline + simulated kubectl rollout script.
  8. Observe: link or screenshot of the new metric / log line.
  9. Write EVIDENCE.md per the template.

Success criteria

  • Merged PR (locally — green tests, lint clean).
  • EVIDENCE.md with ≥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.md using 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

  1. Without thinking carefully, just paste the request into Cursor and accept whatever comes back.
  2. Run the tests. If they pass, deliberately add a constraint that makes them fail (e.g., "all responses must include a request_id header").
  3. Continue prompting AI for fixes. Notice when AI starts repeating itself or piling complexity.
  4. Disengage: restart the chat, summarise the actual state in 3 sentences yourself, then re-prompt with bounded scope.
  5. 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

Steps

  1. Read the alert. Describe the symptom in plain language (no specifics from the alert that might be sensitive).
  2. Ask AI for "3 most likely root causes for symptom X in service Y, ranked".
  3. Fetch one piece of data per hypothesis. Sanitise before sharing with AI (remove user ids, IPs, tokens).
  4. Critique AI's hypotheses against the data.
  5. Decide root cause; propose mitigation.
  6. Log in TRIAGE.md and PROMPTS.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 /work rose 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.md files with another pair (commit to a shared branch).

Steps

  1. Read the pack end-to-end before critiquing.
  2. Activate the Reviewer/Editor persona in Cursor.
  3. Produce a REVIEW.md with: strengths, findings (blocker/major/minor/nit), suggested diffs.
  4. Post via gh pr review on 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 script tools/suggest_next.py.

Steps

  1. Parse PROMPTS.md (your own log). Extract the loop step from each entry (Plan / Code / Tests / PR / Review / Deploy / Observe).
  2. Determine the current step (the latest entry's step).
  3. Suggest the next step + the prompt pattern (Specify / Iterate / Constrain / Critique) most likely to help.
  4. 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.

New free lessons and course updates. Unsubscribe from any email.