Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ Beginner-friendly course teaching GitHub Copilot CLI. Educational content, not s
```bash
npm install && npm run release
```

The standalone video project under `videos/workflows/` has its own package
manifest: `npm run build` renders the silent workflow demo and `npm run verify`
checks its encoding, timing, and closing QR. `npm run narrate` generates cached
timestamped speech, and `npm run finalize` adds it to the picture and verifies
the narrated MP4. See that project's README for
dependency reuse and the recording prerequisites.
11 changes: 11 additions & 0 deletions videos/workflows/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
capture-home.txt
capture.log
capture-exit.txt
preflight.*
assets/
renders/
review/
node_modules/
console/
# Copies of capture/tapes made by the recording scripts.
creation/capture/
290 changes: 290 additions & 0 deletions videos/workflows/README.md

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions videos/workflows/capture/book-release-check/extension.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import { spawn } from "node:child_process";
import { readFile, writeFile } from "node:fs/promises";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { defineWorkflow, joinSession } from "@github/copilot-sdk/extension";

const app = resolve(dirname(fileURLToPath(import.meta.url)), "../../..");

function runPython(args, signal) {
return new Promise((resolveRun, reject) => {
const child = spawn("python3", args, {
cwd: app,
signal,
env: { ...process.env, PYTHONDONTWRITEBYTECODE: "1" },
});
let output = "";
child.stdout.setEncoding("utf8").on("data", (chunk) => { output += chunk; });
child.stderr.setEncoding("utf8").on("data", (chunk) => { output += chunk; });
child.on("error", reject);
child.on("close", (code) => {
if (code === null) {
reject(new Error(`Python was terminated: ${args.join(" ")}`));
} else {
resolveRun({ command: `python3 ${args.join(" ")}`, exitCode: code, output: output.trim() });
}
});
});
}

const releaseCheck = defineWorkflow({
meta: {
name: "book-release-check",
description: "Check the Python book app, pause for human review, then write release-report.md. No inputs.",
phases: [
{ title: "Run project checks", detail: "Run pytest and the CLI help smoke check." },
{ title: "Human review checkpoint", detail: "Resume in /workflows when ready." },
{ title: "Assess release readiness", detail: "An agent evaluates the evidence and test coverage." },
{ title: "Save release report", detail: "Write release-report.md in the book app." },
],
},
run: async (ctx) => {
ctx.phase("Run project checks");
const checks = await ctx.step("book-checks-v1", async () => {
const results = await Promise.all([
runPython(["-m", "pytest", "-q", "-p", "no:cacheprovider", "tests/"], ctx.signal),
runPython(["book_app.py", "help"], ctx.signal),
]);
for (const check of results) {
ctx.log(`${check.exitCode === 0 ? "PASS" : "FAIL"}: ${check.command}\n${check.output}`);
}
return results;
});

ctx.phase("Human review checkpoint");
ctx.log("Project checks are saved. Review the evidence, then resume this run in /workflows.");
await ctx.pause("review-project-checks");

ctx.phase("Assess release readiness");
ctx.log("Resumed with saved check results; the test commands are not run again.");
const sourceFiles = ["books.py", "tests/test_books.py", "README.md"];
const sources = await Promise.all(sourceFiles.map(async (file) =>
`${file}:\n${await readFile(resolve(app, file), "utf8")}`));
const assessment = await ctx.agent(
"Assess this small Python book collection app for a demo release, not production. " +
"Use only the supplied evidence; do not run tools or edit files. " +
"Passing tests do not prove production readiness. Identify exactly two concrete " +
"untested behaviors from the supplied source. Keep each item under 18 words, " +
"and the summary under 30 words.\n\n" +
`Check evidence:\n${JSON.stringify(checks)}\n\n${sources.join("\n\n")}`,
{
label: "Release-readiness assessment",
schema: {
type: "object",
required: ["summary", "untestedBehaviors"],
properties: {
summary: { type: "string" },
untestedBehaviors: { type: "array", items: { type: "string" } },
},
},
},
);
if (assessment === null) {
throw new Error("The release-readiness agent did not return a valid assessment.");
}

ctx.phase("Save release report");
const allPassed = checks.every((check) => check.exitCode === 0);
const report = [
"# Book app release readiness",
"",
`Checks: ${allPassed ? "PASS" : "FAIL"}`,
...checks.map((check) => `- ${check.command}: ${check.exitCode === 0 ? "PASS" : "FAIL"}`),
"",
"## Assessment",
assessment.summary,
"",
"## Test gaps to address",
...assessment.untestedBehaviors.map((gap) => `- ${gap}`),
"",
"Passing checks are evidence, not a guarantee of production readiness.",
"",
].join("\n");
await ctx.step("save-release-report-v1", async () => {
await writeFile(resolve(app, "release-report.md"), report, "utf8");
return { file: "release-report.md" };
});
ctx.log("Saved release-report.md with check results and concrete test gaps.");
return { checksPassed: allPassed, report: "release-report.md", assessment };
},
});

