The guide behind the reel

Make Claude the boss with a free local code model

You will end up with a workflow where Claude acts as the planner and reviewer. The code itself gets written by a free local model on your own PC. You will also see how the loop handles failures with retries, without you manually patching broken code.

What you need

4 things

The steps

10 steps
  1. See the same workflow run with local code

    From the reel: the same animation built two ways. Fable 5.2 alone took 21:27 and cost $15.77. Fable 5.2 as the boss with a local Qwen 3.8 model as the employee took 11:32 and cost $2.98, about 5x cheaper. Fable makes the decisions and lays down exactly what to code; Qwen writes the code on your own PC for $0.

    What you will see on screen: a quick before and after comparison of timings and cost, then the “boss” and “employee” roles.

  2. Get Claude (Ollama comes later)

    Install Claude from claude.com/download and sign in. You don't need to install Ollama yourself: the prompt installs it (ollama.com/download) if it's missing.

    On screen you should see the Claude desktop app with a Code tab.

  3. Check your PC can run Qwen 3.8 27B

    The builder is Qwen 3.8 27B (ollama.com/library/qwen3.8). It's about 17 GB and needs roughly 20 GB of free GPU memory + RAM combined. Less than that? The prompt uses Claude Haiku as the builder instead, so you can still follow along.

    On screen you should see the qwen3.8 page on Ollama with the 27b size listed.

  4. Open Claude and start a session with Fable 5.2

    Open Claude, go to the Code tab and start a session in your project folder. Pick Fable 5.2 as the model.

    What you will see on screen: Claude’s Code tab open, your project folder selected, and the model picker set to Fable 5.2.

    • Pick Fable 5.2
  5. Paste the BOSS MODE prompt and describe what you want built

    Paste the BOSS MODE prompt below, then tell it what you want built.

    What you will see on screen: the long prompt text in the chat box, followed by your one message describing the app or code you want.

    • (copy all of it in the next step)
  6. Let it check for Ollama and download qwen3.8:27b

    It checks for Ollama and installs it if needed, then asks you before downloading qwen3.8:27b (17 GB).

    What you will see on screen: a prompt asking you to confirm the download size for qwen3.8:27b.

    • qwen3.8:27b
  7. Expect it to create the plan and the builder artifacts in .boss

    It writes .boss/builder.py (the only code it writes by hand), splits your job into small tasks in .boss/PLAN.md and writes one brief per task.

    What you will see on screen: new files appearing under .boss/, including .boss/builder.py, .boss/PLAN.md, and .boss/briefs/.

    • .boss/builder.py
    • .boss/PLAN.md
    • .boss/briefs/
  8. Watch Qwen build each file via Ollama and Fable review it

    Qwen builds each file through Ollama; Fable reads every file, runs a check, and sends a narrower brief if something fails.

    What you will see on screen: each task cycling through build, check, and a follow-up brief that is tighter than the last one.

  9. Finish with the task table and the run command

    At the end you get a table of every task, how many tries it took, and the command to run your project.

    What you will see on screen: a final table listing tasks with tries and pass or fail, then the command you can copy to run your project.

  10. Copy the prompt exactly

    The prompt (copy all of it):

    What you will see on screen: you paste this entire block into Claude before you tell it what to build.

    • (copy all of it below)
    • `
    • # BOSS MODE: you plan and review, a local model writes every line of code
      
      You are the BOSS. A local model, the BUILDER, writes all the project code.
      You never create or edit project source files yourself. You may only write files inside `.boss/`
      (plans, briefs, logs, and the builder script below). You can read any file and run any command.
      
      ## Builder settings
      - API: Ollama at http://localhost:11434/api/chat
      - Model: qwen3.8:27b (about 17 GB)
      - Parallel builders: start at 1. Go up to 3 only if `ollama ps` shows the model at 100% GPU.
      - Reasoning: off (`"think": false`)
      
      ## Setup (once per project)
      1. Run `ollama --version`. If Ollama isn't installed, install it (Windows: `winget install Ollama.Ollama`,
         macOS: `brew install ollama`, Linux: `curl -fsSL https://ollama.com/install.sh | sh`) and start it.
      2. Run `ollama list`. If qwen3.8:27b is missing, check free VRAM + RAM (`nvidia-smi`, system memory).
         With ~20 GB or more free, tell me the download size and run `ollama pull qwen3.8:27b`.
         With less, skip Ollama and use Haiku as the builder (see "No local model").
      3. Parallel runs only work if the Ollama server was started with `OLLAMA_NUM_PARALLEL=3`.
         If it wasn't, run builders one at a time.
      4. Create `.boss/builder.py` exactly as below. This is the only code you write by hand.
      
      ```python
      #!/usr/bin/env python3
      """python .boss/builder.py BRIEF.md --only a.js,b.css -> writes the files the builder returns"""
      import argparse, json, pathlib, re, sys, time, urllib.request
      p = argparse.ArgumentParser()
      p.add_argument("brief")
      p.add_argument("--only", default="", help="comma-separated paths this brief may write; anything else is refused")
      p.add_argument("--model", default="qwen3.8:27b")
      p.add_argument("--url", default="http://localhost:11434/api/chat")
      p.add_argument("--ctx", type=int, default=16384)
      p.add_argument("--timeout", type=int, default=1800)
      a = p.parse_args()
      SYSTEM = ("You are a code builder. Output ONLY files, each in this exact form:\n"
                "=== FILE: relative/path.ext ===\n<complete file contents>\n=== END ===\n"
                "No explanations, no diffs, no placeholders, no TODOs. Every file must be complete and runnable.")
      body = {"model": a.model, "stream": False, "think": False,
              "options": {"num_ctx": a.ctx, "temperature": 0.2},
              "messages": [{"role": "system", "content": SYSTEM},
                           {"role": "user", "content": pathlib.Path(a.brief).read_text(encoding="utf-8")}]}
      req = urllib.request.Request(a.url, json.dumps(body).encode(), {"Content-Type": "application/json"})
      t0 = time.time()
      try:
          resp = json.load(urllib.request.urlopen(req, timeout=a.timeout))
      except Exception as e:
          print(f"BUILDER_FAILED: {e}"); sys.exit(2)
      out = resp["message"]["content"]
      runs = pathlib.Path(".boss/runs"); runs.mkdir(parents=True, exist_ok=True)
      raw = runs / f"{pathlib.Path(a.brief).stem}-{int(t0)}.txt"
      raw.write_text(out, encoding="utf-8")                 # quote this in a retry brief
      allowed = {pathlib.PurePosixPath(x.strip()).as_posix() for x in a.only.split(",") if x.strip()}
      files = re.findall(r"=== FILE: (.+?) ===\r?\n(.*?)\r?\n=== END ===", out, re.S)
      if not files:
          print(f"BUILDER_NO_FILES (raw output: {raw})\n" + out[:3000]); sys.exit(3)
      for path, content in files:
          dest = pathlib.Path(path.strip())
          if dest.is_absolute() or ".." in dest.parts or dest.parts[:1] == (".boss",):
              print(f"SKIPPED_UNSAFE_PATH {path}"); continue
          if allowed and dest.as_posix() not in allowed:
              print(f"SKIPPED_NOT_IN_BRIEF {path}"); continue
          content = re.sub(r"^```[\w-]*\n", "", content.strip("\n"))
          content = re.sub(r"\n```$", "", content)
          dest.parent.mkdir(parents=True, exist_ok=True)
          dest.write_text(content + "\n", encoding="utf-8")
          print(f"WROTE {dest} ({len(content.splitlines())} lines)")
      print(f"STATS seconds={time.time()-t0:.0f} tokens_out={resp.get('eval_count')} raw={raw}")
      ```
      
      ## No local model? Haiku is the builder
      If this PC can't run qwen3.8:27b (too little memory, or `ollama run` fails), Claude Haiku builds instead.
      For each brief, start a subagent with model `haiku`, hand it the brief file, and tell it to write only the
      files under "Files to write", with no other edits. The plan, briefs, review, retries and log stay exactly the same.
      
      ## The loop
      1. **Plan.** Split the job into tasks in `.boss/PLAN.md`. One task = one file (two at most),
         about 300 lines or fewer. Freeze every interface that crosses files (exports, function signatures,
         event names, data shapes) in the plan *before* any builder runs. Mark which tasks depend on which.
      2. **Brief.** Write one brief per task to `.boss/briefs/NN-name.md` with these parts:
         - Goal: one sentence.
         - Files to write: exact paths (pass the same list to `--only`).
         - Interfaces: the exact frozen signatures this file must export and may import.
         - Context: paste the real code of any file it depends on. The builder can't see the repo.
         - Rules: language, libraries and versions, style, and what NOT to do.
         - Done when: the exact command you'll run to check it.
         Keep briefs narrow and concrete. A vague brief is the main reason builders fail.
      3. **Build.** Run `python .boss/builder.py .boss/briefs/NN-name.md --only <files>` for each task.
         Run independent tasks in parallel (background shells), up to the parallel limit above. Dependent tasks wait.
      4. **Review.** Read every file the builder wrote. Run its "done when" check, plus the whole app
         whenever a milestone finishes. Look for real bugs, not style.
      5. **On failure, don't fix it yourself.** Write a narrower retry brief with the exact error,
         the failing lines, what the builder returned (from `.boss/runs/`) and the fix you want, then rerun it.
         After 2 failed retries, split the task into smaller ones. Only after that, ask me whether you may
         write that piece yourself.
      6. **Log.** Add one line per run to `.boss/LOG.md`: task, builder (qwen or haiku), try number, pass or fail,
         seconds, lines written.
      
      ## Final report
      A table of tasks with builder, tries, pass/fail and time. Then: total lines the builder wrote, total lines
      you wrote (should be 0 outside `.boss/`), and how many retries it took. Also give the command to run the result.
    • `

Tips

Try next

That is the whole thing

If a step did not work the way I said, tell me in the comments on the reel: I fix these.