🦞 OpenClaw Bootcamp
DAY 14 / 16
💻
OpenClaw Bootcamp · Day 14

Agentic Coding:
Your Agent Builds

Your agent isn’t autocomplete. It reads code, makes plans, writes implementations, runs tests, and fixes errors — full autonomous development with exec, read, write, and edit.

exec + read/write Build Logs Sub-Agent Coding
🦞 OpenClaw Bootcamp
DAY 14 / 16
Where We Are & Where We’re Going

Day 14 Goals

Day 13 Checkpoint
  • VPS deployed with OpenClaw running as a daemon
  • Remote access configured and tested
  • Security audit completed on your deployment
01
Understand agentic coding — how your agent uses exec, read, write, and edit to develop autonomously
02
Master the “align-before-build” prompting pattern and build logs for multi-session projects
03
Use sub-agent coding patterns to orchestrate research, implementation, testing, and review
🦞 OpenClaw Bootcamp
DAY 14 / 16
The Paradigm Shift

What Is Agentic Coding?

Not autocomplete. Not code suggestions. Full autonomous development — your agent reads code, makes plans, writes implementations, runs tests, and fixes errors.

The Agent Loop
  • 1. Read — Understand the codebase, files, and context
  • 2. Plan — Decide what to build and how
  • 3. Write — Create or edit files with implementations
  • 4. Test — Run commands to verify the code works
  • 5. Fix — Debug errors and iterate until passing
Align Before Build

The golden prompting pattern: explain your idea, let the agent ask clarifying questions, agree on the approach, then execute. Never skip the alignment step — it’s what separates useful output from wasted tokens.

Safety Net

Exec approval (tools.exec.ask: "always") ensures the agent asks before running commands. You stay in control while it does the heavy lifting.

🦞 OpenClaw Bootcamp
DAY 14 / 16
Tools for Building

The Coding Toolkit

⚙️

exec

Run any command: npm, git, python, cargo, docker, make. The agent’s hands on the keyboard. Approval gating keeps you in control.

📄

read / write / edit

Full file operations. Read source code, write new files, edit existing ones with surgical precision. The agent’s core development tools.

🌐

web_search / web_fetch

Research documentation, look up API references, fetch package readmes. The agent can learn what it doesn’t already know.

🖥️

browser

Test web applications visually. Open pages, click elements, verify UI renders correctly. End-to-end testing without leaving the agent.

🤖

sessions_spawn

Delegate subtasks to sub-agents. Research in parallel, implement in isolation, test independently. Orchestrated development.

🔒

Exec Approval

tools.exec.ask: "always" — your safety net. The agent proposes commands, you approve. Full visibility into every action.

🦞 OpenClaw Bootcamp
DAY 14 / 16
The Golden Rule

Prompting for Code

Flesh Out Before Executing
  • 01Explain your idea. Describe what you want built, the constraints, the expected behavior.
  • 02Let the agent ask questions. Good agents clarify before coding. Encourage this.
  • 03Agree on approach. Review the plan before a single line of code is written.
  • 04Execute. Now the agent builds with clarity, not guesswork.
Reverse Prompting

Ask the agent questions back. “What edge cases should we handle?” “What dependencies does this need?” “What could break?” The agent often knows things you haven’t considered.

Build Logs

Create memory/build-project-name.md to track progress across sessions. If a session crashes, the next session reads the log and picks up exactly where it left off.

Anti-Pattern

“Build me a full-stack app.” Too vague, too big. Break it into discrete features. One prompt, one feature, one verification cycle.

🦞 OpenClaw Bootcamp
DAY 14 / 16
Multi-Session Projects

Planning & Build Logs

The Rule

Any project that takes more than 3 steps or more than 2 hours needs a plan file first. No exceptions. Create memory/build-project-name.md before writing a single line of code.

// The plan prompt "Before we build, create memory/build-[name].md with: - Goal and constraints - Steps with checkboxes - Current status - Decisions made - Blockers and open questions"
Session Crash Recovery

If a session dies mid-build, the next session reads the build log and picks up from the last checked-off step. No repeated work, no lost context. The log is the continuity.

What Goes in a Build Log
  • Goal — What we’re building and why
  • Steps — Ordered tasks with checkboxes
  • Status — Current step, last updated timestamp
  • Decisions — Why we chose X over Y
  • Blockers — What’s stuck and what to try next
  • Completed — What’s done, with notes
Log Every Step

After each step completes, update the build log. Check the box, note what happened, update the status. This discipline pays off every time a session ends unexpectedly.

🦞 OpenClaw Bootcamp
DAY 14 / 16
Reusable Workflows

Skills for Development

Dev-Relevant Skills
  • GitHub skill — Repos, PRs, issues, code review
  • Code review skills — Automated review patterns
  • CI/CD monitoring — Watch builds, report failures
From Task to Skill

“Turn what you just did into a skill.” After the agent completes a coding task successfully, ask it to extract the workflow into a reusable skill. Instant automation.

Three Ways to Create Skills
  • 01From scratch. Define the skill manually with instructions, triggers, and steps. Best for well-understood workflows.
  • 02From a completed task. “Turn what you just did into a skill.” The agent extracts the pattern from its own session history.
  • 03Walk through step by step. Guide the agent through the workflow interactively, then ask it to codify the process as a skill.
🦞 OpenClaw Bootcamp
DAY 14 / 16
Orchestrated Development

Sub-Agent Coding Patterns

The Orchestrator Pattern
  • Research agent — Investigate APIs, read docs, find examples
  • Implementation agent — Write the actual code
  • Testing agent — Write and run test suites
  • Review agent — Code review and quality checks
Key Rule

One discrete feature per spawn. Never “build the whole thing.” Sub-agents are ephemeral — one task per spawn. The main agent monitors progress via build logs.

Timing & Coordination

Space spawns 20–30 minutes apart. Don’t flood the system. Each sub-agent needs time to complete its task before the next one picks up the results.

1
Task per spawn
20-30m
Between spawns
Build Log as Coordination

Sub-agents are ephemeral, but the build log persists. Each sub-agent reads the log on start, does its work, updates the log on completion. The log is the shared state between all agents.

🦞 OpenClaw Bootcamp
DAY 14 / 16
Before Day 15

Day 14 Homework

  • 01

    Create a Build Log

    Pick any project — even a small one — and create memory/build-project-name.md with goal, steps, status, and decisions. Practice the discipline before you need it on a real multi-session build.

  • 02

    Write a Script with exec + write

    Ask your agent to write a small utility script — a file renamer, a log parser, a data formatter. Use the “align-before-build” pattern: explain the idea, let the agent ask questions, agree on approach, then execute.

  • 03

    Spawn a Sub-Agent for a Coding Subtask

    Use sessions_spawn or /subagents spawn to delegate a discrete coding subtask — writing tests, creating documentation, or researching an API. Monitor it with /subagents log.

  • 04

    Turn a Task into a Skill

    After completing a coding task, tell the agent: “Turn what you just did into a skill.” Review the generated skill definition. This is how you build a library of reusable development workflows.

🦞 OpenClaw Bootcamp
DAY 14 / 16
🦞
Coming Up

Day 15: Multi-Agent
Orchestrate Specialized Agents

You’ve used sub-agents for coding subtasks. Day 15 takes it further — multiple distinct agents with different roles, different configs, and different capabilities, all working together on complex workflows. Orchestration at scale.

Multi-Agent Architecture Agent Routing Orchestration Patterns