Skip to content

Forgemind-git/ho4-context-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HO4 — The One-Shot Rebuild

Hands-on portfolio project · Week 2 · Solo · module M7. Part of the ForgeMind AI — AI Productivity Essentials course.

Goal

Done when: a single prompt rebuilds — in one shot, in a fresh chat — what first took you a dozen messy turns, and you can show the turn count that proves it.

The idea in one minute

Build a small tool in a Claude chat the way everyone actually does it: one vague prompt, then fix, fix, fix. It takes a dozen turns or more.

Those turns were not Claude being slow. Every one of them was a rule you already knew — a cap, an edge case, the order things apply in — arriving late, one drip at a time. Claude was never the bottleneck. Your context was.

So write them all down, fold them into one prompt, open a fresh chat, and build the same thing in a single message. That collapse — fourteen turns to one — is the whole of Module 7, in a number you produced yourself.

Context is the lever.

What you do

  1. Build it the messy way. Do not tidy up as you go — let it be wrong. The wrongness is your data. Count your turns.
  2. Get the corrections log. When it works, ask Claude in that same chat to list every correction you gave it. It has the whole conversation in front of it, so this costs almost nothing.
  3. Read the log honestly. Almost every line is something you knew before you started. That is the uncomfortable part, and it is the point.
  4. Fold it into one prompt — role, spec, every rule, the order they apply in, the edge cases, the output format.
  5. Fresh chat. One message. Not the old chat — the context is already in there, and it would prove nothing.
  6. Push the evidence.

Pick a problem statement

Choose one — each maps to a fully worked example in samples/ you can open, run and step through. Each is a tool with real rules, on purpose: a tool with no rules produces no corrections, and the corrections log is the exercise.

  1. Quote calculator — slab pricing that isn't marginal, an order of operations (rush, then discount, then tax), a discount cap, a rounding rule that hits the total but not the line items, a minimum invoice floor. (14 turns → 1)
  2. Interview scorecard — weights, a must-have gate that overrides the arithmetic entirely, an inclusive threshold, a tie-break, and the rule that a blank is not a zero. (13 turns → 1)
  3. Expense-claim checker — three caps that look identical and behave in three different ways: meals cap-and-pay, hotels cap-and-reject, travel cap-and-escalate. (12 turns → 1)
  4. Ad-budget planner — blended cost-per-lead is spend ÷ leads, not the average of the channel CPLs, which is what everyone reaches for. Plus minimum viable spends. (13 turns → 1)
  5. Delivery-promise checker — a cut-off where 5:00pm exactly still makes it, weekends, holidays, and the order they compound in. (14 turns → 1)

Or bring your own tool — as long as it has rules that live in your head.

What to ship

ho4-context-template/
├─ v1-iterated/index.html   ← the messy build, exactly as it ended up
├─ corrections.md           ← every correction you had to give Claude
├─ one-shot-prompt.md       ← the distilled context — THE REAL DELIVERABLE
├─ v2-oneshot/index.html    ← built from that prompt, one message, fresh chat
├─ scorecard.md             ← turns before → after, and feature parity
└─ README.md

one-shot-prompt.md is the deliverable. The tool is only the proof that the context is complete.

The three prompts

1 · Start messy. Be as vague as you normally are — if you write a good prompt now, you'll have nothing to learn.

Build me a single-file HTML <your tool>. No login, no backend, one screen.

2 · Make Claude write your corrections log. Paste this the moment the tool works, in the same chat.

The tool works now. Go back over this entire chat and list EVERY correction I had to give you — every rule, cap, threshold, edge case, order of operations and formatting decision that was not in my first message. Numbered list, and name the kind of rule each one is. Do not rebuild anything.

3 · Distil it. Still in the same chat.

Now write me ONE prompt that would have produced this tool correctly on the first try, in a chat with no history. Carry every rule, the ORDER they apply in, the edge cases and the output format. Write it as a prompt I can paste. Do NOT rebuild the tool.

Then open a genuinely fresh chat and paste it.

Why prompt 2 is nearly free: Claude already has the whole conversation in context, so it is reading, not thinking from scratch. And "do NOT rebuild the tool" in prompt 3 earns its keep — without it Claude will helpfully re-print the entire page, which is the most expensive thing you can ask for, and you already have it.

If the rebuild misses a rule

That is the most valuable thing that can happen in this hands-on.

It does not mean the model forgot. It means you left that rule out of the log — you fixed it in the chat and never wrote it down, so it never reached the prompt. Add it and go again. The gap between what I told Claude and what I think I told Claude is exactly what context engineering is about.

About this repo

samples/sample-01 … sample-05 are five complete worked examples. Each one has a live, working tool (change the inputs and the rules fire), a step-through of every turn of the messy build, the corrections log, and the one-shot prompt that replaced it.

No API key. Everything runs on your normal Claude.ai subscription.


HO4 · Solo · ForgeMind AI Course · Module M7 (Week 2)

About

HO4 — Custom Claude Reusable Context Template · ForgeMind AI hands-on (Week 2)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages