Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
Created December 7, 2025 20:16
Show Gist options
  • Select an option

  • Save johnlindquist/83fc1f6f86abd1f9026c2a8a8ff3ba11 to your computer and use it in GitHub Desktop.

Select an option

Save johnlindquist/83fc1f6f86abd1f9026c2a8a8ff3ba11 to your computer and use it in GitHub Desktop.
Scripting Copilot: Piping Hot Intelligence - Microsoft AI Dev Days Talk Outline (Demo-Heavy Edition)

Scripting Copilot: Piping Hot Intelligence

Microsoft AI Dev Days Talk (15-20 min)

Demo-Heavy Edition


Visual Theme: Plumbing

Metaphor: Data plumbing - pipes, valves, pressure gauges, water flow.

  • Pipes carry data (the classic Unix way)
  • Valves control flow (permissions)
  • Pressure gauges show model intensity (Haiku = low pressure, Opus = high pressure)
  • Intelligence is the new water

NOT coffee. Think: industrial plumbing diagrams, Mario Bros pipes, water treatment plants.


THE STRUCTURE

Hook (2 min) → Demo → Demo → Demo → Demo → Demo → Resolution (3 min)

5-6 demos, minimal slides, maximum terminal time.


ACT 1: THE HOOK (2 minutes)

Opening: The Tease

Terminal only. No slides. Big font.

$ ma task.copilot.md

Let it run. Say nothing. Let the AI output appear.

Then turn to audience:

"What if your markdown files could run AI agents?"

Pause.

"That's the punchline. Let me show you how we got here."

The real hook - type this live:

$ git diff | copilot -p "review this code"

As it runs, say:

"Data flows in. Intelligence flows out. That pipe operator - the one you've used for decades - now carries something new."

Key phrase:

"Software used to be Code plus Data. Now it's Instructions plus Tools. The pipe is the bridge."


ACT 2: THE DEMOS (12-14 minutes)

DEMO 1: The Basic Flow (2 min)

What you're showing: The -p flag that unlocks everything.

Setup narration:

"Copilot has an interactive mode. Great for humans. Useless for scripts. The -p flag changes everything."

Type live:

# Interactive mode - can't pipe this
copilot
# [Ctrl+C to exit]

# Non-interactive - THIS is what we need
copilot -p "What is the capital of France?"

Build up:

# Now we can PIPE into it
echo "function add(a,b){return a+b}" | copilot -p "add TypeScript types"

Key insight (say this):

"That -p flag is the faucet handle. Turn it, and intelligence flows."

Backup if demo fails: Screenshot of the output showing typed response.


DEMO 2: The Review Pipeline - THE STAR (3 min)

What you're showing: Git diff piped into AI review.

Setup narration:

"You've been running git diff for years. What if it could tell you if your code is any good?"

Type live:

git diff | copilot -p "review this for bugs"

While it runs, explain:

"Every change I made today is flowing through that pipe into an AI. It's reading, analyzing, and responding."

Build it up - show the chain:

git diff | \
  copilot -p "list each change with file:line" | \
  copilot -p "rate each: low/medium/high risk" | \
  copilot -p "format as markdown table"

Key insight:

"Three AI calls. One pipeline. Each stage refines. This isn't a chatbot. This is a stream processor."

Backup if slow: Have pre-run output ready to show. Say "Let me show you what this produces" and cat the saved output.


DEMO 3: Model Escalation (2 min)

What you're showing: --model flag for choosing intensity.

Setup narration:

"Not every job needs a fire hose. Sometimes you need a garden hose. Haiku is 10x cheaper and 5x faster than Opus."

Visual on slide (quick):

Low Pressure  → claude-haiku-4.5  → Fast triage
Medium        → claude-sonnet-4   → Daily work
High Pressure → claude-opus-4.5   → Deep analysis

Type live:

# Quick classification with Haiku (fast, cheap)
echo "Refactor the authentication module to use OAuth2" | \
  copilot --model claude-haiku-4.5 -p "respond SIMPLE or COMPLEX"

Output: "COMPLEX"

Then:

# Route to Opus for the heavy lifting
copilot --model claude-opus-4.5 -p "Design an OAuth2 integration strategy"

Key insight:

