Add three new sections to all 14 examples: - "Carry Forward": what output feeds into later examples (01-10) - "The Cumulative Path": alternative prompt building on previous output (02-10) - "Now Try It Yourself": personalized template with transferable pattern (all) - "Building On" callout connecting back to previous examples (02-10) Add Example 14: Build Your Personal Agent - capstone that guides reader through writing their own CLAUDE.md, creating a personal skill, connecting a messaging channel, setting up automation, and testing end-to-end. Update README with cumulative path diagram, two usage modes, and example 14. Update GETTING-STARTED.md with cross-references to relevant examples. 17 files changed, 703+ lines added. The examples now form a coherent learning path from "see what it can do" to "build your own agent." Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
174 lines
6.1 KiB
Markdown
174 lines
6.1 KiB
Markdown
# Example 10: Full Pipeline
|
|
|
|
**Capability:** A complete workflow combining web search, multi-agent orchestration,
|
|
file I/O, memory, hooks, and logging in a single Claude Code run.
|
|
|
|
**OpenClaw equivalent:** End-to-end agent pipeline with messaging, skills, and hooks.
|
|
|
|
> **Building on Examples 01-09.** This is the culmination. Every capability you explored individually now runs as a single, automated pipeline. If you followed the Cumulative Path, you already built the pieces. This example connects them.
|
|
|
|
---
|
|
|
|
## What This Demonstrates
|
|
|
|
Every capability from examples 01-09 working together:
|
|
|
|
| Step | Capability | Example |
|
|
|------|-----------|---------|
|
|
| 1 | Web search | 03-web-search |
|
|
| 2 | Researcher agent | 06-multi-agent |
|
|
| 3 | Writer agent | 06-multi-agent |
|
|
| 4 | Reviewer agent | 06-multi-agent |
|
|
| 5 | File I/O | 02-shell-and-files |
|
|
| 6 | Memory update | 05-memory-system |
|
|
| 7 | Security logging | 09-security-hooks |
|
|
| 8 | Agent runtime loop | 01-agent-runtime |
|
|
|
|
---
|
|
|
|
## The Prompt
|
|
|
|
```
|
|
Run a full research-to-output pipeline on the topic: "How Claude Code handles
|
|
permission modes: plan, autoEdit, and bypassPermissions"
|
|
|
|
Pipeline steps:
|
|
1. Use the researcher agent to gather information from the web and official docs
|
|
2. Pass the research to the writer agent to draft a 400-word explainer
|
|
3. Send the draft to the reviewer agent for accuracy and clarity feedback
|
|
4. Incorporate the reviewer's feedback into a final version
|
|
5. Save the final version to pipeline-output/permission-modes.md
|
|
6. Append a pipeline execution summary to memory/pipeline-log.md with:
|
|
- Date and time
|
|
- Topic researched
|
|
- Word count of final output
|
|
- Any issues encountered
|
|
7. Show me the first 10 lines of the output file to confirm everything worked
|
|
```
|
|
|
|
---
|
|
|
|
## What Happens
|
|
|
|
Claude Code will coordinate the full pipeline autonomously:
|
|
|
|
- The researcher agent uses WebSearch and WebFetch
|
|
- The writer agent produces structured prose
|
|
- The reviewer agent critiques and returns specific feedback
|
|
- A revision loop runs if needed (bounded by maxTurns in settings.json)
|
|
- File writes are intercepted by PostToolUse for audit logging
|
|
- Memory is updated so the next session knows this pipeline ran
|
|
|
|
You will see each agent invocation streamed in sequence. The entire pipeline
|
|
typically completes in 2-4 minutes depending on web fetch latency.
|
|
|
|
---
|
|
|
|
## Expected Output
|
|
|
|
The pipeline takes 2-4 minutes. You will see agent invocations streaming:
|
|
|
|
1. **Researcher agent** runs WebSearch and WebFetch (30-60 seconds)
|
|
2. **Writer agent** produces a ~400-word draft (15-30 seconds)
|
|
3. **Reviewer agent** critiques the draft (15-30 seconds)
|
|
4. **Revision** if needed (15-30 seconds)
|
|
5. **File writes** to pipeline-output/ and memory/
|
|
|
|
When complete, two new files exist:
|
|
|
|
`pipeline-output/permission-modes.md` (the article):
|
|
```markdown
|
|
# How Claude Code Handles Permission Modes
|
|
|
|
Claude Code provides three permission modes that control how much
|
|
autonomy the agent has...
|
|
[~400 words with accurate technical content]
|
|
```
|
|
|
|
`memory/pipeline-log.md` (the execution log):
|
|
```markdown
|
|
## Pipeline Run - March 26, 2026
|
|
|
|
- **Topic:** How Claude Code handles permission modes
|
|
- **Word count:** 412
|
|
- **Issues:** None
|
|
- **Duration:** ~3 minutes
|
|
```
|
|
|
|
**How you know it worked:**
|
|
- Both files exist in the expected directories
|
|
- The article is accurate (check against `security/permission-modes-explained.md`)
|
|
- The pipeline log has today's date and a word count
|
|
- You saw three distinct agent invocations in the terminal
|
|
|
|
---
|
|
|
|
## Why This Matters
|
|
|
|
This is what Claude Code looks like as an actual agent platform, not a
|
|
chat assistant. The same architecture, with different prompts and agents,
|
|
runs the article production pipeline at `fromaitochitta.com`.
|
|
|
|
The companion repo you are reading is the minimal version of that setup.
|
|
Clone it, open Claude Code, and run this prompt to see the full stack work.
|
|
|
|
---
|
|
|
|
## Carry Forward
|
|
|
|
You now have a working end-to-end pipeline. From here:
|
|
|
|
- **Examples 11-13** add advanced capabilities (desktop control, remote access, autonomous mode) that can extend this pipeline
|
|
- **Example 14** takes everything you learned and builds your own personalized agent
|
|
|
|
The pipeline pattern, research + draft + review + save + notify, works for any domain. Change the topic, swap the agents, adjust the output format. The architecture stays the same.
|
|
|
|
---
|
|
|
|
## The Cumulative Path
|
|
|
|
> If you followed the Cumulative Path through Examples 01-09, you already
|
|
> have most of the pipeline output. This prompt runs the complete flow from
|
|
> scratch on a new topic, proving the pipeline works end-to-end.
|
|
|
|
```
|
|
Run a full research-to-output pipeline on the topic: "What can Claude Code
|
|
do that I did not know about before running these examples?"
|
|
|
|
Pipeline steps:
|
|
1. Read memory/research-state.md to understand what has been explored
|
|
2. Use the researcher agent to search for capabilities not yet covered
|
|
3. Use the writer agent to draft a 400-word personal discovery summary
|
|
4. Use the reviewer agent to verify all claims
|
|
5. Save to pipeline-output/personal-discoveries.md
|
|
6. Append execution log to memory/pipeline-log.md
|
|
7. Show me the first 10 lines of the output file
|
|
```
|
|
|
|
This is a genuinely useful output: a personalized summary of what you learned, produced by the pipeline you just built.
|
|
|
|
---
|
|
|
|
## Now Try It Yourself
|
|
|
|
Replace the topic with something your pipeline should produce regularly:
|
|
|
|
```
|
|
Run a full research-to-output pipeline on: "[your recurring research topic]"
|
|
|
|
Pipeline steps:
|
|
1. [your research source: web, files, APIs]
|
|
2. Use the researcher agent to [gather what you need]
|
|
3. Use the writer agent to draft a [format] for [audience]
|
|
4. Use the reviewer agent to check [what matters most]
|
|
5. Save to pipeline-output/[your-output].md
|
|
6. Log to memory/pipeline-log.md
|
|
7. Show me the first 10 lines
|
|
```
|
|
|
|
**The pattern you just learned:** the full pipeline is a recipe with interchangeable ingredients. Swap the research topic, change the output format, adjust the audience. The agent orchestration, file I/O, memory, and logging stay the same.
|
|
|
|
Ideas worth trying:
|
|
- Weekly industry briefing for your team
|
|
- Automated due diligence report for vendors or partners
|
|
- Content pipeline that drafts, reviews, and delivers blog posts
|