Duration: 15-20 minutes + demos Presenter Perspective: The Automation Architect
"What if your scripts could decide they need help?"
Open with a live demo: A simple bash script encounters an error, automatically escalates to an AI agent, gets a fix, applies it, and continues—all without human intervention.
The shift: We're not just writing code anymore. We're writing instructions for systems that can think about their own limitations.
- Software = Instructions + Tools (not just code)
- The skill shift: Learning tools → Creating instructions
- AI agents are the new runtime
---
command: copilot
model: gpt-4o
---
Analyze this error and suggest a fix:
{{ error_output }}Demo Idea: Show how a .md file IS the program. Run ma fix.copilot.md --error_output "$(cat error.log)" and watch it solve a real problem.
Level 1: Fast & Cheap (copilot --model gpt-4o-mini)
↓ on failure/uncertainty
Level 2: Capable (copilot --model gpt-4o)
↓ on complex reasoning needed
Level 3: Expert (claude --model opus)
↓ on multi-file/architectural
Level 4: Multi-Agent Council
1. Confidence-Based Escalation
# First try: fast model
result=$(ma quick-check.copilot.md --task "$TASK")
# Check confidence
if echo "$result" | grep -q "UNCERTAIN"; then
# Escalate to smarter model
result=$(ma deep-analysis.claude.md --task "$TASK")
fi2. Error-Triggered Escalation
# Try simple fix
if ! ma simple-fix.copilot.md --error "$ERROR"; then
# Escalate with full context
ma complex-fix.claude.md --error "$ERROR" --context "$(git diff)"
fi3. Complexity Detection
- Line count heuristics
- File count thresholds
- Dependency graph depth
- Time-based escalation (if fast model takes too long → escalate)
Show a script that:
- Receives a bug report
- Tries a quick copilot fix
- Detects it failed
- Automatically escalates to Claude with more context
- Applies the fix and verifies
#!/bin/bash
MAX_RETRIES=3
AGENT="fix.copilot.md"
for i in $(seq 1 $MAX_RETRIES); do
output=$(ma $AGENT --attempt $i --history "$HISTORY" 2>&1)
exit_code=$?
if [ $exit_code -eq 0 ]; then
echo "Success on attempt $i"
exit 0
fi
# Append failure to history for next attempt
HISTORY="$HISTORY\n---\nAttempt $i failed:\n$output"
# Escalate agent on repeated failures
if [ $i -eq 2 ]; then
AGENT="fix.claude.md"
fi
done- Retry with memory: Each attempt includes previous failures
- Strategy rotation: Try different approaches on each retry
- Graceful degradation: Fall back to simpler solutions
- Human escalation gate: Know when to STOP and ask
---
command: copilot
---
Given this situation, respond with ONE of:
- CONTINUE: [next action] - if confident
- ESCALATE: [reason] - if need smarter model
- ASK: [question] - if need human input
- ABORT: [reason] - if unsafe to continue
Situation: {{ situation }}
Previous attempts: {{ history }}# Code review pipeline
ma analyze.copilot.md --file "$FILE" |
ma critique.claude.md |
ma synthesize.copilot.md > review.md# Run specialists in parallel
ma security-scan.copilot.md --code "$CODE" &
ma performance-check.copilot.md --code "$CODE" &
ma style-review.copilot.md --code "$CODE" &
wait
# Synthesize results
ma synthesize.claude.md --security "$(cat security.out)" \
--perf "$(cat perf.out)" \
--style "$(cat style.out)"---
command: claude
model: opus
---
You are a supervisor agent. You have these worker agents available:
- quick-fix.copilot.md: Fast, simple fixes
- deep-analysis.claude.md: Complex reasoning
- code-gen.copilot.md: Code generation
Given this task, output a PLAN as a sequence of agent calls:
{{ task }}Show 3 agents reviewing code in parallel:
- Security specialist (finds vulnerability)
- Performance specialist (finds N+1 query)
- Style specialist (finds naming issues)
- Supervisor synthesizes into prioritized action items
[Trigger] → [Triage Agent] → [Specialist Agents] → [Synthesis] → [Action]
#!/bin/bash
# On PR opened:
# 1. Quick triage
complexity=$(ma triage.copilot.md --diff "$(gh pr diff)")
# 2. Route based on complexity
case $complexity in
"TRIVIAL")
ma quick-review.copilot.md --diff "$(gh pr diff)"
;;
"STANDARD")
ma full-review.copilot.md --diff "$(gh pr diff)"
;;
"COMPLEX")
# Parallel deep review
ma arch-review.claude.md --diff "$(gh pr diff)" &
ma security-review.claude.md --diff "$(gh pr diff)" &
wait
ma synthesize.claude.md
;;
"NEEDS_HUMAN")
gh pr comment --body "This PR needs human review: $reason"
;;
esac- Log all decisions
- Track success/failure rates per agent
- Automatically adjust thresholds
- Learn which escalation paths work
- Default to fast/cheap models
- Escalate based on signals, not assumptions
- Every escalation should be logged and learnable
- Build uncertainty detection into prompts
- Explicit "I don't know" is better than wrong answers
- Define clear escalation triggers
- Small, focused agents > one mega-agent
- Unix philosophy: do one thing well
- Pipe agents together
- Human escalation as final backstop
- Time limits on autonomous operation
- Audit trails for every decision
- Can I handle this? (capability check)
- Should I handle this? (safety check)
- Did I handle it correctly? (verification)
"The best developers won't be the ones who write the most code. They'll be the ones who orchestrate the best agent workflows."
- Markdown is your new runtime - Instructions are programs
- Escalation is a feature - Build it in from day one
- Composition beats complexity - Small agents, big workflows
- Know when to stop - The best automation knows its limits
- Start with ONE escalation pattern
- Add it to your existing scripts
- Watch your automation become intelligent
| Demo | Duration | Shows |
|---|---|---|
| Quick hook | 30s | Error → AI → Fix → Continue |
| Escalation pipeline | 2min | Copilot fails → Claude succeeds |
| Code review orchestra | 2min | Parallel specialists + synthesis |
| PR bot workflow | 1min | Triage → Route → Review |
- markdown-agent:
npm install -g markdown-agent(orbun install -g markdown-agent) - GitHub Copilot CLI:
gh extension install github/gh-copilot - Pattern library: [link to examples repo]
- Familiar with CLI tools
- Some experience with AI assistants
- Interested in automation
- The "software is instructions" paradigm shift
- Escalation is not failure—it's intelligence
- The supervisor pattern as the future of workflows
- Knowing when to stop is the hardest part
- Cost management with escalation
- Security concerns with autonomous agents
- Testing agent workflows
- Debugging multi-agent systems