await joinSession({ workflows: [releaseCheck] });
17 changes: 17 additions & 0 deletions videos/workflows/capture/record-console.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
SKILL_ROOT="${CLI_TO_VIDEO_SKILL:-$HOME/Desktop/test/ignite-2026/.github/skills/cli-to-video}"
EXAMPLE="$SKILL_ROOT/examples/dynamic-workflows"
SOURCE_APP="$(cd ../.. && pwd)/samples/book-app-project"
OUTPUT="$PWD/console"
mkdir -p "$OUTPUT/capture/tapes"
trap 'status=$?; printf "%s\n" "$status" > "$OUTPUT/capture-status.txt"' EXIT
cp capture/tapes/console-settings.tape "$OUTPUT/capture/tapes/settings.tape"
cp capture/tapes/console-report.tape "$OUTPUT/capture/tapes/report.tape"
cp capture/tapes/workflow-demo.tape "$OUTPUT/capture/tapes/workflow-demo.tape"
CAPTURE_PYTHON="${CAPTURE_PYTHON:-python3.14}" \
PREFLIGHT='python -m pytest -q -p no:cacheprovider tests/' \
FIXTURE_INSTRUCTIONS="$EXAMPLE/fixture-instructions.md" \
PRELOAD_DIR="$EXAMPLE/preload" \
bash "$SKILL_ROOT/scripts/record.sh" "$SOURCE_APP" "$OUTPUT" workflow-demo report
37 changes: 37 additions & 0 deletions videos/workflows/capture/record-created-workflow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
OUTPUT="$PWD/creation"
SKILL_ROOT="${CLI_TO_VIDEO_SKILL:-$HOME/Desktop/test/ignite-2026/.github/skills/cli-to-video}"
EXAMPLE="$SKILL_ROOT/examples/dynamic-workflows"
SOURCE_APP="$(cd ../.. && pwd)/samples/book-app-project"
export CAPTURE_HOME
CAPTURE_HOME="$(cat "$OUTPUT/capture-home.txt")"
export DEMO_APP="$CAPTURE_HOME/demo-app"
EXTENSION="$DEMO_APP/.github/extensions/book-release-check/extension.mjs"
test -f "$EXTENSION"
PYTHON_EXECUTABLE="$("$CAPTURE_HOME/bin/python3" -c 'import sys; print(sys.executable)')"
if [ ! -e "$CAPTURE_HOME/bin/python" ]; then
ln -s "$PYTHON_EXECUTABLE" "$CAPTURE_HOME/bin/python"
fi
export PATH="$CAPTURE_HOME/bin:$PATH"
HOME="$CAPTURE_HOME" python -m pytest -q -p no:cacheprovider "$DEMO_APP/tests/"
node --check "$EXTENSION"
shasum -a 256 "$EXTENSION" > "$OUTPUT/assets/workflow-before-run.sha256"
export COPILOT_GITHUB_TOKEN
COPILOT_GITHUB_TOKEN="$(gh auth token)"
export COPILOT_AUTO_UPDATE=false
unset COPILOT_CUSTOM_INSTRUCTIONS_DIRS COPILOT_SUPERVISED COPILOT_LOADER_PID
cp capture/tapes/workflow-created-run.tape "$OUTPUT/capture/tapes/"
cp capture/tapes/console-report.tape "$OUTPUT/capture/tapes/report.tape"
cp capture/tapes/workflow-created-report.tape "$OUTPUT/capture/tapes/"
cd "$OUTPUT/capture"
vhs tapes/workflow-created-run.tape
test -s "$DEMO_APP/release-report.md"
vhs tapes/report.tape
vhs tapes/workflow-created-report.tape
cp "$DEMO_APP/release-report.md" "$OUTPUT/assets/release-report.md"
cp "$EXTENSION" "$OUTPUT/assets/generated-extension.mjs"
shasum -a 256 "$EXTENSION" > "$OUTPUT/assets/workflow-after-run.sha256"
cmp "$OUTPUT/assets/workflow-before-run.sha256" "$OUTPUT/assets/workflow-after-run.sha256"
node "$EXAMPLE/hooks/record-origin.mjs" "$OUTPUT" "$SOURCE_APP"
15 changes: 15 additions & 0 deletions videos/workflows/capture/record-creation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
SKILL_ROOT="${CLI_TO_VIDEO_SKILL:-$HOME/Desktop/test/ignite-2026/.github/skills/cli-to-video}"
EXAMPLE="$SKILL_ROOT/examples/dynamic-workflows"
SOURCE_APP="$(cd ../.. && pwd)/samples/book-app-project"
OUTPUT="$PWD/creation"
mkdir -p "$OUTPUT/capture/tapes"
cp capture/tapes/console-settings.tape "$OUTPUT/capture/tapes/settings.tape"
cp capture/tapes/workflow-create.tape "$OUTPUT/capture/tapes/workflow-create.tape"
CAPTURE_PYTHON="${CAPTURE_PYTHON:-python3.14}" \
PREFLIGHT='python -m pytest -q -p no:cacheprovider tests/' \
FIXTURE_INSTRUCTIONS="$EXAMPLE/fixture-instructions.md" \
AFTER_TAPE="$EXAMPLE/hooks/after-tape.sh" \
bash "$SKILL_ROOT/scripts/record.sh" "$SOURCE_APP" "$OUTPUT" workflow-create
35 changes: 35 additions & 0 deletions videos/workflows/capture/record.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"

