Purpose: Safe sandbox for learning and building phased workflow skills with strict validation.
Status: Reference implementation of schema-optimization workflow (5-phase test harness)
# You are here:
cd workspace/lab/
# Explore the reference implementation:
ls -la schema-optimization/
# Read the learning guides:
cat GUIDE-00-START-HERE.md # Start here (5 min read)
cat GUIDE-01-PATTERN-EXPLAINED.md # Deep dive on pattern (15 min)
cat GUIDE-02-BUILDING-YOUR-OWN.md # Build your own workflow (30 min)
cat GUIDE-03-DEBUGGING-TIPS.md # Troubleshooting common issuesschema-optimization/ - Complete 5-phase workflow skill system
- Orchestrator that creates session directories, spawns phases, validates outputs
- 5 phase agents with strict JSON contracts
- Reference instruction docs (the "do exactly this" procedures)
- Real verification script (Phase 4 runs actual shell script)
- Sample outputs showing realistic workflow results
- GUIDE-00-START-HERE.md - Introduction and mental model (5 min)
- GUIDE-01-PATTERN-EXPLAINED.md - Why this pattern works, component breakdown (15 min)
- GUIDE-02-BUILDING-YOUR-OWN.md - Step-by-step: adapt this for your use case (30 min)
- GUIDE-03-DEBUGGING-TIPS.md - Common pitfalls and solutions (15 min)
- ORCHESTRATION-PATTERN.md ⭐ - Complete reference guide (60 min) - The definitive deep-dive into subagent orchestration with contracts, verification, and advanced patterns
exercises/ - Hands-on practice
- Exercise 1: Run the reference workflow
- Exercise 2: Modify Phase 4 verification script
- Exercise 3: Add a new Phase 6
- Exercise 4: Build a 3-phase workflow from scratch
Traditional LLM workflows are fragile:
- Agent writes text, you can't verify it's correct
- No evidence of work performed
- Hard to debug when it fails
- Outputs are unstructured
Test harness pattern solves this:
- Agent MUST produce file artifact (evidence)
- Agent MUST return strict JSON (machine-checkable)
- Orchestrator validates before continuing
- Each phase builds on validated prior work
- Failure points are clear and debuggable
Real-world applications:
- Data pipeline validation (this example)
- Code review workflows (analyze → lint → test → security scan → report)
- Research synthesis (search → extract → analyze → verify → synthesize)
- Compliance audits (collect → analyze → verify → remediate → report)
Beginner (1 hour):
- Read GUIDE-00-START-HERE.md
- Explore schema-optimization/ structure
- Read one phase agent contract (agents/phase_1.md)
- Skim ORCHESTRATION-PATTERN.md for big picture
- Look at corresponding reference doc (references/01-phase-1.md)
- Run Exercise 1: Execute the workflow
Intermediate (3 hours):
- Read GUIDE-01-PATTERN-EXPLAINED.md
- Study orchestrator validation logic (SKILL.md)
- Run Exercise 2: Modify verification script
- Read GUIDE-02-BUILDING-YOUR-OWN.md
- Run Exercise 3: Add Phase 6
Advanced (1 day):
- Read GUIDE-03-DEBUGGING-TIPS.md
- Run Exercise 4: Build 3-phase workflow from scratch
- Adapt pattern for your own use case
- Deploy to production (move out of lab/)
workspace/lab/
├── README.md (you are here)
├── GUIDE-00-START-HERE.md
├── GUIDE-01-PATTERN-EXPLAINED.md
├── GUIDE-02-BUILDING-YOUR-OWN.md
├── GUIDE-03-DEBUGGING-TIPS.md
├── schema-optimization/ # Reference implementation
│ ├── SKILL.md # Orchestrator
│ ├── agents/ # Phase subagents
│ │ ├── phase_1.md
│ │ ├── phase_2.md
│ │ ├── phase_3.md
│ │ ├── phase_4.md
│ │ └── phase_5.md
│ ├── references/ # Step-by-step procedures
│ │ ├── 01-phase-1.md
│ │ ├── 02-phase-2.md
│ │ ├── 03-phase-3.md
│ │ ├── 04-verify-with-script.md
│ │ └── 05-phase-5.md
│ ├── scripts/ # Deterministic tools
│ │ └── analyze_field_utilization.sh
│ └── reports/ # Output artifacts
│ ├── runs/ # Session directories (created at runtime)
│ └── _samples/ # Example outputs
│ └── 2025-01-15_143022/
│ ├── 01-initial-schema-analysis.md
│ ├── 02-field-utilization-analysis.md
│ ├── 03-impact-assessment.md
│ ├── 04-field-utilization-verification.md
│ └── 05-final-recommendations.md
└── exercises/
├── exercise-1-run-workflow.md
├── exercise-2-modify-script.md
├── exercise-3-add-phase-6.md
└── exercise-4-build-from-scratch.md
- Evidence-Based: Every phase writes a file (can't fake it)
- Machine-Checkable: JSON outputs can be validated programmatically
- Fail-Fast: Orchestrator stops on first validation failure
- Composable: Phases are independent, reusable components
- Debuggable: Clear failure points, structured outputs
- Repeatable: Same inputs = same outputs (deterministic scripts)
This entire workspace/ directory is gitignored:
- Safe to experiment freely
- No risk of committing test artifacts
- Can run real workflows with real data
- Delete and rebuild anytime
When you build something production-ready:
- Move it out of workspace/
- Clean up any test data
- Add proper documentation
- Commit to version control
Q: Can I modify the reference implementation? A: Yes! That's the point. This is a learning sandbox.
Q: What if I break something? A: Just delete and rebuild. Or refer to the guides.
Q: Can I use this pattern for non-data workflows? A: Absolutely. See GUIDE-02-BUILDING-YOUR-OWN.md for examples.
Q: Is this production-ready? A: The pattern is. The reference implementation is educational. For production: add error handling, logging, monitoring, tests.
Next Step: Open GUIDE-00-START-HERE.md and start learning.
Intent Solutions IO - Learning Lab Created: 2025-01-15