"Use Haiku to decide. Use Opus to solve. Your budget will thank you."

Backup: Pre-saved outputs from each model.


DEMO 4: Permission Valves (2 min)

What you're showing: --allow-tool for controlled access.

Setup narration:

"AI with full access is like a fire hose with no shutoff. Powerful, but dangerous. We have valves."

Type live:

# Git access only - safe for CI
copilot --allow-tool 'shell(git:*)' -p "summarize this week's commits"

While running:

"This AI can run git commands. Nothing else. It can't delete files, can't access the network, can't install packages."

Show the ladder:

# Level 1: Pure analysis (no tools at all)
cat app.ts | copilot -p "find security issues"

# Level 2: Read-only file access
copilot --allow-tool 'Read' -p "review the src directory"

# Level 3: Controlled shell
copilot --allow-tool 'shell(npm:test)' -p "run tests and explain failures"

Key insight:

"The pipe doesn't grant permissions. YOU do. The valve is always in your hand."

Backup: Screenshot of permission boundary outputs.


DEMO 5: Real Pipeline - Debug Flow (2 min)

What you're showing: Practical CI/CD integration.

Setup narration:

"Let's build something real. A debug pipeline that triages, analyzes, and suggests fixes."

Type live:

npm test 2>&1 | \
  copilot --model claude-haiku-4.5 -p "extract only the failing test output" | \
  copilot --model claude-opus-4.5 -p "explain the root cause and suggest a fix"

While running:

"Haiku filters the noise. Opus does the deep analysis. Two models, one pipeline, escalating intelligence."

Show the CI version:

# .github/workflows/review.yml
- run: |
    git diff ${{ github.event.before }}..${{ github.sha }} | \
      copilot -p "output PASS or BLOCK with explanation" | \
      tee review.txt

Key insight:

"Your CI pipeline just got an AI reviewer. No new infrastructure. One line."

Backup: Pre-run output or screenshot.


DEMO 6: The Chain (Optional, if time permits) (2 min)

What you're showing: Multi-stage intelligent pipelines.

Type live:

# Full PR review pipeline
git log --oneline -10 | \
  copilot -p "categorize each commit: feature, fix, refactor, docs" | \
  copilot -p "write release notes grouped by category" | \
  copilot -p "add emoji prefixes and format for GitHub"

Key insight:

"This is what CI/CD looks like when intelligence is just another pipe fitting."


ACT 3: THE RESOLUTION (3-4 minutes)

The Problem: Pipeline Amnesia

Quick slide: A tangled mess of pipes

"Okay, these demos are cool. But be honest - will you remember all these flags tomorrow? Will your team?"

List the pain:

  • --model claude-haiku-4.5 vs --model claude-opus-4.5
  • --allow-tool 'shell(git:*)'
  • Complex prompt strings

"These pipelines are powerful. But they're ephemeral. What if we could save them?"


The Reveal: markdown-agent

Type live:

$ ma review.copilot.md

Explain:

"That markdown file contains everything. The model. The permissions. The prompt. One file. Versioned. Shareable."

Show the file:

# review.copilot.md
---
model: claude-sonnet-4
allow-tool:
  - 'shell(git:*)'
  - Read
---

Review these code changes for:
1. Bug risks
2. Security concerns
3. Performance issues

Prioritize by severity. Format as markdown.

The usage:

# Pipe into your saved pipeline
git diff | ma review.copilot.md

# With variables
ma review.copilot.md --base main

Key insight:

"Your pipeline configurations are now in git. Your team standards are now automated. Your prompts are now code."


The Paradigm

Final slide: The equation

OLD: Software = Code + Data
NEW: Software = Instructions + Tools

"The pipe carried data for fifty years. Now it carries intelligence. Same operator. New payload."


CLOSING (1 minute)

Your Next Steps

Say this:

"Here's your homework. Three commands."

Type live:

# Step 1: Try it
copilot -p "explain what git rebase does"

# Step 2: Pipe it
git diff | copilot -p "review"

# Step 3: Save it
# Create review.copilot.md with your team's standards

Resources

  • Copilot CLI: Built into copilot command
  • markdown-agent: github.com/johnlindquist/agents
  • This talk + demos: [gist link]

