PTENES
TRACK 4

πŸ“‹ Practical Examples and Prompts

Ready-to-use recipes you can copy: from a simple loop to a multi-agent orchestrator, with copyable prompts, flow diagrams, and a troubleshooting checklist.

4
Modules
24
Topics
~2h
Duration
Practical
Level
4.1 Task Runner Simple loop plan.md + /loop 4.2 Issue Bot Orchestrator + workers worktrees + Neon 4.3 Multi-Agent Spec + rounds HITL checkpoints 4.4 Anti-Patterns Troubleshooting Ready-to-loop checklist BASIC INTERMEDIATE ADVANCED REFERENCE

Learning path map

Detailed content

4.1 ~30 min

🎯 Simple Loop: Task Runner

Ready-to-use prompt, plan.md template, how to monitor progress, and downloadable prompt pack.

What is:

The minimum prompt to activate the loop system in Claude Code, asking it to load the capability and process the tasks in plan.md one by one.

Ready-to-use prompt:

Load the loop skill, work through plan.md one task at a time

What is:

plan.md template with numbered tasks, acceptance criteria, and checkboxes for the agent to check off as each task is completed.

Why learn:

The quality of plan.md determines the quality of the output. Vague tasks produce vague results.

What is:

How to monitor a running loop: each cycle, the agent performs the task, validates it, and automatically schedules the next wake-up.

Key Concepts:

Slash loop wake-up. Validation per cycle. Terminal logs. plan.md status.

What is:

Explicit completion criteria: all tasks marked, /goal reached, max iterations as a safety net.

What is:

Prompt variations for different scenarios: refactoring, migration, documentation, testing.

What is:

A compilation of all the prompts in this module in copyable format, ready to use right away in Claude Code.

View Full
4.2 ~30 min

πŸ› Intermediate Loop: GitHub Issue Bot

Orchestrator session + 4 parallel workers, worktrees for isolation, database branches with Neon.

What is:

Configuring the main Claude Code session as an orchestrator that dispatches fix workflows for each issue in parallel.

What is:

Each worker operates in its own Git worktree, ensuring complete code isolation between parallel sessions.

What is:

Neon lets you create database branches per worker, preventing parallel changes from conflicting in the schema or data.

What is:

The complete pipeline: extract an issue, gather context, classify it, implement a fix, validate tests, create a PR, and perform a code review.

What is:

Optimize costs by using smaller models where reasoning is simple and larger models only where necessary.

What is:

A pack with orchestrator, worker, and review prompts, ready to adapt to your repository.

View Full
4.3 ~30 min

πŸ€– Advanced Loop: Multi-Agent Orchestrator

Spec document as input, orchestrator plans rounds and workers, validation between rounds, human-in-the-loop.

What is:

The spec document is the complete specification document that the orchestrator uses to plan all the work, divide it into rounds, and dispatch workers.

What is:

The orchestrator analyzes the spec and decides how many rounds are needed, how many workers to use per round, and which tasks each worker gets.

What is:

Each worker executes its task and writes the results to the external database (Postgres/Neon), allowing the orchestrator to keep track without relying on the context window.

What is:

After each round, the orchestrator validates the workers’ results before launching the next round, preventing errors from propagating.

What is:

Pause points where a human needs to approve the result before the loop continues, preventing the problem of β€œrunning for a day and coming back to a mess.”

What is:

A complete pack with orchestrator, worker, validation, and HITL prompts, adaptable to any project.

View Full
4.4 ~30 min

⚠ Anti-Patterns and Troubleshooting

The most common mistakes, how to debug, and a visual "ready to loop" checklist.

What is:

Loop with no defined stopping criteria: the agent runs indefinitely, spending tokens without converging on a result.

What is:

Looping in the same session bloats the context, degrading quality. The solution is external state and separate sessions for each worker.

What is:

When multiple workers try to use the same network port, causing silent failures. The solution is to allocate ports dynamically.

What is:

Workers without proper isolation (without worktrees or database branches) edit the same files and create merge conflicts.

What is:

How to use Agent Control Plane logs to identify poor orchestrator decisions, slow workers, and propagation errors.

What is:

Visual checklist of all prerequisites to verify before starting any loop: exit conditions, state store, isolation, budget, observability.

View Full