for tool in vhs ttyd ffmpeg ffprobe copilot gh; do
command -v "$tool" >/dev/null || { echo "Missing required tool: $tool" >&2; exit 1; }
done
CAPTURE_PYTHON="${CAPTURE_PYTHON:-python3}"
PYTHON_EXECUTABLE="$("$CAPTURE_PYTHON" -c 'import sys; assert sys.version_info >= (3, 10), "Use Python 3.10+ via CAPTURE_PYTHON"; print(sys.executable)')"

export CAPTURE_HOME
CAPTURE_HOME="$(mktemp -d /private/tmp/ghcp-workflows.XXXXXX)"
bash setup-env.sh "$CAPTURE_HOME"
mkdir -p "$CAPTURE_HOME/bin"
ln -s "$PYTHON_EXECUTABLE" "$CAPTURE_HOME/bin/python3"
export PATH="$CAPTURE_HOME/bin:$PATH"
HOME="$CAPTURE_HOME" python3 -m pytest --version
mkdir -p "$CAPTURE_HOME/book-app/.github/extensions/book-release-check" ../assets ../renders
cp book-release-check/extension.mjs "$CAPTURE_HOME/book-app/.github/extensions/book-release-check/"
printf '%s\n' "$CAPTURE_HOME" > ../capture-home.txt
export COPILOT_GITHUB_TOKEN
COPILOT_GITHUB_TOKEN="$(gh auth token)"
export COPILOT_AUTO_UPDATE=false

TAPE="${1:-workflow-demo}"
vhs validate "tapes/$TAPE.tape"
echo "Warming up authentication and first-run notices..."
vhs tapes/preflight.tape >/dev/null
echo "Recording $TAPE..."
vhs "tapes/$TAPE.tape"
if [ "$TAPE" = workflow-demo ]; then
test -s "$CAPTURE_HOME/book-app/release-report.md"
cp "$CAPTURE_HOME/book-app/release-report.md" ../assets/release-report.md
vhs tapes/report.tape
fi
5 changes: 5 additions & 0 deletions videos/workflows/capture/render.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
node production/build.mjs
node production/verify.mjs
39 changes: 39 additions & 0 deletions videos/workflows/capture/setup-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail

PROJECT_ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
CAPTURE_HOME="${1:?Pass a newly created temporary HOME directory}"
APP="$CAPTURE_HOME/book-app"

mkdir -p "$APP/.github/extensions" "$CAPTURE_HOME/.copilot"
rsync -a --exclude '__pycache__' --exclude '.pytest_cache' --exclude '*.pyc' \
"$PROJECT_ROOT/samples/book-app-project/" "$APP/"

cat > "$CAPTURE_HOME/.copilot/settings.json" <<JSON
{
"showTipsOnStartup": false,
"streamerMode": true,
"banner": "never",
"experimental": true,
"ide": { "autoConnect": false },
"updateTerminalTitle": false
}
JSON
printf '{"trustedFolders":["%s"]}\n' "$APP" > "$CAPTURE_HOME/.copilot/config.json"

cat > "$APP/.github/copilot-instructions.md" <<'MD'
# Book app recording

This is an isolated copy of the course's Python book collection app.
Keep responses short and beginner-friendly. Do not change application code.
When explicitly asked to run a dynamic workflow, use the registered workflow.
Do not recreate it or substitute normal subagents.
MD

cat > "$APP/.gitignore" <<'EOF'
__pycache__/
.pytest_cache/
*.pyc
release-report.md
EOF
git -C "$APP" init -q -b main
11 changes: 11 additions & 0 deletions videos/workflows/capture/tapes/console-report.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Output "../assets/report-raw.mp4"
Output "../assets/report-terminal.txt"
Source tapes/settings.tape
Type "# The workflow saved this report in the project"
Enter
Sleep 2s
Type "fold -s -w 112 release-report.md"
Sleep 700ms
Enter
Sleep 12s
Screenshot "../assets/09-report.png"
16 changes: 16 additions & 0 deletions videos/workflows/capture/tapes/console-settings.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Set Shell "bash"
Set Width 1920
Set Height 1016
Set FontSize 26
Set FontFamily "JetBrainsMono Nerd Font Mono"
Set LineHeight 1.10
Set Padding 24
Set Framerate 30
Set TypingSpeed 45ms
Set CursorBlink false
Set Theme { "name": "workflow-console", "black": "#484f58", "red": "#ff7b72", "green": "#3fb950", "yellow": "#d29922", "blue": "#58a6ff", "magenta": "#d2a8ff", "cyan": "#56d4dd", "white": "#e6edf3", "brightBlack": "#6e7681", "brightRed": "#ffa198", "brightGreen": "#56d364", "brightYellow": "#e3b341", "brightBlue": "#79c0ff", "brightMagenta": "#f0b6ff", "brightCyan": "#87e8ef", "brightWhite": "#ffffff", "background": "#0e1116", "foreground": "#e6edf3", "selection": "#264f78", "cursor": "#58a6ff" }
Hide
Type `export HOME="$CAPTURE_HOME" COPILOT_AUTO_UPDATE=false; cd "$DEMO_APP"; export PS1='\[\e[38;5;117m\]~/demo-app\[\e[0m\] $ '; clear`
Enter
Sleep 500ms
Show
11 changes: 11 additions & 0 deletions videos/workflows/capture/tapes/report.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Output "../assets/report-raw.mp4"
Output "../assets/report-terminal.txt"
Source tapes/settings.tape
Type "# The workflow saved this report in the project"
Enter
Sleep 2s
Type "fold -s -w 100 release-report.md"
Sleep 700ms
Enter
Sleep 12s
Screenshot "../assets/09-report.png"
16 changes: 16 additions & 0 deletions videos/workflows/capture/tapes/settings.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Set Shell "bash"
Set Width 1920
Set Height 1080
Set FontSize 28
Set FontFamily "JetBrainsMono Nerd Font Mono"
Set LineHeight 1.15
Set Padding 36
Set Framerate 30
Set TypingSpeed 45ms
Set CursorBlink false
Set Theme { "name": "workflow-demo", "black": "#484f58", "red": "#ff7b72", "green": "#3fb950", "yellow": "#d29922", "blue": "#58a6ff", "magenta": "#d2a8ff", "cyan": "#56d4dd", "white": "#e6edf3", "brightBlack": "#6e7681", "brightRed": "#ffa198", "brightGreen": "#56d364", "brightYellow": "#e3b341", "brightBlue": "#79c0ff", "brightMagenta": "#f0b6ff", "brightCyan": "#87e8ef", "brightWhite": "#ffffff", "background": "#0e1116", "foreground": "#e6edf3", "selection": "#264f78", "cursor": "#58a6ff" }
Hide
Type `export HOME="$CAPTURE_HOME" COPILOT_AUTO_UPDATE=false; cd "$HOME/book-app"; export PS1='\[\e[38;5;117m\]~/book-app\[\e[0m\] $ '; clear`
Enter
Sleep 500ms
Show
22 changes: 22 additions & 0 deletions videos/workflows/capture/tapes/workflow-create.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Output "../assets/creation-raw.mp4"
Output "../assets/creation-terminal.txt"
Source tapes/settings.tape

Hide
Type "copilot --experimental --disable-builtin-mcps --allow-all-tools --no-remote"
Enter
Sleep 10s
Show
Sleep 1s
Screenshot "../assets/creation-open.png"
Set TypingSpeed 24ms
Type "Create book-release-check as a reusable project dynamic workflow extension: run pytest and CLI help; pause for my review; ask an agent for two untested behaviors; save release-report.md. Journal checks so resume does not rerun them. Do not run it yet."
Sleep 2s
Screenshot "../assets/creation-prompt.png"
Enter
Sleep 180s
Screenshot "../assets/creation-result.png"
Ctrl+C
Sleep 500ms
Ctrl+C
Sleep 1s
8 changes: 8 additions & 0 deletions videos/workflows/capture/tapes/workflow-created-report.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Output "../assets/report-focused-raw.mp4"
Output "../assets/report-focused-terminal.txt"
Source tapes/settings.tape
Type "sed -n '1,7p;/## Two untested behaviors/,$p' release-report.md | fold -s -w 112"
Sleep 800ms
Enter
Sleep 14s
Screenshot "../assets/report-focused.png"
Loading
Loading