Final Line

"The plumbing hasn't changed in fifty years. The water just got smarter. Start piping."


TIMING BREAKDOWN

Section Time Running Total
Hook: ma task.copilot.md + git diff tease 2 min 2 min
Demo 1: Basic -p flag 2 min 4 min
Demo 2: Review pipeline (THE STAR) 3 min 7 min
Demo 3: Model escalation 2 min 9 min
Demo 4: Permission valves 2 min 11 min
Demo 5: Debug pipeline 2 min 13 min
Demo 6: Chain (optional) 2 min 15 min
Resolution: markdown-agent reveal 3 min 18 min
Closing 2 min 20 min

DEMO PREP CHECKLIST

Terminal Setup

  • Font size: 24pt minimum
  • Dark background, high contrast
  • Clear scrollback before each demo
  • Disable notifications

Git Repo Setup

  • Create demo repo with meaningful code
  • Stage some changes for git diff
  • Have 10+ commits for git log demo
  • Include deliberate "bugs" for review to find

Pre-Run Outputs (Backups)

  • Save output of each demo command to files
  • Screenshot each successful run
  • Test timing of each demo (know which are slow)

Files Ready

  • review.copilot.md
  • triage.copilot.md
  • debug.copilot.md
  • Sample error log
  • Sample test failure output

Verify

  • copilot CLI installed and authenticated
  • ma (markdown-agent) installed
  • All models accessible (haiku, sonnet, opus)
  • Network connection stable

COPILOT CLI REFERENCE

# The unlock
copilot -p "prompt"              # Non-interactive mode

# Model selection
--model claude-haiku-4.5         # Fast, cheap (triage)
--model claude-sonnet-4          # Balanced (default)
--model claude-opus-4.5          # Deep analysis

# Permission boundaries
--allow-tool 'shell(git:*)'      # Git only
--allow-tool 'shell(npm:*)'      # npm only
--allow-tool 'Read'              # File reading
--allow-tool 'shell(*)'          # Full shell (careful!)

# Piping patterns
data | copilot -p "task"         # Stdin
copilot -p "task" < file         # File redirect

DEMO FILES

review.copilot.md

---
model: claude-sonnet-4
allow-tool:
  - 'shell(git:*)'
  - Read
---

Review these code changes for:
1. Bug risks (null checks, edge cases)
2. Security concerns (injection, auth)
3. Performance issues (loops, queries)

Prioritize by severity. Format as markdown table.

triage.copilot.md

---
model: claude-haiku-4.5
---

Classify this task complexity.
Respond with ONLY one word: SIMPLE, MODERATE, or COMPLEX.

Task: {{ $1 }}

debug.copilot.md

---
model: claude-sonnet-4
---

Analyze this test failure:
1. Identify the failing assertion
2. Trace the root cause
3. Suggest a specific fix

Be concise. Code examples welcome.

changelog.copilot.md

---
model: claude-sonnet-4
---

Generate release notes from these commits.

Group by:
- Features (new functionality)
- Fixes (bug repairs)
- Improvements (refactors, perf)

Format for GitHub releases with emoji prefixes.

QUOTABLE LINES

"The -p flag is the faucet handle. Turn it, and intelligence flows."

"Three AI calls. One pipeline. This isn't a chatbot. This is a stream processor."

"Use Haiku to decide. Use Opus to solve. Your budget will thank you."

"The pipe doesn't grant permissions. YOU do. The valve is always in your hand."

"Your pipeline configurations are now in git. Your team standards are now automated."

"The plumbing hasn't changed in fifty years. The water just got smarter."


EMERGENCY RECOVERY

If copilot is slow:

"Let me show you what this produces..." [cat pre-saved output]

If copilot errors:

"Network hiccup - here's what it looks like when it works" [show screenshot]

If running long:

Skip Demo 6 (the chain demo) - it's optional buffer time

If audience seems lost:

Slow down on Demo 2 (review pipeline) - that's the core concept

If ahead of time:

Expand Demo 2 with more pipe variations or take questions early


Talk outline for Microsoft AI Dev Days Theme: Piping Hot Intelligence (Plumbing Metaphor) Style: Demo-heavy, minimal slides Duration: 15-20 minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment